Fix missed scale calculation for tdm output
[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;
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_softkey;
53    int         softkey_size;
54    int         window_placement_policy;
55    int         focus_policy;
56    int         focus_policy_ext;
57    int         focus_setting;
58    int         always_click_to_raise;
59    int         always_click_to_focus;
60    int         use_auto_raise;
61    int         maximize_policy;
62    int         allow_manip;
63    int         kill_if_close_not_possible;
64    int         kill_process;
65    double      kill_timer_wait;
66    int         ping_clients;
67    int         use_e_cursor;
68    int         cursor_size;
69    struct
70    {
71       int move;
72       int resize;
73       int raise;
74       int lower;
75       int layer;
76       int desktop;
77       int iconify;
78    } transient;
79    int                       fullscreen_policy;
80    int                       dpms_enable;
81    int                       dpms_standby_enable;
82    int                       dpms_suspend_enable;
83    int                       dpms_off_enable;
84    int                       dpms_standby_timeout;
85    int                       dpms_suspend_timeout;
86    int                       dpms_off_timeout;
87    unsigned char             no_dpms_on_fullscreen;
88    int                       mouse_hand;
89    int                       border_raise_on_mouse_action;
90    int                       border_raise_on_focus;
91    int                       raise_on_revert_focus;
92    const char               *theme_default_border_style;
93    int                       screen_limits;
94    int                       ping_clients_interval;
95    struct
96    {
97       double timeout;
98       struct
99       {
100          unsigned char dx;
101          unsigned char dy;
102       } move;
103       struct
104       {
105          unsigned char dx;
106          unsigned char dy;
107       } resize;
108    } border_keyboard;
109    struct
110    {
111       double        min;
112       double        max;
113       double        factor;
114       double        profile_factor;
115       double        inch_correction;
116       double        inch_correction_bound;
117       int           base_dpi;
118       unsigned char use_dpi;
119       unsigned char use_custom;
120       unsigned char for_tdm;
121    } scale;
122    unsigned char show_cursor;
123    unsigned char idle_cursor;
124    Eina_List    *env_vars;
125    struct
126    {
127       int          only_label;
128       const char  *default_model;
129       Eina_Bool    dont_touch_my_damn_keyboard;
130       Eina_Bool    use_cache;
131       unsigned int delay_held_key_input_to_focus;
132       struct
133       {
134           const char *rules;
135           const char *model;
136           const char *layout;
137           const char *variant;
138           const char *options;
139       } default_rmlvo;
140    } xkb;
141    struct
142    {
143       int repeat_delay; // delay in milliseconds since key down until repeating starts
144       int repeat_rate; // the rate of repeating keys in characters per second
145    } keyboard;
146    int           use_desktop_window_profile;
147 #ifdef _F_ZONE_WINDOW_ROTATION_
148    unsigned char wm_win_rotation;
149 #endif
150    int use_cursor_timer;
151    int cursor_timer_interval;
152    Eina_List *client_types;
153    const char *comp_shadow_file;
154    int                       sleep_for_dri;
155    int                       create_wm_ready;
156    int                       create_wm_start;
157    struct
158    {
159       unsigned char r, g, b, a;
160       int opmode;
161    } comp_canvas_bg;
162    int delayed_load_idle_count;
163    Eina_Bool use_buffer_flush;
164    Eina_Bool use_desk_smart_obj;
165    Eina_List *sock_accesses;
166    Eina_List *aux_hint_supported;
167    struct
168    {
169       Eina_Bool qp; /* quickpanel */
170    } use_module_srv;
171    double launchscreen_timeout;
172    double conformant_ack_timeout;
173    Eina_Bool calc_vis_without_effect;
174    Eina_Bool save_win_buffer;
175    const char *indicator_plug_name;
176    Eina_Bool launchscreen_without_timer;
177 };
178
179 struct _E_Config_Desklock_Background
180 {
181    const char *file;
182    Eina_Bool hide_logo;
183 };
184
185 struct _E_Config_Env_Var
186 {
187    const char   *var;
188    const char   *val;
189    unsigned char unset;
190 };
191
192 struct _E_Config_Syscon_Action
193 {
194    const char *action;
195    const char *params;
196    const char *button;
197    const char *icon;
198    int         is_main;
199 };
200
201 struct _E_Config_Module
202 {
203    const char   *name;
204    unsigned char enabled;
205    unsigned char delayed;
206    int           priority;
207 };
208
209 struct _E_Config_Desktop_Background
210 {
211    int         zone;
212    int         desk_x;
213    int         desk_y;
214    const char *file;
215 };
216
217 struct _E_Config_Desktop_Name
218 {
219    int         zone;
220    int         desk_x;
221    int         desk_y;
222    const char *name;
223 };
224
225 struct _E_Config_Desktop_Window_Profile
226 {
227    int         zone;
228    int         desk_x;
229    int         desk_y;
230    const char *profile;
231 };
232
233 struct _E_Event_Config_Icon_Theme
234 {
235    const char *icon_theme;
236 };
237
238 struct _E_Config_Client_Type
239 {
240    const char     *name; /* icccm.class_name */
241    const char     *clas; /* icccm.class */
242    E_Window_Type   window_type; /* Ecore_X_Window_Type / E_Window_Type */
243    int             client_type; /* E_Client_Type */
244 };
245
246 struct _E_Config_Policy_Desk
247 {
248    unsigned int zone_num;
249    int x, y;
250    int enable;
251 };
252
253 struct _E_Config_Socket_Access
254 {
255    struct
256    {
257       unsigned char use;
258       const char   *name;
259       const char   *owner;
260       const char   *group;
261       unsigned int  permissions;
262       struct
263       {
264          unsigned char use;
265          const char   *name;
266          const char   *value;
267          int           flags;
268       } smack;
269    } sock_access;
270    struct
271    {
272       unsigned char use;
273       const char   *link_name;
274       const char   *owner;
275       const char   *group;
276       struct
277       {
278          const char   *name;
279          const char   *value;
280          int           flags;
281       } smack;
282    } sock_symlink_access;
283 };
284
285 struct _E_Config_Aux_Hint_Supported
286 {
287    const char *name;
288 };
289
290 EINTERN int                   e_config_init(void);
291 EINTERN int                   e_config_shutdown(void);
292
293 E_API void                     e_config_load(void);
294
295 E_API int                      e_config_save(void);
296 E_API void                     e_config_save_queue(void);
297
298 E_API const char              *e_config_profile_get(void);
299 E_API char                    *e_config_profile_dir_get(const char *prof);
300 E_API void                     e_config_profile_set(const char *prof);
301 E_API Eina_List               *e_config_profile_list(void);
302 E_API void                     e_config_profile_add(const char *prof);
303 E_API void                     e_config_profile_del(const char *prof);
304
305 E_API void                     e_config_save_block_set(int block);
306 E_API int                      e_config_save_block_get(void);
307
308 E_API void                    *e_config_domain_load(const char *domain, E_Config_DD *edd);
309 E_API void                    *e_config_domain_system_load(const char *domain, E_Config_DD *edd);
310 E_API int                      e_config_profile_save(void);
311 E_API int                      e_config_domain_save(const char *domain, E_Config_DD *edd, const void *data);
312
313 E_API void                     e_config_mode_changed(void);
314
315 extern E_API E_Config *e_config;
316
317 extern E_API int E_EVENT_CONFIG_MODE_CHANGED;
318
319 #endif
320 #endif