elementary/elm_entry : Fix a bug in filter callback. There can be a
[framework/uifw/elementary.git] / src / lib / elm_bubble.h
1 /**
2  * @defgroup Bubble Bubble
3  *
4  * @image html img/widget/bubble/preview-00.png
5  * @image latex img/widget/bubble/preview-00.eps
6  * @image html img/widget/bubble/preview-01.png
7  * @image latex img/widget/bubble/preview-01.eps
8  * @image html img/widget/bubble/preview-02.png
9  * @image latex img/widget/bubble/preview-02.eps
10  *
11  * @brief The Bubble is a widget to show text similar to how speech is
12  * represented in comics.
13  *
14  * The bubble widget contains 5 important visual elements:
15  * @li The frame is a rectangle with rounded edjes and an "arrow".
16  * @li The @p icon is an image to which the frame's arrow points to.
17  * @li The @p label is a text which appears to the right of the icon if the
18  * corner is "top_left" or "bottom_left" and is right aligned to the frame
19  * otherwise.
20  * @li The @p info is a text which appears to the right of the label. Info's
21  * font is of a lighter color than label.
22  * @li The @p content is an evas object that is shown inside the frame.
23  *
24  * The position of the arrow, icon, label and info depends on which corner is
25  * selected. The four available corners are:
26  * @li "top_left" - Default
27  * @li "top_right"
28  * @li "bottom_left"
29  * @li "bottom_right"
30  *
31  * Signals that you can add callbacks for are:
32  * @li "clicked" - This is called when a user has clicked the bubble.
33  *
34  * Default content parts of the bubble that you can use for are:
35  * @li "default" - A content of the bubble
36  * @li "icon" - An icon of the bubble
37  *
38  * Default text parts of the button widget that you can use for are:
39  * @li "default" - Label of the bubble
40  * @li "info" - info of the bubble
41  *
42  * Supported elm_object common APIs.
43  * @li elm_object_part_text_set
44  * @li elm_object_part_text_get
45  * @li elm_object_part_content_set
46  * @li elm_object_part_content_get
47  * @li elm_object_part_content_unset
48  *
49  * For an example of using a bubble see @ref bubble_01_example_page "this".
50  *
51  * @{
52  */
53
54 /**
55  * Defines the corner values for a bubble.
56  *
57  * The corner will be used to determine where the arrow of the
58  * bubble points to.
59  */
60 typedef enum
61 {
62   ELM_BUBBLE_POS_INVALID = -1,
63   ELM_BUBBLE_POS_TOP_LEFT,
64   ELM_BUBBLE_POS_TOP_RIGHT,
65   ELM_BUBBLE_POS_BOTTOM_LEFT,
66   ELM_BUBBLE_POS_BOTTOM_RIGHT,
67 } Elm_Bubble_Pos;
68
69 /**
70  * Add a new bubble to the parent
71  *
72  * @param parent The parent object
73  * @return The new object or NULL if it cannot be created
74  *
75  * This function adds a text bubble to the given parent evas object.
76  */
77 EAPI Evas_Object                 *elm_bubble_add(Evas_Object *parent);
78
79 /**
80  * Set the corner of the bubble
81  *
82  * @param obj The bubble object.
83  * @param pos The given corner for the bubble.
84  *
85  * This function sets the corner of the bubble. The corner will be used to
86  * determine where the arrow in the frame points to and where label, icon and
87  * info are shown.
88  *
89  */
90 EAPI void  elm_bubble_pos_set(Evas_Object *obj, Elm_Bubble_Pos pos);
91
92 /**
93  * Get the corner of the bubble
94  *
95  * @param obj The bubble object.
96  * @return The given corner for the bubble.
97  *
98  * This function gets the selected corner of the bubble.
99  */
100 EAPI Elm_Bubble_Pos elm_bubble_pos_get(const Evas_Object *obj);
101
102 /**
103  * @}
104  */