5 Method * method_Surface_writeTextf;
7 void (* Surface_writeTextf)(Surface s, int x, int y, const char * format, ...);
9 Class * class_FontResource;
11 Property * property_FontResource_faceName;
12 Property * property_FontResource_size;
13 Property * property_FontResource_bold;
14 Property * property_FontResource_italic;
15 Property * property_FontResource_outlineSize;
16 Property * property_FontResource_outlineFade;
18 void (* FontResource_set_faceName)(FontResource f, constString v);
19 constString (* FontResource_get_faceName)(FontResource f);
21 void (* FontResource_set_size)(FontResource f, float v);
22 float (* FontResource_get_size)(FontResource f);
24 void (* FontResource_set_outlineSize)(FontResource f, float v);
25 float (* FontResource_get_outlineSize)(FontResource f);
27 void (* FontResource_set_outlineFade)(FontResource f, float v);
28 float (* FontResource_get_outlineFade)(FontResource f);
30 void (* FontResource_set_bold)(FontResource f, bool v);
31 bool (* FontResource_get_bold)(FontResource f);
33 void (* FontResource_set_italic)(FontResource f, bool v);
34 bool (* FontResource_get_italic)(FontResource f);
38 int Window_onCreate_vTblID;
39 int Window_onRedraw_vTblID;
41 Property * property_Window_caption;
42 Property * property_Window_size;
43 Property * property_Window_clientSize;
44 Property * property_Window_hasClose;
45 Property * property_Window_hasMinimize;
46 Property * property_Window_hasMaximize;
47 Property * property_Window_borderStyle;
48 Property * property_Window_background;
49 Property * property_Window_foreground;
50 Property * property_Window_parent;
51 Property * property_Window_position;
52 Property * property_Window_font;
53 Property * property_Window_displayDriver;
55 Method * method_Window_modal;
56 Method * method_Window_create;
58 Method * method_Window_onCreate;
59 Method * method_Window_onRedraw;
61 void (* Window_set_borderStyle)(Window w, BorderStyle v);
62 BorderStyle (* Window_get_borderStyle)(Window w);
64 void (* Window_set_size)(Window w, const Size * v);
65 void (* Window_get_size)(Window w, Size * v);
67 void (* Window_set_clientSize)(Window w, const Size * v);
68 void (* Window_get_clientSize)(Window w, Size * v);
70 void (* Window_set_hasClose)(Window w, bool v);
71 bool (* Window_get_hasClose)(Window w);
73 void (* Window_set_hasMaximize)(Window w, bool v);
74 bool (* Window_get_hasMaximize)(Window w);
76 void (* Window_set_hasMinimize)(Window w, bool v);
77 bool (* Window_get_hasMinimize)(Window w);
79 void (* Window_set_parent)(Window w, Window v);
80 Window (* Window_get_parent)(Window w);
82 void (* Window_set_background)(Window w, Color v);
83 Color (* Window_get_background)(Window w);
85 void (* Window_set_foreground)(Window w, Color v);
86 Color (* Window_get_foreground)(Window w);
88 void (* Window_set_position)(Window w, const Point * v);
89 void (* Window_get_position)(Window w, Point * v);
91 void (* Window_set_font)(Window w, Instance v);
92 FontResource (* Window_get_font)(Window w);
94 void (* Window_set_caption)(Window w, constString v);
95 constString (* Window_get_caption)(Window w);
97 void (* Window_set_displayDriver)(Window w, constString v);
98 constString (* Window_get_displayDriver)(Window w);
100 DialogResult (* Window_modal)(Window);
102 bool (* Window_create)(Window);
104 Class * class_Button;
106 Method * method_Button_notifyClicked;
108 int Button_notifyClicked_vTblID;
110 Class * class_ToolButton;
114 Class * class_GuiApplication;
116 Class * class_MessageBox;
118 Property * property_MessageBox_contents;
120 void (* MessageBox_set_contents)(MessageBox m, constString v);
121 constString (* MessageBox_get_contents)(MessageBox m);
123 Module ecere_init(Module fromModule)
125 Module module = Module_load(fromModule, "ecere", publicAccess);
128 // Set up all the class_*, property, method, function pointers ...
129 class_Surface = eC_findClass(module, "Surface");
132 method_Surface_writeTextf = Class_findMethod(class_Surface, "WriteTextf", module);
133 if(method_Surface_writeTextf)
134 Surface_writeTextf = (void *)method_Surface_writeTextf->function;
137 class_FontResource = eC_findClass(module, "FontResource");
138 if(class_FontResource)
140 property_FontResource_faceName = Class_findProperty(class_FontResource, "faceName", module);
141 if(property_FontResource_faceName)
143 FontResource_set_faceName = (void *)property_FontResource_faceName->Set;
144 FontResource_get_faceName = (void *)property_FontResource_faceName->Get;
147 property_FontResource_size = Class_findProperty(class_FontResource, "size", module);
148 if(property_FontResource_size)
150 FontResource_set_size = (void *)property_FontResource_size->Set;
151 FontResource_get_size = (void *)property_FontResource_size->Get;
154 property_FontResource_bold = Class_findProperty(class_FontResource, "bold", module);
155 if(property_FontResource_bold)
157 FontResource_set_bold = (void *)property_FontResource_bold->Set;
158 FontResource_get_bold = (void *)property_FontResource_bold->Get;
161 property_FontResource_italic = Class_findProperty(class_FontResource, "italic", module);
162 if(property_FontResource_italic)
164 FontResource_set_italic = (void *)property_FontResource_italic->Set;
165 FontResource_get_italic = (void *)property_FontResource_italic->Get;
168 property_FontResource_outlineSize = Class_findProperty(class_FontResource, "outlineSize", module);
169 if(property_FontResource_outlineSize)
171 FontResource_set_outlineSize = (void *)property_FontResource_outlineSize->Set;
172 FontResource_get_outlineSize = (void *)property_FontResource_outlineSize->Get;
175 property_FontResource_outlineFade = Class_findProperty(class_FontResource, "outlineFade", module);
176 if(property_FontResource_outlineFade)
178 FontResource_set_outlineFade = (void *)property_FontResource_outlineFade->Set;
179 FontResource_get_outlineFade = (void *)property_FontResource_outlineFade->Get;
183 class_Window = eC_findClass(module, "Window");
186 method_Window_modal = Class_findMethod(class_Window, "Modal", module);
187 if(method_Window_modal)
188 Window_modal = (void *)method_Window_modal->function;
190 method_Window_create = Class_findMethod(class_Window, "Create", module);
191 if(method_Window_create)
192 Window_create = (void *)method_Window_create->function;
194 method_Window_onCreate = Class_findMethod(class_Window, "OnCreate", module);
195 if(method_Window_onCreate)
196 Window_onCreate_vTblID = method_Window_onCreate->vid;
197 method_Window_onRedraw = Class_findMethod(class_Window, "OnRedraw", module);
198 if(method_Window_onRedraw)
199 Window_onRedraw_vTblID = method_Window_onRedraw->vid;
201 property_Window_displayDriver = Class_findProperty(class_Window, "displayDriver", module);
202 if(property_Window_displayDriver)
204 Window_set_displayDriver = (void *)property_Window_displayDriver->Set;
205 Window_get_displayDriver = (void *)property_Window_displayDriver->Get;
208 property_Window_caption = Class_findProperty(class_Window, "caption", module);
209 if(property_Window_caption)
211 Window_set_caption = (void *)property_Window_caption->Set;
212 Window_get_caption = (void *)property_Window_caption->Get;
215 property_Window_size = Class_findProperty(class_Window, "size", module);
216 if(property_Window_size)
218 Window_set_size = (void *)property_Window_size->Set;
219 Window_get_size = (void *)property_Window_size->Get;
222 property_Window_clientSize = Class_findProperty(class_Window, "clientSize", module);
223 if(property_Window_clientSize)
225 Window_set_clientSize = (void *)property_Window_clientSize->Set;
226 Window_get_clientSize = (void *)property_Window_clientSize->Get;
229 property_Window_borderStyle = Class_findProperty(class_Window, "borderStyle", module);
230 if(property_Window_borderStyle)
232 Window_set_borderStyle = (void *)property_Window_borderStyle->Set;
233 Window_get_borderStyle = (void *)property_Window_borderStyle->Get;
236 property_Window_background = Class_findProperty(class_Window, "background", module);
237 if(property_Window_background)
239 Window_set_background = (void *)property_Window_background->Set;
240 Window_get_background = (void *)property_Window_background->Get;
243 property_Window_foreground = Class_findProperty(class_Window, "foreground", module);
244 if(property_Window_foreground)
246 Window_set_foreground = (void *)property_Window_foreground->Set;
247 Window_get_foreground = (void *)property_Window_foreground->Get;
250 property_Window_hasClose = Class_findProperty(class_Window, "hasClose", module);
251 if(property_Window_hasClose)
253 Window_set_hasClose = (void *)property_Window_hasClose->Set;
254 Window_get_hasClose = (void *)property_Window_hasClose->Get;
257 property_Window_hasMinimize = Class_findProperty(class_Window, "hasMinimize", module);
258 if(property_Window_hasMinimize)
260 Window_set_hasMinimize = (void *)property_Window_hasMinimize->Set;
261 Window_get_hasMinimize = (void *)property_Window_hasMinimize->Get;
264 property_Window_hasMaximize = Class_findProperty(class_Window, "hasMaximize", module);
265 if(property_Window_hasMaximize)
267 Window_set_hasMaximize = (void *)property_Window_hasMaximize->Set;
268 Window_get_hasMaximize = (void *)property_Window_hasMaximize->Get;
271 property_Window_parent = Class_findProperty(class_Window, "parent", module);
272 if(property_Window_parent)
274 Window_set_parent = (void *)property_Window_parent->Set;
275 Window_get_parent = (void *)property_Window_parent->Get;
278 property_Window_position = Class_findProperty(class_Window, "position", module);
279 if(property_Window_position)
281 Window_set_position = (void *)property_Window_position->Set;
282 Window_get_position = (void *)property_Window_position->Get;
285 property_Window_font = Class_findProperty(class_Window, "font", module);
286 if(property_Window_font)
288 Window_set_font = (void *)property_Window_font->Set;
289 Window_get_font = (void *)property_Window_font->Get;
293 class_Label = eC_findClass(module, "Label");
295 class_Button = eC_findClass(module, "Button");
298 method_Button_notifyClicked = Class_findMethod(class_Button, "NotifyClicked", module);
299 if(method_Button_notifyClicked)
300 Button_notifyClicked_vTblID = method_Button_notifyClicked->vid;
303 class_MessageBox = eC_findClass(module, "MessageBox");
306 property_MessageBox_contents = Class_findProperty(class_MessageBox, "contents", module);
307 if(property_MessageBox_contents)
309 MessageBox_set_contents = (void *)property_MessageBox_contents->Set;
310 MessageBox_get_contents = (void *)property_MessageBox_contents->Get;
314 class_GuiApplication = eC_findClass(module, "GuiApplication");