1 /* test for M*tif to see what the ResInd (Synth) resources look like */
2
3 /* $Id: test7.c,v 1.3 2001/05/06 22:14:52 rwscott Exp $ */
4
5 #include <stdio.h>
6 #include <stdlib.h>
7
8 #include <Xm/Xm.h>
9 #include <Xm/ExtObjectP.h>
10 #include <Xm/DesktopP.h>
11 #include <Xm/DialogSEP.h>
12 #include <Xm/ProtocolsP.h>
13 #include <Xm/ShellEP.h>
14 #include <Xm/VendorSEP.h>
15
16 #include <Xm/GadgetP.h>
17 #include <Xm/ArrowBGP.h>
18 #include <Xm/SeparatoGP.h>
19 #include <Xm/LabelGP.h>
20 #include <Xm/CascadeBGP.h>
21 #include <Xm/PushBGP.h>
22 #include <Xm/ToggleBGP.h>
23
24 #include <Xm/PrimitiveP.h>
25 #include <Xm/ArrowBP.h>
26 #include <Xm/SeparatorP.h>
27 #include <Xm/ListP.h>
28 #include <Xm/SashP.h>
29 #include <Xm/ScrollBarP.h>
30 #include <Xm/TextFP.h>
31 #include <Xm/TextP.h>
32 #include <Xm/LabelP.h>
33 #include <Xm/CascadeBP.h>
34 #include <Xm/DrawnBP.h>
35 #include <Xm/PushBP.h>
36 #include <Xm/ToggleBP.h>
37 #include <Xm/TearOffBP.h>
38
39 #include <Xm/ManagerP.h>
40 #include <Xm/BulletinBP.h>
41 #include <Xm/CommandP.h>
42 #include <Xm/DrawingAP.h>
43 #include <Xm/FileSBP.h>
44 #include <Xm/FormP.h>
45 #include <Xm/FrameP.h>
46 #include <Xm/MainWP.h>
47 #include <Xm/MessageBP.h>
48 #include <Xm/PanedWP.h>
49 #include <Xm/RowColumnP.h>
50 #include <Xm/ScaleP.h>
51 #include <Xm/ScrolledWP.h>
52 #include <Xm/SelectioBP.h>
53
54 void
print_actions(char * class,XtActionsRec * actions,int num_actions)55 print_actions(char *class, XtActionsRec *actions, int num_actions)
56 {
57 int i;
58
59 printf( "%s: %d\n", class, num_actions);
60 for (i = 0; i < num_actions; i++) {
61 printf("action[%d]: name: %-20s proc: %p\n", i,
62 actions[i].string, actions[i].proc);
63 }
64 printf("\n");
65 }
66
67 int
main(int argc,char ** argv)68 main(int argc, char **argv)
69 {
70 XtActionsRec *actions;
71 int nactions;
72 XtAppContext app;
73 Widget one;
74
75 one = XtAppInitialize(&app, argv[0], NULL, 0, &argc, argv, NULL, NULL, 0);
76
77 #if 0
78 /* EXT OBJS */
79 actions = xmExtClassRec.ext_class.actions;
80 nactions = xmExtClassRec.ext_class.num_actions;
81 print_actions("ExtObj", actions, nactions);
82
83 actions = xmDesktopClassRec.ext_class.actions;
84 nactions = xmDesktopClassRec.ext_class.num_actions;
85 print_actions("Desktop", actions, nactions);
86
87 actions = xmDialogShellExtClassRec.ext_class.actions;
88 nactions = xmDialogShellExtClassRec.ext_class.num_actions;
89 print_actions("DialogShellExt", actions, nactions);
90
91 actions = xmProtocolClassRec.ext_class.actions;
92 nactions = xmProtocolClassRec.ext_class.num_actions;
93 print_actions("Protocols", actions, nactions);
94
95 actions = xmShellExtClassRec.ext_class.actions;
96 nactions = xmShellExtClassRec.ext_class.num_actions;
97 print_actions("ShellExt", actions, nactions);
98
99 actions = xmVendorShellExtClassRec.ext_class.actions;
100 nactions = xmVendorShellExtClassRec.ext_class.num_actions;
101 print_actions("VendorShellExt", actions, nactions);
102
103 actions = xmWorldClassRec.ext_class.actions;
104 nactions = xmWorldClassRec.ext_class.num_actions;
105 print_actions("World", actions, nactions);
106
107 actions = xmSeparatorGCacheObjClassRec.ext_class.actions;
108 nactions = xmSeparatorGCacheObjClassRec.ext_class.num_actions;
109 print_actions("SeparatorGCache", actions, nactions);
110
111 actions = xmLabelGCacheObjClassRec.ext_class.actions;
112 nactions = xmLabelGCacheObjClassRec.ext_class.num_actions;
113 print_actions("LabelGCache", actions, nactions);
114
115 actions = xmCascadeButtonGCacheObjClassRec.ext_class.actions;
116 nactions = xmCascadeButtonGCacheObjClassRec.ext_class.num_actions;
117 print_actions("CascadeButtonGCache", actions, nactions);
118
119 actions = xmPushButtonGCacheObjClassRec.ext_class.actions;
120 nactions = xmPushButtonGCacheObjClassRec.ext_class.num_actions;
121 print_actions("PushButtonGCache", actions, nactions);
122
123 actions = xmToggleButtonGCacheObjClassRec.ext_class.actions;
124 nactions = xmToggleButtonGCacheObjClassRec.ext_class.num_actions;
125 print_actions("ToggleButtonGCache", actions, nactions);
126
127 /* GADGETS */
128 actions = xmGadgetClassRec.gadget_class.actions;
129 nactions = xmGadgetClassRec.gadget_class.num_actions;
130 print_actions("Gadget", actions, nactions);
131
132 actions = xmArrowButtonGadgetClassRec.gadget_class.actions;
133 nactions = xmArrowButtonGadgetClassRec.gadget_class.num_actions;
134 print_actions("ArrowButtonGadget", actions, nactions);
135
136 actions = xmSeparatorGadgetClassRec.gadget_class.actions;
137 nactions = xmSeparatorGadgetClassRec.gadget_class.num_actions;
138 print_actions("SeparatorGadget", actions, nactions);
139
140 actions = xmLabelGadgetClassRec.gadget_class.actions;
141 nactions = xmLabelGadgetClassRec.gadget_class.num_actions;
142 print_actions("LabelGadget", actions, nactions);
143
144 actions = xmCascadeButtonGadgetClassRec.gadget_class.actions;
145 nactions = xmCascadeButtonGadgetClassRec.gadget_class.num_actions;
146 print_actions("CascadeButtonGadget", actions, nactions);
147
148 actions = xmPushButtonGadgetClassRec.gadget_class.actions;
149 nactions = xmPushButtonGadgetClassRec.gadget_class.num_actions;
150 print_actions("PushButtonGadget", actions, nactions);
151
152 actions = xmToggleButtonGadgetClassRec.gadget_class.actions;
153 nactions = xmToggleButtonGadgetClassRec.gadget_class.num_actions;
154 print_actions("ToggleButtonGadget", actions, nactions);
155 #endif
156
157 /* PRIMITIVES */
158 actions = xmPrimitiveClassRec.core_class.actions;
159 nactions = xmPrimitiveClassRec.core_class.num_actions;
160 print_actions("Primitive", actions, nactions);
161
162 actions = xmArrowButtonClassRec.core_class.actions;
163 nactions = xmArrowButtonClassRec.core_class.num_actions;
164 print_actions("ArrowButton", actions, nactions);
165
166 actions = xmSeparatorClassRec.core_class.actions;
167 nactions = xmSeparatorClassRec.core_class.num_actions;
168 print_actions("Separator", actions, nactions);
169
170 actions = xmListClassRec.core_class.actions;
171 nactions = xmListClassRec.core_class.num_actions;
172 print_actions("List", actions, nactions);
173
174 actions = xmSashClassRec.core_class.actions;
175 nactions = xmSashClassRec.core_class.num_actions;
176 print_actions("Sash", actions, nactions);
177
178 actions = xmScrollBarClassRec.core_class.actions;
179 nactions = xmScrollBarClassRec.core_class.num_actions;
180 print_actions("ScrollBar", actions, nactions);
181
182 actions = xmTextFieldClassRec.core_class.actions;
183 nactions = xmTextFieldClassRec.core_class.num_actions;
184 print_actions("TextField", actions, nactions);
185
186 actions = xmTextClassRec.core_class.actions;
187 nactions = xmTextClassRec.core_class.num_actions;
188 print_actions("Text", actions, nactions);
189
190 actions = xmLabelClassRec.core_class.actions;
191 nactions = xmLabelClassRec.core_class.num_actions;
192 print_actions("Label", actions, nactions);
193
194 actions = xmCascadeButtonClassRec.core_class.actions;
195 nactions = xmCascadeButtonClassRec.core_class.num_actions;
196 print_actions("CascadeButton", actions, nactions);
197
198 actions = xmDrawnButtonClassRec.core_class.actions;
199 nactions = xmDrawnButtonClassRec.core_class.num_actions;
200 print_actions("DrawnButton", actions, nactions);
201
202 actions = xmPushButtonClassRec.core_class.actions;
203 nactions = xmPushButtonClassRec.core_class.num_actions;
204 print_actions("PushButton", actions, nactions);
205
206 actions = xmToggleButtonClassRec.core_class.actions;
207 nactions = xmToggleButtonClassRec.core_class.num_actions;
208 print_actions("ToggleButton", actions, nactions);
209
210 actions = xmTearOffButtonClassRec.core_class.actions;
211 nactions = xmTearOffButtonClassRec.core_class.num_actions;
212 print_actions("TearOffButton", actions, nactions);
213
214 /* MANAGERS */
215 actions = xmManagerClassRec.core_class.actions;
216 nactions = xmManagerClassRec.core_class.num_actions;
217 print_actions("Manager", actions, nactions);
218
219 actions = xmBulletinBoardClassRec.core_class.actions;
220 nactions = xmBulletinBoardClassRec.core_class.num_actions;
221 print_actions("BulletinBoard", actions, nactions);
222
223 actions = xmCommandClassRec.core_class.actions;
224 nactions = xmCommandClassRec.core_class.num_actions;
225 print_actions("Command", actions, nactions);
226
227 actions = xmDrawingAreaClassRec.core_class.actions;
228 nactions = xmDrawingAreaClassRec.core_class.num_actions;
229 print_actions("DrawingArea", actions, nactions);
230
231 actions = xmFileSelectionBoxClassRec.core_class.actions;
232 nactions = xmFileSelectionBoxClassRec.core_class.num_actions;
233 print_actions("FileSelectionBox", actions, nactions);
234
235 actions = xmFormClassRec.core_class.actions;
236 nactions = xmFormClassRec.core_class.num_actions;
237 print_actions("Form", actions, nactions);
238
239 actions = xmFrameClassRec.core_class.actions;
240 nactions = xmFrameClassRec.core_class.num_actions;
241 print_actions("Frame", actions, nactions);
242
243 actions = xmMainWindowClassRec.core_class.actions;
244 nactions = xmMainWindowClassRec.core_class.num_actions;
245 print_actions("MainWindow", actions, nactions);
246
247 actions = xmMessageBoxClassRec.core_class.actions;
248 nactions = xmMessageBoxClassRec.core_class.num_actions;
249 print_actions("MessageBox", actions, nactions);
250
251 actions = xmPanedWindowClassRec.core_class.actions;
252 nactions = xmPanedWindowClassRec.core_class.num_actions;
253 print_actions("PanedWindow", actions, nactions);
254
255 actions = xmRowColumnClassRec.core_class.actions;
256 nactions = xmRowColumnClassRec.core_class.num_actions;
257 print_actions("RowColumn", actions, nactions);
258
259 actions = xmScaleClassRec.core_class.actions;
260 nactions = xmScaleClassRec.core_class.num_actions;
261 print_actions("Scale", actions, nactions);
262
263 actions = xmScrolledWindowClassRec.core_class.actions;
264 nactions = xmScrolledWindowClassRec.core_class.num_actions;
265 print_actions("ScrolledWindow", actions, nactions);
266
267 actions = xmSelectionBoxClassRec.core_class.actions;
268 nactions = xmSelectionBoxClassRec.core_class.num_actions;
269 print_actions("SelectionBox", actions, nactions);
270
271 exit(0);
272 }
273