Migrating source code to RSA from private.
[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_Desktop_Window_Profile E_Config_Desktop_Window_Profile;
17 typedef struct _E_Config_Gadcon                 E_Config_Gadcon;
18 typedef struct _E_Config_Gadcon_Client          E_Config_Gadcon_Client;
19 typedef struct _E_Config_Shelf                  E_Config_Shelf;
20 typedef struct _E_Config_Shelf_Desk             E_Config_Shelf_Desk;
21 typedef struct _E_Config_Mime_Icon              E_Config_Mime_Icon;
22 typedef struct _E_Config_Syscon_Action          E_Config_Syscon_Action;
23 typedef struct _E_Config_Env_Var                E_Config_Env_Var;
24 typedef struct _E_Event_Config_Icon_Theme       E_Event_Config_Icon_Theme;
25
26 #else
27 #ifndef E_CONFIG_H
28 #define E_CONFIG_H
29
30 /* increment this whenever we change config enough that you need new
31  * defaults for e to work.
32  */
33 #define E_CONFIG_FILE_EPOCH      0x0001
34 /* increment this whenever a new set of config values are added but the users
35  * config doesn't need to be wiped - simply new values need to be put in
36  */
37 #define E_CONFIG_FILE_GENERATION 0x0148
38 #define E_CONFIG_FILE_VERSION    ((E_CONFIG_FILE_EPOCH << 16) | E_CONFIG_FILE_GENERATION)
39
40 struct _E_Config
41 {
42    int         config_version; // INTERNAL
43    int         show_splash; // GUI
44    const char *init_default_theme; // GUI
45    const char *desktop_default_background; // GUI
46    Eina_List  *desktop_backgrounds; // GUI
47    const char *desktop_default_name;
48    const char *desktop_default_window_profile;
49    Eina_List  *desktop_names; // GUI
50    Eina_List  *desktop_window_profiles; // GUI
51    double      menus_scroll_speed; // GUI
52    double      menus_fast_mouse_move_threshhold; // GUI
53    double      menus_click_drag_timeout; // GUI
54    int         border_shade_animate; // GUI
55    int         border_shade_transition; // GUI
56    double      border_shade_speed; // GUI
57    double      framerate; // GUI
58    int         priority; // GUI
59    int         image_cache; // GUI
60    int         font_cache; // GUI
61    int         edje_cache; // GUI
62    int         edje_collection_cache; // GUI
63    int         zone_desks_x_count; // GUI
64    int         zone_desks_y_count; // GUI
65    int         show_desktop_icons; // GUI
66    int         edge_flip_dragging; // GUI
67    int         use_composite; // GUI
68    const char *language; // GUI
69    Eina_List  *modules; // GUI
70    Eina_List  *font_fallbacks; // GUI
71    Eina_List  *font_defaults; // GUI
72    Eina_List  *themes; // GUI
73    Eina_List  *mouse_bindings; // GUI
74    Eina_List  *key_bindings; // GUI
75    Eina_List  *edge_bindings; // GUI
76    Eina_List  *signal_bindings;
77    Eina_List  *wheel_bindings; // GUI
78    Eina_List  *acpi_bindings; // GUI
79    Eina_List  *path_append_data; // GUI
80    Eina_List  *path_append_images; // GUI
81    Eina_List  *path_append_fonts; // GUI
82    Eina_List  *path_append_themes; // GUI
83    Eina_List  *path_append_init; // GUI
84    Eina_List  *path_append_icons; // GUI
85    Eina_List  *path_append_modules; // GUI
86    Eina_List  *path_append_backgrounds; // GUI
87    Eina_List  *path_append_messages; // GUI
88    int         window_placement_policy; // GUI
89    int         focus_policy; // GUI
90    int         focus_setting; // GUI
91    int         pass_click_on; // GUI
92    int         always_click_to_raise; // GUI
93    int         always_click_to_focus; // GUI
94    int         use_auto_raise; // GUI
95    double      auto_raise_delay; // GUI
96    int         use_resist; // GUI
97    int         drag_resist;
98    int         desk_resist; // GUI
99    int         window_resist; // GUI
100    int         gadget_resist; // GUI
101    int         geometry_auto_move; // GUI
102    int         geometry_auto_resize_limit; // GUI
103    int         winlist_warp_while_selecting; // GUI
104    int         winlist_warp_at_end; // GUI
105    double      winlist_warp_speed; // GUI
106    int         winlist_scroll_animate; // GUI
107    double      winlist_scroll_speed; // GUI
108    int         winlist_list_show_iconified; // GUI
109    int         winlist_list_show_other_desk_iconified; // GUI
110    int         winlist_list_show_other_screen_iconified; // GUI
111    int         winlist_list_show_other_desk_windows; // GUI
112    int         winlist_list_show_other_screen_windows; // GUI
113    int         winlist_list_uncover_while_selecting; // GUI
114    int         winlist_list_jump_desk_while_selecting; // GUI
115    int         winlist_list_focus_while_selecting; // GUI
116    int         winlist_list_raise_while_selecting; // GUI
117    double      winlist_pos_align_x; // GUI
118    double      winlist_pos_align_y; // GUI
119    double      winlist_pos_size_w; // GUI
120    double      winlist_pos_size_h; // GUI
121    int         winlist_pos_min_w; // GUI
122    int         winlist_pos_min_h; // GUI
123    int         winlist_pos_max_w; // GUI
124    int         winlist_pos_max_h; // GUI
125    int         maximize_policy; // GUI
126    int         allow_manip; // GUI
127    int         border_fix_on_shelf_toggle; // GUI
128    int         allow_above_fullscreen; // GUI
129    int         kill_if_close_not_possible; // GUI
130    int         kill_process; // GUI
131    double      kill_timer_wait; // GUI
132    int         ping_clients; // GUI
133    const char *transition_start; // GUI
134    const char *transition_desk; // GUI
135    const char *transition_change; // GUI
136    Eina_List  *remembers; // GUI
137    int         remember_internal_windows; // GUI
138    int         move_info_follows; // GUI
139    int         resize_info_follows; // GUI
140    int         move_info_visible; // GUI
141    int         resize_info_visible; // GUI
142    int         focus_last_focused_per_desktop; // GUI
143    int         focus_revert_on_hide_or_close; // GUI
144    int         pointer_slide; // GUI
145    int         use_e_cursor; // GUI
146    int         cursor_size; // GUI
147    int         menu_autoscroll_margin; // GUI
148    int         menu_autoscroll_cursor_margin; // GUI
149    const char *input_method; // GUI
150    struct {
151         int    move; // GUI
152         int    resize; // GUI
153         int    raise; // GUI
154         int    lower; // GUI
155         int    layer; // GUI
156         int    desktop; // GUI
157         int    iconify; // GUI
158    } transient;
159    int         modal_windows;
160    int         menu_eap_name_show; // GUI
161    int         menu_eap_generic_show; // GUI
162    int         menu_eap_comment_show; // GUI
163    int         menu_favorites_show; // GUI
164    int         menu_apps_show; // GUI
165    int         menu_gadcon_client_toplevel; // GUI
166    int         fullscreen_policy; // GUI
167    const char *exebuf_term_cmd; // GUI
168    Eina_List  *color_classes; // GUI
169    int         use_app_icon; // GUI
170    int         cnfmdlg_disabled; // GUI
171    int         cfgdlg_auto_apply; // GUI
172    int         cfgdlg_default_mode; // GUI
173    Eina_List  *gadcons; // GUI
174    Eina_List  *shelves; // GUI
175    int         font_hinting; // GUI
176
177    const char *desklock_personal_passwd; // GUI
178    const char *desklock_background; // GUI
179    int         desklock_auth_method; // GUI
180    int         desklock_login_box_zone; // GUI
181    int         desklock_start_locked; // GUI
182    int         desklock_on_suspend; // GUI
183    int         desklock_autolock_screensaver; // GUI
184    double      desklock_post_screensaver_time; // GUI
185    int         desklock_autolock_idle; // GUI
186    double      desklock_autolock_idle_timeout; // GUI
187    int         desklock_use_custom_desklock; // GUI
188    const char *desklock_custom_desklock_cmd; // GUI
189    unsigned char desklock_ask_presentation; // GUI
190    double        desklock_ask_presentation_timeout; // GUI
191
192    int         screensaver_enable; // GUI
193    int         screensaver_timeout; // GUI
194    int         screensaver_interval; // GUI
195    int         screensaver_blanking; // GUI
196    int         screensaver_expose; // GUI
197    unsigned char screensaver_ask_presentation; // GUI
198    double        screensaver_ask_presentation_timeout; // GUI
199    
200    unsigned char screensaver_suspend; // GUI
201    unsigned char screensaver_suspend_on_ac; // GUI
202    double        screensaver_suspend_delay; // GUI
203
204    int         dpms_enable; // GUI
205    int         dpms_standby_enable; // GUI
206    int         dpms_standby_timeout; // GUI
207    int         dpms_suspend_enable; // GUI
208    int         dpms_suspend_timeout; // GUI
209    int         dpms_off_enable; // GUI
210    int         dpms_off_timeout; // GUI
211
212    int         clientlist_group_by; // GUI
213    int         clientlist_include_all_zones; // GUI
214    int         clientlist_separate_with; // GUI
215    int         clientlist_sort_by; // GUI
216    int         clientlist_separate_iconified_apps; // GUI
217    int         clientlist_warp_to_iconified_desktop; // GUI
218    int         clientlist_limit_caption_len; // GUI
219    int         clientlist_max_caption_len; // GUI
220
221    int         mouse_hand; //GUI
222    int         mouse_accel_numerator; // GUI
223    int         mouse_accel_denominator; // GUI
224    int         mouse_accel_threshold; // GUI
225
226    E_Randr_Serialized_Setup   *randr_serialized_setup; // GUI
227
228    int         border_raise_on_mouse_action; // GUI
229    int         border_raise_on_focus; // GUI
230    int         desk_flip_wrap; // GUI
231    int         fullscreen_flip; // GUI
232
233    const char    *icon_theme; // GUI
234    unsigned char  icon_theme_overrides; // GUI
235
236    int           desk_flip_animate_mode; // GUI
237    int           desk_flip_animate_interpolation; // GUI
238    double        desk_flip_animate_time; // GUI
239
240    const char *wallpaper_import_last_dev; // INTERNAL
241    const char *wallpaper_import_last_path; // INTERNAL
242
243    const char *theme_default_border_style; // GUI
244
245    Eina_List *mime_icons; // GUI
246    int desk_auto_switch; // GUI;
247
248    int thumb_nice;
249
250    int ping_clients_interval; // GUI
251    int cache_flush_poll_interval; // GUI
252
253    int thumbscroll_enable; // GUI
254    int thumbscroll_threshhold; // GUI
255    double thumbscroll_momentum_threshhold; // GUI
256    double thumbscroll_friction; // GUI
257
258    int device_desktop; // GUI
259    int device_auto_mount; // GUI
260    int device_auto_open; // GUI
261
262    struct {
263       double timeout; // GUI
264       struct {
265          unsigned char dx; // GUI
266          unsigned char dy; // GUI
267       } move;
268       struct {
269          unsigned char dx; // GUI
270          unsigned char dy; // GUI
271       } resize;
272    } border_keyboard;
273
274    struct {
275       double min; // GUI
276       double max; // GUI
277       double factor; // GUI
278       int base_dpi; // GUI
279       unsigned char use_dpi; // GUI
280       unsigned char use_custom; // GUI
281    } scale;
282
283    unsigned char show_cursor; // GUI
284    unsigned char idle_cursor; // GUI
285
286    const char *default_system_menu; // GUI
287
288    unsigned char cfgdlg_normal_wins; // GUI
289
290    struct {
291       struct {
292          int         icon_size; // GUI
293       } main, secondary, extra;
294       double         timeout; // GUI
295       unsigned char  do_input; // GUI
296       Eina_List     *actions;
297    } syscon;
298
299    struct {
300       unsigned char presentation; // INTERNAL
301       unsigned char offline; // INTERNAL
302    } mode;
303
304    struct {
305       double        expire_timeout;
306       unsigned char show_run_dialog;
307       unsigned char show_exit_dialog;
308    } exec;
309    
310    unsigned char null_container_win; // HYPER-ADVANCED-ONLY - TURNING ON KILLS DESKTOP BG
311    
312    Eina_List *env_vars; // GUI
313    
314    struct {
315       double normal; // GUI
316       double dim; // GUI
317       double transition; // GUI
318       unsigned char idle_dim; // GUI
319       double timer; // GUI
320    } backlight;
321    
322    struct {
323       unsigned char load_xrdb; // GUI
324       unsigned char load_xmodmap; // GUI
325       unsigned char load_gnome; // GUI
326       unsigned char load_kde; // GUI
327    } deskenv;
328
329    struct {
330       unsigned char  enabled; // GUI
331       unsigned char  match_e17_theme; // GUI
332       unsigned char  match_e17_icon_theme; // GUI
333       int            xft_antialias;
334       int            xft_hinting;
335       const char    *xft_hint_style;
336       const char    *xft_rgba;
337       const char    *net_theme_name; // GUI
338       const char    *net_icon_theme_name; // GUI
339       const char    *gtk_font_name;
340    } xsettings;
341    
342    struct {
343       unsigned char check; // INTERNAL
344       unsigned char later; // INTERNAL
345    } update;
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    unsigned 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_Desktop_Window_Profile
456 {
457    int            container;
458    int            zone;
459    int            desk_x;
460    int            desk_y;
461    const char    *profile;
462 };
463
464 struct _E_Config_Gadcon
465 {
466    const char *name;
467    int         id;
468    int         zone;
469    Eina_List  *clients;
470 };
471
472 struct _E_Config_Gadcon_Client
473 {
474    const char    *name;
475    const char    *id;
476    struct {
477       int pos, size, res;                   //gadcon
478       double pos_x, pos_y, size_w, size_h;  //gadman
479    } geom;
480    struct {
481       int seq, flags;
482    } state_info;
483    const char    *style;
484    int            orient;
485    unsigned char  autoscroll;
486    unsigned char  resizable;
487    const char *theme;
488 };
489
490 struct _E_Config_Shelf
491 {
492    const char   *name;
493    int           id;
494    int           container, zone;
495    int           layer;
496    unsigned char popup;
497    int           orient;
498    unsigned char fit_along;
499    unsigned char fit_size;
500    const char   *style;
501    int           size;
502    int           overlap;
503    int           autohide;
504    int           autohide_show_action;
505    float         hide_timeout;
506    float         hide_duration;
507    int           desk_show_mode;
508    Eina_List    *desk_list;
509 };
510
511 struct _E_Config_Shelf_Desk
512 {
513    int x, y;
514 };
515
516 struct _E_Config_Mime_Icon
517 {
518    const char *mime;
519    const char *icon;
520 };
521
522 struct _E_Event_Config_Icon_Theme
523 {
524    const char *icon_theme;
525 };
526
527 EINTERN int        e_config_init(void);
528 EINTERN int        e_config_shutdown(void);
529
530 EAPI void       e_config_load(void);
531
532 EAPI int        e_config_save(void);
533 EAPI void       e_config_save_flush(void);
534 EAPI void       e_config_save_queue(void);
535
536 EAPI const char*e_config_profile_get(void);
537 EAPI char      *e_config_profile_dir_get(const char *prof);
538 EAPI void       e_config_profile_set(const char *prof);
539 EAPI Eina_List *e_config_profile_list(void);
540 EAPI void       e_config_profile_add(const char *prof);
541 EAPI void       e_config_profile_del(const char *prof);
542
543 EAPI void       e_config_save_block_set(int block);
544 EAPI int        e_config_save_block_get(void);
545
546 EAPI void      *e_config_domain_load(const char *domain, E_Config_DD *edd);
547 EAPI void      *e_config_domain_system_load(const char *domain, E_Config_DD *edd);
548 EAPI int        e_config_profile_save(void);
549 EAPI int        e_config_domain_save(const char *domain, E_Config_DD *edd, const void *data);
550
551 EAPI E_Config_Binding_Mouse  *e_config_binding_mouse_match(E_Config_Binding_Mouse *eb_in);
552 EAPI E_Config_Binding_Key    *e_config_binding_key_match(E_Config_Binding_Key *eb_in);
553 EAPI E_Config_Binding_Edge   *e_config_binding_edge_match(E_Config_Binding_Edge *eb_in);
554 EAPI E_Config_Binding_Signal *e_config_binding_signal_match(E_Config_Binding_Signal *eb_in);
555 EAPI E_Config_Binding_Wheel  *e_config_binding_wheel_match(E_Config_Binding_Wheel *eb_in);
556 EAPI E_Config_Binding_Acpi   *e_config_binding_acpi_match(E_Config_Binding_Acpi *eb_in);
557 EAPI void                     e_config_mode_changed(void);
558
559 extern EAPI E_Config *e_config;
560
561 extern EAPI int E_EVENT_CONFIG_ICON_THEME;
562 extern EAPI int E_EVENT_CONFIG_MODE_CHANGED;
563 extern EAPI int E_EVENT_CONFIG_LOADED;
564
565 #endif
566 #endif