2 * @defgroup Config Elementary Config
4 * Elementary configuration is formed by a set options bounded to a
5 * given @ref Profile profile, like @ref Theme theme, @ref Fingers
6 * "finger size", etc. These are functions with which one synchronizes
7 * changes made to those values to the configuration storing files, de
8 * facto. You most probably don't want to use the functions in this
9 * group unless you're writing an elementary configuration manager.
15 * Save back Elementary's configuration, so that it will persist on
18 * @return @c EINA_TRUE, when successful. @c EINA_FALSE, otherwise.
21 * This function will take effect -- thus, do I/O -- immediately. Use
22 * it when you want to save all configuration changes at once. The
23 * current configuration set will get saved onto the current profile
27 EAPI Eina_Bool elm_config_save(void);
30 * Reload Elementary's configuration, bounded to current selected
33 * @return @c EINA_TRUE, when successful. @c EINA_FALSE, otherwise.
36 * Useful when you want to force reloading of configuration values for
37 * a profile. If one removes user custom configuration directories,
38 * for example, it will force a reload with system values instead.
41 EAPI void elm_config_reload(void);
44 * Flush all config settings then apply those settings to all applications
45 * using elementary on the current display.
46 * Following functions will update the config settings
47 * @li elm_cache_flush_interval_set()
48 * @li elm_cache_flush_enabled_set()
49 * @li elm_edje_file_cache_set()
50 * @li elm_edje_collection_cache_set()
51 * @li elm_finger_size_set()
52 * @li elm_focus_highlight_enabled_set()
53 * @li elm_focus_highlight_animate_set()
54 * @li elm_font_overlay_set()
55 * @li elm_font_cache_set()
56 * @li elm_image_cache_set()
57 * @li elm_profile_set()
59 * @li elm_scroll_bounce_enabled_set()
60 * @li elm_scroll_bounce_friction_set()
61 * @li elm_scroll_page_scroll_friction_set()
62 * @li elm_scroll_bring_in_scroll_friction_set()
63 * @li elm_scroll_zoom_friction_set()
64 * @li elm_scroll_thumbscroll_enabled_set()
65 * @li elm_scroll_thumbscroll_threshold_set()
66 * @li elm_scroll_thumbscroll_momentum_threshold_set()
67 * @li elm_scroll_thumbscroll_friction_set()
68 * @li elm_scroll_thumbscroll_border_friction_set()
69 * @li elm_scroll_thumbscroll_sensitivity_friction_set()
75 EAPI void elm_config_all_flush(void);
82 * @defgroup Profile Elementary Profile
84 * Profiles are pre-set options that affect the whole look-and-feel of
85 * Elementary-based applications. There are, for example, profiles
86 * aimed at desktop computer applications and others aimed at mobile,
87 * touchscreen-based ones. You most probably don't want to use the
88 * functions in this group unless you're writing an elementary
89 * configuration manager.
95 * Get Elementary's profile in use.
97 * This gets the global profile that is applied to all Elementary
100 * @return The profile's name
103 EAPI const char *elm_profile_current_get(void);
106 * Get an Elementary's profile directory path in the filesystem. One
107 * may want to fetch a system profile's dir or a user one (fetched
110 * @param profile The profile's name
111 * @param is_user Whether to lookup for a user profile (@c EINA_TRUE)
112 * or a system one (@c EINA_FALSE)
113 * @return The profile's directory path.
116 * @note You must free it with elm_profile_dir_free().
118 EAPI const char *elm_profile_dir_get(const char *profile, Eina_Bool is_user);
121 * Free an Elementary's profile directory path, as returned by
122 * elm_profile_dir_get().
124 * @param p_dir The profile's path
128 EAPI void elm_profile_dir_free(const char *p_dir);
131 * Get Elementary's list of available profiles.
133 * @return The profiles list. List node data are the profile name
137 * @note One must free this list, after usage, with the function
138 * elm_profile_list_free().
140 EAPI Eina_List *elm_profile_list_get(void);
143 * Free Elementary's list of available profiles.
145 * @param l The profiles list, as returned by elm_profile_list_get().
149 EAPI void elm_profile_list_free(Eina_List *l);
152 * Set Elementary's profile.
154 * This sets the global profile that is applied to Elementary
155 * applications. Just the process the call comes from will be
158 * @param profile The profile's name
162 EAPI void elm_profile_set(const char *profile);
169 * @defgroup Scrolling Scrolling
171 * These are functions setting how scrollable views in Elementary
172 * widgets should behave on user interaction.
178 * Get whether scrollers should bounce when they reach their
179 * viewport's edge during a scroll.
181 * @return the thumb scroll bouncing state
183 * This is the default behavior for touch screens, in general.
186 EAPI Eina_Bool elm_scroll_bounce_enabled_get(void);
189 * Set whether scrollers should bounce when they reach their
190 * viewport's edge during a scroll.
192 * @param enabled the thumb scroll bouncing state
194 * @see elm_thumbscroll_bounce_enabled_get()
197 EAPI void elm_scroll_bounce_enabled_set(Eina_Bool enabled);
200 * Get the amount of inertia a scroller will impose at bounce
203 * @return the thumb scroll bounce friction
207 EAPI double elm_scroll_bounce_friction_get(void);
210 * Set the amount of inertia a scroller will impose at bounce
213 * @param friction the thumb scroll bounce friction
215 * @see elm_thumbscroll_bounce_friction_get()
218 EAPI void elm_scroll_bounce_friction_set(double friction);
221 * Get the amount of inertia a <b>paged</b> scroller will impose at
222 * page fitting animations.
224 * @return the page scroll friction
228 EAPI double elm_scroll_page_scroll_friction_get(void);
231 * Set the amount of inertia a <b>paged</b> scroller will impose at
232 * page fitting animations.
234 * @param friction the page scroll friction
236 * @see elm_thumbscroll_page_scroll_friction_get()
239 EAPI void elm_scroll_page_scroll_friction_set(double friction);
242 * Get the amount of inertia a scroller will impose at region bring
245 * @return the bring in scroll friction
249 EAPI double elm_scroll_bring_in_scroll_friction_get(void);
252 * Set the amount of inertia a scroller will impose at region bring
255 * @param friction the bring in scroll friction
257 * @see elm_thumbscroll_bring_in_scroll_friction_get()
260 EAPI void elm_scroll_bring_in_scroll_friction_set(double friction);
263 * Get the amount of inertia scrollers will impose at animations
264 * triggered by Elementary widgets' zooming API.
266 * @return the zoom friction
270 EAPI double elm_scroll_zoom_friction_get(void);
273 * Set the amount of inertia scrollers will impose at animations
274 * triggered by Elementary widgets' zooming API.
276 * @param friction the zoom friction
278 * @see elm_thumbscroll_zoom_friction_get()
281 EAPI void elm_scroll_zoom_friction_set(double friction);
284 * Get whether scrollers should be draggable from any point in their
287 * @return the thumb scroll state
289 * @note This is the default behavior for touch screens, in general.
290 * @note All other functions namespaced with "thumbscroll" will only
291 * have effect if this mode is enabled.
295 EAPI Eina_Bool elm_scroll_thumbscroll_enabled_get(void);
298 * Set whether scrollers should be draggable from any point in their
301 * @param enabled the thumb scroll state
303 * @see elm_thumbscroll_enabled_get()
306 EAPI void elm_scroll_thumbscroll_enabled_set(Eina_Bool enabled);
309 * Get the number of pixels one should travel while dragging a
310 * scroller's view to actually trigger scrolling.
312 * @return the thumb scroll threshold
314 * One would use higher values for touch screens, in general, because
315 * of their inherent imprecision.
318 EAPI unsigned int elm_scroll_thumbscroll_threshold_get(void);
321 * Set the number of pixels one should travel while dragging a
322 * scroller's view to actually trigger scrolling.
324 * @param threshold the thumb scroll threshold
326 * @see elm_thumbscroll_threshold_get()
329 EAPI void elm_scroll_thumbscroll_threshold_set(unsigned int threshold);
332 * Get the minimum speed of mouse cursor movement which will trigger
333 * list self scrolling animation after a mouse up event
336 * @return the thumb scroll momentum threshold
340 EAPI double elm_scroll_thumbscroll_momentum_threshold_get(void);
343 * Set the minimum speed of mouse cursor movement which will trigger
344 * list self scrolling animation after a mouse up event
347 * @param threshold the thumb scroll momentum threshold
349 * @see elm_thumbscroll_momentum_threshold_get()
352 EAPI void elm_scroll_thumbscroll_momentum_threshold_set(double threshold);
355 * Get the amount of inertia a scroller will impose at self scrolling
358 * @return the thumb scroll friction
362 EAPI double elm_scroll_thumbscroll_friction_get(void);
365 * Set the amount of inertia a scroller will impose at self scrolling
368 * @param friction the thumb scroll friction
370 * @see elm_thumbscroll_friction_get()
373 EAPI void elm_scroll_thumbscroll_friction_set(double friction);
376 * Get the amount of lag between your actual mouse cursor dragging
377 * movement and a scroller's view movement itself, while pushing it
378 * into bounce state manually.
380 * @return the thumb scroll border friction
384 EAPI double elm_scroll_thumbscroll_border_friction_get(void);
387 * Set the amount of lag between your actual mouse cursor dragging
388 * movement and a scroller's view movement itself, while pushing it
389 * into bounce state manually.
391 * @param friction the thumb scroll border friction. @c 0.0 for
392 * perfect synchrony between two movements, @c 1.0 for maximum
395 * @see elm_thumbscroll_border_friction_get()
396 * @note parameter value will get bound to 0.0 - 1.0 interval, always
400 EAPI void elm_scroll_thumbscroll_border_friction_set(double friction);
403 * Get the sensitivity amount which is be multiplied by the length of
406 * @return the thumb scroll sensitivity friction
410 EAPI double elm_scroll_thumbscroll_sensitivity_friction_get(void);
413 * Set the sensitivity amount which is be multiplied by the length of
416 * @param friction the thumb scroll sensitivity friction. @c 0.1 for
417 * minimum sensitivity, @c 1.0 for maximum sensitivity. 0.25
420 * @see elm_thumbscroll_sensitivity_friction_get()
421 * @note parameter value will get bound to 0.1 - 1.0 interval, always
425 EAPI void elm_scroll_thumbscroll_sensitivity_friction_set(double friction);
432 * Get the duration for occurring long press event.
434 * @return Timeout for long press event
437 EAPI double elm_longpress_timeout_get(void);
440 * Set the duration for occurring long press event.
442 * @param lonpress_timeout Timeout for long press event
445 EAPI void elm_longpress_timeout_set(double longpress_timeout);
448 * Get the duration after which tooltip will be shown.
450 * @return Duration after which tooltip will be shown.
452 EAPI double elm_config_tooltip_delay_get(void);
455 * Set the duration after which tooltip will be shown.
457 * @return EINA_TRUE if value is set.
459 EAPI void elm_config_tooltip_delay_set(double delay);
462 * Get the configured cursor engine only usage
464 * This gets the globally configured exclusive usage of engine cursors.
466 * @return 1 if only engine cursors should be used
469 EAPI Eina_Bool elm_cursor_engine_only_get(void);
472 * Set the configured cursor engine only usage
474 * This sets the globally configured exclusive usage of engine cursors.
475 * It won't affect cursors set before changing this value.
477 * @param engine_only If 1 only engine cursors will be enabled, if 0 will
478 * look for them on theme before.
481 EAPI void elm_cursor_engine_only_set(Eina_Bool engine_only);
484 * Get the global scaling factor
486 * This gets the globally configured scaling factor that is applied to all
489 * @return The scaling factor
492 EAPI double elm_scale_get(void);
495 * Set the global scaling factor
497 * This sets the globally configured scaling factor that is applied to all
500 * @param scale The scaling factor to set
503 EAPI void elm_scale_set(double scale);
506 * @defgroup Password_last_show Password show last
508 * Show last feature of password mode enables user to view
509 * the last input entered for few seconds before masking it.
510 * These functions allow to set this feature in password mode
511 * of entry widget and also allow to manipulate the duration
512 * for which the input has to be visible.
518 * Get the "show last" setting of password mode.
520 * This gets the "show last" setting of password mode which might be
521 * enabled or disabled.
523 * @return @c EINA_TRUE, if the "show last" setting is enabled,
524 * @c EINA_FALSE if it's disabled.
526 * @ingroup Password_last_show
528 EAPI Eina_Bool elm_password_show_last_get(void);
531 * Set show last setting in password mode.
533 * This enables or disables show last setting of password mode.
535 * @param password_show_last If EINA_TRUE enables "show last" in password mode.
536 * @see elm_password_show_last_timeout_set()
537 * @ingroup Password_last_show
539 EAPI void elm_password_show_last_set(Eina_Bool password_show_last);
542 * Gets the timeout value in "show last" password mode.
544 * This gets the time out value for which the last input entered in password
545 * mode will be visible.
547 * @return The timeout value of "show last" password mode.
548 * @ingroup Password_last_show
550 EAPI double elm_password_show_last_timeout_get(void);
553 * Set's the timeout value in "show last" password mode.
555 * This sets the time out value for which the last input entered in password
556 * mode will be visible.
558 * @param password_show_last_timeout The timeout value.
559 * @see elm_password_show_last_set()
560 * @ingroup Password_last_show
562 EAPI void elm_password_show_last_timeout_set(double password_show_last_timeout);
569 * @defgroup Engine Elementary Engine
571 * These are functions setting and querying which rendering engine
572 * Elementary will use for drawing its windows' pixels.
574 * The following are the available engines:
578 * @li "software_16_x11"
579 * @li "software_8_x11"
583 * @li "software_16_wince_gdi"
585 * @li "software_16_sdl"
596 * @brief Get Elementary's rendering engine in use.
598 * @return The rendering engine's name
599 * @note there's no need to free the returned string, here.
601 * This gets the global rendering engine that is applied to all Elementary
604 * @see elm_engine_set()
606 EAPI const char *elm_engine_get(void);
609 * @brief Set Elementary's rendering engine for use.
611 * @param engine The rendering engine's name
613 * Note that it will take effect only to Elementary windows created after
618 EAPI void elm_engine_set(const char *engine);
621 * @brief Get Elementary's preferred engine to use.
623 * @return The rendering engine's name
624 * @note there's no need to free the returned string, here.
626 * This gets the global rendering engine that is applied to all Elementary
627 * applications and is PREFERRED by the application. This can (and will)
628 * override the engine configured for all applications which.
630 * @see elm_preferred_engine_set()
632 EAPI const char *elm_preferred_engine_get(void);
635 * @brief Set Elementary's preferred rendering engine for use.
637 * @param engine The rendering engine's name
639 * Note that it will take effect only to Elementary windows created after
640 * this is called. This overrides the engine set by configuration at
641 * application startup. Note that it is a hint and may not be honored.
645 EAPI void elm_preferred_engine_set(const char *engine);
647 typedef struct _Elm_Text_Class
653 typedef struct _Elm_Font_Overlay
655 const char *text_class;
661 * Get Elementary's list of supported text classes.
663 * @return The text classes list, with @c Elm_Text_Class blobs as data.
666 * Release the list with elm_text_classes_list_free().
668 EAPI Eina_List *elm_text_classes_list_get(void);
671 * Free Elementary's list of supported text classes.
675 * @see elm_text_classes_list_get().
677 EAPI void elm_text_classes_list_free(Eina_List *list);
680 * Get Elementary's list of font overlays, set with
681 * elm_font_overlay_set().
683 * @return The font overlays list, with @c Elm_Font_Overlay blobs as
688 * For each text class, one can set a <b>font overlay</b> for it,
689 * overriding the default font properties for that class coming from
690 * the theme in use. There is no need to free this list.
692 * @see elm_font_overlay_set() and elm_font_overlay_unset().
694 EAPI const Eina_List *elm_font_overlay_list_get(void);
697 * Set a font overlay for a given Elementary text class.
699 * @param text_class Text class name
700 * @param font Font name and style string
701 * @param size Font size
705 * @p font has to be in the format returned by
706 * elm_font_fontconfig_name_get(). @see elm_font_overlay_list_get()
707 * and elm_font_overlay_unset().
709 EAPI void elm_font_overlay_set(const char *text_class, const char *font, Evas_Font_Size size);
712 * Unset a font overlay for a given Elementary text class.
714 * @param text_class Text class name
718 * This will bring back text elements belonging to text class
719 * @p text_class back to their default font settings.
721 EAPI void elm_font_overlay_unset(const char *text_class);
724 * Apply the changes made with elm_font_overlay_set() and
725 * elm_font_overlay_unset() on the current Elementary window.
729 * This applies all font overlays set to all objects in the UI.
731 EAPI void elm_font_overlay_apply(void);
734 * Get the configured "finger size"
736 * @return The finger size
738 * This gets the globally configured finger size, <b>in pixels</b>
742 EAPI Evas_Coord elm_finger_size_get(void);
745 * Set the configured finger size
747 * This sets the globally configured finger size in pixels
749 * @param size The finger size
752 EAPI void elm_finger_size_set(Evas_Coord size);
756 * Get the configured cache flush interval time
758 * This gets the globally configured cache flush interval time, in
761 * @return The cache flush interval time
764 * @see elm_cache_all_flush()
766 EAPI int elm_cache_flush_interval_get(void);
769 * Set the configured cache flush interval time
771 * This sets the globally configured cache flush interval time, in ticks
773 * @param size The cache flush interval time
776 * @see elm_cache_all_flush()
778 EAPI void elm_cache_flush_interval_set(int size);
781 * Get the configured cache flush enabled state
783 * This gets the globally configured cache flush state - if it is enabled
784 * or not. When cache flushing is enabled, elementary will regularly
785 * (see elm_cache_flush_interval_get() ) flush caches and dump data out of
786 * memory and allow usage to re-seed caches and data in memory where it
787 * can do so. An idle application will thus minimize its memory usage as
788 * data will be freed from memory and not be re-loaded as it is idle and
789 * not rendering or doing anything graphically right now.
791 * @return The cache flush state
794 * @see elm_cache_all_flush()
796 EAPI Eina_Bool elm_cache_flush_enabled_get(void);
799 * Set the configured cache flush enabled state
801 * This sets the globally configured cache flush enabled state.
803 * @param enabled The cache flush enabled state
806 * @see elm_cache_all_flush()
808 EAPI void elm_cache_flush_enabled_set(Eina_Bool enabled);
811 * Get the configured font cache size
813 * This gets the globally configured font cache size, in bytes.
815 * @return The font cache size
818 EAPI int elm_cache_font_cache_size_get(void);
821 * Set the configured font cache size
823 * This sets the globally configured font cache size, in bytes
825 * @param size The font cache size
828 EAPI void elm_cache_font_cache_size_set(int size);
831 * Get the configured image cache size
833 * This gets the globally configured image cache size, in bytes
835 * @return The image cache size
838 EAPI int elm_cache_image_cache_size_get(void);
841 * Set the configured image cache size
843 * This sets the globally configured image cache size, in bytes
845 * @param size The image cache size
848 EAPI void elm_cache_image_cache_size_set(int size);
852 * Get the configured edje file cache size.
854 * This gets the globally configured edje file cache size, in number
857 * @return The edje file cache size
860 EAPI int elm_cache_edje_file_cache_size_get(void);
863 * Set the configured edje file cache size
865 * This sets the globally configured edje file cache size, in number
868 * @param size The edje file cache size
871 EAPI void elm_cache_edje_file_cache_size_set(int size);
874 * Get the configured edje collections (groups) cache size.
876 * This gets the globally configured edje collections cache size, in
877 * number of collections.
879 * @return The edje collections cache size
882 EAPI int elm_cache_edje_collection_cache_size_get(void);
885 * Set the configured edje collections (groups) cache size
887 * This sets the globally configured edje collections cache size, in
888 * number of collections.
890 * @param size The edje collections cache size
893 EAPI void elm_cache_edje_collection_cache_size_set(int size);
896 * Get the enable status of the focus highlight
898 * This gets whether the highlight on focused objects is enabled or not
900 * @see elm_focus_highlight_enabled_set()
903 EAPI Eina_Bool elm_focus_highlight_enabled_get(void);
906 * Set the enable status of the focus highlight
908 * @param enable Enable highlight if EINA_TRUE, disable otherwise
910 * Set whether to show or not the highlight on focused objects
912 * Note that it will take effect only to Elementary windows created after
919 EAPI void elm_focus_highlight_enabled_set(Eina_Bool enable);
922 * Get the enable status of the highlight animation
924 * @return The focus highlight mode set
926 * Get whether the focus highlight, if enabled, will animate its switch from
927 * one object to the next
931 EAPI Eina_Bool elm_focus_highlight_animate_get(void);
934 * Set the enable status of the highlight animation
936 * @param animate Enable animation if EINA_TRUE, disable otherwise
938 * Set whether the focus highlight, if enabled, will animate its switch from
939 * one object to the next
941 * Note that it will take effect only to Elementary windows created after
948 EAPI void elm_focus_highlight_animate_set(Eina_Bool animate);