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