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  */
24 
25 #ifndef _XmExtP_h_
26 #define _XmExtP_h_
27 
28 #include <Xm/Ext.h>
29 
30 /************************************************************
31 *	INCLUDE FILES
32 *************************************************************/
33 
34 #if defined(hpux) && OS_MAJOR_VERSION < 10
35 #include <nl_ctype.h>
36 #endif
37 
38 /************************************************************
39 *	TYPEDEFS AND DEFINES
40 *************************************************************/
41 
42 #if defined(__cplusplus)
43 extern "C" {
44 #endif
45 
46 typedef void (*XmVoidFunc)(void);
47 typedef int (*XmIntFunc)(void);
48 typedef unsigned int (*XmUnsignedIntFunc)(void);
49 
50 extern String xm_std_filter[], xm_std_constraint_filter[];
51 
52 /************************************************************
53 *	MACROS
54 *************************************************************/
55 
56 #define streq(a, b) (((a) != NULL) && ((b) != NULL) && (strcmp((a), (b)) == 0))
57 
58 #define ForAllChildren(w, childP)                                          \
59   for ( (childP) = (w)->composite.children ;                               \
60         (childP) < (w)->composite.children + (w)->composite.num_children ; \
61         (childP)++ )
62 
63 /*
64  * Math Stuff
65  *
66  * Some Systems define MIN and MAX so I have to undef them before I make
67  * my own definitions.
68  */
69 
70 #define XM_ICON_BUTTON_CLASS_NAME ("XmIconButton")
71 #define XM_EXT_LIST_CLASS_NAME ("XmExtendedList")
72 #define XM_ILIST_CLASS_NAME ("XmIList")
73 #define XM_EXT_18_LIST_CLASS_NAME ("XmExtended18List")
74 #define XM_I18LIST_CLASS_NAME ("XmI18List")
75 
76 
77 /************************************************************
78 *	GLOBAL DECLARATIONS
79 *************************************************************/
80 
81 
82 
83 void XmResolveAllPartOffsets64(WidgetClass, XmOffsetPtr*, XmOffsetPtr*);
84 void _XmMoveWidget(Widget, Position, Position);
85 void _XmResizeWidget(Widget, Dimension, Dimension, Dimension);
86 void _XmConfigureWidget(Widget, Position, Position,
87                         Dimension, Dimension, Dimension);
88 
89 XtGeometryResult _XmRequestNewSize(Widget, Boolean, Dimension,
90                                    Dimension,
91                                    Dimension *, Dimension *);
92 
93 XtGeometryResult _XmHWQuery(Widget, XtWidgetGeometry*, XtWidgetGeometry *);
94 
95 void _XmGetFocus(Widget, XEvent *, String *, Cardinal *);
96 
97 void _XmFilterArgs(ArgList, Cardinal, String *,
98                    ArgList *, Cardinal *);
99 
100 void _XmSetValuesOnChildren(Widget, ArgList, Cardinal);
101 
102 Boolean _XmGadgetWarning(Widget);
103 
104 String _XmGetMBStringFromXmString(XmString);
105 
106 /*
107  * Context Managment Routines.
108  */
109 
110 void _XmSetContextData(Widget, XContext, XtPointer);
111 void _XmDeleteContextData(Widget, XContext);
112 Boolean _XmGetContextData(Widget, XContext, XtPointer *);
113 Boolean _XmUtilIsSubclassByNameQ(Widget, XrmQuark);
114 void _XmInitialIzeConverters(Widget);
115 
116 void _XmExtHighlightBorder(Widget);
117 void _XmExtUnhighlightBorder(Widget);
118 
119 
120 /************************************************************
121 *	EXTERNAL DECLARATIONS
122 *************************************************************/
123 
124 #if defined(__cplusplus)
125 }
126 #endif
127 
128 #endif
129