2 #include "e_mod_main.h"
3 #include "e_mod_comp_cfdata.h"
6 e_mod_comp_cfdata_edd_init(E_Config_DD **conf_edd, E_Config_DD **match_edd)
8 *match_edd = E_CONFIG_DD_NEW("Comp_Match", Match);
13 E_CONFIG_VAL(D, T, title, STR);
14 E_CONFIG_VAL(D, T, name, STR);
15 E_CONFIG_VAL(D, T, clas, STR);
16 E_CONFIG_VAL(D, T, role, STR);
17 E_CONFIG_VAL(D, T, primary_type, INT);
18 E_CONFIG_VAL(D, T, borderless, CHAR);
19 E_CONFIG_VAL(D, T, dialog, CHAR);
20 E_CONFIG_VAL(D, T, accepts_focus, CHAR);
21 E_CONFIG_VAL(D, T, vkbd, CHAR);
22 E_CONFIG_VAL(D, T, quickpanel, CHAR);
23 E_CONFIG_VAL(D, T, argb, CHAR);
24 E_CONFIG_VAL(D, T, fullscreen, CHAR);
25 E_CONFIG_VAL(D, T, modal, CHAR);
26 E_CONFIG_VAL(D, T, shadow_style, STR);
28 *conf_edd = E_CONFIG_DD_NEW("Comp_Config", Config);
33 E_CONFIG_VAL(D, T, shadow_file, STR);
34 E_CONFIG_VAL(D, T, shadow_style, STR);
35 E_CONFIG_VAL(D, T, effect_file, STR);
36 E_CONFIG_VAL(D, T, hwcomp_file, STR);
37 E_CONFIG_VAL(D, T, engine, INT);
38 E_CONFIG_VAL(D, T, max_unmapped_pixels, INT);
39 E_CONFIG_VAL(D, T, max_unmapped_time, INT);
40 E_CONFIG_VAL(D, T, min_unmapped_time, INT);
41 E_CONFIG_VAL(D, T, fps_average_range, INT);
42 E_CONFIG_VAL(D, T, fps_corner, UCHAR);
43 E_CONFIG_VAL(D, T, fps_show, UCHAR);
44 E_CONFIG_VAL(D, T, use_shadow, UCHAR);
45 E_CONFIG_VAL(D, T, indirect, UCHAR);
46 E_CONFIG_VAL(D, T, texture_from_pixmap, UCHAR);
47 E_CONFIG_VAL(D, T, lock_fps, UCHAR);
48 E_CONFIG_VAL(D, T, loose_sync, UCHAR);
49 E_CONFIG_VAL(D, T, efl_sync, UCHAR);
50 E_CONFIG_VAL(D, T, grab, UCHAR);
51 E_CONFIG_VAL(D, T, vsync, UCHAR);
52 E_CONFIG_VAL(D, T, keep_unmapped, UCHAR);
53 E_CONFIG_VAL(D, T, send_flush, UCHAR);
54 E_CONFIG_VAL(D, T, send_dump, UCHAR);
55 E_CONFIG_VAL(D, T, nocomp_fs, UCHAR);
56 E_CONFIG_VAL(D, T, use_hwc, UCHAR);
57 E_CONFIG_VAL(D, T, smooth_windows, UCHAR);
58 E_CONFIG_VAL(D, T, first_draw_delay, DOUBLE);
59 E_CONFIG_VAL(D, T, canvas_per_zone, UCHAR);
60 E_CONFIG_VAL(D, T, use_lock_screen, UCHAR);
61 E_CONFIG_VAL(D, T, default_window_effect, UCHAR);
62 E_CONFIG_VAL(D, T, keyboard_effect, UCHAR);
63 E_CONFIG_VAL(D, T, xv_rotation_effect, UCHAR);
64 E_CONFIG_VAL(D, T, fake_image_launch, UCHAR);
65 E_CONFIG_VAL(D, T, fake_launch_layer, INT);
66 E_CONFIG_VAL(D, T, lower_layer, INT);
67 E_CONFIG_VAL(D, T, defer_raise_effect, UCHAR);
68 E_CONFIG_VAL(D, T, max_lock_screen_time, DOUBLE);
69 E_CONFIG_VAL(D, T, damage_timeout, DOUBLE);
70 E_CONFIG_VAL(D, T, nocomp_begin_timeout, DOUBLE);
71 E_CONFIG_VAL(D, T, use_hw_ov, UCHAR);
72 E_CONFIG_VAL(D, T, debug_info_show, UCHAR);
73 E_CONFIG_VAL(D, T, max_debug_msgs, INT);
74 E_CONFIG_VAL(D, T, debug_type_nocomp, UCHAR);
75 E_CONFIG_VAL(D, T, debug_type_swap, UCHAR);
76 E_CONFIG_VAL(D, T, debug_type_effect, UCHAR);
77 E_CONFIG_VAL(D, T, use_efl_native_surface, UCHAR);
78 E_CONFIG_VAL(D, T, stand_by_canvas_render_enable, UCHAR);
79 E_CONFIG_VAL(D, T, effect_policy_unknown, STR);
80 E_CONFIG_VAL(D, T, effect_policy_desktop, STR);
81 E_CONFIG_VAL(D, T, effect_policy_dock, STR);
82 E_CONFIG_VAL(D, T, effect_policy_toolbar, STR);
83 E_CONFIG_VAL(D, T, effect_policy_menu, STR);
84 E_CONFIG_VAL(D, T, effect_policy_utility, STR);
85 E_CONFIG_VAL(D, T, effect_policy_splash, STR);
86 E_CONFIG_VAL(D, T, effect_policy_dialog, STR);
87 E_CONFIG_VAL(D, T, effect_policy_normal, STR);
88 E_CONFIG_VAL(D, T, effect_policy_videocall, STR);
89 E_CONFIG_VAL(D, T, effect_policy_dropdown_menu, STR);
90 E_CONFIG_VAL(D, T, effect_policy_popup_menu, STR);
91 E_CONFIG_VAL(D, T, effect_policy_tooltip, STR);
92 E_CONFIG_VAL(D, T, effect_policy_notification, STR);
93 E_CONFIG_VAL(D, T, effect_policy_combo, STR);
94 E_CONFIG_VAL(D, T, effect_policy_dnd, STR);
95 E_CONFIG_VAL(D, T, effect_policy_menuscreen, STR);
96 E_CONFIG_VAL(D, T, effect_policy_quickpanel_base, STR);
97 E_CONFIG_VAL(D, T, effect_policy_quickpanel, STR);
98 E_CONFIG_VAL(D, T, effect_policy_taskmanager, STR);
99 E_CONFIG_VAL(D, T, effect_policy_livemagazine, STR);
100 E_CONFIG_VAL(D, T, effect_policy_lockscreen, STR);
101 E_CONFIG_VAL(D, T, effect_policy_indicator, STR);
102 E_CONFIG_VAL(D, T, effect_policy_tickernoti, STR);
103 E_CONFIG_VAL(D, T, effect_policy_debugging_info, STR);
104 E_CONFIG_VAL(D, T, effect_policy_apptray, STR);
105 E_CONFIG_VAL(D, T, effect_policy_mini_apptray, STR);
106 E_CONFIG_VAL(D, T, effect_policy_volume, STR);
107 E_CONFIG_VAL(D, T, effect_policy_background, STR);
108 E_CONFIG_VAL(D, T, effect_policy_isf_keyboard, STR);
109 E_CONFIG_VAL(D, T, effect_policy_isf_sub, STR);
110 E_CONFIG_VAL(D, T, effect_policy_setup_wizard, STR);
111 E_CONFIG_VAL(D, T, effect_policy_toast, STR);
112 E_CONFIG_VAL(D, T, effect_policy_app_popup, STR);
113 E_CONFIG_LIST(D, T, match.popups, *match_edd);
114 E_CONFIG_LIST(D, T, match.borders, *match_edd);
115 E_CONFIG_LIST(D, T, match.overrides, *match_edd);
116 E_CONFIG_LIST(D, T, match.menus, *match_edd);
120 e_mod_comp_cfdata_config_new(void)
125 cfg = E_NEW(Config, 1);
126 if (!cfg) return NULL;
128 cfg->shadow_file = calloc(4096, sizeof(unsigned char));
129 if (cfg->shadow_file)
131 snprintf((char *)(cfg->shadow_file),
132 4096 * sizeof(unsigned char),
133 "%s/data/themes/shadow.edj",
134 e_prefix_data_get());
136 "[E17-comp] shadow file path: %s\n",
140 cfg->shadow_style = eina_stringshare_add("default");
141 cfg->effect_file = eina_stringshare_add("/usr/lib/enlightenment/modules/e17-mod-tizen-comp/effect/common.so");
142 cfg->hwcomp_file = eina_stringshare_add("/usr/lib/enlightenment/modules/e17-mod-tizen-comp/effect/hwcomp.so");
143 cfg->engine = ENGINE_GL;
144 cfg->max_unmapped_pixels = 32 * 1024; // implement
145 cfg->max_unmapped_time = 10 * 3600; // implement
146 cfg->min_unmapped_time = 5 * 60; // implement
147 cfg->fps_average_range = 30;
152 cfg->texture_from_pixmap = 1;
158 cfg->keep_unmapped = 1;
159 cfg->send_flush = 1; // implement
160 cfg->send_dump = 1; // implement
161 cfg->nocomp_fs = 0; // buggy
162 cfg->use_hwc = 0; // hardware_compositing
163 cfg->smooth_windows = 0; // 1 if gl, 0 if not
164 cfg->first_draw_delay = 0.15;
166 cfg->canvas_per_zone = 1;
167 cfg->use_lock_screen = 1;
168 cfg->default_window_effect = 0;
169 cfg->keyboard_effect = 0;
170 cfg->xv_rotation_effect = 0;
171 cfg->fake_image_launch = 0;
172 cfg->fake_launch_layer = 0;
173 cfg->lower_layer = 5;
174 cfg->defer_raise_effect = 0;
175 cfg->max_lock_screen_time = 2.0;
176 cfg->damage_timeout = 10.0;
177 cfg->nocomp_begin_timeout = 2.0;
179 cfg->debug_info_show = 0;
180 cfg->max_debug_msgs = 1;
181 cfg->debug_type_nocomp = 1;
182 cfg->debug_type_swap = 0;
183 cfg->debug_type_effect = 0;
184 cfg->use_efl_native_surface = 1;
185 cfg->stand_by_canvas_render_enable = 0;
187 cfg->effect_policy_unknown = eina_stringshare_add("shadow");
188 cfg->effect_policy_desktop = eina_stringshare_add("no-effect");
189 cfg->effect_policy_dock = eina_stringshare_add("shadow_fade");
190 cfg->effect_policy_toolbar = eina_stringshare_add("no-effect");
191 cfg->effect_policy_menu = eina_stringshare_add("no-effect");
192 cfg->effect_policy_utility = eina_stringshare_add("no-effect");
193 cfg->effect_policy_splash = eina_stringshare_add("no-effect");
194 cfg->effect_policy_dialog = eina_stringshare_add("dialog");
195 cfg->effect_policy_normal = eina_stringshare_add("shadow_fade");
196 cfg->effect_policy_videocall = eina_stringshare_add("shadow_fade");
197 cfg->effect_policy_dropdown_menu = eina_stringshare_add("no-effect");
198 cfg->effect_policy_popup_menu = eina_stringshare_add("shadow");
199 cfg->effect_policy_tooltip = eina_stringshare_add("shadow");
200 cfg->effect_policy_notification = eina_stringshare_add("dialog");
201 cfg->effect_policy_combo = eina_stringshare_add("no-effect");
202 cfg->effect_policy_dnd = eina_stringshare_add("no-effect");
203 cfg->effect_policy_menuscreen = eina_stringshare_add("home_screen");
204 cfg->effect_policy_quickpanel_base = eina_stringshare_add("quickpanel");
205 cfg->effect_policy_quickpanel = eina_stringshare_add("quickpanel");
206 cfg->effect_policy_taskmanager = eina_stringshare_add("taskmgr");
207 cfg->effect_policy_livemagazine = eina_stringshare_add("home_screen");
208 cfg->effect_policy_lockscreen = eina_stringshare_add("lockscreen");
209 cfg->effect_policy_indicator = eina_stringshare_add("indicator");
210 cfg->effect_policy_tickernoti = eina_stringshare_add("dialog_without_dim");
211 cfg->effect_policy_debugging_info = eina_stringshare_add("no-effect");
212 cfg->effect_policy_apptray = eina_stringshare_add("app_tray");
213 cfg->effect_policy_mini_apptray = eina_stringshare_add("app_tray");
214 cfg->effect_policy_volume = eina_stringshare_add("dialog_without_dim");
215 cfg->effect_policy_background = eina_stringshare_add("no-effect");
216 cfg->effect_policy_isf_keyboard = eina_stringshare_add("keyboard");
217 cfg->effect_policy_isf_sub = eina_stringshare_add("no-effect");
218 cfg->effect_policy_setup_wizard = eina_stringshare_add("no-effect");
219 cfg->effect_policy_toast = eina_stringshare_add("no-effect");
220 cfg->effect_policy_app_popup = eina_stringshare_add("dialog_without_dim");
222 cfg->match.popups = NULL;
223 mat = E_NEW(Match, 1);
226 cfg->match.popups = eina_list_append(cfg->match.popups, mat);
227 mat->name = eina_stringshare_add("shelf");
228 mat->shadow_style = eina_stringshare_add("popup");
230 mat = E_NEW(Match, 1);
233 cfg->match.popups = eina_list_append(cfg->match.popups, mat);
234 mat->shadow_style = eina_stringshare_add("popup");
236 cfg->match.borders = NULL;
238 cfg->match.overrides = NULL;
239 mat = E_NEW(Match, 1);
242 cfg->match.overrides = eina_list_append(cfg->match.overrides, mat);
243 mat->name = eina_stringshare_add("E");
244 mat->clas = eina_stringshare_add("Background_Window");
245 mat->shadow_style = eina_stringshare_add("none");
247 mat = E_NEW(Match, 1);
250 cfg->match.overrides = eina_list_append(cfg->match.overrides, mat);
251 mat->name = eina_stringshare_add("E");
252 mat->clas = eina_stringshare_add("everything");
253 mat->shadow_style = eina_stringshare_add("everything");
255 mat = E_NEW(Match, 1);
258 cfg->match.overrides = eina_list_append(cfg->match.overrides, mat);
259 mat->primary_type = ECORE_X_WINDOW_TYPE_DROPDOWN_MENU;
260 mat->shadow_style = eina_stringshare_add("menu");
262 mat = E_NEW(Match, 1);
265 cfg->match.overrides = eina_list_append(cfg->match.overrides, mat);
266 mat->primary_type = ECORE_X_WINDOW_TYPE_POPUP_MENU;
267 mat->shadow_style = eina_stringshare_add("menu");
269 mat = E_NEW(Match, 1);
272 cfg->match.overrides = eina_list_append(cfg->match.overrides, mat);
273 mat->primary_type = ECORE_X_WINDOW_TYPE_COMBO;
274 mat->shadow_style = eina_stringshare_add("menu");
276 mat = E_NEW(Match, 1);
279 cfg->match.overrides = eina_list_append(cfg->match.overrides, mat);
280 mat->primary_type = ECORE_X_WINDOW_TYPE_TOOLTIP;
281 mat->shadow_style = eina_stringshare_add("menu");
283 mat = E_NEW(Match, 1);
286 cfg->match.overrides = eina_list_append(cfg->match.overrides, mat);
287 mat->shadow_style = eina_stringshare_add("popup");
289 cfg->match.menus = NULL;
290 mat = E_NEW(Match, 1);
293 cfg->match.menus = eina_list_append(cfg->match.menus, mat);
294 mat->shadow_style = eina_stringshare_add("menu");
301 _match_list_free(Eina_List *list)
305 EINA_LIST_FREE(list, m)
307 if (m->title) eina_stringshare_del(m->title);
308 if (m->name) eina_stringshare_del(m->name);
309 if (m->clas) eina_stringshare_del(m->clas);
310 if (m->role) eina_stringshare_del(m->role);
311 if (m->shadow_style) eina_stringshare_del(m->shadow_style);
317 e_mod_cfdata_config_free(Config *cfg)
319 if (cfg->shadow_file) eina_stringshare_del(cfg->shadow_file);
320 if (cfg->shadow_style) eina_stringshare_del(cfg->shadow_style);
321 if (cfg->effect_file) eina_stringshare_del(cfg->effect_file);
322 if (cfg->hwcomp_file) eina_stringshare_del(cfg->hwcomp_file);
324 if (cfg->effect_policy_unknown) eina_stringshare_del(cfg->effect_policy_unknown);
325 if (cfg->effect_policy_desktop) eina_stringshare_del(cfg->effect_policy_desktop);
326 if (cfg->effect_policy_dock) eina_stringshare_del(cfg->effect_policy_dock);
327 if (cfg->effect_policy_toolbar) eina_stringshare_del(cfg->effect_policy_toolbar);
328 if (cfg->effect_policy_menu) eina_stringshare_del(cfg->effect_policy_menu);
329 if (cfg->effect_policy_utility) eina_stringshare_del(cfg->effect_policy_utility);
330 if (cfg->effect_policy_splash) eina_stringshare_del(cfg->effect_policy_splash);
331 if (cfg->effect_policy_dialog) eina_stringshare_del(cfg->effect_policy_dialog);
332 if (cfg->effect_policy_normal) eina_stringshare_del(cfg->effect_policy_normal);
333 if (cfg->effect_policy_videocall) eina_stringshare_del(cfg->effect_policy_videocall);
334 if (cfg->effect_policy_dropdown_menu) eina_stringshare_del(cfg->effect_policy_dropdown_menu);
335 if (cfg->effect_policy_popup_menu) eina_stringshare_del(cfg->effect_policy_popup_menu);
336 if (cfg->effect_policy_tooltip) eina_stringshare_del(cfg->effect_policy_tooltip);
337 if (cfg->effect_policy_notification) eina_stringshare_del(cfg->effect_policy_notification);
338 if (cfg->effect_policy_combo) eina_stringshare_del(cfg->effect_policy_combo);
339 if (cfg->effect_policy_dnd) eina_stringshare_del(cfg->effect_policy_dnd);
340 if (cfg->effect_policy_menuscreen) eina_stringshare_del(cfg->effect_policy_menuscreen);
341 if (cfg->effect_policy_quickpanel_base) eina_stringshare_del(cfg->effect_policy_quickpanel_base);
342 if (cfg->effect_policy_quickpanel) eina_stringshare_del(cfg->effect_policy_quickpanel);
343 if (cfg->effect_policy_taskmanager) eina_stringshare_del(cfg->effect_policy_taskmanager);
344 if (cfg->effect_policy_livemagazine) eina_stringshare_del(cfg->effect_policy_livemagazine);
345 if (cfg->effect_policy_lockscreen) eina_stringshare_del(cfg->effect_policy_lockscreen);
346 if (cfg->effect_policy_indicator) eina_stringshare_del(cfg->effect_policy_indicator);
347 if (cfg->effect_policy_tickernoti) eina_stringshare_del(cfg->effect_policy_tickernoti);
348 if (cfg->effect_policy_debugging_info) eina_stringshare_del(cfg->effect_policy_debugging_info);
349 if (cfg->effect_policy_apptray) eina_stringshare_del(cfg->effect_policy_apptray);
350 if (cfg->effect_policy_mini_apptray) eina_stringshare_del(cfg->effect_policy_mini_apptray);
351 if (cfg->effect_policy_volume) eina_stringshare_del(cfg->effect_policy_volume);
352 if (cfg->effect_policy_background) eina_stringshare_del(cfg->effect_policy_background);
353 if (cfg->effect_policy_isf_keyboard) eina_stringshare_del(cfg->effect_policy_isf_keyboard);
354 if (cfg->effect_policy_isf_sub) eina_stringshare_del(cfg->effect_policy_isf_sub);
355 if (cfg->effect_policy_setup_wizard) eina_stringshare_del(cfg->effect_policy_setup_wizard);
356 if (cfg->effect_policy_toast) eina_stringshare_del(cfg->effect_policy_toast);
357 if (cfg->effect_policy_app_popup) eina_stringshare_del(cfg->effect_policy_app_popup);
359 _match_list_free(cfg->match.popups);
360 _match_list_free(cfg->match.borders);
361 _match_list_free(cfg->match.overrides);
362 _match_list_free(cfg->match.menus);