1 /*
2  * Motif
3  *
4  * Copyright (c) 1987-2012, The Open Group. All rights reserved.
5  *
6  * These libraries and programs are free software; you can
7  * redistribute them and/or modify them under the terms of the GNU
8  * Lesser General Public License as published by the Free Software
9  * Foundation; either version 2 of the License, or (at your option)
10  * any later version.
11  *
12  * These libraries and programs are distributed in the hope that
13  * they will be useful, but WITHOUT ANY WARRANTY; without even the
14  * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15  * PURPOSE. See the GNU Lesser General Public License for more
16  * details.
17  *
18  * You should have received a copy of the GNU Lesser General Public
19  * License along with these librararies and programs; if not, write
20  * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
21  * Floor, Boston, MA 02110-1301 USA
22 */
23 #ifndef _XmManagerP_h
24 #define _XmManagerP_h
25 
26 #ifndef _XmNO_BC_INCL
27 #define _XmNO_BC_INCL
28 #endif
29 
30 #include <Xm/XmP.h>
31 
32 #ifdef __cplusplus
33 extern "C" {
34 #endif
35 
36 /*  Access Macros  */
37 
38 #define XmParentTopShadowGC(w) 		\
39 	(((XmManagerWidget) XtParent(w))->manager.top_shadow_GC)
40 
41 #define XmParentBottomShadowGC(w)	\
42 	(((XmManagerWidget) XtParent(w))->manager.bottom_shadow_GC)
43 
44 #define XmParentHighlightGC(w)		\
45 	(((XmManagerWidget) XtParent(w))->manager.highlight_GC)
46 
47 #define XmParentBackgroundGC(w)		\
48 	(((XmManagerWidget) XtParent(w))->manager.background_GC)
49 
50 
51 #define MGR_KeyboardList(m)		\
52 			(((XmManagerRec *) (m))->manager.keyboard_list)
53 #define MGR_NumKeyboardEntries(m)	\
54 			(((XmManagerRec *) (m))->manager.num_keyboard_entries)
55 #define MGR_SizeKeyboardList(m)		\
56 			(((XmManagerRec *) (m))->manager.size_keyboard_list)
57 #define MGR_ShadowThickness(m)		\
58 			(((XmManagerRec *) (m))->manager.shadow_thickness)
59 
60 
61 #define XmInheritTraversalChildrenProc ((XmTraversalChildrenProc) _XtInherit)
62 #define XmInheritObjectAtPointProc     ((XmObjectAtPointProc) _XtInherit)
63 
64 typedef Boolean (*XmTraversalChildrenProc)( Widget, Widget **, Cardinal *) ;
65 typedef Widget (*XmObjectAtPointProc)(Widget, Position, Position) ;
66 
67 
68 /*  Structure used for storing accelerator and mnemonic information.  */
69 
70 typedef struct
71 {
72    unsigned int eventType;
73    KeySym       keysym;
74    KeyCode      key;
75    unsigned int modifiers;
76    Widget       component;
77    Boolean      needGrab;
78    Boolean      isMnemonic;
79 } XmKeyboardData;
80 
81 
82 /*  The class definition  */
83 
84 typedef struct {
85     XtPointer next_extension;
86     XrmQuark record_type;
87     long version;
88     Cardinal record_size;
89     XmTraversalChildrenProc traversal_children ;
90     XmObjectAtPointProc     object_at_point ;
91 } XmManagerClassExtRec, *XmManagerClassExt ;
92 
93 #define XmManagerClassExtVersion 1L
94 
95 typedef struct _XmManagerClassPart
96 {
97    String               translations;
98    XmSyntheticResource * syn_resources;
99    int                  num_syn_resources;
100    XmSyntheticResource * syn_constraint_resources;
101    int                  num_syn_constraint_resources;
102    XmParentProcessProc  parent_process;
103    XtPointer            extension;
104 } XmManagerClassPart;
105 
106 typedef struct _XmManagerClassRec
107 {
108     CoreClassPart       core_class;
109     CompositeClassPart  composite_class;
110     ConstraintClassPart constraint_class;
111     XmManagerClassPart  manager_class;
112 } XmManagerClassRec;
113 
114 externalref XmManagerClassRec xmManagerClassRec;
115 
116 
117 /*  The instance definition  */
118 
119 typedef struct _XmManagerPart
120 {
121    Pixel   foreground;
122 
123    Dimension   shadow_thickness;
124    Pixel   top_shadow_color;
125    Pixmap  top_shadow_pixmap;
126    Pixel   bottom_shadow_color;
127    Pixmap  bottom_shadow_pixmap;
128 
129    Pixel   highlight_color;
130    Pixmap  highlight_pixmap;
131 
132    XtCallbackList help_callback;
133    XtPointer      user_data;
134 
135    Boolean traversal_on;
136    unsigned char unit_type;
137    XmNavigationType navigation_type;
138 
139    Boolean event_handler_added;
140    Widget  active_child;
141    Widget  highlighted_widget;
142    Widget  accelerator_widget;
143 
144    Boolean has_focus;
145 
146    XmStringDirection string_direction;
147 
148    XmKeyboardData * keyboard_list;
149    short num_keyboard_entries;
150    short size_keyboard_list;
151 
152    XmGadget selected_gadget;
153    XmGadget eligible_for_multi_button_event;
154 
155    GC      background_GC;
156    GC      highlight_GC;
157    GC      top_shadow_GC;
158    GC      bottom_shadow_GC;
159 
160    Widget  initial_focus;
161 
162 #ifndef XM_PART_BC
163    XtCallbackList   popup_handler_callback;
164 #endif
165 
166 } XmManagerPart;
167 
168 typedef struct _XmManagerRec
169 {
170    CorePart       core;
171    CompositePart  composite;
172    ConstraintPart constraint;
173    XmManagerPart  manager;
174 } XmManagerRec;
175 
176 
177 /*  The constraint definition  */
178 
179 typedef struct _XmManagerConstraintPart
180 {
181    int unused;
182 } XmManagerConstraintPart;
183 
184 typedef struct _XmManagerConstraintRec
185 {
186    XmManagerConstraintPart manager;
187 } XmManagerConstraintRec, * XmManagerConstraintPtr;
188 
189 
190 #ifdef __cplusplus
191 }  /* Close scope of 'extern "C"' declaration which encloses file. */
192 #endif
193 
194 #endif /* _XmManagerP_h */
195 /* DON'T ADD ANYTHING AFTER THIS #endif */
196