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;
16 void (* FontResource_set_faceName)(FontResource f, constString v);
17 constString (* FontResource_get_faceName)(FontResource f);
19 void (* FontResource_set_size)(FontResource f, float v);
20 float (* FontResource_get_size)(FontResource f);
22 void (* FontResource_set_bold)(FontResource f, bool v);
23 bool (* FontResource_get_bold)(FontResource f);
25 void (* FontResource_set_italic)(FontResource f, bool v);
26 bool (* FontResource_get_italic)(FontResource f);
30 int Window_onCreate_vTblID;
31 int Window_onRedraw_vTblID;
33 Property * property_Window_caption;
34 Property * property_Window_size;
35 Property * property_Window_clientSize;
36 Property * property_Window_hasClose;
37 Property * property_Window_hasMinimize;
38 Property * property_Window_hasMaximize;
39 Property * property_Window_borderStyle;
40 Property * property_Window_background;
41 Property * property_Window_parent;
42 Property * property_Window_position;
43 Property * property_Window_font;
45 Method * method_Window_modal;
46 Method * method_Window_create;
48 Method * method_Window_onCreate;
49 Method * method_Window_onRedraw;
51 void (* Window_set_borderStyle)(Window w, BorderStyle v);
52 BorderStyle (* Window_get_borderStyle)(Window w);
54 void (* Window_set_size)(Window w, const Size * v);
55 void (* Window_get_size)(Window w, Size * v);
57 void (* Window_set_clientSize)(Window w, const Size * v);
58 void (* Window_get_clientSize)(Window w, Size * v);
60 void (* Window_set_hasClose)(Window w, bool v);
61 bool (* Window_get_hasClose)(Window w);
63 void (* Window_set_hasMaximize)(Window w, bool v);
64 bool (* Window_get_hasMaximize)(Window w);
66 void (* Window_set_hasMinimize)(Window w, bool v);
67 bool (* Window_get_hasMinimize)(Window w);
69 void (* Window_set_parent)(Window w, Window v);
70 Window (* Window_get_parent)(Window w);
72 void (* Window_set_background)(Window w, Color v);
73 Color (* Window_get_background)(Window w);
75 void (* Window_set_position)(Window w, const Point * v);
76 void (* Window_get_position)(Window w, Point * v);
78 void (* Window_set_font)(Window w, Instance v);
79 FontResource (* Window_get_font)(Window w);
81 void (* Window_set_caption)(Window w, constString v);
82 constString (* Window_get_caption)(Window w);
84 DialogResult (* Window_modal)(Window);
86 bool (* Window_create)(Window);
90 Method * method_Button_notifyClicked;
92 int Button_notifyClicked_vTblID;
94 Class * class_ToolButton;
98 Class * class_GuiApplication;
100 Class * class_MessageBox;
102 Property * property_MessageBox_contents;
104 void (* MessageBox_set_contents)(MessageBox m, constString v);
105 constString (* MessageBox_get_contents)(MessageBox m);
107 Module ecere_init(Module fromModule)
109 Module module = Module_load(fromModule, "ecere", publicAccess);
112 // Set up all the class_*, property, method, function pointers ...
113 class_Surface = eC_findClass(module, "Surface");
116 method_Surface_writeTextf = Class_findMethod(class_Surface, "WriteTextf", module);
117 if(method_Surface_writeTextf)
118 Surface_writeTextf = (void *)method_Surface_writeTextf->function;
121 class_FontResource = eC_findClass(module, "FontResource");
122 if(class_FontResource)
124 property_FontResource_faceName = Class_findProperty(class_FontResource, "faceName", module);
125 if(property_FontResource_faceName)
127 FontResource_set_faceName = (void *)property_FontResource_faceName->Set;
128 FontResource_get_faceName = (void *)property_FontResource_faceName->Get;
131 property_FontResource_size = Class_findProperty(class_FontResource, "size", module);
132 if(property_FontResource_size)
134 FontResource_set_size = (void *)property_FontResource_size->Set;
135 FontResource_get_size = (void *)property_FontResource_size->Get;
138 property_FontResource_bold = Class_findProperty(class_FontResource, "bold", module);
139 if(property_FontResource_bold)
141 FontResource_set_bold = (void *)property_FontResource_bold->Set;
142 FontResource_get_bold = (void *)property_FontResource_bold->Get;
145 property_FontResource_italic = Class_findProperty(class_FontResource, "italic", module);
146 if(property_FontResource_italic)
148 FontResource_set_italic = (void *)property_FontResource_italic->Set;
149 FontResource_get_italic = (void *)property_FontResource_italic->Get;
153 class_Window = eC_findClass(module, "Window");
156 method_Window_modal = Class_findMethod(class_Window, "Modal", module);
157 if(method_Window_modal)
158 Window_modal = (void *)method_Window_modal->function;
160 method_Window_create = Class_findMethod(class_Window, "Create", module);
161 if(method_Window_create)
162 Window_create = (void *)method_Window_create->function;
164 method_Window_onCreate = Class_findMethod(class_Window, "OnCreate", module);
165 if(method_Window_onCreate)
166 Window_onCreate_vTblID = method_Window_onCreate->vid;
167 method_Window_onRedraw = Class_findMethod(class_Window, "OnRedraw", module);
168 if(method_Window_onRedraw)
169 Window_onRedraw_vTblID = method_Window_onRedraw->vid;
171 property_Window_caption = Class_findProperty(class_Window, "caption", module);
172 if(property_Window_caption)
174 Window_set_caption = (void *)property_Window_caption->Set;
175 Window_get_caption = (void *)property_Window_caption->Get;
178 property_Window_size = Class_findProperty(class_Window, "size", module);
179 if(property_Window_size)
181 Window_set_size = (void *)property_Window_size->Set;
182 Window_get_size = (void *)property_Window_size->Get;
185 property_Window_clientSize = Class_findProperty(class_Window, "clientSize", module);
186 if(property_Window_clientSize)
188 Window_set_clientSize = (void *)property_Window_clientSize->Set;
189 Window_get_clientSize = (void *)property_Window_clientSize->Get;
192 property_Window_borderStyle = Class_findProperty(class_Window, "borderStyle", module);
193 if(property_Window_borderStyle)
195 Window_set_borderStyle = (void *)property_Window_borderStyle->Set;
196 Window_get_borderStyle = (void *)property_Window_borderStyle->Get;
199 property_Window_background = Class_findProperty(class_Window, "background", module);
200 if(property_Window_background)
202 Window_set_background = (void *)property_Window_background->Set;
203 Window_get_background = (void *)property_Window_background->Get;
206 property_Window_hasClose = Class_findProperty(class_Window, "hasClose", module);
207 if(property_Window_hasClose)
209 Window_set_hasClose = (void *)property_Window_hasClose->Set;
210 Window_get_hasClose = (void *)property_Window_hasClose->Get;
213 property_Window_hasMinimize = Class_findProperty(class_Window, "hasMinimize", module);
214 if(property_Window_hasMinimize)
216 Window_set_hasMinimize = (void *)property_Window_hasMinimize->Set;
217 Window_get_hasMinimize = (void *)property_Window_hasMinimize->Get;
220 property_Window_hasMaximize = Class_findProperty(class_Window, "hasMaximize", module);
221 if(property_Window_hasMaximize)
223 Window_set_hasMaximize = (void *)property_Window_hasMaximize->Set;
224 Window_get_hasMaximize = (void *)property_Window_hasMaximize->Get;
227 property_Window_parent = Class_findProperty(class_Window, "parent", module);
228 if(property_Window_parent)
230 Window_set_parent = (void *)property_Window_parent->Set;
231 Window_get_parent = (void *)property_Window_parent->Get;
234 property_Window_position = Class_findProperty(class_Window, "position", module);
235 if(property_Window_position)
237 Window_set_position = (void *)property_Window_position->Set;
238 Window_get_position = (void *)property_Window_position->Get;
241 property_Window_font = Class_findProperty(class_Window, "font", module);
242 if(property_Window_font)
244 Window_set_font = (void *)property_Window_font->Set;
245 Window_get_font = (void *)property_Window_font->Get;
249 class_Label = eC_findClass(module, "Label");
251 class_Button = eC_findClass(module, "Button");
254 method_Button_notifyClicked = Class_findMethod(class_Button, "NotifyClicked", module);
255 if(method_Button_notifyClicked)
256 Button_notifyClicked_vTblID = method_Button_notifyClicked->vid;
259 class_MessageBox = eC_findClass(module, "MessageBox");
262 property_MessageBox_contents = Class_findProperty(class_MessageBox, "contents", module);
263 if(property_MessageBox_contents)
265 MessageBox_set_contents = (void *)property_MessageBox_contents->Set;
266 MessageBox_get_contents = (void *)property_MessageBox_contents->Get;
270 class_GuiApplication = eC_findClass(module, "GuiApplication");