X has a simple cut-and-paste mechanism (typically, you
select some text with button 1 and paste with button
2). The current contents of the "clipboard" are called
the selection. You only need
to know about this if you are writing a widget like GtkText or GtkEntry that allows you to cut and
paste text. Selection events indicate that the current
selection has changed, and look like this:
typedef struct _GdkEventSelection GdkEventSelection;
struct _GdkEventSelection
{
GdkEventType type;
GdkWindow *window;
gint8 send_event;
GdkAtom selection;
GdkAtom target;
GdkAtom property;
guint32 requestor;
guint32 time;
};
|
Most GTK+ widgets deal with the selection using a
higher-level interface, found in
gtk/gtkselection.h. If you're interested in
writing selection-handling code, have a look at this
header.