1 /* auto generated, do not edit */
2 
3 #include <agar/core.h>
4 #include <agar/gui.h>
5 
6 /* XXX: private */
7 typedef unsigned int Uint;
8 #include <agar/gui/titlebar.h>
9 
10 #include <stdio.h>
11 #include <string.h>
12 
13 struct {
14   const char *type_name;
15   unsigned int type_size;
16 } types[] = {
17   { "AG_BlendFn", sizeof (AG_BlendFn) },
18   { "enum ag_blend_func", sizeof (enum ag_blend_func) },
19   { "AG_Color", sizeof (AG_Color) },
20   { "struct ag_color", sizeof (struct ag_color) },
21   { "AG_PixelFormat *", sizeof (AG_PixelFormat *) },
22   { "AG_PixelFormat", sizeof (AG_PixelFormat) },
23   { "AG_Point", sizeof (AG_Point) },
24   { "struct ag_point", sizeof (struct ag_point) },
25   { "AG_Rect *", sizeof (AG_Rect *) },
26   { "struct ag_rect *", sizeof (struct ag_rect *) },
27   { "AG_Rect", sizeof (AG_Rect) },
28   { "struct ag_rect", sizeof (struct ag_rect) },
29   { "AG_Rect2 *", sizeof (AG_Rect2 *) },
30   { "struct ag_rect2 *", sizeof (struct ag_rect2 *) },
31   { "AG_Rect2", sizeof (AG_Rect2) },
32   { "struct ag_rect2", sizeof (struct ag_rect2) },
33   { "AG_Style *", sizeof (AG_Style *) },
34   { "struct ag_style *", sizeof (struct ag_style *) },
35   { "AG_Style", sizeof (AG_Style) },
36   { "struct ag_style", sizeof (struct ag_style) },
37   { "AG_Surface *", sizeof (AG_Surface *) },
38   { "AG_Surface", sizeof (AG_Surface) },
39   { "AG_Font *", sizeof (AG_Font *) },
40   { "struct ag_font *", sizeof (struct ag_font *) },
41   { "AG_Font", sizeof (AG_Font) },
42   { "struct ag_font", sizeof (struct ag_font) },
43   { "enum ag_font_type", sizeof (enum ag_font_type) },
44   { "AG_Glyph *", sizeof (AG_Glyph *) },
45   { "struct ag_glyph *", sizeof (struct ag_glyph *) },
46   { "AG_Glyph", sizeof (AG_Glyph) },
47   { "struct ag_glyph", sizeof (struct ag_glyph) },
48   { "enum ag_text_justify", sizeof (enum ag_text_justify) },
49   { "AG_TextMetrics *", sizeof (AG_TextMetrics *) },
50   { "struct ag_text_metrics *", sizeof (struct ag_text_metrics *) },
51   { "AG_TextMetrics", sizeof (AG_TextMetrics) },
52   { "struct ag_text_metrics", sizeof (struct ag_text_metrics) },
53   { "enum ag_text_msg_title", sizeof (enum ag_text_msg_title) },
54   { "AG_TextState *", sizeof (AG_TextState *) },
55   { "struct ag_text_state *", sizeof (struct ag_text_state *) },
56   { "AG_TextState", sizeof (AG_TextState) },
57   { "struct ag_text_state", sizeof (struct ag_text_state) },
58   { "AG_StaticFont *", sizeof (AG_StaticFont *) },
59   { "struct ag_static_font *", sizeof (struct ag_static_font *) },
60   { "AG_StaticFont", sizeof (AG_StaticFont) },
61   { "struct ag_static_font", sizeof (struct ag_static_font) },
62   { "enum ag_text_valign", sizeof (enum ag_text_valign) },
63   { "AG_Unit", sizeof (AG_Unit) },
64   { "struct ag_unit", sizeof (struct ag_unit) },
65   { "AG_Display", sizeof (AG_Display) },
66   { "struct ag_display", sizeof (struct ag_display) },
67   { "AG_WidgetBinding *", sizeof (AG_WidgetBinding *) },
68   { "struct ag_widget_binding *", sizeof (struct ag_widget_binding *) },
69   { "AG_WidgetBinding", sizeof (AG_WidgetBinding) },
70   { "struct ag_widget_binding", sizeof (struct ag_widget_binding) },
71   { "AG_WidgetBindingType", sizeof (AG_WidgetBindingType) },
72   { "enum ag_widget_binding_type", sizeof (enum ag_widget_binding_type) },
73   { "AG_Box *", sizeof (AG_Box *) },
74   { "struct ag_box *", sizeof (struct ag_box *) },
75   { "AG_Box", sizeof (AG_Box) },
76   { "struct ag_box", sizeof (struct ag_box) },
77   { "enum ag_box_type", sizeof (enum ag_box_type) },
78   { "AG_Button *", sizeof (AG_Button *) },
79   { "struct ag_button *", sizeof (struct ag_button *) },
80   { "AG_Button", sizeof (AG_Button) },
81   { "struct ag_button", sizeof (struct ag_button) },
82   { "AG_Checkbox *", sizeof (AG_Checkbox *) },
83   { "struct ag_checkbox *", sizeof (struct ag_checkbox *) },
84   { "AG_Checkbox", sizeof (AG_Checkbox) },
85   { "struct ag_checkbox", sizeof (struct ag_checkbox) },
86   { "AG_WidgetClass *", sizeof (AG_WidgetClass *) },
87   { "struct ag_widget_class *", sizeof (struct ag_widget_class *) },
88   { "AG_WidgetClass", sizeof (AG_WidgetClass) },
89   { "struct ag_widget_class", sizeof (struct ag_widget_class) },
90   { "AG_Combo *", sizeof (AG_Combo *) },
91   { "struct ag_combo *", sizeof (struct ag_combo *) },
92   { "AG_Combo", sizeof (AG_Combo) },
93   { "struct ag_combo", sizeof (struct ag_combo) },
94   { "AG_Console *", sizeof (AG_Console *) },
95   { "struct ag_console *", sizeof (struct ag_console *) },
96   { "AG_Console", sizeof (AG_Console) },
97   { "struct ag_console", sizeof (struct ag_console) },
98   { "AG_ConsoleLine *", sizeof (AG_ConsoleLine *) },
99   { "struct ag_console_line *", sizeof (struct ag_console_line *) },
100   { "AG_ConsoleLine", sizeof (AG_ConsoleLine) },
101   { "struct ag_console_line", sizeof (struct ag_console_line) },
102   { "AG_Editable *", sizeof (AG_Editable *) },
103   { "struct ag_editable *", sizeof (struct ag_editable *) },
104   { "AG_Editable", sizeof (AG_Editable) },
105   { "struct ag_editable", sizeof (struct ag_editable) },
106   { "enum ag_editable_encoding", sizeof (enum ag_editable_encoding) },
107   { "AG_FileDlg *", sizeof (AG_FileDlg *) },
108   { "struct ag_file_dlg *", sizeof (struct ag_file_dlg *) },
109   { "AG_FileDlg", sizeof (AG_FileDlg) },
110   { "struct ag_file_dlg", sizeof (struct ag_file_dlg) },
111   { "AG_FileType *", sizeof (AG_FileType *) },
112   { "struct ag_file_type *", sizeof (struct ag_file_type *) },
113   { "AG_FileType", sizeof (AG_FileType) },
114   { "struct ag_file_type", sizeof (struct ag_file_type) },
115   { "AG_FileOption *", sizeof (AG_FileOption *) },
116   { "struct ag_file_type_option *", sizeof (struct ag_file_type_option *) },
117   { "AG_FileOption", sizeof (AG_FileOption) },
118   { "struct ag_file_type_option", sizeof (struct ag_file_type_option) },
119   { "enum ag_file_type_option_type", sizeof (enum ag_file_type_option_type) },
120   { "AG_Fixed *", sizeof (AG_Fixed *) },
121   { "struct ag_fixed *", sizeof (struct ag_fixed *) },
122   { "AG_Fixed", sizeof (AG_Fixed) },
123   { "struct ag_fixed", sizeof (struct ag_fixed) },
124   { "AG_FixedPlotterItem *", sizeof (AG_FixedPlotterItem *) },
125   { "struct ag_fixed_plotter_item *", sizeof (struct ag_fixed_plotter_item *) },
126   { "AG_FixedPlotterItem", sizeof (AG_FixedPlotterItem) },
127   { "struct ag_fixed_plotter_item", sizeof (struct ag_fixed_plotter_item) },
128   { "AG_FixedPlotter *", sizeof (AG_FixedPlotter *) },
129   { "struct ag_fixed_plotter *", sizeof (struct ag_fixed_plotter *) },
130   { "AG_FixedPlotter", sizeof (AG_FixedPlotter) },
131   { "struct ag_fixed_plotter", sizeof (struct ag_fixed_plotter) },
132   { "enum ag_fixed_plotter_type", sizeof (enum ag_fixed_plotter_type) },
133   { "AG_FlagDescr *", sizeof (AG_FlagDescr *) },
134   { "struct ag_flag_descr *", sizeof (struct ag_flag_descr *) },
135   { "AG_FlagDescr", sizeof (AG_FlagDescr) },
136   { "struct ag_flag_descr", sizeof (struct ag_flag_descr) },
137   { "AG_GraphEdge *", sizeof (AG_GraphEdge *) },
138   { "struct ag_graph_edge *", sizeof (struct ag_graph_edge *) },
139   { "AG_GraphEdge", sizeof (AG_GraphEdge) },
140   { "struct ag_graph_edge", sizeof (struct ag_graph_edge) },
141   { "AG_Graph *", sizeof (AG_Graph *) },
142   { "struct ag_graph *", sizeof (struct ag_graph *) },
143   { "AG_Graph", sizeof (AG_Graph) },
144   { "struct ag_graph", sizeof (struct ag_graph) },
145   { "AG_GraphVertex *", sizeof (AG_GraphVertex *) },
146   { "struct ag_graph_vertex *", sizeof (struct ag_graph_vertex *) },
147   { "enum ag_graph_vertex_style", sizeof (enum ag_graph_vertex_style) },
148   { "AG_GraphVertex", sizeof (AG_GraphVertex) },
149   { "struct ag_graph_vertex", sizeof (struct ag_graph_vertex) },
150   { "AG_HBox *", sizeof (AG_HBox *) },
151   { "struct ag_hbox *", sizeof (struct ag_hbox *) },
152   { "AG_HBox", sizeof (AG_HBox) },
153   { "struct ag_hbox", sizeof (struct ag_hbox) },
154   { "AG_HSVPal *", sizeof (AG_HSVPal *) },
155   { "struct ag_hsvpal *", sizeof (struct ag_hsvpal *) },
156   { "AG_HSVPal", sizeof (AG_HSVPal) },
157   { "struct ag_hsvpal", sizeof (struct ag_hsvpal) },
158   { "AG_Icon *", sizeof (AG_Icon *) },
159   { "struct ag_icon *", sizeof (struct ag_icon *) },
160   { "AG_Icon", sizeof (AG_Icon) },
161   { "struct ag_icon", sizeof (struct ag_icon) },
162   { "struct ag_label_flag", sizeof (struct ag_label_flag) },
163   { "AG_LabelFormatFn", sizeof (AG_LabelFormatFn) },
164   { "AG_LabelFormatSpec *", sizeof (AG_LabelFormatSpec *) },
165   { "struct ag_label_format_spec *", sizeof (struct ag_label_format_spec *) },
166   { "AG_LabelFormatSpec", sizeof (AG_LabelFormatSpec) },
167   { "struct ag_label_format_spec", sizeof (struct ag_label_format_spec) },
168   { "AG_Label *", sizeof (AG_Label *) },
169   { "struct ag_label *", sizeof (struct ag_label *) },
170   { "AG_Label", sizeof (AG_Label) },
171   { "struct ag_label", sizeof (struct ag_label) },
172   { "enum ag_label_type", sizeof (enum ag_label_type) },
173   { "enum ag_menu_binding", sizeof (enum ag_menu_binding) },
174   { "AG_MenuItem *", sizeof (AG_MenuItem *) },
175   { "struct ag_menu_item *", sizeof (struct ag_menu_item *) },
176   { "AG_MenuItem", sizeof (AG_MenuItem) },
177   { "struct ag_menu_item", sizeof (struct ag_menu_item) },
178   { "AG_Menu *", sizeof (AG_Menu *) },
179   { "struct ag_menu *", sizeof (struct ag_menu *) },
180   { "AG_Menu", sizeof (AG_Menu) },
181   { "struct ag_menu", sizeof (struct ag_menu) },
182   { "AG_PopupMenu *", sizeof (AG_PopupMenu *) },
183   { "struct ag_popup_menu *", sizeof (struct ag_popup_menu *) },
184   { "AG_PopupMenu", sizeof (AG_PopupMenu) },
185   { "struct ag_popup_menu", sizeof (struct ag_popup_menu) },
186   { "AG_MenuView *", sizeof (AG_MenuView *) },
187   { "struct ag_menu_view *", sizeof (struct ag_menu_view *) },
188   { "AG_MenuView", sizeof (AG_MenuView) },
189   { "struct ag_menu_view", sizeof (struct ag_menu_view) },
190   { "enum ag_mpane_layout", sizeof (enum ag_mpane_layout) },
191   { "AG_MPane *", sizeof (AG_MPane *) },
192   { "struct ag_mpane *", sizeof (struct ag_mpane *) },
193   { "AG_MPane", sizeof (AG_MPane) },
194   { "struct ag_mpane", sizeof (struct ag_mpane) },
195   { "AG_Notebook *", sizeof (AG_Notebook *) },
196   { "struct ag_notebook *", sizeof (struct ag_notebook *) },
197   { "AG_Notebook", sizeof (AG_Notebook) },
198   { "struct ag_notebook", sizeof (struct ag_notebook) },
199   { "AG_NotebookTab *", sizeof (AG_NotebookTab *) },
200   { "struct ag_notebook_tab *", sizeof (struct ag_notebook_tab *) },
201   { "enum ag_notebook_tab_alignment", sizeof (enum ag_notebook_tab_alignment) },
202   { "AG_NotebookTab", sizeof (AG_NotebookTab) },
203   { "struct ag_notebook_tab", sizeof (struct ag_notebook_tab) },
204   { "AG_Numerical *", sizeof (AG_Numerical *) },
205   { "struct ag_numerical *", sizeof (struct ag_numerical *) },
206   { "AG_Numerical", sizeof (AG_Numerical) },
207   { "struct ag_numerical", sizeof (struct ag_numerical) },
208   { "AG_Pane *", sizeof (AG_Pane *) },
209   { "struct ag_pane *", sizeof (struct ag_pane *) },
210   { "AG_Pane", sizeof (AG_Pane) },
211   { "struct ag_pane", sizeof (struct ag_pane) },
212   { "enum ag_pane_type", sizeof (enum ag_pane_type) },
213   { "AG_Pixmap *", sizeof (AG_Pixmap *) },
214   { "struct ag_pixmap *", sizeof (struct ag_pixmap *) },
215   { "AG_Pixmap", sizeof (AG_Pixmap) },
216   { "struct ag_pixmap", sizeof (struct ag_pixmap) },
217   { "AG_ProgressBar *", sizeof (AG_ProgressBar *) },
218   { "struct ag_progress_bar *", sizeof (struct ag_progress_bar *) },
219   { "AG_ProgressBar", sizeof (AG_ProgressBar) },
220   { "struct ag_progress_bar", sizeof (struct ag_progress_bar) },
221   { "enum ag_progress_bar_type", sizeof (enum ag_progress_bar_type) },
222   { "AG_RadioItem *", sizeof (AG_RadioItem *) },
223   { "struct ag_radio_item *", sizeof (struct ag_radio_item *) },
224   { "AG_RadioItem", sizeof (AG_RadioItem) },
225   { "struct ag_radio_item", sizeof (struct ag_radio_item) },
226   { "AG_RadioItem *", sizeof (AG_RadioItem *) },
227   { "struct ag_radio *", sizeof (struct ag_radio *) },
228   { "AG_RadioItem", sizeof (AG_RadioItem) },
229   { "struct ag_radio", sizeof (struct ag_radio) },
230   { "enum ag_scrollbar_button", sizeof (enum ag_scrollbar_button) },
231   { "AG_Scrollbar *", sizeof (AG_Scrollbar *) },
232   { "struct ag_scrollbar *", sizeof (struct ag_scrollbar *) },
233   { "AG_Scrollbar", sizeof (AG_Scrollbar) },
234   { "struct ag_scrollbar", sizeof (struct ag_scrollbar) },
235   { "enum ag_scrollbar_type", sizeof (enum ag_scrollbar_type) },
236   { "AG_Separator *", sizeof (AG_Separator *) },
237   { "struct ag_separator *", sizeof (struct ag_separator *) },
238   { "AG_Separator", sizeof (AG_Separator) },
239   { "struct ag_separator", sizeof (struct ag_separator) },
240   { "enum ag_separator_type", sizeof (enum ag_separator_type) },
241   { "AG_SizeReq *", sizeof (AG_SizeReq *) },
242   { "struct ag_size_req *", sizeof (struct ag_size_req *) },
243   { "AG_SizeReq", sizeof (AG_SizeReq) },
244   { "struct ag_size_req", sizeof (struct ag_size_req) },
245   { "enum ag_widget_sizespec", sizeof (enum ag_widget_sizespec) },
246   { "enum ag_slider_button", sizeof (enum ag_slider_button) },
247   { "AG_Slider *", sizeof (AG_Slider *) },
248   { "struct ag_slider *", sizeof (struct ag_slider *) },
249   { "AG_Slider", sizeof (AG_Slider) },
250   { "struct ag_slider", sizeof (struct ag_slider) },
251   { "enum ag_slider_type", sizeof (enum ag_slider_type) },
252   { "enum ag_socket_bg_type", sizeof (enum ag_socket_bg_type) },
253   { "AG_Socket *", sizeof (AG_Socket *) },
254   { "struct ag_socket *", sizeof (struct ag_socket *) },
255   { "AG_Socket", sizeof (AG_Socket) },
256   { "struct ag_socket", sizeof (struct ag_socket) },
257   { "AG_TableCell *", sizeof (AG_TableCell *) },
258   { "struct ag_table_cell *", sizeof (struct ag_table_cell *) },
259   { "AG_TableCell", sizeof (AG_TableCell) },
260   { "struct ag_table_cell", sizeof (struct ag_table_cell) },
261   { "enum ag_table_cell_type", sizeof (enum ag_table_cell_type) },
262   { "AG_TableCol *", sizeof (AG_TableCol *) },
263   { "struct ag_table_col *", sizeof (struct ag_table_col *) },
264   { "AG_TableCol", sizeof (AG_TableCol) },
265   { "struct ag_table_col", sizeof (struct ag_table_col) },
266   { "AG_TablePopup *", sizeof (AG_TablePopup *) },
267   { "struct ag_table_popup *", sizeof (struct ag_table_popup *) },
268   { "AG_TablePopup", sizeof (AG_TablePopup) },
269   { "struct ag_table_popup", sizeof (struct ag_table_popup) },
270   { "enum ag_table_selmode", sizeof (enum ag_table_selmode) },
271   { "AG_Table *", sizeof (AG_Table *) },
272   { "struct ag_table *", sizeof (struct ag_table *) },
273   { "AG_Table", sizeof (AG_Table) },
274   { "struct ag_table", sizeof (struct ag_table) },
275   { "AG_Textbox *", sizeof (AG_Textbox *) },
276   { "struct ag_textbox *", sizeof (struct ag_textbox *) },
277   { "AG_Textbox", sizeof (AG_Textbox) },
278   { "struct ag_textbox", sizeof (struct ag_textbox) },
279   { "AG_Titlebar *", sizeof (AG_Titlebar *) },
280   { "struct ag_titlebar *", sizeof (struct ag_titlebar *) },
281   { "AG_Titlebar", sizeof (AG_Titlebar) },
282   { "struct ag_titlebar", sizeof (struct ag_titlebar) },
283   { "AG_TlistItem *", sizeof (AG_TlistItem *) },
284   { "struct ag_tlist_item *", sizeof (struct ag_tlist_item *) },
285   { "AG_TlistItem", sizeof (AG_TlistItem) },
286   { "struct ag_tlist_item", sizeof (struct ag_tlist_item) },
287   { "AG_TlistPopup *", sizeof (AG_TlistPopup *) },
288   { "struct ag_tlist_popup *", sizeof (struct ag_tlist_popup *) },
289   { "AG_TlistPopup", sizeof (AG_TlistPopup) },
290   { "struct ag_tlist_popup", sizeof (struct ag_tlist_popup) },
291   { "AG_Tlist *", sizeof (AG_Tlist *) },
292   { "struct ag_tlist *", sizeof (struct ag_tlist *) },
293   { "AG_Tlist", sizeof (AG_Tlist) },
294   { "struct ag_tlist", sizeof (struct ag_tlist) },
295   { "AG_Toolbar *", sizeof (AG_Toolbar *) },
296   { "struct ag_toolbar *", sizeof (struct ag_toolbar *) },
297   { "AG_Toolbar", sizeof (AG_Toolbar) },
298   { "struct ag_toolbar", sizeof (struct ag_toolbar) },
299   { "enum ag_toolbar_type", sizeof (enum ag_toolbar_type) },
300   { "AG_UCombo *", sizeof (AG_UCombo *) },
301   { "struct ag_ucombo *", sizeof (struct ag_ucombo *) },
302   { "AG_UCombo", sizeof (AG_UCombo) },
303   { "struct ag_ucombo", sizeof (struct ag_ucombo) },
304   { "AG_VBox *", sizeof (AG_VBox *) },
305   { "struct ag_vbox *", sizeof (struct ag_vbox *) },
306   { "AG_VBox", sizeof (AG_VBox) },
307   { "struct ag_vbox", sizeof (struct ag_vbox) },
308   { "AG_Widget *", sizeof (AG_Widget *) },
309   { "struct ag_widget *", sizeof (struct ag_widget *) },
310   { "AG_Widget", sizeof (AG_Widget) },
311   { "struct ag_widget", sizeof (struct ag_widget) },
312   { "enum ag_window_alignment", sizeof (enum ag_window_alignment) },
313   { "enum ag_window_close_action", sizeof (enum ag_window_close_action) },
314   { "AG_Window *", sizeof (AG_Window *) },
315   { "struct ag_window *", sizeof (struct ag_window *) },
316   { "AG_Window", sizeof (AG_Window) },
317   { "struct ag_window", sizeof (struct ag_window) },
318 };
319 const unsigned int types_size = sizeof (types) / sizeof (types[0]);
320 
321 void
find(const char * name)322 find (const char *name)
323 {
324   unsigned int pos;
325   for (pos = 0; pos < types_size; ++pos) {
326     if (strcmp (types[pos].type_name, name) == 0) {
327       printf ("%u\n", types[pos].type_size * 8);
328       return;
329     }
330   }
331   fprintf (stderr, "fatal: unknown C type\n");
332   exit (112);
333 }
334 
335 int
main(int argc,char * argv[])336 main (int argc, char *argv[])
337 {
338   if (argc != 2) exit (111);
339   find (argv[1]);
340   return 0;
341 }
342