Add a task to copy configuration files to user's HOME dir from data dir for multi...
[platform/core/uifw/e17.git] / src / bin / e_zone.h
1 #ifdef E_TYPEDEFS
2
3 typedef enum _E_Zone_Edge
4 {
5    E_ZONE_EDGE_NONE,
6    E_ZONE_EDGE_LEFT,
7    E_ZONE_EDGE_RIGHT,
8    E_ZONE_EDGE_TOP,
9    E_ZONE_EDGE_BOTTOM,
10    E_ZONE_EDGE_TOP_LEFT,
11    E_ZONE_EDGE_TOP_RIGHT,
12    E_ZONE_EDGE_BOTTOM_RIGHT,
13    E_ZONE_EDGE_BOTTOM_LEFT
14 } E_Zone_Edge;
15
16 typedef struct _E_Zone                      E_Zone;
17
18 typedef struct _E_Event_Zone_Desk_Count_Set E_Event_Zone_Desk_Count_Set;
19 typedef struct _E_Event_Zone_Move_Resize    E_Event_Zone_Move_Resize;
20 typedef struct _E_Event_Zone_Add            E_Event_Zone_Add;
21 typedef struct _E_Event_Zone_Del            E_Event_Zone_Del;
22 /* TODO: Move this to a general place? */
23 typedef struct _E_Event_Pointer_Warp        E_Event_Pointer_Warp;
24 typedef struct _E_Event_Zone_Edge           E_Event_Zone_Edge;
25 #ifdef _F_ZONE_WINDOW_ROTATION_
26 typedef struct _E_Event_Zone_Rotation_Change        E_Event_Zone_Rotation_Change; /* deprecated */
27 typedef struct _E_Event_Zone_Rotation_Change_Begin  E_Event_Zone_Rotation_Change_Begin;
28 typedef struct _E_Event_Zone_Rotation_Change_Cancel E_Event_Zone_Rotation_Change_Cancel;
29 typedef struct _E_Event_Zone_Rotation_Change_End    E_Event_Zone_Rotation_Change_End;
30 #endif
31
32 #else
33 #ifndef E_ZONE_H
34 #define E_ZONE_H
35
36 #define E_ZONE_TYPE (int)0xE0b0100d
37
38 struct _E_Zone
39 {
40    E_Object     e_obj_inherit;
41
42    int          x, y, w, h;
43    const char  *name;
44    /* num matches the id of the xinerama screen
45     * this zone belongs to. */
46    unsigned int num;
47    E_Container *container;
48    int          fullscreen;
49
50    Evas_Object *bg_object;
51    Evas_Object *bg_event_object;
52    Evas_Object *bg_clip_object;
53    Evas_Object *prev_bg_object;
54    Evas_Object *transition_object;
55
56    int          desk_x_count, desk_y_count;
57    int          desk_x_current, desk_y_current;
58    E_Desk     **desks;
59
60    Eina_List   *handlers;
61
62    struct
63    {
64       unsigned char      switching : 1;
65       E_Shelf           *es;
66       E_Event_Zone_Edge *ev;
67       E_Binding_Edge    *bind;
68    } flip;
69
70    struct
71    {
72       Ecore_X_Window top, right, bottom, left;
73    } edge;
74    struct
75    {
76       Ecore_X_Window left_top, top_left, top_right, right_top,
77                      right_bottom, bottom_right, bottom_left, left_bottom;
78    } corner;
79
80    E_Action      *cur_mouse_action;
81    Eina_List     *popups;
82
83    Ecore_Evas    *black_ecore_evas;
84    Evas          *black_evas;
85    Ecore_X_Window black_win;
86    int            black_need;
87    int            id;
88
89    struct
90    {
91       int       x, y, w, h;
92       Eina_Bool dirty : 1;
93    } useful_geometry;
94 #ifdef _F_ZONE_WINDOW_ROTATION_
95    struct
96    {
97       int       prev, curr, next;
98       int       block_count;
99       Eina_Bool wait_for_done : 1;
100       Eina_Bool pending : 1;
101    } rot;
102 #endif
103 };
104
105 struct _E_Event_Zone_Desk_Count_Set
106 {
107    E_Zone *zone;
108 };
109
110 struct _E_Event_Zone_Move_Resize
111 {
112    E_Zone *zone;
113 };
114
115 struct _E_Event_Zone_Add
116 {
117    E_Zone *zone;
118 };
119
120 struct _E_Event_Zone_Del
121 {
122    E_Zone *zone;
123 };
124
125 struct _E_Event_Pointer_Warp
126 {
127    struct
128    {
129       int x, y;
130    } prev;
131    struct
132    {
133       int x, y;
134    } curr;
135 };
136
137 struct _E_Event_Zone_Edge
138 {
139    E_Zone     *zone;
140    E_Zone_Edge edge;
141    int         x, y;
142    int         modifiers;
143    int         button;
144 };
145
146 #ifdef _F_ZONE_WINDOW_ROTATION_
147 /* deprecated */
148 struct _E_Event_Zone_Rotation_Change
149 {
150    E_Zone     *zone;
151 };
152
153 struct _E_Event_Zone_Rotation_Change_Begin
154 {
155    E_Zone     *zone;
156 };
157
158 struct _E_Event_Zone_Rotation_Change_Cancel
159 {
160    E_Zone     *zone;
161 };
162
163 struct _E_Event_Zone_Rotation_Change_End
164 {
165    E_Zone     *zone;
166 };
167 #endif
168
169 EINTERN int    e_zone_init(void);
170 EINTERN int    e_zone_shutdown(void);
171 EAPI E_Zone   *e_zone_new(E_Container *con, int num, int id, int x, int y, int w, int h);
172 EAPI void      e_zone_name_set(E_Zone *zone, const char *name);
173 EAPI void      e_zone_move(E_Zone *zone, int x, int y);
174 EAPI void      e_zone_resize(E_Zone *zone, int w, int h);
175 EAPI void      e_zone_move_resize(E_Zone *zone, int x, int y, int w, int h);
176 EAPI void      e_zone_fullscreen_set(E_Zone *zone, int on);
177 EAPI E_Zone   *e_zone_current_get(E_Container *con);
178 EAPI void      e_zone_bg_reconfigure(E_Zone *zone);
179 EAPI void      e_zone_flip_coords_handle(E_Zone *zone, int x, int y);
180 EAPI void      e_zone_desk_count_set(E_Zone *zone, int x_count, int y_count);
181 EAPI void      e_zone_desk_count_get(E_Zone *zone, int *x_count, int *y_count);
182 EAPI void      e_zone_desk_flip_by(E_Zone *zone, int dx, int dy);
183 EAPI void      e_zone_desk_flip_to(E_Zone *zone, int x, int y);
184 EAPI void      e_zone_desk_linear_flip_by(E_Zone *zone, int dx);
185 EAPI void      e_zone_desk_linear_flip_to(E_Zone *zone, int x);
186 EAPI void      e_zone_edge_flip_eval(E_Zone *zone);
187 EAPI void      e_zone_edge_new(E_Zone_Edge edge);
188 EAPI void      e_zone_edge_free(E_Zone_Edge edge);
189 EAPI void      e_zone_edge_enable(void);
190 EAPI void      e_zone_edge_disable(void);
191 EAPI void      e_zone_edges_desk_flip_capable(E_Zone *zone, Eina_Bool l, Eina_Bool r, Eina_Bool t, Eina_Bool b);
192 EAPI Eina_Bool e_zone_exists_direction(E_Zone *zone, E_Zone_Edge edge);
193 EAPI void      e_zone_edge_win_layer_set(E_Zone *zone, int layer);
194
195 EAPI void      e_zone_useful_geometry_dirty(E_Zone *zone);
196 EAPI void      e_zone_useful_geometry_get(E_Zone *zone, int *x, int *y, int *w, int *h);
197
198 #ifdef _F_ZONE_WINDOW_ROTATION_
199 EAPI void      e_zone_rotation_set(E_Zone *zone, int rot);
200 EAPI int       e_zone_rotation_get(E_Zone *zone);
201 EAPI Eina_Bool e_zone_rotation_block_set(E_Zone *zone, const char *name_hint, Eina_Bool set);
202 EAPI void      e_zone_rotation_update_done(E_Zone *zone);
203 EAPI void      e_zone_rotation_update_cancel(E_Zone *zone);
204 #endif
205
206 extern EAPI int E_EVENT_ZONE_DESK_COUNT_SET;
207 extern EAPI int E_EVENT_ZONE_MOVE_RESIZE;
208 extern EAPI int E_EVENT_ZONE_ADD;
209 extern EAPI int E_EVENT_ZONE_DEL;
210 extern EAPI int E_EVENT_POINTER_WARP;
211 extern EAPI int E_EVENT_ZONE_EDGE_IN;
212 extern EAPI int E_EVENT_ZONE_EDGE_OUT;
213 extern EAPI int E_EVENT_ZONE_EDGE_MOVE;
214 #ifdef _F_ZONE_WINDOW_ROTATION_
215 extern EAPI int E_EVENT_ZONE_ROTATION_CHANGE; /* deprecated */
216 extern EAPI int E_EVENT_ZONE_ROTATION_CHANGE_BEGIN;
217 extern EAPI int E_EVENT_ZONE_ROTATION_CHANGE_CANCEL;
218 extern EAPI int E_EVENT_ZONE_ROTATION_CHANGE_END;
219 #endif
220
221 #endif
222 #endif