File indexing completed on 2025-01-18 10:15:25
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023 #ifndef _XmGadgetP_h
0024 #define _XmGadgetP_h
0025
0026 #ifndef _XmNO_BC_INCL
0027 #define _XmNO_BC_INCL
0028 #endif
0029
0030 #include <Xm/XmP.h>
0031
0032 #ifdef __cplusplus
0033 extern "C" {
0034 #endif
0035
0036
0037
0038
0039 #define XmNO_EVENT 0x000
0040 #define XmENTER_EVENT 0x001
0041 #define XmLEAVE_EVENT 0x002
0042 #define XmFOCUS_IN_EVENT 0x004
0043 #define XmFOCUS_OUT_EVENT 0x008
0044 #define XmMOTION_EVENT 0x010
0045 #define XmARM_EVENT 0x020
0046 #define XmACTIVATE_EVENT 0x040
0047 #define XmHELP_EVENT 0x080
0048 #define XmKEY_EVENT 0x100
0049 #define XmMULTI_ARM_EVENT 0x200
0050 #define XmMULTI_ACTIVATE_EVENT 0x400
0051 #define XmBDRAG_EVENT 0x800
0052 #define XmALL_EVENT 0xFFF
0053
0054
0055
0056 #define G_ShadowThickness(g) \
0057 (((XmGadget)(g))->gadget.shadow_thickness)
0058 #define G_HighlightThickness(g) \
0059 (((XmGadget)(g))->gadget.highlight_thickness)
0060
0061 #define GCEPTR(wc) ((XmGadgetClassExt *)(&(((XmGadgetClass)(wc))->gadget_class.extension)))
0062 #define _XmGetGadgetClassExtPtr(wc, owner) \
0063 ((*GCEPTR(wc) && (((*GCEPTR(wc))->record_type) == owner))\
0064 ? GCEPTR(wc) \
0065 :((XmGadgetClassExt *) _XmGetClassExtensionPtr(((XmGenericClassExt *)GCEPTR(wc)), owner)))
0066
0067 #define XmGadgetClassExtVersion 2L
0068
0069
0070
0071
0072 typedef struct _XmGadgetCache
0073 {
0074 struct _XmGadgetCache *next;
0075 struct _XmGadgetCache *prev;
0076 int ref_count;
0077 } XmGadgetCache, *XmGadgetCachePtr;
0078
0079
0080
0081
0082 typedef struct _XmCacheClassPart
0083 {
0084 XmGadgetCache cache_head;
0085 XmCacheCopyProc cache_copy;
0086 XmGadgetCacheProc cache_delete;
0087 XmCacheCompareProc cache_compare;
0088 } XmCacheClassPart, *XmCacheClassPartPtr;
0089
0090
0091
0092 typedef struct _XmGadgetCacheRef
0093 {
0094 XmGadgetCache cache;
0095 XtArgVal data;
0096 } XmGadgetCacheRef, *XmGadgetCacheRefPtr;
0097
0098
0099
0100 typedef struct _XmGadgetClassExtRec{
0101 XtPointer next_extension;
0102 XrmQuark record_type;
0103 long version;
0104 Cardinal record_size;
0105 XmWidgetBaselineProc widget_baseline;
0106 XmWidgetDisplayRectProc widget_display_rect;
0107 XmWidgetMarginsProc widget_margins;
0108 }XmGadgetClassExtRec, *XmGadgetClassExt;
0109
0110 typedef struct _XmGadgetClassPart
0111 {
0112 XtWidgetProc border_highlight;
0113 XtWidgetProc border_unhighlight;
0114 XtActionProc arm_and_activate;
0115 XmWidgetDispatchProc input_dispatch;
0116 XmVisualChangeProc visual_change;
0117 XmSyntheticResource * syn_resources;
0118 int num_syn_resources;
0119 XmCacheClassPartPtr cache_part;
0120 XtPointer extension;
0121 } XmGadgetClassPart;
0122
0123
0124
0125
0126 typedef struct _XmGadgetClassRec
0127 {
0128 RectObjClassPart rect_class;
0129 XmGadgetClassPart gadget_class;
0130 } XmGadgetClassRec;
0131
0132 externalref XmGadgetClassRec xmGadgetClassRec;
0133
0134
0135
0136
0137 typedef struct _XmGadgetPart
0138 {
0139 Dimension shadow_thickness;
0140 Dimension highlight_thickness;
0141
0142 XtCallbackList help_callback;
0143 XtPointer user_data;
0144
0145 Boolean traversal_on;
0146 Boolean highlight_on_enter;
0147 Boolean have_traversal;
0148
0149 unsigned char unit_type;
0150 XmNavigationType navigation_type;
0151
0152 Boolean highlight_drawn;
0153 Boolean highlighted;
0154 Boolean visible;
0155
0156 Mask event_mask;
0157 XmDirection layout_direction;
0158 #ifdef OM22_COMPATIBILITY
0159 XmString tool_tip_string;
0160 #endif
0161 } XmGadgetPart;
0162
0163
0164
0165 typedef struct _XmGadgetRec
0166 {
0167 ObjectPart object;
0168 RectObjPart rectangle;
0169 XmGadgetPart gadget;
0170 } XmGadgetRec;
0171
0172
0173 #ifdef __cplusplus
0174 }
0175 #endif
0176
0177 #endif
0178
0179
0180
0181
0182
0183