Warning, file /include/root/GuiTypes.h was not indexed
or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011 #ifndef ROOT_GuiTypes
0012 #define ROOT_GuiTypes
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022 #include "Rtypes.h"
0023 #include <climits>
0024
0025
0026 typedef ULongptr_t Handle_t;
0027 typedef Handle_t Display_t;
0028 typedef Handle_t Visual_t;
0029 typedef Handle_t Window_t;
0030 typedef Handle_t WinContext_t;
0031 typedef Handle_t Pixmap_t;
0032 typedef Handle_t Drawable_t;
0033 typedef Handle_t Region_t;
0034 typedef Handle_t Colormap_t;
0035 typedef Handle_t Cursor_t;
0036 typedef Handle_t FontH_t;
0037 typedef Handle_t KeySym_t;
0038 typedef Handle_t Atom_t;
0039 typedef Handle_t GContext_t;
0040 typedef Handle_t FontStruct_t;
0041 typedef ULong_t Pixel_t;
0042 typedef UInt_t Mask_t;
0043 typedef ULong_t Time_t;
0044
0045 enum EGuiConstants {
0046 kNotUseful = 0, kWhenMapped = 1, kAlways = 2,
0047 kIsUnmapped = 0, kIsUnviewable = 1, kIsViewable = 2,
0048 kInputOutput = 1, kInputOnly = 2,
0049 kLineSolid = 0, kLineOnOffDash = 1, kLineDoubleDash = 2,
0050 kCapNotLast = 0, kCapButt = 1, kCapRound = 2, kCapProjecting = 3,
0051 kJoinMiter = 0, kJoinRound = 1, kJoinBevel = 2,
0052 kFillSolid = 0, kFillTiled = 1, kFillStippled = 2, kFillOpaqueStippled = 3,
0053 kEvenOddRule = 0, kWindingRule = 1,
0054 kClipByChildren = 0, kIncludeInferiors = 1,
0055 kArcChord = 0, kArcPieSlice = 1
0056 };
0057
0058
0059
0060 enum EGEventType {
0061 kGKeyPress, kKeyRelease, kButtonPress, kButtonRelease,
0062 kMotionNotify, kEnterNotify, kLeaveNotify, kFocusIn, kFocusOut,
0063 kExpose, kConfigureNotify, kMapNotify, kUnmapNotify, kDestroyNotify,
0064 kClientMessage, kSelectionClear, kSelectionRequest, kSelectionNotify,
0065 kColormapNotify, kButtonDoubleClick, kOtherEvent
0066 };
0067
0068 enum EGraphicsFunction {
0069 kGXclear = 0,
0070 kGXand,
0071 kGXandReverse,
0072 kGXcopy,
0073 kGXandInverted,
0074 kGXnoop,
0075 kGXxor,
0076 kGXor,
0077 kGXnor,
0078 kGXequiv,
0079 kGXinvert,
0080 kGXorReverse,
0081 kGXcopyInverted,
0082 kGXorInverted,
0083 kGXnand,
0084 kGXset
0085 };
0086
0087 enum { kDefaultScrollBarWidth = 16 };
0088
0089 const Handle_t kNone = 0;
0090 const Handle_t kCopyFromParent = 0;
0091 const Handle_t kParentRelative = 1;
0092
0093
0094 struct SetWindowAttributes_t {
0095 Pixmap_t fBackgroundPixmap;
0096 ULong_t fBackgroundPixel;
0097 Pixmap_t fBorderPixmap;
0098 ULong_t fBorderPixel;
0099 UInt_t fBorderWidth;
0100 Int_t fBitGravity;
0101 Int_t fWinGravity;
0102 Int_t fBackingStore;
0103 ULong_t fBackingPlanes;
0104 ULong_t fBackingPixel;
0105 Bool_t fSaveUnder;
0106 Long_t fEventMask;
0107 Long_t fDoNotPropagateMask;
0108 Bool_t fOverrideRedirect;
0109 Colormap_t fColormap;
0110 Cursor_t fCursor;
0111 Mask_t fMask;
0112 };
0113
0114
0115 struct WindowAttributes_t {
0116 Int_t fX, fY;
0117 Int_t fWidth, fHeight;
0118 Int_t fBorderWidth;
0119 Int_t fDepth;
0120 void *fVisual;
0121 Window_t fRoot;
0122 Int_t fClass;
0123 Int_t fBitGravity;
0124 Int_t fWinGravity;
0125 Int_t fBackingStore;
0126 ULong_t fBackingPlanes;
0127 ULong_t fBackingPixel;
0128 Bool_t fSaveUnder;
0129 Colormap_t fColormap;
0130 Bool_t fMapInstalled;
0131 Int_t fMapState;
0132 Long_t fAllEventMasks;
0133 Long_t fYourEventMask;
0134 Long_t fDoNotPropagateMask;
0135 Bool_t fOverrideRedirect;
0136 void *fScreen;
0137 };
0138
0139
0140 const Mask_t kWABackPixmap = BIT(0);
0141 const Mask_t kWABackPixel = BIT(1);
0142 const Mask_t kWABorderPixmap = BIT(2);
0143 const Mask_t kWABorderPixel = BIT(3);
0144 const Mask_t kWABorderWidth = BIT(4);
0145 const Mask_t kWABitGravity = BIT(5);
0146 const Mask_t kWAWinGravity = BIT(6);
0147 const Mask_t kWABackingStore = BIT(7);
0148 const Mask_t kWABackingPlanes = BIT(8);
0149 const Mask_t kWABackingPixel = BIT(9);
0150 const Mask_t kWAOverrideRedirect = BIT(10);
0151 const Mask_t kWASaveUnder = BIT(11);
0152 const Mask_t kWAEventMask = BIT(12);
0153 const Mask_t kWADontPropagate = BIT(13);
0154 const Mask_t kWAColormap = BIT(14);
0155 const Mask_t kWACursor = BIT(15);
0156
0157
0158
0159 const Mask_t kNoEventMask = 0;
0160 const Mask_t kKeyPressMask = BIT(0);
0161 const Mask_t kKeyReleaseMask = BIT(1);
0162 const Mask_t kButtonPressMask = BIT(2);
0163 const Mask_t kButtonReleaseMask = BIT(3);
0164 const Mask_t kPointerMotionMask = BIT(4);
0165 const Mask_t kButtonMotionMask = BIT(5);
0166 const Mask_t kExposureMask = BIT(6);
0167 const Mask_t kStructureNotifyMask = BIT(7);
0168 const Mask_t kEnterWindowMask = BIT(8);
0169 const Mask_t kLeaveWindowMask = BIT(9);
0170 const Mask_t kFocusChangeMask = BIT(10);
0171 const Mask_t kOwnerGrabButtonMask = BIT(11);
0172 const Mask_t kColormapChangeMask = BIT(12);
0173
0174
0175 struct Event_t {
0176 EGEventType fType;
0177 Window_t fWindow;
0178 Time_t fTime;
0179 Int_t fX, fY;
0180 Int_t fXRoot, fYRoot;
0181 UInt_t fCode;
0182 UInt_t fState;
0183 UInt_t fWidth, fHeight;
0184 Int_t fCount;
0185 Bool_t fSendEvent;
0186 Handle_t fHandle;
0187 Int_t fFormat;
0188 Longptr_t fUser[5];
0189
0190
0191
0192 };
0193
0194
0195
0196 const Mask_t kKeyShiftMask = BIT(0);
0197 const Mask_t kKeyLockMask = BIT(1);
0198 const Mask_t kKeyControlMask = BIT(2);
0199 const Mask_t kKeyMod1Mask = BIT(3);
0200 const Mask_t kKeyMod2Mask = BIT(4);
0201 const Mask_t kKeyMod3Mask = BIT(5);
0202 const Mask_t kKeyMod4Mask = BIT(6);
0203 const Mask_t kKeyMod5Mask = BIT(7);
0204 const Mask_t kButton1Mask = BIT(8);
0205 const Mask_t kButton2Mask = BIT(9);
0206 const Mask_t kButton3Mask = BIT(10);
0207 const Mask_t kButton4Mask = BIT(11);
0208 const Mask_t kButton5Mask = BIT(12);
0209 const Mask_t kButton6Mask = BIT(13);
0210 const Mask_t kButton7Mask = BIT(14);
0211 const Mask_t kAnyModifier = BIT(15);
0212
0213
0214
0215 enum EMouseButton { kAnyButton, kButton1, kButton2, kButton3,
0216 kButton4, kButton5, kButton6, kButton7 };
0217
0218
0219
0220 enum EXMagic { kNotifyNormal = 0, kNotifyGrab = 1, kNotifyUngrab = 2,
0221 kNotifyPointer = 5, kColormapUninstalled = 0,
0222 kColormapInstalled = 1 };
0223
0224
0225 struct GCValues_t {
0226 EGraphicsFunction fFunction;
0227 ULong_t fPlaneMask;
0228 ULong_t fForeground;
0229 ULong_t fBackground;
0230 Int_t fLineWidth;
0231 Int_t fLineStyle;
0232 Int_t fCapStyle;
0233
0234 Int_t fJoinStyle;
0235 Int_t fFillStyle;
0236
0237 Int_t fFillRule;
0238 Int_t fArcMode;
0239 Pixmap_t fTile;
0240 Pixmap_t fStipple;
0241 Int_t fTsXOrigin;
0242 Int_t fTsYOrigin;
0243 FontH_t fFont;
0244 Int_t fSubwindowMode;
0245 Bool_t fGraphicsExposures;
0246 Int_t fClipXOrigin;
0247 Int_t fClipYOrigin;
0248 Pixmap_t fClipMask;
0249 Int_t fDashOffset;
0250 Char_t fDashes[8];
0251 Int_t fDashLen;
0252 Mask_t fMask;
0253
0254 GCValues_t() :
0255 fFunction (kGXcopy),
0256 fPlaneMask (0),
0257 fForeground (0),
0258 fBackground (1),
0259 fLineWidth (0),
0260 fLineStyle (kLineSolid),
0261 fCapStyle (kCapButt),
0262 fJoinStyle (kJoinMiter),
0263 fFillStyle (kFillSolid),
0264 fFillRule (kEvenOddRule),
0265 fArcMode (kArcPieSlice),
0266 fTile (0),
0267 fStipple (0),
0268 fTsXOrigin (0),
0269 fTsYOrigin (0),
0270 fFont (0),
0271 fSubwindowMode (kClipByChildren),
0272 fGraphicsExposures (kTRUE),
0273 fClipXOrigin (0),
0274 fClipYOrigin (0),
0275 fClipMask (0),
0276 fDashOffset (0),
0277 fDashLen (2),
0278 fMask (0)
0279 {
0280 for (int i = 2; i < 8; i++) fDashes[i] = 0;
0281 fDashes[0] = 5;
0282 fDashes[1] = 5;
0283 }
0284 };
0285
0286
0287 const Mask_t kGCFunction = BIT(0);
0288 const Mask_t kGCPlaneMask = BIT(1);
0289 const Mask_t kGCForeground = BIT(2);
0290 const Mask_t kGCBackground = BIT(3);
0291 const Mask_t kGCLineWidth = BIT(4);
0292 const Mask_t kGCLineStyle = BIT(5);
0293 const Mask_t kGCCapStyle = BIT(6);
0294 const Mask_t kGCJoinStyle = BIT(7);
0295 const Mask_t kGCFillStyle = BIT(8);
0296 const Mask_t kGCFillRule = BIT(9);
0297 const Mask_t kGCTile = BIT(10);
0298 const Mask_t kGCStipple = BIT(11);
0299 const Mask_t kGCTileStipXOrigin = BIT(12);
0300 const Mask_t kGCTileStipYOrigin = BIT(13);
0301 const Mask_t kGCFont = BIT(14);
0302 const Mask_t kGCSubwindowMode = BIT(15);
0303 const Mask_t kGCGraphicsExposures = BIT(16);
0304 const Mask_t kGCClipXOrigin = BIT(17);
0305 const Mask_t kGCClipYOrigin = BIT(18);
0306 const Mask_t kGCClipMask = BIT(19);
0307 const Mask_t kGCDashOffset = BIT(20);
0308 const Mask_t kGCDashList = BIT(21);
0309 const Mask_t kGCArcMode = BIT(22);
0310
0311 struct ColorStruct_t {
0312 ULong_t fPixel;
0313 UShort_t fRed;
0314 UShort_t fGreen;
0315 UShort_t fBlue;
0316 UShort_t fMask;
0317 };
0318
0319
0320 const Mask_t kDoRed = BIT(0);
0321 const Mask_t kDoGreen = BIT(1);
0322 const Mask_t kDoBlue = BIT(2);
0323
0324 struct PictureAttributes_t {
0325 Colormap_t fColormap;
0326 Int_t fDepth;
0327 UInt_t fWidth;
0328 UInt_t fHeight;
0329 UInt_t fXHotspot;
0330 UInt_t fYHotspot;
0331 ULong_t *fPixels;
0332 UInt_t fNpixels;
0333 UInt_t fCloseness;
0334 Mask_t fMask;
0335 };
0336
0337
0338 const Mask_t kPAColormap = BIT(0);
0339 const Mask_t kPADepth = BIT(1);
0340 const Mask_t kPASize = BIT(2);
0341 const Mask_t kPAHotspot = BIT(3);
0342 const Mask_t kPAReturnPixels = BIT(4);
0343 const Mask_t kPACloseness = BIT(5);
0344
0345
0346 enum EInitialState {
0347 kNormalState = BIT(0),
0348 kIconicState = BIT(1)
0349 };
0350
0351
0352 struct Segment_t {
0353 Short_t fX1, fY1, fX2, fY2;
0354 };
0355
0356
0357 struct Point_t {
0358 Short_t fX, fY;
0359 };
0360
0361
0362 struct Rectangle_t {
0363 Short_t fX, fY;
0364 UShort_t fWidth, fHeight;
0365 };
0366
0367
0368 const Atom_t kPrimarySelection = 1;
0369 const Atom_t kCutBuffer = 9;
0370 const Int_t kMaxPixel = INT_MAX;
0371
0372 const int kNumCursors = 19;
0373 enum ECursor { kBottomLeft, kBottomRight, kTopLeft, kTopRight,
0374 kBottomSide, kLeftSide, kTopSide, kRightSide,
0375 kMove, kCross, kArrowHor, kArrowVer, kHand, kRotate,
0376 kPointer, kArrowRight, kCaret, kWatch, kNoDrop };
0377
0378
0379 enum EFrameType {
0380 kChildFrame = 0,
0381 kMainFrame = BIT(0),
0382 kVerticalFrame = BIT(1),
0383 kHorizontalFrame = BIT(2),
0384 kSunkenFrame = BIT(3),
0385 kRaisedFrame = BIT(4),
0386 kDoubleBorder = BIT(5),
0387 kFitWidth = BIT(6),
0388 kFixedWidth = BIT(7),
0389 kFitHeight = BIT(8),
0390 kFixedHeight = BIT(9),
0391 kFixedSize = (kFixedWidth | kFixedHeight),
0392 kOwnBackground = BIT(10),
0393 kTransientFrame = BIT(11),
0394 kTempFrame = BIT(12),
0395 kMdiMainFrame = BIT(13),
0396 kMdiFrame = BIT(14)
0397 };
0398
0399
0400 #endif