diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-10-14 16:24:08 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-10-14 16:24:08 +0400 |
commit | f8d7451c737bb4a2c75cd2112934b7339733f67b (patch) | |
tree | 4c71c56b43b0f5bef3bb103c16306fd71322ea69 /source/blender/editors/screen | |
parent | 5de818670cd1ea130dd10afc7f8b70e0d6d70f5f (diff) |
remove unused args or tag as unused for image and screen editors, uiItemEnumR_string was ignoring name and icon args.
Diffstat (limited to 'source/blender/editors/screen')
-rw-r--r-- | source/blender/editors/screen/area.c | 14 | ||||
-rw-r--r-- | source/blender/editors/screen/glutil.c | 3 | ||||
-rw-r--r-- | source/blender/editors/screen/screen_edit.c | 16 | ||||
-rw-r--r-- | source/blender/editors/screen/screen_intern.h | 4 | ||||
-rw-r--r-- | source/blender/editors/screen/screen_ops.c | 56 | ||||
-rw-r--r-- | source/blender/editors/screen/screendump.c | 4 |
6 files changed, 49 insertions, 48 deletions
diff --git a/source/blender/editors/screen/area.c b/source/blender/editors/screen/area.c index e8fd2be324c..ae1388fb7f2 100644 --- a/source/blender/editors/screen/area.c +++ b/source/blender/editors/screen/area.c @@ -144,7 +144,7 @@ void ED_area_do_refresh(bContext *C, ScrArea *sa) /* based on screen region draw tags, set draw tags in azones, and future region tabs etc */ /* only exported for WM */ -void ED_area_overdraw_flush(bContext *C, ScrArea *sa, ARegion *ar) +void ED_area_overdraw_flush(ScrArea *sa, ARegion *ar) { AZone *az; @@ -187,7 +187,7 @@ static void area_draw_azone(short x1, short y1, short x2, short y2) } -static void region_draw_azone(ScrArea *sa, AZone *az) +static void region_draw_azone(AZone *az) { GLUquadricObj *qobj = NULL; short midx = az->x1 + (az->x2 - az->x1)/2; @@ -247,7 +247,7 @@ void ED_area_overdraw(bContext *C) if(az->type==AZONE_AREA) { area_draw_azone(az->x1, az->y1, az->x2, az->y2); } else if(az->type==AZONE_REGION) { - region_draw_azone(sa, az); + region_draw_azone(az); } az->do_draw= 0; @@ -817,7 +817,7 @@ static void area_calc_totrct(ScrArea *sa, int sizex, int sizey) /* used for area initialize below */ -static void region_subwindow(wmWindowManager *wm, wmWindow *win, ARegion *ar) +static void region_subwindow(wmWindow *win, ARegion *ar) { if(ar->flag & (RGN_FLAG_HIDDEN|RGN_FLAG_TOO_SMALL)) { if(ar->swinid) @@ -908,7 +908,7 @@ void ED_area_initialize(wmWindowManager *wm, wmWindow *win, ScrArea *sa) /* region windows, default and own handlers */ for(ar= sa->regionbase.first; ar; ar= ar->next) { - region_subwindow(wm, win, ar); + region_subwindow(win, ar); if(ar->swinid) { /* default region handlers */ @@ -931,7 +931,7 @@ void ED_region_init(bContext *C, ARegion *ar) // ARegionType *at= ar->type; /* refresh can be called before window opened */ - region_subwindow(CTX_wm_manager(C), CTX_wm_window(C), ar); + region_subwindow(CTX_wm_window(C), ar); ar->winx= ar->winrct.xmax - ar->winrct.xmin + 1; ar->winy= ar->winrct.ymax - ar->winrct.ymin + 1; @@ -1156,7 +1156,7 @@ static char *editortype_pup(void) ); } -static void spacefunc(struct bContext *C, void *arg1, void *arg2) +static void spacefunc(struct bContext *C, void *UNUSED(arg1), void *UNUSED(arg2)) { ED_area_newspace(C, CTX_wm_area(C), CTX_wm_area(C)->butspacetype); ED_area_tag_redraw(CTX_wm_area(C)); diff --git a/source/blender/editors/screen/glutil.c b/source/blender/editors/screen/glutil.c index 06da91c3e37..a6c4c77e468 100644 --- a/source/blender/editors/screen/glutil.c +++ b/source/blender/editors/screen/glutil.c @@ -527,7 +527,8 @@ void glaDrawPixelsTex(float x, float y, int img_w, int img_h, int format, void * glaDrawPixelsTexScaled(x, y, img_w, img_h, format, rect, 1.0f, 1.0f); } -void glaDrawPixelsSafe_to32(float fx, float fy, int img_w, int img_h, int row_w, float *rectf, int gamma_correct) +/* row_w is unused but kept for completeness */ +void glaDrawPixelsSafe_to32(float fx, float fy, int img_w, int img_h, int UNUSED(row_w), float *rectf, int gamma_correct) { unsigned char *rect32; diff --git a/source/blender/editors/screen/screen_edit.c b/source/blender/editors/screen/screen_edit.c index 32e82571609..138ce19951d 100644 --- a/source/blender/editors/screen/screen_edit.c +++ b/source/blender/editors/screen/screen_edit.c @@ -309,7 +309,7 @@ static void screen_delarea(bContext *C, bScreen *sc, ScrArea *sa) /* return 0: no split possible */ /* else return (integer) screencoordinate split point */ -static short testsplitpoint(wmWindow *win, ScrArea *sa, char dir, float fac) +static short testsplitpoint(ScrArea *sa, char dir, float fac) { short x, y; @@ -345,7 +345,7 @@ static short testsplitpoint(wmWindow *win, ScrArea *sa, char dir, float fac) } } -ScrArea *area_split(wmWindow *win, bScreen *sc, ScrArea *sa, char dir, float fac) +ScrArea *area_split(bScreen *sc, ScrArea *sa, char dir, float fac) { ScrArea *newa=NULL; ScrVert *sv1, *sv2; @@ -353,7 +353,7 @@ ScrArea *area_split(wmWindow *win, bScreen *sc, ScrArea *sa, char dir, float fac if(sa==NULL) return NULL; - split= testsplitpoint(win, sa, dir, fac); + split= testsplitpoint(sa, dir, fac); if(split==0) return NULL; if(dir=='h') { @@ -484,7 +484,7 @@ static void screen_copy(bScreen *to, bScreen *from) /* with sa as center, sb is located at: 0=W, 1=N, 2=E, 3=S */ /* -1 = not valid check */ /* used with join operator */ -int area_getorientation(bScreen *screen, ScrArea *sa, ScrArea *sb) +int area_getorientation(ScrArea *sa, ScrArea *sb) { ScrVert *sav1, *sav2, *sav3, *sav4; ScrVert *sbv1, *sbv2, *sbv3, *sbv4; @@ -523,7 +523,7 @@ int screen_area_join(bContext *C, bScreen* scr, ScrArea *sa1, ScrArea *sa2) { int dir; - dir = area_getorientation(scr, sa1, sa2); + dir = area_getorientation(sa1, sa2); /*printf("dir is : %i \n", dir);*/ if (dir < 0) @@ -861,7 +861,7 @@ static void scrarea_draw_shape_dark(ScrArea *sa, char dir) } /* draw screen area ligher with arrow shape ("eraser" of previous dark shape) */ -static void scrarea_draw_shape_light(ScrArea *sa, char dir) +static void scrarea_draw_shape_light(ScrArea *sa, char UNUSED(dir)) { glBlendFunc(GL_DST_COLOR, GL_SRC_ALPHA); glEnable(GL_BLEND); @@ -993,7 +993,7 @@ void ED_screen_draw(wmWindow *win) /* blended join arrow */ if (sa1 && sa2) { - dir = area_getorientation(win->screen, sa1, sa2); + dir = area_getorientation(sa1, sa2); if (dir >= 0) { switch(dir) { case 0: /* W */ @@ -1613,7 +1613,7 @@ ScrArea *ED_screen_full_toggle(bContext *C, wmWindow *win, ScrArea *sa) oldscreen->animtimer= NULL; /* returns the top small area */ - newa= area_split(win, sc, (ScrArea *)sc->areabase.first, 'h', 0.99f); + newa= area_split(sc, (ScrArea *)sc->areabase.first, 'h', 0.99f); ED_area_newspace(C, newa, SPACE_INFO); /* use random area when we have no active one, e.g. when the diff --git a/source/blender/editors/screen/screen_intern.h b/source/blender/editors/screen/screen_intern.h index 79789b1876e..b20daf9a0c8 100644 --- a/source/blender/editors/screen/screen_intern.h +++ b/source/blender/editors/screen/screen_intern.h @@ -37,9 +37,9 @@ void area_copy_data (ScrArea *sa1, ScrArea *sa2, int swap_space); /* screen_edit.c */ ScrEdge *screen_findedge(bScreen *sc, ScrVert *v1, ScrVert *v2); -ScrArea *area_split(wmWindow *win, bScreen *sc, ScrArea *sa, char dir, float fac); +ScrArea *area_split(bScreen *sc, ScrArea *sa, char dir, float fac); int screen_area_join(bContext *C, bScreen* scr, ScrArea *sa1, ScrArea *sa2); -int area_getorientation(bScreen *screen, ScrArea *sa, ScrArea *sb); +int area_getorientation(ScrArea *sa, ScrArea *sb); void select_connected_scredge(bScreen *sc, ScrEdge *edge); void removenotused_scrverts(bScreen *sc); diff --git a/source/blender/editors/screen/screen_ops.c b/source/blender/editors/screen/screen_ops.c index 6d4aa3ebe64..9ae16b1bfa6 100644 --- a/source/blender/editors/screen/screen_ops.c +++ b/source/blender/editors/screen/screen_ops.c @@ -265,7 +265,7 @@ int ED_operator_posemode(bContext *C) if ((obact != CTX_data_edit_object(C))) { Object *obpose; - if(obpose= ED_object_pose_armature(obact)) { + if((obpose= ED_object_pose_armature(obact))) { if((obact == obpose) || (obact->mode & OB_MODE_WEIGHT_PAINT)) { return 1; } @@ -443,7 +443,7 @@ AZone *is_in_area_actionzone(ScrArea *sa, int x, int y) } -static void actionzone_exit(bContext *C, wmOperator *op) +static void actionzone_exit(wmOperator *op) { if(op->customdata) MEM_freeN(op->customdata); @@ -489,7 +489,7 @@ static int actionzone_invoke(bContext *C, wmOperator *op, wmEvent *event) /* region azone directly reacts on mouse clicks */ if(sad->az->type==AZONE_REGION) { actionzone_apply(C, op, AZONE_REGION); - actionzone_exit(C, op); + actionzone_exit(op); return OPERATOR_FINISHED; } else { @@ -529,16 +529,16 @@ static int actionzone_modal(bContext *C, wmOperator *op, wmEvent *event) sad->sa2= screen_areahascursor(CTX_wm_screen(C), event->x, event->y); /* apply sends event */ actionzone_apply(C, op, sad->az->type); - actionzone_exit(C, op); + actionzone_exit(op); return OPERATOR_FINISHED; } break; case ESCKEY: - actionzone_exit(C, op); + actionzone_exit(op); return OPERATOR_CANCELLED; case LEFTMOUSE: - actionzone_exit(C, op); + actionzone_exit(op); return OPERATOR_CANCELLED; } @@ -589,7 +589,7 @@ typedef struct sAreaSwapData { ScrArea *sa1, *sa2; } sAreaSwapData; -static int area_swap_init(bContext *C, wmOperator *op, wmEvent *event) +static int area_swap_init(wmOperator *op, wmEvent *event) { sAreaSwapData *sd= NULL; sActionzoneData *sad= event->customdata; @@ -623,7 +623,7 @@ static int area_swap_cancel(bContext *C, wmOperator *op) static int area_swap_invoke(bContext *C, wmOperator *op, wmEvent *event) { - if(!area_swap_init(C, op, event)) + if(!area_swap_init(op, event)) return OPERATOR_PASS_THROUGH; /* add modal handler */ @@ -709,7 +709,7 @@ static int area_dupli_invoke(bContext *C, wmOperator *op, wmEvent *event) /* poll() checks area context, but we don't accept full-area windows */ if(sc->full != SCREENNORMAL) { if(event->type==EVT_ACTIONZONE_AREA) - actionzone_exit(C, op); + actionzone_exit(op); return OPERATOR_CANCELLED; } @@ -731,7 +731,7 @@ static int area_dupli_invoke(bContext *C, wmOperator *op, wmEvent *event) WM_event_add_notifier(C, NC_SCREEN|NA_EDITED, NULL); if(event->type==EVT_ACTIONZONE_AREA) - actionzone_exit(C, op); + actionzone_exit(op); return OPERATOR_FINISHED; } @@ -1125,7 +1125,7 @@ static int area_split_apply(bContext *C, wmOperator *op) fac= RNA_float_get(op->ptr, "factor"); dir= RNA_enum_get(op->ptr, "direction"); - sd->narea= area_split(CTX_wm_window(C), sc, sd->sarea, dir, fac); + sd->narea= area_split(sc, sd->sarea, dir, fac); if(sd->narea) { ScrVert *sv; @@ -1741,7 +1741,7 @@ static void SCREEN_OT_screen_set(wmOperatorType *ot) /* function to be called outside UI context, or for redo */ -static int screen_full_area_exec(bContext *C, wmOperator *op) +static int screen_full_area_exec(bContext *C, wmOperator *UNUSED(op)) { ED_screen_full_toggle(C, CTX_wm_window(C), CTX_wm_area(C)); return OPERATOR_FINISHED; @@ -1948,7 +1948,7 @@ static int area_join_modal(bContext *C, wmOperator *op, wmEvent *event) if (sa) { if (jd->sa1 != sa) { - dir = area_getorientation(sc, jd->sa1, sa); + dir = area_getorientation(jd->sa1, sa); if (dir >= 0) { if (jd->sa2) jd->sa2->flag &= ~AREA_FLAG_DRAWJOINTO; jd->sa2 = sa; @@ -1959,7 +1959,7 @@ static int area_join_modal(bContext *C, wmOperator *op, wmEvent *event) we check if area has common border with the one marked for removal in this case we can swap areas. */ - dir = area_getorientation(sc, sa, jd->sa2); + dir = area_getorientation(sa, jd->sa2); if (dir >= 0) { if (jd->sa1) jd->sa1->flag &= ~AREA_FLAG_DRAWJOINFROM; if (jd->sa2) jd->sa2->flag &= ~AREA_FLAG_DRAWJOINTO; @@ -1985,13 +1985,13 @@ static int area_join_modal(bContext *C, wmOperator *op, wmEvent *event) jd->sa2 = sa; if (jd->sa1) jd->sa1->flag |= AREA_FLAG_DRAWJOINFROM; if (jd->sa2) jd->sa2->flag |= AREA_FLAG_DRAWJOINTO; - dir = area_getorientation(sc, jd->sa1, jd->sa2); + dir = area_getorientation(jd->sa1, jd->sa2); if (dir < 0) { printf("oops, didn't expect that!\n"); } } else { - dir = area_getorientation(sc, jd->sa1, sa); + dir = area_getorientation(jd->sa1, sa); if (dir >= 0) { if (jd->sa2) jd->sa2->flag &= ~AREA_FLAG_DRAWJOINTO; jd->sa2 = sa; @@ -2048,7 +2048,7 @@ static void SCREEN_OT_area_join(wmOperatorType *ot) /* ************** repeat last operator ***************************** */ -static int repeat_last_exec(bContext *C, wmOperator *op) +static int repeat_last_exec(bContext *C, wmOperator *UNUSED(op)) { wmOperator *lastop= CTX_wm_manager(C)->operators.last; @@ -2072,7 +2072,7 @@ static void SCREEN_OT_repeat_last(wmOperatorType *ot) } -static int repeat_history_invoke(bContext *C, wmOperator *op, wmEvent *event) +static int repeat_history_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event)) { wmWindowManager *wm= CTX_wm_manager(C); wmOperator *lastop; @@ -2129,7 +2129,7 @@ static void SCREEN_OT_repeat_history(wmOperatorType *ot) /* ********************** redo operator ***************************** */ -static int redo_last_invoke(bContext *C, wmOperator *op, wmEvent *event) +static int redo_last_invoke(bContext *C, wmOperator *UNUSED(op), wmEvent *UNUSED(event)) { wmWindowManager *wm= CTX_wm_manager(C); wmOperator *lastop; @@ -2257,7 +2257,7 @@ static void SCREEN_OT_region_quadview(wmOperatorType *ot) /* ************** region flip operator ***************************** */ /* flip a region alignment */ -static int region_flip_exec(bContext *C, wmOperator *op) +static int region_flip_exec(bContext *C, wmOperator *UNUSED(op)) { ARegion *ar= CTX_wm_region(C); @@ -2295,7 +2295,7 @@ static void SCREEN_OT_region_flip(wmOperatorType *ot) /* ************** header flip operator ***************************** */ /* flip a header region alignment */ -static int header_flip_exec(bContext *C, wmOperator *op) +static int header_flip_exec(bContext *C, wmOperator *UNUSED(op)) { ARegion *ar= CTX_wm_region(C); @@ -2349,7 +2349,7 @@ static void SCREEN_OT_header_flip(wmOperatorType *ot) /* ************** header tools operator ***************************** */ -static int header_toolbox_invoke(bContext *C, wmOperator *op, wmEvent *event) +static int header_toolbox_invoke(bContext *C, wmOperator *UNUSED(op), wmEvent *UNUSED(event)) { ScrArea *sa= CTX_wm_area(C); ARegion *ar= CTX_wm_region(C); @@ -2463,7 +2463,7 @@ static int match_region_with_redraws(int spacetype, int regiontype, int redraws) return 0; } -static int screen_animation_step(bContext *C, wmOperator *op, wmEvent *event) +static int screen_animation_step(bContext *C, wmOperator *UNUSED(op), wmEvent *UNUSED(event)) { bScreen *screen= CTX_wm_screen(C); @@ -2672,7 +2672,7 @@ static void SCREEN_OT_animation_play(wmOperatorType *ot) RNA_def_boolean(ot->srna, "sync", 0, "Sync", "Drop frames to maintain framerate"); } -static int screen_animation_cancel_exec(bContext *C, wmOperator *op) +static int screen_animation_cancel_exec(bContext *C, wmOperator *UNUSED(op)) { bScreen *screen= CTX_wm_screen(C); @@ -2800,7 +2800,7 @@ static void SCREEN_OT_back_to_previous(struct wmOperatorType *ot) /* *********** show user pref window ****** */ -static int userpref_show_invoke(bContext *C, wmOperator *unused, wmEvent *event) +static int userpref_show_invoke(bContext *C, wmOperator *UNUSED(op), wmEvent *event) { ScrArea *sa; rcti rect; @@ -2839,7 +2839,7 @@ static void SCREEN_OT_userpref_show(struct wmOperatorType *ot) /********************* new screen operator *********************/ -static int screen_new_exec(bContext *C, wmOperator *op) +static int screen_new_exec(bContext *C, wmOperator *UNUSED(op)) { wmWindow *win= CTX_wm_window(C); bScreen *sc= CTX_wm_screen(C); @@ -2866,7 +2866,7 @@ void SCREEN_OT_new(wmOperatorType *ot) /********************* delete screen operator *********************/ -static int screen_delete_exec(bContext *C, wmOperator *op) +static int screen_delete_exec(bContext *C, wmOperator *UNUSED(op)) { bScreen *sc= CTX_wm_screen(C); @@ -2937,7 +2937,7 @@ void SCENE_OT_new(wmOperatorType *ot) /********************* delete scene operator *********************/ -static int scene_delete_exec(bContext *C, wmOperator *op) +static int scene_delete_exec(bContext *C, wmOperator *UNUSED(op)) { Scene *scene= CTX_data_scene(C); diff --git a/source/blender/editors/screen/screendump.c b/source/blender/editors/screen/screendump.c index 56efa0a5a83..f1e11430573 100644 --- a/source/blender/editors/screen/screendump.c +++ b/source/blender/editors/screen/screendump.c @@ -132,7 +132,7 @@ static unsigned int *screenshot(bContext *C, int *dumpsx, int *dumpsy, int fscre } -static int screenshot_invoke(bContext *C, wmOperator *op, wmEvent *event) +static int screenshot_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event)) { unsigned int *dumprect; int dumpsx, dumpsy; @@ -214,7 +214,7 @@ static void screenshot_updatejob(void *sjv) /* only this runs inside thread */ -static void screenshot_startjob(void *sjv, short *stop, short *do_update, float *progress) +static void screenshot_startjob(void *sjv, short *stop, short *do_update, float *UNUSED(progress)) { ScreenshotJob *sj= sjv; RenderData rd= sj->scene->r; |