Changes in uspace/lib/ui/src/pbutton.c [b769ca0:3c54869] in mainline
- File:
-
- 1 edited
-
uspace/lib/ui/src/pbutton.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/ui/src/pbutton.c
rb769ca0 r3c54869 1 1 /* 2 * Copyright (c) 202 6Jiri Svoboda2 * Copyright (c) 2023 Jiri Svoboda 3 3 * All rights reserved. 4 4 * … … 142 142 } 143 143 144 /** Set push button ops. 145 * 146 * These allow overriding the function for painting the button or 147 * painting the button decoration. 148 * 149 * @param pbutton Push button 150 * @param ops Push button ops 144 /** Set push button decoration ops. 145 * 146 * @param pbutton Push button 147 * @param ops Push button decoration callbacks 151 148 * @param arg Decoration ops argument 152 149 */ 153 void ui_pbutton_set_ops(ui_pbutton_t *pbutton, ui_pbutton_ops_t *ops, void *arg) 154 { 155 pbutton->ops = ops; 156 pbutton->ops_arg = arg; 150 void ui_pbutton_set_decor_ops(ui_pbutton_t *pbutton, 151 ui_pbutton_decor_ops_t *ops, void *arg) 152 { 153 pbutton->decor_ops = ops; 154 pbutton->decor_arg = arg; 157 155 } 158 156 … … 381 379 } 382 380 383 if (pbutton-> ops != NULL && pbutton->ops->decor_paint != NULL) {381 if (pbutton->decor_ops != NULL && pbutton->decor_ops->paint != NULL) { 384 382 /* Custom decoration */ 385 rc = pbutton-> ops->decor_paint(pbutton, pbutton->ops_arg,383 rc = pbutton->decor_ops->paint(pbutton, pbutton->decor_arg, 386 384 &pos); 387 385 if (rc != EOK) … … 505 503 errno_t ui_pbutton_paint(ui_pbutton_t *pbutton) 506 504 { 507 if (pbutton->ops != NULL && pbutton->ops->paint != NULL) { 508 /* Custom paint routine */ 509 return pbutton->ops->paint(pbutton, pbutton->ops_arg); 510 } else if (pbutton->res->textmode) { 505 if (pbutton->res->textmode) 511 506 return ui_pbutton_paint_text(pbutton); 512 } else {507 else 513 508 return ui_pbutton_paint_gfx(pbutton); 514 }515 509 } 516 510
Note:
See TracChangeset
for help on using the changeset viewer.
