Changes in uspace/lib/ui/src/fixed.c [62223ec:46a47c0] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/ui/src/fixed.c
r62223ec r46a47c0 1 1 /* 2 * Copyright (c) 202 0Jiri Svoboda2 * Copyright (c) 2023 Jiri Svoboda 3 3 * All rights reserved. 4 4 * … … 46 46 static void ui_fixed_ctl_destroy(void *); 47 47 static errno_t ui_fixed_ctl_paint(void *); 48 static ui_evclaim_t ui_fixed_ctl_kbd_event(void *, kbd_event_t *); 48 49 static ui_evclaim_t ui_fixed_ctl_pos_event(void *, pos_event_t *); 49 static void ui_fixed_ctl_unfocus(void * );50 static void ui_fixed_ctl_unfocus(void *, unsigned); 50 51 51 52 /** Push button control ops */ … … 53 54 .destroy = ui_fixed_ctl_destroy, 54 55 .paint = ui_fixed_ctl_paint, 56 .kbd_event = ui_fixed_ctl_kbd_event, 55 57 .pos_event = ui_fixed_ctl_pos_event, 56 58 .unfocus = ui_fixed_ctl_unfocus … … 211 213 } 212 214 215 /** Handle fixed layout keyboard event. 216 * 217 * @param fixed Fixed layout 218 * @param kbd_event Keyboard event 219 * @return @c ui_claimed iff the event is claimed 220 */ 221 ui_evclaim_t ui_fixed_kbd_event(ui_fixed_t *fixed, kbd_event_t *event) 222 { 223 ui_fixed_elem_t *elem; 224 ui_evclaim_t claimed; 225 226 elem = ui_fixed_first(fixed); 227 while (elem != NULL) { 228 claimed = ui_control_kbd_event(elem->control, event); 229 if (claimed == ui_claimed) 230 return ui_claimed; 231 232 elem = ui_fixed_next(elem); 233 } 234 235 return ui_unclaimed; 236 } 237 213 238 /** Handle fixed layout position event. 214 239 * … … 237 262 * 238 263 * @param fixed Fixed layout 239 */ 240 void ui_fixed_unfocus(ui_fixed_t *fixed) 241 { 242 ui_fixed_elem_t *elem; 243 244 elem = ui_fixed_first(fixed); 245 while (elem != NULL) { 246 ui_control_unfocus(elem->control); 264 * @param nfocus Number of remaining foci 265 */ 266 void ui_fixed_unfocus(ui_fixed_t *fixed, unsigned nfocus) 267 { 268 ui_fixed_elem_t *elem; 269 270 elem = ui_fixed_first(fixed); 271 while (elem != NULL) { 272 ui_control_unfocus(elem->control, nfocus); 247 273 248 274 elem = ui_fixed_next(elem); … … 271 297 272 298 return ui_fixed_paint(fixed); 299 } 300 301 /** Handle fixed layout control keyboard event. 302 * 303 * @param arg Argument (ui_fixed_t *) 304 * @param kbd_event Keyboard event 305 * @return @c ui_claimed iff the event is claimed 306 */ 307 ui_evclaim_t ui_fixed_ctl_kbd_event(void *arg, kbd_event_t *event) 308 { 309 ui_fixed_t *fixed = (ui_fixed_t *) arg; 310 311 return ui_fixed_kbd_event(fixed, event); 273 312 } 274 313 … … 289 328 * 290 329 * @param arg Argument (ui_fixed_t *) 291 */ 292 void ui_fixed_ctl_unfocus(void *arg) 293 { 294 ui_fixed_t *fixed = (ui_fixed_t *) arg; 295 296 ui_fixed_unfocus(fixed); 330 * @param nfocus Number of remaining foci 331 */ 332 void ui_fixed_ctl_unfocus(void *arg, unsigned nfocus) 333 { 334 ui_fixed_t *fixed = (ui_fixed_t *) arg; 335 336 ui_fixed_unfocus(fixed, nfocus); 297 337 } 298 338
Note:
See TracChangeset
for help on using the changeset viewer.