de535a33e3cdd3e561ed809635c86cf5280f6aaa
[profile/ivi/ecore.git] / src / lib / ecore_wince / Ecore_WinCE.h
1 #ifndef __ECORE_WINCE_H__
2 #define __ECORE_WINCE_H__
3
4
5 #ifdef EAPI
6 # undef EAPI
7 #endif
8
9 #ifdef _WINCE
10 # ifdef EFL_ECORE_WINCE_BUILD
11 #  ifdef DLL_EXPORT
12 #   define EAPI __declspec(dllexport)
13 #  else
14 #   define EAPI
15 #  endif /* ! DLL_EXPORT */
16 # else
17 #  define EAPI __declspec(dllimport)
18 # endif /* ! EFL_ECORE_WINCE_BUILD */
19 #else
20 # ifdef __GNUC__
21 #  if __GNUC__ >= 4
22 #   define EAPI __attribute__ ((visibility("default")))
23 #  else
24 #   define EAPI
25 #  endif
26 # else
27 #  define EAPI
28 # endif
29 #endif /* ! _WINCE */
30
31 #ifdef __cplusplus
32 extern "C" {
33 #endif
34
35
36 #ifndef _ECORE_EVAS_H
37 typedef void Ecore_WinCE_Window;
38 #endif
39
40
41 /* Events */
42
43 typedef struct _Ecore_WinCE_Event_Mouse_In              Ecore_WinCE_Event_Mouse_In;
44 typedef struct _Ecore_WinCE_Event_Mouse_Out             Ecore_WinCE_Event_Mouse_Out;
45 typedef struct _Ecore_WinCE_Event_Window_Focus_In       Ecore_WinCE_Event_Window_Focus_In;
46 typedef struct _Ecore_WinCE_Event_Window_Focus_Out      Ecore_WinCE_Event_Window_Focus_Out;
47 typedef struct _Ecore_WinCE_Event_Window_Damage         Ecore_WinCE_Event_Window_Damage;
48 typedef struct _Ecore_WinCE_Event_Window_Create         Ecore_WinCE_Event_Window_Create;
49 typedef struct _Ecore_WinCE_Event_Window_Destroy        Ecore_WinCE_Event_Window_Destroy;
50 typedef struct _Ecore_WinCE_Event_Window_Hide           Ecore_WinCE_Event_Window_Hide;
51 typedef struct _Ecore_WinCE_Event_Window_Show           Ecore_WinCE_Event_Window_Show;
52 typedef struct _Ecore_WinCE_Event_Window_Delete_Request Ecore_WinCE_Event_Window_Delete_Request;
53
54 struct _Ecore_WinCE_Event_Mouse_In
55 {
56    Ecore_WinCE_Window *window;
57    int                 x;
58    int                 y;
59    long                time;
60 };
61
62 struct _Ecore_WinCE_Event_Mouse_Out
63 {
64    Ecore_WinCE_Window *window;
65    int                 x;
66    int                 y;
67    long                time;
68 };
69
70 struct _Ecore_WinCE_Event_Window_Focus_In
71 {
72    Ecore_WinCE_Window *window;
73    long                time;
74 };
75
76 struct _Ecore_WinCE_Event_Window_Focus_Out
77 {
78    Ecore_WinCE_Window *window;
79    long                time;
80 };
81
82 struct _Ecore_WinCE_Event_Window_Damage
83 {
84    Ecore_WinCE_Window *window;
85    int                 x;
86    int                 y;
87    int                 width;
88    int                 height;
89    long                time;
90 };
91
92 struct _Ecore_WinCE_Event_Window_Create
93 {
94    Ecore_WinCE_Window *window;
95    long                time;
96 };
97
98 struct _Ecore_WinCE_Event_Window_Destroy
99 {
100    Ecore_WinCE_Window *window;
101    long                time;
102 };
103
104 struct _Ecore_WinCE_Event_Window_Hide
105 {
106    Ecore_WinCE_Window *window;
107    long                time;
108 };
109
110 struct _Ecore_WinCE_Event_Window_Show
111 {
112    Ecore_WinCE_Window *window;
113    long                time;
114 };
115
116 struct _Ecore_WinCE_Event_Window_Delete_Request
117 {
118    Ecore_WinCE_Window *window;
119    long                time;
120 };
121
122
123 EAPI extern int ECORE_WINCE_EVENT_MOUSE_IN;
124 EAPI extern int ECORE_WINCE_EVENT_MOUSE_OUT;
125 EAPI extern int ECORE_WINCE_EVENT_WINDOW_FOCUS_IN;
126 EAPI extern int ECORE_WINCE_EVENT_WINDOW_FOCUS_OUT;
127 EAPI extern int ECORE_WINCE_EVENT_WINDOW_DAMAGE;
128 EAPI extern int ECORE_WINCE_EVENT_WINDOW_CREATE;
129 EAPI extern int ECORE_WINCE_EVENT_WINDOW_DESTROY;
130 EAPI extern int ECORE_WINCE_EVENT_WINDOW_HIDE;
131 EAPI extern int ECORE_WINCE_EVENT_WINDOW_SHOW;
132 EAPI extern int ECORE_WINCE_EVENT_WINDOW_DELETE_REQUEST;
133
134
135 /* Core */
136
137 EAPI int    ecore_wince_init();
138 EAPI int    ecore_wince_shutdown();
139 EAPI long   ecore_wince_current_time_get(void);
140 EAPI void   ecore_wince_message_loop_begin (void);
141
142 /* Window */
143
144 EAPI Ecore_WinCE_Window *ecore_wince_window_new(Ecore_WinCE_Window *parent,
145                                                 int                 x,
146                                                 int                 y,
147                                                 int                 width,
148                                                 int                 height);
149
150 EAPI void ecore_wince_window_free(Ecore_WinCE_Window *window);
151
152 EAPI void *ecore_wince_window_hwnd_get(Ecore_WinCE_Window *window);
153
154 EAPI void ecore_wince_window_move(Ecore_WinCE_Window *window,
155                                   int                 x,
156                                   int                 y);
157
158 EAPI void ecore_wince_window_resize(Ecore_WinCE_Window *window,
159                                     int                 width,
160                                     int                 height);
161
162 EAPI void ecore_wince_window_move_resize(Ecore_WinCE_Window *window,
163                                          int                 x,
164                                          int                 y,
165                                          int                 width,
166                                          int                 height);
167
168 EAPI void ecore_wince_window_show(Ecore_WinCE_Window *window);
169
170 EAPI void ecore_wince_window_hide(Ecore_WinCE_Window *window);
171
172 EAPI void ecore_wince_window_title_set(Ecore_WinCE_Window *window,
173                                        const char         *title);
174
175 EAPI void ecore_wince_window_backend_set(Ecore_WinCE_Window *window, int backend);
176
177 EAPI void ecore_wince_window_suspend_set(Ecore_WinCE_Window *window, int (*suspend)(int));
178
179 EAPI void ecore_wince_window_resume_set(Ecore_WinCE_Window *window, int (*resume)(int));
180
181 EAPI void ecore_wince_window_geometry_get(Ecore_WinCE_Window *window,
182                                           int                *x,
183                                           int                *y,
184                                           int                *width,
185                                           int                *height);
186
187 EAPI void ecore_wince_window_size_get(Ecore_WinCE_Window *window,
188                                       int                *width,
189                                       int                *height);
190
191 EAPI void ecore_wince_window_fullscreen_set(Ecore_WinCE_Window *window,
192                                             int                 on);
193
194
195 #ifdef __cplusplus
196 }
197 #endif
198
199 #endif /* __ECORE_WINCE_H__ */