2 typedef struct _E_Comp E_Comp;
3 typedef struct _E_Comp_Data E_Comp_Data;
4 typedef struct _E_Comp_Client_Data E_Comp_Client_Data;
5 typedef struct _E_Comp_Demo_Style_Item E_Comp_Demo_Style_Item;
7 #define E_COMP_TYPE (int) 0xE0b01003
9 #define E_LAYER_COUNT 19
10 #define E_CLIENT_LAYER_COUNT 11
14 E_LAYER_BOTTOM = -100,
15 E_LAYER_BG = -1, // zone bg stuff
16 E_LAYER_DESKTOP = 0, // desktop objects: fileman, gadgets, shelves
17 E_LAYER_DESKTOP_TOP = 10, // raised desktop objects: gadgets
18 E_LAYER_CLIENT_DESKTOP = 100, //shelves
19 E_LAYER_CLIENT_BELOW = 150,
20 E_LAYER_CLIENT_NORMAL = 200,
21 E_LAYER_CLIENT_ABOVE = 250,
22 E_LAYER_CLIENT_EDGE = 300,
23 E_LAYER_CLIENT_FULLSCREEN = 350,
24 E_LAYER_CLIENT_EDGE_FULLSCREEN = 400,
25 E_LAYER_CLIENT_POPUP = 450,
26 E_LAYER_CLIENT_TOP = 500,
27 E_LAYER_CLIENT_DRAG = 550,
28 E_LAYER_CLIENT_PRIO = 600,
29 E_LAYER_POPUP = 999, // popups
30 E_LAYER_MENU = 5000, // menus
31 E_LAYER_DESKLOCK = 9999, // desklock
32 E_LAYER_MAX = 32767 // EVAS_LAYER_MAX
39 # include "e_comp_cfdata.h"
44 E_Object e_obj_inherit;
46 Ecore_Window win; // input overlay
50 Evas_Object *bg_blank_object;
55 unsigned int new_clients;
57 E_Comp_Data *comp_data;
58 E_Pixmap_Type comp_type; //for determining X/Wayland/
61 Eina_Stringshare *name;
65 //Eina_Inlist *objs; /* E_Comp_Object; NOT to be exposed; seems pointless? */
66 Eina_Inlist *clients; /* E_Client, bottom to top */
67 unsigned int clients_count;
68 } layers[E_LAYER_COUNT];
74 Ecore_Event_Handler *key_handler;
75 E_Comp_Object_Autoclose_Cb del_cb;
76 E_Comp_Object_Key_Cb key_cb;
80 Eina_List *debug_rects;
81 Eina_List *ignore_wins;
84 Eina_List *post_updates;
85 Ecore_Animator *render_animator;
87 Ecore_Job *update_job;
90 Ecore_Job *screen_job;
91 Ecore_Timer *nocomp_delay_timer;
92 Ecore_Timer *nocomp_override_timer;
94 double frametimes[122];
97 int nocomp_override; //number of times nocomp override has been requested
98 Ecore_Window block_win;
99 int block_count; //number of times block window has been requested
101 Ecore_Window cm_selection; //FIXME: move to comp_x ?
106 Ecore_Cb bindings_grab_cb;
107 Ecore_Cb bindings_ungrab_cb;
110 Eina_Bool grabbed : 1;
111 Eina_Bool nocomp : 1;
112 Eina_Bool nocomp_want : 1;
117 struct _E_Comp_Demo_Style_Item
119 Evas_Object *preview;
121 Evas_Object *livethumb;
129 E_COMP_ENGINE_NONE = 0,
130 E_COMP_ENGINE_SW = 1,
134 EINTERN Eina_Bool e_comp_init(void);
135 EAPI E_Comp *e_comp_new(void);
136 EAPI int e_comp_internal_save(void);
137 EINTERN int e_comp_shutdown(void);
138 EAPI void e_comp_render_queue(E_Comp *c);
139 EAPI void e_comp_shape_queue(E_Comp *c);
140 EAPI E_Comp_Config *e_comp_config_get(void);
141 EAPI const Eina_List *e_comp_list(void);
142 EAPI void e_comp_shadows_reset(void);
143 EAPI E_Comp *e_comp_get(const void *o);
144 EAPI Ecore_Window e_comp_top_window_at_xy_get(E_Comp *c, Evas_Coord x, Evas_Coord y);
145 EAPI void e_comp_util_wins_print(const E_Comp *c);
146 EAPI void e_comp_ignore_win_add(E_Pixmap_Type type, Ecore_Window win);
147 EAPI void e_comp_ignore_win_del(E_Pixmap_Type type, Ecore_Window win);
148 EAPI Eina_Bool e_comp_ignore_win_find(Ecore_Window win);
149 EAPI void e_comp_override_del(E_Comp *c);
150 EAPI void e_comp_override_add(E_Comp *c);
151 EAPI void e_comp_block_window_add(void);
152 EAPI void e_comp_block_window_del(void);
153 EAPI E_Comp *e_comp_find_by_window(Ecore_Window win);
154 EAPI void e_comp_override_timed_pop(E_Comp *c);
155 EAPI unsigned int e_comp_e_object_layer_get(const E_Object *obj);
156 EAPI Eina_Bool e_comp_grab_input(E_Comp *c, Eina_Bool mouse, Eina_Bool kbd);
157 EAPI void e_comp_ungrab_input(E_Comp *c, Eina_Bool mouse, Eina_Bool kbd);
158 EAPI void e_comp_gl_set(Eina_Bool set);
159 EAPI Eina_Bool e_comp_gl_get(void);
160 EAPI E_Comp *e_comp_evas_find(const Evas *e);
162 EAPI void e_comp_button_bindings_grab_all(void);
163 EAPI void e_comp_button_bindings_ungrab_all(void);
165 EINTERN Evas_Object *e_comp_style_selector_create(Evas *evas, const char **source);
166 EAPI E_Config_Dialog *e_int_config_comp(E_Comp *comp, const char *params);
167 EAPI E_Config_Dialog *e_int_config_comp_match(E_Comp *comp, const char *params);
169 static inline E_Comp *
170 e_comp_util_evas_object_comp_get(Evas_Object *obj)
172 return ecore_evas_data_get(ecore_evas_ecore_evas_get(evas_object_evas_get(obj)), "comp");
175 static inline Eina_Bool
176 e_comp_util_client_is_fullscreen(const E_Client *ec)
178 if ((!ec->visible) || (ec->input_only))
180 return ((ec->client.x == 0) && (ec->client.y == 0) &&
181 ((ec->client.w) >= ec->comp->man->w) &&
182 ((ec->client.h) >= ec->comp->man->h) &&
183 (!ec->argb) && (!ec->shaped)