2 * @defgroup Config Elementary Config
5 * Elementary configuration is formed by a set options bounded to a
6 * given @ref Profile profile, like @ref Theme theme, @ref Fingers
7 * "finger size", etc. These are functions with which one synchronizes
8 * changes made to those values to the configuration storing files, de
9 * facto. You most probably don't want to use the functions in this
10 * group unless you're writing an elementary configuration manager.
16 * Save back Elementary's configuration, so that it will persist on
19 * @return @c EINA_TRUE, when successful. @c EINA_FALSE, otherwise.
22 * This function will take effect -- thus, do I/O -- immediately. Use
23 * it when you want to save all configuration changes at once. The
24 * current configuration set will get saved onto the current profile
28 EAPI Eina_Bool elm_config_save(void);
31 * Reload Elementary's configuration, bounded to current selected
34 * @return @c EINA_TRUE, when successful. @c EINA_FALSE, otherwise.
37 * Useful when you want to force reloading of configuration values for
38 * a profile. If one removes user custom configuration directories,
39 * for example, it will force a reload with system values instead.
42 EAPI void elm_config_reload(void);
45 * Flush all config settings then apply those settings to all applications
46 * using elementary on the current display.
50 EAPI void elm_config_all_flush(void);
57 * @defgroup Profile Elementary Profile
60 * Profiles are pre-set options that affect the whole look-and-feel of
61 * Elementary-based applications. There are, for example, profiles
62 * aimed at desktop computer applications and others aimed at mobile,
63 * touchscreen-based ones. You most probably don't want to use the
64 * functions in this group unless you're writing an elementary
65 * configuration manager.
71 * Get Elementary's profile in use.
73 * This gets the global profile that is applied to all Elementary
76 * @return The profile's name
79 EAPI const char *elm_config_profile_get(void);
82 * Get an Elementary's profile directory path in the filesystem. One
83 * may want to fetch a system profile's dir or a user one (fetched
86 * @param profile The profile's name
87 * @param is_user Whether to lookup for a user profile (@c EINA_TRUE)
88 * or a system one (@c EINA_FALSE)
89 * @return The profile's directory path.
92 * @note You must free it with elm_config_profile_dir_free().
94 EAPI const char *elm_config_profile_dir_get(const char *profile, Eina_Bool is_user);
97 * Free an Elementary's profile directory path, as returned by
98 * elm_config_profile_dir_get().
100 * @param p_dir The profile's path
104 EAPI void elm_config_profile_dir_free(const char *p_dir);
107 * Get Elementary's list of available profiles.
109 * @return The profiles list. List node data are the profile name
113 * @note One must free this list, after usage, with the function
114 * elm_config_profile_list_free().
116 EAPI Eina_List *elm_config_profile_list_get(void);
119 * Free Elementary's list of available profiles.
121 * @param l The profiles list, as returned by elm_config_profile_list_get().
125 EAPI void elm_config_profile_list_free(Eina_List *l);
128 * Set Elementary's profile.
130 * This sets the global profile that is applied to Elementary
131 * applications. Just the process the call comes from will be
134 * @param profile The profile's name
138 EAPI void elm_config_profile_set(const char *profile);
145 * @defgroup Scrolling Elementary Scrolling
146 * @ingroup Elementary
148 * These are functions setting how scrollable views in Elementary
149 * widgets should behave on user interaction.
155 * Get whether scrollers should bounce when they reach their
156 * viewport's edge during a scroll.
158 * @return the thumb scroll bouncing state
160 * This is the default behavior for touch screens, in general.
163 EAPI Eina_Bool elm_config_scroll_bounce_enabled_get(void);
166 * Set whether scrollers should bounce when they reach their
167 * viewport's edge during a scroll.
169 * @param enabled the thumb scroll bouncing state
171 * @see elm_config_scroll_bounce_enabled_get()
174 EAPI void elm_config_scroll_bounce_enabled_set(Eina_Bool enabled);
177 * Get the amount of inertia a scroller will impose at bounce
180 * @return the thumb scroll bounce friction
184 EAPI double elm_config_scroll_bounce_friction_get(void);
187 * Set the amount of inertia a scroller will impose at bounce
190 * @param friction the thumb scroll bounce friction
192 * @see elm_config_scroll_bounce_friction_get()
195 EAPI void elm_config_scroll_bounce_friction_set(double friction);
198 * Get the amount of inertia a <b>paged</b> scroller will impose at
199 * page fitting animations.
201 * @return the page scroll friction
205 EAPI double elm_config_scroll_page_scroll_friction_get(void);
208 * Set the amount of inertia a <b>paged</b> scroller will impose at
209 * page fitting animations.
211 * @param friction the page scroll friction
213 * @see elm_config_scroll_page_scroll_friction_get()
216 EAPI void elm_config_scroll_page_scroll_friction_set(double friction);
219 * Get the amount of inertia a scroller will impose at region bring
222 * @return the bring in scroll friction
226 EAPI double elm_config_scroll_bring_in_scroll_friction_get(void);
229 * Set the amount of inertia a scroller will impose at region bring
232 * @param friction the bring in scroll friction
234 * @see elm_config_scroll_bring_in_scroll_friction_get()
237 EAPI void elm_config_scroll_bring_in_scroll_friction_set(double friction);
240 * Get the amount of inertia scrollers will impose at animations
241 * triggered by Elementary widgets' zooming API.
243 * @return the zoom friction
247 EAPI double elm_config_scroll_zoom_friction_get(void);
250 * Set the amount of inertia scrollers will impose at animations
251 * triggered by Elementary widgets' zooming API.
253 * @param friction the zoom friction
255 * @see elm_config_scroll_zoom_friction_get()
258 EAPI void elm_config_scroll_zoom_friction_set(double friction);
261 * Get whether scrollers should be draggable from any point in their
264 * @return the thumb scroll state
266 * @note This is the default behavior for touch screens, in general.
267 * @note All other functions namespaced with "thumbscroll" will only
268 * have effect if this mode is enabled.
272 EAPI Eina_Bool elm_config_scroll_thumbscroll_enabled_get(void);
275 * Set whether scrollers should be draggable from any point in their
278 * @param enabled the thumb scroll state
280 * @see elm_config_scroll_thumbscroll_enabled_get()
283 EAPI void elm_config_scroll_thumbscroll_enabled_set(Eina_Bool enabled);
286 * Get the number of pixels one should travel while dragging a
287 * scroller's view to actually trigger scrolling.
289 * @return the thumb scroll threshold
291 * One would use higher values for touch screens, in general, because
292 * of their inherent imprecision.
295 EAPI unsigned int elm_config_scroll_thumbscroll_threshold_get(void);
298 * Set the number of pixels one should travel while dragging a
299 * scroller's view to actually trigger scrolling.
301 * @param threshold the thumb scroll threshold
303 * @see elm_config_thumbscroll_threshold_get()
306 EAPI void elm_config_scroll_thumbscroll_threshold_set(unsigned int threshold);
309 * Get the minimum speed of mouse cursor movement which will trigger
310 * list self scrolling animation after a mouse up event
313 * @return the thumb scroll momentum threshold
317 EAPI double elm_config_scroll_thumbscroll_momentum_threshold_get(void);
320 * Set the minimum speed of mouse cursor movement which will trigger
321 * list self scrolling animation after a mouse up event
324 * @param threshold the thumb scroll momentum threshold
326 * @see elm_config_thumbscroll_momentum_threshold_get()
329 EAPI void elm_config_scroll_thumbscroll_momentum_threshold_set(double threshold);
332 * Get the amount of inertia a scroller will impose at self scrolling
335 * @return the thumb scroll friction
339 EAPI double elm_config_scroll_thumbscroll_friction_get(void);
342 * Set the amount of inertia a scroller will impose at self scrolling
345 * @param friction the thumb scroll friction
347 * @see elm_config_thumbscroll_friction_get()
350 EAPI void elm_config_scroll_thumbscroll_friction_set(double friction);
353 * Get the amount of lag between your actual mouse cursor dragging
354 * movement and a scroller's view movement itself, while pushing it
355 * into bounce state manually.
357 * @return the thumb scroll border friction
361 EAPI double elm_config_scroll_thumbscroll_border_friction_get(void);
364 * Set the amount of lag between your actual mouse cursor dragging
365 * movement and a scroller's view movement itself, while pushing it
366 * into bounce state manually.
368 * @param friction the thumb scroll border friction. @c 0.0 for
369 * perfect synchrony between two movements, @c 1.0 for maximum
372 * @see elm_config_thumbscroll_border_friction_get()
373 * @note parameter value will get bound to 0.0 - 1.0 interval, always
377 EAPI void elm_config_scroll_thumbscroll_border_friction_set(double friction);
380 * Get the sensitivity amount which is be multiplied by the length of
383 * @return the thumb scroll sensitivity friction
387 EAPI double elm_config_scroll_thumbscroll_sensitivity_friction_get(void);
390 * Set the sensitivity amount which is be multiplied by the length of
393 * @param friction the thumb scroll sensitivity friction. @c 0.1 for
394 * minimum sensitivity, @c 1.0 for maximum sensitivity. 0.25
397 * @see elm_config_thumbscroll_sensitivity_friction_get()
398 * @note parameter value will get bound to 0.1 - 1.0 interval, always
402 EAPI void elm_config_scroll_thumbscroll_sensitivity_friction_set(double friction);
409 * Get the duration for occurring long press event.
411 * @return Timeout for long press event
414 EAPI double elm_config_longpress_timeout_get(void);
417 * Set the duration for occurring long press event.
419 * @param lonpress_timeout Timeout for long press event
422 EAPI void elm_config_longpress_timeout_set(double longpress_timeout);
425 * Get the duration after which tooltip will be shown.
427 * @return Duration after which tooltip will be shown.
429 EAPI double elm_config_tooltip_delay_get(void);
432 * Set the duration after which tooltip will be shown.
434 * @return EINA_TRUE if value is set.
436 EAPI void elm_config_tooltip_delay_set(double delay);
439 * Get the configured cursor engine only usage
441 * This gets the globally configured exclusive usage of engine cursors.
443 * @return 1 if only engine cursors should be used
446 EAPI Eina_Bool elm_config_cursor_engine_only_get(void);
449 * Set the configured cursor engine only usage
451 * This sets the globally configured exclusive usage of engine cursors.
452 * It won't affect cursors set before changing this value.
454 * @param engine_only If 1 only engine cursors will be enabled, if 0 will
455 * look for them on theme before.
458 EAPI void elm_config_cursor_engine_only_set(Eina_Bool engine_only);
461 * Get the global scaling factor
463 * This gets the globally configured scaling factor that is applied to all
466 * @return The scaling factor
469 EAPI double elm_config_scale_get(void);
472 * Set the global scaling factor
474 * This sets the globally configured scaling factor that is applied to all
477 * @param scale The scaling factor to set
480 EAPI void elm_config_scale_set(double scale);
483 * @defgroup Password_last_show Password show last
484 * @ingroup Elementary
486 * Show last feature of password mode enables user to view
487 * the last input entered for few seconds before masking it.
488 * These functions allow to set this feature in password mode
489 * of entry widget and also allow to manipulate the duration
490 * for which the input has to be visible.
496 * Get the "show last" setting of password mode.
498 * This gets the "show last" setting of password mode which might be
499 * enabled or disabled.
501 * @return @c EINA_TRUE, if the "show last" setting is enabled,
502 * @c EINA_FALSE if it's disabled.
504 * @ingroup Password_last_show
506 EAPI Eina_Bool elm_config_password_show_last_get(void);
509 * Set show last setting in password mode.
511 * This enables or disables show last setting of password mode.
513 * @param password_show_last If EINA_TRUE enables "show last" in password mode.
514 * @see elm_config_password_show_last_timeout_set()
515 * @ingroup Password_last_show
517 EAPI void elm_config_password_show_last_set(Eina_Bool password_show_last);
520 * Gets the timeout value in "show last" password mode.
522 * This gets the time out value for which the last input entered in password
523 * mode will be visible.
525 * @return The timeout value of "show last" password mode.
526 * @ingroup Password_last_show
528 EAPI double elm_config_password_show_last_timeout_get(void);
531 * Set's the timeout value in "show last" password mode.
533 * This sets the time out value for which the last input entered in password
534 * mode will be visible.
536 * @param password_show_last_timeout The timeout value.
537 * @see elm_config_password_show_last_set()
538 * @ingroup Password_last_show
540 EAPI void elm_config_password_show_last_timeout_set(double password_show_last_timeout);
547 * @defgroup Engine Elementary Engine
548 * @ingroup Elementary
550 * These are functions setting and querying which rendering engine
551 * Elementary will use for drawing its windows' pixels.
553 * The following are the available engines:
557 * @li "software_16_x11"
558 * @li "software_8_x11"
562 * @li "software_16_wince_gdi"
564 * @li "software_16_sdl"
575 * @brief Get Elementary's rendering engine in use.
577 * @return The rendering engine's name
578 * @note there's no need to free the returned string, here.
580 * This gets the global rendering engine that is applied to all Elementary
583 * @see elm_config_engine_set()
585 EAPI const char *elm_config_engine_get(void);
588 * @brief Set Elementary's rendering engine for use.
590 * @param engine The rendering engine's name
592 * Note that it will take effect only to Elementary windows created after
597 EAPI void elm_config_engine_set(const char *engine);
600 * @brief Get Elementary's preferred engine to use.
602 * @return The rendering engine's name
603 * @note there's no need to free the returned string, here.
605 * This gets the global rendering engine that is applied to all Elementary
606 * applications and is PREFERRED by the application. This can (and will)
607 * override the engine configured for all applications which.
609 * @see elm_config_preferred_engine_set()
611 EAPI const char *elm_config_preferred_engine_get(void);
614 * @brief Set Elementary's preferred rendering engine for use.
616 * @param engine The rendering engine's name
618 * Note that it will take effect only to Elementary windows created after
619 * this is called. This overrides the engine set by configuration at
620 * application startup. Note that it is a hint and may not be honored.
624 EAPI void elm_config_preferred_engine_set(const char *engine);
626 typedef struct _Elm_Text_Class
632 typedef struct _Elm_Font_Overlay
634 const char *text_class;
640 * Get Elementary's list of supported text classes.
642 * @return The text classes list, with @c Elm_Text_Class blobs as data.
645 * Release the list with elm_text_classes_list_free().
647 EAPI Eina_List *elm_config_text_classes_list_get(void);
650 * Free Elementary's list of supported text classes.
654 * @see elm_config_text_classes_list_get().
656 EAPI void elm_config_text_classes_list_free(Eina_List *list);
659 * Get Elementary's list of font overlays, set with
660 * elm_config_font_overlay_set().
662 * @return The font overlays list, with @c Elm_Font_Overlay blobs as
667 * For each text class, one can set a <b>font overlay</b> for it,
668 * overriding the default font properties for that class coming from
669 * the theme in use. There is no need to free this list.
671 * @see elm_config_font_overlay_set() and elm_config_font_overlay_unset().
673 EAPI const Eina_List *elm_config_font_overlay_list_get(void);
676 * Set a font overlay for a given Elementary text class.
678 * @param text_class Text class name
679 * @param font Font name and style string
680 * @param size Font size
684 * @p font has to be in the format returned by
685 * elm_font_fontconfig_name_get(). @see elm_config_font_overlay_list_get()
686 * and elm_config_font_overlay_unset().
688 EAPI void elm_config_font_overlay_set(const char *text_class, const char *font, Evas_Font_Size size);
691 * Unset a font overlay for a given Elementary text class.
693 * @param text_class Text class name
697 * This will bring back text elements belonging to text class
698 * @p text_class back to their default font settings.
700 EAPI void elm_config_font_overlay_unset(const char *text_class);
703 * Apply the changes made with elm_config_font_overlay_set() and
704 * elm_config_font_overlay_unset() on the current Elementary window.
708 * This applies all font overlays set to all objects in the UI.
710 EAPI void elm_config_font_overlay_apply(void);
713 * Get the configured "finger size"
715 * @return The finger size
717 * This gets the globally configured finger size, <b>in pixels</b>
721 EAPI Evas_Coord elm_config_finger_size_get(void);
724 * Set the configured finger size
726 * This sets the globally configured finger size in pixels
728 * @param size The finger size
731 EAPI void elm_config_finger_size_set(Evas_Coord size);
735 * Get the configured cache flush interval time
737 * This gets the globally configured cache flush interval time, in
740 * @return The cache flush interval time
743 * @see elm_cache_all_flush()
745 EAPI int elm_config_cache_flush_interval_get(void);
748 * Set the configured cache flush interval time
750 * This sets the globally configured cache flush interval time, in ticks
752 * @param size The cache flush interval time
755 * @see elm_cache_all_flush()
757 EAPI void elm_config_cache_flush_interval_set(int size);
760 * Get the configured cache flush enabled state
762 * This gets the globally configured cache flush state - if it is enabled
763 * or not. When cache flushing is enabled, elementary will regularly
764 * (see elm_config_cache_flush_interval_get() ) flush caches and dump data out of
765 * memory and allow usage to re-seed caches and data in memory where it
766 * can do so. An idle application will thus minimize its memory usage as
767 * data will be freed from memory and not be re-loaded as it is idle and
768 * not rendering or doing anything graphically right now.
770 * @return The cache flush state
773 * @see elm_cache_all_flush()
775 EAPI Eina_Bool elm_config_cache_flush_enabled_get(void);
778 * Set the configured cache flush enabled state
780 * This sets the globally configured cache flush enabled state.
782 * @param enabled The cache flush enabled state
785 * @see elm_cache_all_flush()
787 EAPI void elm_config_cache_flush_enabled_set(Eina_Bool enabled);
790 * Get the configured font cache size
792 * This gets the globally configured font cache size, in bytes.
794 * @return The font cache size
797 EAPI int elm_config_cache_font_cache_size_get(void);
800 * Set the configured font cache size
802 * This sets the globally configured font cache size, in bytes
804 * @param size The font cache size
807 EAPI void elm_config_cache_font_cache_size_set(int size);
810 * Get the configured image cache size
812 * This gets the globally configured image cache size, in bytes
814 * @return The image cache size
817 EAPI int elm_config_cache_image_cache_size_get(void);
820 * Set the configured image cache size
822 * This sets the globally configured image cache size, in bytes
824 * @param size The image cache size
827 EAPI void elm_config_cache_image_cache_size_set(int size);
831 * Get the configured edje file cache size.
833 * This gets the globally configured edje file cache size, in number
836 * @return The edje file cache size
839 EAPI int elm_config_cache_edje_file_cache_size_get(void);
842 * Set the configured edje file cache size
844 * This sets the globally configured edje file cache size, in number
847 * @param size The edje file cache size
850 EAPI void elm_config_cache_edje_file_cache_size_set(int size);
853 * Get the configured edje collections (groups) cache size.
855 * This gets the globally configured edje collections cache size, in
856 * number of collections.
858 * @return The edje collections cache size
861 EAPI int elm_config_cache_edje_collection_cache_size_get(void);
864 * Set the configured edje collections (groups) cache size
866 * This sets the globally configured edje collections cache size, in
867 * number of collections.
869 * @param size The edje collections cache size
872 EAPI void elm_config_cache_edje_collection_cache_size_set(int size);
875 * Get the enable status of the focus highlight
877 * This gets whether the highlight on focused objects is enabled or not
879 * @see elm_config_focus_highlight_enabled_set()
882 EAPI Eina_Bool elm_config_focus_highlight_enabled_get(void);
885 * Set the enable status of the focus highlight
887 * @param enable Enable highlight if EINA_TRUE, disable otherwise
889 * Set whether to show or not the highlight on focused objects
891 * Note that it will take effect only to Elementary windows created after
898 EAPI void elm_config_focus_highlight_enabled_set(Eina_Bool enable);
901 * Get the enable status of the highlight animation
903 * @return The focus highlight mode set
905 * Get whether the focus highlight, if enabled, will animate its switch from
906 * one object to the next
910 EAPI Eina_Bool elm_config_focus_highlight_animate_get(void);
913 * Set the enable status of the highlight animation
915 * @param animate Enable animation if EINA_TRUE, disable otherwise
917 * Set whether the focus highlight, if enabled, will animate its switch from
918 * one object to the next
920 * Note that it will take effect only to Elementary windows created after
927 EAPI void elm_config_focus_highlight_animate_set(Eina_Bool animate);
930 * Get the system mirrored mode. This determines the default mirrored mode
933 * @return EINA_TRUE if mirrored is set, EINA_FALSE otherwise
935 EAPI Eina_Bool elm_config_mirrored_get(void);
938 * Set the system mirrored mode. This determines the default mirrored mode
941 * @param mirrored EINA_TRUE to set mirrored mode, EINA_FALSE to unset it.
943 EAPI void elm_config_mirrored_set(Eina_Bool mirrored);