e_desk_area: remove unused desk area codes
[platform/upstream/enlightenment.git] / src / include / e_types.h
1 #ifndef E_TYPES_H
2 #define E_TYPES_H
3
4 #include <tdm.h>
5 #include <wayland-server.h>
6 #include <Eina.h>
7 #include <Ecore_Input.h>
8
9 # ifdef E_API
10 #  undef E_API
11 # endif
12 # ifdef WIN32
13 #  ifdef BUILDING_DLL
14 #   define E_API __declspec(dllexport)
15 #  else
16 #   define E_API __declspec(dllimport)
17 #  endif
18 # else
19 #  ifdef __GNUC__
20 #   if __GNUC__ >= 4
21 /* BROKEN in gcc 4 on amd64 */
22 #    if 0
23 #     pragma GCC visibility push(hidden)
24 #    endif
25 #    define E_API __attribute__ ((visibility("default")))
26 #   else
27 #    define E_API
28 #   endif
29 #  else
30 #   define E_API
31 #  endif
32 # endif
33
34 # ifdef EINTERN
35 #  undef EINTERN
36 # endif
37 # ifdef __GNUC__
38 #  if __GNUC__ >= 4
39 #   define EINTERN __attribute__ ((visibility("hidden")))
40 #  else
41 #   define EINTERN
42 #  endif
43 # else
44 #  define EINTERN
45 # endif
46
47 # define USE_IPC
48 # if 0
49 #  define OBJECT_PARANOIA_CHECK
50 # endif
51 # define OBJECT_CHECK
52 # define OBJECT_HASH_CHECK
53
54 # define E_LAYER_COUNT 31
55
56 //#define SMARTERR(args...) abort()
57 #define SMARTERRNR() return
58 #define SMARTERR(x)  return x
59
60 typedef struct _E_Client                      E_Client;                      // type of e_client.h
61 typedef struct _E_Desk                        E_Desk;                        // type of e_desk.h
62 typedef struct _E_Zone                        E_Zone;                        // type of e_zone.h
63 typedef struct _E_Output                      E_Output;                      // type of e_output.h
64 typedef struct _E_Hwc                         E_Hwc;                         // type of e_hwc.h
65 typedef struct _E_Hwc_Window                  E_Hwc_Window;                  // type of e_hwc_window.h
66 typedef struct _E_Hwc_Window_Buffer           E_Hwc_Window_Buffer;           // type of e_hwc_window.h
67 typedef struct _E_Hwc_Window_Target           E_Hwc_Window_Target;           // type of e_hwc_window.h
68 typedef struct _E_Hwc_Window_Update_Data      E_Hwc_Window_Update_Data;      // type of e_hwc_window.h
69 typedef struct _E_Hwc_Window_Queue            E_Hwc_Window_Queue;            // type of e_hwc_window_queue_intern.h
70 typedef struct _E_Hwc_Window_Queue_Buffer     E_Hwc_Window_Queue_Buffer;     // type of e_hwc_window_queue_intern.h
71 typedef struct _E_Hwc_Window_Queue_Buffer_Ref E_Hwc_Window_Queue_Buffer_Ref; // type of e_hwc_window_queue_intern.h
72 typedef struct _E_Plane                       E_Plane;                       // type of e_plane.h
73 typedef struct _E_Plane_Renderer              E_Plane_Renderer;              // type of e_plane_renderer.h
74 typedef struct _E_Comp_Wl_Buffer              E_Comp_Wl_Buffer;              // type of e_comp_wl.h
75 typedef struct _E_Comp_Wl_Buffer_Ref          E_Comp_Wl_Buffer_Ref;          // type of e_comp_wl.h
76 typedef struct _E_Object                      E_Object;                      // type of e_object.h
77
78 typedef struct _E_Client_Hook E_Client_Hook;  // type of e_client.h
79
80 typedef struct E_Binding_Event_Mouse_Button   E_Binding_Event_Mouse_Button;  // type of e_bindings_intern.h FIXME: remove it
81 typedef struct E_Binding_Event_Wheel          E_Binding_Event_Wheel;         // type of e_bindings_intern.h FIXME: remove it
82
83 typedef void (*E_Object_Cleanup_Func) (void *obj); // type of e_object.h
84
85
86 // enum of e_client.h
87 typedef enum
88 {
89    /* same as ecore-x types */
90    E_WINDOW_TYPE_UNKNOWN = 0,
91    E_WINDOW_TYPE_DESKTOP,
92    E_WINDOW_TYPE_DOCK,
93    E_WINDOW_TYPE_TOOLBAR,
94    E_WINDOW_TYPE_MENU,
95    E_WINDOW_TYPE_UTILITY,
96    E_WINDOW_TYPE_SPLASH,
97    E_WINDOW_TYPE_DIALOG,
98    E_WINDOW_TYPE_NORMAL,
99    E_WINDOW_TYPE_DROPDOWN_MENU,
100    E_WINDOW_TYPE_POPUP_MENU,
101    E_WINDOW_TYPE_TOOLTIP,
102    E_WINDOW_TYPE_NOTIFICATION,
103    E_WINDOW_TYPE_COMBO,
104    E_WINDOW_TYPE_DND,
105    /* since UNKNOWN was used improperly in comp matching,
106     * this value is a placeholder to indicate that we want
107     * only type UNKNOWN windows
108     */
109    E_WINDOW_TYPE_REAL_UNKNOWN = 999
110 } E_Window_Type;
111
112 // enum of e_desk.h
113 typedef enum _E_Desk_Area_Layer
114 {
115    E_DESK_AREA_LAYER_BACKGROUND          = 0,     //E_LAYER_DESKTOP
116    E_DESK_AREA_LAYER_NORMAL_BELOW        = 150,   //E_LAYER_CLIENT_BELOW
117    E_DESK_AREA_LAYER_NORMAL              = 200,   //E_LAYER_CLIENT_NORMAL,
118    E_DESK_AREA_LAYER_NORMAL_ABOVE        = 250,   //E_LAYER_CLIENT_ABOVE,
119    E_DESK_AREA_LAYER_NOTIFICATION_LOW    = 650,   //E_LAYER_CLIENT_NOTIFICATION_LOW,
120    E_DESK_AREA_LAYER_NOTIFICATION_NORMAL = 700,   //E_LAYER_CLIENT_NOTIFICATION_NORMAL,
121    E_DESK_AREA_LAYER_NOTIFICATION_HIGH   = 750,   //E_LAYER_CLIENT_NOTIFICATION_HIGH,
122    E_DESK_AREA_LAYER_NOTIFICATION_TOP    = 800,   //E_LAYER_CLIENT_NOTIFICATION_TOP,
123    E_DESK_AREA_LAYER_SYSTEM              = 900,   //E_LAYER_CLIENT_ALERT,
124 } E_Desk_Area_Layer;
125
126 // enum of e_comp.h
127 typedef enum _E_Layer
128 {
129    E_LAYER_BOTTOM = -100,
130    E_LAYER_BG = -1, // zone bg stuff
131    E_LAYER_DESKTOP = 0, // desktop objects: fileman, gadgets, shelves
132    E_LAYER_DESKTOP_TOP = 10, // raised desktop objects: gadgets
133    E_LAYER_CLIENT_DESKTOP = 100, //shelves
134    E_LAYER_CLIENT_BELOW = 150,
135    E_LAYER_CLIENT_NORMAL = 200,
136    E_LAYER_CLIENT_ABOVE = 250,
137    E_LAYER_CLIENT_EDGE = 300,
138    E_LAYER_CLIENT_FULLSCREEN = 350,
139    E_LAYER_CLIENT_EDGE_FULLSCREEN = 400,
140    E_LAYER_CLIENT_POPUP = 450,
141    E_LAYER_CLIENT_TOP = 500,
142    E_LAYER_CLIENT_PRIO = 600,
143    E_LAYER_CLIENT_NOTIFICATION_LOW = 650,
144    E_LAYER_CLIENT_NOTIFICATION_NORMAL = 700,
145    E_LAYER_CLIENT_NOTIFICATION_HIGH = 750,
146    E_LAYER_CLIENT_NOTIFICATION_TOP = 800,
147    E_LAYER_CLIENT_ALERT_LOW = 850,
148    E_LAYER_CLIENT_ALERT = 900,
149    E_LAYER_CLIENT_ALERT_HIGH = 950,
150    E_LAYER_CLIENT_DRAG = 980,
151    E_LAYER_CLIENT_CURSOR = 990,
152    E_LAYER_POPUP = 999, // popups
153    E_LAYER_EFFECT = 1999,
154    E_LAYER_DESK_OBJECT_BELOW = 3000,
155    E_LAYER_DESK_OBJECT = 3100,
156    E_LAYER_DESK_OBJECT_ABOVE = 3200,
157    E_LAYER_MENU = 5000, // menus
158    E_LAYER_DESKLOCK = 9999, // desklock
159    E_LAYER_MAX = 32767 // EVAS_LAYER_MAX
160 } E_Layer;
161
162 // enum of e_comp.h
163 typedef enum   _E_Output_Display_Mode
164 {
165    E_OUTPUT_DISPLAY_MODE_NONE,
166    E_OUTPUT_DISPLAY_MODE_MIRROR,
167    E_OUTPUT_DISPLAY_MODE_PRESENTATION,
168 } E_Output_Display_Mode;
169
170 // struct of e_comp_wl.h
171 struct _E_Comp_Wl_Buffer_Ref
172 {
173    E_Comp_Wl_Buffer *buffer;
174    struct wl_listener destroy_listener;
175 };
176
177 // struct of e_hwc_window_queue_intern.h
178 struct _E_Hwc_Window_Queue_Buffer_Ref
179 {
180    E_Hwc_Window_Queue_Buffer     *buffer;
181    struct wl_listener             destroy_listener;
182 };
183
184 // struct of e_hwc_window.h
185 struct _E_Hwc_Window_Buffer
186 {
187    tbm_surface_h                  tsurface;
188    E_Hwc_Window_Queue            *queue;
189    struct wl_listener             queue_destroy_listener;
190    Eina_Bool                      from_queue;
191    int                            transform;
192 };
193
194 // struct of e_hwc_window.h
195 struct _E_Hwc_Window_Update_Data
196 {
197    E_Comp_Wl_Buffer_Ref           buffer_ref;
198    E_Hwc_Window_Queue_Buffer_Ref  queue_buffer_ref;
199    E_Hwc_Window_Buffer            buffer;
200    tdm_hwc_window_info            info;
201    E_Hwc_Window                  *hwc_window;
202 };
203
204 struct _E_Object
205 {
206    int                      magic;
207    int                      type;
208    int                      references;
209    E_Object_Cleanup_Func    del_func;
210    E_Object_Cleanup_Func    cleanup_func;
211    E_Object_Cleanup_Func    free_att_func;
212    E_Object_Cleanup_Func    del_att_func;
213    E_Object_Cleanup_Func    del_delay_func;
214    Eina_Inlist             *del_fn_list;
215    void                    *data;
216    Ecore_Job               *delay_del_job;
217    int                      delay_del_ref;
218    int                      walking_list;
219    Eina_Bool                ref_debug : 1;
220    Eina_Bool                deleted : 1;
221 };
222
223 // TODO:FIXME: remove the use of this structure
224 struct _E_Action
225 {
226    E_Object    e_obj_inherit;
227
228    const char *name;
229    struct
230    {
231       void (*go)(E_Object *obj, const char *params);
232       void (*go_mouse)(E_Object *obj, const char *params, E_Binding_Event_Mouse_Button *ev);
233       void (*go_wheel)(E_Object *obj, const char *params, E_Binding_Event_Wheel *ev);
234       void (*go_key)(E_Object *obj, const char *params, Ecore_Event_Key *ev);
235       void (*go_signal)(E_Object *obj, const char *params, const char *sig, const char *src);
236       void (*end)(E_Object *obj, const char *params);
237       void (*end_mouse)(E_Object *obj, const char *params, E_Binding_Event_Mouse_Button *ev);
238       void (*end_key)(E_Object *obj, const char *params, Ecore_Event_Key *ev);
239    } func;
240 };
241
242 extern Eina_Bool starting;
243 extern Eina_Bool stopping;
244
245 #endif