Next: 3. The Drag Protocol
Up: 2. Protocol Basics
Previous: 5. Advertising a Receiver
  Contents
  Index
When an initiator starts a drag - or even only a drop -, then it
first creates a new property on the source window. The name of this
property can be arbitrary, but it must be of type
_MOTIF_DRAG_INITIATOR_INFO and have a data size of 8. This
property then should contain information about which targets the
initiator is able to serve and what selection atom to use for the data
transfer. Table shows the structure of this
property.
_MOTIF_DRAG_RECEIVER_INFO
Table:
The structure of the
_MOTIF_DRAG_INITIATOR_INFO property describes the initiator.
Offset |
Size |
Description |
+0x00 |
BYTE |
Byte Order: either 'B' (MSB first) or 'l'
(LSB first). |
+0x01 |
BYTE |
Protocol Version of Initiator: currently 0. |
+0x02 |
CARD16 |
Targets Index: the index of a targets list within the
targets table. The first list within the targets list has an index
of 0. This index advertises which targets the initiator is willing
to handle. |
+0x04 |
CARD32 |
Selection Atom: atom ID to be used as the selection atom
for the data transfer when the drop actually takes place. |
|
Figure finally shows the four properties which are
representing an important part of the information infrastructure for the
drag and drop mechanism.
Figure:
Properties involved in the Drag & Drop game.
|
Next: 3. The Drag Protocol
Up: 2. Protocol Basics
Previous: 5. Advertising a Receiver
  Contents
  Index
Danny Backx
2000-12-13