home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 5 / Skunkware 5.iso / include / Xm / DropSMgr.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-06-30  |  4.6 KB  |  160 lines

  1. /* 
  2.  * (c) Copyright 1989, 1990, 1991, 1992, 1993 OPEN SOFTWARE FOUNDATION, INC. 
  3.  * ALL RIGHTS RESERVED 
  4. */ 
  5. /* 
  6.  * Motif Release 1.2.3
  7. */ 
  8. /*   $RCSfile: DropSMgr.h,v $ $Revision: 10.1 $ $Date: 1994/02/03 15:38:12 $ */
  9. /*
  10. *  (c) Copyright 1990, 1991, 1992 HEWLETT-PACKARD COMPANY */
  11. #ifndef _XmDropSMgr_h
  12. #define _XmDropSMgr_h
  13.  
  14. #include <Xm/Xm.h>
  15. #include <Xm/DragC.h>
  16.  
  17. #ifdef __cplusplus
  18. extern "C" {
  19. #endif
  20.  
  21.  
  22. #define XmCR_DROP_SITE_LEAVE_MESSAGE  1
  23. #define XmCR_DROP_SITE_ENTER_MESSAGE  2
  24. #define XmCR_DROP_SITE_MOTION_MESSAGE 3
  25. #define XmCR_DROP_MESSAGE             4
  26.  
  27. #define XmNO_DROP_SITE         1
  28. #define XmINVALID_DROP_SITE    2
  29. #define XmVALID_DROP_SITE    3
  30.  
  31. /* begin fix for CR 5754 */
  32. /* documented values are XmDROP_SITE_VALID and XmDROP_SITE_INVALID.
  33.    However, we can't just throw out the incorrect Xm[IN]VALID_DROP_SITE
  34.    now since people have probably started using them. Instead, we just
  35.    define the correct values using the incorrect ones.
  36. */
  37.  
  38. #define XmDROP_SITE_INVALID XmINVALID_DROP_SITE
  39. #define XmDROP_SITE_VALID XmVALID_DROP_SITE
  40.  
  41. /* end fix for CR 5754 */
  42.  
  43. enum { XmDRAG_UNDER_NONE, XmDRAG_UNDER_PIXMAP,
  44.     XmDRAG_UNDER_SHADOW_IN, XmDRAG_UNDER_SHADOW_OUT,
  45.     XmDRAG_UNDER_HIGHLIGHT };
  46.  
  47. enum { XmDROP_SITE_SIMPLE, XmDROP_SITE_COMPOSITE,
  48.     XmDROP_SITE_SIMPLE_CLIP_ONLY = 128,
  49.     XmDROP_SITE_COMPOSITE_CLIP_ONLY };
  50.  
  51. enum { XmABOVE, XmBELOW };
  52.  
  53. enum { XmDROP_SITE_ACTIVE, XmDROP_SITE_INACTIVE };
  54.  
  55. typedef struct _XmDragProcCallbackStruct {
  56.     int                reason;
  57.     XEvent *        event;
  58.     Time            timeStamp;
  59.     Widget            dragContext;
  60.     Position        x, y;
  61.     unsigned char    dropSiteStatus;
  62.     unsigned char    operation;
  63.     unsigned char    operations;
  64.     Boolean            animate;
  65. } XmDragProcCallbackStruct, * XmDragProcCallback;
  66.  
  67. typedef struct _XmDropProcCallbackStruct {
  68.     int                reason;
  69.     XEvent *        event;
  70.     Time            timeStamp;
  71.     Widget            dragContext;
  72.     Position        x, y;
  73.     unsigned char    dropSiteStatus;
  74.     unsigned char    operation;
  75.     unsigned char    operations;
  76.     unsigned char    dropAction;
  77. } XmDropProcCallbackStruct, * XmDropProcCallback;
  78.  
  79.  
  80. typedef struct _XmDropSiteVisualsRec {
  81.     Pixel    background;
  82.     Pixel    foreground;
  83.     Pixel    topShadowColor;
  84.     Pixmap    topShadowPixmap;
  85.     Pixel    bottomShadowColor;
  86.     Pixmap    bottomShadowPixmap;
  87.     Dimension    shadowThickness;
  88.     Pixel    highlightColor;
  89.     Pixmap    highlightPixmap;
  90.     Dimension    highlightThickness;
  91.     Dimension    borderWidth;
  92. } XmDropSiteVisualsRec, * XmDropSiteVisuals;
  93.  
  94.  
  95. /* DropSite Widget */
  96.  
  97. externalref WidgetClass xmDropSiteManagerObjectClass;
  98.  
  99. typedef struct _XmDropSiteManagerClassRec *XmDropSiteManagerObjectClass;
  100. typedef struct _XmDropSiteManagerRec *XmDropSiteManagerObject;
  101.  
  102. #ifndef XmIsDropSiteManager
  103. #define XmIsDropSiteManager(w)  XtIsSubClass((w), xmDropSiteManagerObjectClass)
  104. #endif /* XmIsDropSite */
  105.  
  106. /********    Public Function Declarations    ********/
  107. #ifdef _NO_PROTO
  108.  
  109. extern void XmDropSiteRegister() ;
  110. extern void XmDropSiteUnregister() ;
  111. extern void XmDropSiteStartUpdate() ;
  112. extern void XmDropSiteUpdate() ;
  113. extern void XmDropSiteEndUpdate() ;
  114. extern void XmDropSiteRetrieve() ;
  115. extern int XmDropSiteQueryStackingOrder() ;
  116. extern void XmDropSiteConfigureStackingOrder() ;
  117. extern XmDropSiteVisuals XmDropSiteGetActiveVisuals() ;
  118.  
  119. #else
  120.  
  121. extern void XmDropSiteRegister( 
  122.                         Widget widget,
  123.                         ArgList args,
  124.                         Cardinal argCount) ;
  125. extern void XmDropSiteUnregister( 
  126.                         Widget widget) ;
  127. extern void XmDropSiteStartUpdate( 
  128.                         Widget refWidget) ;
  129. extern void XmDropSiteUpdate( 
  130.                         Widget enclosingWidget,
  131.                         ArgList args,
  132.                         Cardinal argCount) ;
  133. extern void XmDropSiteEndUpdate( 
  134.                         Widget refWidget) ;
  135. extern void XmDropSiteRetrieve( 
  136.                         Widget enclosingWidget,
  137.                         ArgList args,
  138.                         Cardinal argCount) ;
  139. extern int XmDropSiteQueryStackingOrder( 
  140.                         Widget widget,
  141.                         Widget *parent_rtn,
  142.                         Widget **children_rtn,
  143.                         Cardinal *num_children_rtn) ;
  144. extern void XmDropSiteConfigureStackingOrder( 
  145.                         Widget widget,
  146.                         Widget sibling,
  147.                         Cardinal stack_mode) ;
  148. extern XmDropSiteVisuals XmDropSiteGetActiveVisuals( 
  149.                         Widget widget) ;
  150.  
  151. #endif /* _NO_PROTO */
  152. /********    End Public Function Declarations    ********/
  153.  
  154. #ifdef __cplusplus
  155. }  /* Close scope of 'extern "C"' declaration which encloses file. */
  156. #endif
  157.  
  158. #endif /* _XmDropSMgr_h */
  159. /* DON'T ADD ANYTHING AFTER THIS #endif */
  160.