File indexing completed on 2025-01-18 10:15:24
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024 #ifndef _XmDragController_h
0025 #define _XmDragController_h
0026
0027 #include <Xm/Xm.h>
0028 #include <Xm/Display.h>
0029
0030 #ifdef __cplusplus
0031 extern "C" {
0032 #endif
0033
0034
0035
0036
0037 #define XmHELP 2
0038
0039
0040
0041
0042 typedef unsigned int XmID;
0043
0044
0045
0046
0047
0048
0049
0050 #ifndef XmIsDragContext
0051 #define XmIsDragContext(w) XtIsSubclass(w,xmDragContextClass)
0052 #endif
0053
0054 #ifndef _XA_MOTIF_DROP
0055 #define _XA_MOTIF_DROP "_MOTIF_DROP"
0056 #define _XA_DRAG_FAILURE "_MOTIF_DRAG_FAILURE"
0057 #define _XA_DRAG_SUCCESS "_MOTIF_DRAG_SUCCESS"
0058 #endif
0059
0060
0061
0062
0063 enum{ XmTOP_LEVEL_ENTER, XmTOP_LEVEL_LEAVE,
0064 XmDRAG_MOTION, XmDROP_SITE_ENTER,
0065 XmDROP_SITE_LEAVE, XmDROP_START,
0066 XmDROP_FINISH, XmDRAG_DROP_FINISH,
0067 XmOPERATION_CHANGED
0068 } ;
0069
0070
0071 enum{ XmDROP, XmDROP_HELP,
0072 XmDROP_CANCEL, XmDROP_INTERRUPT
0073 } ;
0074
0075
0076 #define XmDROP_NOOP 0L
0077 #define XmDROP_MOVE (1L << 0)
0078 #define XmDROP_COPY (1L << 1)
0079 #define XmDROP_LINK (1L << 2)
0080
0081 enum{ XmMOVE = XmDROP_MOVE, XmCOPY = XmDROP_COPY,
0082 XmLINK = XmDROP_LINK, XmOTHER
0083 } ;
0084
0085 enum{ XmBLEND_ALL, XmBLEND_STATE_SOURCE,
0086 XmBLEND_JUST_SOURCE, XmBLEND_NONE
0087 } ;
0088
0089 enum{ XmDROP_FAILURE, XmDROP_SUCCESS
0090 } ;
0091
0092
0093
0094
0095 enum{ XmCR_TOP_LEVEL_ENTER, XmCR_TOP_LEVEL_LEAVE,
0096 XmCR_DRAG_MOTION, XmCR_DROP_SITE_ENTER,
0097 XmCR_DROP_SITE_LEAVE, XmCR_DROP_START,
0098 XmCR_DROP_FINISH, XmCR_DRAG_DROP_FINISH,
0099 XmCR_OPERATION_CHANGED,
0100
0101 _XmNUMBER_DND_CB_REASONS
0102 } ;
0103
0104
0105
0106 typedef struct _XmDragContextClassRec *XmDragContextClass;
0107 typedef struct _XmDragContextRec *XmDragContext;
0108 externalref WidgetClass xmDragContextClass;
0109
0110 typedef struct _XmAnyICCCallbackStruct{
0111 int reason;
0112 XEvent *event;
0113 Time timeStamp;
0114 }XmAnyICCCallbackStruct, *XmAnyICCCallback;
0115
0116 typedef struct _XmTopLevelEnterCallbackStruct{
0117 int reason;
0118 XEvent *event;
0119 Time timeStamp;
0120 Screen *screen;
0121
0122
0123
0124
0125 Window window;
0126 Position x, y;
0127 unsigned char dragProtocolStyle;
0128 Atom iccHandle;
0129 }XmTopLevelEnterCallbackStruct, *XmTopLevelEnterCallback;
0130
0131 typedef struct _XmTopLevelLeaveCallbackStruct{
0132 int reason;
0133 XEvent *event;
0134 Time timeStamp;
0135 Screen *screen;
0136 Window window;
0137 }XmTopLevelLeaveCallbackStruct, *XmTopLevelLeaveCallback;
0138
0139
0140
0141
0142
0143
0144 typedef struct _XmDropSiteEnterCallbackStruct{
0145 int reason;
0146 XEvent *event;
0147 Time timeStamp;
0148 unsigned char operation;
0149 unsigned char operations;
0150 unsigned char dropSiteStatus;
0151 Position x, y;
0152 }XmDropSiteEnterCallbackStruct, *XmDropSiteEnterCallback;
0153
0154
0155
0156
0157
0158
0159 typedef struct _XmDropSiteLeaveCallbackStruct{
0160 int reason;
0161 XEvent *event;
0162 Time timeStamp;
0163 }XmDropSiteLeaveCallbackStruct, *XmDropSiteLeaveCallback;
0164
0165 typedef struct _XmDragMotionCallbackStruct{
0166 int reason;
0167 XEvent *event;
0168 Time timeStamp;
0169 unsigned char operation;
0170 unsigned char operations;
0171 unsigned char dropSiteStatus;
0172 Position x, y;
0173 }XmDragMotionCallbackStruct, *XmDragMotionCallback;
0174
0175 typedef struct _XmOperationChangedCallbackStruct{
0176 int reason;
0177 XEvent *event;
0178 Time timeStamp;
0179 unsigned char operation;
0180 unsigned char operations;
0181 unsigned char dropSiteStatus;
0182 }XmOperationChangedCallbackStruct, *XmOperationChangedCallback;
0183
0184 typedef struct _XmDropStartCallbackStruct{
0185 int reason;
0186 XEvent *event;
0187 Time timeStamp;
0188 unsigned char operation;
0189 unsigned char operations;
0190 unsigned char dropSiteStatus;
0191 unsigned char dropAction;
0192 Position x, y;
0193 Window window;
0194 Atom iccHandle;
0195 }XmDropStartCallbackStruct, *XmDropStartCallback;
0196
0197 typedef struct _XmDropFinishCallbackStruct{
0198 int reason;
0199 XEvent *event;
0200 Time timeStamp;
0201 unsigned char operation;
0202 unsigned char operations;
0203 unsigned char dropSiteStatus;
0204 unsigned char dropAction;
0205 unsigned char completionStatus;
0206 }XmDropFinishCallbackStruct, *XmDropFinishCallback;
0207
0208 typedef struct _XmDragDropFinishCallbackStruct{
0209 int reason;
0210 XEvent *event;
0211 Time timeStamp;
0212 }XmDragDropFinishCallbackStruct, *XmDragDropFinishCallback;
0213
0214
0215
0216
0217 extern Widget XmDragStart(
0218 Widget w,
0219 XEvent *event,
0220 ArgList args,
0221 Cardinal numArgs) ;
0222 extern void XmDragCancel(
0223 Widget dragContext) ;
0224 extern Boolean XmTargetsAreCompatible(
0225 Display *dpy,
0226 Atom *exportTargets,
0227 Cardinal numExportTargets,
0228 Atom *importTargets,
0229 Cardinal numImportTargets) ;
0230
0231
0232
0233
0234 #ifdef __cplusplus
0235 }
0236 #endif
0237
0238 #endif
0239