8fe1a4633c34fbd6c5591f8b387fa461349eb752
[framework/uifw/e17.git] / src / bin / e_config.h
1 #ifdef E_TYPEDEFS
2
3 #define E_CONFIG_LIMIT(v, min, max) {if (v > max) v = max; else if (v < min) v = min;}
4
5 typedef struct _E_Config                    E_Config;
6 typedef struct _E_Config_Module             E_Config_Module;
7 typedef struct _E_Config_Theme              E_Config_Theme;
8 typedef struct _E_Config_Binding_Mouse      E_Config_Binding_Mouse;
9 typedef struct _E_Config_Binding_Key        E_Config_Binding_Key;
10 typedef struct _E_Config_Binding_Edge       E_Config_Binding_Edge;
11 typedef struct _E_Config_Binding_Signal     E_Config_Binding_Signal;
12 typedef struct _E_Config_Binding_Wheel      E_Config_Binding_Wheel;
13 typedef struct _E_Config_Binding_Acpi       E_Config_Binding_Acpi;
14 typedef struct _E_Config_Desktop_Background E_Config_Desktop_Background;
15 typedef struct _E_Config_Desktop_Name       E_Config_Desktop_Name;
16 typedef struct _E_Config_Gadcon             E_Config_Gadcon;
17 typedef struct _E_Config_Gadcon_Client      E_Config_Gadcon_Client;
18 typedef struct _E_Config_Shelf              E_Config_Shelf;
19 typedef struct _E_Config_Shelf_Desk         E_Config_Shelf_Desk;
20 typedef struct _E_Config_Mime_Icon          E_Config_Mime_Icon;
21 typedef struct _E_Config_Syscon_Action      E_Config_Syscon_Action;
22 typedef struct _E_Config_Env_Var            E_Config_Env_Var;
23 typedef struct _E_Event_Config_Icon_Theme   E_Event_Config_Icon_Theme;
24
25 #else
26 #ifndef E_CONFIG_H
27 #define E_CONFIG_H
28
29 /* increment this whenever we change config enough that you need new
30  * defaults for e to work.
31  */
32 #define E_CONFIG_FILE_EPOCH      0x0001
33 /* increment this whenever a new set of config values are added but the users
34  * config doesn't need to be wiped - simply new values need to be put in
35  */
36 #define E_CONFIG_FILE_GENERATION 0x0142
37 #define E_CONFIG_FILE_VERSION    ((E_CONFIG_FILE_EPOCH << 16) | E_CONFIG_FILE_GENERATION)
38
39 #define E_EVAS_ENGINE_DEFAULT         0
40 #define E_EVAS_ENGINE_SOFTWARE_X11    1
41 #define E_EVAS_ENGINE_GL_X11          2
42 #define E_EVAS_ENGINE_XRENDER_X11     3
43 #define E_EVAS_ENGINE_SOFTWARE_X11_16 4
44
45 typedef enum _E_Engine_Context
46 {
47    E_ENGINE_CONTEXT_INIT,
48    E_ENGINE_CONTEXT_CONTAINER,
49    E_ENGINE_CONTEXT_ZONE,
50    E_ENGINE_CONTEXT_BORDER,
51    E_ENGINE_CONTEXT_MENU,
52    E_ENGINE_CONTEXT_ERROR,
53    E_ENGINE_CONTEXT_WIN,
54    E_ENGINE_CONTEXT_POPUP,
55    E_ENGINE_CONTEXT_DRAG
56 } E_Engine_Context;
57
58 struct _E_Config
59 {
60    int         config_version; // INTERNAL
61    int         show_splash; // GUI
62    const char *init_default_theme; // GUI
63    const char *desktop_default_background; // GUI
64    Eina_List  *desktop_backgrounds; // GUI
65    const char *desktop_default_name;
66    Eina_List  *desktop_names; // GUI
67    double      menus_scroll_speed; // GUI
68    double      menus_fast_mouse_move_threshhold; // GUI
69    double      menus_click_drag_timeout; // GUI
70    int         border_shade_animate; // GUI
71    int         border_shade_transition; // GUI
72    double      border_shade_speed; // GUI
73    double      framerate; // GUI
74    int         priority; // GUI
75    int         image_cache; // GUI
76    int         font_cache; // GUI
77    int         edje_cache; // GUI
78    int         edje_collection_cache; // GUI
79    int         zone_desks_x_count; // GUI
80    int         zone_desks_y_count; // GUI
81    int         use_virtual_roots; // NO GUI - maybe remove?
82    int         show_desktop_icons; // GUI
83    int         edge_flip_dragging; // GUI
84    int         evas_engine_default; // GUI
85    int         evas_engine_container; // NO GUI - maybe remove?
86    int         evas_engine_init; // NO GUI - maybe remove?
87    int         evas_engine_menus; // NO GUI - maybe remove?
88    int         evas_engine_borders; // NO GUI - maybe remove?
89    int         evas_engine_errors; // NO GUI - maybe remove?
90    int         evas_engine_popups; // NO GUI - maybe remove?
91    int         evas_engine_drag; // NO GUI - maybe remove?
92    int         evas_engine_win; // NO GUI - maybe remove?
93    int         evas_engine_zone; // NO GUI - maybe remove?
94    int         use_composite; // GUI
95    const char *language; // GUI
96    Eina_List  *modules; // GUI
97    Eina_List  *font_fallbacks; // GUI
98    Eina_List  *font_defaults; // GUI
99    Eina_List  *themes; // GUI
100    Eina_List  *mouse_bindings; // GUI
101    Eina_List  *key_bindings; // GUI
102    Eina_List  *edge_bindings; // GUI
103    Eina_List  *signal_bindings;
104    Eina_List  *wheel_bindings; // GUI
105    Eina_List  *acpi_bindings; // GUI
106    Eina_List  *path_append_data; // GUI
107    Eina_List  *path_append_images; // GUI
108    Eina_List  *path_append_fonts; // GUI
109    Eina_List  *path_append_themes; // GUI
110    Eina_List  *path_append_init; // GUI
111    Eina_List  *path_append_icons; // GUI
112    Eina_List  *path_append_modules; // GUI
113    Eina_List  *path_append_backgrounds; // GUI
114    Eina_List  *path_append_messages; // GUI
115    int         window_placement_policy; // GUI
116    int         focus_policy; // GUI
117    int         focus_setting; // GUI
118    int         pass_click_on; // GUI
119    int         always_click_to_raise; // GUI
120    int         always_click_to_focus; // GUI
121    int         use_auto_raise; // GUI
122    double      auto_raise_delay; // GUI
123    int         use_resist; // GUI
124    int         drag_resist;
125    int         desk_resist; // GUI
126    int         window_resist; // GUI
127    int         gadget_resist; // GUI
128    int         geometry_auto_move; // GUI
129    int         geometry_auto_resize_limit; // GUI
130    int         winlist_warp_while_selecting; // GUI
131    int         winlist_warp_at_end; // GUI
132    double      winlist_warp_speed; // GUI
133    int         winlist_scroll_animate; // GUI
134    double      winlist_scroll_speed; // GUI
135    int         winlist_list_show_iconified; // GUI
136    int         winlist_list_show_other_desk_iconified; // GUI
137    int         winlist_list_show_other_screen_iconified; // GUI
138    int         winlist_list_show_other_desk_windows; // GUI
139    int         winlist_list_show_other_screen_windows; // GUI
140    int         winlist_list_uncover_while_selecting; // GUI
141    int         winlist_list_jump_desk_while_selecting; // GUI
142    int         winlist_list_focus_while_selecting; // GUI
143    int         winlist_list_raise_while_selecting; // GUI
144    double      winlist_pos_align_x; // GUI
145    double      winlist_pos_align_y; // GUI
146    double      winlist_pos_size_w; // GUI
147    double      winlist_pos_size_h; // GUI
148    int         winlist_pos_min_w; // GUI
149    int         winlist_pos_min_h; // GUI
150    int         winlist_pos_max_w; // GUI
151    int         winlist_pos_max_h; // GUI
152    int         maximize_policy; // GUI
153    int         allow_manip; // GUI
154    int         border_fix_on_shelf_toggle; // GUI
155    int         allow_above_fullscreen; // GUI
156    int         kill_if_close_not_possible;
157    int         kill_process;
158    double      kill_timer_wait;
159    int         ping_clients;
160    const char *transition_start; // GUI
161    const char *transition_desk; // GUI
162    const char *transition_change; // GUI
163    Eina_List  *remembers;
164    int         remember_internal_windows; // GUI
165    int         move_info_follows; // GUI
166    int         resize_info_follows; // GUI
167    int         move_info_visible; // GUI
168    int         resize_info_visible; // GUI
169    int         focus_last_focused_per_desktop; // GUI
170    int         focus_revert_on_hide_or_close; // GUI
171    int         pointer_slide; // GUI
172    int         use_e_cursor; // GUI
173    int         cursor_size; // GUI
174    int         menu_autoscroll_margin; // GUI
175    int         menu_autoscroll_cursor_margin; // GUI
176    const char *input_method; // GUI
177    struct {
178         int    move;
179         int    resize;
180         int    raise;
181         int    lower;
182         int    layer;
183         int    desktop;
184         int    iconify;
185    } transient;
186    int         modal_windows;
187    int         menu_eap_name_show; // GUI
188    int         menu_eap_generic_show; // GUI
189    int         menu_eap_comment_show; // GUI
190    int         menu_favorites_show; // GUI
191    int         menu_apps_show; // GUI
192    int         menu_gadcon_client_toplevel; // GUI
193    int         fullscreen_policy; // GUI
194    const char *exebuf_term_cmd; // GUI
195    Eina_List  *color_classes; // GUI
196    int         use_app_icon; // GUI
197    int         cnfmdlg_disabled; // GUI
198    int         cfgdlg_auto_apply; // GUI
199    int         cfgdlg_default_mode; // GUI
200    Eina_List  *gadcons; // GUI
201    Eina_List  *shelves; // GUI
202    int         font_hinting; // GUI
203
204    const char *desklock_personal_passwd; // GUI
205    const char *desklock_background; // GUI
206    int         desklock_auth_method; // GUI
207    int         desklock_login_box_zone; // GUI
208    int         desklock_start_locked; // GUI
209    int         desklock_on_suspend; // GUI
210    int         desklock_autolock_screensaver; // GUI
211    double      desklock_post_screensaver_time; // GUI
212    int         desklock_autolock_idle; // GUI
213    double      desklock_autolock_idle_timeout; // GUI
214    int         desklock_use_custom_desklock; // GUI
215    const char *desklock_custom_desklock_cmd; // GUI
216    Eina_Bool   desklock_ask_presentation; // GUI
217    double      desklock_ask_presentation_timeout; // GUI
218
219    int         screensaver_enable; // GUI
220    int         screensaver_timeout; // GUI
221    int         screensaver_interval; // GUI
222    int         screensaver_blanking; // GUI
223    int         screensaver_expose; // GUI
224    Eina_Bool   screensaver_ask_presentation; // GUI
225    double      screensaver_ask_presentation_timeout; // GUI
226
227    int         dpms_enable; // GUI
228    int         dpms_standby_enable; // GUI
229    int         dpms_standby_timeout; // GUI
230    int         dpms_suspend_enable; // GUI
231    int         dpms_suspend_timeout; // GUI
232    int         dpms_off_enable; // GUI
233    int         dpms_off_timeout; // GUI
234
235    int         clientlist_group_by; // GUI
236    int         clientlist_include_all_zones; // GUI
237    int         clientlist_separate_with; // GUI
238    int         clientlist_sort_by; // GUI
239    int         clientlist_separate_iconified_apps; // GUI
240    int         clientlist_warp_to_iconified_desktop; // GUI
241    int         clientlist_limit_caption_len; // GUI
242    int         clientlist_max_caption_len; // GUI
243
244    int         mouse_hand; //GUI
245    int         mouse_accel_numerator; // GUI
246    int         mouse_accel_denominator; // GUI
247    int         mouse_accel_threshold; // GUI
248
249    Eina_List   *screen_info; // GUI
250
251    int         border_raise_on_mouse_action; // GUI
252    int         border_raise_on_focus; // GUI
253    int         desk_flip_wrap; // GUI
254    int         fullscreen_flip; // GUI
255
256    const char *icon_theme; // GUI
257    Eina_Bool   icon_theme_overrides; // GUI
258
259    int         desk_flip_animate_mode; // GUI
260    int         desk_flip_animate_interpolation; // GUI
261    double      desk_flip_animate_time; // GUI
262    Eina_Bool   desk_flip_pan_bg;
263    double      desk_flip_pan_x_axis_factor;
264    double      desk_flip_pan_y_axis_factor;
265
266    const char *wallpaper_import_last_dev; // INTERNAL
267    const char *wallpaper_import_last_path; // INTERNAL
268
269    int wallpaper_grad_c1_r; // INTERNAL
270    int wallpaper_grad_c1_g; // INTERNAL
271    int wallpaper_grad_c1_b; // INTERNAL
272    int wallpaper_grad_c2_r; // INTERNAL
273    int wallpaper_grad_c2_g; // INTERNAL
274    int wallpaper_grad_c2_b; // INTERNAL
275
276    const char *theme_default_border_style; // GUI
277
278    Eina_List *mime_icons; // GUI
279    int desk_auto_switch; // GUI;
280
281    int thumb_nice;
282
283    int ping_clients_interval;
284    int cache_flush_poll_interval; // GUI
285
286    int thumbscroll_enable; // GUI
287    int thumbscroll_threshhold; // GUI
288    double thumbscroll_momentum_threshhold; // GUI
289    double thumbscroll_friction; // GUI
290
291    int device_desktop;
292    int device_auto_mount;
293    int device_auto_open;
294
295    struct {
296       double timeout;
297       struct {
298          unsigned char dx;
299          unsigned char dy;
300       } move;
301       struct {
302          unsigned char dx;
303          unsigned char dy;
304       } resize;
305    } border_keyboard;
306
307    struct {
308       double min; // GUI
309       double max; // GUI
310       double factor; // GUI
311       int base_dpi; // GUI
312       unsigned char use_dpi; // GUI
313       unsigned char use_custom; // GUI
314    } scale;
315
316    unsigned char show_cursor; // GUI
317    unsigned char idle_cursor; // GUI
318
319    const char *default_system_menu;
320
321    unsigned char cfgdlg_normal_wins; // GUI
322
323    struct {
324       struct {
325          int icon_size;
326       } main, secondary, extra;
327       double timeout;
328       unsigned char do_input;
329       Eina_List *actions;
330    } syscon;
331
332    struct {
333       Eina_Bool presentation;
334       Eina_Bool offline;
335    } mode;
336
337    struct {
338       double    expire_timeout;
339       Eina_Bool show_run_dialog;
340       Eina_Bool show_exit_dialog;
341    } exec;
342    
343    unsigned char null_container_win;
344    
345    Eina_List *env_vars;
346 };
347
348 struct _E_Config_Env_Var
349 {
350    const char *var;
351    const char *val;
352    unsigned char unset;
353 };
354
355 struct _E_Config_Syscon_Action
356 {
357    const char *action;
358    const char *params;
359    const char *button;
360    const char *icon;
361    int         is_main;
362 };
363
364 struct _E_Config_Module
365 {
366    const char    *name;
367    unsigned char  enabled;
368    unsigned char  delayed;
369    int            priority;
370 };
371
372 struct _E_Config_Theme
373 {
374    const char    *category;
375    const char    *file;
376 };
377
378 struct _E_Config_Binding_Mouse
379 {
380    int            context;
381    int            modifiers;
382    const char    *action;
383    const char    *params;
384    unsigned char  button;
385    unsigned char  any_mod;
386 };
387
388 struct _E_Config_Binding_Key
389 {
390    int            context;
391    int            modifiers;
392    const char    *key;
393    const char    *action;
394    const char    *params;
395    unsigned char  any_mod;
396 };
397
398 struct _E_Config_Binding_Edge
399 {
400    int            context;
401    int            modifiers;
402    float          delay;
403    const char    *action;
404    const char    *params;
405    unsigned char  edge;
406    unsigned char  any_mod;
407 };
408
409 struct _E_Config_Binding_Signal
410 {
411    int            context;
412    const char    *signal;
413    const char    *source;
414    int            modifiers;
415    unsigned char  any_mod;
416    const char    *action;
417    const char    *params;
418 };
419
420 struct _E_Config_Binding_Wheel
421 {
422    int            context;
423    int            direction;
424    int            z;
425    int            modifiers;
426    unsigned char  any_mod;
427    const char    *action;
428    const char    *params;
429 };
430
431 struct _E_Config_Binding_Acpi
432 {
433    int context, type, status;
434    const char *action, *params;
435 };
436
437 struct _E_Config_Desktop_Background
438 {
439    int            container;
440    int            zone;
441    int            desk_x;
442    int            desk_y;
443    const char    *file;
444 };
445
446 struct _E_Config_Desktop_Name
447 {
448    int            container;
449    int            zone;
450    int            desk_x;
451    int            desk_y;
452    const char    *name;
453 };
454
455 struct _E_Config_Gadcon
456 {
457    const char *name;
458    int         id;
459    int         zone;
460    Eina_List  *clients;
461 };
462
463 struct _E_Config_Gadcon_Client
464 {
465    const char    *name;
466    const char    *id;
467    struct {
468       int pos, size, res;                   //gadcon
469       double pos_x, pos_y, size_w, size_h;  //gadman
470    } geom;
471    struct {
472       int seq, flags;
473    } state_info;
474    const char    *style;
475    int            orient;
476    unsigned char  autoscroll;
477    unsigned char  resizable;
478 };
479
480 struct _E_Config_Shelf
481 {
482    const char   *name;
483    int           id;
484    int           container, zone;
485    int           layer;
486    unsigned char popup;
487    int           orient;
488    unsigned char fit_along;
489    unsigned char fit_size;
490    const char   *style;
491    int           size;
492    int           overlap;
493    int           autohide;
494    int           autohide_show_action;
495    float         hide_timeout;
496    float         hide_duration;
497    int           desk_show_mode;
498    Eina_List    *desk_list;
499 };
500
501 struct _E_Config_Shelf_Desk
502 {
503    int x, y;
504 };
505
506 struct _E_Config_Mime_Icon
507 {
508    const char *mime;
509    const char *icon;
510 };
511
512 struct _E_Event_Config_Icon_Theme
513 {
514    const char *icon_theme;
515 };
516
517 EINTERN int        e_config_init(void);
518 EINTERN int        e_config_shutdown(void);
519
520 EAPI void       e_config_load(void);
521
522 EAPI int        e_config_save(void);
523 EAPI void       e_config_save_flush(void);
524 EAPI void       e_config_save_queue(void);
525
526 EAPI const char*e_config_profile_get(void);
527 EAPI char      *e_config_profile_dir_get(const char *prof);
528 EAPI void       e_config_profile_set(const char *prof);
529 EAPI Eina_List *e_config_profile_list(void);
530 EAPI void       e_config_profile_add(const char *prof);
531 EAPI void       e_config_profile_del(const char *prof);
532
533 EAPI Eina_List *e_config_engine_list(void);
534
535 EAPI void       e_config_save_block_set(int block);
536 EAPI int        e_config_save_block_get(void);
537
538 EAPI void      *e_config_domain_load(const char *domain, E_Config_DD *edd);
539 EAPI void      *e_config_domain_system_load(const char *domain, E_Config_DD *edd);
540 EAPI int        e_config_profile_save(void);
541 EAPI int        e_config_domain_save(const char *domain, E_Config_DD *edd, const void *data);
542
543 EAPI E_Config_Binding_Mouse  *e_config_binding_mouse_match(E_Config_Binding_Mouse *eb_in);
544 EAPI E_Config_Binding_Key    *e_config_binding_key_match(E_Config_Binding_Key *eb_in);
545 EAPI E_Config_Binding_Edge   *e_config_binding_edge_match(E_Config_Binding_Edge *eb_in);
546 EAPI E_Config_Binding_Signal *e_config_binding_signal_match(E_Config_Binding_Signal *eb_in);
547 EAPI E_Config_Binding_Wheel  *e_config_binding_wheel_match(E_Config_Binding_Wheel *eb_in);
548 EAPI E_Config_Binding_Acpi   *e_config_binding_acpi_match(E_Config_Binding_Acpi *eb_in);
549 EAPI void                     e_config_mode_changed(void);
550
551 extern EAPI E_Config *e_config;
552
553 extern EAPI int E_EVENT_CONFIG_ICON_THEME;
554 extern EAPI int E_EVENT_CONFIG_MODE_CHANGED;
555
556 #endif
557 #endif