Changeset c6f00b40 in mainline for uspace/lib/ui/src
- Timestamp:
- 2020-11-01T22:49:05Z (5 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 4ac11ff
- Parents:
- 4df6607
- git-author:
- Jiri Svoboda <jiri@…> (2020-11-01 22:47:03)
- git-committer:
- Jiri Svoboda <jiri@…> (2020-11-01 22:49:05)
- Location:
- uspace/lib/ui/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/ui/src/control.c
r4df6607 rc6f00b40 64 64 /** Delete UI control. 65 65 * 66 * Deletes the base control (not the extended data). 67 * 66 68 * @param control UI control or @c NULL 67 69 */ … … 74 76 } 75 77 78 /** Destroy UI control. 79 * 80 * Run the virtual control destructor (destroy complete control including 81 * extended data). 82 * 83 * @param control Control 84 */ 85 void ui_control_destroy(ui_control_t *control) 86 { 87 return control->ops->destroy(control->ext); 88 } 89 76 90 /** Paint UI control. 77 91 * 78 * @param control Push button92 * @param control Control 79 93 * @return EOK on success or an error code 80 94 */ … … 86 100 /** Deliver position event to UI control. 87 101 * 88 * @param control Push button102 * @param control Control 89 103 * @param pos_event Position event 90 104 * @return @c ui_claimed iff the event is claimed -
uspace/lib/ui/src/fixed.c
r4df6607 rc6f00b40 68 68 void ui_fixed_destroy(ui_fixed_t *fixed) 69 69 { 70 ui_fixed_elem_t *elem; 71 ui_control_t *control; 72 70 73 if (fixed == NULL) 71 74 return; 72 75 73 assert(list_empty(&fixed->elem)); 76 elem = ui_fixed_first(fixed); 77 while (elem != NULL) { 78 control = elem->control; 79 ui_fixed_remove(fixed, control); 80 ui_control_destroy(control); 81 82 elem = ui_fixed_first(fixed); 83 } 84 74 85 free(fixed); 75 86 } -
uspace/lib/ui/src/label.c
r4df6607 rc6f00b40 46 46 #include "../private/resource.h" 47 47 48 static void ui_label_ctl_destroy(void *); 48 49 static errno_t ui_label_ctl_paint(void *); 49 50 static ui_evclaim_t ui_label_ctl_pos_event(void *, pos_event_t *); … … 51 52 /** Label control ops */ 52 53 ui_control_ops_t ui_label_ops = { 54 .destroy = ui_label_ctl_destroy, 53 55 .paint = ui_label_ctl_paint, 54 56 .pos_event = ui_label_ctl_pos_event … … 207 209 } 208 210 209 /** Paint lable control. 211 /** Destroy label control. 212 * 213 * @param arg Argument (ui_label_t *) 214 */ 215 void ui_label_ctl_destroy(void *arg) 216 { 217 ui_label_t *label = (ui_label_t *) arg; 218 219 ui_label_destroy(label); 220 } 221 222 /** Paint label control. 210 223 * 211 224 * @param arg Argument (ui_label_t *) -
uspace/lib/ui/src/pbutton.c
r4df6607 rc6f00b40 54 54 }; 55 55 56 static void ui_pbutton_ctl_destroy(void *); 56 57 static errno_t ui_pbutton_ctl_paint(void *); 57 58 static ui_evclaim_t ui_pbutton_ctl_pos_event(void *, pos_event_t *); … … 59 60 /** Push button control ops */ 60 61 ui_control_ops_t ui_pbutton_ops = { 62 .destroy = ui_pbutton_ctl_destroy, 61 63 .paint = ui_pbutton_ctl_paint, 62 64 .pos_event = ui_pbutton_ctl_pos_event … … 418 420 } 419 421 422 /** Destroy push button control. 423 * 424 * @param arg Argument (ui_pbutton_t *) 425 */ 426 void ui_pbutton_ctl_destroy(void *arg) 427 { 428 ui_pbutton_t *pbutton = (ui_pbutton_t *) arg; 429 430 ui_pbutton_destroy(pbutton); 431 } 432 420 433 /** Paint push button control. 421 434 *
Note:
See TracChangeset
for help on using the changeset viewer.