1 #ifndef E_CLIENT_INTERN_H
2 #define E_CLIENT_INTERN_H
6 #include "e_pixmap_intern.h"
7 #include "e_comp_wl_capture_intern.h"
9 #include <wayland-server.h>
11 //#ifdef REFACTOR_DESK_AREA
12 typedef struct _E_Client_Data_Get_Above
14 E_Client *above_ec; // returned above_ec
15 } E_Client_Data_Get_Above;
17 typedef struct _E_Client_Data_Get_Below
19 E_Client *below_ec; // returned below_ec
20 } E_Client_Data_Get_Below;
22 typedef struct _E_Client_Data_Get_Visible_Above
24 E_Client *above_ec; // returned above_ec
25 } E_Client_Data_Get_Visible_Above;
27 typedef struct _E_Client_Data_Get_Visible_Below
29 E_Client *below_ec; // returned below_ec
30 } E_Client_Data_Get_Visible_Below;
33 static inline Ecore_Window
34 e_client_util_pwin_get(const E_Client *ec)
37 if (!ec->pixmap) return 0;
38 return e_pixmap_parent_window_get(ec->pixmap);
41 EINTERN Eina_Bool e_client_init(void);
42 EINTERN void e_client_shutdown(void);
44 EINTERN void e_client_idler_before(Eina_Bool *check_focus);
45 EINTERN unsigned int e_clients_count(void);
46 EINTERN void e_client_activate(E_Client *ec);
47 EINTERN Eina_List *e_client_lost_windows_get(E_Zone *zone);
48 EINTERN void e_client_fullscreen(E_Client *ec, E_Fullscreen policy);
49 EINTERN void e_client_unfullscreen(E_Client *ec);
50 EINTERN void e_client_stick(E_Client *ec);
51 EINTERN void e_client_unstick(E_Client *ec);
52 EINTERN void e_client_pinned_set(E_Client *ec, Eina_Bool set);
53 EINTERN Eina_Bool e_client_border_set(E_Client *ec, const char *name);
54 EINTERN void e_client_ping(E_Client *cw);
55 EINTERN int e_client_type_update(E_Client *ec);
56 EINTERN void e_client_transient_policy_set(E_Client *ec, E_Transient policy);
58 EINTERN Eina_Bool e_client_is_parent_iconify_by_client(E_Client *ec);
59 EINTERN Eina_Bool e_client_is_layout_apply(E_Client *ec);
60 EINTERN Eina_Bool e_client_is_belong_to_parent(E_Client *ec);
62 EINTERN Eina_Bool e_client_check_above_focused(E_Client *ec);
63 EINTERN E_Client *e_client_check_obscured_by_children_group(E_Client *ec);
64 EINTERN Eina_Bool e_client_check_really_iconified(E_Client *ec);
65 EINTERN E_Client *e_client_check_fully_contain_by_above(E_Client *ec, Eina_Bool check_layer);
67 EINTERN E_Iconified_Type e_client_iconified_type_get(E_Client *ec);
69 EINTERN E_Capture_Save_State e_client_image_save(E_Client *ec, const char *dir, const char *name, E_Capture_Client_Save_End_Cb func_end, void *data, Eina_Bool skip_child);
71 EINTERN Eina_Bool e_client_base_output_resolution_rsm_update(E_Client *bind_ec, E_Client *provider_ec);
73 EINTERN E_Pixmap *e_client_pixmap_change(E_Client *ec, E_Pixmap *newcp);
75 EINTERN void e_client_frame_recalc(E_Client *ec);
76 EINTERN void e_client_frame_geometry_set(E_Client *ec, int x, int y, int w, int h);
77 EINTERN void e_client_frame_update(E_Client *ec);
79 EINTERN void e_client_move_intercept_cb_set(E_Client *ec, E_Client_Move_Intercept_Cb cb);
80 EINTERN void e_client_move_cancel(void);
82 EINTERN Eina_Bool e_client_resize_begin(E_Client *ec);
83 EINTERN void e_client_resize_cancel(void);
84 EINTERN void e_client_resize_object_create_cb_set(E_Client_Resize_Object_Create_Cb cb);
85 EINTERN void e_client_resize_unit_size_set(E_Client *ec, unsigned int unit_size);
86 EINTERN void e_client_resize_limit(E_Client *ec, int *w, int *h);
88 EINTERN void e_client_desk_zoom_enable_set(E_Client *ec, Eina_Bool enable);
89 EINTERN Eina_Bool e_client_desk_zoom_enable_get(E_Client *ec);
90 EINTERN void e_client_desk_iconify_skip_set(E_Client *ec, Eina_Bool skip);
91 EINTERN Eina_Bool e_client_desk_iconify_skip_get(E_Client *ec);
93 EINTERN void e_client_comp_hidden_set(E_Client *ec, Eina_Bool hidden);
94 EINTERN Eina_Bool e_client_comp_grabbed_get(void);
96 EINTERN E_Client *e_client_action_get(void);
98 EINTERN Eina_Bool e_client_key_send(E_Client *ec, int keycode, Eina_Bool pressed, Ecore_Device *dev, unsigned int time);
99 EINTERN Eina_Bool e_client_key_cancel(E_Client *ec, int keycode, Ecore_Device *dev, unsigned int time);
101 EINTERN Eina_Bool e_client_touch_send(E_Client *ec, int idx, int x, int y, Eina_Bool pressed, Ecore_Device *dev, double radius_x, double radius_y, double pressure, double angle, unsigned int time);
102 EINTERN Eina_Bool e_client_touch_update_send(E_Client *ec, int idx, int x, int y, Ecore_Device *dev, double radius_x, double radius_y, double pressure, double angle, unsigned int time);
103 EINTERN Eina_Bool e_client_touch_cancel_send(E_Client *ec);
105 EINTERN void e_client_mouse_in(E_Client *ec, int x, int y);
106 EINTERN void e_client_mouse_out(E_Client *ec, int x, int y);
107 EINTERN void e_client_mouse_wheel(E_Client *ec, Evas_Point *output, E_Binding_Event_Wheel *ev);
108 EINTERN void e_client_mouse_down(E_Client *ec, int button, Evas_Point *output, E_Binding_Event_Mouse_Button *ev);
109 EINTERN void e_client_mouse_up(E_Client *ec, int button, Evas_Point *output, E_Binding_Event_Mouse_Button* ev);
110 EINTERN void e_client_mouse_move(E_Client *ec, Evas_Point *output);
111 EINTERN Eina_Bool e_client_mouse_button_send(E_Client *ec, int buttons, Eina_Bool pressed, Ecore_Device *dev, unsigned int time);
112 EINTERN Eina_Bool e_client_mouse_move_send(E_Client *ec, int x, int y, Ecore_Device *dev, unsigned int time);
113 EINTERN Eina_Bool e_client_mouse_wheel_send(E_Client *ec, int direction, int z, Ecore_Device *dev, unsigned int time);
114 EINTERN Eina_Bool e_client_mouse_in_send(E_Client *ec, int x, int y, Ecore_Device *dev, unsigned int time);
115 EINTERN Eina_Bool e_client_mouse_out_send(E_Client *ec, Ecore_Device *dev, unsigned int time);
117 EINTERN void e_client_res_change_geometry_save(E_Client *bd);
118 EINTERN void e_client_res_change_geometry_restore(E_Client *ec);
120 EINTERN void e_client_pos_set(E_Client *ec, int x, int y);
121 EINTERN void e_client_pos_get(E_Client *ec, int *x, int *y);
123 EINTERN E_Client *e_client_visible_above_get(E_Client *ec);
124 EINTERN E_Client *e_client_visible_below_get(E_Client *ec);
126 EINTERN void e_client_maximized_geometry_set(E_Client *ec, int x, int y, int w, int h);
127 EINTERN void e_client_maximized_geometry_get(E_Client *ec, int *x, int *y, int *w, int *h);
128 EINTERN void e_client_maximize_update(E_Client *ec);
130 EINTERN void e_client_hide_by_request_set(E_Client *ec, Eina_Bool set);
131 EINTERN Eina_Bool e_client_hide_by_request_get(E_Client *ec);
133 EINTERN void e_client_act_move_keyboard(E_Client *ec);
134 EINTERN void e_client_act_resize_keyboard(E_Client *ec);
135 EINTERN void e_client_act_move_begin(E_Client *ec, E_Binding_Event_Mouse_Button *ev);
136 EINTERN void e_client_act_resize_begin(E_Client *ec, E_Binding_Event_Mouse_Button *ev, E_Pointer_Mode resize_mode);
137 EINTERN void e_client_act_resize_end(E_Client *ec, E_Binding_Event_Mouse_Button *ev EINA_UNUSED);
138 EINTERN void e_client_act_menu_begin(E_Client *ec, E_Binding_Event_Mouse_Button *ev, int key);
139 EINTERN void e_client_act_close_begin(E_Client *ec);
140 EINTERN void e_client_act_kill_begin(E_Client *ec);
142 EINTERN void e_client_signal_move_begin(E_Client *ec, const char *sig, const char *src EINA_UNUSED);
143 EINTERN void e_client_signal_move_end(E_Client *ec, const char *sig EINA_UNUSED, const char *src EINA_UNUSED);
144 EINTERN void e_client_signal_resize_begin(E_Client *ec, const char *dir, const char *sig, const char *src EINA_UNUSED);
145 EINTERN void e_client_signal_resize_end(E_Client *ec, const char *dir EINA_UNUSED, const char *sig EINA_UNUSED, const char *src EINA_UNUSED);
147 EINTERN E_Client *e_client_under_pointer_get(E_Desk *desk, E_Client *exclude);
148 EINTERN E_Client *e_client_transient_child_top_get(E_Client *ec, Eina_Bool consider_focus);
149 EINTERN Eina_Bool e_client_mapped_get(E_Client *ec);
150 EINTERN void e_client_mapped_set(E_Client *ec, Eina_Bool set);
152 EINTERN void e_client_transform_apply(E_Client *ec, double degree, double zoom, int cx, int cy);
153 EINTERN void e_client_transform_clear(E_Client *ec);
154 EINTERN void e_client_transform_core_input_inv_rect_transform(E_Client *ec, int x, int y, int *out_x, int *out_y);
156 EINTERN void e_client_pending_geometry_flush(E_Client *ec);
157 EINTERN Eina_Bool e_client_pending_geometry_has(E_Client *ec);
158 EINTERN void e_client_pending_geometry_last_geometry_get(E_Client *ec, int *x, int *y, int *w, int *h);
160 //#ifdef REFACTOR_DESK_AREA
162 EINTERN Eina_Bool e_client_layer_set_by_desk_area(E_Client *ec, E_Layer layer);
163 EINTERN void e_client_desk_area_original_layer_restore(E_Client *ec);
164 EINTERN E_Layer e_client_desk_area_original_layer_get(E_Client *ec);
165 EINTERN Eina_Bool e_client_desk_area_client_layer_set(E_Client *ec, E_Desk_Area_Client_Layer edgc_layer);
166 EINTERN E_Desk_Area_Client_Layer e_client_desk_area_client_layer_get(E_Client *ec);
169 // get a comp_data from a ec
170 EINTERN E_Comp_Wl_Client_Data *e_client_cdata_new(E_Client *ec);
171 EINTERN void e_client_cdata_free(E_Client *ec);
172 EINTERN E_Comp_Wl_Client_Data *e_client_cdata_get(E_Client *ec);
174 EINTERN Eina_Bool e_client_map_set(E_Client *ec, E_Map *em);
175 EINTERN Eina_Bool e_client_map_enable_set(E_Client *ec, Eina_Bool enabled);
176 EINTERN void e_client_belong_to_parent_set(E_Client *ec, Eina_Bool set);
178 EINTERN void e_client_layout_apply(E_Client *ec, Eina_Bool apply);
180 EINTERN Eina_Bool e_client_fps_get(E_Client *ec, double *fps);
181 EINTERN void e_client_fps_update(E_Client *ec);
182 EINTERN void e_client_fps_enable(E_Client *ec, Eina_Bool enable);
184 EINTERN Eina_Bool e_client_explicit_sync_get(E_Client *ec);
185 EINTERN Eina_Bool e_client_explicit_sync_set(E_Client *ec, Eina_Bool enable);
186 EINTERN int e_client_explicit_sync_acquire_fence_fd_get(E_Client *ec);
187 EINTERN Eina_Bool e_client_explicit_sync_acquire_fence_fd_set(E_Client *ec, int fd);
189 EINTERN void e_client_focus_calculate(E_Zone *zone);
191 EINTERN Eina_Bool e_client_visibility_touched_check(E_Client *ec);
192 EINTERN void e_client_visibility_change_notify(E_Client *ec);
193 EINTERN void e_client_visibility_end_notify(void);
194 EINTERN E_Visibility e_client_visibility_get(E_Client *ec);
195 EINTERN void e_client_visibility_set(E_Client *ec, E_Visibility visibility);
197 EINTERN Eina_Bool e_client_intercept_hook_focus_revert_call(E_Client *ec);
198 EINTERN Eina_Bool e_client_intercept_hook_auto_placement_call(E_Client *ec);
200 EINTERN void e_client_iconify_event_send(E_Client *ec);
201 EINTERN void e_client_uniconify_event_send(E_Client *ec);
203 EINTERN void e_client_stack_transient_for_done_notify(E_Client *ec);
205 //#ifdef REFACTOR_DESK_AREA
206 EINTERN void e_client_subsurface_stack_update(E_Client *ec);
210 EINTERN void e_client_eval_pre_fetch_listener_add(E_Client *ec, struct wl_listener *listener);
211 EINTERN void e_client_eval_fetch_listener_add(E_Client *ec, struct wl_listener *listener);
212 EINTERN void e_client_eval_pre_post_fetch_listener_add(E_Client *ec, struct wl_listener *listener);
213 EINTERN void e_client_eval_post_fetch_listener_add(E_Client *ec, struct wl_listener *listener);
214 EINTERN void e_client_eval_pre_frame_assign_listener_add(E_Client *ec, struct wl_listener *listener);
215 EINTERN void e_client_eval_post_frame_assign_listener_add(E_Client *ec, struct wl_listener *listener);
216 EINTERN void e_client_eval_pre_new_client_listener_add(E_Client *ec, struct wl_listener *listener);
217 EINTERN void e_client_eval_post_new_client_listener_add(E_Client *ec, struct wl_listener *listener);
218 EINTERN void e_client_eval_visibility_listener_add(E_Client *ec, struct wl_listener *listener);
219 EINTERN void e_client_eval_visibility_end_listener_add(E_Client *ec, struct wl_listener *listener);
220 EINTERN void e_client_eval_end_listener_add(E_Client *ec, struct wl_listener *listener);
221 EINTERN void e_client_move_begin_listener_add(E_Client *ec, struct wl_listener *listener);
222 EINTERN void e_client_move_update_listener_add(E_Client *ec, struct wl_listener *listener);
223 EINTERN void e_client_move_end_listener_add(E_Client *ec, struct wl_listener *listener);
224 EINTERN void e_client_move_resize_begin_listener_add(E_Client *ec, struct wl_listener *listener);
225 EINTERN void e_client_move_resize_update_listener_add(E_Client *ec, struct wl_listener *listener);
226 EINTERN void e_client_move_resize_end_listener_add(E_Client *ec, struct wl_listener *listener);
227 EINTERN void e_client_destroy_listener_add(E_Client *ec, struct wl_listener *listener);
228 EINTERN void e_client_new_client_listener_add(E_Client *ec, struct wl_listener *listener);
229 EINTERN void e_client_new_client_post_listener_add(E_Client *ec, struct wl_listener *listener);
230 EINTERN void e_client_unredirect_listener_add(E_Client *ec, struct wl_listener *listener);
231 EINTERN void e_client_redirect_listener_add(E_Client *ec, struct wl_listener *listener);
232 EINTERN void e_client_aux_hint_change_listener_add(E_Client *ec, struct wl_listener *listener);
233 EINTERN void e_client_window_role_change_listener_add(E_Client *ec, struct wl_listener *listener);
234 EINTERN void e_client_transform_change_listener_add(E_Client *ec, struct wl_listener *listener);
235 EINTERN void e_client_activate_done_listener_add(E_Client *ec, struct wl_listener *listener);
236 EINTERN void e_client_mouse_in_listener_add(E_Client *ec, struct wl_listener *listener);
237 EINTERN void e_client_mouse_out_listener_add(E_Client *ec, struct wl_listener *listener);
238 EINTERN void e_client_mouse_down_listener_add(E_Client *ec, struct wl_listener *listener);
239 EINTERN void e_client_focus_set_listener_add(E_Client *ec, struct wl_listener *listener);
240 EINTERN void e_client_focus_unset_listener_add(E_Client *ec, struct wl_listener *listener);
241 EINTERN void e_client_focus_defer_set_listener_add(E_Client *ec, struct wl_listener *listener);
242 EINTERN void e_client_focus_latest_set_listener_add(E_Client *ec, struct wl_listener *listener);
243 EINTERN void e_client_iconify_listener_add(E_Client *ec, struct wl_listener *listener);
244 EINTERN void e_client_uniconify_listener_add(E_Client *ec, struct wl_listener *listener);
245 EINTERN void e_client_maximize_listener_add(E_Client *ec, struct wl_listener *listener);
246 EINTERN void e_client_unmaximize_listener_add(E_Client *ec, struct wl_listener *listener);
247 EINTERN void e_client_fullscreen_pre_listener_add(E_Client *ec, struct wl_listener *listener);
248 EINTERN void e_client_fullscreen_listener_add(E_Client *ec, struct wl_listener *listener);
249 EINTERN void e_client_unfullscreen_listener_add(E_Client *ec, struct wl_listener *listener);
250 EINTERN void e_client_move_listener_add(E_Client *ec, struct wl_listener *listener);
251 EINTERN void e_client_set_layer_listener_add(E_Client *ec, struct wl_listener *listener);
252 EINTERN void e_client_raise_listener_add(E_Client *ec, struct wl_listener *listener);
253 EINTERN void e_client_lower_listener_add(E_Client *ec, struct wl_listener *listener);
254 EINTERN void e_client_stack_below_listener_add(E_Client *ec, struct wl_listener *listener);
255 EINTERN void e_client_stack_above_listener_add(E_Client *ec, struct wl_listener *listener);
256 EINTERN void e_client_stack_transient_for_done_listener_add(E_Client *ec, struct wl_listener *listener);
257 EINTERN void e_client_stick_listener_add(E_Client *ec, struct wl_listener *listener);
258 EINTERN void e_client_unstick_listener_add(E_Client *ec, struct wl_listener *listener);
259 //#ifdef REFACTOR_DESK_AREA
260 EINTERN void e_client_get_above_listener_add(E_Client *ec, struct wl_listener *listener);
261 EINTERN void e_client_get_below_listener_add(E_Client *ec, struct wl_listener *listener);
262 EINTERN void e_client_get_visible_above_listener_add(E_Client *ec, struct wl_listener *listener);
263 EINTERN void e_client_get_visible_below_listener_add(E_Client *ec, struct wl_listener *listener);
264 EINTERN void e_client_subsurface_stack_update_listener_add(E_Client *ec, struct wl_listener *listener);
267 EINTERN struct wl_listener *e_client_destroy_listener_get(E_Client *ec, wl_notify_func_t notify);
269 void e_client_show(E_Client *ec);
270 void e_client_hide(E_Client *ec);
271 void e_client_hide_with_show_pending_cancel(E_Client *ec);
273 void e_client_shell_configure_send(E_Client *ec, uint32_t edges, int32_t width, int32_t height);
274 void e_client_shell_configure(E_Client *ec, Evas_Coord x, Evas_Coord y, Evas_Coord width, Evas_Coord height);
275 void e_client_shell_ping(E_Client *ec);
276 void e_client_shell_unmap(E_Client *ec);