5 Method * method_Surface_writeTextf;
7 void (* Surface_writeTextf)(Surface s, int x, int y, const char * format, ...);
9 Class * class_BitmapResource;
11 Property * property_BitmapResource_fileName;
13 void (* BitmapResource_set_fileName)(BitmapResource f, constString v);
14 constString (* BitmapResource_get_fileName)(BitmapResource f);
16 Class * class_FontResource;
18 Property * property_FontResource_faceName;
19 Property * property_FontResource_size;
20 Property * property_FontResource_bold;
21 Property * property_FontResource_italic;
22 Property * property_FontResource_outlineSize;
23 Property * property_FontResource_outlineFade;
25 void (* FontResource_set_faceName)(FontResource f, constString v);
26 constString (* FontResource_get_faceName)(FontResource f);
28 void (* FontResource_set_size)(FontResource f, float v);
29 float (* FontResource_get_size)(FontResource f);
31 void (* FontResource_set_outlineSize)(FontResource f, float v);
32 float (* FontResource_get_outlineSize)(FontResource f);
34 void (* FontResource_set_outlineFade)(FontResource f, float v);
35 float (* FontResource_get_outlineFade)(FontResource f);
37 void (* FontResource_set_bold)(FontResource f, bool v);
38 bool (* FontResource_get_bold)(FontResource f);
40 void (* FontResource_set_italic)(FontResource f, bool v);
41 bool (* FontResource_get_italic)(FontResource f);
45 int Window_onCreate_vTblID;
46 int Window_onRedraw_vTblID;
48 Property * property_Window_caption;
49 Property * property_Window_size;
50 Property * property_Window_clientSize;
51 Property * property_Window_hasClose;
52 Property * property_Window_hasMinimize;
53 Property * property_Window_hasMaximize;
54 Property * property_Window_borderStyle;
55 Property * property_Window_background;
56 Property * property_Window_foreground;
57 Property * property_Window_parent;
58 Property * property_Window_position;
59 Property * property_Window_anchor;
60 Property * property_Window_font;
61 Property * property_Window_displayDriver;
63 Method * method_Window_modal;
64 Method * method_Window_create;
66 Method * method_Window_onCreate;
67 Method * method_Window_onRedraw;
69 void (* Window_set_borderStyle)(Window w, BorderStyle v);
70 BorderStyle (* Window_get_borderStyle)(Window w);
72 void (* Window_set_size)(Window w, const Size * v);
73 void (* Window_get_size)(Window w, Size * v);
75 void (* Window_set_clientSize)(Window w, const Size * v);
76 void (* Window_get_clientSize)(Window w, Size * v);
78 void (* Window_set_hasClose)(Window w, bool v);
79 bool (* Window_get_hasClose)(Window w);
81 void (* Window_set_hasMaximize)(Window w, bool v);
82 bool (* Window_get_hasMaximize)(Window w);
84 void (* Window_set_hasMinimize)(Window w, bool v);
85 bool (* Window_get_hasMinimize)(Window w);
87 void (* Window_set_parent)(Window w, Window v);
88 Window (* Window_get_parent)(Window w);
90 void (* Window_set_background)(Window w, Color v);
91 Color (* Window_get_background)(Window w);
93 void (* Window_set_foreground)(Window w, Color v);
94 Color (* Window_get_foreground)(Window w);
96 void (* Window_set_position)(Window w, const Point * v);
97 void (* Window_get_position)(Window w, Point * v);
99 void (* Window_set_anchor)(Window w, const Anchor * v);
100 void (* Window_get_anchor)(Window w, Anchor * v);
102 void (* Window_set_font)(Window w, Instance v);
103 FontResource (* Window_get_font)(Window w);
105 void (* Window_set_caption)(Window w, constString v);
106 constString (* Window_get_caption)(Window w);
108 void (* Window_set_displayDriver)(Window w, constString v);
109 constString (* Window_get_displayDriver)(Window w);
111 DialogResult (* Window_modal)(Window);
113 bool (* Window_create)(Window);
115 Class * class_Button;
117 Method * method_Button_notifyClicked;
119 int Button_notifyClicked_vTblID;
121 Class * class_ToolButton;
125 Class * class_Picture;
127 Property * property_Picture_image;
129 void (* Picture_set_image)(Picture p, BitmapResource v);
130 constString (* Picture_get_image)(Picture p);
132 Class * class_GuiApplication;
134 Class * class_MessageBox;
136 Property * property_MessageBox_contents;
138 void (* MessageBox_set_contents)(MessageBox m, constString v);
139 constString (* MessageBox_get_contents)(MessageBox m);
141 Module ecere_init(Module fromModule)
143 Module module = Module_load(fromModule, "ecere", publicAccess);
146 // Set up all the class_*, property, method, function pointers ...
147 class_Surface = eC_findClass(module, "Surface");
150 method_Surface_writeTextf = Class_findMethod(class_Surface, "WriteTextf", module);
151 if(method_Surface_writeTextf)
152 Surface_writeTextf = (void *)method_Surface_writeTextf->function;
155 class_FontResource = eC_findClass(module, "FontResource");
156 if(class_FontResource)
158 property_FontResource_faceName = Class_findProperty(class_FontResource, "faceName", module);
159 if(property_FontResource_faceName)
161 FontResource_set_faceName = (void *)property_FontResource_faceName->Set;
162 FontResource_get_faceName = (void *)property_FontResource_faceName->Get;
165 property_FontResource_size = Class_findProperty(class_FontResource, "size", module);
166 if(property_FontResource_size)
168 FontResource_set_size = (void *)property_FontResource_size->Set;
169 FontResource_get_size = (void *)property_FontResource_size->Get;
172 property_FontResource_bold = Class_findProperty(class_FontResource, "bold", module);
173 if(property_FontResource_bold)
175 FontResource_set_bold = (void *)property_FontResource_bold->Set;
176 FontResource_get_bold = (void *)property_FontResource_bold->Get;
179 property_FontResource_italic = Class_findProperty(class_FontResource, "italic", module);
180 if(property_FontResource_italic)
182 FontResource_set_italic = (void *)property_FontResource_italic->Set;
183 FontResource_get_italic = (void *)property_FontResource_italic->Get;
186 property_FontResource_outlineSize = Class_findProperty(class_FontResource, "outlineSize", module);
187 if(property_FontResource_outlineSize)
189 FontResource_set_outlineSize = (void *)property_FontResource_outlineSize->Set;
190 FontResource_get_outlineSize = (void *)property_FontResource_outlineSize->Get;
193 property_FontResource_outlineFade = Class_findProperty(class_FontResource, "outlineFade", module);
194 if(property_FontResource_outlineFade)
196 FontResource_set_outlineFade = (void *)property_FontResource_outlineFade->Set;
197 FontResource_get_outlineFade = (void *)property_FontResource_outlineFade->Get;
201 class_BitmapResource = eC_findClass(module, "BitmapResource");
202 if(class_BitmapResource)
204 property_BitmapResource_fileName = Class_findProperty(class_BitmapResource, "fileName", module);
205 if(property_BitmapResource_fileName)
207 BitmapResource_set_fileName = (void *)property_BitmapResource_fileName->Set;
208 BitmapResource_get_fileName = (void *)property_BitmapResource_fileName->Get;
212 class_Window = eC_findClass(module, "Window");
215 method_Window_modal = Class_findMethod(class_Window, "Modal", module);
216 if(method_Window_modal)
217 Window_modal = (void *)method_Window_modal->function;
219 method_Window_create = Class_findMethod(class_Window, "Create", module);
220 if(method_Window_create)
221 Window_create = (void *)method_Window_create->function;
223 method_Window_onCreate = Class_findMethod(class_Window, "OnCreate", module);
224 if(method_Window_onCreate)
225 Window_onCreate_vTblID = method_Window_onCreate->vid;
226 method_Window_onRedraw = Class_findMethod(class_Window, "OnRedraw", module);
227 if(method_Window_onRedraw)
228 Window_onRedraw_vTblID = method_Window_onRedraw->vid;
230 property_Window_displayDriver = Class_findProperty(class_Window, "displayDriver", module);
231 if(property_Window_displayDriver)
233 Window_set_displayDriver = (void *)property_Window_displayDriver->Set;
234 Window_get_displayDriver = (void *)property_Window_displayDriver->Get;
237 property_Window_caption = Class_findProperty(class_Window, "caption", module);
238 if(property_Window_caption)
240 Window_set_caption = (void *)property_Window_caption->Set;
241 Window_get_caption = (void *)property_Window_caption->Get;
244 property_Window_size = Class_findProperty(class_Window, "size", module);
245 if(property_Window_size)
247 Window_set_size = (void *)property_Window_size->Set;
248 Window_get_size = (void *)property_Window_size->Get;
251 property_Window_clientSize = Class_findProperty(class_Window, "clientSize", module);
252 if(property_Window_clientSize)
254 Window_set_clientSize = (void *)property_Window_clientSize->Set;
255 Window_get_clientSize = (void *)property_Window_clientSize->Get;
258 property_Window_borderStyle = Class_findProperty(class_Window, "borderStyle", module);
259 if(property_Window_borderStyle)
261 Window_set_borderStyle = (void *)property_Window_borderStyle->Set;
262 Window_get_borderStyle = (void *)property_Window_borderStyle->Get;
265 property_Window_background = Class_findProperty(class_Window, "background", module);
266 if(property_Window_background)
268 Window_set_background = (void *)property_Window_background->Set;
269 Window_get_background = (void *)property_Window_background->Get;
272 property_Window_foreground = Class_findProperty(class_Window, "foreground", module);
273 if(property_Window_foreground)
275 Window_set_foreground = (void *)property_Window_foreground->Set;
276 Window_get_foreground = (void *)property_Window_foreground->Get;
279 property_Window_hasClose = Class_findProperty(class_Window, "hasClose", module);
280 if(property_Window_hasClose)
282 Window_set_hasClose = (void *)property_Window_hasClose->Set;
283 Window_get_hasClose = (void *)property_Window_hasClose->Get;
286 property_Window_hasMinimize = Class_findProperty(class_Window, "hasMinimize", module);
287 if(property_Window_hasMinimize)
289 Window_set_hasMinimize = (void *)property_Window_hasMinimize->Set;
290 Window_get_hasMinimize = (void *)property_Window_hasMinimize->Get;
293 property_Window_hasMaximize = Class_findProperty(class_Window, "hasMaximize", module);
294 if(property_Window_hasMaximize)
296 Window_set_hasMaximize = (void *)property_Window_hasMaximize->Set;
297 Window_get_hasMaximize = (void *)property_Window_hasMaximize->Get;
300 property_Window_parent = Class_findProperty(class_Window, "parent", module);
301 if(property_Window_parent)
303 Window_set_parent = (void *)property_Window_parent->Set;
304 Window_get_parent = (void *)property_Window_parent->Get;
307 property_Window_position = Class_findProperty(class_Window, "position", module);
308 if(property_Window_position)
310 Window_set_position = (void *)property_Window_position->Set;
311 Window_get_position = (void *)property_Window_position->Get;
314 property_Window_anchor = Class_findProperty(class_Window, "anchor", module);
315 if(property_Window_anchor)
317 Window_set_anchor = (void *)property_Window_anchor->Set;
318 Window_get_anchor = (void *)property_Window_anchor->Get;
321 property_Window_font = Class_findProperty(class_Window, "font", module);
322 if(property_Window_font)
324 Window_set_font = (void *)property_Window_font->Set;
325 Window_get_font = (void *)property_Window_font->Get;
329 class_Label = eC_findClass(module, "Label");
331 class_Button = eC_findClass(module, "Button");
334 method_Button_notifyClicked = Class_findMethod(class_Button, "NotifyClicked", module);
335 if(method_Button_notifyClicked)
336 Button_notifyClicked_vTblID = method_Button_notifyClicked->vid;
339 class_Picture = eC_findClass(module, "Picture");
342 property_Picture_image = Class_findProperty(class_Picture, "image", module);
343 if(property_Picture_image)
345 Picture_set_image = (void *)property_Picture_image->Set;
346 Picture_get_image = (void *)property_Picture_image->Get;
350 class_MessageBox = eC_findClass(module, "MessageBox");
353 property_MessageBox_contents = Class_findProperty(class_MessageBox, "contents", module);
354 if(property_MessageBox_contents)
356 MessageBox_set_contents = (void *)property_MessageBox_contents->Set;
357 MessageBox_get_contents = (void *)property_MessageBox_contents->Get;
361 class_GuiApplication = eC_findClass(module, "GuiApplication");