Certain atoms are predefined by the X server, and in some cases there are constants in gtk.h corresponding to these atoms. Both selections and targets are identified by atoms. Retrieving the selection Retrieving the selection is an asynchronous process. If at all possible, the time field should be the time from the event that triggered the selection. This helps make sure that events occur in the order that the user requested them.
Most targets can only return one type.
Usually, you don't care about this when receiving data. If length is negative, then an error occurred and the selection could not be retrieved. This might happen if no application owned the selection, or if you requested a target that the application didn't support. Supplying the selection is a bit more complicated. You must register handlers that will be called when your selection is requested.