diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-03-13 13:03:46 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-03-13 13:03:46 +0400 |
commit | aaa8a13c493a09b2db9ddd4421737c612a3634c8 (patch) | |
tree | 51c561f1d8c2d63341384fb5ba1d3fc97c5df040 /source/blender/editors/space_image/image_ops.c | |
parent | 2c8d3a969d11a5a40d34d51b5c0545267e7b6e90 (diff) |
code cleanup: use const events for modal and invoke operators.
Diffstat (limited to 'source/blender/editors/space_image/image_ops.c')
-rw-r--r-- | source/blender/editors/space_image/image_ops.c | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/source/blender/editors/space_image/image_ops.c b/source/blender/editors/space_image/image_ops.c index 46acd2519c2..54230d35312 100644 --- a/source/blender/editors/space_image/image_ops.c +++ b/source/blender/editors/space_image/image_ops.c @@ -238,7 +238,7 @@ typedef struct ViewPanData { int event_type; } ViewPanData; -static void image_view_pan_init(bContext *C, wmOperator *op, wmEvent *event) +static void image_view_pan_init(bContext *C, wmOperator *op, const wmEvent *event) { SpaceImage *sima = CTX_wm_space_image(C); ViewPanData *vpd; @@ -293,7 +293,7 @@ static int image_view_pan_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -static int image_view_pan_invoke(bContext *C, wmOperator *op, wmEvent *event) +static int image_view_pan_invoke(bContext *C, wmOperator *op, const wmEvent *event) { if (event->type == MOUSEPAN) { SpaceImage *sima = CTX_wm_space_image(C); @@ -312,7 +312,7 @@ static int image_view_pan_invoke(bContext *C, wmOperator *op, wmEvent *event) } } -static int image_view_pan_modal(bContext *C, wmOperator *op, wmEvent *event) +static int image_view_pan_modal(bContext *C, wmOperator *op, const wmEvent *event) { SpaceImage *sima = CTX_wm_space_image(C); ViewPanData *vpd = op->customdata; @@ -383,7 +383,7 @@ typedef struct ViewZoomData { ARegion *ar; } ViewZoomData; -static void image_view_zoom_init(bContext *C, wmOperator *op, wmEvent *event) +static void image_view_zoom_init(bContext *C, wmOperator *op, const wmEvent *event) { SpaceImage *sima = CTX_wm_space_image(C); ARegion *ar = CTX_wm_region(C); @@ -455,7 +455,7 @@ enum { VIEW_CONFIRM }; -static int image_view_zoom_invoke(bContext *C, wmOperator *op, wmEvent *event) +static int image_view_zoom_invoke(bContext *C, wmOperator *op, const wmEvent *event) { if (event->type == MOUSEZOOM || event->type == MOUSEPAN) { SpaceImage *sima = CTX_wm_space_image(C); @@ -525,7 +525,7 @@ static void image_zoom_apply(ViewZoomData *vpd, wmOperator *op, const int x, con ED_region_tag_redraw(vpd->ar); } -static int image_view_zoom_modal(bContext *C, wmOperator *op, wmEvent *event) +static int image_view_zoom_modal(bContext *C, wmOperator *op, const wmEvent *event) { ViewZoomData *vpd = op->customdata; short event_code = VIEW_PASS; @@ -589,7 +589,7 @@ void IMAGE_OT_view_zoom(wmOperatorType *ot) * that explains the negative signs in the code below */ -static int image_view_ndof_invoke(bContext *C, wmOperator *UNUSED(op), wmEvent *event) +static int image_view_ndof_invoke(bContext *C, wmOperator *UNUSED(op), const wmEvent *event) { if (event->type != NDOF_MOTION) return OPERATOR_CANCELLED; @@ -773,7 +773,7 @@ static int image_view_zoom_in_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -static int image_view_zoom_in_invoke(bContext *C, wmOperator *op, wmEvent *event) +static int image_view_zoom_in_invoke(bContext *C, wmOperator *op, const wmEvent *event) { ARegion *ar = CTX_wm_region(C); float location[2]; @@ -815,7 +815,7 @@ static int image_view_zoom_out_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -static int image_view_zoom_out_invoke(bContext *C, wmOperator *op, wmEvent *event) +static int image_view_zoom_out_invoke(bContext *C, wmOperator *op, const wmEvent *event) { ARegion *ar = CTX_wm_region(C); float location[2]; @@ -978,7 +978,7 @@ static int image_open_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -static int image_open_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event)) +static int image_open_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event)) { SpaceImage *sima = CTX_wm_space_image(C); /* XXX other space types can call */ char *path = U.textudir; @@ -1128,7 +1128,7 @@ static int image_replace_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -static int image_replace_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event)) +static int image_replace_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event)) { SpaceImage *sima = CTX_wm_space_image(C); @@ -1442,7 +1442,7 @@ static int image_save_as_check(bContext *UNUSED(C), wmOperator *op) return WM_operator_filesel_ensure_ext_imtype(op, imf); } -static int image_save_as_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event)) +static int image_save_as_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event)) { SpaceImage *sima = CTX_wm_space_image(C); Image *ima = ED_space_image(sima); @@ -1773,7 +1773,7 @@ static int image_new_exec(bContext *C, wmOperator *op) /* XXX, Ton is not a fan of OK buttons but using this function to avoid undo/redo bug while in mesh-editmode, - campbell */ /* XXX Note: the WM_operator_props_dialog_popup() doesn't work for uiIDContextProperty(), image is not being that way */ -static int image_new_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event)) +static int image_new_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event)) { return WM_operator_props_dialog_popup(C, op, 15 * UI_UNIT_X, 5 * UI_UNIT_Y); @@ -1943,7 +1943,7 @@ static int image_pack_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -static int image_pack_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event)) +static int image_pack_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event)) { Image *ima = CTX_data_edit_image(C); ImBuf *ibuf; @@ -2027,7 +2027,7 @@ static int image_unpack_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -static int image_unpack_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event)) +static int image_unpack_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event)) { Image *ima = CTX_data_edit_image(C); @@ -2143,7 +2143,7 @@ int ED_space_image_color_sample(SpaceImage *sima, ARegion *ar, int mval[2], floa return ret; } -static void image_sample_apply(bContext *C, wmOperator *op, wmEvent *event) +static void image_sample_apply(bContext *C, wmOperator *op, const wmEvent *event) { SpaceImage *sima = CTX_wm_space_image(C); ARegion *ar = CTX_wm_region(C); @@ -2269,7 +2269,7 @@ static void image_sample_exit(bContext *C, wmOperator *op) MEM_freeN(info); } -static int image_sample_invoke(bContext *C, wmOperator *op, wmEvent *event) +static int image_sample_invoke(bContext *C, wmOperator *op, const wmEvent *event) { SpaceImage *sima = CTX_wm_space_image(C); ARegion *ar = CTX_wm_region(C); @@ -2290,7 +2290,7 @@ static int image_sample_invoke(bContext *C, wmOperator *op, wmEvent *event) return OPERATOR_RUNNING_MODAL; } -static int image_sample_modal(bContext *C, wmOperator *op, wmEvent *event) +static int image_sample_modal(bContext *C, wmOperator *op, const wmEvent *event) { switch (event->type) { case LEFTMOUSE: @@ -2376,7 +2376,7 @@ static int image_sample_line_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -static int image_sample_line_invoke(bContext *C, wmOperator *op, wmEvent *event) +static int image_sample_line_invoke(bContext *C, wmOperator *op, const wmEvent *event) { SpaceImage *sima = CTX_wm_space_image(C); @@ -2531,7 +2531,7 @@ static int image_record_composite_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -static int image_record_composite_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event)) +static int image_record_composite_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event)) { RecordCompositeData *rcd; @@ -2548,7 +2548,7 @@ static int image_record_composite_invoke(bContext *C, wmOperator *op, wmEvent *U return OPERATOR_RUNNING_MODAL; } -static int image_record_composite_modal(bContext *C, wmOperator *op, wmEvent *event) +static int image_record_composite_modal(bContext *C, wmOperator *op, const wmEvent *event) { RecordCompositeData *rcd = op->customdata; |