also fix selected item scrolling when item prepended to the genlist is offscreen
[framework/uifw/elementary.git] / src / lib / elm_tickernoti.h
1    /**
2     * @defgroup TickerNoti TickerNoti
3     * @ingroup Elementary
4     *
5     * This is a notification widget which can be used to display some short information.
6     *
7     * Signals that you can add callback for are:
8     * @li "clicked" - tickernoti object has been clicked, except at the
9     * swallow/button region
10     * @li "hide" - tickernoti is completely hidden. In case of
11     * any hide animation, this signal is emitted after the animation.
12     *
13     * Default contents parts of a tickernoti object that you can use for are:
14     * @li "icon" - The icon in tickernoti object
15     * @li "button" - The button in tickernoti object
16     *
17     * Default text parts of the tickernoti object that you can use for are:
18     * @li "default" - textual content in the tickernoti object
19     *
20     * Supported elm_object common APIs.
21     * @li elm_object_text_set
22     * @li elm_object_part_text_set
23     * @li elm_object_part_content_set
24     *
25     */
26
27    /**
28     * @addtogroup Tickernoti
29     * @{
30     */
31    typedef enum
32      {
33         ELM_TICKERNOTI_ORIENT_TOP = 0,
34         ELM_TICKERNOTI_ORIENT_BOTTOM,
35         ELM_TICKERNOTI_ORIENT_LAST
36      }  Elm_Tickernoti_Orient;
37
38    /**
39     * Add a tickernoti object to @p parent
40     *
41     * @param parent The parent object
42     *
43     * @return The tickernoti object, or NULL upon failure
44     */
45    EAPI Evas_Object              *elm_tickernoti_add (Evas_Object *parent);
46    /**
47     * Set the orientation of the tickernoti object
48     *
49     * @param obj The tickernoti object
50     * @param orient The orientation of tickernoti object
51     */
52    EAPI void                      elm_tickernoti_orient_set (Evas_Object *obj, Elm_Tickernoti_Orient orient) EINA_ARG_NONNULL(1);
53    /**
54     * Get the orientation of the tickernoti object
55     *
56     * @param obj The tickernotil object
57     * @return The orientation of tickernotil object
58     */
59    EAPI Elm_Tickernoti_Orient     elm_tickernoti_orient_get (const Evas_Object *obj) EINA_ARG_NONNULL(1);
60    /**
61     * Get the rotation of tickernoti object
62     *
63     * @param obj The tickernotil object
64     * @return The rotation angle
65     */
66    EAPI int                       elm_tickernoti_rotation_get (const Evas_Object *obj) EINA_ARG_NONNULL(1);
67    /**
68     * Set the rotation angle for the tickernoti object
69     *
70     * @param obj The tickernoti object
71     * @param angle The rotation angle(in degree) will be used on the tickernoti object
72     */
73    EAPI void                      elm_tickernoti_rotation_set (Evas_Object *obj, int angle) EINA_ARG_NONNULL(1);
74    /**
75     * Get the view window(elm_win) on the tickernoti object
76     *
77     * @param obj The tickernotil object
78     * @return internal view window(elm_win) object
79     */
80    EAPI Evas_Object              *elm_tickernoti_win_get (const Evas_Object *obj) EINA_ARG_NONNULL(1);
81    /* #### Below APIs and data structures are going to be deprecated, announcment will be made soon ####*/
82    /**
83     * @deprecated
84     */
85    typedef enum
86     {
87        ELM_TICKERNOTI_DEFAULT,
88        ELM_TICKERNOTI_DETAILVIEW
89     } Elm_Tickernoti_Mode;
90    /**
91     * Set the detail label on the tickernoti object
92     *
93     * @param obj The tickernoti object
94     * @param label The label will be used on the tickernoti object
95     * @deprecated use elm_object_text_set() instead
96     */
97    EINA_DEPRECATED  EAPI void                      elm_tickernoti_detailview_label_set (Evas_Object *obj, const char *label) EINA_ARG_NONNULL(1);
98    /**
99     * Get the detail label used on the tickernoti object
100     *
101     * @param obj The tickernotil object
102     * @return The string inside the label
103     * @deprecated use elm_object_text_get() instead
104     */
105    EINA_DEPRECATED  EAPI const char               *elm_tickernoti_detailview_label_get (const Evas_Object *obj)EINA_ARG_NONNULL(1);
106    /**
107     * Set the button object used on the tickernoti object
108     *
109     * @param obj The tickernotil object
110     * @param button The button object will be used on the tickernoti object
111     * @deprecated use elm_object_part_content_set() instead with "button" as part name
112     */
113    EINA_DEPRECATED  EAPI void                      elm_tickernoti_detailview_button_set (Evas_Object *obj, Evas_Object *button) EINA_ARG_NONNULL(2);
114    /**
115     * Get the button object used on the tickernoti object
116     *
117     * @param obj The tickernotil object
118     * @return The button object inside the tickernoti
119     * @deprecated use elm_object_part_content_get() instead with "button" as part name
120     */
121    EINA_DEPRECATED  EAPI Evas_Object              *elm_tickernoti_detailview_button_get (const Evas_Object *obj) EINA_ARG_NONNULL(1);
122    /**
123     * Set the detail icon object used on the tickernoti object
124     *
125     * @param obj The tickernotil object
126     * @param icon The icon object will be used on the tickernoti object
127     * @deprecated use elm_object_part_content_set() instead with "icon" as part name
128     */
129    EINA_DEPRECATED  EAPI void                      elm_tickernoti_detailview_icon_set (Evas_Object *obj, Evas_Object *icon) EINA_ARG_NONNULL(1);
130    /**
131     * Get the detail icon object used on the tickernoti object
132     *
133     * @param obj The tickernotil object
134     * @return The icon object inside the tickernoti
135     * @deprecated use elm_object_part_content_get() instead with "icon" as part name
136     */
137    EINA_DEPRECATED  EAPI Evas_Object              *elm_tickernoti_detailview_icon_get (const Evas_Object *obj) EINA_ARG_NONNULL(1);
138    /**
139     * Get the view mode on the tickernoti object
140     *
141     * @param obj The tickernotil object
142     * @return The internal window used
143     * @deprecated use elm_tickernoti_win_get instead when internal window object is needed
144     */
145    EINA_DEPRECATED  EAPI Evas_Object              *elm_tickernoti_detailview_get (const Evas_Object *obj) EINA_ARG_NONNULL(1);
146    /**
147     * Set the view mode used on the tickernoti object
148     *
149     * @param obj The tickernotil object
150     * @param mode The view mode will be used on the tickernoti object
151     * @deprecated removed as now styles are used. Use elm_object_style_set instead.
152     */
153    EINA_DEPRECATED  EAPI void                      elm_tickernoti_mode_set (Evas_Object *obj, Elm_Tickernoti_Mode mode) EINA_ARG_NONNULL(1);
154    /**
155     * Get the current mode of the tickernoti object
156     *
157     * @param obj The tickernotil object
158     * @return the mode of the object. Can be ELM_TICKERNOTI_DEFAULT/ELM_TICKERNOTI_DETAILVIEW
159     */
160    EINA_DEPRECATED  EAPI Elm_Tickernoti_Mode       elm_tickernoti_mode_get (const Evas_Object *obj) EINA_ARG_NONNULL(1);
161    /**
162     * Set the orientation of the tickernoti object
163     *
164     * @param obj The tickernoti object
165     * @param orient The orientation of tickernoti object
166     * @deprecated use elm_tickernoti_orient_set() instead
167     */
168    EINA_DEPRECATED  EAPI void                      elm_tickernoti_orientation_set (Evas_Object *obj, Elm_Tickernoti_Orient orient) EINA_ARG_NONNULL(1);
169    /**
170     * Get the orientation of the tickernoti object
171     *
172     * @param obj The tickernotil object
173     * @return The orientation of tickernotil object
174     * @deprecated use elm_tickernoti_orient_get() instead
175     */
176    EINA_DEPRECATED  EAPI Elm_Tickernoti_Orient     elm_tickernoti_orientation_get (const Evas_Object *obj) EINA_ARG_NONNULL(1);
177    /**
178     * Set the label on the tickernoti object
179     *
180     * @param obj The tickernoti object
181     * @param label The label will be used on the tickernoti object
182     * @deprecated use elm_object_text_set()
183     */
184    EINA_DEPRECATED  EAPI void                      elm_tickernoti_label_set (Evas_Object *obj, const char *label) EINA_ARG_NONNULL(1);
185    /**
186     * Get the label used on the tickernoti object
187     *
188     * @param obj The tickernotil object
189     * @return The string inside the label
190     * @deprecated use elm_object_text_get() instead
191     */
192    EINA_DEPRECATED  EAPI const char               *elm_tickernoti_label_get (const Evas_Object *obj) EINA_ARG_NONNULL(1);
193    /**
194     * Set the icon object of the tickernoti object
195     *
196     * @param obj The tickernotil object
197     * @param icon The icon object will be used on the tickernoti object
198     * @deprecated use elm_object_part_content_set() instead with "icon" as part name
199     */
200    EINA_DEPRECATED  EAPI void                      elm_tickernoti_icon_set (Evas_Object *obj, Evas_Object *icon) EINA_ARG_NONNULL(1);
201    /**
202     * Get the icon object of the tickernoti object
203     *
204     * @param obj The tickernotil object
205     * @return The icon object inside the tickernoti
206     * @deprecated use elm_object_part_content_get() instead with "icon" as part name
207     */
208    EINA_DEPRECATED  EAPI Evas_Object              *elm_tickernoti_icon_get (const Evas_Object *obj) EINA_ARG_NONNULL(1);
209    /**
210     * Set the action button object used on the tickernoti object
211     *
212     * @param obj The tickernotil object
213     * @param button The button object will be used on the tickernoti object
214     * @deprecated use elm_object_part_content_set() instead with "button" as part name
215     */
216    EINA_DEPRECATED  EAPI void                      elm_tickernoti_button_set (Evas_Object *obj, Evas_Object *button) EINA_ARG_NONNULL(1);
217    /**
218     * Get the action button object used on the tickernoti object
219     *
220     * @param obj The tickernotil object
221     * @return The button object inside the tickernoti
222     * @deprecated use elm_object_part_content_get() instead with "button" as part name
223     */
224    EINA_DEPRECATED  EAPI Evas_Object              *elm_tickernoti_button_get (const Evas_Object *obj) EINA_ARG_NONNULL(1);
225    /**
226     * @}
227     */
228