Client events are an arbitrary chunk of data sent from
one application to another. However, there are some
conventional "messages" that can be sent, mostly
defined in the Inter-Client Communication Conventions
Manual (ICCCM). The ICCCM is free with the X Window
System distribution from the Open Group. Client events
are mostly used for communication between applications
and the window manager. (The Xlib event being wrapped
is called
ClientMessage, so look for ClientMessage in the ICCCM.) An
important ClientMessage
event is sent from the window manager to applications,
asking for windows to be deleted. However, GDK converts
these events to a
GdkEventAny with type
GDK_DELETE, so a
GdkEventClient will not be received. Some events
involved in drag-and-drop are also ClientMessage events, but GDK
translates these to
GdkEventDND, so a
GdkEventClient will not be received for them
either. GdkEventClient
will only be received if some other client sends your
application an unconventional message GDK and GTK+ are
not prepared to understand. Most of the common messages
are nicely wrapped in a high-level interface.
Just for reference, here is the event:
typedef struct _GdkEventClient GdkEventClient;
struct _GdkEventClient
{
GdkEventType type;
GdkWindow *window;
gint8 send_event;
GdkAtom message_type;
gushort data_format;
union {
char b[20];
short s[10];
long l[5];
} data;
};
|
The union at the end is used to hold the contents of
the message. send_event
is always TRUE, since
this event is always sent from one client to another
and does not come from the X server.