elementary - Added 1 more API elm_object_item_del_cb_set()
[framework/uifw/elementary.git] / src / lib / elm_object_item.h
1 /**
2  * Get the widget object's handle which contains a given item
3  *
4  * @param it The Elementary object item
5  * @return The widget object
6  *
7  * @note This returns the widget object itself that an item belongs to.
8  *
9  * @ingroup General
10  */
11 EAPI Evas_Object                 *elm_object_item_object_get(const Elm_Object_Item *it);
12
13 /**
14  * Set a content of an object item
15  *
16  * @param it The Elementary object item
17  * @param part The content part name to set (NULL for the default content)
18  * @param content The new content of the object item
19  *
20  * @note Elementary object items may have many contents
21  *
22  * @ingroup General
23  */
24 EAPI void                         elm_object_item_part_content_set(Elm_Object_Item *it, const char *part, Evas_Object *content);
25
26 #define elm_object_item_content_set(it, content) elm_object_item_part_content_set((it), NULL, (content))
27
28 /**
29  * Get a content of an object item
30  *
31  * @param it The Elementary object item
32  * @param part The content part name to unset (NULL for the default content)
33  * @return content of the object item or NULL for any error
34  *
35  * @note Elementary object items may have many contents
36  *
37  * @ingroup General
38  */
39 EAPI Evas_Object                 *elm_object_item_part_content_get(const Elm_Object_Item *it, const char *part);
40
41 #define elm_object_item_content_get(it) elm_object_item_part_content_get((it), NULL)
42
43 /**
44  * Unset a content of an object item
45  *
46  * @param it The Elementary object item
47  * @param part The content part name to unset (NULL for the default content)
48  *
49  * @note Elementary object items may have many contents
50  *
51  * @ingroup General
52  */
53 EAPI Evas_Object                 *elm_object_item_part_content_unset(Elm_Object_Item *it, const char *part);
54
55 #define elm_object_item_content_unset(it) elm_object_item_part_content_unset((it), NULL)
56
57 /**
58  * Set a label of an object item
59  *
60  * @param it The Elementary object item
61  * @param part The text part name to set (NULL for the default label)
62  * @param label The new text of the label
63  *
64  * @note Elementary object items may have many labels
65  *
66  * @ingroup General
67  */
68 EAPI void                         elm_object_item_part_text_set(Elm_Object_Item *it, const char *part, const char *label);
69
70 #define elm_object_item_text_set(it, label) elm_object_item_part_text_set((it), NULL, (label))
71
72 /**
73  * Get a label of an object item
74  *
75  * @param it The Elementary object item
76  * @param part The text part name to get (NULL for the default label)
77  * @return text of the label or NULL for any error
78  *
79  * @note Elementary object items may have many labels
80  *
81  * @ingroup General
82  */
83 EAPI const char                  *elm_object_item_part_text_get(const Elm_Object_Item *it, const char *part);
84
85 #define elm_object_item_text_get(it) elm_object_item_part_text_get((it), NULL)
86
87 /**
88  * Set the text to read out when in accessibility mode
89  *
90  * @param it The object item which is to be described
91  * @param txt The text that describes the widget to people with poor or no vision
92  *
93  * @ingroup General
94  */
95 EAPI void                         elm_object_item_access_info_set(Elm_Object_Item *it, const char *txt);
96
97 /**
98  * Get the data associated with an object item
99  * @param it The Elementary object item
100  * @return The data associated with @p it
101  *
102  * @ingroup General
103  */
104 EAPI void                        *elm_object_item_data_get(const Elm_Object_Item *it);
105
106 /**
107  * Set the data associated with an object item
108  * @param it The Elementary object item
109  * @param data The data to be associated with @p it
110  *
111  * @ingroup General
112  */
113 EAPI void                         elm_object_item_data_set(Elm_Object_Item *it, void *data);
114
115 /**
116  * Send a signal to the edje object of the widget item.
117  *
118  * This function sends a signal to the edje object of the obj item. An
119  * edje program can respond to a signal by specifying matching
120  * 'signal' and 'source' fields.
121  *
122  * @param it The Elementary object item
123  * @param emission The signal's name.
124  * @param source The signal's source.
125  * @ingroup General
126  */
127 EAPI void                         elm_object_item_signal_emit(Elm_Object_Item *it, const char *emission, const char *source);
128
129 /**
130  * Set the disabled state of an widget item.
131  *
132  * @param obj The Elementary object item
133  * @param disabled The state to put in in: @c EINA_TRUE for
134  *        disabled, @c EINA_FALSE for enabled
135  *
136  * Elementary object item can be @b disabled, in which state they won't
137  * receive input and, in general, will be themed differently from
138  * their normal state, usually greyed out. Useful for contexts
139  * where you don't want your users to interact with some of the
140  * parts of you interface.
141  *
142  * This sets the state for the widget item, either disabling it or
143  * enabling it back.
144  *
145  * @ingroup Styles
146  */
147 EAPI void                         elm_object_item_disabled_set(Elm_Object_Item *it, Eina_Bool disabled);
148
149 /**
150  * Get the disabled state of an widget item.
151  *
152  * @param obj The Elementary object
153  * @return @c EINA_TRUE, if the widget item is disabled, @c EINA_FALSE
154  *            if it's enabled (or on errors)
155  *
156  * This gets the state of the widget, which might be enabled or disabled.
157  *
158  * @ingroup Styles
159  */
160 EAPI Eina_Bool                    elm_object_item_disabled_get(const Elm_Object_Item *it);
161
162 /**
163  * @brief Set the function to be called when an item from the widget is
164  * freed.
165  *
166  * @param it The item to set the callback on
167  * @param func The function called
168  *
169  * That function will receive these parameters:
170  * @li void * item data
171  * @li Evas_Object * widget object
172  * @li Elm_Object_Item * widget item
173  *
174  * @see elm_object_item_del()
175  * @ingroup General
176  */
177 EAPI void                         elm_object_item_del_cb_set(Elm_Object_Item *it, Evas_Smart_Cb del_cb);