Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:15:24

0001 /* 
0002  * Motif
0003  *
0004  * Copyright (c) 1987-2012, The Open Group. All rights reserved.
0005  *
0006  * These libraries and programs are free software; you can
0007  * redistribute them and/or modify them under the terms of the GNU
0008  * Lesser General Public License as published by the Free Software
0009  * Foundation; either version 2 of the License, or (at your option)
0010  * any later version.
0011  *
0012  * These libraries and programs are distributed in the hope that
0013  * they will be useful, but WITHOUT ANY WARRANTY; without even the
0014  * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
0015  * PURPOSE. See the GNU Lesser General Public License for more
0016  * details.
0017  *
0018  * You should have received a copy of the GNU Lesser General Public
0019  * License along with these librararies and programs; if not, write
0020  * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
0021  * Floor, Boston, MA 02110-1301 USA
0022 */ 
0023 #ifndef _XmDragCP_h
0024 #define _XmDragCP_h
0025 
0026 #include <Xm/XmP.h>
0027 #include <Xm/DragC.h>
0028 
0029 #include <X11/Shell.h>
0030 #include <X11/ShellP.h>
0031 
0032 #include <Xm/DragIcon.h>
0033 #include <Xm/DragOverS.h>
0034 #include <Xm/DropSMgrP.h>
0035 
0036 #ifdef __cplusplus
0037 extern "C" {
0038 #endif
0039 
0040 
0041 /***********************************************************************
0042  *
0043  * DragContext (RootWrapper) Widget Private Data
0044  *
0045  ***********************************************************************/
0046 
0047 typedef void    (*XmDragStartProc)( XmDragContext, Widget, XEvent *);
0048 typedef void    (*XmDragCancelProc)( XmDragContext) ;
0049 
0050 
0051 typedef struct {
0052     XmDragStartProc     start;
0053     XmDragCancelProc        cancel;
0054     XtPointer               extension;
0055 } XmDragContextClassPart;
0056 
0057 typedef struct _XmDragContextClassRec {
0058     CoreClassPart           core_class;
0059     XmDragContextClassPart  drag_class;
0060 } XmDragContextClassRec;
0061 
0062 externalref XmDragContextClassRec xmDragContextClassRec;
0063 
0064 #define XtDragByPoll    0
0065 #define XtDragByEvent   1
0066 
0067 typedef struct {
0068     Window      frame;
0069     Window      window;
0070     Widget      shell;
0071     unsigned char   flags;
0072     unsigned char   dragProtocolStyle;
0073     int         xOrigin, yOrigin;
0074     unsigned int    width, height;
0075     unsigned int    depth;
0076     XtPointer       iccInfo;
0077 } XmDragReceiverInfoStruct, *XmDragReceiverInfo;
0078 
0079 
0080 typedef union _XmConvertSelectionRec
0081   {
0082     XtConvertSelectionIncrProc sel_incr ;
0083     XtConvertSelectionProc     sel ;
0084   } XmConvertSelectionRec ;
0085   
0086 
0087 typedef struct _XmDragContextPart{
0088     /****  resources ****/
0089 
0090     Atom            *exportTargets;
0091     Cardinal            numExportTargets;
0092     XmConvertSelectionRec   convertProc;
0093     XtPointer           clientData;
0094     XmDragIconObject        sourceCursorIcon;
0095     XmDragIconObject        stateCursorIcon;
0096     XmDragIconObject        operationCursorIcon;
0097     XmDragIconObject        sourcePixmapIcon;
0098     Pixel           cursorBackground;
0099     Pixel           cursorForeground;
0100     Pixel           validCursorForeground;
0101     Pixel           invalidCursorForeground;
0102     Pixel           noneCursorForeground;
0103     XtCallbackList      dragMotionCallback;
0104     XtCallbackList      operationChangedCallback;
0105     XtCallbackList      siteEnterCallback;
0106     XtCallbackList      siteLeaveCallback;
0107     XtCallbackList      topLevelEnterCallback;
0108     XtCallbackList      topLevelLeaveCallback;
0109     XtCallbackList      dropStartCallback;
0110     XtCallbackList      dropFinishCallback;
0111     XtCallbackList      dragDropFinishCallback;
0112     unsigned char       dragOperations;
0113     Boolean         incremental;
0114     unsigned char       blendModel;
0115 
0116     /* private resources */
0117     Window          srcWindow;
0118     Time            dragStartTime;
0119     Atom            iccHandle;
0120     Widget          sourceWidget;
0121     Boolean         sourceIsExternal;
0122 
0123     /**** instance data ****/
0124     Boolean         topWindowsFetched;
0125     unsigned char       commType;
0126     unsigned char       animationType;
0127 
0128     unsigned char       operation;
0129     unsigned char       operations;
0130     unsigned int        lastEventState;
0131     unsigned char       dragCompletionStatus;
0132     unsigned char       dragDropCompletionStatus;
0133     Boolean         forceIPC;
0134     Boolean         serverGrabbed;
0135     Boolean         useLocal;
0136     Boolean         inDropSite;
0137     XtIntervalId        dragTimerId;
0138     
0139     Time            roundOffTime;
0140     Time            lastChangeTime;
0141     Time            crossingTime;
0142 
0143     Time            dragFinishTime;
0144     Time            dropFinishTime;
0145     
0146     Atom            dropSelection;
0147     Widget          srcShell;
0148     Position        startX, startY;
0149 
0150     XmID            siteID;
0151 
0152     Screen          *currScreen;
0153     Window          currWmRoot;
0154     XmDragOverShellWidget   curDragOver;
0155     XmDragOverShellWidget   origDragOver;
0156 
0157     XmDragReceiverInfoStruct    *currReceiverInfo;
0158     XmDragReceiverInfoStruct    *rootReceiverInfo;
0159     XmDragReceiverInfoStruct    *receiverInfos;
0160     Cardinal            numReceiverInfos;
0161     Cardinal            maxReceiverInfos;
0162 
0163     unsigned char       trackingMode;
0164     unsigned char       activeProtocolStyle;
0165     unsigned char               activeBlendModel;
0166     Boolean         dragDropCancelEffect;
0167     long            SaveEventMask;      /* Save the current root eventMask so that D&D works for MWM */
0168 } XmDragContextPart;
0169 
0170 
0171 typedef  struct _XmDragContextRec{
0172     CorePart            core;
0173     XmDragContextPart       drag;
0174 } XmDragContextRec;
0175 
0176 
0177 #ifdef __cplusplus
0178 }  /* Close scope of 'extern "C"' declaration which encloses file. */
0179 #endif
0180 
0181 #endif /* _XmDragCP_h */