Changes in uspace/lib/gui/widget.c [10cb47e:6d5e378] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/gui/widget.c
r10cb47e r6d5e378 36 36 #include "widget.h" 37 37 38 /** Link widget with parent and initialize default position and size. */ 39 void widget_init(widget_t *widget, widget_t *parent, const void *data) 38 void widget_init(widget_t *widget, widget_t *parent) 40 39 { 41 40 link_initialize(&widget->link); 42 41 list_initialize(&widget->children); 43 44 42 if (parent) { 45 43 widget->parent = parent; … … 50 48 widget->window = NULL; 51 49 } 52 53 widget->data = data; 54 50 55 51 widget->hpos = 0; 56 52 widget->vpos = 0; 57 53 widget->width = 0; 58 54 widget->height = 0; 59 55 60 56 widget->width_min = 0; 61 57 widget->height_min = 0; … … 66 62 } 67 63 68 /** Change position and size of the widget. */69 64 void widget_modify(widget_t *widget, sysarg_t hpos, sysarg_t vpos, 70 65 sysarg_t width, sysarg_t height) … … 76 71 } 77 72 78 /** Get custom client data */79 const void *widget_get_data(widget_t *widget)80 {81 return widget->data;82 }83 84 /** Unlink widget from its parent. */85 73 void widget_deinit(widget_t *widget) 86 74 { 87 if (widget->parent) 75 if (widget->parent) { 88 76 list_remove(&widget->link); 77 } 89 78 } 90 79
Note:
See TracChangeset
for help on using the changeset viewer.