bindings/c;python: Added caption properties; Window::Create(); background color
[sdk] / bindings / python / cffi-ecere.h
1 typedef struct class_members_Instance * Instance;
2 typedef Instance Module;
3 typedef Module Application;
4 typedef struct Class Class;
5 typedef uint32_t bool;
6 typedef uint32_t Color;
7
8 typedef char * String;
9 typedef const char * constString;
10
11 //struct Class { ...; };
12
13 Instance Instance_new(Class * _class);
14 Instance Instance_newEx(Class * _class, bool bindingsAlloc);
15
16 void Instance_evolve(Instance *instancePtr, Class * _class);
17
18 Application eC_init(bool guiApp, int argc, char * argv[]);
19 Module ecere_init(Module fromModule);
20
21 void Application_main(Application app);
22
23 extern void (*PrintLn)(Class * class_object, const void * object, ...);
24
25 extern Class * class_String;
26 extern Class * class_Window;
27 extern Class * class_GuiApplication;
28
29 #define false 0
30 #define true 1
31
32 typedef struct Size Size;
33 struct Size { int w, h; };
34
35 typedef Instance FontResource;
36
37 typedef Instance Window;
38 typedef int64_t DialogResult;
39
40 extern DialogResult (* Window_modal)(Window);
41 extern bool (* Window_create)(Window);
42 extern void (* FontResource_set_size)(FontResource f, float v);
43
44 extern void (* Window_set_size)(Window w, const Size * v);
45
46 extern void (* Window_set_hasClose)(Window w, bool hasClose);
47 extern bool (* Window_get_hasClose)(Window w);
48
49 extern void (* Window_set_caption)(Window w, constString caption);
50 extern constString (* Window_get_caption)(Window w);
51
52 extern void (* Window_set_background)(Window w, Color background);
53 extern Color (* Window_get_background)(Window w);
54
55 #define COLOR_r_MASK       0x00FF0000
56 #define COLOR_r_SHIFT      16
57 #define COLOR_g_MASK       0x0000FF00
58 #define COLOR_g_SHIFT      8
59 #define COLOR_b_MASK       0x000000FF
60 #define COLOR_b_SHIFT      0