nanogui: Newbie question--passing events between programs


Previous by date: 31 Jan 2002 01:18:50 -0000 Re: nanogui for uClinux, Greg Haerr
Next by date: 31 Jan 2002 01:18:50 -0000 Re: is there Kaffe use microwindows, Greg Haerr
Previous in thread: 31 Jan 2002 01:18:50 -0000 Re: Newbie question--passing events between program s, Alex Holden
Next in thread: 31 Jan 2002 01:18:50 -0000 Re: Newbie question--passing events between program s, Alex Holden

Subject: Re: [nanogui] RE: Newbie question--passing events between program s
From: "Greg Haerr" ####@####.####
Date: 31 Jan 2002 01:18:50 -0000
Message-Id: <046801c1a9f3$660909e0$3aba46a6@xmission.com>

Looks good.  Do you think we need anything special to store
longwords rather than just string data?  If we store longs as
&long, sizeof(long) it'll work, but the data will be client-processor-endian
dependent, that probably doesn't matter...

Regards,

Greg



: Ok, how about this:
: 
: typedef unsigned char GR_PROP;
: 
: /**
:   * GrChangeProperty:
:   *
:   * @wid: the ID of the window the property is attached to
:   * @property: the name of the property
:   * @data: the data to be stored in the property
:   * @len: the length of the data to be stored in the property
:   *
:   * Changes the data stored in the specified property attached to the
:   * specified window. If the property does not already exist, it will be
:   * created. The property name should be a zero terminated string. To
:   * create a global property, attach it the root window
:   * (GR_ROOT_WINDOW_ID). If data is a null pointer but len is 1, the
:   * property is created with no data block attached to it. If len is 0,
:   * the property is deleted.
:   */
: void GrChangeProperty(GR_WINDOW_ID wid, GR_CHAR *property,
:                        GR_PROP *data, GR_COUNT len);
: 
: /**
:   * GrGetWindowProperty:
:   *
:   * @wid: the ID of the window the property is attached to
:   * @property: the name of the property
:   * @data: pointer to a pointer to hold the address of the returned data
:   * @Returns: the length of the returned data block
:   *
:   * Searches for a property with the specified name in the list of
:   * properties attached to the specified window and returns the data
:   * block associated with the property. If no such property is found, the
:   * length is zero and the a null pointer is stored in the data pointer.
:   * If the property exists but no data block is associated with it, 1 is
:   * returned for the length and the data pointer is set to NULL. The data
:   * block is allocated with malloc() at call time, and it is the callers
:   * responsibility to free it when no longer needed.
:   */
: GR_COUNT GrGetWindowProperty(GR_WINDOW_ID wid, GR_CHAR *property,
:                          GR_PROP **data);
: 
: These are basically much simplified versions of XChangeProperty() and 
: XGetWindowProperty(). It's also possible to create an analog of 
: XDeleteProperty() with just a #define:
: 
: #define GrDeleteProperty(wid, property) GrChangeProperty(wid, \
:                                               property, NULL, 0)
: 
: -- 
: ------------ Alex Holden - http://www.linuxhacker.org ------------
: If it doesn't work, you're not hitting it with a big enough hammer
: 


Previous by date: 31 Jan 2002 01:18:50 -0000 Re: nanogui for uClinux, Greg Haerr
Next by date: 31 Jan 2002 01:18:50 -0000 Re: is there Kaffe use microwindows, Greg Haerr
Previous in thread: 31 Jan 2002 01:18:50 -0000 Re: Newbie question--passing events between program s, Alex Holden
Next in thread: 31 Jan 2002 01:18:50 -0000 Re: Newbie question--passing events between program s, Alex Holden


Powered by ezmlm-browse 0.20.