PRE_REGISTER
------------

Motif D&D supports two modes of operations. Dynamic, which is the one
standardized with CDE2, and pre_register, which we decided not to
document for various reasons, even though it is the default mode.

This document is just a dump of what I know about this pre-register
mode, it's not really accurate or complete.

In pre-register, the source grabs the server when the drag starts, and
whenever it enters a new top-level, it reads all the drop site
information it needs for doing its tracking, visual feedback, etc,
from a pre-registered database attached to the
_MOTIF_DRAG_RECEIVER_INFO of each participating client top-level.

Obviously, no _MOTIF_DRAG_AND_DROP_MESSAGE XClientMessages are sent,
since no one is listening to them (i.e. the X server is grabbed).

The server gets ungrabbed when the user drops the object, at which
point the documented drop protocol comes in effect (together with the
convention for transfer_success or failure).

The same _MOTIF_DRAG_INITIATOR_INFO is used, and the
_MOTIF_DRAG_RECEIVER_INFO semantics are extended as follow:

BYTE    byte order of data in property
BYTE    protocol version of receiver
BYTE    protocol style == Dynamic, DropOnly, None, PreRegister
BYTE    pad
CARD32  proxy_window
CARD16  num_drop_sites
CARD16  pad
CARD32  total_size

following these 16 bytes header, comes 'num_drop_sites' drop site blocks.

Each block starts with a 8 bytes DSHeader, is followed by a visual
info block and a series of boxes giving geometry information.

DSHeader:

 * the flags field contains the following:
 *
 *      0003    traversalType (t_close - last in what?)
 *      000C    dropActivity  (active, inactive, ignore)
 *      00F0    dropType      (simple, composite, clip_only?,
 *			       |with leaf?, internal?, has_region?)
 *      0F00    operations    (same meaning as in Dynamic)
 *      F000    animationStyle (none, pixmap, shadow_in, shadow_out, highlight)

    CARD16      flags 
    CARD16      import_targets_id (same meaning as in Dynamic)
    CARD32      n_boxes


Depending on animationStyle in the flags, visual information about the
drop site follows:

animationStyle = none
    CARD16      borderWidth 
    CARD16      pad1 
    CARD32      pad2 

animationStyle = highlight
    CARD16      borderWidth 
    CARD16      highlightThickness 
    CARD32      background 
    CARD32      highlightColor 
    CARD32      highlightPixmap 

animationStyle = shadow_in and out
    CARD16      borderWidth 
    CARD16      highlightThickness 
    CARD16      shadowThickness 
    CARD16      pad1 
    CARD32      foreground 
    CARD32      topShadowColor 
    CARD32      bottomShadowColor 
    CARD32      topShadowPixmap 
    CARD32      bottomShadowPixmap 
    CARD32      pad2 

animationStyle = pixmap
    CARD16      borderWidth 
    CARD16      highlightThickness 
    CARD16      shadowThickness 
    CARD16      animationPixmapDepth    
    CARD32      foreground 
    CARD32      background 
    CARD32      animationPixmap 
    CARD32      animationMask 


and then a serie a N box, as indicated in the DSHeader (has_region?).

each Box
    INT16       x1
    INT16       x2
    INT16       y1
    INT16       y2


Encoding
--------

TDB: PreRegister, DSHeader flags. 


------ from programmers' reference

     XmNdropSiteActivity
               Indicates whether a drop site is active  or  inac-
               tive.     The   values   are   XmDROP_SITE_ACTIVE,
               XmDROP_SITE_INACTIVE, and XmDROP_SITE_IGNORE.   An
               active  drop  site  can receive a drop, whereas an
               inactive drop site is dormant.  An  inactive  drop
               site is treated as if it was not a registered drop
               site and any drag-under  visuals  associated  with
               entering  or  leaving  the drop site do not occur.
               However, it is still used for clipping  drag-under
               effects.   A value of XmDROP_SITE_IGNORE indicates
               that a drop site should be ignored  for  all  pur-
               poses.

     XmNanimationStyle
               Specifies the drag-under animation style used when
               a  drag  enters  a  valid drop site.  The possible
               values are

               XmDRAG_UNDER_HIGHLIGHT
                         The drop site uses highlighting effects.

               XmDRAG_UNDER_SHADOW_OUT
                         The drop site uses an outset shadow.

               XmDRAG_UNDER_SHADOW_IN
                         The drop site uses an inset shadow.

               XmDRAG_UNDER_PIXMAP
                         The drop site uses the pixmap  specified
                         by  XmNanimationPixmap  to indicate that
                         it can receive the drop.

               XmDRAG_UNDER_NONE
                         The drop site  does  not  use  animation
                         effects.   A client using a dynamic pro-
                         tocol, may provide drag-under effects in
                         its XmNdragProc routine.

     XmNdropSiteType
               Specifies the type of the drop site. The  possible
               values are

               XmDROP_SITE_SIMPLE
                         The widget does not have any  additional
                         children  that  are  registered  as drop
                         sites.

               XmDROP_SITE_COMPOSITE
                         The widget will have children  that  are
                         registered as drop sites.

