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 (*zone_layout) (E_Zone *zone);
144 /**< pointer to the function that Illume will call when a Zone needs
145 * to update it's layout. @note This function is optional. */
147 void (*zone_move_resize) (E_Zone *zone);
148 /**< pointer to the function that Illume will call when a Zone gets
149 * moved or resized. @note This function is optional. */
151 void (*zone_mode_change) (E_Zone *zone, Ecore_X_Atom mode);
152 /**< pointer to the function that Illume will call when the layout
153 * mode of a Zone changes. @note This function is optional. */
155 void (*zone_close) (E_Zone *zone);
156 /**< pointer to the function that Illume will call when the user has
157 * requested a border get closed. This is usually signaled from the
158 * Softkey window. @note This function is optional. */
160 void (*drag_start) (E_Border *bd);
161 /**< pointer to the function that Illume will call when the user has
162 * started to drag the Indicator/Softkey windows.
163 * @note This function is optional. */
165 void (*drag_end) (E_Border *bd);
166 /**< pointer to the function that Illume will call when the user has
167 * stopped draging the Indicator/Softkey windows.
168 * @note This function is optional. */
170 void (*focus_back) (E_Zone *zone);
171 /**< pointer to the function that Illume will call when the user has
172 * requested to cycle the focused border backwards. This is typically
173 * signalled from the Softkey window.
174 * @note This function is optional. */
176 void (*focus_forward) (E_Zone *zone);
177 /**< pointer to the function that Illume will call when the user has
178 * requested to cycle the focused border forward. This is typically
179 * signalled from the Softkey window.
180 * @note This function is optional. */
182 void (*property_change) (Ecore_X_Event_Window_Property *event);
183 /**< pointer to the function that Illume will call when properties
184 * change on a window. @note This function is optional. */
186 void (*window_focus_in) (Ecore_X_Event_Window_Focus_In *event);
188 void (*border_restack_request) (E_Border* bd, E_Border* sibling, int mode);
189 void (*border_stack) (E_Event_Border_Stack* ev);
191 void (*border_post_new_border) (E_Border *bd);
193 void (*border_pre_fetch) (E_Border *bd);
194 void (*window_configure_request) (Ecore_X_Event_Window_Configure_Request *event);
197 void (*window_create) (Ecore_X_Event_Window_Create *event);
198 void (*window_destroy) (Ecore_X_Event_Window_Destroy *event);
199 void (*window_reparent) (Ecore_X_Event_Window_Reparent *event);
200 void (*window_show) (Ecore_X_Event_Window_Show *event);
201 void (*window_hide) (Ecore_X_Event_Window_Hide *event);
202 void (*window_configure) (Ecore_X_Event_Window_Configure *event);
204 void (*window_sync_draw_done) (Ecore_X_Event_Client_Message *event);
205 void (*quickpanel_state_change) (Ecore_X_Event_Client_Message *event);
211 * @brief structure for Illume configuration.
213 * @ingroup E_Illume_Config_Group
215 struct _E_Illume_Config
224 /**< integer specifying the amount of time it takes for an
225 * animation to complete. */
232 /**< the name of the currently active/selected policy. */
236 /**< The window class to match on */
238 /**< The window name to match on */
240 /**< The window title to match on */
242 /**< The window type to match on */
246 /**< flag to indicate if we should match on class */
248 /**< flag to indicate if we should match on name */
250 /**< flag to indicate if we should match on title */
252 /**< flag to indicate if we should match on type */
254 } vkbd, indicator, softkey, home;
258 Eina_Bool use_mem_trim;
262 * @brief structure for Illume zone configuration.
264 * @ingroup E_Illume_Config_Group
266 struct _E_Illume_Config_Zone
272 /**< integer specifying whice mode we are in (0 == single application mode, 1 == dual application mode) */
274 /**< interger specifying if we layout windows in top/bottom or left/right when in dual mode */
277 /* NB: These are not configurable by user...just placeholders */
281 } vkbd, indicator, softkey;
284 struct _E_Illume_Quickpanel_Info
290 /* for mini controller */
291 Eina_Bool mini_controller;
295 * @brief structure for Illume Quickpanels.
297 * @ingroup E_Illume_Quickpanel_Group
299 struct _E_Illume_Quickpanel
301 E_Object e_obj_inherit;
304 /**< the current zone on which this quickpanel belongs */
306 /**< a list of borders that this quickpanel contains */
308 Ecore_Animator *animator;
309 Ecore_Event_Handler *key_hdl;
313 int size, isize, adjust, adjust_start, adjust_end, dir;
319 unsigned char visible;
320 /**< flag to indicate if the quickpanel is currently visible */
326 Evas_Coord down_x, down_y;
328 Eina_Bool dragging : 1;
330 Eina_Bool horiz_style : 1;
332 Evas_Object *ly_base;
333 Eina_Bool hide_trigger;
337 int threshold_y, move_x_min;
342 Eina_List *hidden_mini_controllers;
346 /* define function prototypes that policies can use */
347 EAPI E_Illume_Config_Zone *e_illume_zone_config_get(int id);
349 /* general functions */
350 EAPI Eina_Bool e_illume_border_is_indicator(E_Border *bd);
351 EAPI Eina_Bool e_illume_border_is_keyboard(E_Border *bd);
352 EAPI Eina_Bool e_illume_border_is_dialog(E_Border *bd);
353 EAPI Eina_Bool e_illume_border_is_qt_frame(E_Border *bd);
354 EAPI Eina_Bool e_illume_border_is_fullscreen(E_Border *bd);
355 EAPI Eina_Bool e_illume_border_is_conformant(E_Border *bd);
356 EAPI Eina_Bool e_illume_border_is_quickpanel(E_Border *bd);
357 EAPI Eina_Bool e_illume_border_is_lock_screen(E_Border *bd);
358 EAPI Eina_Bool e_illume_border_is_notification(E_Border *bd);
359 EAPI Eina_Bool e_illume_border_is_utility(E_Border *bd);
360 EAPI Eina_Bool e_illume_border_is_sliding_win(E_Border *bd);
362 EAPI void e_illume_border_min_get(E_Border *bd, int *w, int *h);
363 EAPI E_Border *e_illume_border_at_xy_get(E_Zone *zone, int x, int y);
364 EAPI E_Border *e_illume_border_parent_get(E_Border *bd);
365 EAPI void e_illume_border_show(E_Border *bd);
366 EAPI void e_illume_border_hide(E_Border *bd);
368 /* indicator functions */
369 EAPI E_Border *e_illume_border_indicator_get(E_Zone *zone);
370 EAPI void e_illume_border_indicator_pos_get(E_Zone *zone, int *x, int *y);
372 /* quickpanel functions */
373 EAPI E_Illume_Quickpanel *e_illume_quickpanel_by_zone_get(E_Zone *zone);
374 EAPI Eina_List* e_illume_quickpanel_get (void);
375 EAPI void e_illume_quickpanel_show(E_Zone *zone, int isAni);
376 EAPI void e_illume_quickpanel_hide(E_Zone *zone, int isAni);