wl_socket_access: Fix coding conventions and style.
[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
13 #else
14 #ifndef E_CONFIG_H
15 #define E_CONFIG_H
16
17 /* increment this whenever we change config enough that you need new
18  * defaults for e to work.
19  */
20 #define E_CONFIG_FILE_EPOCH      1
21 /* increment this whenever a new set of config values are added but the users
22  * config doesn't need to be wiped - simply new values need to be put in
23  */
24 #define E_CONFIG_FILE_GENERATION 19
25 #define E_CONFIG_FILE_VERSION    ((E_CONFIG_FILE_EPOCH * 1000000) + E_CONFIG_FILE_GENERATION)
26
27 struct _E_Config
28 {
29    int         config_version;
30    const char *desktop_default_background;
31    const char *desktop_default_name;
32    const char *desktop_default_window_profile;
33    Eina_List  *desktop_backgrounds;
34    Eina_List  *desktop_names;
35    Eina_List  *desktop_window_profiles;
36    double      framerate;
37    int         priority;
38    int         zone_desks_x_count;
39    int         zone_desks_y_count;
40    Eina_List  *modules;
41    int         window_placement_policy;
42    int         focus_policy;
43    int         focus_policy_ext;
44    int         focus_setting;
45    int         always_click_to_raise;
46    int         always_click_to_focus;
47    int         use_auto_raise;
48    int         maximize_policy;
49    int         allow_manip;
50    int         kill_if_close_not_possible;
51    int         kill_process;
52    double      kill_timer_wait;
53    int         ping_clients;
54    int         use_e_cursor;
55    int         cursor_size;
56    struct
57    {
58       int move;
59       int resize;
60       int raise;
61       int lower;
62       int layer;
63       int desktop;
64       int iconify;
65    } transient;
66    int                       fullscreen_policy;
67    int                       dpms_enable;
68    int                       dpms_standby_enable;
69    int                       dpms_suspend_enable;
70    int                       dpms_off_enable;
71    int                       dpms_standby_timeout;
72    int                       dpms_suspend_timeout;
73    int                       dpms_off_timeout;
74    unsigned char             no_dpms_on_fullscreen;
75    int                       mouse_hand;
76    int                       border_raise_on_mouse_action;
77    int                       border_raise_on_focus;
78    int                       raise_on_revert_focus;
79    const char               *theme_default_border_style;
80    int                       screen_limits;
81    int                       ping_clients_interval;
82    struct
83    {
84       double timeout;
85       struct
86       {
87          unsigned char dx;
88          unsigned char dy;
89       } move;
90       struct
91       {
92          unsigned char dx;
93          unsigned char dy;
94       } resize;
95    } border_keyboard;
96    struct
97    {
98       double        min;
99       double        max;
100       double        factor;
101       int           base_dpi;
102       unsigned char use_dpi;
103       unsigned char use_custom;
104    } scale;
105    unsigned char show_cursor;
106    unsigned char idle_cursor;
107    Eina_List    *env_vars;
108    struct
109    {
110       int          only_label;
111       const char  *default_model;
112       Eina_Bool    dont_touch_my_damn_keyboard;
113       Eina_Bool    use_cache;
114       unsigned int delay_held_key_input_to_focus;
115    } xkb;
116    struct
117    {
118       int repeat_delay; // delay in milliseconds since key down until repeating starts
119       int repeat_rate; // the rate of repeating keys in characters per second
120    } keyboard;
121    int           use_desktop_window_profile;
122 #ifdef _F_ZONE_WINDOW_ROTATION_
123    unsigned char wm_win_rotation;
124 #endif
125    int use_cursor_timer;
126    int cursor_timer_interval;
127    Eina_List *client_types;
128    const char *comp_shadow_file;
129    struct
130    {
131       unsigned char use;
132       const char   *owner;
133       const char   *group;
134       unsigned int  permissions;
135    } wl_sock_access;
136 };
137
138 struct _E_Config_Desklock_Background
139 {
140    const char *file;
141    Eina_Bool hide_logo;
142 };
143
144 struct _E_Config_Env_Var
145 {
146    const char   *var;
147    const char   *val;
148    unsigned char unset;
149 };
150
151 struct _E_Config_Syscon_Action
152 {
153    const char *action;
154    const char *params;
155    const char *button;
156    const char *icon;
157    int         is_main;
158 };
159
160 struct _E_Config_Module
161 {
162    const char   *name;
163    unsigned char enabled;
164    unsigned char delayed;
165    int           priority;
166 };
167
168 struct _E_Config_Desktop_Background
169 {
170    int         zone;
171    int         desk_x;
172    int         desk_y;
173    const char *file;
174 };
175
176 struct _E_Config_Desktop_Name
177 {
178    int         zone;
179    int         desk_x;
180    int         desk_y;
181    const char *name;
182 };
183
184 struct _E_Config_Desktop_Window_Profile
185 {
186    int         zone;
187    int         desk_x;
188    int         desk_y;
189    const char *profile;
190 };
191
192 struct _E_Event_Config_Icon_Theme
193 {
194    const char *icon_theme;
195 };
196
197 struct _E_Config_Client_Type
198 {
199    const char     *name; /* icccm.class_name */
200    const char     *clas; /* icccm.class */
201    E_Window_Type   window_type; /* Ecore_X_Window_Type / E_Window_Type */
202    int             client_type; /* E_Client_Type */
203 };
204
205 EINTERN int                   e_config_init(void);
206 EINTERN int                   e_config_shutdown(void);
207
208 E_API void                     e_config_load(void);
209
210 E_API int                      e_config_save(void);
211 E_API void                     e_config_save_queue(void);
212
213 E_API const char              *e_config_profile_get(void);
214 E_API char                    *e_config_profile_dir_get(const char *prof);
215 E_API void                     e_config_profile_set(const char *prof);
216 E_API Eina_List               *e_config_profile_list(void);
217 E_API void                     e_config_profile_add(const char *prof);
218 E_API void                     e_config_profile_del(const char *prof);
219
220 E_API void                     e_config_save_block_set(int block);
221 E_API int                      e_config_save_block_get(void);
222
223 E_API void                    *e_config_domain_load(const char *domain, E_Config_DD *edd);
224 E_API void                    *e_config_domain_system_load(const char *domain, E_Config_DD *edd);
225 E_API int                      e_config_profile_save(void);
226 E_API int                      e_config_domain_save(const char *domain, E_Config_DD *edd, const void *data);
227
228 E_API void                     e_config_mode_changed(void);
229
230 extern E_API E_Config *e_config;
231
232 extern E_API int E_EVENT_CONFIG_MODE_CHANGED;
233
234 #endif
235 #endif