diff options
Diffstat (limited to 'source/blender/windowmanager')
-rw-r--r-- | source/blender/windowmanager/WM_api.h | 40 | ||||
-rw-r--r-- | source/blender/windowmanager/WM_types.h | 6 | ||||
-rw-r--r-- | source/blender/windowmanager/intern/wm_dragdrop.c | 2 | ||||
-rw-r--r-- | source/blender/windowmanager/intern/wm_event_system.c | 14 | ||||
-rw-r--r-- | source/blender/windowmanager/intern/wm_gesture.c | 2 | ||||
-rw-r--r-- | source/blender/windowmanager/intern/wm_operators.c | 68 |
6 files changed, 67 insertions, 65 deletions
diff --git a/source/blender/windowmanager/WM_api.h b/source/blender/windowmanager/WM_api.h index 57fe518dd46..6db310e44d1 100644 --- a/source/blender/windowmanager/WM_api.h +++ b/source/blender/windowmanager/WM_api.h @@ -165,7 +165,7 @@ struct wmEventHandler *WM_event_add_dropbox_handler(ListBase *handlers, ListBase /* mouse */ void WM_event_add_mousemove(struct bContext *C); void WM_event_add_mousemove_window(struct wmWindow *window); -int WM_modal_tweak_exit(struct wmEvent *evt, int tweak_event); +int WM_modal_tweak_exit(const struct wmEvent *event, int tweak_event); /* notifiers */ void WM_event_add_notifier(const struct bContext *C, unsigned int type, void *reference); @@ -180,19 +180,19 @@ void WM_event_timer_sleep(struct wmWindowManager *wm, struct wmWindow *win, str /* operator api, default callbacks */ /* invoke callback, uses enum property named "type" */ -int WM_operator_view3d_distance_invoke(struct bContext *C, struct wmOperator *op, struct wmEvent *event); -int WM_menu_invoke (struct bContext *C, struct wmOperator *op, struct wmEvent *event); -int WM_enum_search_invoke(struct bContext *C, struct wmOperator *op, struct wmEvent *event); +int WM_operator_view3d_distance_invoke(struct bContext *C, struct wmOperator *op, const struct wmEvent *event); +int WM_menu_invoke (struct bContext *C, struct wmOperator *op, const struct wmEvent *event); +int WM_enum_search_invoke(struct bContext *C, struct wmOperator *op, const struct wmEvent *event); /* invoke callback, confirm menu + exec */ -int WM_operator_confirm (struct bContext *C, struct wmOperator *op, struct wmEvent *event); +int WM_operator_confirm (struct bContext *C, struct wmOperator *op, const struct wmEvent *event); /* invoke callback, file selector "filepath" unset + exec */ -int WM_operator_filesel (struct bContext *C, struct wmOperator *op, struct wmEvent *event); +int WM_operator_filesel (struct bContext *C, struct wmOperator *op, const struct wmEvent *event); int WM_operator_filesel_ensure_ext_imtype(wmOperator *op, const struct ImageFormatData *im_format); /* poll callback, context checks */ int WM_operator_winactive (struct bContext *C); /* invoke callback, exec + redo popup */ -int WM_operator_props_popup_call(struct bContext *C, struct wmOperator *op, struct wmEvent *event); -int WM_operator_props_popup (struct bContext *C, struct wmOperator *op, struct wmEvent *event); +int WM_operator_props_popup_call(struct bContext *C, struct wmOperator *op, const struct wmEvent *event); +int WM_operator_props_popup (struct bContext *C, struct wmOperator *op, const struct wmEvent *event); int WM_operator_props_dialog_popup (struct bContext *C, struct wmOperator *op, int width, int height); int WM_operator_redo_popup (struct bContext *C, struct wmOperator *op); int WM_operator_ui_popup (struct bContext *C, struct wmOperator *op, int width, int height); @@ -282,25 +282,25 @@ void WM_menutype_freelink(struct MenuType *mt); void WM_menutype_free(void); /* default operator callbacks for border/circle/lasso */ -int WM_border_select_invoke (struct bContext *C, struct wmOperator *op, struct wmEvent *event); -int WM_border_select_modal (struct bContext *C, struct wmOperator *op, struct wmEvent *event); +int WM_border_select_invoke (struct bContext *C, struct wmOperator *op, const struct wmEvent *event); +int WM_border_select_modal (struct bContext *C, struct wmOperator *op, const struct wmEvent *event); int WM_border_select_cancel(struct bContext *C, struct wmOperator *op); -int WM_gesture_circle_invoke(struct bContext *C, struct wmOperator *op, struct wmEvent *event); -int WM_gesture_circle_modal(struct bContext *C, struct wmOperator *op, struct wmEvent *event); +int WM_gesture_circle_invoke(struct bContext *C, struct wmOperator *op, const struct wmEvent *event); +int WM_gesture_circle_modal(struct bContext *C, struct wmOperator *op, const struct wmEvent *event); int WM_gesture_circle_cancel(struct bContext *C, struct wmOperator *op); -int WM_gesture_lines_invoke(struct bContext *C, struct wmOperator *op, struct wmEvent *event); -int WM_gesture_lines_modal(struct bContext *C, struct wmOperator *op, struct wmEvent *event); +int WM_gesture_lines_invoke(struct bContext *C, struct wmOperator *op, const struct wmEvent *event); +int WM_gesture_lines_modal(struct bContext *C, struct wmOperator *op, const struct wmEvent *event); int WM_gesture_lines_cancel(struct bContext *C, struct wmOperator *op); -int WM_gesture_lasso_invoke(struct bContext *C, struct wmOperator *op, struct wmEvent *event); -int WM_gesture_lasso_modal(struct bContext *C, struct wmOperator *op, struct wmEvent *event); +int WM_gesture_lasso_invoke(struct bContext *C, struct wmOperator *op, const struct wmEvent *event); +int WM_gesture_lasso_modal(struct bContext *C, struct wmOperator *op, const struct wmEvent *event); int WM_gesture_lasso_cancel(struct bContext *C, struct wmOperator *op); const int (*WM_gesture_lasso_path_to_array(struct bContext *C, struct wmOperator *op, int *mcords_tot))[2]; -int WM_gesture_straightline_invoke(struct bContext *C, struct wmOperator *op, struct wmEvent *event); -int WM_gesture_straightline_modal(struct bContext *C, struct wmOperator *op, struct wmEvent *event); +int WM_gesture_straightline_invoke(struct bContext *C, struct wmOperator *op, const struct wmEvent *event); +int WM_gesture_straightline_modal(struct bContext *C, struct wmOperator *op, const struct wmEvent *event); int WM_gesture_straightline_cancel(struct bContext *C, struct wmOperator *op); /* Gesture manager API */ -struct wmGesture *WM_gesture_new(struct bContext *C, struct wmEvent *event, int type); +struct wmGesture *WM_gesture_new(struct bContext *C, const struct wmEvent *event, int type); void WM_gesture_end(struct bContext *C, struct wmGesture *gesture); void WM_gestures_remove(struct bContext *C); @@ -317,7 +317,7 @@ void WM_operator_region_active_win_set(struct bContext *C); struct wmDrag *WM_event_start_drag(struct bContext *C, int icon, int type, void *poin, double value); void WM_event_drag_image(struct wmDrag *, struct ImBuf *, float scale, int sx, int sy); -struct wmDropBox *WM_dropbox_add(ListBase *lb, const char *idname, int (*poll)(struct bContext *, struct wmDrag *, struct wmEvent *event), +struct wmDropBox *WM_dropbox_add(ListBase *lb, const char *idname, int (*poll)(struct bContext *, struct wmDrag *, const struct wmEvent *event), void (*copy)(struct wmDrag *, struct wmDropBox *)); ListBase *WM_dropboxmap_find(const char *idname, int spaceid, int regionid); diff --git a/source/blender/windowmanager/WM_types.h b/source/blender/windowmanager/WM_types.h index bbaa655025b..f2750aa6d99 100644 --- a/source/blender/windowmanager/WM_types.h +++ b/source/blender/windowmanager/WM_types.h @@ -534,13 +534,13 @@ typedef struct wmOperatorType { * any further events are handled in modal. if the operation is * canceled due to some external reason, cancel is called * - see defines below for return values */ - int (*invoke)(struct bContext *, struct wmOperator *, struct wmEvent *) + int (*invoke)(struct bContext *, struct wmOperator *, const struct wmEvent *) #ifdef __GNUC__ __attribute__((warn_unused_result)) #endif ; int (*cancel)(struct bContext *, struct wmOperator *); - int (*modal)(struct bContext *, struct wmOperator *, struct wmEvent *) + int (*modal)(struct bContext *, struct wmOperator *, const struct wmEvent *) #ifdef __GNUC__ __attribute__((warn_unused_result)) #endif @@ -645,7 +645,7 @@ typedef struct wmDropBox { struct wmDropBox *next, *prev; /* test if the dropbox is active, then can print optype name */ - int (*poll)(struct bContext *, struct wmDrag *, wmEvent *); + int (*poll)(struct bContext *, struct wmDrag *, const wmEvent *); /* before exec, this copies drag info to wmDrop properties */ void (*copy)(struct wmDrag *, struct wmDropBox *); diff --git a/source/blender/windowmanager/intern/wm_dragdrop.c b/source/blender/windowmanager/intern/wm_dragdrop.c index 0581000e07c..00ccfedafa8 100644 --- a/source/blender/windowmanager/intern/wm_dragdrop.c +++ b/source/blender/windowmanager/intern/wm_dragdrop.c @@ -103,7 +103,7 @@ ListBase *WM_dropboxmap_find(const char *idname, int spaceid, int regionid) -wmDropBox *WM_dropbox_add(ListBase *lb, const char *idname, int (*poll)(bContext *, wmDrag *, wmEvent *), +wmDropBox *WM_dropbox_add(ListBase *lb, const char *idname, int (*poll)(bContext *, wmDrag *, const wmEvent *), void (*copy)(wmDrag *, wmDropBox *)) { wmDropBox *drop = MEM_callocN(sizeof(wmDropBox), "wmDropBox"); diff --git a/source/blender/windowmanager/intern/wm_event_system.c b/source/blender/windowmanager/intern/wm_event_system.c index 4e181ec930b..5a24b371a98 100644 --- a/source/blender/windowmanager/intern/wm_event_system.c +++ b/source/blender/windowmanager/intern/wm_event_system.c @@ -2487,14 +2487,14 @@ void WM_event_add_mousemove_window(wmWindow *window) } /* for modal callbacks, check configuration for how to interpret exit with tweaks */ -int WM_modal_tweak_exit(wmEvent *evt, int tweak_event) +int WM_modal_tweak_exit(const wmEvent *event, int tweak_event) { /* if the release-confirm userpref setting is enabled, * tweak events can be canceled when mouse is released */ if (U.flag & USER_RELEASECONFIRM) { /* option on, so can exit with km-release */ - if (evt->val == KM_RELEASE) { + if (event->val == KM_RELEASE) { switch (tweak_event) { case EVT_TWEAK_L: case EVT_TWEAK_M: @@ -2515,7 +2515,7 @@ int WM_modal_tweak_exit(wmEvent *evt, int tweak_event) * some items (i.e. markers) being tweaked may end up getting * dropped all over */ - if (evt->val != KM_RELEASE) + if (event->val != KM_RELEASE) return 1; } @@ -2745,9 +2745,9 @@ static void attach_ndof_data(wmEvent *event, const GHOST_TEventNDOFMotionData *g } /* imperfect but probably usable... draw/enable drags to other windows */ -static wmWindow *wm_event_cursor_other_windows(wmWindowManager *wm, wmWindow *win, wmEvent *evt) +static wmWindow *wm_event_cursor_other_windows(wmWindowManager *wm, wmWindow *win, wmEvent *event) { - int mx = evt->x, my = evt->y; + int mx = event->x, my = event->y; if (wm->windows.first == wm->windows.last) return NULL; @@ -2779,8 +2779,8 @@ static wmWindow *wm_event_cursor_other_windows(wmWindowManager *wm, wmWindow *wi if (mx - posx >= 0 && owin->posy >= 0 && mx - posx <= WM_window_pixels_x(owin) && my - posy <= WM_window_pixels_y(owin)) { - evt->x = mx - (int)(U.pixelsize * owin->posx); - evt->y = my - (int)(U.pixelsize * owin->posy); + event->x = mx - (int)(U.pixelsize * owin->posx); + event->y = my - (int)(U.pixelsize * owin->posy); return owin; } diff --git a/source/blender/windowmanager/intern/wm_gesture.c b/source/blender/windowmanager/intern/wm_gesture.c index 302bf61756a..adf159bcfee 100644 --- a/source/blender/windowmanager/intern/wm_gesture.c +++ b/source/blender/windowmanager/intern/wm_gesture.c @@ -58,7 +58,7 @@ /* context checked on having screen, window and area */ -wmGesture *WM_gesture_new(bContext *C, wmEvent *event, int type) +wmGesture *WM_gesture_new(bContext *C, const wmEvent *event, int type) { wmGesture *gesture = MEM_callocN(sizeof(wmGesture), "new gesture"); wmWindow *window = CTX_wm_window(C); diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c index 3e639755fbb..cb2caa52d15 100644 --- a/source/blender/windowmanager/intern/wm_operators.c +++ b/source/blender/windowmanager/intern/wm_operators.c @@ -248,7 +248,7 @@ static int wm_macro_exec(bContext *C, wmOperator *op) return wm_macro_end(op, retval); } -static int wm_macro_invoke_internal(bContext *C, wmOperator *op, wmEvent *event, wmOperator *opm) +static int wm_macro_invoke_internal(bContext *C, wmOperator *op, const wmEvent *event, wmOperator *opm) { int retval = OPERATOR_FINISHED; @@ -275,13 +275,13 @@ static int wm_macro_invoke_internal(bContext *C, wmOperator *op, wmEvent *event, return wm_macro_end(op, retval); } -static int wm_macro_invoke(bContext *C, wmOperator *op, wmEvent *event) +static int wm_macro_invoke(bContext *C, wmOperator *op, const wmEvent *event) { wm_macro_start(op); return wm_macro_invoke_internal(C, op, event, op->macro.first); } -static int wm_macro_modal(bContext *C, wmOperator *op, wmEvent *event) +static int wm_macro_modal(bContext *C, wmOperator *op, const wmEvent *event) { wmOperator *opm = op->opm; int retval = OPERATOR_FINISHED; @@ -875,7 +875,7 @@ void WM_operator_properties_free(PointerRNA *ptr) /* ************ default op callbacks, exported *********** */ -int WM_operator_view3d_distance_invoke(struct bContext *C, struct wmOperator *op, struct wmEvent *UNUSED(event)) +int WM_operator_view3d_distance_invoke(struct bContext *C, struct wmOperator *op, const struct wmEvent *UNUSED(event)) { Scene *scene = CTX_data_scene(C); View3D *v3d = CTX_wm_view3d(C); @@ -905,7 +905,7 @@ int WM_operator_view3d_distance_invoke(struct bContext *C, struct wmOperator *op } /* invoke callback, uses enum property named "type" */ -int WM_menu_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event)) +int WM_menu_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event)) { PropertyRNA *prop = op->type->prop; uiPopupMenu *pup; @@ -1024,7 +1024,7 @@ static uiBlock *wm_enum_search_menu(bContext *C, ARegion *ar, void *arg_op) } -int WM_enum_search_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event)) +int WM_enum_search_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event)) { uiPupBlock(C, wm_enum_search_menu, op); return OPERATOR_CANCELLED; @@ -1051,13 +1051,13 @@ int WM_operator_confirm_message(bContext *C, wmOperator *op, const char *message } -int WM_operator_confirm(bContext *C, wmOperator *op, wmEvent *UNUSED(event)) +int WM_operator_confirm(bContext *C, wmOperator *op, const wmEvent *UNUSED(event)) { return WM_operator_confirm_message(C, op, NULL); } /* op->invoke, opens fileselect if path property not set, otherwise executes */ -int WM_operator_filesel(bContext *C, wmOperator *op, wmEvent *UNUSED(event)) +int WM_operator_filesel(bContext *C, wmOperator *op, const wmEvent *UNUSED(event)) { if (RNA_struct_property_is_set(op->ptr, "filepath")) { return WM_operator_call_notest(C, op); /* call exec direct */ @@ -1475,12 +1475,12 @@ static int wm_operator_props_popup_ex(bContext *C, wmOperator *op, const int do_ * This way - the button values correspond to the result of the operator. * Without this, first access to a button will make the result jump, * see [#32452] */ -int WM_operator_props_popup_call(bContext *C, wmOperator *op, wmEvent *UNUSED(event)) +int WM_operator_props_popup_call(bContext *C, wmOperator *op, const wmEvent *UNUSED(event)) { return wm_operator_props_popup_ex(C, op, TRUE); } -int WM_operator_props_popup(bContext *C, wmOperator *op, wmEvent *UNUSED(event)) +int WM_operator_props_popup(bContext *C, wmOperator *op, const wmEvent *UNUSED(event)) { return wm_operator_props_popup_ex(C, op, FALSE); } @@ -1529,7 +1529,7 @@ static int wm_debug_menu_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -static int wm_debug_menu_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event)) +static int wm_debug_menu_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event)) { RNA_int_set(op->ptr, "debug_value", G.debug_value); return WM_operator_props_dialog_popup(C, op, 9 * UI_UNIT_X, UI_UNIT_Y); @@ -1742,7 +1742,7 @@ static uiBlock *wm_block_create_splash(bContext *C, ARegion *ar, void *UNUSED(ar return block; } -static int wm_splash_invoke(bContext *C, wmOperator *UNUSED(op), wmEvent *UNUSED(event)) +static int wm_splash_invoke(bContext *C, wmOperator *UNUSED(op), const wmEvent *UNUSED(event)) { uiPupBlock(C, wm_block_create_splash, NULL); @@ -1796,7 +1796,7 @@ static int wm_search_menu_exec(bContext *UNUSED(C), wmOperator *UNUSED(op)) return OPERATOR_FINISHED; } -static int wm_search_menu_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event)) +static int wm_search_menu_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event)) { uiPupBlock(C, wm_block_search_menu, op); @@ -1944,7 +1944,7 @@ static void open_set_use_scripts(wmOperator *op) } } -static int wm_open_mainfile_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event)) +static int wm_open_mainfile_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event)) { const char *openname = G.main->name; @@ -2034,7 +2034,7 @@ static int wm_link_append_poll(bContext *C) return 0; } -static int wm_link_append_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event)) +static int wm_link_append_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event)) { if (RNA_struct_property_is_set(op->ptr, "filepath")) { return WM_operator_call_notest(C, op); @@ -2289,7 +2289,7 @@ static int wm_recover_auto_save_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -static int wm_recover_auto_save_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event)) +static int wm_recover_auto_save_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event)) { char filename[FILE_MAX]; @@ -2338,7 +2338,7 @@ static void save_set_compress(wmOperator *op) } } -static int wm_save_as_mainfile_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event)) +static int wm_save_as_mainfile_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event)) { char name[FILE_MAX]; @@ -2444,7 +2444,7 @@ static void WM_OT_save_as_mainfile(wmOperatorType *ot) /* *************** save file directly ******** */ -static int wm_save_mainfile_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event)) +static int wm_save_mainfile_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event)) { char name[FILE_MAX]; int ret; @@ -2650,7 +2650,7 @@ static void wm_gesture_end(bContext *C, wmOperator *op) WM_cursor_restore(CTX_wm_window(C)); } -int WM_border_select_invoke(bContext *C, wmOperator *op, wmEvent *event) +int WM_border_select_invoke(bContext *C, wmOperator *op, const wmEvent *event) { if (ISTWEAK(event->type)) op->customdata = WM_gesture_new(C, event, WM_GESTURE_RECT); @@ -2665,7 +2665,7 @@ int WM_border_select_invoke(bContext *C, wmOperator *op, wmEvent *event) return OPERATOR_RUNNING_MODAL; } -int WM_border_select_modal(bContext *C, wmOperator *op, wmEvent *event) +int WM_border_select_modal(bContext *C, wmOperator *op, const wmEvent *event) { wmGesture *gesture = op->customdata; rcti *rect = gesture->customdata; @@ -2734,7 +2734,7 @@ int WM_border_select_cancel(bContext *C, wmOperator *op) int circle_select_size = 25; /* XXX - need some operator memory thing! */ #endif -int WM_gesture_circle_invoke(bContext *C, wmOperator *op, wmEvent *event) +int WM_gesture_circle_invoke(bContext *C, wmOperator *op, const wmEvent *event) { op->customdata = WM_gesture_new(C, event, WM_GESTURE_CIRCLE); @@ -2769,7 +2769,7 @@ static void gesture_circle_apply(bContext *C, wmOperator *op) #endif } -int WM_gesture_circle_modal(bContext *C, wmOperator *op, wmEvent *event) +int WM_gesture_circle_modal(bContext *C, wmOperator *op, const wmEvent *event) { wmGesture *gesture = op->customdata; rcti *rect = gesture->customdata; @@ -2865,7 +2865,7 @@ void WM_OT_circle_gesture(wmOperatorType *ot) /* **************** Tweak gesture *************** */ -static void tweak_gesture_modal(bContext *C, wmEvent *event) +static void tweak_gesture_modal(bContext *C, const wmEvent *event) { wmWindow *window = CTX_wm_window(C); wmGesture *gesture = window->tweak; @@ -2907,7 +2907,9 @@ static void tweak_gesture_modal(bContext *C, wmEvent *event) WM_gesture_end(C, gesture); /* when tweak fails we should give the other keymap entries a chance */ - event->val = KM_RELEASE; + + /* XXX, assigning to readonly, BAD JUJU! */ + ((wmEvent *)event)->val = KM_RELEASE; } break; default: @@ -2943,7 +2945,7 @@ void wm_tweakevent_test(bContext *C, wmEvent *event, int action) /* *********************** lasso gesture ****************** */ -int WM_gesture_lasso_invoke(bContext *C, wmOperator *op, wmEvent *event) +int WM_gesture_lasso_invoke(bContext *C, wmOperator *op, const wmEvent *event) { op->customdata = WM_gesture_new(C, event, WM_GESTURE_LASSO); @@ -2958,7 +2960,7 @@ int WM_gesture_lasso_invoke(bContext *C, wmOperator *op, wmEvent *event) return OPERATOR_RUNNING_MODAL; } -int WM_gesture_lines_invoke(bContext *C, wmOperator *op, wmEvent *event) +int WM_gesture_lines_invoke(bContext *C, wmOperator *op, const wmEvent *event) { op->customdata = WM_gesture_new(C, event, WM_GESTURE_LINES); @@ -3000,7 +3002,7 @@ static void gesture_lasso_apply(bContext *C, wmOperator *op) } } -int WM_gesture_lasso_modal(bContext *C, wmOperator *op, wmEvent *event) +int WM_gesture_lasso_modal(bContext *C, wmOperator *op, const wmEvent *event) { wmGesture *gesture = op->customdata; int sx, sy; @@ -3056,7 +3058,7 @@ int WM_gesture_lasso_modal(bContext *C, wmOperator *op, wmEvent *event) return OPERATOR_RUNNING_MODAL; } -int WM_gesture_lines_modal(bContext *C, wmOperator *op, wmEvent *event) +int WM_gesture_lines_modal(bContext *C, wmOperator *op, const wmEvent *event) { return WM_gesture_lasso_modal(C, op, event); } @@ -3175,7 +3177,7 @@ static int straightline_apply(bContext *C, wmOperator *op) } -int WM_gesture_straightline_invoke(bContext *C, wmOperator *op, wmEvent *event) +int WM_gesture_straightline_invoke(bContext *C, wmOperator *op, const wmEvent *event) { op->customdata = WM_gesture_new(C, event, WM_GESTURE_STRAIGHTLINE); @@ -3190,7 +3192,7 @@ int WM_gesture_straightline_invoke(bContext *C, wmOperator *op, wmEvent *event) return OPERATOR_RUNNING_MODAL; } -int WM_gesture_straightline_modal(bContext *C, wmOperator *op, wmEvent *event) +int WM_gesture_straightline_modal(bContext *C, wmOperator *op, const wmEvent *event) { wmGesture *gesture = op->customdata; rcti *rect = gesture->customdata; @@ -3282,7 +3284,7 @@ typedef struct { void *cursor; } RadialControl; -static void radial_control_set_initial_mouse(RadialControl *rc, wmEvent *event) +static void radial_control_set_initial_mouse(RadialControl *rc, const wmEvent *event) { float d[2] = {0, 0}; float zoom[2] = {1, 1}; @@ -3598,7 +3600,7 @@ static int radial_control_get_properties(bContext *C, wmOperator *op) return 1; } -static int radial_control_invoke(bContext *C, wmOperator *op, wmEvent *event) +static int radial_control_invoke(bContext *C, wmOperator *op, const wmEvent *event) { wmWindowManager *wm; RadialControl *rc; @@ -3695,7 +3697,7 @@ static int radial_control_cancel(bContext *C, wmOperator *op) return OPERATOR_CANCELLED; } -static int radial_control_modal(bContext *C, wmOperator *op, wmEvent *event) +static int radial_control_modal(bContext *C, wmOperator *op, const wmEvent *event) { RadialControl *rc = op->customdata; float new_value, dist, zoom[2]; |