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.
49 EAPI void elm_config_all_flush(void);
56 * @defgroup Profile Elementary Profile
58 * Profiles are pre-set options that affect the whole look-and-feel of
59 * Elementary-based applications. There are, for example, profiles
60 * aimed at desktop computer applications and others aimed at mobile,
61 * touchscreen-based ones. You most probably don't want to use the
62 * functions in this group unless you're writing an elementary
63 * configuration manager.
69 * Get Elementary's profile in use.
71 * This gets the global profile that is applied to all Elementary
74 * @return The profile's name
77 EAPI const char *elm_config_profile_get(void);
80 * Get an Elementary's profile directory path in the filesystem. One
81 * may want to fetch a system profile's dir or a user one (fetched
84 * @param profile The profile's name
85 * @param is_user Whether to lookup for a user profile (@c EINA_TRUE)
86 * or a system one (@c EINA_FALSE)
87 * @return The profile's directory path.
90 * @note You must free it with elm_config_profile_dir_free().
92 EAPI const char *elm_config_profile_dir_get(const char *profile, Eina_Bool is_user);
95 * Free an Elementary's profile directory path, as returned by
96 * elm_config_profile_dir_get().
98 * @param p_dir The profile's path
102 EAPI void elm_config_profile_dir_free(const char *p_dir);
105 * Get Elementary's list of available profiles.
107 * @return The profiles list. List node data are the profile name
111 * @note One must free this list, after usage, with the function
112 * elm_config_profile_list_free().
114 EAPI Eina_List *elm_config_profile_list_get(void);
117 * Free Elementary's list of available profiles.
119 * @param l The profiles list, as returned by elm_config_profile_list_get().
123 EAPI void elm_config_profile_list_free(Eina_List *l);
126 * Set Elementary's profile.
128 * This sets the global profile that is applied to Elementary
129 * applications. Just the process the call comes from will be
132 * @param profile The profile's name
136 EAPI void elm_config_profile_set(const char *profile);
143 * @defgroup Scrolling Scrolling
145 * These are functions setting how scrollable views in Elementary
146 * widgets should behave on user interaction.
152 * Get whether scrollers should bounce when they reach their
153 * viewport's edge during a scroll.
155 * @return the thumb scroll bouncing state
157 * This is the default behavior for touch screens, in general.
160 EAPI Eina_Bool elm_config_scroll_bounce_enabled_get(void);
163 * Set whether scrollers should bounce when they reach their
164 * viewport's edge during a scroll.
166 * @param enabled the thumb scroll bouncing state
168 * @see elm_config_scroll_bounce_enabled_get()
171 EAPI void elm_config_scroll_bounce_enabled_set(Eina_Bool enabled);
174 * Get the amount of inertia a scroller will impose at bounce
177 * @return the thumb scroll bounce friction
181 EAPI double elm_config_scroll_bounce_friction_get(void);
184 * Set the amount of inertia a scroller will impose at bounce
187 * @param friction the thumb scroll bounce friction
189 * @see elm_config_scroll_bounce_friction_get()
192 EAPI void elm_config_scroll_bounce_friction_set(double friction);
195 * Get the amount of inertia a <b>paged</b> scroller will impose at
196 * page fitting animations.
198 * @return the page scroll friction
202 EAPI double elm_config_scroll_page_scroll_friction_get(void);
205 * Set the amount of inertia a <b>paged</b> scroller will impose at
206 * page fitting animations.
208 * @param friction the page scroll friction
210 * @see elm_config_scroll_page_scroll_friction_get()
213 EAPI void elm_config_scroll_page_scroll_friction_set(double friction);
216 * Get the amount of inertia a scroller will impose at region bring
219 * @return the bring in scroll friction
223 EAPI double elm_config_scroll_bring_in_scroll_friction_get(void);
226 * Set the amount of inertia a scroller will impose at region bring
229 * @param friction the bring in scroll friction
231 * @see elm_config_scroll_bring_in_scroll_friction_get()
234 EAPI void elm_config_scroll_bring_in_scroll_friction_set(double friction);
237 * Get the amount of inertia scrollers will impose at animations
238 * triggered by Elementary widgets' zooming API.
240 * @return the zoom friction
244 EAPI double elm_config_scroll_zoom_friction_get(void);
247 * Set the amount of inertia scrollers will impose at animations
248 * triggered by Elementary widgets' zooming API.
250 * @param friction the zoom friction
252 * @see elm_config_scroll_zoom_friction_get()
255 EAPI void elm_config_scroll_zoom_friction_set(double friction);
258 * Get whether scrollers should be draggable from any point in their
261 * @return the thumb scroll state
263 * @note This is the default behavior for touch screens, in general.
264 * @note All other functions namespaced with "thumbscroll" will only
265 * have effect if this mode is enabled.
269 EAPI Eina_Bool elm_config_scroll_thumbscroll_enabled_get(void);
272 * Set whether scrollers should be draggable from any point in their
275 * @param enabled the thumb scroll state
277 * @see elm_config_scroll_thumbscroll_enabled_get()
280 EAPI void elm_config_scroll_thumbscroll_enabled_set(Eina_Bool enabled);
283 * Get the number of pixels one should travel while dragging a
284 * scroller's view to actually trigger scrolling.
286 * @return the thumb scroll threshold
288 * One would use higher values for touch screens, in general, because
289 * of their inherent imprecision.
292 EAPI unsigned int elm_config_scroll_thumbscroll_threshold_get(void);
295 * Set the number of pixels one should travel while dragging a
296 * scroller's view to actually trigger scrolling.
298 * @param threshold the thumb scroll threshold
300 * @see elm_config_thumbscroll_threshold_get()
303 EAPI void elm_config_scroll_thumbscroll_threshold_set(unsigned int threshold);
306 * Get the minimum speed of mouse cursor movement which will trigger
307 * list self scrolling animation after a mouse up event
310 * @return the thumb scroll momentum threshold
314 EAPI double elm_config_scroll_thumbscroll_momentum_threshold_get(void);
317 * Set the minimum speed of mouse cursor movement which will trigger
318 * list self scrolling animation after a mouse up event
321 * @param threshold the thumb scroll momentum threshold
323 * @see elm_config_thumbscroll_momentum_threshold_get()
326 EAPI void elm_config_scroll_thumbscroll_momentum_threshold_set(double threshold);
329 * Get the amount of inertia a scroller will impose at self scrolling
332 * @return the thumb scroll friction
336 EAPI double elm_config_scroll_thumbscroll_friction_get(void);
339 * Set the amount of inertia a scroller will impose at self scrolling
342 * @param friction the thumb scroll friction
344 * @see elm_config_thumbscroll_friction_get()
347 EAPI void elm_config_scroll_thumbscroll_friction_set(double friction);
350 * Get the amount of lag between your actual mouse cursor dragging
351 * movement and a scroller's view movement itself, while pushing it
352 * into bounce state manually.
354 * @return the thumb scroll border friction
358 EAPI double elm_config_scroll_thumbscroll_border_friction_get(void);
361 * Set the amount of lag between your actual mouse cursor dragging
362 * movement and a scroller's view movement itself, while pushing it
363 * into bounce state manually.
365 * @param friction the thumb scroll border friction. @c 0.0 for
366 * perfect synchrony between two movements, @c 1.0 for maximum
369 * @see elm_config_thumbscroll_border_friction_get()
370 * @note parameter value will get bound to 0.0 - 1.0 interval, always
374 EAPI void elm_config_scroll_thumbscroll_border_friction_set(double friction);
377 * Get the sensitivity amount which is be multiplied by the length of
380 * @return the thumb scroll sensitivity friction
384 EAPI double elm_config_scroll_thumbscroll_sensitivity_friction_get(void);
387 * Set the sensitivity amount which is be multiplied by the length of
390 * @param friction the thumb scroll sensitivity friction. @c 0.1 for
391 * minimum sensitivity, @c 1.0 for maximum sensitivity. 0.25
394 * @see elm_config_thumbscroll_sensitivity_friction_get()
395 * @note parameter value will get bound to 0.1 - 1.0 interval, always
399 EAPI void elm_config_scroll_thumbscroll_sensitivity_friction_set(double friction);
406 * Get the duration for occurring long press event.
408 * @return Timeout for long press event
411 EAPI double elm_config_longpress_timeout_get(void);
414 * Set the duration for occurring long press event.
416 * @param lonpress_timeout Timeout for long press event
419 EAPI void elm_config_longpress_timeout_set(double longpress_timeout);
422 * Get the duration after which tooltip will be shown.
424 * @return Duration after which tooltip will be shown.
426 EAPI double elm_config_tooltip_delay_get(void);
429 * Set the duration after which tooltip will be shown.
431 * @return EINA_TRUE if value is set.
433 EAPI void elm_config_tooltip_delay_set(double delay);
436 * Get the configured cursor engine only usage
438 * This gets the globally configured exclusive usage of engine cursors.
440 * @return 1 if only engine cursors should be used
443 EAPI Eina_Bool elm_config_cursor_engine_only_get(void);
446 * Set the configured cursor engine only usage
448 * This sets the globally configured exclusive usage of engine cursors.
449 * It won't affect cursors set before changing this value.
451 * @param engine_only If 1 only engine cursors will be enabled, if 0 will
452 * look for them on theme before.
455 EAPI void elm_config_cursor_engine_only_set(Eina_Bool engine_only);
458 * Get the global scaling factor
460 * This gets the globally configured scaling factor that is applied to all
463 * @return The scaling factor
466 EAPI double elm_config_scale_get(void);
469 * Set the global scaling factor
471 * This sets the globally configured scaling factor that is applied to all
474 * @param scale The scaling factor to set
477 EAPI void elm_config_scale_set(double scale);
480 * @defgroup Password_last_show Password show last
482 * Show last feature of password mode enables user to view
483 * the last input entered for few seconds before masking it.
484 * These functions allow to set this feature in password mode
485 * of entry widget and also allow to manipulate the duration
486 * for which the input has to be visible.
492 * Get the "show last" setting of password mode.
494 * This gets the "show last" setting of password mode which might be
495 * enabled or disabled.
497 * @return @c EINA_TRUE, if the "show last" setting is enabled,
498 * @c EINA_FALSE if it's disabled.
500 * @ingroup Password_last_show
502 EAPI Eina_Bool elm_config_password_show_last_get(void);
505 * Set show last setting in password mode.
507 * This enables or disables show last setting of password mode.
509 * @param password_show_last If EINA_TRUE enables "show last" in password mode.
510 * @see elm_config_password_show_last_timeout_set()
511 * @ingroup Password_last_show
513 EAPI void elm_config_password_show_last_set(Eina_Bool password_show_last);
516 * Gets the timeout value in "show last" password mode.
518 * This gets the time out value for which the last input entered in password
519 * mode will be visible.
521 * @return The timeout value of "show last" password mode.
522 * @ingroup Password_last_show
524 EAPI double elm_config_password_show_last_timeout_get(void);
527 * Set's the timeout value in "show last" password mode.
529 * This sets the time out value for which the last input entered in password
530 * mode will be visible.
532 * @param password_show_last_timeout The timeout value.
533 * @see elm_config_password_show_last_set()
534 * @ingroup Password_last_show
536 EAPI void elm_config_password_show_last_timeout_set(double password_show_last_timeout);
543 * @defgroup Engine Elementary Engine
545 * These are functions setting and querying which rendering engine
546 * Elementary will use for drawing its windows' pixels.
548 * The following are the available engines:
552 * @li "software_16_x11"
553 * @li "software_8_x11"
557 * @li "software_16_wince_gdi"
559 * @li "software_16_sdl"
570 * @brief Get Elementary's rendering engine in use.
572 * @return The rendering engine's name
573 * @note there's no need to free the returned string, here.
575 * This gets the global rendering engine that is applied to all Elementary
578 * @see elm_config_engine_set()
580 EAPI const char *elm_config_engine_get(void);
583 * @brief Set Elementary's rendering engine for use.
585 * @param engine The rendering engine's name
587 * Note that it will take effect only to Elementary windows created after
592 EAPI void elm_config_engine_set(const char *engine);
595 * @brief Get Elementary's preferred engine to use.
597 * @return The rendering engine's name
598 * @note there's no need to free the returned string, here.
600 * This gets the global rendering engine that is applied to all Elementary
601 * applications and is PREFERRED by the application. This can (and will)
602 * override the engine configured for all applications which.
604 * @see elm_config_preferred_engine_set()
606 EAPI const char *elm_config_preferred_engine_get(void);
609 * @brief Set Elementary's preferred 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
614 * this is called. This overrides the engine set by configuration at
615 * application startup. Note that it is a hint and may not be honored.
619 EAPI void elm_config_preferred_engine_set(const char *engine);
621 typedef struct _Elm_Text_Class
627 typedef struct _Elm_Font_Overlay
629 const char *text_class;
635 * Get Elementary's list of supported text classes.
637 * @return The text classes list, with @c Elm_Text_Class blobs as data.
640 * Release the list with elm_text_classes_list_free().
642 EAPI Eina_List *elm_config_text_classes_list_get(void);
645 * Free Elementary's list of supported text classes.
649 * @see elm_config_text_classes_list_get().
651 EAPI void elm_config_text_classes_list_free(Eina_List *list);
654 * Get Elementary's list of font overlays, set with
655 * elm_config_font_overlay_set().
657 * @return The font overlays list, with @c Elm_Font_Overlay blobs as
662 * For each text class, one can set a <b>font overlay</b> for it,
663 * overriding the default font properties for that class coming from
664 * the theme in use. There is no need to free this list.
666 * @see elm_config_font_overlay_set() and elm_config_font_overlay_unset().
668 EAPI const Eina_List *elm_config_font_overlay_list_get(void);
671 * Set a font overlay for a given Elementary text class.
673 * @param text_class Text class name
674 * @param font Font name and style string
675 * @param size Font size
679 * @p font has to be in the format returned by
680 * elm_font_fontconfig_name_get(). @see elm_config_font_overlay_list_get()
681 * and elm_config_font_overlay_unset().
683 EAPI void elm_config_font_overlay_set(const char *text_class, const char *font, Evas_Font_Size size);
686 * Unset a font overlay for a given Elementary text class.
688 * @param text_class Text class name
692 * This will bring back text elements belonging to text class
693 * @p text_class back to their default font settings.
695 EAPI void elm_config_font_overlay_unset(const char *text_class);
698 * Apply the changes made with elm_config_font_overlay_set() and
699 * elm_config_font_overlay_unset() on the current Elementary window.
703 * This applies all font overlays set to all objects in the UI.
705 EAPI void elm_config_font_overlay_apply(void);
708 * Get the configured "finger size"
710 * @return The finger size
712 * This gets the globally configured finger size, <b>in pixels</b>
716 EAPI Evas_Coord elm_config_finger_size_get(void);
719 * Set the configured finger size
721 * This sets the globally configured finger size in pixels
723 * @param size The finger size
726 EAPI void elm_config_finger_size_set(Evas_Coord size);
730 * Get the configured cache flush interval time
732 * This gets the globally configured cache flush interval time, in
735 * @return The cache flush interval time
738 * @see elm_cache_all_flush()
740 EAPI int elm_config_cache_flush_interval_get(void);
743 * Set the configured cache flush interval time
745 * This sets the globally configured cache flush interval time, in ticks
747 * @param size The cache flush interval time
750 * @see elm_cache_all_flush()
752 EAPI void elm_config_cache_flush_interval_set(int size);
755 * Get the configured cache flush enabled state
757 * This gets the globally configured cache flush state - if it is enabled
758 * or not. When cache flushing is enabled, elementary will regularly
759 * (see elm_config_cache_flush_interval_get() ) flush caches and dump data out of
760 * memory and allow usage to re-seed caches and data in memory where it
761 * can do so. An idle application will thus minimize its memory usage as
762 * data will be freed from memory and not be re-loaded as it is idle and
763 * not rendering or doing anything graphically right now.
765 * @return The cache flush state
768 * @see elm_cache_all_flush()
770 EAPI Eina_Bool elm_config_cache_flush_enabled_get(void);
773 * Set the configured cache flush enabled state
775 * This sets the globally configured cache flush enabled state.
777 * @param enabled The cache flush enabled state
780 * @see elm_cache_all_flush()
782 EAPI void elm_config_cache_flush_enabled_set(Eina_Bool enabled);
785 * Get the configured font cache size
787 * This gets the globally configured font cache size, in bytes.
789 * @return The font cache size
792 EAPI int elm_config_cache_font_cache_size_get(void);
795 * Set the configured font cache size
797 * This sets the globally configured font cache size, in bytes
799 * @param size The font cache size
802 EAPI void elm_config_cache_font_cache_size_set(int size);
805 * Get the configured image cache size
807 * This gets the globally configured image cache size, in bytes
809 * @return The image cache size
812 EAPI int elm_config_cache_image_cache_size_get(void);
815 * Set the configured image cache size
817 * This sets the globally configured image cache size, in bytes
819 * @param size The image cache size
822 EAPI void elm_config_cache_image_cache_size_set(int size);
826 * Get the configured edje file cache size.
828 * This gets the globally configured edje file cache size, in number
831 * @return The edje file cache size
834 EAPI int elm_config_cache_edje_file_cache_size_get(void);
837 * Set the configured edje file cache size
839 * This sets the globally configured edje file cache size, in number
842 * @param size The edje file cache size
845 EAPI void elm_config_cache_edje_file_cache_size_set(int size);
848 * Get the configured edje collections (groups) cache size.
850 * This gets the globally configured edje collections cache size, in
851 * number of collections.
853 * @return The edje collections cache size
856 EAPI int elm_config_cache_edje_collection_cache_size_get(void);
859 * Set the configured edje collections (groups) cache size
861 * This sets the globally configured edje collections cache size, in
862 * number of collections.
864 * @param size The edje collections cache size
867 EAPI void elm_config_cache_edje_collection_cache_size_set(int size);
870 * Get the enable status of the focus highlight
872 * This gets whether the highlight on focused objects is enabled or not
874 * @see elm_config_focus_highlight_enabled_set()
877 EAPI Eina_Bool elm_config_focus_highlight_enabled_get(void);
880 * Set the enable status of the focus highlight
882 * @param enable Enable highlight if EINA_TRUE, disable otherwise
884 * Set whether to show or not the highlight on focused objects
886 * Note that it will take effect only to Elementary windows created after
893 EAPI void elm_config_focus_highlight_enabled_set(Eina_Bool enable);
896 * Get the enable status of the highlight animation
898 * @return The focus highlight mode set
900 * Get whether the focus highlight, if enabled, will animate its switch from
901 * one object to the next
905 EAPI Eina_Bool elm_config_focus_highlight_animate_get(void);
908 * Set the enable status of the highlight animation
910 * @param animate Enable animation if EINA_TRUE, disable otherwise
912 * Set whether the focus highlight, if enabled, will animate its switch from
913 * one object to the next
915 * Note that it will take effect only to Elementary windows created after
922 EAPI void elm_config_focus_highlight_animate_set(Eina_Bool animate);
925 * Get the system mirrored mode. This determines the default mirrored mode
928 * @return EINA_TRUE if mirrored is set, EINA_FALSE otherwise
930 EAPI Eina_Bool elm_config_mirrored_get(void);
933 * Set the system mirrored mode. This determines the default mirrored mode
936 * @param mirrored EINA_TRUE to set mirrored mode, EINA_FALSE to unset it.
938 EAPI void elm_config_mirrored_set(Eina_Bool mirrored);