nanogui: Newbie question--passing events between programs


Previous by date: 30 Jan 2002 01:53:10 -0000 Re: Newbie question--passing events between program s, Alex Holden
Next by date: 30 Jan 2002 01:53:10 -0000 Microwindows Win32 API doc., Fabrice Gautier
Previous in thread: 30 Jan 2002 01:53:10 -0000 Re: Newbie question--passing events between program s, Alex Holden
Next in thread: 30 Jan 2002 01:53:10 -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: 30 Jan 2002 01:53:10 -0000
Message-Id: <01bd01c1a92f$0599b100$3aba46a6@xmission.com>

: /**
:   * GrAddTag:
:   * @wid: the ID of the window associated with the tag
:   * @tag: the tag string
:   *
:   * Adds the specified tag with the specified window ID to the server tag
:   * list. If the tag already exists, its ID is changed to that specified
:   * in this call. tag must be a zero terminated string less than ??
:   * characters in length.
:   */

How about the idea of just implementing window property strings,
ala X?  We need them for certain programs.  This would work
also for your Tag idea if there were global properties as well.

Regards,

Greg







: void GrAddTag(GR_WINDOW_ID wid, GR_CHAR *tag);
: 
: /**
:   * GrDeleteTag:
:   * @tag: the tag string
:   *
:   * Deletes the specified tag from the server tag list. If no such tag
:   * exists, nothing is changed. tag must be a zero terminated string.
:   */
: void GrDeleteTag(GR_CHAR *tag);
: 
: /**
:   * GrFindTag:
:   * @tag: the tag string
:   *
:   * Finds the specified tag in the server tag list and returns the
:   * ID of the window associated with it. This is typically used to
:   * find the ID of a window with a known tag string which you wish to
:   * send data to using GrSendClientData() or request data from
:   * using GrRequestClientData(). If the tag is not found, -1 is returned.
:   * tag must be a zero terminated string.
:   */
: GR_WINDOW_ID GrFindTag(GR_CHAR *tag);
: 
: So with this API in place, Henry would have been able to decide on a tag 
: string for his client window (eg. "henrys_client_1") and call in the client:
: 
: GrSelectEvents(client_window_id, GR_EVENT_MASK_CLIENT_DATA);
: GrAddTag(client_window_id, "henrys_client_1");
: 
: Then in the server do:
: 
: client_window_id = GrFindTag("henrys_client_1");
: GrSendClientData(server_window_id, client_window_id, 0, 5, 5, "hello");
: 
: The client would then receive an event with 
: type=GR_EVENT_TYPE_CLIENT_DATA, wid=client_window_id, 
: rid=server_window_id, serial=0, len=5, datalen=5, and data="hello".
: 
: It might be a good idea to automatically clean the tag list when a 
: window is destroyed so we don't get stale tags lying around if a client 
: crashes or forgets to delete its tags on exit.
: 
: -- 
: ------------ Alex Holden - http://www.linuxhacker.org ------------
: If it doesn't work, you're not hitting it with a big enough hammer
: 


Previous by date: 30 Jan 2002 01:53:10 -0000 Re: Newbie question--passing events between program s, Alex Holden
Next by date: 30 Jan 2002 01:53:10 -0000 Microwindows Win32 API doc., Fabrice Gautier
Previous in thread: 30 Jan 2002 01:53:10 -0000 Re: Newbie question--passing events between program s, Alex Holden
Next in thread: 30 Jan 2002 01:53:10 -0000 Re: Newbie question--passing events between program s, Alex Holden


Powered by ezmlm-browse 0.20.