Changeset 39ab17c in mainline for uspace/app/nav/panel.c
- Timestamp:
- 2021-10-25T00:32:45Z (3 years ago)
- Branches:
- master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- e0377075
- Parents:
- c632c96
- git-author:
- Jiri Svoboda <jiri@…> (2021-10-21 17:44:55)
- git-committer:
- jxsvoboda <5887334+jxsvoboda@…> (2021-10-25 00:32:45)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/nav/panel.c
rc632c96 r39ab17c 142 142 ui_control_delete(panel->control); 143 143 free(panel); 144 } 145 146 /** Set panel callbacks. 147 * 148 * @param panel Panel 149 * @param cb Callbacks 150 * @param arg Argument to callback functions 151 */ 152 void panel_set_cb(panel_t *panel, panel_cb_t *cb, void *arg) 153 { 154 panel->cb = cb; 155 panel->cb_arg = arg; 144 156 } 145 157 … … 311 323 ui_evclaim_t panel_pos_event(panel_t *panel, pos_event_t *event) 312 324 { 313 return ui_unclaimed; 325 gfx_coord2_t pos; 326 327 pos.x = event->hpos; 328 pos.y = event->vpos; 329 if (!gfx_pix_inside_rect(&pos, &panel->rect)) 330 return ui_unclaimed; 331 332 if (!panel->active) { 333 panel_activate_req(panel); 334 } 335 336 return ui_claimed; 314 337 } 315 338 … … 1114 1137 } 1115 1138 1139 /** Request panel activation. 1140 * 1141 * Call back to request panel activation. 1142 * 1143 * @param panel Panel 1144 */ 1145 void panel_activate_req(panel_t *panel) 1146 { 1147 if (panel->cb != NULL && panel->cb->activate_req != NULL) 1148 panel->cb->activate_req(panel->cb_arg, panel); 1149 } 1150 1116 1151 /** @} 1117 1152 */
Note:
See TracChangeset
for help on using the changeset viewer.