Merge "gengrid TC modified"
[framework/uifw/elementary.git] / tests / debian / tmp / usr / include / elementary-0 / elm_object.h
1 /**
2  * Set a label of an object
3  *
4  * @param obj The Elementary object
5  * @param part The text part name to set (NULL for the default label)
6  * @param label The new text of the label
7  *
8  * @note Elementary objects may have many labels (e.g. Action Slider)
9  *
10  * @ingroup General
11  */
12 EAPI void                         elm_object_part_text_set(Evas_Object *obj, const char *part, const char *label);
13
14 #define elm_object_text_set(obj, label) elm_object_part_text_set((obj), NULL, (label))
15
16 /**
17  * Get a label of an object
18  *
19  * @param obj The Elementary object
20  * @param part The text part name to get (NULL for the default label)
21  * @return text of the label or NULL for any error
22  *
23  * @note Elementary objects may have many labels (e.g. Action Slider)
24  *
25  * @ingroup General
26  */
27 EAPI const char                  *elm_object_part_text_get(const Evas_Object *obj, const char *part);
28
29 #define elm_object_text_get(obj) elm_object_part_text_get((obj), NULL)
30
31 /**
32  * Set a content of an object
33  *
34  * @param obj The Elementary object
35  * @param part The content part name to set (NULL for the default content)
36  * @param content The new content of the object
37  *
38  * @note Elementary objects may have many contents
39  *
40  * @ingroup General
41  */
42 EAPI void                         elm_object_part_content_set(Evas_Object *obj, const char *part, Evas_Object *content);
43
44 #define elm_object_content_set(obj, content) elm_object_part_content_set((obj), NULL, (content))
45
46 /**
47  * Get a content of an object
48  *
49  * @param obj The Elementary object
50  * @param part The content part name to get (NULL for the default content)
51  * @return content of the object or NULL for any error
52  *
53  * @note Elementary objects may have many contents
54  *
55  * @ingroup General
56  */
57 EAPI Evas_Object                 *elm_object_part_content_get(const Evas_Object *obj, const char *part);
58
59 #define elm_object_content_get(obj) elm_object_part_content_get((obj), NULL)
60
61 /**
62  * Unset a content of an object
63  *
64  * @param obj The Elementary object
65  * @param part The content part name to unset (NULL for the default content)
66  *
67  * @note Elementary objects may have many contents
68  *
69  * @ingroup General
70  */
71 EAPI Evas_Object                 *elm_object_part_content_unset(Evas_Object *obj, const char *part);
72
73 #define elm_object_content_unset(obj) elm_object_part_content_unset((obj), NULL)
74
75 /**
76  * Set the text to read out when in accessibility mode
77  *
78  * @param obj The object which is to be described
79  * @param txt The text that describes the widget to people with poor or no vision
80  *
81  * @ingroup General
82  */
83 EAPI void                         elm_object_access_info_set(Evas_Object *obj, const char *txt);
84
85 /**
86  * Get a named object from the children
87  *
88  * @param obj The parent object whose children to look at
89  * @param name The name of the child to find
90  * @param recurse Set to thge maximum number of levels to recurse (0 == none, 1 is only look at 1 level of children etc.)
91  * @return The found object of that name, or NULL if none is found
92  *
93  * This function searches the children (or recursively children of
94  * children and so on) of the given @p obj object looking for a child with
95  * the name of @p name. If the child is found the object is returned, or
96  * NULL is returned. You can set the name of an object with
97  * evas_object_name_set(). If the name is not unique within the child
98  * objects (or the tree is @p recurse is greater than 0) then it is
99  * undefined as to which child of that name is returned, so ensure the name
100  * is unique amongst children. If recurse is set to -1 it will recurse
101  * without limit.
102  *
103  * @ingroup General
104  */
105 EAPI Evas_Object                 *elm_object_name_find(const Evas_Object *obj, const char *name, int recurse);
106
107 /**
108  * @defgroup Styles Styles
109  *
110  * Widgets can have different styles of look. These generic API's
111  * set styles of widgets, if they support them (and if the theme(s)
112  * do).
113  *
114  * @ref general_functions_example_page "This" example contemplates
115  * some of these functions.
116  */
117
118 /**
119  * Set the style to use by a widget
120  *
121  * Sets the style name that will define the appearance of a widget. Styles
122  * vary from widget to widget and may also be defined by other themes
123  * by means of extensions and overlays.
124  *
125  * @param obj The Elementary widget to style
126  * @param style The style name to use
127  *
128  * @see elm_theme_extension_add()
129  * @see elm_theme_extension_del()
130  * @see elm_theme_overlay_add()
131  * @see elm_theme_overlay_del()
132  *
133  * @ingroup Styles
134  */
135 EAPI void         elm_object_style_set(Evas_Object *obj, const char *style);
136
137 /**
138  * Get the style used by the widget
139  *
140  * This gets the style being used for that widget. Note that the string
141  * pointer is only valid as longas the object is valid and the style doesn't
142  * change.
143  *
144  * @param obj The Elementary widget to query for its style
145  * @return The style name used
146  *
147  * @see elm_object_style_set()
148  *
149  * @ingroup Styles
150  */
151 EAPI const char  *elm_object_style_get(const Evas_Object *obj);
152
153 /**
154  * Set the disabled state of an Elementary object.
155  *
156  * @param obj The Elementary object to operate on
157  * @param disabled The state to put in in: @c EINA_TRUE for
158  *        disabled, @c EINA_FALSE for enabled
159  *
160  * Elementary objects can be @b disabled, in which state they won't
161  * receive input and, in general, will be themed differently from
162  * their normal state, usually greyed out. Useful for contexts
163  * where you don't want your users to interact with some of the
164  * parts of you interface.
165  *
166  * This sets the state for the widget, either disabling it or
167  * enabling it back.
168  *
169  * @ingroup Styles
170  */
171 EAPI void         elm_object_disabled_set(Evas_Object *obj, Eina_Bool disabled);
172
173 /**
174  * Get the disabled state of an Elementary object.
175  *
176  * @param obj The Elementary object to operate on
177  * @return @c EINA_TRUE, if the widget is disabled, @c EINA_FALSE
178  *            if it's enabled (or on errors)
179  *
180  * This gets the state of the widget, which might be enabled or disabled.
181  *
182  * @ingroup Styles
183  */
184 EAPI Eina_Bool    elm_object_disabled_get(const Evas_Object *obj);
185
186 /**
187  * @defgroup WidgetNavigation Widget Tree Navigation.
188  *
189  * How to check if an Evas Object is an Elementary widget? How to
190  * get the first elementary widget that is parent of the given
191  * object?  These are all covered in widget tree navigation.
192  *
193  * @ref general_functions_example_page "This" example contemplates
194  * some of these functions.
195  */
196
197 /**
198  * Check if the given Evas Object is an Elementary widget.
199  *
200  * @param obj the object to query.
201  * @return @c EINA_TRUE if it is an elementary widget variant,
202  *         @c EINA_FALSE otherwise
203  * @ingroup WidgetNavigation
204  */
205 EAPI Eina_Bool    elm_object_widget_check(const Evas_Object *obj);
206
207 /**
208  * Get the first parent of the given object that is an Elementary
209  * widget.
210  *
211  * @param obj the Elementary object to query parent from.
212  * @return the parent object that is an Elementary widget, or @c
213  *         NULL, if it was not found.
214  *
215  * Use this to query for an object's parent widget.
216  *
217  * @note Most of Elementary users wouldn't be mixing non-Elementary
218  * smart objects in the objects tree of an application, as this is
219  * an advanced usage of Elementary with Evas. So, except for the
220  * application's window, which is the root of that tree, all other
221  * objects would have valid Elementary widget parents.
222  *
223  * @ingroup WidgetNavigation
224  */
225 EAPI Evas_Object *elm_object_parent_widget_get(const Evas_Object *obj);
226
227 /**
228  * Get the top level parent of an Elementary widget.
229  *
230  * @param obj The object to query.
231  * @return The top level Elementary widget, or @c NULL if parent cannot be
232  * found.
233  * @ingroup WidgetNavigation
234  */
235 EAPI Evas_Object *elm_object_top_widget_get(const Evas_Object *obj);
236
237 /**
238  * Get the string that represents this Elementary widget.
239  *
240  * @note Elementary is weird and exposes itself as a single
241  *       Evas_Object_Smart_Class of type "elm_widget", so
242  *       evas_object_type_get() always return that, making debug and
243  *       language bindings hard. This function tries to mitigate this
244  *       problem, but the solution is to change Elementary to use
245  *       proper inheritance.
246  *
247  * @param obj the object to query.
248  * @return Elementary widget name, or @c NULL if not a valid widget.
249  * @ingroup WidgetNavigation
250  */
251 EAPI const char  *elm_object_widget_type_get(const Evas_Object *obj);
252
253 /**
254  * Send a signal to the widget edje object.
255  *
256  * This function sends a signal to the edje object of the obj. An
257  * edje program can respond to a signal by specifying matching
258  * 'signal' and 'source' fields.
259  *
260  * @param obj The object
261  * @param emission The signal's name.
262  * @param source The signal's source.
263  * @ingroup General
264  */
265 EAPI void         elm_object_signal_emit(Evas_Object *obj, const char *emission, const char *source);
266
267 /**
268  * Add a callback for a signal emitted by widget edje object.
269  *
270  * This function connects a callback function to a signal emitted by the
271  * edje object of the obj.
272  * Globs can occur in either the emission or source name.
273  *
274  * @param obj The object
275  * @param emission The signal's name.
276  * @param source The signal's source.
277  * @param func The callback function to be executed when the signal is
278  * emitted.
279  * @param data A pointer to data to pass in to the callback function.
280  * @ingroup General
281  */
282 EAPI void         elm_object_signal_callback_add(Evas_Object *obj, const char *emission, const char *source, Edje_Signal_Cb func, void *data);
283
284 /**
285  * Remove a signal-triggered callback from a widget edje object.
286  *
287  * This function removes a callback, previoulsy attached to a
288  * signal emitted by the edje object of the obj.  The parameters
289  * emission, source and func must match exactly those passed to a
290  * previous call to elm_object_signal_callback_add(). The data
291  * pointer that was passed to this call will be returned.
292  *
293  * @param obj The object
294  * @param emission The signal's name.
295  * @param source The signal's source.
296  * @param func The callback function to be executed when the signal is
297  * emitted.
298  * @return The data pointer
299  * @ingroup General
300  */
301 EAPI void        *elm_object_signal_callback_del(Evas_Object *obj, const char *emission, const char *source, Edje_Signal_Cb func);
302
303 /**
304  * Add a callback for input events (key up, key down, mouse wheel)
305  * on a given Elementary widget
306  *
307  * @param obj The widget to add an event callback on
308  * @param func The callback function to be executed when the event
309  * happens
310  * @param data Data to pass in to @p func
311  *
312  * Every widget in an Elementary interface set to receive focus,
313  * with elm_object_focus_allow_set(), will propagate @b all of its
314  * key up, key down and mouse wheel input events up to its parent
315  * object, and so on. All of the focusable ones in this chain which
316  * had an event callback set, with this call, will be able to treat
317  * those events. There are two ways of making the propagation of
318  * these event upwards in the tree of widgets to @b cease:
319  * - Just return @c EINA_TRUE on @p func. @c EINA_FALSE will mean
320  *   the event was @b not processed, so the propagation will go on.
321  * - The @c event_info pointer passed to @p func will contain the
322  *   event's structure and, if you OR its @c event_flags inner
323  *   value to @c EVAS_EVENT_FLAG_ON_HOLD, you're telling Elementary
324  *   one has already handled it, thus killing the event's
325  *   propagation, too.
326  *
327  * @note Your event callback will be issued on those events taking
328  * place only if no other child widget of @p obj has consumed the
329  * event already.
330  *
331  * @note Not to be confused with @c
332  * evas_object_event_callback_add(), which will add event callbacks
333  * per type on general Evas objects (no event propagation
334  * infrastructure taken in account).
335  *
336  * @note Not to be confused with @c
337  * elm_object_signal_callback_add(), which will add callbacks to @b
338  * signals coming from a widget's theme, not input events.
339  *
340  * @note Not to be confused with @c
341  * edje_object_signal_callback_add(), which does the same as
342  * elm_object_signal_callback_add(), but directly on an Edje
343  * object.
344  *
345  * @note Not to be confused with @c
346  * evas_object_smart_callback_add(), which adds callbacks to smart
347  * objects' <b>smart events</b>, and not input events.
348  *
349  * @see elm_object_event_callback_del()
350  *
351  * @ingroup General
352  */
353 EAPI void         elm_object_event_callback_add(Evas_Object *obj, Elm_Event_Cb func, const void *data);
354
355 /**
356  * Remove an event callback from a widget.
357  *
358  * This function removes a callback, previoulsy attached to event emission
359  * by the @p obj.
360  * The parameters func and data must match exactly those passed to
361  * a previous call to elm_object_event_callback_add(). The data pointer that
362  * was passed to this call will be returned.
363  *
364  * @param obj The object
365  * @param func The callback function to be executed when the event is
366  * emitted.
367  * @param data Data to pass in to the callback function.
368  * @return The data pointer
369  * @ingroup General
370  */
371 EAPI void        *elm_object_event_callback_del(Evas_Object *obj, Elm_Event_Cb func, const void *data);