7 * This header provides the various defines, structures and functions that
8 * make writing Illume policies easier.
10 * For details on the available functions, see @ref E_Illume_Main_Group.
12 * For details on the configuration structure, see @ref E_Illume_Config_Group.
14 * For details on the virtual keyboard, see @ref E_Illume_Keyboard_Group.
16 * For details on the Policy API, see @ref E_Illume_Policy_Group.
18 * For details on quickpanels, see @ref E_Illume_Quickpanel_Group.
21 /* include standard E header */
24 /* define all of our typedefs */
25 typedef struct _E_Illume_Keyboard E_Illume_Keyboard;
26 typedef struct _E_Illume_Policy_Api E_Illume_Policy_Api;
27 typedef struct _E_Illume_Policy E_Illume_Policy;
28 typedef struct _E_Illume_Config E_Illume_Config;
29 typedef struct _E_Illume_Config_Zone E_Illume_Config_Zone;
30 typedef struct _E_Illume_Quickpanel E_Illume_Quickpanel;
33 * @enum E_Illume_Keyboard_Layout
35 * enumeration for available keyboard layout modes
37 * @ingroup E_Illume_Keyboard_Group
39 typedef enum _E_Illume_Keyboard_Layout
41 E_ILLUME_KEYBOARD_LAYOUT_NONE, /**< no keyboard layout specified. */
42 E_ILLUME_KEYBOARD_LAYOUT_DEFAULT, /**< default keyboard layout. */
43 E_ILLUME_KEYBOARD_LAYOUT_ALPHA, /**< alpha keyboard layout. */
44 E_ILLUME_KEYBOARD_LAYOUT_NUMERIC, /**< numeric keyboard layout */
45 E_ILLUME_KEYBOARD_LAYOUT_PIN, /**< pin keyboard layout */
46 E_ILLUME_KEYBOARD_LAYOUT_PHONE_NUMBER, /**< phone number keyboard layout */
47 E_ILLUME_KEYBOARD_LAYOUT_HEX, /**< hex keyboard layout */
48 E_ILLUME_KEYBOARD_LAYOUT_TERMINAL, /**< terminal keyboard layout */
49 E_ILLUME_KEYBOARD_LAYOUT_PASSWORD, /**< password keyboard layout */
50 E_ILLUME_KEYBOARD_LAYOUT_IP, /**< IP keyboard layout */
51 E_ILLUME_KEYBOARD_LAYOUT_HOST, /**< host keyboard layout */
52 E_ILLUME_KEYBOARD_LAYOUT_FILE, /**< file keyboard layout */
53 E_ILLUME_KEYBOARD_LAYOUT_URL, /**< url keyboard layout */
54 E_ILLUME_KEYBOARD_LAYOUT_KEYPAD, /**< keypad keyboard layout */
55 E_ILLUME_KEYBOARD_LAYOUT_J2ME /**< J2ME keyboard layout */
56 } E_Illume_Keyboard_Layout;
59 * @brief structure for keyboard.
61 * @ingroup E_Illume_Keyboard_Group
63 struct _E_Illume_Keyboard
65 E_Object e_obj_inherit;
69 Ecore_Animator *animator;
71 E_Illume_Keyboard_Layout layout;
72 /**< current @ref E_Illume_Keyboard_Layout mode of the keyboard */
74 Eina_List *waiting_borders;
77 int adjust, adjust_start, adjust_end;
79 unsigned char visible : 1;
80 /**< flag to indicate if the keyboard is currently visible */
81 unsigned char disabled : 1;
82 /**< flag to indicate if the keyboard is currently disabled */
83 unsigned char fullscreen : 1;
84 /**< flag to indicate if the keyboard is currently fullscreen */
88 * @def E_ILLUME_POLICY_API_VERSION
89 * @brief Current version of the Policy API that is supported by the Illume
92 * @warning Policies not written to match this version will fail to load.
94 * @ingroup E_Illume_Policy_Group
96 # define E_ILLUME_POLICY_API_VERSION 2
99 * @brief structure for policy API.
101 * @details When Illume tries to load a policy, it will check for the
102 * existence of this structure. If it is not found, the policy will fail
105 * @warning This structure is required for Illume to load a policy.
107 * @ingroup E_Illume_Policy_Group
109 struct _E_Illume_Policy_Api
112 /**< The version of this policy. */
115 /**< The name of this policy. */
117 /**< The label of this policy that will be displayed in the Policy Selection dialog. */
121 * @brief structure for policy
123 * This structure actually holds the policy functions that Illume will call
124 * at the appropriate times.
126 * @ingroup E_Illume_Policy_Group
128 struct _E_Illume_Policy
130 E_Object e_obj_inherit;
132 E_Illume_Policy_Api *api;
133 /**< pointer to the @ref E_Illume_Policy_Api structure.
134 * @warning Policies are required to implement this or they will fail to
141 void *(*init) (E_Illume_Policy *p);
142 /**< pointer to the function that Illume will call to initialize this
143 * policy. Typically, a policy would set the pointers to the functions
144 * that it supports in here.
145 * @warning Policies are required to implement this function. */
147 int (*shutdown) (E_Illume_Policy *p);
148 /**< pointer to the function that Illume will call to shutdown this
149 * policy. Typically, a policy would do any cleanup that it needs to
151 * @warning Policies are required to implement this function. */
153 void (*border_add) (E_Border *bd);
154 /**< pointer to the function that Illume will call when a new border
155 * gets added. @note This function is optional. */
157 void (*border_del) (E_Border *bd);
158 /**< pointer to the function that Illume will call when a border gets
159 * deleted. @note This function is optional. */
161 void (*border_focus_in) (E_Border *bd);
162 /**< pointer to the function that Illume will call when a border gets
163 * focus. @note This function is optional. */
165 void (*border_focus_out) (E_Border *bd);
166 /**< pointer to the function that Illume will call when a border loses
167 * focus. @note This function is optional. */
169 void (*border_activate) (E_Border *bd);
170 /**< pointer to the function that Illume will call when a border gets
171 * an activate message. @note This function is optional. */
173 void (*border_post_fetch) (E_Border *bd);
174 /**< pointer to the function that Illume will call when E signals a
175 * border post fetch. @note This function is optional. */
177 void (*border_post_assign) (E_Border *bd);
178 /**< pointer to the function that Illume will call when E signals a
179 * border post assign. @note This function is optional. */
181 void (*border_show) (E_Border *bd);
182 /**< pointer to the function that Illume will call when a border gets
183 * shown. @note This function is optional. */
185 void (*zone_layout) (E_Zone *zone);
186 /**< pointer to the function that Illume will call when a Zone needs
187 * to update it's layout. @note This function is optional. */
189 void (*zone_move_resize) (E_Zone *zone);
190 /**< pointer to the function that Illume will call when a Zone gets
191 * moved or resized. @note This function is optional. */
193 void (*zone_mode_change) (E_Zone *zone, Ecore_X_Atom mode);
194 /**< pointer to the function that Illume will call when the layout
195 * mode of a Zone changes. @note This function is optional. */
197 void (*zone_close) (E_Zone *zone);
198 /**< pointer to the function that Illume will call when the user has
199 * requested a border get closed. This is usually signaled from the
200 * Softkey window. @note This function is optional. */
202 void (*drag_start) (E_Border *bd);
203 /**< pointer to the function that Illume will call when the user has
204 * started to drag the Indicator/Softkey windows.
205 * @note This function is optional. */
207 void (*drag_end) (E_Border *bd);
208 /**< pointer to the function that Illume will call when the user has
209 * stopped draging the Indicator/Softkey windows.
210 * @note This function is optional. */
212 void (*focus_back) (E_Zone *zone);
213 /**< pointer to the function that Illume will call when the user has
214 * requested to cycle the focused border backwards. This is typically
215 * signalled from the Softkey window.
216 * @note This function is optional. */
218 void (*focus_forward) (E_Zone *zone);
219 /**< pointer to the function that Illume will call when the user has
220 * requested to cycle the focused border forward. This is typically
221 * signalled from the Softkey window.
222 * @note This function is optional. */
224 void (*focus_home) (E_Zone *zone);
225 /**< pointer to the function that Illume will call when the user has
226 * requested that Home window be focused.
227 * @note This function is optional. */
229 void (*property_change) (Ecore_X_Event_Window_Property *event);
230 /**< pointer to the function that Illume will call when properties
231 * change on a window. @note This function is optional. */
237 * @brief structure for Illume configuration.
239 * @ingroup E_Illume_Config_Group
241 struct _E_Illume_Config
250 int resize_before; /* resize app window before hide animation */
251 /**< integer specifying the amount of time it takes for an
252 * animation to complete. */
259 /**< the name of the currently active/selected policy. */
263 /**< The window class to match on */
265 /**< The window name to match on */
267 /**< The window title to match on */
269 /**< The window type to match on */
273 /**< flag to indicate if we should match on class */
275 /**< flag to indicate if we should match on name */
277 /**< flag to indicate if we should match on title */
279 /**< flag to indicate if we should match on type */
281 } vkbd, indicator, softkey, home;
287 * @brief structure for Illume zone configuration.
289 * @ingroup E_Illume_Config_Group
291 struct _E_Illume_Config_Zone
297 /**< integer specifying whice mode we are in (0 == single application mode, 1 == dual application mode) */
299 /**< interger specifying if we layout windows in top/bottom or left/right when in dual mode */
302 /* NB: These are not configurable by user...just placeholders */
306 } vkbd, indicator, softkey;
310 * @brief structure for Illume Quickpanels.
312 * @ingroup E_Illume_Quickpanel_Group
314 struct _E_Illume_Quickpanel
316 E_Object e_obj_inherit;
319 /**< the current zone on which this quickpanel belongs */
321 /**< a list of borders that this quickpanel contains */
323 Ecore_Animator *animator;
324 Ecore_X_Window clickwin;
325 Ecore_Event_Handler *mouse_hdl;
329 int size, isize, adjust, adjust_start, adjust_end, dir;
331 unsigned char visible : 1;
332 /**< flag to indicate if the quickpanel is currently visible */
336 /* define function prototypes that policies can use */
337 EAPI E_Illume_Config_Zone *e_illume_zone_config_get(int id);
339 /* general functions */
340 EAPI Eina_Bool e_illume_border_is_indicator(E_Border *bd);
341 EAPI Eina_Bool e_illume_border_is_softkey(E_Border *bd);
342 EAPI Eina_Bool e_illume_border_is_keyboard(E_Border *bd);
343 EAPI Eina_Bool e_illume_border_is_home(E_Border *bd);
344 EAPI Eina_Bool e_illume_border_is_splash(E_Border *bd);
345 EAPI Eina_Bool e_illume_border_is_dialog(E_Border *bd);
346 EAPI Eina_Bool e_illume_border_is_qt_frame(E_Border *bd);
347 EAPI Eina_Bool e_illume_border_is_fullscreen(E_Border *bd);
348 EAPI Eina_Bool e_illume_border_is_conformant(E_Border *bd);
349 EAPI Eina_Bool e_illume_border_is_quickpanel(E_Border *bd);
350 EAPI Eina_Bool e_illume_border_is_fixed_size(E_Border *bd);
352 EAPI void e_illume_border_min_get(E_Border *bd, int *w, int *h);
353 EAPI E_Border *e_illume_border_at_xy_get(E_Zone *zone, int x, int y);
354 EAPI E_Border *e_illume_border_parent_get(E_Border *bd);
355 EAPI void e_illume_border_show(E_Border *bd);
356 EAPI void e_illume_border_hide(E_Border *bd);
358 /* indicator functions */
359 EAPI E_Border *e_illume_border_indicator_get(E_Zone *zone);
360 EAPI void e_illume_border_indicator_pos_get(E_Zone *zone, int *x, int *y);
362 /* softkey functions */
363 EAPI E_Border *e_illume_border_softkey_get(E_Zone *zone);
364 EAPI void e_illume_border_softkey_pos_get(E_Zone *zone, int *x, int *y);
366 /* keyboard functions */
367 EAPI E_Illume_Keyboard *e_illume_keyboard_get(void);
368 EAPI void e_illume_keyboard_safe_app_region_get(E_Zone *zone, int *x, int *y, int *w, int *h);
371 EAPI E_Border *e_illume_border_home_get(E_Zone *zone);
372 EAPI Eina_List *e_illume_border_home_borders_get(E_Zone *zone);
374 /* quickpanel functions */
375 EAPI E_Illume_Quickpanel *e_illume_quickpanel_by_zone_get(E_Zone *zone);
376 EAPI void e_illume_quickpanel_show(E_Zone *zone);
377 EAPI void e_illume_quickpanel_hide(E_Zone *zone);