1: /** 2: * 3: * $Id: DropSMgr.h,v 1.7 2001/08/27 09:29:59 amai Exp $ 4: * 5: * Copyright (C) 1995 Free Software Foundation, Inc. 6: * Copyright (C) 1995-2000 LessTif Development Team 7: * 8: * This file is part of the GNU LessTif Library. 9: * 10: * This library is free software; you can redistribute it and/or 11: * modify it under the terms of the GNU Library General Public 12: * License as published by the Free Software Foundation; either 13: * version 2 of the License, or (at your option) any later version. 14: * 15: * This library is distributed in the hope that it will be useful, 16: * but WITHOUT ANY WARRANTY; without even the implied warranty of 17: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 18: * Library General Public License for more details. 19: * 20: * You should have received a copy of the GNU Library General Public 21: * License along with this library; if not, write to the Free 22: * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 23: * 24: **/ 25: 26: #ifndef _XM_DROPSMGR_H 27: #define _XM_DROPSMGR_H 28: 29: #include <Xm/Xm.h> /* to get the version number */ 30: 31: #ifdef __cplusplus 32: extern "C" { 33: #endif 34: 35: enum { 36: XmCR_DROP_SITE_LEAVE_MESSAGE=1, 37: XmCR_DROP_SITE_ENTER_MESSAGE, 38: XmCR_DROP_SITE_MOTION_MESSAGE, 39: XmCR_DROP_MESSAGE 40: }; 41: 42: enum { 43: XmNO_DROP_SITE=1, 44: XmINVALID_DROP_SITE, 45: XmVALID_DROP_SITE 46: }; 47: 48: /* 49: * as per the Motif 1.2.3 headers, the above enumerated constants are 50: * incorrect. The correct constants, listed below, are defined in terms 51: * of the incorrect ones above. 52: */ 53: 54: #define XmDROP_SITE_INVALID XmINVALID_DROP_SITE 55: #define XmDROP_SITE_VALID XmVALID_DROP_SITE 56: 57: enum { 58: XmDRAG_UNDER_NONE, 59: XmDRAG_UNDER_PIXMAP, 60: XmDRAG_UNDER_SHADOW_IN, 61: XmDRAG_UNDER_SHADOW_OUT, 62: XmDRAG_UNDER_HIGHLIGHT 63: }; 64: 65: enum { 66: XmDROP_SITE_SIMPLE, 67: XmDROP_SITE_COMPOSITE, 68: XmDROP_SITE_SIMPLE_CLIP_ONLY = 128, 69: XmDROP_SITE_COMPOSITE_CLIP_ONLY 70: }; 71: 72: enum { 73: XmABOVE, 74: XmBELOW 75: }; 76: 77: 78: #if XmVERSION > 1 79: enum { 80: XmDROP_SITE_ACTIVE, 81: XmDROP_SITE_INACTIVE, 82: XmDROP_SITE_IGNORE 83: }; 84: #else 85: enum { 86: XmDROP_SITE_ACTIVE, 87: XmDROP_SITE_INACTIVE 88: }; 89: #endif 90: 91: typedef struct _XmDragProcCallbackStruct { 92: int reason; 93: XEvent *event; 94: Time timeStamp; 95: Widget dragContext; 96: Position x, y; 97: unsigned char dropSiteStatus; 98: unsigned char operation; 99: unsigned char operations; 100: Boolean animate; 101: } XmDragProcCallbackStruct, *XmDragProcCallback; 102: 103: typedef struct _XmDropProcCallbackStruct { 104: int reason; 105: XEvent *event; 106: Time timeStamp; 107: Widget dragContext; 108: Position x, y; 109: unsigned char dropSiteStatus; 110: unsigned char operation; 111: unsigned char operations; 112: unsigned char dropAction; 113: } XmDropProcCallbackStruct, *XmDropProcCallback; 114: 115: typedef struct _XmDropSiteVisualsRec { 116: Pixel background; 117: Pixel foreground; 118: Pixel topShadowColor; 119: Pixmap topShadowPixmap; 120: Pixel bottomShadowColor; 121: Pixmap bottomShadowPixmap; 122: Dimension shadowThickness; 123: Pixel highlightColor; 124: Pixmap highlightPixmap; 125: Dimension highlightThickness; 126: Dimension borderWidth; 127: } XmDropSiteVisualsRec, *XmDropSiteVisuals; 128: 129: 130: extern WidgetClass xmDropSiteManagerObjectClass; 131: 132: typedef struct _XmDropSiteManagerClassRec *XmDropSiteManagerObjectClass; 133: typedef struct _XmDropSiteManagerRec *XmDropSiteManagerObject; 134: 135: #ifndef XmIsDropSiteManager 136: #define XmIsDropSiteManager(w) XtIsSubclass((w), xmDropSiteManagerObjectClass) 137: #endif 138: 139: extern void XmDropSiteRegister(Widget widget, 140: ArgList args, 141: Cardinal argCount); 142: extern void XmDropSiteUnregister(Widget widget); 143: extern void XmDropSiteStartUpdate(Widget refWidget); 144: extern void XmDropSiteUpdate(Widget enclosingWidget, 145: ArgList args, 146: Cardinal argCount); 147: extern void XmDropSiteEndUpdate(Widget refWidget); 148: extern void XmDropSiteRetrieve(Widget enclosingWidget, 149: ArgList args, 150: Cardinal argCount); 151: extern int XmDropSiteQueryStackingOrder(Widget widget, 152: Widget *parent_rtn, 153: Widget **children_rtn, 154: Cardinal *num_children_rtn); 155: extern void XmDropSiteConfigureStackingOrder(Widget widget, 156: Widget sibling, 157: Cardinal stack_mode); 158: extern XmDropSiteVisuals XmDropSiteGetActiveVisuals(Widget widget); 159: 160: #if XmVERSION > 1 161: extern Boolean XmDropSiteRegistered(Widget w); 162: #endif 163: 164: #ifdef __cplusplus 165: } 166: #endif 167: 168: #endif /* _XM_DROPSMGR_H */ 169: