5 #define _(str) gettext(str)
6 #define d_(str, dom) dgettext(PACKAGE dom, str)
9 #define d_(str, dom) (str)
15 * This header provides the various defines, structures and functions that
16 * make writing Illume policies easier.
18 * For details on the available functions, see @ref E_Illume_Main_Group.
20 * For details on the configuration structure, see @ref E_Illume_Config_Group.
22 * For details on the Policy API, see @ref E_Illume_Policy_Group.
24 * For details on quickpanels, see @ref E_Illume_Quickpanel_Group.
27 /* include standard E header */
30 /* define all of our typedefs */
31 typedef struct _E_Illume_Policy_Api E_Illume_Policy_Api;
32 typedef struct _E_Illume_Policy E_Illume_Policy;
33 typedef struct _E_Illume_Config E_Illume_Config;
34 typedef struct _E_Illume_Config_Zone E_Illume_Config_Zone;
35 typedef struct _E_Illume_Quickpanel E_Illume_Quickpanel;
36 typedef struct _E_Illume_Quickpanel_Info E_Illume_Quickpanel_Info;
38 typedef enum _E_Illume_Quickpanel_Ani_Type
40 E_ILLUME_QUICKPANEL_ANI_NONE,
41 E_ILLUME_QUICKPANEL_ANI_SHOW,
42 E_ILLUME_QUICKPANEL_ANI_HIDE
43 } E_Illume_Quickpanel_Ani_Type;
46 * @def E_ILLUME_POLICY_API_VERSION
47 * @brief Current version of the Policy API that is supported by the Illume
50 * @warning Policies not written to match this version will fail to load.
52 * @ingroup E_Illume_Policy_Group
54 # define E_ILLUME_POLICY_API_VERSION 2
57 * @brief structure for policy API.
59 * @details When Illume tries to load a policy, it will check for the
60 * existince of this structure. If it is not found, the policy will fail
63 * @warning This structure is required for Illume to load a policy.
65 * @ingroup E_Illume_Policy_Group
67 struct _E_Illume_Policy_Api
70 /**< The version of this policy. */
73 /**< The name of this policy. */
75 /**< The label of this policy that will be displayed in the Policy Selection dialog. */
79 * @brief structure for policy
81 * This structure actually holds the policy functions that Illume will call
82 * at the appropriate times.
84 * @ingroup E_Illume_Policy_Group
86 struct _E_Illume_Policy
88 E_Object e_obj_inherit;
90 E_Illume_Policy_Api *api;
91 /**< pointer to the @ref E_Illume_Policy_Api structure.
92 * @warning Policies are required to implement this or they will fail to
99 void *(*init) (E_Illume_Policy *p);
100 /**< pointer to the function that Illume will call to initialize this
101 * policy. Typically, a policy would set the pointers to the functions
102 * that it supports in here.
103 * @warning Policies are required to implement this function. */
105 int (*shutdown) (E_Illume_Policy *p);
106 /**< pointer to the function that Illume will call to shutdown this
107 * policy. Typically, a policy would do any cleanup that it needs to
109 * @warning Policies are required to implement this function. */
111 void (*border_add) (E_Border *bd);
112 /**< pointer to the function that Illume will call when a new border
113 * gets added. @note This function is optional. */
115 void (*border_del) (E_Border *bd);
116 /**< pointer to the function that Illume will call when a border gets
117 * deleted. @note This function is optional. */
119 void (*border_focus_in) (E_Border *bd);
120 /**< pointer to the function that Illume will call when a border gets
121 * focus. @note This function is optional. */
123 void (*border_focus_out) (E_Border *bd);
124 /**< pointer to the function that Illume will call when a border loses
125 * focus. @note This function is optional. */
127 void (*border_activate) (E_Border *bd);
128 /**< pointer to the function that Illume will call when a border gets
129 * an activate message. @note This function is optional. */
131 void (*border_post_fetch) (E_Border *bd);
132 /**< pointer to the function that Illume will call when E signals a
133 * border post fetch. @note This function is optional. */
135 void (*border_post_assign) (E_Border *bd);
136 /**< pointer to the function that Illume will call when E signals a
137 * border post assign. @note This function is optional. */
139 void (*border_show) (E_Border *bd);
140 /**< pointer to the function that Illume will call when a border gets
141 * shown. @note This function is optional. */
143 void (*border_move) (E_Border *bd);
145 void (*zone_layout) (E_Zone *zone);
146 /**< pointer to the function that Illume will call when a Zone needs
147 * to update it's layout. @note This function is optional. */
149 void (*zone_move_resize) (E_Zone *zone);
150 /**< pointer to the function that Illume will call when a Zone gets
151 * moved or resized. @note This function is optional. */
153 void (*zone_mode_change) (E_Zone *zone, Ecore_X_Atom mode);
154 /**< pointer to the function that Illume will call when the layout
155 * mode of a Zone changes. @note This function is optional. */
157 void (*zone_close) (E_Zone *zone);
158 /**< pointer to the function that Illume will call when the user has
159 * requested a border get closed. This is usually signaled from the
160 * Softkey window. @note This function is optional. */
162 void (*drag_start) (E_Border *bd);
163 /**< pointer to the function that Illume will call when the user has
164 * started to drag the Indicator/Softkey windows.
165 * @note This function is optional. */
167 void (*drag_end) (E_Border *bd);
168 /**< pointer to the function that Illume will call when the user has
169 * stopped draging the Indicator/Softkey windows.
170 * @note This function is optional. */
172 void (*focus_back) (E_Zone *zone);
173 /**< pointer to the function that Illume will call when the user has
174 * requested to cycle the focused border backwards. This is typically
175 * signalled from the Softkey window.
176 * @note This function is optional. */
178 void (*focus_forward) (E_Zone *zone);
179 /**< pointer to the function that Illume will call when the user has
180 * requested to cycle the focused border forward. This is typically
181 * signalled from the Softkey window.
182 * @note This function is optional. */
184 void (*property_change) (Ecore_X_Event_Window_Property *event);
185 /**< pointer to the function that Illume will call when properties
186 * change on a window. @note This function is optional. */
188 void (*window_focus_in) (Ecore_X_Event_Window_Focus_In *event);
190 void (*border_restack_request) (E_Border* bd, E_Border* sibling, int mode);
191 void (*border_stack) (E_Event_Border_Stack* ev);
192 void (*border_zone_set) (E_Event_Border_Zone_Set *event);
194 void (*border_post_new_border) (E_Border *bd);
196 void (*border_pre_fetch) (E_Border *bd);
197 void (*border_new_border) (E_Border *bd);
198 #ifdef _F_BORDER_HOOK_PATCH_
199 void (*border_del_border) (E_Border *bd);
201 void (*window_configure_request) (Ecore_X_Event_Window_Configure_Request *event);
203 void (*border_iconify_cb) (E_Border *bd);
204 void (*border_uniconify_cb) (E_Border *bd);
207 void (*window_create) (Ecore_X_Event_Window_Create *event);
208 void (*window_destroy) (Ecore_X_Event_Window_Destroy *event);
209 void (*window_reparent) (Ecore_X_Event_Window_Reparent *event);
210 void (*window_show) (Ecore_X_Event_Window_Show *event);
211 void (*window_hide) (Ecore_X_Event_Window_Hide *event);
212 void (*window_configure) (Ecore_X_Event_Window_Configure *event);
214 void (*window_sync_draw_done) (Ecore_X_Event_Client_Message *event);
215 void (*quickpanel_state_change) (Ecore_X_Event_Client_Message *event);
217 /* for popsync feature */
218 void (*window_desk_set) (Ecore_X_Event_Client_Message *event);
220 void (*window_move_resize_request) (Ecore_X_Event_Window_Move_Resize_Request *event);
221 void (*window_state_request) (Ecore_X_Event_Window_State_Request *event);
223 void (*module_update) (E_Event_Module_Update *event);
225 void (*idle_enterer) (void);
227 void (*illume_win_state_change_request) (Ecore_X_Event_Client_Message *event);
229 void (*rotation_list_add) (E_Border *bd);
235 * @brief structure for Illume configuration.
237 * @ingroup E_Illume_Config_Group
239 struct _E_Illume_Config
248 /**< integer specifying the amount of time it takes for an
249 * animation to complete. */
256 /**< the name of the currently active/selected policy. */
260 /**< The window class to match on */
262 /**< The window name to match on */
264 /**< The window title to match on */
266 /**< The window type to match on */
270 /**< flag to indicate if we should match on class */
272 /**< flag to indicate if we should match on name */
274 /**< flag to indicate if we should match on title */
276 /**< flag to indicate if we should match on type */
278 } vkbd, indicator, softkey, home;
285 /**< the name of the type of window to be located mobile. */
287 /**< the name of the type of window to be located desktop. */
289 /**< the name of the type of window to be located popsync. */
292 Eina_Bool use_mem_trim;
293 Eina_Bool use_indicator_widget;
294 Eina_Bool use_force_iconify;
295 int floating_control_threshold;
299 * @brief structure for Illume zone configuration.
301 * @ingroup E_Illume_Config_Group
303 struct _E_Illume_Config_Zone
309 /**< integer specifying whice mode we are in (0 == single application mode, 1 == dual application mode) */
311 /**< interger specifying if we layout windows in top/bottom or left/right when in dual mode */
314 /* NB: These are not configurable by user...just placeholders */
318 } vkbd, indicator, softkey;
321 struct _E_Illume_Quickpanel_Info
326 /* for mini controller */
327 Eina_Bool mini_controller;
331 * @brief structure for Illume Quickpanels.
333 * @ingroup E_Illume_Quickpanel_Group
335 struct _E_Illume_Quickpanel
337 E_Object e_obj_inherit;
340 /**< the current zone on which this quickpanel belongs */
342 /**< the border of this quickpanel */
344 /**< a list of borders that this quickpanel contains */
346 Ecore_Animator *animator;
347 Ecore_Event_Handler *key_hdl;
351 int size, isize, adjust, adjust_start, adjust_end, dir;
357 unsigned char visible;
358 /**< flag to indicate if the quickpanel is currently visible */
364 Evas_Coord down_x, down_y;
366 Eina_Bool dragging : 1;
368 Eina_Bool horiz_style : 1;
370 Evas_Object *ly_base;
371 Eina_Bool hide_trigger;
375 int threshold_y, move_x_min;
380 Eina_List *hidden_mini_controllers;
384 unsigned char layer :1;
386 unsigned char changed :1;
394 /* define function prototypes that policies can use */
395 EAPI E_Illume_Config_Zone *e_illume_zone_config_get(int id);
397 /* general functions */
398 EAPI Eina_Bool e_illume_border_is_indicator(E_Border *bd);
399 EAPI Eina_Bool e_illume_border_is_keyboard(E_Border *bd);
400 EAPI Eina_Bool e_illume_border_is_keyboard_sub(E_Border *bd);
401 EAPI Eina_Bool e_illume_border_is_dialog(E_Border *bd);
402 EAPI Eina_Bool e_illume_border_is_splash(E_Border *bd);
403 EAPI Eina_Bool e_illume_border_is_qt_frame(E_Border *bd);
404 EAPI Eina_Bool e_illume_border_is_fullscreen(E_Border *bd);
405 EAPI Eina_Bool e_illume_border_is_conformant(E_Border *bd);
406 EAPI Eina_Bool e_illume_border_is_quickpanel(E_Border *bd);
407 EAPI Eina_Bool e_illume_border_is_lock_screen(E_Border *bd);
408 EAPI Eina_Bool e_illume_border_is_notification(E_Border *bd);
409 EAPI Eina_Bool e_illume_border_is_utility(E_Border *bd);
410 EAPI Eina_Bool e_illume_border_is_clipboard(E_Border *bd);
412 EAPI void e_illume_border_min_get(E_Border *bd, int *w, int *h);
413 EAPI void e_illume_border_max_get(E_Border *bd, int *w, int *h);
414 EAPI E_Border *e_illume_border_at_xy_get(E_Zone *zone, int x, int y);
415 EAPI E_Border *e_illume_border_parent_get(E_Border *bd);
416 EAPI void e_illume_border_show(E_Border *bd);
417 EAPI void e_illume_border_hide(E_Border *bd);
418 EAPI Eina_Bool e_illume_border_is_fixed(E_Border *bd);
420 /* indicator functions */
421 EAPI E_Border *e_illume_border_indicator_get(E_Zone *zone);
422 EAPI void e_illume_border_indicator_pos_get(E_Zone *zone, int *x, int *y);
424 /* quickpanel functions */
425 EAPI E_Illume_Quickpanel *e_illume_quickpanel_by_zone_get(E_Zone *zone);
426 EAPI Eina_List* e_illume_quickpanel_get (void);
427 EAPI void e_illume_quickpanel_show(E_Zone *zone, int isAni);
428 EAPI void e_illume_quickpanel_hide(E_Zone *zone, int isAni);
429 EAPI Eina_Bool e_illume_border_is_quickpanel_popup(E_Border *bd);
431 /* app tray functions */
432 EAPI Eina_Bool e_illume_border_is_app_tray(E_Border *bd);
433 EAPI Eina_Bool e_illume_border_is_miniapp_tray(E_Border *bd);