2 * CDE - Common Desktop Environment
4 * Copyright (c) 1993-2012, The Open Group. All rights reserved.
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)
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
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with these libraries and programs; if not, write
20 * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
21 * Floor, Boston, MA 02110-1301 USA
23 /* $XConsortium: MacrosP.h /main/5 1996/03/27 20:16:40 drk $
25 * (c) Copyright 1996 Digital Equipment Corporation.
26 * (c) Copyright 1990,1996 Hewlett-Packard Company.
27 * (c) Copyright 1996 International Business Machines Corp.
28 * (c) Copyright 1996 Sun Microsystems, Inc.
29 * (c) Copyright 1996 Novell, Inc.
30 * (c) Copyright 1996 FUJITSU LIMITED.
31 * (c) Copyright 1996 Hitachi.
34 /**---------------------------------------------------------------------
38 *** project: MotifPlus Widgets
40 *** description: Private include file with macros for MotifPlus
41 *** widgets and gadgets.
43 ***-------------------------------------------------------------------*/
49 #define XmUNSPECIFIED_STRING (XmString) 3
52 /*-------------------------------------------------------------
53 ** Widget Class Macros
58 /*** WARNING: These macros are not thread-safe! ***/
59 #define C_WidgetClass(wc) (wc -> core_class.widget_class)
60 #define C_Superclass(wc) (wc -> core_class.superclass)
61 #define C_ClassName(wc) (wc -> core_class.class_name)
62 #define C_ClassInited(wc) (wc -> core_class.class_inited)
63 #define C_NumResources(wc) (wc -> core_class.num_resources)
65 /* Composite Class Macros
67 #ifdef _XtCompositeP_h
68 #define C_ChangeManaged(wc) (wc -> composite_class.change_managed)
69 #endif /* _XtCompositeP_h */
71 /* Constraint Class Macros
73 #ifdef _XtConstraintP_h
74 #define C_ConstraintResources(wc) (wc -> constraint_class.resources)
75 #define C_ConstraintNumResources(wc) (wc -> constraint_class.num_resources)
76 #endif /* _XtConstraintP_h */
78 /* XmGadget Class Macros
80 #define XmInheritBorderHighlight ((XtWidgetProc) _XtInherit)
81 #define XmInheritBorderUnhighlight ((XtWidgetProc) _XtInherit)
82 #define XmInheritVisualChange ((XmVisualChangeProc) _XtInherit)
86 /*-------------------------------------------------------------
90 #define P_X(w) (w -> core.x)
91 #define P_Y(w) (w -> core.y)
92 #define P_Width(w) (w -> core.width)
93 #define P_Height(w) (w -> core.height)
94 #define P_BorderWidth(w) (w -> core.border_width)
95 #define P_XrmName(w) (w -> core.xrm_name)
96 #define P_PopupList(w) (w -> core.popup_list)
97 #define P_NumPopups(w) (w -> core.num_popups)
101 /*-------------------------------------------------------------
107 #define G_XrmName(r) (r -> object.xrm_name)
108 #define G_Class(r) (r -> object.widget_class)
112 #define G_X(r) (r -> rectangle.x)
113 #define G_Y(r) (r -> rectangle.y)
114 #define G_Width(r) (r -> rectangle.width)
115 #define G_Height(r) (r -> rectangle.height)
116 #define G_BorderWidth(r) (r -> rectangle.border_width)
120 #define G_HelpCB(g) (g -> gadget.help_callback)
121 #define G_EventMask(g) (g -> gadget.event_mask)
122 #define G_Highlighted(g) (g -> gadget.highlighted)
123 #define G_UnitType(g) (g -> gadget.unit_type)
127 /*-------------------------------------------------------------
133 #define M_X(w) (w -> core.x)
134 #define M_Y(w) (w -> core.y)
135 #define M_Width(w) (w -> core.width)
136 #define M_Height(w) (w -> core.height)
137 #define M_BorderWidth(w) (w -> core.border_width)
138 #define M_Background(w) (w -> core.background_pixel)
139 #define M_Sensitive(w) (w->core.sensitive && w->core.ancestor_sensitive)
140 #define M_Name(w) (w -> core.name)
141 #define M_Accelerators(w) (w -> core.accelerators)
142 #define M_TmTranslations(w) (w -> core.tm.translations)
143 #define M_PopupList(w) (w -> core.popup_list)
144 #define M_NumPopups(w) (w -> core.num_popups)
146 /* Composite and Constraint Macros
148 #define M_Children(m) (m -> composite.children)
149 #define M_NumChildren(m) (m -> composite.num_children)
154 #define M_Foreground(m) (m -> manager.foreground)
155 #define M_HighlightThickness(m) (m -> manager.highlight_thickness)
156 #define M_ShadowThickness(m) (m -> manager.shadow_thickness)
157 #define M_TopShadowGC(m) (m -> manager.top_shadow_GC)
158 #define M_BottomShadowGC(m) (m -> manager.bottom_shadow_GC)
159 #define M_BackgroundGC(m) (m -> manager.background_GC)
160 #define M_SelectedGadget(m) (m -> manager.selected_gadget)
161 #define M_HelpCB(m) (m -> manager.help_callback)
162 #define M_UnitType(m) (m -> manager.unit_type)
163 #endif /* _XmManagerP_h */
165 /* XmDrawingArea Macros
167 #ifdef _XmDrawingAreaP_h
168 #define M_MarginWidth(m) (m -> drawing_area.margin_width)
169 #define M_MarginHeight(m) (m -> drawing_area.margin_height)
170 #endif /* _XmDrawingAreaP_h */
172 /* XmBulletinBoard Macros
174 #ifdef _XmBulletinBoardP_h
175 #define M_ButtonFontList(m) (m -> bulletin_board.button_font_list)
176 #define M_LabelFontList(m) (m -> bulletin_board.label_font_list)
177 #define M_TextFontList(m) (m -> bulletin_board.text_font_list)
178 #define M_MarginWidth(m) (m -> bulletin_board.margin_width)
179 #define M_MarginHeight(m) (m -> bulletin_board.margin_height)
180 #endif /* _XmBulletinBoardP_h */
186 #define M_Timer(m) (m -> icon_box.timer)
187 #define M_ShellX(m) (m -> icon_box.shell_x)
188 #define M_ShellY(m) (m -> icon_box.shell_y)
189 #define M_DragShell(m) (m -> icon_box.drag_shell)
190 #define M_DragWidget(m) (m -> icon_box.drag_widget)
191 #define M_DragIcon(m) (m -> icon_box.drag_icon)
192 #define M_XCursor(m) (m -> icon_box.x_cursor)
193 #define M_CrossCursor(m) (m -> icon_box.cross_cursor)
194 #endif /* _DtIconBoxP_h */
197 #endif /* _DtMacrosP_h */
199 /* DON'T ADD ANYTHING AFTER THIS #endif */