ui/common/wrapper.c

changeset 654
e379d2e3c1b3
parent 641
0bce3325d255
child 655
453a782b0e22
equal deleted inserted replaced
653:dc0eb8151254 654:e379d2e3c1b3
25 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 25 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
26 * POSSIBILITY OF SUCH DAMAGE. 26 * POSSIBILITY OF SUCH DAMAGE.
27 */ 27 */
28 28
29 #include "wrapper.h" 29 #include "wrapper.h"
30 #include "ui/tree.h"
30 31
31 /* ---------------------------- UiObject ---------------------------- */ 32 /* ---------------------------- UiObject ---------------------------- */
32 33
33 UiContext* ui_object_get_context(UiObject *obj) { 34 UiContext* ui_object_get_context(UiObject *obj) {
34 return obj->ctx; 35 return obj->ctx;
84 } 85 }
85 86
86 int ui_event_get_set(UiEvent *event) { 87 int ui_event_get_set(UiEvent *event) {
87 return event->set; 88 return event->set;
88 } 89 }
90
91
92 /* ------------------------- SubListItem (public) ------------------------- */
93
94 void ui_sublist_item_set_icon(UiSubListItem *item, const char *icon) {
95 item->icon = icon ? strdup(icon) : NULL;
96 }
97
98 void ui_sublist_item_set_label(UiSubListItem *item, const char *label) {
99 item->label = label ? strdup(label) : NULL;
100 }
101
102 void ui_sublist_item_set_button_icon(UiSubListItem *item, const char *button_icon) {
103 item->button_icon = button_icon ? strdup(button_icon) : NULL;
104 }
105
106 void ui_sublist_item_set_button_label(UiSubListItem *item, const char *button_label) {
107 item->button_label = button_label ? strdup(button_label) : NULL;
108 }
109
110 void ui_sublist_item_set_badge(UiSubListItem *item, const char *badge) {
111 item->badge = badge ? strdup(badge) : NULL;
112 }
113
114 void ui_sublist_item_set_eventdata(UiSubListItem *item, void *eventdata) {
115 item->eventdata = NULL;
116 }

mercurial