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_Binding_Mouse E_Config_Binding_Mouse; 8 typedef struct _E_Config_Binding_Key E_Config_Binding_Key; 9 typedef struct _E_Config_Binding_Edge E_Config_Binding_Edge; 10 typedef struct _E_Config_Binding_Signal E_Config_Binding_Signal; 11 typedef struct _E_Config_Binding_Wheel E_Config_Binding_Wheel; 12 typedef struct _E_Config_Binding_Acpi E_Config_Binding_Acpi; 13 typedef struct _E_Config_Desktop_Background E_Config_Desktop_Background; 14 typedef struct _E_Config_Desklock_Background E_Config_Desklock_Background; 15 typedef struct _E_Config_Desktop_Name E_Config_Desktop_Name; 16 typedef struct _E_Config_Gadcon E_Config_Gadcon; 17 typedef struct _E_Config_Gadcon_Client E_Config_Gadcon_Client; 18 typedef struct _E_Config_Shelf E_Config_Shelf; 19 typedef struct _E_Config_Shelf_Desk E_Config_Shelf_Desk; 20 typedef struct _E_Config_Mime_Icon E_Config_Mime_Icon; 21 typedef struct _E_Config_Syscon_Action E_Config_Syscon_Action; 22 typedef struct _E_Config_Env_Var E_Config_Env_Var; 23 typedef struct _E_Config_XKB_Layout E_Config_XKB_Layout; 24 typedef struct _E_Config_XKB_Option E_Config_XKB_Option; 25 26 typedef struct _E_Event_Config_Icon_Theme E_Event_Config_Icon_Theme; 27 28 typedef struct E_Config_Bindings E_Config_Bindings; 29 30 typedef enum 31 { 32 E_CONFIG_PROFILE_TYPE_NONE, 33 E_CONFIG_PROFILE_TYPE_MOBILE, 34 E_CONFIG_PROFILE_TYPE_TABLET, 35 E_CONFIG_PROFILE_TYPE_DESKTOP 36 } E_Config_Profile_Type; 37 38 #else 39 #ifndef E_CONFIG_H 40 #define E_CONFIG_H 41 42 /* increment this whenever we change config enough that you need new 43 * defaults for e to work. 44 */ 45 #define E_CONFIG_FILE_EPOCH 1 46 /* increment this whenever a new set of config values are added but the users 47 * config doesn't need to be wiped - simply new values need to be put in 48 */ 49 #define E_CONFIG_FILE_GENERATION 30 50 #define E_CONFIG_FILE_VERSION ((E_CONFIG_FILE_EPOCH * 1000000) + E_CONFIG_FILE_GENERATION) 51 52 #define E_CONFIG_BINDINGS_VERSION 0 // DO NOT INCREMENT UNLESS YOU WANT TO WIPE ALL BINDINGS!!!!! 53 54 struct _E_Config 55 { 56 int config_version; // INTERNAL 57 E_Config_Profile_Type config_type; // INTERNAL 58 int show_splash; // GUI 59 const char *desktop_default_background; // GUI 60 Eina_List *desktop_backgrounds; // GUI 61 const char *desktop_default_name; // DEAD 62 Eina_List *desktop_names; // GUI 63 double menus_scroll_speed; // GUI 64 double menus_fast_mouse_move_threshhold; // GUI 65 double menus_click_drag_timeout; // GUI 66 int window_maximize_animate; // GUI 67 int window_maximize_transition; // GUI 68 double window_maximize_time; // GUI 69 int border_shade_animate; // GUI 70 int border_shade_transition; // GUI 71 double border_shade_speed; // GUI 72 int priority; // GUI 73 int zone_desks_x_count; // GUI 74 int zone_desks_y_count; // GUI 75 int show_desktop_icons; // GUI 76 int edge_flip_dragging; // GUI 77 const char *language; // GUI 78 const char *desklock_language; // GUI 79 Eina_List *modules; // GUI 80 Eina_List *bad_modules; // GUI 81 Eina_List *font_fallbacks; // GUI 82 Eina_List *font_defaults; // GUI 83 84 /* NO LONGER SAVED WITH THIS STRUCT */ 85 Eina_List *mouse_bindings; // GUI 86 Eina_List *key_bindings; // GUI 87 Eina_List *edge_bindings; // GUI 88 Eina_List *signal_bindings; // GUI 89 Eina_List *wheel_bindings; // GUI 90 Eina_List *acpi_bindings; // GUI 91 92 Eina_List *path_append_data; // GUI 93 Eina_List *path_append_images; // GUI 94 Eina_List *path_append_fonts; // GUI 95 Eina_List *path_append_init; // GUI 96 Eina_List *path_append_icons; // GUI 97 Eina_List *path_append_modules; // GUI 98 Eina_List *path_append_backgrounds; // GUI 99 Eina_List *path_append_messages; // GUI 100 int window_placement_policy; // GUI 101 int window_grouping; // GUI 102 int focus_policy; // GUI 103 int focus_setting; // GUI 104 int pass_click_on; // GUI 105 int window_activehint_policy; // GUI 106 int always_click_to_raise; // GUI 107 int always_click_to_focus; // GUI 108 int use_auto_raise; // GUI 109 double auto_raise_delay; // GUI 110 int use_resist; // GUI 111 int drag_resist; 112 int desk_resist; // GUI 113 int window_resist; // GUI 114 int gadget_resist; // GUI 115 int geometry_auto_move; // GUI 116 int geometry_auto_resize_limit; // GUI 117 int winlist_warp_while_selecting; // GUI 118 int winlist_warp_at_end; // GUI 119 int winlist_no_warp_on_direction; // GUI 120 double winlist_warp_speed; // GUI **** NO LONGER USED!!! 121 int winlist_scroll_animate; // GUI 122 double winlist_scroll_speed; // GUI 123 int winlist_list_show_iconified; // GUI 124 int winlist_list_show_other_desk_iconified; // GUI 125 int winlist_list_show_other_screen_iconified; // GUI 126 int winlist_list_show_other_desk_windows; // GUI 127 int winlist_list_show_other_screen_windows; // GUI 128 int winlist_list_uncover_while_selecting; // GUI 129 int winlist_list_jump_desk_while_selecting; // GUI 130 int winlist_list_focus_while_selecting; // GUI 131 int winlist_list_raise_while_selecting; // GUI 132 int winlist_list_move_after_select; // GUI 133 double winlist_pos_align_x; // GUI 134 double winlist_pos_align_y; // GUI 135 double winlist_pos_size_w; // GUI 136 double winlist_pos_size_h; // GUI 137 int winlist_pos_min_w; // GUI 138 int winlist_pos_min_h; // GUI 139 int winlist_pos_max_w; // GUI 140 int winlist_pos_max_h; // GUI 141 int maximize_policy; // GUI 142 int allow_manip; // GUI 143 int border_fix_on_shelf_toggle; // GUI 144 int allow_above_fullscreen; // GUI 145 int kill_if_close_not_possible; // GUI 146 int kill_process; // GUI 147 double kill_timer_wait; // GUI 148 int ping_clients; // GUI 149 const char *transition_start; // GUI 150 const char *transition_desk; // GUI 151 const char *transition_change; // GUI 152 Eina_List *remembers; // GUI 153 int remember_internal_windows; // GUI 154 Eina_Bool remember_internal_fm_windows; // GUI 155 Eina_Bool remember_internal_fm_windows_globally; // GUI 156 int move_info_follows; // GUI 157 int resize_info_follows; // GUI 158 int move_info_visible; // GUI 159 int resize_info_visible; // GUI 160 int focus_last_focused_per_desktop; // GUI 161 int focus_revert_on_hide_or_close; // GUI 162 int focus_revert_allow_sticky; // GUI 163 int disable_all_pointer_warps; // GUI 164 int pointer_slide; // GUI 165 double pointer_warp_speed; // GUI 166 int use_e_cursor; // GUI 167 int cursor_size; // GUI 168 int menu_autoscroll_margin; // GUI 169 int menu_autoscroll_cursor_margin; // GUI 170 const char *input_method; // GUI 171 struct 172 { 173 int move; // GUI 174 int resize; // GUI 175 int raise; // GUI 176 int lower; // GUI 177 int layer; // GUI 178 int desktop; // GUI 179 int iconify; // GUI 180 } transient; 181 int menu_eap_name_show; // GUI 182 int menu_eap_generic_show; // GUI 183 int menu_eap_comment_show; // GUI 184 int menu_favorites_show; // GUI 185 int menu_apps_show; // GUI 186 Eina_Bool menu_icons_hide; // GUI 187 int menu_gadcon_client_toplevel; // GUI 188 int fullscreen_policy; // GUI 189 const char *exebuf_term_cmd; // GUI 190 Eina_List *color_classes; // dead 191 int use_app_icon; // GUI 192 int cnfmdlg_disabled; // GUI 193 int cfgdlg_auto_apply; // GUI 194 int cfgdlg_default_mode; // GUI 195 Eina_List *gadcons; // GUI 196 Eina_List *shelves; // GUI 197 int font_hinting; // GUI 198 199 int desklock_passwd; // GUI // hashed 200 int desklock_pin; // GUI // hashed 201 Eina_List *desklock_backgrounds; // GUI 202 int desklock_auth_method; // GUI 203 int desklock_login_box_zone; // GUI 204 int desklock_start_locked; // GUI 205 int desklock_on_suspend; // GUI 206 int desklock_autolock_screensaver; // GUI 207 double desklock_post_screensaver_time; // GUI 208 int desklock_autolock_idle; // GUI 209 double desklock_autolock_idle_timeout; // GUI 210 int desklock_use_custom_desklock; // GUI 211 const char *desklock_custom_desklock_cmd; // GUI 212 unsigned char desklock_ask_presentation; // GUI 213 double desklock_ask_presentation_timeout; // GUI 214 215 int screensaver_enable; // GUI 216 int screensaver_timeout; // GUI 217 int screensaver_interval; // GUI 218 int screensaver_blanking; // GUI 219 int screensaver_expose; // GUI 220 unsigned char screensaver_dpms_off; // GUI 221 unsigned char screensaver_ask_presentation; // GUI 222 double screensaver_ask_presentation_timeout; // GUI 223 int screensaver_desklock_timeout; // GUI 224 225 int screensaver_wake_on_notify; // GUI 226 int screensaver_wake_on_urgent; // GUI 227 228 unsigned char suspend_connected_standby; // GUI 229 230 unsigned char screensaver_suspend; // GUI 231 unsigned char screensaver_hibernate; // GUI 232 unsigned char screensaver_suspend_on_ac; // GUI 233 double screensaver_suspend_delay; // GUI 234 235 int dpms_enable; // GUI 236 int dpms_standby_enable; // GUI 237 int dpms_standby_timeout; // GUI 238 int dpms_suspend_enable; // GUI 239 int dpms_suspend_timeout; // GUI 240 int dpms_off_enable; // GUI 241 int dpms_off_timeout; // GUI 242 unsigned char no_dpms_on_fullscreen; // GUI 243 244 int clientlist_group_by; // GUI 245 int clientlist_include_all_zones; // GUI 246 int clientlist_separate_with; // GUI 247 int clientlist_sort_by; // GUI 248 int clientlist_separate_iconified_apps; // GUI 249 int clientlist_warp_to_iconified_desktop; // GUI 250 int clientlist_limit_caption_len; // GUI 251 int clientlist_max_caption_len; // GUI 252 253 int mouse_hand; //GUI 254 int mouse_accel_numerator; // GUI 255 int mouse_accel_denominator; // GUI 256 int mouse_accel_threshold; // GUI 257 unsigned char touch_tap_to_click; // GUI 258 259 int border_raise_on_mouse_action; // GUI 260 int border_raise_on_focus; // GUI 261 int raise_on_revert_focus; // GUI 262 int desk_flip_wrap; // GUI 263 int fullscreen_flip; // GUI 264 int multiscreen_flip; // GUI 265 266 const char *icon_theme; // GUI 267 unsigned char icon_theme_overrides; // GUI 268 const char *desktop_environment; // GUI 269 270 /* modes: 271 * 1-"pane") horizontal or vertical movement to/from next/previous "screen" 272 * 2-"zoom") 45degree diagonal movement based on border position 273 */ 274 int desk_flip_animate_mode; // GUI 275 /* types based on theme */ 276 Eina_Stringshare *desk_flip_animate_type; // GUI 277 int desk_flip_animate_interpolation; // GUI 278 279 const char *wallpaper_import_last_dev; // INTERNAL 280 const char *wallpaper_import_last_path; // INTERNAL 281 282 const char *theme_default_border_style; // GUI 283 284 Eina_List *mime_icons; // GUI 285 int desk_auto_switch; // GUI; 286 287 int screen_limits; 288 289 int thumb_nice; 290 291 int ping_clients_interval; // GUI 292 293 int thumbscroll_enable; // GUI 294 int thumbscroll_threshhold; // GUI 295 double thumbscroll_momentum_threshhold; // GUI 296 double thumbscroll_friction; // GUI 297 298 unsigned char filemanager_single_click; // GUI 299 int device_desktop; // GUI 300 int device_auto_mount; // GUI 301 int device_auto_open; // GUI 302 Efm_Mode device_detect_mode; /* not saved, display-only */ 303 unsigned char filemanager_copy; // GUI 304 unsigned char filemanager_secure_rm; // GUI 305 306 struct 307 { 308 double timeout; // GUI 309 struct 310 { 311 unsigned char dx; // GUI 312 unsigned char dy; // GUI 313 } move; 314 struct 315 { 316 unsigned char dx; // GUI 317 unsigned char dy; // GUI 318 } resize; 319 } border_keyboard; 320 321 struct 322 { 323 double min; // GUI 324 double max; // GUI 325 double factor; // GUI 326 int base_dpi; // GUI 327 unsigned char use_dpi; // GUI 328 unsigned char use_custom; // GUI 329 } scale; 330 331 unsigned char show_cursor; // GUI 332 unsigned char idle_cursor; // GUI 333 334 const char *default_system_menu; // GUI 335 336 unsigned char cfgdlg_normal_wins; // GUI 337 338 struct 339 { 340 struct 341 { 342 int icon_size; // GUI 343 } main, secondary, extra; 344 double timeout; // GUI 345 unsigned char do_input; // GUI 346 Eina_List *actions; 347 } syscon; 348 349 struct 350 { 351 unsigned char presentation; // INTERNAL 352 unsigned char offline; // INTERNAL 353 } mode; 354 355 struct 356 { 357 double expire_timeout; 358 unsigned char show_run_dialog; 359 unsigned char show_exit_dialog; 360 } exec; 361 362 unsigned char null_container_win; // HYPER-ADVANCED-ONLY - TURNING ON KILLS DESKTOP BG 363 364 Eina_List *env_vars; // GUI 365 366 struct 367 { 368 double normal; // GUI 369 double dim; // GUI 370 double transition; // GUI 371 double timer; // GUI 372 double battery_timer; // GUI 373 const char *sysdev; // GUI 374 unsigned char idle_dim; // GUI 375 } backlight; 376 377 struct 378 { 379 double none; 380 double low; 381 double medium; 382 double high; 383 double extreme; 384 E_Powersave_Mode min; 385 E_Powersave_Mode max; 386 } powersave; 387 388 struct 389 { 390 unsigned char load_xrdb; // GUI 391 unsigned char load_xmodmap; // GUI 392 unsigned char load_gnome; // GUI 393 unsigned char load_kde; // GUI 394 } deskenv; 395 396 struct 397 { 398 unsigned char enabled; // GUI 399 unsigned char match_e17_theme; // GUI 400 unsigned char match_e17_icon_theme; // GUI 401 int xft_antialias; 402 int xft_hinting; 403 const char *xft_hint_style; 404 const char *xft_rgba; 405 const char *net_theme_name; // GUI 406 const char *net_theme_name_detected; // not saved 407 const char *net_icon_theme_name; 408 const char *gtk_font_name; 409 } xsettings; 410 411 struct 412 { 413 unsigned char check; // INTERNAL 414 unsigned char later; // INTERNAL 415 } update; 416 417 struct 418 { 419 Eina_List *used_layouts; 420 Eina_List *used_options; 421 int only_label; 422 const char *default_model; 423 int cur_group; 424 E_Config_XKB_Layout *current_layout; 425 E_Config_XKB_Layout *sel_layout; 426 E_Config_XKB_Layout *lock_layout; 427 Eina_Bool dont_touch_my_damn_keyboard; 428 429 /* NO LONGER USED BECAUSE I SUCK 430 * -zmike, 31 January 2013 431 */ 432 const char *cur_layout; // whatever the current layout is 433 const char *selected_layout; // whatever the current layout that the user has selected is 434 const char *desklock_layout; 435 Eina_Bool use_cache; 436 } xkb; 437 438 struct 439 { 440 int repeat_delay;//delay in milliseconds since key down until repeating starts 441 int repeat_rate;//the rate of repeating keys in characters per second 442 } keyboard; 443 444 Eina_List *menu_applications; 445 unsigned char exe_always_single_instance; // GUI 446 Eina_List *screen_profiles; 447 }; 448 449 struct E_Config_Bindings 450 { 451 unsigned int config_version; 452 Eina_List *mouse_bindings; // GUI 453 Eina_List *key_bindings; // GUI 454 Eina_List *edge_bindings; // GUI 455 Eina_List *signal_bindings; // GUI 456 Eina_List *wheel_bindings; // GUI 457 Eina_List *acpi_bindings; // GUI 458 }; 459 460 struct _E_Config_Desklock_Background 461 { 462 const char *file; 463 Eina_Bool hide_logo; 464 }; 465 466 struct _E_Config_Env_Var 467 { 468 const char *var; 469 const char *val; 470 unsigned char unset; 471 }; 472 473 struct _E_Config_Syscon_Action 474 { 475 const char *action; 476 const char *params; 477 const char *button; 478 const char *icon; 479 int is_main; 480 }; 481 482 struct _E_Config_Module 483 { 484 const char *name; 485 unsigned char enabled; 486 }; 487 488 struct _E_Config_Binding_Mouse 489 { 490 int context; 491 int modifiers; 492 const char *action; 493 const char *params; 494 unsigned char button; 495 unsigned char any_mod; 496 }; 497 498 struct _E_Config_Binding_Key 499 { 500 int context; 501 unsigned int modifiers; 502 const char *key; 503 const char *action; 504 const char *params; 505 unsigned char any_mod; 506 }; 507 508 struct _E_Config_Binding_Edge 509 { 510 int context; 511 int modifiers; 512 float delay; 513 const char *action; 514 const char *params; 515 unsigned char edge; 516 unsigned char any_mod; 517 Eina_Bool drag_only; 518 }; 519 520 struct _E_Config_Binding_Signal 521 { 522 int context; 523 const char *signal; 524 const char *source; 525 int modifiers; 526 unsigned char any_mod; 527 const char *action; 528 const char *params; 529 }; 530 531 struct _E_Config_Binding_Wheel 532 { 533 int context; 534 int direction; 535 int z; 536 int modifiers; 537 unsigned char any_mod; 538 const char *action; 539 const char *params; 540 }; 541 542 struct _E_Config_Binding_Acpi 543 { 544 int context, type, status; 545 const char *action, *params; 546 }; 547 548 struct _E_Config_Desktop_Background 549 { 550 int zone; 551 int desk_x; 552 int desk_y; 553 const char *file; 554 }; 555 556 struct _E_Config_Desktop_Name 557 { 558 int zone; 559 int desk_x; 560 int desk_y; 561 const char *name; 562 }; 563 564 struct _E_Config_Gadcon 565 { 566 const char *name; 567 int id; 568 unsigned int zone; 569 Eina_List *clients; 570 }; 571 572 struct _E_Config_Gadcon_Client 573 { 574 const char *name; 575 const char *id; 576 struct 577 { 578 int pos, size, res; //gadcon 579 double pos_x, pos_y, size_w, size_h; //gadman 580 } geom; 581 struct 582 { 583 int seq, flags; 584 } state_info; 585 const char *style; 586 int orient; 587 unsigned char autoscroll; 588 unsigned char resizable; 589 const char *theme; 590 }; 591 592 struct _E_Config_Shelf 593 { 594 const char *name; 595 int id; 596 int zone; 597 int layer; //E_Layer 598 unsigned char popup; //DEAD 599 int orient; 600 unsigned char fit_along; 601 unsigned char fit_size; 602 const char *style; 603 int size; 604 int overlap; 605 int autohide; 606 int autohide_show_action; 607 float hide_timeout; 608 float hide_duration; 609 int desk_show_mode; 610 Eina_List *desk_list; 611 }; 612 613 struct _E_Config_Shelf_Desk 614 { 615 int x, y; 616 }; 617 618 struct _E_Config_Mime_Icon 619 { 620 const char *mime; 621 const char *icon; 622 }; 623 624 struct _E_Event_Config_Icon_Theme 625 { 626 const char *icon_theme; 627 }; 628 629 struct _E_Config_XKB_Layout 630 { 631 const char *name; 632 const char *model; 633 const char *variant; 634 }; 635 636 struct _E_Config_XKB_Option 637 { 638 const char *name; 639 }; 640 641 EINTERN int e_config_init(void); 642 EINTERN int e_config_shutdown(void); 643 644 E_API void e_config_load(void); 645 646 E_API int e_config_save(void); 647 E_API void e_config_save_flush(void); 648 E_API void e_config_save_queue(void); 649 650 E_API const char *e_config_profile_get(void); 651 E_API char *e_config_profile_dir_get(const char *prof); 652 E_API void e_config_profile_set(const char *prof); 653 E_API Eina_List *e_config_profile_list(void); 654 E_API void e_config_profile_add(const char *prof); 655 E_API void e_config_profile_del(const char *prof); 656 657 E_API void e_config_save_block_set(int block); 658 E_API int e_config_save_block_get(void); 659 660 E_API void *e_config_domain_load(const char *domain, E_Config_DD *edd); 661 E_API void *e_config_domain_system_load(const char *domain, E_Config_DD *edd); 662 E_API int e_config_profile_save(void); 663 E_API int e_config_domain_save(const char *domain, E_Config_DD *edd, const void *data); 664 665 E_API E_Config_Binding_Mouse *e_config_binding_mouse_match(E_Config_Binding_Mouse *eb_in); 666 E_API E_Config_Binding_Key *e_config_binding_key_match(E_Config_Binding_Key *eb_in); 667 E_API E_Config_Binding_Edge *e_config_binding_edge_match(E_Config_Binding_Edge *eb_in); 668 E_API E_Config_Binding_Signal *e_config_binding_signal_match(E_Config_Binding_Signal *eb_in); 669 E_API E_Config_Binding_Wheel *e_config_binding_wheel_match(E_Config_Binding_Wheel *eb_in); 670 E_API E_Config_Binding_Acpi *e_config_binding_acpi_match(E_Config_Binding_Acpi *eb_in); 671 E_API void e_config_mode_changed(void); 672 673 674 E_API void e_config_bindings_free(E_Config_Bindings *ecb); 675 E_API void e_config_binding_signal_free(E_Config_Binding_Signal *ebs); 676 E_API void e_config_binding_wheel_free(E_Config_Binding_Wheel *ebw); 677 E_API void e_config_binding_mouse_free(E_Config_Binding_Mouse *ebm); 678 E_API void e_config_binding_edge_free(E_Config_Binding_Edge *ebe); 679 E_API void e_config_binding_key_free(E_Config_Binding_Key *ebk); 680 E_API void e_config_binding_acpi_free(E_Config_Binding_Acpi *eba); 681 682 extern E_API E_Config *e_config; 683 extern E_API E_Config_Bindings *e_bindings; 684 685 extern E_API int E_EVENT_CONFIG_ICON_THEME; 686 extern E_API int E_EVENT_CONFIG_MODE_CHANGED; 687 extern E_API int E_EVENT_CONFIG_LOADED; 688 689 #endif 690 #endif 691