diff options
Diffstat (limited to 'libraries/elementary/src/lib/elm_tooltip.h')
-rw-r--r-- | libraries/elementary/src/lib/elm_tooltip.h | 100 |
1 files changed, 100 insertions, 0 deletions
diff --git a/libraries/elementary/src/lib/elm_tooltip.h b/libraries/elementary/src/lib/elm_tooltip.h new file mode 100644 index 0000000..3daf1c7 --- /dev/null +++ b/libraries/elementary/src/lib/elm_tooltip.h | |||
@@ -0,0 +1,100 @@ | |||
1 | /** | ||
2 | * @defgroup Tooltips Tooltips | ||
3 | * @ingroup Elementary | ||
4 | * | ||
5 | * The Tooltip is an (internal, for now) smart object used to show a | ||
6 | * content in a frame on mouse hover of objects(or widgets), with | ||
7 | * tips/information about them. | ||
8 | * | ||
9 | * @{ | ||
10 | */ | ||
11 | |||
12 | /** | ||
13 | * Called back when a widget's tooltip is activated and needs content. | ||
14 | * @param data user-data given to elm_object_tooltip_content_cb_set() | ||
15 | * @param obj owner widget. | ||
16 | * @param tooltip The tooltip object (affix content to this!) | ||
17 | */ | ||
18 | typedef Evas_Object *(*Elm_Tooltip_Content_Cb)(void *data, Evas_Object *obj, Evas_Object *tooltip); | ||
19 | |||
20 | /** | ||
21 | * Called back when a widget's item tooltip is activated and needs content. | ||
22 | * @param data user-data given to elm_object_tooltip_content_cb_set() | ||
23 | * @param obj owner widget. | ||
24 | * @param tooltip The tooltip object (affix content to this!) | ||
25 | * @param item context dependent item. As an example, if tooltip was | ||
26 | * set on elm_list item, then it is of this type. | ||
27 | */ | ||
28 | typedef Evas_Object *(*Elm_Tooltip_Item_Content_Cb)(void *data, Evas_Object *obj, Evas_Object *tooltip, void *item); | ||
29 | |||
30 | EAPI void elm_object_tooltip_show(Evas_Object *obj); | ||
31 | EAPI void elm_object_tooltip_hide(Evas_Object *obj); | ||
32 | |||
33 | /** | ||
34 | * Set the text to be displayed inside the tooltip. | ||
35 | * | ||
36 | * @param obj The tooltip object. | ||
37 | * @param text The text to be displayed. | ||
38 | * | ||
39 | * @ingroup Tooltips | ||
40 | */ | ||
41 | EAPI void elm_object_tooltip_text_set(Evas_Object *obj, const char *text); | ||
42 | EAPI void elm_object_tooltip_domain_translatable_text_set(Evas_Object *obj, const char *domain, const char *text); | ||
43 | #define elm_object_tooltip_translatable_text_set(obj, text) elm_object_tooltip_domain_translatable_text_set((obj), NULL, (text)) | ||
44 | EAPI void elm_object_tooltip_content_cb_set(Evas_Object *obj, Elm_Tooltip_Content_Cb func, const void *data, Evas_Smart_Cb del_cb); | ||
45 | EAPI void elm_object_tooltip_unset(Evas_Object *obj); | ||
46 | |||
47 | /** | ||
48 | * Sets a different style for this object tooltip. | ||
49 | * | ||
50 | * @note before you set a style you should define a tooltip with | ||
51 | * elm_object_tooltip_content_cb_set() or | ||
52 | * elm_object_tooltip_text_set(). | ||
53 | * | ||
54 | * @param obj an object with tooltip already set. | ||
55 | * @param style the theme style to use (default, transparent, ...) | ||
56 | * | ||
57 | * @ingroup Tooltips | ||
58 | */ | ||
59 | EAPI void elm_object_tooltip_style_set(Evas_Object *obj, const char *style); | ||
60 | |||
61 | /** | ||
62 | * Get the style for this object tooltip. | ||
63 | * | ||
64 | * @param obj an object with tooltip already set. | ||
65 | * @return style the theme style in use, defaults to "default". If the | ||
66 | * object does not have a tooltip set, then NULL is returned. | ||
67 | * | ||
68 | * @ingroup Tooltips | ||
69 | */ | ||
70 | EAPI const char *elm_object_tooltip_style_get(const Evas_Object *obj); | ||
71 | |||
72 | /** | ||
73 | * @brief Disable size restrictions on an object's tooltip | ||
74 | * @param obj The tooltip's anchor object | ||
75 | * @param disable If EINA_TRUE, size restrictions are disabled | ||
76 | * @return EINA_FALSE on failure, EINA_TRUE on success | ||
77 | * | ||
78 | * This function allows a tooltip to expand beyond its parent window's canvas. | ||
79 | * It will instead be limited only by the size of the display. | ||
80 | * | ||
81 | * @ingroup Tooltips | ||
82 | */ | ||
83 | EAPI Eina_Bool elm_object_tooltip_window_mode_set(Evas_Object *obj, Eina_Bool disable); | ||
84 | |||
85 | /** | ||
86 | * @brief Retrieve size restriction state of an object's tooltip | ||
87 | * @param obj The tooltip's anchor object | ||
88 | * @return If EINA_TRUE, size restrictions are disabled | ||
89 | * | ||
90 | * This function returns whether a tooltip is allowed to expand beyond | ||
91 | * its parent window's canvas. | ||
92 | * It will instead be limited only by the size of the display. | ||
93 | * | ||
94 | * @ingroup Tooltips | ||
95 | */ | ||
96 | EAPI Eina_Bool elm_object_tooltip_window_mode_get(const Evas_Object *obj); | ||
97 | |||
98 | /** | ||
99 | * @} | ||
100 | */ | ||