int roadmap_bar_obj_pressed (RoadMapGuiPoint *point) { BarObject *object = NULL; if ( !gHideTopBar ) object = roadmap_bar_by_pos(point, &TopBarObjectTable); if (!object) { if ( !gHideBottomBar ) object = roadmap_bar_by_pos(point, &BottomBarObjectTable); if (!object) return 0; } /* There is no dragging for the bar objects !!! */ roadmap_pointer_cancel_dragging(); object->image_state = IMAGE_STATE_SELECTED; // Save the selected object SelectedBarObject = object; roadmap_screen_redraw(); return 1; }
static int roadmap_ticker_key_pressed (RoadMapGuiPoint *point) { if (!gInitialized) return 0 ; if (!gTickerOn) return 0; if (gTickerOn) if (gTickerOn) if ((point->y >= (OpenIconRct.miny)) && (point->y <= (OpenIconRct.maxy))) { roadmap_pointer_cancel_dragging(); return 1; } return 0; }
static int roadmap_screen_obj_pressed (RoadMapGuiPoint *point) { int state = 0; RoadMapScreenObjSelected = roadmap_screen_obj_by_pos (point); if (!RoadMapScreenObjSelected) return 0; /* There is no draggable objects on the screen. In the future if there will be such an * objects the short/long click handling for the small drag has to be in the drag_end event * like in the ssd_dialog */ roadmap_pointer_cancel_dragging(); if (RoadMapScreenObjSelected->state_fn) { state = (*RoadMapScreenObjSelected->state_fn) (); if ((state < 0) || (state >= MAX_STATES)) return 1; } if (RoadMapScreenObjSelected->images[state]) { RoadMapGuiPoint pos; roadmap_screen_obj_pos (RoadMapScreenObjSelected, &pos); roadmap_canvas_draw_image (RoadMapScreenObjSelected->images[state], &pos, RoadMapScreenObjSelected->opacity, IMAGE_SELECTED); } roadmap_canvas_refresh (); if (RoadMapScreenObjSelected->flags & OBJ_FLAG_REPEAT) { if (RoadMapScreenObjSelected->action) { (*(RoadMapScreenObjSelected->action->callback)) (); } roadmap_main_set_periodic (OBJ_REPEAT_TIMEOUT, roadmap_screen_obj_repeat); } return 1; }