e_config: remove e_config_mode_changed
[platform/upstream/enlightenment.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_Desktop_Name           E_Config_Desktop_Name;
8 typedef struct _E_Config_Desktop_Window_Profile E_Config_Desktop_Window_Profile;
9 typedef struct _E_Config_Desktop_Background     E_Config_Desktop_Background;
10 typedef struct _E_Config_Env_Var                E_Config_Env_Var;
11 typedef struct _E_Config_Client_Type            E_Config_Client_Type;
12 typedef struct _E_Config_Policy_Desk            E_Config_Policy_Desk;
13 typedef struct _E_Config_Socket_Access          E_Config_Socket_Access;
14 typedef struct _E_Config_Aux_Hint_Supported     E_Config_Aux_Hint_Supported;
15
16 #else
17 #ifndef E_CONFIG_H
18 #define E_CONFIG_H
19
20 /* increment this whenever we change config enough that you need new
21  * defaults for e to work.
22  */
23 #define E_CONFIG_FILE_EPOCH      1
24 /* increment this whenever a new set of config values are added but the users
25  * config doesn't need to be wiped - simply new values need to be put in
26  */
27 #define E_CONFIG_FILE_GENERATION 19
28 #define E_CONFIG_FILE_VERSION    ((E_CONFIG_FILE_EPOCH * 1000000) + E_CONFIG_FILE_GENERATION)
29
30 struct _E_Config
31 {
32    int         config_version; // INTERNAL
33    const char *desktop_default_background;
34    const char *desktop_default_name;
35    const char *desktop_default_window_profile;
36    Eina_List  *desktop_backgrounds;
37    Eina_List  *desktop_names;
38    Eina_List  *desktop_window_profiles;
39    double      framerate;
40    int         priority;
41    int         zone_desks_x_count;
42    int         zone_desks_y_count;
43    Eina_List  *modules;
44    int         use_e_policy;
45    struct
46      {
47         const char   *title;
48         const char   *clas;
49         unsigned int  type;
50      } launcher;
51    Eina_List  *policy_desks;
52    int         use_configured_desks;
53    int         use_softkey_service;
54    int         use_softkey;
55    int         softkey_size;
56    int         window_placement_policy;
57    int         focus_policy;
58    int         focus_policy_ext;
59    int         focus_setting;
60    int         always_click_to_raise;
61    int         always_click_to_focus;
62    int         use_auto_raise;
63    int         maximize_policy;
64    int         allow_manip;
65    int         kill_if_close_not_possible;
66    int         kill_process;
67    double      kill_timer_wait;
68    int         ping_clients;
69    int         use_e_cursor;
70    int         cursor_size;
71    struct
72    {
73       int move;
74       int resize;
75       int raise;
76       int lower;
77       int layer;
78       int desktop;
79       int iconify;
80    } transient;
81    int                       fullscreen_policy;
82    int                       dpms_enable;
83    int                       dpms_standby_enable;
84    int                       dpms_suspend_enable;
85    int                       dpms_off_enable;
86    int                       dpms_standby_timeout;
87    int                       dpms_suspend_timeout;
88    int                       dpms_off_timeout;
89    unsigned char             no_dpms_on_fullscreen;
90    int                       mouse_hand;
91    int                       border_raise_on_mouse_action;
92    int                       border_raise_on_focus;
93    int                       raise_on_revert_focus;
94    const char               *theme_default_border_style;
95    int                       screen_limits;
96    int                       ping_clients_interval;
97    struct
98    {
99       double timeout;
100       struct
101       {
102          unsigned char dx;
103          unsigned char dy;
104       } move;
105       struct
106       {
107          unsigned char dx;
108          unsigned char dy;
109       } resize;
110    } border_keyboard;
111    struct
112    {
113       double        min;
114       double        max;
115       double        factor;
116       double        profile_factor;
117       double        inch_correction;
118       double        inch_correction_bound;
119       int           base_dpi;
120       unsigned char use_dpi;
121       unsigned char use_custom;
122       unsigned char for_tdm;
123    } scale;
124    unsigned char show_cursor;
125    unsigned char idle_cursor;
126    Eina_List    *env_vars;
127    struct
128    {
129       int          only_label;
130       const char  *default_model;
131       Eina_Bool    dont_touch_my_damn_keyboard;
132       Eina_Bool    use_cache; // use a cached keymap file insteads generate a new keymap file
133       unsigned int delay_held_key_input_to_focus; // delay in milliseconds that sends the key press event when the focus window is changed
134       struct
135       {
136           const char *rules; // enlightenment's default xkb rules
137           const char *model; // enlightenment's default xkb model
138           const char *layout; // enlightenment's default xkb layout
139           const char *variant; // enlightenment's default xkb variant
140           const char *options; // enlightenment's default xkb options
141       } default_rmlvo;
142    } xkb;
143    struct
144    {
145       int repeat_delay; // delay in milliseconds since key down until repeating starts
146       int repeat_rate; // the rate of repeating keys in characters per second
147    } keyboard;
148    int           use_desktop_window_profile;
149 #ifdef _F_ZONE_WINDOW_ROTATION_
150    unsigned char wm_win_rotation;
151    Eina_Bool     wm_win_rotation_swap_size;
152 #endif
153    unsigned int screen_rotation_pre; // screen-rotation value as default (0/90/180/270)
154    unsigned int screen_rotation_setting; // screen-rotation value which is set in runtime (0/90/180/270)
155    Eina_Bool screen_rotation_client_ignore; // client ignores screen rotation (0/1)
156    Eina_Bool eom_enable; // 0: eom disable, 1: eom enable
157    int use_cursor_timer; // boolean value for enabling cursor timer (default : disable : 0)
158    int cursor_timer_interval; // time value the cursor will be displayed in second (default : 5)
159    Eina_List *client_types;
160    const char *comp_shadow_file;
161    int                       sleep_for_dri;   // 0: disable the dri device file check
162                                               // 1: wait until the dri device file is created at startup
163    int                       create_wm_ready; // 0: disable the creation of wm_ready file
164                                               // 1: create a wm_ready file to let other daemons know
165                                               // about the completion of server initialization
166    int                       create_wm_start; // 0: disable the creation of wm_start file
167                                               // 1: create a wm_start file to let other daemons know
168                                               // that non-delayed server modules are loaded
169    // property of canvas background object
170    struct
171    {
172       unsigned char r, g, b, a; // RGBA color components of canvas background object
173       int opmode;               // blending operation for canvas background object
174                                 // e.g., EVAS_RENDER_COPY
175    } comp_canvas_bg;
176
177    int delayed_load_idle_count;
178    Eina_Bool use_buffer_flush; // 0: none, 1: let a client flush buffer when it is changed into iconic state to save memory
179    Eina_Bool use_buffer_flush_timeout; // 0: none 1: use buffer_flush timer
180    double buffer_flush_timer_interval; // time value the interval of buffer flush after iconify or commit in second (default : 0)
181    Eina_Bool use_desk_smart_obj; // 0: none, 1: make e_desk as a smart object
182    Eina_List *sock_accesses; // list of socket(wayland-0, tbm-drm-auto, tbm-socket) to grant permission without systemd
183    Eina_List *aux_hint_supported; // pre-defined aux hint list for a client launched ahead of delayed e-module loading
184    struct
185    {
186       Eina_Bool qp; // whether to use extra quickpanel module for handling quickpanel
187    } use_module_srv;
188    double launchscreen_timeout; // time to dismiss launchscreen
189    Eina_Bool enable_conformant_ack; // 0: no ack check, 1: conformant region show/hide delay until ack
190    double conformant_ack_timeout; // not to wait conformant ack if timer expires
191    Eina_Bool calc_vis_without_effect; // 0: none, 1: send visibility event to a client eventhough running effect due to performance issue.
192    Eina_Bool save_win_buffer;
193    /* NOTE:
194     * On some platform, a video client doesn't present its image buffer, but
195     * present something like dummy buffer having meta information to display
196     * server.
197     * Thus, it doesn't make sense to save this kind of buffer as an image file,
198     * and it can even cause crash like SIGSEGV.
199     * For this reason, this has to be disabled on such platform. */
200    Eina_Bool save_video_buffer; // 0: disable capturering video buffer, 1: enable, see 'e_comp_wl_capture.c'
201    Eina_Bool hold_prev_win_img;
202    const char *indicator_plug_name; // name of indicator ecore_evas_plug such as "elm_indicator"
203    Eina_Bool launchscreen_without_timer; // 0: dismiss launchscreen when timer expires, 1: it doesn't use timer
204    int log_type; // where to print dlog (0: default log, 1: system log)
205    int rsm_buffer_release_mode; // 0:none, 1:release on free, 2:release on hide
206    Eina_Bool deiconify_approve; // 0:none, 1:wait render commit when deiconify
207    double deiconify_pending_timeout;
208    Eina_Bool use_pp_zoom; // 0: pp zoom disable, 1: pp zoom enable
209    Eina_Bool priority_control; // 0: no priority change, 1: priority raise on focus
210
211    // performs evas_norender in idle to avoid memory leaks for evas objects
212    //
213    // The memory leak in the evas could occur if E doesn't perform evas rendering.
214    // It is because cleanup for evas object is processed in the rendering stage of
215    // evas. Thus if E is always performing HWC for compositing the new evas object,
216    // then leak can occurs on the evas side even after deletion of that object.
217    //
218    // In order to resolve it, we have added comp_canvas_norender configuration value.
219    // If user enables this configuration, then E always performs evas_norender in idle
220    // to cleanup evas objects which had not been rendered through evas rendering.
221    struct
222    {
223       unsigned char use; // boolean value for enabling evas_norender in idle (default : disable : 0)
224    } comp_canvas_norender;
225    Eina_Bool qp_ignore_indicator_mode;
226    Eina_Bool qp_use_bg_rect;
227    struct
228    {
229       unsigned char use_alpha; // boolean value for applying transparency to qp handler (default : disable : 0)
230       int           alpha; // alpha component (0:transparent, 255:opaque), only used when use_alpha is 1
231    } qp_handler;
232    Eina_Bool qp_add_on_desk_smart;
233
234    // e_gesture_service supports multi finger gestures.
235    // The enlightenment doesn't know when other finger's touch down is come.
236    // So waiting other fingers after first finger touch down using some methods.
237    //
238    // But each devices has different touch sensitivity, so make these values configurable.
239    // wait_time: waiting times set fingers are come
240    // wait_dist: if current touched fingers are moving sufficiently, stop waiting other fingers
241    struct
242    {
243       double wait_time; // default value is 0.1(sec)
244       int wait_dist;
245    } gesture_service;
246
247    // Configured output resolution
248    struct
249    {
250       unsigned char use; // use the configured output resolution.
251       int w;             // width of the configured output resolution.
252       int h;             // height of the configured output resolution.
253    } configured_output_resolution;
254
255    // Configured for maximum touch count
256    struct
257    {
258       unsigned char use; // use the configured maximum touch count
259       int count;             // value of the configured maximum touch count
260    } configured_max_touch;
261
262    // Configured output resolution for Global Cursor Window
263    struct
264    {
265       unsigned char use; // use the configured output resolution for global cursor.
266       int w;             // width of the configured output resolution for global cursor.
267       int h;             // height of the configured output resolution for global cursor.
268    } cursor_configured_output_resolution;
269
270    //specific global object( client not to bind )
271    struct
272    {
273       Eina_Bool launch_effect; // iface name : tizen_launch_effect
274    } global_object_not_provide;
275
276    Eina_Bool use_thread_max_cpu; //set cpu count to ecore thread max
277    Eina_Bool use_desk_area;
278
279    struct
280    {
281       Eina_Bool enable;
282       double    duration;
283    } desk_zoom_effect;
284
285    //set fake output resolution environment
286    struct
287    {
288       unsigned char use; // use fake_output_resolution
289       int w;             // fake resolution width
290       int h;             // fake resolution height
291    } fake_output_resolution;
292    Eina_Bool raise_before_show; // 0: raise after show, 1: raise before show
293    Eina_Bool interactive_resize; // 0: resize when pointer release, 1: interactive resize during pointer drag
294
295    struct
296    {
297       int type; // 0: rectangle, 1: image
298
299       // for rectangle
300       Eina_Bool customize; // 0: use default color, 1: use customized color
301       int r, g, b, a;
302
303       // for image
304       const char *image_path; // path of an image object
305       struct
306       {
307          int l, r, t, b;
308       } border_width; // border of an image object
309    } resize_object;
310
311    Eina_Bool calc_vis_ignore_geometry; // 0: unset ignore geometry, 1: ignore geometry calculate when the calculation of visibility.
312 };
313
314 struct _E_Config_Desklock_Background
315 {
316    const char *file;
317    Eina_Bool hide_logo;
318 };
319
320 struct _E_Config_Env_Var
321 {
322    const char   *var;
323    const char   *val;
324    unsigned char unset;
325 };
326
327 struct _E_Config_Syscon_Action
328 {
329    const char *action;
330    const char *params;
331    const char *button;
332    const char *icon;
333    int         is_main;
334 };
335
336 struct _E_Config_Module
337 {
338    const char   *name;
339    unsigned char enabled;
340    unsigned char delayed;
341    int           priority;
342 };
343
344 struct _E_Config_Desktop_Background
345 {
346    int         zone;
347    int         desk_x;
348    int         desk_y;
349    const char *file;
350 };
351
352 struct _E_Config_Desktop_Name
353 {
354    int         zone;
355    int         desk_x;
356    int         desk_y;
357    const char *name;
358 };
359
360 struct _E_Config_Desktop_Window_Profile
361 {
362    int         zone;
363    int         desk_x;
364    int         desk_y;
365    const char *profile;
366 };
367
368 struct _E_Event_Config_Icon_Theme
369 {
370    const char *icon_theme;
371 };
372
373 struct _E_Config_Client_Type
374 {
375    const char     *name; /* icccm.class_name */
376    const char     *clas; /* icccm.class */
377    E_Window_Type   window_type; /* Ecore_X_Window_Type / E_Window_Type */
378    int             client_type; /* E_Client_Type */
379 };
380
381 struct _E_Config_Policy_Desk
382 {
383    unsigned int zone_num;
384    int x, y;
385    int enable;
386 };
387
388 struct _E_Config_Socket_Access
389 {
390    struct
391    {
392       unsigned char use;
393       const char   *name;
394       const char   *owner;
395       const char   *group;
396       unsigned int  permissions;
397       struct
398       {
399          unsigned char use;
400          const char   *name;
401          const char   *value;
402          int           flags;
403       } smack;
404    } sock_access;
405    struct
406    {
407       unsigned char use;
408       const char   *link_name;
409       const char   *owner;
410       const char   *group;
411       struct
412       {
413          const char   *name;
414          const char   *value;
415          int           flags;
416       } smack;
417    } sock_symlink_access;
418 };
419
420 struct _E_Config_Aux_Hint_Supported
421 {
422    const char *name;
423 };
424
425 EINTERN int                   e_config_init(void);
426 EINTERN int                   e_config_shutdown(void);
427
428 E_API void                     e_config_load(void);
429
430 E_API int                      e_config_save(void);
431 E_API void                     e_config_save_queue(void);
432
433 E_API const char              *e_config_profile_get(void);
434 E_API char                    *e_config_profile_dir_get(const char *prof);
435 E_API void                     e_config_profile_set(const char *prof);
436 E_API Eina_List               *e_config_profile_list(void);
437 E_API void                     e_config_profile_add(const char *prof);
438 E_API void                     e_config_profile_del(const char *prof);
439
440 E_API void                     e_config_save_block_set(int block);
441 E_API int                      e_config_save_block_get(void);
442
443 E_API void                    *e_config_domain_load(const char *domain, E_Config_DD *edd);
444 E_API void                    *e_config_domain_system_load(const char *domain, E_Config_DD *edd);
445 E_API int                      e_config_profile_save(void);
446 E_API int                      e_config_domain_save(const char *domain, E_Config_DD *edd, const void *data);
447
448 extern E_API E_Config *e_config;
449
450 #endif
451 #endif