1 typedef struct Class Class;
3 typedef uint32_t uint32;
4 typedef uint32_t Color;
5 typedef uint32 BorderBits;
14 sizableThin = 0x00000027,
17 sizableDeep = 0x0000000F,
18 sizableBevel = 0x00000017,
19 fixedDeep = 0x0000000B,
20 fixedBevel = 0x00000013,
21 deepContour = 0x00000009
23 typedef BorderBits BorderStyle;
25 struct class_members_Instance
32 typedef struct class_members_Instance * Instance;
34 typedef Instance Module;
35 typedef Module Application;
45 typedef enum AccessMode AccessMode;
56 typedef enum ClassType ClassType;
58 typedef char * String;
59 typedef const char * constString;
70 bool (*Constructor)(void *);
71 void (*Destructor)(void *);
80 OldList membersAndProperties;
81 BinaryTree classProperties;
88 //NameSpace * nameSpace;
89 const char *dataTypeString;
93 //void (*Initialize)();
95 //OldList selfWatchers;
96 const char *designerClass;
98 const char *defaultProperty;
105 short structAlignment;
106 short pointerAlignment;
107 int destructionWatchOffset;
109 //OldList delayedCPValues;
110 //AccessMode inheritanceAccess;
111 const char *fullName;
113 /*OldList conversions;
114 OldList templateParams;
115 ClassTemplateArgument * templateArgs;*/
116 Class * templateClass;
117 //OldList templatized;
119 bool isInstanceClass;
120 bool byValueSystemClass;
121 void * bindingsClass;
124 constString getTranslatedString(constString name, constString string, constString stringAndContext);
126 Class * eC_registerClass(ClassType type, const char *name, const char *baseName, int size, int sizeClass,
127 bool (*Constructor)(void *), void (*Destructor)(void *), Module module, AccessMode declMode, AccessMode inheritanceAccess);
129 Instance Instance_new(Class * _class);
130 Instance Instance_newEx(Class * _class, bool bindingsAlloc);
131 void Instance_setMethod(Instance instance, constString name, void *function);
133 void Instance_evolve(Instance *instancePtr, Class * _class);
135 Application eC_init(bool loadEcere, bool guiApp, int argc, char * argv[]);
136 Module ecere_init(Module fromModule);
138 void Application_main(Application app);
140 extern void (*PrintLn)(Class * class_object, const void * object, ...);
142 extern Class * class_int;
143 // extern Class * class_float;
144 extern Class * class_double;
145 extern Class * class_String;
146 extern Class * class_Window;
147 extern Class * class_Button;
148 extern Class * class_GuiApplication;
150 extern Class * class_FontResource;
155 typedef struct Size Size;
156 struct Size { int w, h; };
158 typedef struct Point Point;
159 struct Point { int x, y; };
161 typedef Instance Surface;
163 extern void (* Surface_writeTextf)(Surface s, int x, int y, const char * format, ...);
165 typedef Instance FontResource;
167 extern void (* FontResource_set_faceName)(FontResource f, constString v);
168 extern constString (* FontResource_get_faceName)(FontResource f);
170 extern void (* FontResource_set_size)(FontResource f, float v);
171 extern float (* FontResource_get_size)(FontResource f);
173 extern void (* FontResource_set_bold)(FontResource f, bool v);
174 extern bool (* FontResource_get_bold)(FontResource f);
176 extern void (* FontResource_set_italic)(FontResource f, bool v);
177 extern bool (* FontResource_get_italic)(FontResource f);
179 extern void (* FontResource_set_outlineSize)(FontResource f, float v);
180 extern float (* FontResource_get_outlineSize)(FontResource f);
182 extern void (* FontResource_set_outlineFade)(FontResource f, float v);
183 extern float (* FontResource_get_outlineFade)(FontResource f);
185 typedef Instance Window;
186 typedef Window Button;
187 typedef Window MessageBox;
188 typedef int64_t DialogResult;
189 typedef uint32 Modifiers;
191 extern DialogResult (* Window_modal)(Window);
192 extern bool (* Window_create)(Window);
194 extern void (* Window_set_parent)(Window w, Window v);
195 extern Window (* Window_get_parent)(Window w);
197 extern void (* Window_set_displayDriver)(Window w, constString v);
198 extern constString (* Window_get_displayDriver)(Window w);
200 extern void (* Window_set_size)(Window w, const Size * v);
201 extern void (* Window_get_size)(Window w, Size * v);
203 extern void (* Window_set_font)(Window w, const FontResource font);
204 extern FontResource (* Window_get_font)(Window w);
206 extern void (* Window_set_position)(Window w, const Point * v);
207 extern void (* Window_get_position)(Window w, Point * v);
209 extern void (* Window_set_hasClose)(Window w, bool hasClose);
210 extern bool (* Window_get_hasClose)(Window w);
212 extern void (* Window_set_hasMaximize)(Window w, bool hasMaximize);
213 extern bool (* Window_get_hasMaximize)(Window w);
215 extern void (* Window_set_hasMinimize)(Window w, bool hasMinimize);
216 extern bool (* Window_get_hasMinimize)(Window w);
218 extern void (* Window_set_caption)(Window w, constString caption);
219 extern constString (* Window_get_caption)(Window w);
221 extern void (* Window_set_borderStyle)(Window w, BorderStyle borderStyle);
222 extern BorderStyle (* Window_get_borderStyle)(Window w);
224 extern void (* Window_set_background)(Window w, Color background);
225 extern Color (* Window_get_background)(Window w);
227 extern void (* Window_set_foreground)(Window w, Color v);
228 extern Color (* Window_get_foreground)(Window w);
230 extern void (* MessageBox_set_contents)(MessageBox m, constString contents);
231 extern constString (* MessageBox_get_contents)(MessageBox m);
233 #define COLOR_r_MASK 0x00FF0000
234 #define COLOR_r_SHIFT 16
235 #define COLOR_g_MASK 0x0000FF00
236 #define COLOR_g_SHIFT 8
237 #define COLOR_b_MASK 0x000000FF
238 #define COLOR_b_SHIFT 0
240 #define BORDERBITS_contour_MASK 0x00000001
241 #define BORDERBITS_contour_SHIFT 0
242 #define BORDERBITS_fixed_MASK 0x00000002
243 #define BORDERBITS_fixed_SHIFT 1
244 #define BORDERBITS_sizable_MASK 0x00000004
245 #define BORDERBITS_sizable_SHIFT 2
246 #define BORDERBITS_deep_MASK 0x00000008
247 #define BORDERBITS_deep_SHIFT 3
248 #define BORDERBITS_bevel_MASK 0x00000010
249 #define BORDERBITS_bevel_SHIFT 4
250 #define BORDERBITS_thin_MASK 0x00000020
251 #define BORDERBITS_thin_SHIFT 5