diff options
Diffstat (limited to 'source/blender')
30 files changed, 425 insertions, 425 deletions
diff --git a/source/blender/editors/interface/interface_panel.c b/source/blender/editors/interface/interface_panel.c index 5ee7556a042..8242d029b6a 100644 --- a/source/blender/editors/interface/interface_panel.c +++ b/source/blender/editors/interface/interface_panel.c @@ -1648,7 +1648,7 @@ void UI_panel_category_draw_all(ARegion *ar, const char *category_id_active) /* Secondary theme colors */ unsigned char theme_col_tab_outline[3]; - unsigned char theme_col_tab_divider[3]; /* line that divides tabs from the main area */ + unsigned char theme_col_tab_divider[3]; /* line that divides tabs from the main region */ unsigned char theme_col_tab_highlight[3]; unsigned char theme_col_tab_highlight_inactive[3]; diff --git a/source/blender/editors/space_action/space_action.c b/source/blender/editors/space_action/space_action.c index 5d0b34a2e0c..b6f4600ab88 100644 --- a/source/blender/editors/space_action/space_action.c +++ b/source/blender/editors/space_action/space_action.c @@ -83,7 +83,7 @@ static SpaceLink *action_new(const bContext *C) ar->alignment = RGN_ALIGN_BOTTOM; /* channel list region */ - ar = MEM_callocN(sizeof(ARegion), "channel area for action"); + ar = MEM_callocN(sizeof(ARegion), "channel region for action"); BLI_addtail(&saction->regionbase, ar); ar->regiontype = RGN_TYPE_CHANNELS; ar->alignment = RGN_ALIGN_LEFT; @@ -92,8 +92,8 @@ static SpaceLink *action_new(const bContext *C) ar->v2d.scroll = V2D_SCROLL_BOTTOM; ar->v2d.flag = V2D_VIEWSYNC_AREA_VERTICAL; - /* main area */ - ar = MEM_callocN(sizeof(ARegion), "main area for action"); + /* main region */ + ar = MEM_callocN(sizeof(ARegion), "main region for action"); BLI_addtail(&saction->regionbase, ar); ar->regiontype = RGN_TYPE_WINDOW; @@ -149,7 +149,7 @@ static SpaceLink *action_duplicate(SpaceLink *sl) /* add handlers, stuff you only do once or on area/region changes */ -static void action_main_area_init(wmWindowManager *wm, ARegion *ar) +static void action_main_region_init(wmWindowManager *wm, ARegion *ar) { wmKeyMap *keymap; @@ -160,7 +160,7 @@ static void action_main_area_init(wmWindowManager *wm, ARegion *ar) WM_event_add_keymap_handler_bb(&ar->handlers, keymap, &ar->v2d.mask, &ar->winrct); } -static void action_main_area_draw(const bContext *C, ARegion *ar) +static void action_main_region_draw(const bContext *C, ARegion *ar) { /* draw entirely, view changes should be handled here */ SpaceAction *saction = CTX_wm_space_action(C); @@ -218,7 +218,7 @@ static void action_main_area_draw(const bContext *C, ARegion *ar) } /* add handlers, stuff you only do once or on area/region changes */ -static void action_channel_area_init(wmWindowManager *wm, ARegion *ar) +static void action_channel_region_init(wmWindowManager *wm, ARegion *ar) { wmKeyMap *keymap; @@ -232,7 +232,7 @@ static void action_channel_area_init(wmWindowManager *wm, ARegion *ar) WM_event_add_keymap_handler_bb(&ar->handlers, keymap, &ar->v2d.mask, &ar->winrct); } -static void action_channel_area_draw(const bContext *C, ARegion *ar) +static void action_channel_region_draw(const bContext *C, ARegion *ar) { /* draw entirely, view changes should be handled here */ bAnimContext ac; @@ -257,17 +257,17 @@ static void action_channel_area_draw(const bContext *C, ARegion *ar) /* add handlers, stuff you only do once or on area/region changes */ -static void action_header_area_init(wmWindowManager *UNUSED(wm), ARegion *ar) +static void action_header_region_init(wmWindowManager *UNUSED(wm), ARegion *ar) { ED_region_header_init(ar); } -static void action_header_area_draw(const bContext *C, ARegion *ar) +static void action_header_region_draw(const bContext *C, ARegion *ar) { ED_region_header(C, ar); } -static void action_channel_area_listener(bScreen *UNUSED(sc), ScrArea *UNUSED(sa), ARegion *ar, wmNotifier *wmn) +static void action_channel_region_listener(bScreen *UNUSED(sc), ScrArea *UNUSED(sa), ARegion *ar, wmNotifier *wmn) { /* context changes */ switch (wmn->category) { @@ -306,7 +306,7 @@ static void action_channel_area_listener(bScreen *UNUSED(sc), ScrArea *UNUSED(sa } } -static void action_main_area_listener(bScreen *UNUSED(sc), ScrArea *UNUSED(sa), ARegion *ar, wmNotifier *wmn) +static void action_main_region_listener(bScreen *UNUSED(sc), ScrArea *UNUSED(sa), ARegion *ar, wmNotifier *wmn) { /* context changes */ switch (wmn->category) { @@ -457,7 +457,7 @@ static void action_listener(bScreen *UNUSED(sc), ScrArea *sa, wmNotifier *wmn) } } -static void action_header_area_listener(bScreen *UNUSED(sc), ScrArea *UNUSED(sa), ARegion *ar, wmNotifier *wmn) +static void action_header_region_listener(bScreen *UNUSED(sc), ScrArea *UNUSED(sa), ARegion *ar, wmNotifier *wmn) { // SpaceAction *saction = (SpaceAction *)sa->spacedata.first; @@ -543,9 +543,9 @@ void ED_spacetype_action(void) /* regions: main window */ art = MEM_callocN(sizeof(ARegionType), "spacetype action region"); art->regionid = RGN_TYPE_WINDOW; - art->init = action_main_area_init; - art->draw = action_main_area_draw; - art->listener = action_main_area_listener; + art->init = action_main_region_init; + art->draw = action_main_region_draw; + art->listener = action_main_region_listener; art->keymapflag = ED_KEYMAP_VIEW2D | ED_KEYMAP_MARKERS | ED_KEYMAP_ANIMATION | ED_KEYMAP_FRAMES; BLI_addhead(&st->regiontypes, art); @@ -556,9 +556,9 @@ void ED_spacetype_action(void) art->prefsizey = HEADERY; art->keymapflag = ED_KEYMAP_UI | ED_KEYMAP_VIEW2D | ED_KEYMAP_FRAMES | ED_KEYMAP_HEADER; - art->init = action_header_area_init; - art->draw = action_header_area_draw; - art->listener = action_header_area_listener; + art->init = action_header_region_init; + art->draw = action_header_region_draw; + art->listener = action_header_region_listener; BLI_addhead(&st->regiontypes, art); @@ -568,9 +568,9 @@ void ED_spacetype_action(void) art->prefsizex = 200; art->keymapflag = ED_KEYMAP_UI | ED_KEYMAP_VIEW2D | ED_KEYMAP_FRAMES; - art->init = action_channel_area_init; - art->draw = action_channel_area_draw; - art->listener = action_channel_area_listener; + art->init = action_channel_region_init; + art->draw = action_channel_region_draw; + art->listener = action_channel_region_listener; BLI_addhead(&st->regiontypes, art); diff --git a/source/blender/editors/space_buttons/space_buttons.c b/source/blender/editors/space_buttons/space_buttons.c index e28ad686d2a..126a27c36cb 100644 --- a/source/blender/editors/space_buttons/space_buttons.c +++ b/source/blender/editors/space_buttons/space_buttons.c @@ -66,15 +66,15 @@ static SpaceLink *buttons_new(const bContext *UNUSED(C)) ar->alignment = RGN_ALIGN_TOP; #if 0 - /* context area */ - ar = MEM_callocN(sizeof(ARegion), "context area for buts"); + /* context region */ + ar = MEM_callocN(sizeof(ARegion), "context region for buts"); BLI_addtail(&sbuts->regionbase, ar); ar->regiontype = RGN_TYPE_CHANNELS; ar->alignment = RGN_ALIGN_TOP; #endif - /* main area */ - ar = MEM_callocN(sizeof(ARegion), "main area for buts"); + /* main region */ + ar = MEM_callocN(sizeof(ARegion), "main region for buts"); BLI_addtail(&sbuts->regionbase, ar); ar->regiontype = RGN_TYPE_WINDOW; @@ -123,7 +123,7 @@ static SpaceLink *buttons_duplicate(SpaceLink *sl) } /* add handlers, stuff you only do once or on area/region changes */ -static void buttons_main_area_init(wmWindowManager *wm, ARegion *ar) +static void buttons_main_region_init(wmWindowManager *wm, ARegion *ar) { wmKeyMap *keymap; @@ -133,7 +133,7 @@ static void buttons_main_area_init(wmWindowManager *wm, ARegion *ar) WM_event_add_keymap_handler(&ar->handlers, keymap); } -static void buttons_main_area_draw(const bContext *C, ARegion *ar) +static void buttons_main_region_draw(const bContext *C, ARegion *ar) { /* draw entirely, view changes should be handled here */ SpaceButs *sbuts = CTX_wm_space_buts(C); @@ -189,12 +189,12 @@ static void buttons_keymap(struct wmKeyConfig *keyconf) } /* add handlers, stuff you only do once or on area/region changes */ -static void buttons_header_area_init(wmWindowManager *UNUSED(wm), ARegion *ar) +static void buttons_header_region_init(wmWindowManager *UNUSED(wm), ARegion *ar) { ED_region_header_init(ar); } -static void buttons_header_area_draw(const bContext *C, ARegion *ar) +static void buttons_header_region_draw(const bContext *C, ARegion *ar) { SpaceButs *sbuts = CTX_wm_space_buts(C); @@ -410,8 +410,8 @@ void ED_spacetype_buttons(void) /* regions: main window */ art = MEM_callocN(sizeof(ARegionType), "spacetype buttons region"); art->regionid = RGN_TYPE_WINDOW; - art->init = buttons_main_area_init; - art->draw = buttons_main_area_draw; + art->init = buttons_main_region_init; + art->draw = buttons_main_region_draw; art->keymapflag = ED_KEYMAP_UI | ED_KEYMAP_FRAMES; BLI_addhead(&st->regiontypes, art); @@ -423,8 +423,8 @@ void ED_spacetype_buttons(void) art->prefsizey = HEADERY; art->keymapflag = ED_KEYMAP_UI | ED_KEYMAP_VIEW2D | ED_KEYMAP_FRAMES | ED_KEYMAP_HEADER; - art->init = buttons_header_area_init; - art->draw = buttons_header_area_draw; + art->init = buttons_header_region_init; + art->draw = buttons_header_region_draw; BLI_addhead(&st->regiontypes, art); BKE_spacetype_register(st); diff --git a/source/blender/editors/space_clip/space_clip.c b/source/blender/editors/space_clip/space_clip.c index f119fe23c12..8c4b97b51ff 100644 --- a/source/blender/editors/space_clip/space_clip.c +++ b/source/blender/editors/space_clip/space_clip.c @@ -296,8 +296,8 @@ static SpaceLink *clip_new(const bContext *C) BLI_addtail(&sc->regionbase, ar); init_preview_region(C, ar); - /* main area */ - ar = MEM_callocN(sizeof(ARegion), "main area for clip"); + /* main region */ + ar = MEM_callocN(sizeof(ARegion), "main region for clip"); BLI_addtail(&sc->regionbase, ar); ar->regiontype = RGN_TYPE_WINDOW; @@ -1132,7 +1132,7 @@ static void movieclip_main_area_set_view2d(const bContext *C, ARegion *ar) } /* add handlers, stuff you only do once or on area/region changes */ -static void clip_main_area_init(wmWindowManager *wm, ARegion *ar) +static void clip_main_region_init(wmWindowManager *wm, ARegion *ar) { wmKeyMap *keymap; @@ -1150,7 +1150,7 @@ static void clip_main_area_init(wmWindowManager *wm, ARegion *ar) WM_event_add_keymap_handler_bb(&ar->handlers, keymap, &ar->v2d.mask, &ar->winrct); } -static void clip_main_area_draw(const bContext *C, ARegion *ar) +static void clip_main_region_draw(const bContext *C, ARegion *ar) { /* draw entirely, view changes should be handled here */ SpaceClip *sc = CTX_wm_space_clip(C); @@ -1241,7 +1241,7 @@ static void clip_main_area_draw(const bContext *C, ARegion *ar) } } -static void clip_main_area_listener(bScreen *UNUSED(sc), ScrArea *UNUSED(sa), ARegion *ar, wmNotifier *wmn) +static void clip_main_region_listener(bScreen *UNUSED(sc), ScrArea *UNUSED(sa), ARegion *ar, wmNotifier *wmn) { /* context changes */ switch (wmn->category) { @@ -1256,7 +1256,7 @@ static void clip_main_area_listener(bScreen *UNUSED(sc), ScrArea *UNUSED(sa), AR /****************** preview region ******************/ -static void clip_preview_area_init(wmWindowManager *wm, ARegion *ar) +static void clip_preview_region_init(wmWindowManager *wm, ARegion *ar) { wmKeyMap *keymap; @@ -1273,7 +1273,7 @@ static void clip_preview_area_init(wmWindowManager *wm, ARegion *ar) WM_event_add_keymap_handler_bb(&ar->handlers, keymap, &ar->v2d.mask, &ar->winrct); } -static void graph_area_draw(const bContext *C, ARegion *ar) +static void graph_region_draw(const bContext *C, ARegion *ar) { View2D *v2d = &ar->v2d; View2DScrollers *scrollers; @@ -1304,7 +1304,7 @@ static void graph_area_draw(const bContext *C, ARegion *ar) UI_view2d_scrollers_free(scrollers); } -static void dopesheet_area_draw(const bContext *C, ARegion *ar) +static void dopesheet_region_draw(const bContext *C, ARegion *ar) { Scene *scene = CTX_data_scene(C); SpaceClip *sc = CTX_wm_space_clip(C); @@ -1342,23 +1342,23 @@ static void dopesheet_area_draw(const bContext *C, ARegion *ar) UI_view2d_scrollers_free(scrollers); } -static void clip_preview_area_draw(const bContext *C, ARegion *ar) +static void clip_preview_region_draw(const bContext *C, ARegion *ar) { SpaceClip *sc = CTX_wm_space_clip(C); if (sc->view == SC_VIEW_GRAPH) - graph_area_draw(C, ar); + graph_region_draw(C, ar); else if (sc->view == SC_VIEW_DOPESHEET) - dopesheet_area_draw(C, ar); + dopesheet_region_draw(C, ar); } -static void clip_preview_area_listener(bScreen *UNUSED(sc), ScrArea *UNUSED(sa), ARegion *UNUSED(ar), wmNotifier *UNUSED(wmn)) +static void clip_preview_region_listener(bScreen *UNUSED(sc), ScrArea *UNUSED(sa), ARegion *UNUSED(ar), wmNotifier *UNUSED(wmn)) { } /****************** channels region ******************/ -static void clip_channels_area_init(wmWindowManager *wm, ARegion *ar) +static void clip_channels_region_init(wmWindowManager *wm, ARegion *ar) { wmKeyMap *keymap; @@ -1371,7 +1371,7 @@ static void clip_channels_area_init(wmWindowManager *wm, ARegion *ar) WM_event_add_keymap_handler_bb(&ar->handlers, keymap, &ar->v2d.mask, &ar->winrct); } -static void clip_channels_area_draw(const bContext *C, ARegion *ar) +static void clip_channels_region_draw(const bContext *C, ARegion *ar) { SpaceClip *sc = CTX_wm_space_clip(C); MovieClip *clip = ED_space_clip_get_clip(sc); @@ -1393,24 +1393,24 @@ static void clip_channels_area_draw(const bContext *C, ARegion *ar) UI_view2d_view_restore(C); } -static void clip_channels_area_listener(bScreen *UNUSED(sc), ScrArea *UNUSED(sa), ARegion *UNUSED(ar), wmNotifier *UNUSED(wmn)) +static void clip_channels_region_listener(bScreen *UNUSED(sc), ScrArea *UNUSED(sa), ARegion *UNUSED(ar), wmNotifier *UNUSED(wmn)) { } /****************** header region ******************/ /* add handlers, stuff you only do once or on area/region changes */ -static void clip_header_area_init(wmWindowManager *UNUSED(wm), ARegion *ar) +static void clip_header_region_init(wmWindowManager *UNUSED(wm), ARegion *ar) { ED_region_header_init(ar); } -static void clip_header_area_draw(const bContext *C, ARegion *ar) +static void clip_header_region_draw(const bContext *C, ARegion *ar) { ED_region_header(C, ar); } -static void clip_header_area_listener(bScreen *UNUSED(sc), ScrArea *UNUSED(sa), ARegion *ar, wmNotifier *wmn) +static void clip_header_region_listener(bScreen *UNUSED(sc), ScrArea *UNUSED(sa), ARegion *ar, wmNotifier *wmn) { /* context changes */ switch (wmn->category) { @@ -1433,7 +1433,7 @@ static void clip_header_area_listener(bScreen *UNUSED(sc), ScrArea *UNUSED(sa), /****************** tools region ******************/ /* add handlers, stuff you only do once or on area/region changes */ -static void clip_tools_area_init(wmWindowManager *wm, ARegion *ar) +static void clip_tools_region_init(wmWindowManager *wm, ARegion *ar) { wmKeyMap *keymap; @@ -1443,14 +1443,14 @@ static void clip_tools_area_init(wmWindowManager *wm, ARegion *ar) WM_event_add_keymap_handler(&ar->handlers, keymap); } -static void clip_tools_area_draw(const bContext *C, ARegion *ar) +static void clip_tools_region_draw(const bContext *C, ARegion *ar) { ED_region_panels(C, ar, NULL, -1, true); } /****************** tool properties region ******************/ -static void clip_props_area_listener(bScreen *UNUSED(sc), ScrArea *UNUSED(sa), ARegion *ar, wmNotifier *wmn) +static void clip_props_region_listener(bScreen *UNUSED(sc), ScrArea *UNUSED(sa), ARegion *ar, wmNotifier *wmn) { /* context changes */ switch (wmn->category) { @@ -1476,7 +1476,7 @@ static void clip_props_area_listener(bScreen *UNUSED(sc), ScrArea *UNUSED(sa), A /****************** properties region ******************/ /* add handlers, stuff you only do once or on area/region changes */ -static void clip_properties_area_init(wmWindowManager *wm, ARegion *ar) +static void clip_properties_region_init(wmWindowManager *wm, ARegion *ar) { wmKeyMap *keymap; @@ -1486,7 +1486,7 @@ static void clip_properties_area_init(wmWindowManager *wm, ARegion *ar) WM_event_add_keymap_handler(&ar->handlers, keymap); } -static void clip_properties_area_draw(const bContext *C, ARegion *ar) +static void clip_properties_region_draw(const bContext *C, ARegion *ar) { SpaceClip *sc = CTX_wm_space_clip(C); @@ -1495,7 +1495,7 @@ static void clip_properties_area_draw(const bContext *C, ARegion *ar) ED_region_panels(C, ar, NULL, -1, true); } -static void clip_properties_area_listener(bScreen *UNUSED(sc), ScrArea *UNUSED(sa), ARegion *ar, wmNotifier *wmn) +static void clip_properties_region_listener(bScreen *UNUSED(sc), ScrArea *UNUSED(sa), ARegion *ar, wmNotifier *wmn) { /* context changes */ switch (wmn->category) { @@ -1535,9 +1535,9 @@ void ED_spacetype_clip(void) /* regions: main window */ art = MEM_callocN(sizeof(ARegionType), "spacetype clip region"); art->regionid = RGN_TYPE_WINDOW; - art->init = clip_main_area_init; - art->draw = clip_main_area_draw; - art->listener = clip_main_area_listener; + art->init = clip_main_region_init; + art->draw = clip_main_region_draw; + art->listener = clip_main_region_listener; art->keymapflag = ED_KEYMAP_FRAMES | ED_KEYMAP_UI | ED_KEYMAP_GPENCIL; BLI_addhead(&st->regiontypes, art); @@ -1546,9 +1546,9 @@ void ED_spacetype_clip(void) art = MEM_callocN(sizeof(ARegionType), "spacetype clip region preview"); art->regionid = RGN_TYPE_PREVIEW; art->prefsizey = 240; - art->init = clip_preview_area_init; - art->draw = clip_preview_area_draw; - art->listener = clip_preview_area_listener; + art->init = clip_preview_region_init; + art->draw = clip_preview_region_draw; + art->listener = clip_preview_region_listener; art->keymapflag = ED_KEYMAP_FRAMES | ED_KEYMAP_UI | ED_KEYMAP_VIEW2D; BLI_addhead(&st->regiontypes, art); @@ -1558,9 +1558,9 @@ void ED_spacetype_clip(void) art->regionid = RGN_TYPE_UI; art->prefsizex = UI_COMPACT_PANEL_WIDTH; art->keymapflag = ED_KEYMAP_FRAMES | ED_KEYMAP_UI; - art->init = clip_properties_area_init; - art->draw = clip_properties_area_draw; - art->listener = clip_properties_area_listener; + art->init = clip_properties_region_init; + art->draw = clip_properties_region_draw; + art->listener = clip_properties_region_listener; BLI_addhead(&st->regiontypes, art); ED_clip_buttons_register(art); @@ -1569,9 +1569,9 @@ void ED_spacetype_clip(void) art->regionid = RGN_TYPE_TOOLS; art->prefsizex = UI_COMPACT_PANEL_WIDTH; art->keymapflag = ED_KEYMAP_FRAMES | ED_KEYMAP_UI; - art->listener = clip_props_area_listener; - art->init = clip_tools_area_init; - art->draw = clip_tools_area_draw; + art->listener = clip_props_region_listener; + art->init = clip_tools_region_init; + art->draw = clip_tools_region_draw; BLI_addhead(&st->regiontypes, art); @@ -1581,9 +1581,9 @@ void ED_spacetype_clip(void) art->prefsizex = 0; art->prefsizey = 120; art->keymapflag = ED_KEYMAP_FRAMES | ED_KEYMAP_UI; - art->listener = clip_props_area_listener; - art->init = clip_tools_area_init; - art->draw = clip_tools_area_draw; + art->listener = clip_props_region_listener; + art->init = clip_tools_region_init; + art->draw = clip_tools_region_draw; ED_clip_tool_props_register(art); BLI_addhead(&st->regiontypes, art); @@ -1594,9 +1594,9 @@ void ED_spacetype_clip(void) art->prefsizey = HEADERY; art->keymapflag = ED_KEYMAP_FRAMES | ED_KEYMAP_UI | ED_KEYMAP_VIEW2D | ED_KEYMAP_HEADER; - art->init = clip_header_area_init; - art->draw = clip_header_area_draw; - art->listener = clip_header_area_listener; + art->init = clip_header_region_init; + art->draw = clip_header_region_draw; + art->listener = clip_header_region_listener; BLI_addhead(&st->regiontypes, art); @@ -1607,9 +1607,9 @@ void ED_spacetype_clip(void) art->regionid = RGN_TYPE_CHANNELS; art->prefsizex = UI_COMPACT_PANEL_WIDTH; art->keymapflag = ED_KEYMAP_FRAMES | ED_KEYMAP_UI; - art->listener = clip_channels_area_listener; - art->init = clip_channels_area_init; - art->draw = clip_channels_area_draw; + art->listener = clip_channels_region_listener; + art->init = clip_channels_region_init; + art->draw = clip_channels_region_draw; BLI_addhead(&st->regiontypes, art); } diff --git a/source/blender/editors/space_console/space_console.c b/source/blender/editors/space_console/space_console.c index a592f35f629..cf235d0fc02 100644 --- a/source/blender/editors/space_console/space_console.c +++ b/source/blender/editors/space_console/space_console.c @@ -74,8 +74,8 @@ static SpaceLink *console_new(const bContext *UNUSED(C)) ar->alignment = RGN_ALIGN_BOTTOM; - /* main area */ - ar = MEM_callocN(sizeof(ARegion), "main area for text"); + /* main region */ + ar = MEM_callocN(sizeof(ARegion), "main region for text"); BLI_addtail(&sconsole->regionbase, ar); ar->regiontype = RGN_TYPE_WINDOW; @@ -129,7 +129,7 @@ static SpaceLink *console_duplicate(SpaceLink *sl) /* add handlers, stuff you only do once or on area/region changes */ -static void console_main_area_init(wmWindowManager *wm, ARegion *ar) +static void console_main_region_init(wmWindowManager *wm, ARegion *ar) { wmKeyMap *keymap; ListBase *lb; @@ -219,7 +219,7 @@ static void console_dropboxes(void) /* ************* end drop *********** */ -static void console_main_area_draw(const bContext *C, ARegion *ar) +static void console_main_region_draw(const bContext *C, ARegion *ar) { /* draw entirely, view changes should be handled here */ SpaceConsole *sc = CTX_wm_space_console(C); @@ -362,17 +362,17 @@ static void console_keymap(struct wmKeyConfig *keyconf) /****************** header region ******************/ /* add handlers, stuff you only do once or on area/region changes */ -static void console_header_area_init(wmWindowManager *UNUSED(wm), ARegion *ar) +static void console_header_region_init(wmWindowManager *UNUSED(wm), ARegion *ar) { ED_region_header_init(ar); } -static void console_header_area_draw(const bContext *C, ARegion *ar) +static void console_header_region_draw(const bContext *C, ARegion *ar) { ED_region_header(C, ar); } -static void console_main_area_listener(bScreen *UNUSED(sc), ScrArea *UNUSED(sa), ARegion *ar, wmNotifier *wmn) +static void console_main_region_listener(bScreen *UNUSED(sc), ScrArea *UNUSED(sa), ARegion *ar, wmNotifier *wmn) { // SpaceInfo *sinfo = sa->spacedata.first; @@ -408,10 +408,10 @@ void ED_spacetype_console(void) art->regionid = RGN_TYPE_WINDOW; art->keymapflag = ED_KEYMAP_UI | ED_KEYMAP_VIEW2D; - art->init = console_main_area_init; - art->draw = console_main_area_draw; + art->init = console_main_region_init; + art->draw = console_main_region_draw; art->cursor = console_cursor; - art->listener = console_main_area_listener; + art->listener = console_main_region_listener; @@ -423,8 +423,8 @@ void ED_spacetype_console(void) art->prefsizey = HEADERY; art->keymapflag = ED_KEYMAP_UI | ED_KEYMAP_VIEW2D | ED_KEYMAP_HEADER; - art->init = console_header_area_init; - art->draw = console_header_area_draw; + art->init = console_header_region_init; + art->draw = console_header_region_draw; BLI_addhead(&st->regiontypes, art); diff --git a/source/blender/editors/space_file/space_file.c b/source/blender/editors/space_file/space_file.c index 3202164edbd..62f6420456a 100644 --- a/source/blender/editors/space_file/space_file.c +++ b/source/blender/editors/space_file/space_file.c @@ -82,25 +82,25 @@ static SpaceLink *file_new(const bContext *UNUSED(C)) ar->alignment = RGN_ALIGN_TOP; /* Tools region */ - ar = MEM_callocN(sizeof(ARegion), "tools area for file"); + ar = MEM_callocN(sizeof(ARegion), "tools region for file"); BLI_addtail(&sfile->regionbase, ar); ar->regiontype = RGN_TYPE_TOOLS; ar->alignment = RGN_ALIGN_LEFT; /* Tool props (aka operator) region */ - ar = MEM_callocN(sizeof(ARegion), "tool props area for file"); + ar = MEM_callocN(sizeof(ARegion), "tool props region for file"); BLI_addtail(&sfile->regionbase, ar); ar->regiontype = RGN_TYPE_TOOL_PROPS; ar->alignment = RGN_ALIGN_BOTTOM | RGN_SPLIT_PREV; /* ui list region */ - ar = MEM_callocN(sizeof(ARegion), "ui area for file"); + ar = MEM_callocN(sizeof(ARegion), "ui region for file"); BLI_addtail(&sfile->regionbase, ar); ar->regiontype = RGN_TYPE_UI; ar->alignment = RGN_ALIGN_TOP; - /* main area */ - ar = MEM_callocN(sizeof(ARegion), "main area for file"); + /* main region */ + ar = MEM_callocN(sizeof(ARegion), "main region for file"); BLI_addtail(&sfile->regionbase, ar); ar->regiontype = RGN_TYPE_WINDOW; ar->v2d.scroll = (V2D_SCROLL_RIGHT | V2D_SCROLL_BOTTOM); @@ -281,7 +281,7 @@ static void file_refresh(const bContext *C, ScrArea *sa) sfile->layout->dirty = true; } - /* Might be called with NULL sa, see file_main_area_draw() below. */ + /* Might be called with NULL sa, see file_main_region_draw() below. */ if (sa && BKE_area_find_region_type(sa, RGN_TYPE_TOOLS) == NULL) { /* Create TOOLS/TOOL_PROPS regions. */ file_tools_region(sa); @@ -319,7 +319,7 @@ static void file_listener(bScreen *UNUSED(sc), ScrArea *sa, wmNotifier *wmn) } /* add handlers, stuff you only do once or on area/region changes */ -static void file_main_area_init(wmWindowManager *wm, ARegion *ar) +static void file_main_region_init(wmWindowManager *wm, ARegion *ar) { wmKeyMap *keymap; @@ -333,7 +333,7 @@ static void file_main_area_init(wmWindowManager *wm, ARegion *ar) WM_event_add_keymap_handler_bb(&ar->handlers, keymap, &ar->v2d.mask, &ar->winrct); } -static void file_main_area_listener(bScreen *UNUSED(sc), ScrArea *UNUSED(sa), ARegion *ar, wmNotifier *wmn) +static void file_main_region_listener(bScreen *UNUSED(sc), ScrArea *UNUSED(sa), ARegion *ar, wmNotifier *wmn) { /* context changes */ switch (wmn->category) { @@ -350,7 +350,7 @@ static void file_main_area_listener(bScreen *UNUSED(sc), ScrArea *UNUSED(sa), AR } } -static void file_main_area_draw(const bContext *C, ARegion *ar) +static void file_main_region_draw(const bContext *C, ARegion *ar) { /* draw entirely, view changes should be handled here */ SpaceFile *sfile = CTX_wm_space_file(C); @@ -448,7 +448,7 @@ static void file_operatortypes(void) static void file_keymap(struct wmKeyConfig *keyconf) { wmKeyMapItem *kmi; - /* keys for all areas */ + /* keys for all regions */ wmKeyMap *keymap = WM_keymap_find(keyconf, "File Browser", SPACE_FILE, 0); WM_keymap_add_item(keymap, "FILE_OT_bookmark_toggle", TKEY, KM_PRESS, 0, 0); WM_keymap_add_item(keymap, "FILE_OT_parent", PKEY, KM_PRESS, 0, 0); @@ -461,7 +461,7 @@ static void file_keymap(struct wmKeyConfig *keyconf) WM_keymap_add_item(keymap, "FILE_OT_delete", DELKEY, KM_PRESS, 0, 0); WM_keymap_verify_item(keymap, "FILE_OT_smoothscroll", TIMER1, KM_ANY, KM_ANY, 0); - /* keys for main area */ + /* keys for main region */ keymap = WM_keymap_find(keyconf, "File Browser Main", SPACE_FILE, 0); kmi = WM_keymap_add_item(keymap, "FILE_OT_execute", LEFTMOUSE, KM_DBL_CLICK, 0, 0); RNA_boolean_set(kmi->ptr, "need_active", true); @@ -552,7 +552,7 @@ static void file_keymap(struct wmKeyConfig *keyconf) RNA_int_set(kmi->ptr, "increment", -100); - /* keys for button area (top) */ + /* keys for button region (top) */ keymap = WM_keymap_find(keyconf, "File Browser Buttons", SPACE_FILE, 0); kmi = WM_keymap_add_item(keymap, "FILE_OT_filenum", PADPLUSKEY, KM_PRESS, 0, 0); RNA_int_set(kmi->ptr, "increment", 1); @@ -569,7 +569,7 @@ static void file_keymap(struct wmKeyConfig *keyconf) } -static void file_tools_area_init(wmWindowManager *wm, ARegion *ar) +static void file_tools_region_init(wmWindowManager *wm, ARegion *ar) { wmKeyMap *keymap; @@ -581,12 +581,12 @@ static void file_tools_area_init(wmWindowManager *wm, ARegion *ar) WM_event_add_keymap_handler_bb(&ar->handlers, keymap, &ar->v2d.mask, &ar->winrct); } -static void file_tools_area_draw(const bContext *C, ARegion *ar) +static void file_tools_region_draw(const bContext *C, ARegion *ar) { ED_region_panels(C, ar, NULL, -1, true); } -static void file_tools_area_listener(bScreen *UNUSED(sc), ScrArea *UNUSED(sa), ARegion *UNUSED(ar), wmNotifier *UNUSED(wmn)) +static void file_tools_region_listener(bScreen *UNUSED(sc), ScrArea *UNUSED(sa), ARegion *UNUSED(ar), wmNotifier *UNUSED(wmn)) { #if 0 /* context changes */ @@ -597,7 +597,7 @@ static void file_tools_area_listener(bScreen *UNUSED(sc), ScrArea *UNUSED(sa), A } /* add handlers, stuff you only do once or on area/region changes */ -static void file_header_area_init(wmWindowManager *wm, ARegion *ar) +static void file_header_region_init(wmWindowManager *wm, ARegion *ar) { wmKeyMap *keymap; @@ -607,13 +607,13 @@ static void file_header_area_init(wmWindowManager *wm, ARegion *ar) WM_event_add_keymap_handler_bb(&ar->handlers, keymap, &ar->v2d.mask, &ar->winrct); } -static void file_header_area_draw(const bContext *C, ARegion *ar) +static void file_header_region_draw(const bContext *C, ARegion *ar) { ED_region_header(C, ar); } /* add handlers, stuff you only do once or on area/region changes */ -static void file_ui_area_init(wmWindowManager *wm, ARegion *ar) +static void file_ui_region_init(wmWindowManager *wm, ARegion *ar) { wmKeyMap *keymap; @@ -627,7 +627,7 @@ static void file_ui_area_init(wmWindowManager *wm, ARegion *ar) WM_event_add_keymap_handler_bb(&ar->handlers, keymap, &ar->v2d.mask, &ar->winrct); } -static void file_ui_area_draw(const bContext *C, ARegion *ar) +static void file_ui_region_draw(const bContext *C, ARegion *ar) { float col[3]; /* clear */ @@ -648,7 +648,7 @@ static void file_ui_area_draw(const bContext *C, ARegion *ar) UI_view2d_view_restore(C); } -static void file_ui_area_listener(bScreen *UNUSED(sc), ScrArea *UNUSED(sa), ARegion *ar, wmNotifier *wmn) +static void file_ui_region_listener(bScreen *UNUSED(sc), ScrArea *UNUSED(sa), ARegion *ar, wmNotifier *wmn) { /* context changes */ switch (wmn->category) { @@ -709,9 +709,9 @@ void ED_spacetype_file(void) /* regions: main window */ art = MEM_callocN(sizeof(ARegionType), "spacetype file region"); art->regionid = RGN_TYPE_WINDOW; - art->init = file_main_area_init; - art->draw = file_main_area_draw; - art->listener = file_main_area_listener; + art->init = file_main_region_init; + art->draw = file_main_region_draw; + art->listener = file_main_region_listener; art->keymapflag = ED_KEYMAP_UI | ED_KEYMAP_VIEW2D; BLI_addhead(&st->regiontypes, art); @@ -720,9 +720,9 @@ void ED_spacetype_file(void) art->regionid = RGN_TYPE_HEADER; art->prefsizey = HEADERY; art->keymapflag = ED_KEYMAP_UI | ED_KEYMAP_VIEW2D | ED_KEYMAP_HEADER; - art->init = file_header_area_init; - art->draw = file_header_area_draw; - // art->listener = file_header_area_listener; + art->init = file_header_region_init; + art->draw = file_header_region_draw; + // art->listener = file_header_region_listener; BLI_addhead(&st->regiontypes, art); /* regions: ui */ @@ -730,9 +730,9 @@ void ED_spacetype_file(void) art->regionid = RGN_TYPE_UI; art->prefsizey = 60; art->keymapflag = ED_KEYMAP_UI; - art->listener = file_ui_area_listener; - art->init = file_ui_area_init; - art->draw = file_ui_area_draw; + art->listener = file_ui_region_listener; + art->init = file_ui_region_init; + art->draw = file_ui_region_draw; BLI_addhead(&st->regiontypes, art); /* regions: channels (directories) */ @@ -741,9 +741,9 @@ void ED_spacetype_file(void) art->prefsizex = 240; art->prefsizey = 60; art->keymapflag = ED_KEYMAP_UI; - art->listener = file_tools_area_listener; - art->init = file_tools_area_init; - art->draw = file_tools_area_draw; + art->listener = file_tools_region_listener; + art->init = file_tools_region_init; + art->draw = file_tools_region_draw; BLI_addhead(&st->regiontypes, art); /* regions: tool properties */ @@ -752,9 +752,9 @@ void ED_spacetype_file(void) art->prefsizex = 0; art->prefsizey = 360; art->keymapflag = ED_KEYMAP_UI; - art->listener = file_tools_area_listener; - art->init = file_tools_area_init; - art->draw = file_tools_area_draw; + art->listener = file_tools_region_listener; + art->init = file_tools_region_init; + art->draw = file_tools_region_draw; BLI_addhead(&st->regiontypes, art); file_panels_register(art); diff --git a/source/blender/editors/space_graph/graph_draw.c b/source/blender/editors/space_graph/graph_draw.c index 91e11ac4b1e..51865ebcf90 100644 --- a/source/blender/editors/space_graph/graph_draw.c +++ b/source/blender/editors/space_graph/graph_draw.c @@ -964,7 +964,7 @@ void graph_draw_ghost_curves(bAnimContext *ac, SpaceIpo *sipo, ARegion *ar) glDisable(GL_BLEND); } -/* This is called twice from space_graph.c -> graph_main_area_draw() +/* This is called twice from space_graph.c -> graph_main_region_draw() * Unselected then selected F-Curves are drawn so that they do not occlude each other. */ void graph_draw_curves(bAnimContext *ac, SpaceIpo *sipo, ARegion *ar, View2DGrid *grid, short sel) diff --git a/source/blender/editors/space_graph/space_graph.c b/source/blender/editors/space_graph/space_graph.c index 200523f591d..9f3bfe6b533 100644 --- a/source/blender/editors/space_graph/space_graph.c +++ b/source/blender/editors/space_graph/space_graph.c @@ -119,7 +119,7 @@ static SpaceLink *graph_new(const bContext *C) ar->alignment = RGN_ALIGN_BOTTOM; /* channels */ - ar = MEM_callocN(sizeof(ARegion), "channels area for graphedit"); + ar = MEM_callocN(sizeof(ARegion), "channels region for graphedit"); BLI_addtail(&sipo->regionbase, ar); ar->regiontype = RGN_TYPE_CHANNELS; @@ -128,15 +128,15 @@ static SpaceLink *graph_new(const bContext *C) ar->v2d.scroll = (V2D_SCROLL_RIGHT | V2D_SCROLL_BOTTOM); /* ui buttons */ - ar = MEM_callocN(sizeof(ARegion), "buttons area for graphedit"); + ar = MEM_callocN(sizeof(ARegion), "buttons region for graphedit"); BLI_addtail(&sipo->regionbase, ar); ar->regiontype = RGN_TYPE_UI; ar->alignment = RGN_ALIGN_RIGHT; ar->flag = RGN_FLAG_HIDDEN; - /* main area */ - ar = MEM_callocN(sizeof(ARegion), "main area for graphedit"); + /* main region */ + ar = MEM_callocN(sizeof(ARegion), "main region for graphedit"); BLI_addtail(&sipo->regionbase, ar); ar->regiontype = RGN_TYPE_WINDOW; @@ -208,7 +208,7 @@ static SpaceLink *graph_duplicate(SpaceLink *sl) } /* add handlers, stuff you only do once or on area/region changes */ -static void graph_main_area_init(wmWindowManager *wm, ARegion *ar) +static void graph_main_region_init(wmWindowManager *wm, ARegion *ar) { wmKeyMap *keymap; @@ -221,7 +221,7 @@ static void graph_main_area_init(wmWindowManager *wm, ARegion *ar) WM_event_add_keymap_handler(&ar->handlers, keymap); } -static void graph_main_area_draw(const bContext *C, ARegion *ar) +static void graph_main_region_draw(const bContext *C, ARegion *ar) { /* draw entirely, view changes should be handled here */ SpaceIpo *sipo = CTX_wm_space_graph(C); @@ -340,7 +340,7 @@ static void graph_main_area_draw(const bContext *C, ARegion *ar) UI_view2d_scrollers_free(scrollers); } -static void graph_channel_area_init(wmWindowManager *wm, ARegion *ar) +static void graph_channel_region_init(wmWindowManager *wm, ARegion *ar) { wmKeyMap *keymap; @@ -359,7 +359,7 @@ static void graph_channel_area_init(wmWindowManager *wm, ARegion *ar) WM_event_add_keymap_handler(&ar->handlers, keymap); } -static void graph_channel_area_draw(const bContext *C, ARegion *ar) +static void graph_channel_region_draw(const bContext *C, ARegion *ar) { bAnimContext ac; View2D *v2d = &ar->v2d; @@ -388,18 +388,18 @@ static void graph_channel_area_draw(const bContext *C, ARegion *ar) } /* add handlers, stuff you only do once or on area/region changes */ -static void graph_header_area_init(wmWindowManager *UNUSED(wm), ARegion *ar) +static void graph_header_region_init(wmWindowManager *UNUSED(wm), ARegion *ar) { ED_region_header_init(ar); } -static void graph_header_area_draw(const bContext *C, ARegion *ar) +static void graph_header_region_draw(const bContext *C, ARegion *ar) { ED_region_header(C, ar); } /* add handlers, stuff you only do once or on area/region changes */ -static void graph_buttons_area_init(wmWindowManager *wm, ARegion *ar) +static void graph_buttons_region_init(wmWindowManager *wm, ARegion *ar) { wmKeyMap *keymap; @@ -409,7 +409,7 @@ static void graph_buttons_area_init(wmWindowManager *wm, ARegion *ar) WM_event_add_keymap_handler_bb(&ar->handlers, keymap, &ar->v2d.mask, &ar->winrct); } -static void graph_buttons_area_draw(const bContext *C, ARegion *ar) +static void graph_buttons_region_draw(const bContext *C, ARegion *ar) { ED_region_panels(C, ar, NULL, -1, true); } @@ -659,8 +659,8 @@ void ED_spacetype_ipo(void) /* regions: main window */ art = MEM_callocN(sizeof(ARegionType), "spacetype graphedit region"); art->regionid = RGN_TYPE_WINDOW; - art->init = graph_main_area_init; - art->draw = graph_main_area_draw; + art->init = graph_main_region_init; + art->draw = graph_main_region_draw; art->listener = graph_region_listener; art->keymapflag = ED_KEYMAP_VIEW2D | ED_KEYMAP_MARKERS | ED_KEYMAP_ANIMATION | ED_KEYMAP_FRAMES; @@ -672,8 +672,8 @@ void ED_spacetype_ipo(void) art->prefsizey = HEADERY; art->keymapflag = ED_KEYMAP_UI | ED_KEYMAP_VIEW2D | ED_KEYMAP_FRAMES | ED_KEYMAP_HEADER; art->listener = graph_region_listener; - art->init = graph_header_area_init; - art->draw = graph_header_area_draw; + art->init = graph_header_region_init; + art->draw = graph_header_region_draw; BLI_addhead(&st->regiontypes, art); @@ -683,8 +683,8 @@ void ED_spacetype_ipo(void) art->prefsizex = 200 + V2D_SCROLL_WIDTH; /* 200 is the 'standard', but due to scrollers, we want a bit more to fit the lock icons in */ art->keymapflag = ED_KEYMAP_UI | ED_KEYMAP_VIEW2D | ED_KEYMAP_FRAMES; art->listener = graph_region_listener; - art->init = graph_channel_area_init; - art->draw = graph_channel_area_draw; + art->init = graph_channel_region_init; + art->draw = graph_channel_region_draw; BLI_addhead(&st->regiontypes, art); @@ -694,8 +694,8 @@ void ED_spacetype_ipo(void) art->prefsizex = 200; art->keymapflag = ED_KEYMAP_UI | ED_KEYMAP_FRAMES; art->listener = graph_region_listener; - art->init = graph_buttons_area_init; - art->draw = graph_buttons_area_draw; + art->init = graph_buttons_region_init; + art->draw = graph_buttons_region_draw; BLI_addhead(&st->regiontypes, art); diff --git a/source/blender/editors/space_image/image_buttons.c b/source/blender/editors/space_image/image_buttons.c index 80d6858ea86..ffd801d2146 100644 --- a/source/blender/editors/space_image/image_buttons.c +++ b/source/blender/editors/space_image/image_buttons.c @@ -150,7 +150,7 @@ struct ImageUser *ntree_get_active_iuser(bNodeTree *ntree) /* 0: disable preview * otherwise refresh preview * - * XXX if you put this back, also check XXX in image_main_area_draw() */ + * XXX if you put this back, also check XXX in image_main_region_draw() */ * / void image_preview_event(int event) { diff --git a/source/blender/editors/space_image/image_draw.c b/source/blender/editors/space_image/image_draw.c index 35a53afa550..d36ab5e10e2 100644 --- a/source/blender/editors/space_image/image_draw.c +++ b/source/blender/editors/space_image/image_draw.c @@ -816,7 +816,7 @@ static void draw_image_paint_helpers(const bContext *C, ARegion *ar, Scene *scen } } -/* draw main image area */ +/* draw main image region */ void draw_image_main(const bContext *C, ARegion *ar) { diff --git a/source/blender/editors/space_image/image_intern.h b/source/blender/editors/space_image/image_intern.h index 6eaad302180..3b57d17f9f3 100644 --- a/source/blender/editors/space_image/image_intern.h +++ b/source/blender/editors/space_image/image_intern.h @@ -54,7 +54,7 @@ void draw_image_grease_pencil(struct bContext *C, bool onlyv2d); void draw_image_sample_line(struct SpaceImage *sima); /* image_ops.c */ -int space_image_main_area_poll(struct bContext *C); +int space_image_main_region_poll(struct bContext *C); void IMAGE_OT_view_all(struct wmOperatorType *ot); void IMAGE_OT_view_pan(struct wmOperatorType *ot); diff --git a/source/blender/editors/space_image/image_ops.c b/source/blender/editors/space_image/image_ops.c index 9a4a3b24e24..1d11e7c6287 100644 --- a/source/blender/editors/space_image/image_ops.c +++ b/source/blender/editors/space_image/image_ops.c @@ -230,7 +230,7 @@ static int space_image_poll(bContext *C) } #endif -int space_image_main_area_poll(bContext *C) +int space_image_main_region_poll(bContext *C) { SpaceImage *sima = CTX_wm_space_image(C); /* XXX ARegion *ar = CTX_wm_region(C); */ @@ -270,7 +270,7 @@ static int image_sample_poll(bContext *C) return false; } - return space_image_main_area_poll(C); + return space_image_main_region_poll(C); } else { return false; @@ -401,7 +401,7 @@ void IMAGE_OT_view_pan(wmOperatorType *ot) ot->invoke = image_view_pan_invoke; ot->modal = image_view_pan_modal; ot->cancel = image_view_pan_cancel; - ot->poll = space_image_main_area_poll; + ot->poll = space_image_main_region_poll; /* flags */ ot->flag = OPTYPE_BLOCKING | OPTYPE_GRAB_CURSOR | OPTYPE_LOCK_BYPASS; @@ -617,7 +617,7 @@ void IMAGE_OT_view_zoom(wmOperatorType *ot) ot->invoke = image_view_zoom_invoke; ot->modal = image_view_zoom_modal; ot->cancel = image_view_zoom_cancel; - ot->poll = space_image_main_area_poll; + ot->poll = space_image_main_region_poll; /* flags */ ot->flag = OPTYPE_BLOCKING | OPTYPE_GRAB_CURSOR | OPTYPE_LOCK_BYPASS; @@ -672,7 +672,7 @@ void IMAGE_OT_view_ndof(wmOperatorType *ot) /* api callbacks */ ot->invoke = image_view_ndof_invoke; - ot->poll = space_image_main_area_poll; + ot->poll = space_image_main_region_poll; /* flags */ ot->flag = OPTYPE_LOCK_BYPASS; @@ -744,7 +744,7 @@ void IMAGE_OT_view_all(wmOperatorType *ot) /* api callbacks */ ot->exec = image_view_all_exec; - ot->poll = space_image_main_area_poll; + ot->poll = space_image_main_region_poll; /* flags */ ot->flag = OPTYPE_LOCK_BYPASS; @@ -808,7 +808,7 @@ static int image_view_selected_exec(bContext *C, wmOperator *UNUSED(op)) static int image_view_selected_poll(bContext *C) { - return (space_image_main_area_poll(C) && (ED_operator_uvedit(C) || ED_operator_mask(C))); + return (space_image_main_region_poll(C) && (ED_operator_uvedit(C) || ED_operator_mask(C))); } void IMAGE_OT_view_selected(wmOperatorType *ot) @@ -863,7 +863,7 @@ void IMAGE_OT_view_zoom_in(wmOperatorType *ot) /* api callbacks */ ot->invoke = image_view_zoom_in_invoke; ot->exec = image_view_zoom_in_exec; - ot->poll = space_image_main_area_poll; + ot->poll = space_image_main_region_poll; /* flags */ ot->flag = OPTYPE_LOCK_BYPASS; @@ -912,7 +912,7 @@ void IMAGE_OT_view_zoom_out(wmOperatorType *ot) /* api callbacks */ ot->invoke = image_view_zoom_out_invoke; ot->exec = image_view_zoom_out_exec; - ot->poll = space_image_main_area_poll; + ot->poll = space_image_main_region_poll; /* flags */ ot->flag = OPTYPE_LOCK_BYPASS; @@ -959,7 +959,7 @@ void IMAGE_OT_view_zoom_ratio(wmOperatorType *ot) /* api callbacks */ ot->exec = image_view_zoom_ratio_exec; - ot->poll = space_image_main_area_poll; + ot->poll = space_image_main_region_poll; /* flags */ ot->flag = OPTYPE_LOCK_BYPASS; @@ -3079,7 +3079,7 @@ void IMAGE_OT_sample_line(wmOperatorType *ot) ot->invoke = image_sample_line_invoke; ot->modal = WM_gesture_straightline_modal; ot->exec = image_sample_line_exec; - ot->poll = space_image_main_area_poll; + ot->poll = space_image_main_region_poll; ot->cancel = WM_gesture_straightline_cancel; /* flags */ @@ -3322,7 +3322,7 @@ static int change_frame_poll(bContext *C) if (G.is_rendering) return 0; - return space_image_main_area_poll(C); + return space_image_main_region_poll(C); } static void change_frame_apply(bContext *C, wmOperator *op) @@ -3455,7 +3455,7 @@ void IMAGE_OT_read_renderlayers(wmOperatorType *ot) ot->idname = "IMAGE_OT_read_renderlayers"; ot->description = "Read all the current scene's render layers from cache, as needed"; - ot->poll = space_image_main_area_poll; + ot->poll = space_image_main_region_poll; ot->exec = image_read_renderlayers_exec; /* flags */ diff --git a/source/blender/editors/space_image/space_image.c b/source/blender/editors/space_image/space_image.c index 97e3390f142..93c446ab3cb 100644 --- a/source/blender/editors/space_image/space_image.c +++ b/source/blender/editors/space_image/space_image.c @@ -582,7 +582,7 @@ static int image_context(const bContext *C, const char *member, bContextDataResu /************************** main region ***************************/ /* sets up the fields of the View2D from zoom and offset */ -static void image_main_area_set_view2d(SpaceImage *sima, ARegion *ar) +static void image_main_region_set_view2d(SpaceImage *sima, ARegion *ar) { Image *ima = ED_space_image(sima); float x1, y1, w, h; @@ -635,7 +635,7 @@ static void image_main_area_set_view2d(SpaceImage *sima, ARegion *ar) } /* add handlers, stuff you only do once or on area/region changes */ -static void image_main_area_init(wmWindowManager *wm, ARegion *ar) +static void image_main_region_init(wmWindowManager *wm, ARegion *ar) { wmKeyMap *keymap; @@ -670,7 +670,7 @@ static void image_main_area_init(wmWindowManager *wm, ARegion *ar) } -static void image_main_area_draw(const bContext *C, ARegion *ar) +static void image_main_region_draw(const bContext *C, ARegion *ar) { /* draw entirely, view changes should be handled here */ SpaceImage *sima = CTX_wm_space_image(C); @@ -704,7 +704,7 @@ static void image_main_area_draw(const bContext *C, ARegion *ar) sima->iuser.scene = scene; /* we set view2d from own zoom and offset each time */ - image_main_area_set_view2d(sima, ar); + image_main_region_set_view2d(sima, ar); /* we draw image in pixelspace */ draw_image_main(C, ar); @@ -793,7 +793,7 @@ static void image_main_area_draw(const bContext *C, ARegion *ar) #endif } -static void image_main_area_listener(bScreen *UNUSED(sc), ScrArea *sa, ARegion *ar, wmNotifier *wmn) +static void image_main_region_listener(bScreen *UNUSED(sc), ScrArea *sa, ARegion *ar, wmNotifier *wmn) { /* context changes */ switch (wmn->category) { @@ -821,7 +821,7 @@ static void image_main_area_listener(bScreen *UNUSED(sc), ScrArea *sa, ARegion * /* *********************** buttons region ************************ */ /* add handlers, stuff you only do once or on area/region changes */ -static void image_buttons_area_init(wmWindowManager *wm, ARegion *ar) +static void image_buttons_region_init(wmWindowManager *wm, ARegion *ar) { wmKeyMap *keymap; @@ -832,12 +832,12 @@ static void image_buttons_area_init(wmWindowManager *wm, ARegion *ar) WM_event_add_keymap_handler(&ar->handlers, keymap); } -static void image_buttons_area_draw(const bContext *C, ARegion *ar) +static void image_buttons_region_draw(const bContext *C, ARegion *ar) { ED_region_panels(C, ar, NULL, -1, true); } -static void image_buttons_area_listener(bScreen *UNUSED(sc), ScrArea *UNUSED(sa), ARegion *ar, wmNotifier *wmn) +static void image_buttons_region_listener(bScreen *UNUSED(sc), ScrArea *UNUSED(sa), ARegion *ar, wmNotifier *wmn) { /* context changes */ switch (wmn->category) { @@ -873,7 +873,7 @@ static void image_buttons_area_listener(bScreen *UNUSED(sc), ScrArea *UNUSED(sa) /* *********************** scopes region ************************ */ /* add handlers, stuff you only do once or on area/region changes */ -static void image_tools_area_init(wmWindowManager *wm, ARegion *ar) +static void image_tools_region_init(wmWindowManager *wm, ARegion *ar) { wmKeyMap *keymap; @@ -884,7 +884,7 @@ static void image_tools_area_init(wmWindowManager *wm, ARegion *ar) WM_event_add_keymap_handler(&ar->handlers, keymap); } -static void image_tools_area_draw(const bContext *C, ARegion *ar) +static void image_tools_region_draw(const bContext *C, ARegion *ar) { SpaceImage *sima = CTX_wm_space_image(C); Scene *scene = CTX_data_scene(C); @@ -910,7 +910,7 @@ static void image_tools_area_draw(const bContext *C, ARegion *ar) ED_region_panels(C, ar, NULL, -1, true); } -static void image_tools_area_listener(bScreen *UNUSED(sc), ScrArea *UNUSED(sa), ARegion *ar, wmNotifier *wmn) +static void image_tools_region_listener(bScreen *UNUSED(sc), ScrArea *UNUSED(sa), ARegion *ar, wmNotifier *wmn) { /* context changes */ switch (wmn->category) { @@ -946,17 +946,17 @@ static void image_tools_area_listener(bScreen *UNUSED(sc), ScrArea *UNUSED(sa), /************************* header region **************************/ /* add handlers, stuff you only do once or on area/region changes */ -static void image_header_area_init(wmWindowManager *UNUSED(wm), ARegion *ar) +static void image_header_region_init(wmWindowManager *UNUSED(wm), ARegion *ar) { ED_region_header_init(ar); } -static void image_header_area_draw(const bContext *C, ARegion *ar) +static void image_header_region_draw(const bContext *C, ARegion *ar) { ED_region_header(C, ar); } -static void image_header_area_listener(bScreen *UNUSED(sc), ScrArea *UNUSED(sa), ARegion *ar, wmNotifier *wmn) +static void image_header_region_listener(bScreen *UNUSED(sc), ScrArea *UNUSED(sa), ARegion *ar, wmNotifier *wmn) { /* context changes */ switch (wmn->category) { @@ -1005,9 +1005,9 @@ void ED_spacetype_image(void) art = MEM_callocN(sizeof(ARegionType), "spacetype image region"); art->regionid = RGN_TYPE_WINDOW; art->keymapflag = ED_KEYMAP_FRAMES | ED_KEYMAP_GPENCIL; - art->init = image_main_area_init; - art->draw = image_main_area_draw; - art->listener = image_main_area_listener; + art->init = image_main_region_init; + art->draw = image_main_region_draw; + art->listener = image_main_region_listener; BLI_addhead(&st->regiontypes, art); @@ -1016,9 +1016,9 @@ void ED_spacetype_image(void) art->regionid = RGN_TYPE_UI; art->prefsizex = 220; // XXX art->keymapflag = ED_KEYMAP_UI | ED_KEYMAP_FRAMES; - art->listener = image_buttons_area_listener; - art->init = image_buttons_area_init; - art->draw = image_buttons_area_draw; + art->listener = image_buttons_region_listener; + art->init = image_buttons_region_init; + art->draw = image_buttons_region_draw; BLI_addhead(&st->regiontypes, art); ED_uvedit_buttons_register(art); @@ -1029,9 +1029,9 @@ void ED_spacetype_image(void) art->regionid = RGN_TYPE_TOOLS; art->prefsizex = 220; // XXX art->keymapflag = ED_KEYMAP_UI | ED_KEYMAP_FRAMES; - art->listener = image_tools_area_listener; - art->init = image_tools_area_init; - art->draw = image_tools_area_draw; + art->listener = image_tools_region_listener; + art->init = image_tools_region_init; + art->draw = image_tools_region_draw; BLI_addhead(&st->regiontypes, art); /* regions: header */ @@ -1039,9 +1039,9 @@ void ED_spacetype_image(void) art->regionid = RGN_TYPE_HEADER; art->prefsizey = HEADERY; art->keymapflag = ED_KEYMAP_UI | ED_KEYMAP_VIEW2D | ED_KEYMAP_FRAMES | ED_KEYMAP_HEADER; - art->listener = image_header_area_listener; - art->init = image_header_area_init; - art->draw = image_header_area_draw; + art->listener = image_header_region_listener; + art->init = image_header_region_init; + art->draw = image_header_region_draw; BLI_addhead(&st->regiontypes, art); diff --git a/source/blender/editors/space_info/space_info.c b/source/blender/editors/space_info/space_info.c index aeab87e6cb5..21777fd8afa 100644 --- a/source/blender/editors/space_info/space_info.c +++ b/source/blender/editors/space_info/space_info.c @@ -77,8 +77,8 @@ static SpaceLink *info_new(const bContext *UNUSED(C)) ar->regiontype = RGN_TYPE_HEADER; ar->alignment = RGN_ALIGN_BOTTOM; - /* main area */ - ar = MEM_callocN(sizeof(ARegion), "main area for info"); + /* main region */ + ar = MEM_callocN(sizeof(ARegion), "main region for info"); BLI_addtail(&sinfo->regionbase, ar); ar->regiontype = RGN_TYPE_WINDOW; @@ -123,7 +123,7 @@ static SpaceLink *info_duplicate(SpaceLink *sl) /* add handlers, stuff you only do once or on area/region changes */ -static void info_main_area_init(wmWindowManager *wm, ARegion *ar) +static void info_main_region_init(wmWindowManager *wm, ARegion *ar) { wmKeyMap *keymap; @@ -145,7 +145,7 @@ static void info_textview_update_rect(const bContext *C, ARegion *ar) UI_view2d_totRect_set(v2d, ar->winx - 1, info_textview_height(sinfo, ar, CTX_wm_reports(C))); } -static void info_main_area_draw(const bContext *C, ARegion *ar) +static void info_main_region_draw(const bContext *C, ARegion *ar) { /* draw entirely, view changes should be handled here */ SpaceInfo *sinfo = CTX_wm_space_info(C); @@ -226,17 +226,17 @@ static void info_keymap(struct wmKeyConfig *keyconf) } /* add handlers, stuff you only do once or on area/region changes */ -static void info_header_area_init(wmWindowManager *UNUSED(wm), ARegion *ar) +static void info_header_region_init(wmWindowManager *UNUSED(wm), ARegion *ar) { ED_region_header_init(ar); } -static void info_header_area_draw(const bContext *C, ARegion *ar) +static void info_header_region_draw(const bContext *C, ARegion *ar) { ED_region_header(C, ar); } -static void info_main_area_listener(bScreen *UNUSED(sc), ScrArea *UNUSED(sa), ARegion *ar, wmNotifier *wmn) +static void info_main_region_listener(bScreen *UNUSED(sc), ScrArea *UNUSED(sa), ARegion *ar, wmNotifier *wmn) { // SpaceInfo *sinfo = sa->spacedata.first; @@ -329,9 +329,9 @@ void ED_spacetype_info(void) art->regionid = RGN_TYPE_WINDOW; art->keymapflag = ED_KEYMAP_UI | ED_KEYMAP_VIEW2D | ED_KEYMAP_FRAMES; - art->init = info_main_area_init; - art->draw = info_main_area_draw; - art->listener = info_main_area_listener; + art->init = info_main_region_init; + art->draw = info_main_region_draw; + art->listener = info_main_region_listener; BLI_addhead(&st->regiontypes, art); @@ -342,8 +342,8 @@ void ED_spacetype_info(void) art->keymapflag = ED_KEYMAP_UI | ED_KEYMAP_VIEW2D | ED_KEYMAP_FRAMES | ED_KEYMAP_HEADER; art->listener = info_header_listener; - art->init = info_header_area_init; - art->draw = info_header_area_draw; + art->init = info_header_region_init; + art->draw = info_header_region_draw; BLI_addhead(&st->regiontypes, art); diff --git a/source/blender/editors/space_logic/space_logic.c b/source/blender/editors/space_logic/space_logic.c index 34a5fee88eb..243a522011b 100644 --- a/source/blender/editors/space_logic/space_logic.c +++ b/source/blender/editors/space_logic/space_logic.c @@ -113,8 +113,8 @@ static SpaceLink *logic_new(const bContext *C) ar->regiontype= RGN_TYPE_UI; ar->alignment= RGN_ALIGN_RIGHT; - /* main area */ - ar= MEM_callocN(sizeof(ARegion), "main area for logic"); + /* main region */ + ar= MEM_callocN(sizeof(ARegion), "main region for logic"); BLI_addtail(&slogic->regionbase, ar); ar->regiontype= RGN_TYPE_WINDOW; @@ -230,7 +230,7 @@ static int logic_context(const bContext *UNUSED(C), const char *UNUSED(member), /* add handlers, stuff you only do once or on area/region changes */ -static void logic_main_area_init(wmWindowManager *wm, ARegion *ar) +static void logic_main_region_init(wmWindowManager *wm, ARegion *ar) { wmKeyMap *keymap; @@ -241,7 +241,7 @@ static void logic_main_area_init(wmWindowManager *wm, ARegion *ar) WM_event_add_keymap_handler(&ar->handlers, keymap); } -static void logic_main_area_draw(const bContext *C, ARegion *ar) +static void logic_main_region_draw(const bContext *C, ARegion *ar) { /* draw entirely, view changes should be handled here */ // SpaceLogic *slogic= CTX_wm_space_logic(C); @@ -270,7 +270,7 @@ static void logic_main_area_draw(const bContext *C, ARegion *ar) /* *********************** buttons region ************************ */ /* add handlers, stuff you only do once or on area/region changes */ -static void logic_buttons_area_init(wmWindowManager *wm, ARegion *ar) +static void logic_buttons_region_init(wmWindowManager *wm, ARegion *ar) { wmKeyMap *keymap; @@ -280,7 +280,7 @@ static void logic_buttons_area_init(wmWindowManager *wm, ARegion *ar) WM_event_add_keymap_handler(&ar->handlers, keymap); } -static void logic_buttons_area_draw(const bContext *C, ARegion *ar) +static void logic_buttons_region_draw(const bContext *C, ARegion *ar) { ED_region_panels(C, ar, NULL, -1, true); } @@ -288,12 +288,12 @@ static void logic_buttons_area_draw(const bContext *C, ARegion *ar) /************************* header region **************************/ /* add handlers, stuff you only do once or on area/region changes */ -static void logic_header_area_init(wmWindowManager *UNUSED(wm), ARegion *ar) +static void logic_header_region_init(wmWindowManager *UNUSED(wm), ARegion *ar) { ED_region_header_init(ar); } -static void logic_header_area_draw(const bContext *C, ARegion *ar) +static void logic_header_region_draw(const bContext *C, ARegion *ar) { ED_region_header(C, ar); } @@ -322,8 +322,8 @@ void ED_spacetype_logic(void) art = MEM_callocN(sizeof(ARegionType), "spacetype logic region"); art->regionid = RGN_TYPE_WINDOW; art->keymapflag = ED_KEYMAP_UI | ED_KEYMAP_FRAMES | ED_KEYMAP_VIEW2D; - art->init = logic_main_area_init; - art->draw = logic_main_area_draw; + art->init = logic_main_region_init; + art->draw = logic_main_region_draw; art->listener = logic_listener; BLI_addhead(&st->regiontypes, art); @@ -334,8 +334,8 @@ void ED_spacetype_logic(void) art->prefsizex= 220; // XXX art->keymapflag = ED_KEYMAP_UI | ED_KEYMAP_FRAMES; art->listener = logic_listener; - art->init = logic_buttons_area_init; - art->draw = logic_buttons_area_draw; + art->init = logic_buttons_region_init; + art->draw = logic_buttons_region_draw; BLI_addhead(&st->regiontypes, art); /* regions: header */ @@ -343,8 +343,8 @@ void ED_spacetype_logic(void) art->regionid = RGN_TYPE_HEADER; art->prefsizey = HEADERY; art->keymapflag = ED_KEYMAP_UI | ED_KEYMAP_VIEW2D | ED_KEYMAP_FRAMES | ED_KEYMAP_HEADER; - art->init = logic_header_area_init; - art->draw = logic_header_area_draw; + art->init = logic_header_region_init; + art->draw = logic_header_region_draw; BLI_addhead(&st->regiontypes, art); diff --git a/source/blender/editors/space_nla/nla_channels.c b/source/blender/editors/space_nla/nla_channels.c index a0ea12b8aa0..9e73e03a664 100644 --- a/source/blender/editors/space_nla/nla_channels.c +++ b/source/blender/editors/space_nla/nla_channels.c @@ -268,7 +268,7 @@ static int mouse_nla_channels(bContext *C, bAnimContext *ac, float x, int channe { AnimData *adt = BKE_animdata_from_id(ale->id); - /* button area... */ + /* button region... */ if (x >= (v2d->cur.xmax - NLACHANNEL_BUTTON_WIDTH)) { if (nlaedit_is_tweakmode_on(ac) == 0) { /* 'push-down' action - only usable when not in TweakMode */ diff --git a/source/blender/editors/space_nla/space_nla.c b/source/blender/editors/space_nla/space_nla.c index 9fc7b5d6f8f..e2b36c5b5ae 100644 --- a/source/blender/editors/space_nla/space_nla.c +++ b/source/blender/editors/space_nla/space_nla.c @@ -125,15 +125,15 @@ static SpaceLink *nla_new(const bContext *C) ar->v2d.flag = V2D_VIEWSYNC_AREA_VERTICAL; /* ui buttons */ - ar = MEM_callocN(sizeof(ARegion), "buttons area for nla"); + ar = MEM_callocN(sizeof(ARegion), "buttons region for nla"); BLI_addtail(&snla->regionbase, ar); ar->regiontype = RGN_TYPE_UI; ar->alignment = RGN_ALIGN_RIGHT; ar->flag = RGN_FLAG_HIDDEN; - /* main area */ - ar = MEM_callocN(sizeof(ARegion), "main area for nla"); + /* main region */ + ar = MEM_callocN(sizeof(ARegion), "main region for nla"); BLI_addtail(&snla->regionbase, ar); ar->regiontype = RGN_TYPE_WINDOW; @@ -200,7 +200,7 @@ static SpaceLink *nla_duplicate(SpaceLink *sl) } /* add handlers, stuff you only do once or on area/region changes */ -static void nla_channel_area_init(wmWindowManager *wm, ARegion *ar) +static void nla_channel_region_init(wmWindowManager *wm, ARegion *ar) { wmKeyMap *keymap; @@ -222,7 +222,7 @@ static void nla_channel_area_init(wmWindowManager *wm, ARegion *ar) } /* draw entirely, view changes should be handled here */ -static void nla_channel_area_draw(const bContext *C, ARegion *ar) +static void nla_channel_region_draw(const bContext *C, ARegion *ar) { bAnimContext ac; View2D *v2d = &ar->v2d; @@ -250,7 +250,7 @@ static void nla_channel_area_draw(const bContext *C, ARegion *ar) /* add handlers, stuff you only do once or on area/region changes */ -static void nla_main_area_init(wmWindowManager *wm, ARegion *ar) +static void nla_main_region_init(wmWindowManager *wm, ARegion *ar) { wmKeyMap *keymap; @@ -263,7 +263,7 @@ static void nla_main_area_init(wmWindowManager *wm, ARegion *ar) WM_event_add_keymap_handler(&ar->handlers, keymap); } -static void nla_main_area_draw(const bContext *C, ARegion *ar) +static void nla_main_region_draw(const bContext *C, ARegion *ar) { /* draw entirely, view changes should be handled here */ SpaceNla *snla = CTX_wm_space_nla(C); @@ -326,18 +326,18 @@ static void nla_main_area_draw(const bContext *C, ARegion *ar) /* add handlers, stuff you only do once or on area/region changes */ -static void nla_header_area_init(wmWindowManager *UNUSED(wm), ARegion *ar) +static void nla_header_region_init(wmWindowManager *UNUSED(wm), ARegion *ar) { ED_region_header_init(ar); } -static void nla_header_area_draw(const bContext *C, ARegion *ar) +static void nla_header_region_draw(const bContext *C, ARegion *ar) { ED_region_header(C, ar); } /* add handlers, stuff you only do once or on area/region changes */ -static void nla_buttons_area_init(wmWindowManager *wm, ARegion *ar) +static void nla_buttons_region_init(wmWindowManager *wm, ARegion *ar) { wmKeyMap *keymap; @@ -347,7 +347,7 @@ static void nla_buttons_area_init(wmWindowManager *wm, ARegion *ar) WM_event_add_keymap_handler_bb(&ar->handlers, keymap, &ar->v2d.mask, &ar->winrct); } -static void nla_buttons_area_draw(const bContext *C, ARegion *ar) +static void nla_buttons_region_draw(const bContext *C, ARegion *ar) { ED_region_panels(C, ar, NULL, -1, true); } @@ -385,7 +385,7 @@ static void nla_region_listener(bScreen *UNUSED(sc), ScrArea *UNUSED(sa), ARegio } -static void nla_main_area_listener(bScreen *UNUSED(sc), ScrArea *UNUSED(sa), ARegion *ar, wmNotifier *wmn) +static void nla_main_region_listener(bScreen *UNUSED(sc), ScrArea *UNUSED(sa), ARegion *ar, wmNotifier *wmn) { /* context changes */ switch (wmn->category) { @@ -430,7 +430,7 @@ static void nla_main_area_listener(bScreen *UNUSED(sc), ScrArea *UNUSED(sa), ARe } } -static void nla_channel_area_listener(bScreen *UNUSED(sc), ScrArea *UNUSED(sa), ARegion *ar, wmNotifier *wmn) +static void nla_channel_region_listener(bScreen *UNUSED(sc), ScrArea *UNUSED(sa), ARegion *ar, wmNotifier *wmn) { /* context changes */ switch (wmn->category) { @@ -521,9 +521,9 @@ void ED_spacetype_nla(void) /* regions: main window */ art = MEM_callocN(sizeof(ARegionType), "spacetype nla region"); art->regionid = RGN_TYPE_WINDOW; - art->init = nla_main_area_init; - art->draw = nla_main_area_draw; - art->listener = nla_main_area_listener; + art->init = nla_main_region_init; + art->draw = nla_main_region_draw; + art->listener = nla_main_region_listener; art->keymapflag = ED_KEYMAP_VIEW2D | ED_KEYMAP_MARKERS | ED_KEYMAP_ANIMATION | ED_KEYMAP_FRAMES; BLI_addhead(&st->regiontypes, art); @@ -534,8 +534,8 @@ void ED_spacetype_nla(void) art->prefsizey = HEADERY; art->keymapflag = ED_KEYMAP_UI | ED_KEYMAP_VIEW2D | ED_KEYMAP_FRAMES | ED_KEYMAP_HEADER; - art->init = nla_header_area_init; - art->draw = nla_header_area_draw; + art->init = nla_header_region_init; + art->draw = nla_header_region_draw; BLI_addhead(&st->regiontypes, art); @@ -545,9 +545,9 @@ void ED_spacetype_nla(void) art->prefsizex = 200; art->keymapflag = ED_KEYMAP_UI | ED_KEYMAP_VIEW2D | ED_KEYMAP_FRAMES; - art->init = nla_channel_area_init; - art->draw = nla_channel_area_draw; - art->listener = nla_channel_area_listener; + art->init = nla_channel_region_init; + art->draw = nla_channel_region_draw; + art->listener = nla_channel_region_listener; BLI_addhead(&st->regiontypes, art); @@ -557,8 +557,8 @@ void ED_spacetype_nla(void) art->prefsizex = 200; art->keymapflag = ED_KEYMAP_UI; art->listener = nla_region_listener; - art->init = nla_buttons_area_init; - art->draw = nla_buttons_area_draw; + art->init = nla_buttons_region_init; + art->draw = nla_buttons_region_draw; BLI_addhead(&st->regiontypes, art); diff --git a/source/blender/editors/space_node/node_ops.c b/source/blender/editors/space_node/node_ops.c index 96f0e69ca71..7788173a8ee 100644 --- a/source/blender/editors/space_node/node_ops.c +++ b/source/blender/editors/space_node/node_ops.c @@ -233,7 +233,7 @@ void node_keymap(struct wmKeyConfig *keyconf) WM_keymap_add_item(keymap, "NODE_OT_properties", NKEY, KM_PRESS, 0, 0); WM_keymap_add_item(keymap, "NODE_OT_toolbar", TKEY, KM_PRESS, 0, 0); - /* Main Area only ----------------- */ + /* Main Region only ----------------- */ keymap = WM_keymap_find(keyconf, "Node Editor", SPACE_NODE, 0); /* mouse select in nodes used to be both keys, but perhaps this should be reduced? diff --git a/source/blender/editors/space_node/space_node.c b/source/blender/editors/space_node/space_node.c index b9b925f1829..df484724fc5 100644 --- a/source/blender/editors/space_node/space_node.c +++ b/source/blender/editors/space_node/space_node.c @@ -333,8 +333,8 @@ static SpaceLink *node_new(const bContext *UNUSED(C)) ar->flag = RGN_FLAG_HIDDEN; - /* main area */ - ar = MEM_callocN(sizeof(ARegion), "main area for node"); + /* main region */ + ar = MEM_callocN(sizeof(ARegion), "main region for node"); BLI_addtail(&snode->regionbase, ar); ar->regiontype = RGN_TYPE_WINDOW; @@ -586,7 +586,7 @@ static SpaceLink *node_duplicate(SpaceLink *sl) /* add handlers, stuff you only do once or on area/region changes */ -static void node_buttons_area_init(wmWindowManager *wm, ARegion *ar) +static void node_buttons_region_init(wmWindowManager *wm, ARegion *ar) { wmKeyMap *keymap; @@ -596,13 +596,13 @@ static void node_buttons_area_init(wmWindowManager *wm, ARegion *ar) WM_event_add_keymap_handler(&ar->handlers, keymap); } -static void node_buttons_area_draw(const bContext *C, ARegion *ar) +static void node_buttons_region_draw(const bContext *C, ARegion *ar) { ED_region_panels(C, ar, NULL, -1, true); } /* add handlers, stuff you only do once or on area/region changes */ -static void node_toolbar_area_init(wmWindowManager *wm, ARegion *ar) +static void node_toolbar_region_init(wmWindowManager *wm, ARegion *ar) { wmKeyMap *keymap; @@ -612,7 +612,7 @@ static void node_toolbar_area_init(wmWindowManager *wm, ARegion *ar) WM_event_add_keymap_handler(&ar->handlers, keymap); } -static void node_toolbar_area_draw(const bContext *C, ARegion *ar) +static void node_toolbar_region_draw(const bContext *C, ARegion *ar) { ED_region_panels(C, ar, NULL, -1, true); } @@ -634,8 +634,8 @@ static void node_cursor(wmWindow *win, ScrArea *sa, ARegion *ar) } -/* Initialize main area, setting handlers. */ -static void node_main_area_init(wmWindowManager *wm, ARegion *ar) +/* Initialize main region, setting handlers. */ +static void node_main_region_init(wmWindowManager *wm, ARegion *ar) { wmKeyMap *keymap; ListBase *lb; @@ -655,7 +655,7 @@ static void node_main_area_init(wmWindowManager *wm, ARegion *ar) WM_event_add_dropbox_handler(&ar->handlers, lb); } -static void node_main_area_draw(const bContext *C, ARegion *ar) +static void node_main_region_draw(const bContext *C, ARegion *ar) { drawnodespace(C, ar); } @@ -722,12 +722,12 @@ static void node_dropboxes(void) /* add handlers, stuff you only do once or on area/region changes */ -static void node_header_area_init(wmWindowManager *UNUSED(wm), ARegion *ar) +static void node_header_region_init(wmWindowManager *UNUSED(wm), ARegion *ar) { ED_region_header_init(ar); } -static void node_header_area_draw(const bContext *C, ARegion *ar) +static void node_header_region_draw(const bContext *C, ARegion *ar) { /* find and set the context */ snode_set_context(C); @@ -735,7 +735,7 @@ static void node_header_area_draw(const bContext *C, ARegion *ar) ED_region_header(C, ar); } -/* used for header + main area */ +/* used for header + main region */ static void node_region_listener(bScreen *UNUSED(sc), ScrArea *UNUSED(sa), ARegion *ar, wmNotifier *wmn) { /* context changes */ @@ -844,8 +844,8 @@ void ED_spacetype_node(void) /* regions: main window */ art = MEM_callocN(sizeof(ARegionType), "spacetype node region"); art->regionid = RGN_TYPE_WINDOW; - art->init = node_main_area_init; - art->draw = node_main_area_draw; + art->init = node_main_region_init; + art->draw = node_main_region_draw; art->listener = node_region_listener; art->cursor = node_cursor; art->event_cursor = true; @@ -859,8 +859,8 @@ void ED_spacetype_node(void) art->prefsizey = HEADERY; art->keymapflag = ED_KEYMAP_UI | ED_KEYMAP_VIEW2D | ED_KEYMAP_FRAMES | ED_KEYMAP_HEADER; art->listener = node_region_listener; - art->init = node_header_area_init; - art->draw = node_header_area_draw; + art->init = node_header_region_init; + art->draw = node_header_region_draw; BLI_addhead(&st->regiontypes, art); @@ -870,8 +870,8 @@ void ED_spacetype_node(void) art->prefsizex = 180; // XXX art->keymapflag = ED_KEYMAP_UI | ED_KEYMAP_FRAMES; art->listener = node_region_listener; - art->init = node_buttons_area_init; - art->draw = node_buttons_area_draw; + art->init = node_buttons_region_init; + art->draw = node_buttons_region_draw; BLI_addhead(&st->regiontypes, art); node_buttons_register(art); @@ -883,8 +883,8 @@ void ED_spacetype_node(void) art->prefsizey = 50; /* XXX */ art->keymapflag = ED_KEYMAP_UI | ED_KEYMAP_FRAMES; art->listener = node_region_listener; - art->init = node_toolbar_area_init; - art->draw = node_toolbar_area_draw; + art->init = node_toolbar_region_init; + art->draw = node_toolbar_region_draw; BLI_addhead(&st->regiontypes, art); node_toolbar_register(art); diff --git a/source/blender/editors/space_outliner/outliner_select.c b/source/blender/editors/space_outliner/outliner_select.c index 02511917b29..84f8c629c5d 100644 --- a/source/blender/editors/space_outliner/outliner_select.c +++ b/source/blender/editors/space_outliner/outliner_select.c @@ -315,7 +315,7 @@ static eOLDrawState tree_element_active_texture( /*tselem = TREESTORE(te);*/ /*UNUSED*/ - /* find buttons area (note, this is undefined really still, needs recode in blender) */ + /* find buttons region (note, this is undefined really still, needs recode in blender) */ /* XXX removed finding sbuts */ /* where is texture linked to? */ diff --git a/source/blender/editors/space_outliner/space_outliner.c b/source/blender/editors/space_outliner/space_outliner.c index 7b1ec174a6b..1dd66366e5d 100644 --- a/source/blender/editors/space_outliner/space_outliner.c +++ b/source/blender/editors/space_outliner/space_outliner.c @@ -62,7 +62,7 @@ #include "outliner_intern.h" -static void outliner_main_area_init(wmWindowManager *wm, ARegion *ar) +static void outliner_main_region_init(wmWindowManager *wm, ARegion *ar) { ListBase *lb; wmKeyMap *keymap; @@ -266,7 +266,7 @@ static void outliner_dropboxes(void) WM_dropbox_add(lb, "OUTLINER_OT_group_link", outliner_group_link_poll, outliner_group_link_copy); } -static void outliner_main_area_draw(const bContext *C, ARegion *ar) +static void outliner_main_region_draw(const bContext *C, ARegion *ar) { View2D *v2d = &ar->v2d; View2DScrollers *scrollers; @@ -287,12 +287,12 @@ static void outliner_main_area_draw(const bContext *C, ARegion *ar) } -static void outliner_main_area_free(ARegion *UNUSED(ar)) +static void outliner_main_region_free(ARegion *UNUSED(ar)) { } -static void outliner_main_area_listener(bScreen *UNUSED(sc), ScrArea *UNUSED(sa), ARegion *ar, wmNotifier *wmn) +static void outliner_main_region_listener(bScreen *UNUSED(sc), ScrArea *UNUSED(sa), ARegion *ar, wmNotifier *wmn) { /* context changes */ switch (wmn->category) { @@ -399,21 +399,21 @@ static void outliner_main_area_listener(bScreen *UNUSED(sc), ScrArea *UNUSED(sa) /* ************************ header outliner area region *********************** */ /* add handlers, stuff you only do once or on area/region changes */ -static void outliner_header_area_init(wmWindowManager *UNUSED(wm), ARegion *ar) +static void outliner_header_region_init(wmWindowManager *UNUSED(wm), ARegion *ar) { ED_region_header_init(ar); } -static void outliner_header_area_draw(const bContext *C, ARegion *ar) +static void outliner_header_region_draw(const bContext *C, ARegion *ar) { ED_region_header(C, ar); } -static void outliner_header_area_free(ARegion *UNUSED(ar)) +static void outliner_header_region_free(ARegion *UNUSED(ar)) { } -static void outliner_header_area_listener(bScreen *UNUSED(sc), ScrArea *UNUSED(sa), ARegion *ar, wmNotifier *wmn) +static void outliner_header_region_listener(bScreen *UNUSED(sc), ScrArea *UNUSED(sa), ARegion *ar, wmNotifier *wmn) { /* context changes */ switch (wmn->category) { @@ -445,8 +445,8 @@ static SpaceLink *outliner_new(const bContext *UNUSED(C)) ar->regiontype = RGN_TYPE_HEADER; ar->alignment = RGN_ALIGN_BOTTOM; - /* main area */ - ar = MEM_callocN(sizeof(ARegion), "main area for outliner"); + /* main region */ + ar = MEM_callocN(sizeof(ARegion), "main region for outliner"); BLI_addtail(&soutliner->regionbase, ar); ar->regiontype = RGN_TYPE_WINDOW; @@ -508,10 +508,10 @@ void ED_spacetype_outliner(void) art->regionid = RGN_TYPE_WINDOW; art->keymapflag = ED_KEYMAP_UI | ED_KEYMAP_VIEW2D | ED_KEYMAP_FRAMES; - art->init = outliner_main_area_init; - art->draw = outliner_main_area_draw; - art->free = outliner_main_area_free; - art->listener = outliner_main_area_listener; + art->init = outliner_main_region_init; + art->draw = outliner_main_region_draw; + art->free = outliner_main_region_free; + art->listener = outliner_main_region_listener; BLI_addhead(&st->regiontypes, art); /* regions: header */ @@ -520,10 +520,10 @@ void ED_spacetype_outliner(void) art->prefsizey = HEADERY; art->keymapflag = ED_KEYMAP_UI | ED_KEYMAP_VIEW2D | ED_KEYMAP_FRAMES | ED_KEYMAP_HEADER; - art->init = outliner_header_area_init; - art->draw = outliner_header_area_draw; - art->free = outliner_header_area_free; - art->listener = outliner_header_area_listener; + art->init = outliner_header_region_init; + art->draw = outliner_header_region_draw; + art->free = outliner_header_region_free; + art->listener = outliner_header_region_listener; BLI_addhead(&st->regiontypes, art); BKE_spacetype_register(st); diff --git a/source/blender/editors/space_script/space_script.c b/source/blender/editors/space_script/space_script.c index 759dcd3d0a4..4228635ccd6 100644 --- a/source/blender/editors/space_script/space_script.c +++ b/source/blender/editors/space_script/space_script.c @@ -78,8 +78,8 @@ static SpaceLink *script_new(const bContext *UNUSED(C)) ar->regiontype = RGN_TYPE_HEADER; ar->alignment = RGN_ALIGN_BOTTOM; - /* main area */ - ar = MEM_callocN(sizeof(ARegion), "main area for script"); + /* main region */ + ar = MEM_callocN(sizeof(ARegion), "main region for script"); BLI_addtail(&sscript->regionbase, ar); ar->regiontype = RGN_TYPE_WINDOW; @@ -125,7 +125,7 @@ static SpaceLink *script_duplicate(SpaceLink *sl) /* add handlers, stuff you only do once or on area/region changes */ -static void script_main_area_init(wmWindowManager *wm, ARegion *ar) +static void script_main_region_init(wmWindowManager *wm, ARegion *ar) { wmKeyMap *keymap; @@ -136,7 +136,7 @@ static void script_main_area_init(wmWindowManager *wm, ARegion *ar) WM_event_add_keymap_handler_bb(&ar->handlers, keymap, &ar->v2d.mask, &ar->winrct); } -static void script_main_area_draw(const bContext *C, ARegion *ar) +static void script_main_region_draw(const bContext *C, ARegion *ar) { /* draw entirely, view changes should be handled here */ SpaceScript *sscript = (SpaceScript *)CTX_wm_space_data(C); @@ -166,17 +166,17 @@ static void script_main_area_draw(const bContext *C, ARegion *ar) } /* add handlers, stuff you only do once or on area/region changes */ -static void script_header_area_init(wmWindowManager *UNUSED(wm), ARegion *ar) +static void script_header_region_init(wmWindowManager *UNUSED(wm), ARegion *ar) { ED_region_header_init(ar); } -static void script_header_area_draw(const bContext *C, ARegion *ar) +static void script_header_region_draw(const bContext *C, ARegion *ar) { ED_region_header(C, ar); } -static void script_main_area_listener(bScreen *UNUSED(sc), ScrArea *UNUSED(sa), ARegion *UNUSED(ar), wmNotifier *UNUSED(wmn)) +static void script_main_region_listener(bScreen *UNUSED(sc), ScrArea *UNUSED(sa), ARegion *UNUSED(ar), wmNotifier *UNUSED(wmn)) { /* context changes */ // XXX - Todo, need the ScriptSpace accessible to get the python script to run. @@ -202,9 +202,9 @@ void ED_spacetype_script(void) /* regions: main window */ art = MEM_callocN(sizeof(ARegionType), "spacetype script region"); art->regionid = RGN_TYPE_WINDOW; - art->init = script_main_area_init; - art->draw = script_main_area_draw; - art->listener = script_main_area_listener; + art->init = script_main_region_init; + art->draw = script_main_region_draw; + art->listener = script_main_region_listener; art->keymapflag = ED_KEYMAP_VIEW2D | ED_KEYMAP_UI | ED_KEYMAP_FRAMES; // XXX need to further test this ED_KEYMAP_UI is needed for button interaction BLI_addhead(&st->regiontypes, art); @@ -215,8 +215,8 @@ void ED_spacetype_script(void) art->prefsizey = HEADERY; art->keymapflag = ED_KEYMAP_UI | ED_KEYMAP_VIEW2D | ED_KEYMAP_HEADER; - art->init = script_header_area_init; - art->draw = script_header_area_draw; + art->init = script_header_region_init; + art->draw = script_header_region_draw; BLI_addhead(&st->regiontypes, art); diff --git a/source/blender/editors/space_sequencer/space_sequencer.c b/source/blender/editors/space_sequencer/space_sequencer.c index 5b3061bd513..fce40f8ca59 100644 --- a/source/blender/editors/space_sequencer/space_sequencer.c +++ b/source/blender/editors/space_sequencer/space_sequencer.c @@ -136,9 +136,9 @@ static SpaceLink *sequencer_new(const bContext *C) ar->alignment = RGN_ALIGN_RIGHT; ar->flag = RGN_FLAG_HIDDEN; - /* preview area */ + /* preview region */ /* NOTE: if you change values here, also change them in sequencer_init_preview_region */ - ar = MEM_callocN(sizeof(ARegion), "preview area for sequencer"); + ar = MEM_callocN(sizeof(ARegion), "preview region for sequencer"); BLI_addtail(&sseq->regionbase, ar); ar->regiontype = RGN_TYPE_PREVIEW; ar->alignment = RGN_ALIGN_TOP; @@ -160,8 +160,8 @@ static SpaceLink *sequencer_new(const bContext *C) ar->v2d.keeptot = V2D_KEEPTOT_FREE; - /* main area */ - ar = MEM_callocN(sizeof(ARegion), "main area for sequencer"); + /* main region */ + ar = MEM_callocN(sizeof(ARegion), "main region for sequencer"); BLI_addtail(&sseq->regionbase, ar); ar->regiontype = RGN_TYPE_WINDOW; @@ -283,7 +283,7 @@ static void sequencer_refresh(const bContext *C, ScrArea *sa) /* Get available height (without DPI correction). */ const float height = (sa->winy - ED_area_headersize()) / UI_DPI_FAC; - /* We reuse hidden area's size, allows to find same layout as before if we just switch + /* We reuse hidden region's size, allows to find same layout as before if we just switch * between one 'full window' view and the combined one. This gets lost if we switch to both * 'full window' views before, though... Better than nothing. */ if (ar_main->flag & RGN_FLAG_HIDDEN) { @@ -457,7 +457,7 @@ static int sequencer_context(const bContext *C, const char *member, bContextData /* *********************** sequencer (main) region ************************ */ /* add handlers, stuff you only do once or on area/region changes */ -static void sequencer_main_area_init(wmWindowManager *wm, ARegion *ar) +static void sequencer_main_region_init(wmWindowManager *wm, ARegion *ar) { wmKeyMap *keymap; ListBase *lb; @@ -482,13 +482,13 @@ static void sequencer_main_area_init(wmWindowManager *wm, ARegion *ar) WM_event_add_dropbox_handler(&ar->handlers, lb); } -static void sequencer_main_area_draw(const bContext *C, ARegion *ar) +static void sequencer_main_region_draw(const bContext *C, ARegion *ar) { /* NLE - strip editing timeline interface */ draw_timeline_seq(C, ar); } -static void sequencer_main_area_listener(bScreen *UNUSED(sc), ScrArea *UNUSED(sa), ARegion *ar, wmNotifier *wmn) +static void sequencer_main_region_listener(bScreen *UNUSED(sc), ScrArea *UNUSED(sa), ARegion *ar, wmNotifier *wmn) { /* context changes */ switch (wmn->category) { @@ -528,18 +528,18 @@ static void sequencer_main_area_listener(bScreen *UNUSED(sc), ScrArea *UNUSED(sa /* *********************** header region ************************ */ /* add handlers, stuff you only do once or on area/region changes */ -static void sequencer_header_area_init(wmWindowManager *UNUSED(wm), ARegion *ar) +static void sequencer_header_region_init(wmWindowManager *UNUSED(wm), ARegion *ar) { ED_region_header_init(ar); } -static void sequencer_header_area_draw(const bContext *C, ARegion *ar) +static void sequencer_header_region_draw(const bContext *C, ARegion *ar) { ED_region_header(C, ar); } /* *********************** preview region ************************ */ -static void sequencer_preview_area_init(wmWindowManager *wm, ARegion *ar) +static void sequencer_preview_region_init(wmWindowManager *wm, ARegion *ar) { wmKeyMap *keymap; @@ -558,7 +558,7 @@ static void sequencer_preview_area_init(wmWindowManager *wm, ARegion *ar) WM_event_add_keymap_handler_bb(&ar->handlers, keymap, &ar->v2d.mask, &ar->winrct); } -static void sequencer_preview_area_draw(const bContext *C, ARegion *ar) +static void sequencer_preview_region_draw(const bContext *C, ARegion *ar) { ScrArea *sa = CTX_wm_area(C); SpaceSeq *sseq = sa->spacedata.first; @@ -594,7 +594,7 @@ static void sequencer_preview_area_draw(const bContext *C, ARegion *ar) } } -static void sequencer_preview_area_listener(bScreen *UNUSED(sc), ScrArea *UNUSED(sa), ARegion *ar, wmNotifier *wmn) +static void sequencer_preview_region_listener(bScreen *UNUSED(sc), ScrArea *UNUSED(sa), ARegion *ar, wmNotifier *wmn) { /* context changes */ switch (wmn->category) { @@ -645,7 +645,7 @@ static void sequencer_preview_area_listener(bScreen *UNUSED(sc), ScrArea *UNUSED /* *********************** buttons region ************************ */ /* add handlers, stuff you only do once or on area/region changes */ -static void sequencer_buttons_area_init(wmWindowManager *wm, ARegion *ar) +static void sequencer_buttons_region_init(wmWindowManager *wm, ARegion *ar) { wmKeyMap *keymap; @@ -655,12 +655,12 @@ static void sequencer_buttons_area_init(wmWindowManager *wm, ARegion *ar) ED_region_panels_init(wm, ar); } -static void sequencer_buttons_area_draw(const bContext *C, ARegion *ar) +static void sequencer_buttons_region_draw(const bContext *C, ARegion *ar) { ED_region_panels(C, ar, NULL, -1, true); } -static void sequencer_buttons_area_listener(bScreen *UNUSED(sc), ScrArea *UNUSED(sa), ARegion *ar, wmNotifier *wmn) +static void sequencer_buttons_region_listener(bScreen *UNUSED(sc), ScrArea *UNUSED(sa), ARegion *ar, wmNotifier *wmn) { /* context changes */ switch (wmn->category) { @@ -712,9 +712,9 @@ void ED_spacetype_sequencer(void) /* regions: main window */ art = MEM_callocN(sizeof(ARegionType), "spacetype sequencer region"); art->regionid = RGN_TYPE_WINDOW; - art->init = sequencer_main_area_init; - art->draw = sequencer_main_area_draw; - art->listener = sequencer_main_area_listener; + art->init = sequencer_main_region_init; + art->draw = sequencer_main_region_draw; + art->listener = sequencer_main_region_listener; art->keymapflag = ED_KEYMAP_VIEW2D | ED_KEYMAP_MARKERS | ED_KEYMAP_FRAMES | ED_KEYMAP_ANIMATION; BLI_addhead(&st->regiontypes, art); @@ -722,9 +722,9 @@ void ED_spacetype_sequencer(void) /* preview */ art = MEM_callocN(sizeof(ARegionType), "spacetype sequencer region"); art->regionid = RGN_TYPE_PREVIEW; - art->init = sequencer_preview_area_init; - art->draw = sequencer_preview_area_draw; - art->listener = sequencer_preview_area_listener; + art->init = sequencer_preview_region_init; + art->draw = sequencer_preview_region_draw; + art->listener = sequencer_preview_region_listener; art->keymapflag = ED_KEYMAP_VIEW2D | ED_KEYMAP_FRAMES | ED_KEYMAP_GPENCIL; BLI_addhead(&st->regiontypes, art); @@ -733,9 +733,9 @@ void ED_spacetype_sequencer(void) art->regionid = RGN_TYPE_UI; art->prefsizex = 220; // XXX art->keymapflag = ED_KEYMAP_UI | ED_KEYMAP_FRAMES; - art->listener = sequencer_buttons_area_listener; - art->init = sequencer_buttons_area_init; - art->draw = sequencer_buttons_area_draw; + art->listener = sequencer_buttons_region_listener; + art->init = sequencer_buttons_region_init; + art->draw = sequencer_buttons_region_draw; BLI_addhead(&st->regiontypes, art); sequencer_buttons_register(art); @@ -746,9 +746,9 @@ void ED_spacetype_sequencer(void) art->prefsizey = HEADERY; art->keymapflag = ED_KEYMAP_UI | ED_KEYMAP_VIEW2D | ED_KEYMAP_FRAMES | ED_KEYMAP_HEADER; - art->init = sequencer_header_area_init; - art->draw = sequencer_header_area_draw; - art->listener = sequencer_main_area_listener; + art->init = sequencer_header_region_init; + art->draw = sequencer_header_region_draw; + art->listener = sequencer_main_region_listener; BLI_addhead(&st->regiontypes, art); diff --git a/source/blender/editors/space_text/space_text.c b/source/blender/editors/space_text/space_text.c index ff53d306e69..87270bace9a 100644 --- a/source/blender/editors/space_text/space_text.c +++ b/source/blender/editors/space_text/space_text.c @@ -80,8 +80,8 @@ static SpaceLink *text_new(const bContext *UNUSED(C)) ar->regiontype = RGN_TYPE_HEADER; ar->alignment = RGN_ALIGN_BOTTOM; - /* main area */ - ar = MEM_callocN(sizeof(ARegion), "main area for text"); + /* main region */ + ar = MEM_callocN(sizeof(ARegion), "main region for text"); BLI_addtail(&stext->regionbase, ar); ar->regiontype = RGN_TYPE_WINDOW; @@ -404,7 +404,7 @@ static int text_context(const bContext *C, const char *member, bContextDataResul /********************* main region ********************/ /* add handlers, stuff you only do once or on area/region changes */ -static void text_main_area_init(wmWindowManager *wm, ARegion *ar) +static void text_main_region_init(wmWindowManager *wm, ARegion *ar) { wmKeyMap *keymap; ListBase *lb; @@ -423,7 +423,7 @@ static void text_main_area_init(wmWindowManager *wm, ARegion *ar) WM_event_add_dropbox_handler(&ar->handlers, lb); } -static void text_main_area_draw(const bContext *C, ARegion *ar) +static void text_main_region_draw(const bContext *C, ARegion *ar) { /* draw entirely, view changes should be handled here */ SpaceText *st = CTX_wm_space_text(C); @@ -511,12 +511,12 @@ static void text_dropboxes(void) /****************** header region ******************/ /* add handlers, stuff you only do once or on area/region changes */ -static void text_header_area_init(wmWindowManager *UNUSED(wm), ARegion *ar) +static void text_header_region_init(wmWindowManager *UNUSED(wm), ARegion *ar) { ED_region_header_init(ar); } -static void text_header_area_draw(const bContext *C, ARegion *ar) +static void text_header_region_draw(const bContext *C, ARegion *ar) { ED_region_header(C, ar); } @@ -524,7 +524,7 @@ static void text_header_area_draw(const bContext *C, ARegion *ar) /****************** properties region ******************/ /* add handlers, stuff you only do once or on area/region changes */ -static void text_properties_area_init(wmWindowManager *wm, ARegion *ar) +static void text_properties_region_init(wmWindowManager *wm, ARegion *ar) { wmKeyMap *keymap; @@ -537,7 +537,7 @@ static void text_properties_area_init(wmWindowManager *wm, ARegion *ar) } -static void text_properties_area_draw(const bContext *C, ARegion *ar) +static void text_properties_region_draw(const bContext *C, ARegion *ar) { SpaceText *st = CTX_wm_space_text(C); @@ -578,8 +578,8 @@ void ED_spacetype_text(void) /* regions: main window */ art = MEM_callocN(sizeof(ARegionType), "spacetype text region"); art->regionid = RGN_TYPE_WINDOW; - art->init = text_main_area_init; - art->draw = text_main_area_draw; + art->init = text_main_region_init; + art->draw = text_main_region_draw; art->cursor = text_cursor; art->event_cursor = true; @@ -591,8 +591,8 @@ void ED_spacetype_text(void) art->prefsizex = UI_COMPACT_PANEL_WIDTH; art->keymapflag = ED_KEYMAP_UI; - art->init = text_properties_area_init; - art->draw = text_properties_area_draw; + art->init = text_properties_region_init; + art->draw = text_properties_region_draw; BLI_addhead(&st->regiontypes, art); /* regions: header */ @@ -601,8 +601,8 @@ void ED_spacetype_text(void) art->prefsizey = HEADERY; art->keymapflag = ED_KEYMAP_UI | ED_KEYMAP_VIEW2D | ED_KEYMAP_HEADER; - art->init = text_header_area_init; - art->draw = text_header_area_draw; + art->init = text_header_region_init; + art->draw = text_header_region_draw; BLI_addhead(&st->regiontypes, art); diff --git a/source/blender/editors/space_text/text_draw.c b/source/blender/editors/space_text/text_draw.c index 9bcaf04e520..866257af221 100644 --- a/source/blender/editors/space_text/text_draw.c +++ b/source/blender/editors/space_text/text_draw.c @@ -1316,7 +1316,7 @@ static void draw_brackets(SpaceText *st, ARegion *ar) } } -/*********************** main area drawing *************************/ +/*********************** main region drawing *************************/ void draw_text_main(SpaceText *st, ARegion *ar) { diff --git a/source/blender/editors/space_time/space_time.c b/source/blender/editors/space_time/space_time.c index 9ecea7462ff..c5dfc123f39 100644 --- a/source/blender/editors/space_time/space_time.c +++ b/source/blender/editors/space_time/space_time.c @@ -485,7 +485,7 @@ static void time_listener(bScreen *UNUSED(sc), ScrArea *sa, wmNotifier *wmn) /* ---------------- */ /* add handlers, stuff you only do once or on area/region changes */ -static void time_main_area_init(wmWindowManager *wm, ARegion *ar) +static void time_main_region_init(wmWindowManager *wm, ARegion *ar) { wmKeyMap *keymap; @@ -496,7 +496,7 @@ static void time_main_area_init(wmWindowManager *wm, ARegion *ar) WM_event_add_keymap_handler_bb(&ar->handlers, keymap, &ar->v2d.mask, &ar->winrct); } -static void time_main_area_draw(const bContext *C, ARegion *ar) +static void time_main_region_draw(const bContext *C, ARegion *ar) { /* draw entirely, view changes should be handled here */ Scene *scene = CTX_data_scene(C); @@ -555,7 +555,7 @@ static void time_main_area_draw(const bContext *C, ARegion *ar) UI_view2d_scrollers_free(scrollers); } -static void time_main_area_listener(bScreen *UNUSED(sc), ScrArea *UNUSED(sa), ARegion *ar, wmNotifier *wmn) +static void time_main_region_listener(bScreen *UNUSED(sc), ScrArea *UNUSED(sa), ARegion *ar, wmNotifier *wmn) { /* context changes */ switch (wmn->category) { @@ -586,17 +586,17 @@ static void time_main_area_listener(bScreen *UNUSED(sc), ScrArea *UNUSED(sa), AR /* ************************ header time area region *********************** */ /* add handlers, stuff you only do once or on area/region changes */ -static void time_header_area_init(wmWindowManager *UNUSED(wm), ARegion *ar) +static void time_header_region_init(wmWindowManager *UNUSED(wm), ARegion *ar) { ED_region_header_init(ar); } -static void time_header_area_draw(const bContext *C, ARegion *ar) +static void time_header_region_draw(const bContext *C, ARegion *ar) { ED_region_header(C, ar); } -static void time_header_area_listener(bScreen *UNUSED(sc), ScrArea *UNUSED(sa), ARegion *ar, wmNotifier *wmn) +static void time_header_region_listener(bScreen *UNUSED(sc), ScrArea *UNUSED(sa), ARegion *ar, wmNotifier *wmn) { /* context changes */ switch (wmn->category) { @@ -649,8 +649,8 @@ static SpaceLink *time_new(const bContext *C) ar->regiontype = RGN_TYPE_HEADER; ar->alignment = RGN_ALIGN_BOTTOM; - /* main area */ - ar = MEM_callocN(sizeof(ARegion), "main area for time"); + /* main region */ + ar = MEM_callocN(sizeof(ARegion), "main region for time"); BLI_addtail(&stime->regionbase, ar); ar->regiontype = RGN_TYPE_WINDOW; @@ -737,9 +737,9 @@ void ED_spacetype_time(void) art->regionid = RGN_TYPE_WINDOW; art->keymapflag = ED_KEYMAP_VIEW2D | ED_KEYMAP_MARKERS | ED_KEYMAP_ANIMATION | ED_KEYMAP_FRAMES; - art->init = time_main_area_init; - art->draw = time_main_area_draw; - art->listener = time_main_area_listener; + art->init = time_main_region_init; + art->draw = time_main_region_draw; + art->listener = time_main_region_listener; art->keymap = time_keymap; BLI_addhead(&st->regiontypes, art); @@ -749,9 +749,9 @@ void ED_spacetype_time(void) art->prefsizey = HEADERY; art->keymapflag = ED_KEYMAP_UI | ED_KEYMAP_VIEW2D | ED_KEYMAP_FRAMES | ED_KEYMAP_HEADER; - art->init = time_header_area_init; - art->draw = time_header_area_draw; - art->listener = time_header_area_listener; + art->init = time_header_region_init; + art->draw = time_header_region_draw; + art->listener = time_header_region_listener; BLI_addhead(&st->regiontypes, art); BKE_spacetype_register(st); diff --git a/source/blender/editors/space_userpref/space_userpref.c b/source/blender/editors/space_userpref/space_userpref.c index b5a6821d147..aeba4a86f3e 100644 --- a/source/blender/editors/space_userpref/space_userpref.c +++ b/source/blender/editors/space_userpref/space_userpref.c @@ -66,8 +66,8 @@ static SpaceLink *userpref_new(const bContext *UNUSED(C)) ar->regiontype = RGN_TYPE_HEADER; ar->alignment = RGN_ALIGN_BOTTOM; - /* main area */ - ar = MEM_callocN(sizeof(ARegion), "main area for userpref"); + /* main region */ + ar = MEM_callocN(sizeof(ARegion), "main region for userpref"); BLI_addtail(&spref->regionbase, ar); ar->regiontype = RGN_TYPE_WINDOW; @@ -101,7 +101,7 @@ static SpaceLink *userpref_duplicate(SpaceLink *sl) /* add handlers, stuff you only do once or on area/region changes */ -static void userpref_main_area_init(wmWindowManager *wm, ARegion *ar) +static void userpref_main_region_init(wmWindowManager *wm, ARegion *ar) { /* do not use here, the properties changed in userprefs do a system-wide refresh, then scroller jumps back */ /* ar->v2d.flag &= ~V2D_IS_INITIALISED; */ @@ -111,7 +111,7 @@ static void userpref_main_area_init(wmWindowManager *wm, ARegion *ar) ED_region_panels_init(wm, ar); } -static void userpref_main_area_draw(const bContext *C, ARegion *ar) +static void userpref_main_region_draw(const bContext *C, ARegion *ar) { ED_region_panels(C, ar, NULL, -1, true); } @@ -126,17 +126,17 @@ static void userpref_keymap(struct wmKeyConfig *UNUSED(keyconf)) } /* add handlers, stuff you only do once or on area/region changes */ -static void userpref_header_area_init(wmWindowManager *UNUSED(wm), ARegion *ar) +static void userpref_header_region_init(wmWindowManager *UNUSED(wm), ARegion *ar) { ED_region_header_init(ar); } -static void userpref_header_area_draw(const bContext *C, ARegion *ar) +static void userpref_header_region_draw(const bContext *C, ARegion *ar) { ED_region_header(C, ar); } -static void userpref_main_area_listener(bScreen *UNUSED(sc), ScrArea *UNUSED(sa), ARegion *UNUSED(ar), wmNotifier *UNUSED(wmn)) +static void userpref_main_region_listener(bScreen *UNUSED(sc), ScrArea *UNUSED(sa), ARegion *UNUSED(ar), wmNotifier *UNUSED(wmn)) { /* context changes */ } @@ -171,9 +171,9 @@ void ED_spacetype_userpref(void) /* regions: main window */ art = MEM_callocN(sizeof(ARegionType), "spacetype userpref region"); art->regionid = RGN_TYPE_WINDOW; - art->init = userpref_main_area_init; - art->draw = userpref_main_area_draw; - art->listener = userpref_main_area_listener; + art->init = userpref_main_region_init; + art->draw = userpref_main_region_draw; + art->listener = userpref_main_region_listener; art->keymapflag = ED_KEYMAP_UI; BLI_addhead(&st->regiontypes, art); @@ -184,8 +184,8 @@ void ED_spacetype_userpref(void) art->prefsizey = HEADERY; art->keymapflag = ED_KEYMAP_UI | ED_KEYMAP_VIEW2D | ED_KEYMAP_HEADER; art->listener = userpref_header_listener; - art->init = userpref_header_area_init; - art->draw = userpref_header_area_draw; + art->init = userpref_header_region_init; + art->draw = userpref_header_region_draw; BLI_addhead(&st->regiontypes, art); diff --git a/source/blender/editors/space_view3d/space_view3d.c b/source/blender/editors/space_view3d/space_view3d.c index e276a46fd71..5a006ed24ce 100644 --- a/source/blender/editors/space_view3d/space_view3d.c +++ b/source/blender/editors/space_view3d/space_view3d.c @@ -384,8 +384,8 @@ static SpaceLink *view3d_new(const bContext *C) ar->alignment = RGN_ALIGN_RIGHT; ar->flag = RGN_FLAG_HIDDEN; - /* main area */ - ar = MEM_callocN(sizeof(ARegion), "main area for view3d"); + /* main region */ + ar = MEM_callocN(sizeof(ARegion), "main region for view3d"); BLI_addtail(&v3d->regionbase, ar); ar->regiontype = RGN_TYPE_WINDOW; @@ -482,7 +482,7 @@ static SpaceLink *view3d_duplicate(SpaceLink *sl) } /* add handlers, stuff you only do once or on area/region changes */ -static void view3d_main_area_init(wmWindowManager *wm, ARegion *ar) +static void view3d_main_region_init(wmWindowManager *wm, ARegion *ar) { ListBase *lb; wmKeyMap *keymap; @@ -567,7 +567,7 @@ static void view3d_main_area_init(wmWindowManager *wm, ARegion *ar) } -static void view3d_main_area_exit(wmWindowManager *wm, ARegion *ar) +static void view3d_main_region_exit(wmWindowManager *wm, ARegion *ar) { RegionView3D *rv3d = ar->regiondata; @@ -715,7 +715,7 @@ static void view3d_dropboxes(void) /* type callback, not region itself */ -static void view3d_main_area_free(ARegion *ar) +static void view3d_main_region_free(ARegion *ar) { RegionView3D *rv3d = ar->regiondata; @@ -746,7 +746,7 @@ static void view3d_main_area_free(ARegion *ar) } /* copy regiondata */ -static void *view3d_main_area_duplicate(void *poin) +static void *view3d_main_region_duplicate(void *poin) { if (poin) { RegionView3D *rv3d = poin, *new; @@ -799,7 +799,7 @@ static void view3d_recalc_used_layers(ARegion *ar, wmNotifier *wmn, Scene *scene } } -static void view3d_main_area_listener(bScreen *sc, ScrArea *sa, ARegion *ar, wmNotifier *wmn) +static void view3d_main_region_listener(bScreen *sc, ScrArea *sa, ARegion *ar, wmNotifier *wmn) { Scene *scene = sc->scene; View3D *v3d = sa->spacedata.first; @@ -1025,7 +1025,7 @@ static void view3d_main_area_listener(bScreen *sc, ScrArea *sa, ARegion *ar, wmN } /* concept is to retrieve cursor type context-less */ -static void view3d_main_area_cursor(wmWindow *win, ScrArea *UNUSED(sa), ARegion *UNUSED(ar)) +static void view3d_main_region_cursor(wmWindow *win, ScrArea *UNUSED(sa), ARegion *UNUSED(ar)) { Scene *scene = win->screen->scene; @@ -1038,7 +1038,7 @@ static void view3d_main_area_cursor(wmWindow *win, ScrArea *UNUSED(sa), ARegion } /* add handlers, stuff you only do once or on area/region changes */ -static void view3d_header_area_init(wmWindowManager *wm, ARegion *ar) +static void view3d_header_region_init(wmWindowManager *wm, ARegion *ar) { wmKeyMap *keymap = WM_keymap_find(wm->defaultconf, "3D View Generic", SPACE_VIEW3D, 0); @@ -1047,12 +1047,12 @@ static void view3d_header_area_init(wmWindowManager *wm, ARegion *ar) ED_region_header_init(ar); } -static void view3d_header_area_draw(const bContext *C, ARegion *ar) +static void view3d_header_region_draw(const bContext *C, ARegion *ar) { ED_region_header(C, ar); } -static void view3d_header_area_listener(bScreen *UNUSED(sc), ScrArea *UNUSED(sa), ARegion *ar, wmNotifier *wmn) +static void view3d_header_region_listener(bScreen *UNUSED(sc), ScrArea *UNUSED(sa), ARegion *ar, wmNotifier *wmn) { /* context changes */ switch (wmn->category) { @@ -1083,7 +1083,7 @@ static void view3d_header_area_listener(bScreen *UNUSED(sc), ScrArea *UNUSED(sa) } /* add handlers, stuff you only do once or on area/region changes */ -static void view3d_buttons_area_init(wmWindowManager *wm, ARegion *ar) +static void view3d_buttons_region_init(wmWindowManager *wm, ARegion *ar) { wmKeyMap *keymap; @@ -1093,12 +1093,12 @@ static void view3d_buttons_area_init(wmWindowManager *wm, ARegion *ar) WM_event_add_keymap_handler(&ar->handlers, keymap); } -static void view3d_buttons_area_draw(const bContext *C, ARegion *ar) +static void view3d_buttons_region_draw(const bContext *C, ARegion *ar) { ED_region_panels(C, ar, NULL, -1, true); } -static void view3d_buttons_area_listener(bScreen *UNUSED(sc), ScrArea *UNUSED(sa), ARegion *ar, wmNotifier *wmn) +static void view3d_buttons_region_listener(bScreen *UNUSED(sc), ScrArea *UNUSED(sa), ARegion *ar, wmNotifier *wmn) { /* context changes */ switch (wmn->category) { @@ -1189,7 +1189,7 @@ static void view3d_buttons_area_listener(bScreen *UNUSED(sc), ScrArea *UNUSED(sa } /* add handlers, stuff you only do once or on area/region changes */ -static void view3d_tools_area_init(wmWindowManager *wm, ARegion *ar) +static void view3d_tools_region_init(wmWindowManager *wm, ARegion *ar) { wmKeyMap *keymap; @@ -1199,12 +1199,12 @@ static void view3d_tools_area_init(wmWindowManager *wm, ARegion *ar) WM_event_add_keymap_handler(&ar->handlers, keymap); } -static void view3d_tools_area_draw(const bContext *C, ARegion *ar) +static void view3d_tools_region_draw(const bContext *C, ARegion *ar) { ED_region_panels(C, ar, CTX_data_mode_string(C), -1, true); } -static void view3d_props_area_listener(bScreen *UNUSED(sc), ScrArea *UNUSED(sa), ARegion *ar, wmNotifier *wmn) +static void view3d_props_region_listener(bScreen *UNUSED(sc), ScrArea *UNUSED(sa), ARegion *ar, wmNotifier *wmn) { /* context changes */ switch (wmn->category) { @@ -1223,7 +1223,7 @@ static void view3d_props_area_listener(bScreen *UNUSED(sc), ScrArea *UNUSED(sa), } } -/*area (not region) level listener*/ +/* area (not region) level listener */ static void space_view3d_listener(bScreen *UNUSED(sc), ScrArea *sa, struct wmNotifier *wmn) { View3D *v3d = sa->spacedata.first; @@ -1424,13 +1424,13 @@ void ED_spacetype_view3d(void) art = MEM_callocN(sizeof(ARegionType), "spacetype view3d main region"); art->regionid = RGN_TYPE_WINDOW; art->keymapflag = ED_KEYMAP_GPENCIL; - art->draw = view3d_main_area_draw; - art->init = view3d_main_area_init; - art->exit = view3d_main_area_exit; - art->free = view3d_main_area_free; - art->duplicate = view3d_main_area_duplicate; - art->listener = view3d_main_area_listener; - art->cursor = view3d_main_area_cursor; + art->draw = view3d_main_region_draw; + art->init = view3d_main_region_init; + art->exit = view3d_main_region_exit; + art->free = view3d_main_region_free; + art->duplicate = view3d_main_region_duplicate; + art->listener = view3d_main_region_listener; + art->cursor = view3d_main_region_cursor; art->lock = 1; /* can become flag, see BKE_spacedata_draw_locks */ BLI_addhead(&st->regiontypes, art); @@ -1439,9 +1439,9 @@ void ED_spacetype_view3d(void) art->regionid = RGN_TYPE_UI; art->prefsizex = 180; /* XXX */ art->keymapflag = ED_KEYMAP_UI | ED_KEYMAP_FRAMES; - art->listener = view3d_buttons_area_listener; - art->init = view3d_buttons_area_init; - art->draw = view3d_buttons_area_draw; + art->listener = view3d_buttons_region_listener; + art->init = view3d_buttons_region_init; + art->draw = view3d_buttons_region_draw; BLI_addhead(&st->regiontypes, art); view3d_buttons_register(art); @@ -1452,9 +1452,9 @@ void ED_spacetype_view3d(void) art->prefsizex = 160; /* XXX */ art->prefsizey = 50; /* XXX */ art->keymapflag = ED_KEYMAP_UI | ED_KEYMAP_FRAMES; - art->listener = view3d_buttons_area_listener; - art->init = view3d_tools_area_init; - art->draw = view3d_tools_area_draw; + art->listener = view3d_buttons_region_listener; + art->init = view3d_tools_region_init; + art->draw = view3d_tools_region_draw; BLI_addhead(&st->regiontypes, art); #if 0 @@ -1468,9 +1468,9 @@ void ED_spacetype_view3d(void) art->prefsizex = 0; art->prefsizey = 120; art->keymapflag = ED_KEYMAP_UI | ED_KEYMAP_FRAMES; - art->listener = view3d_props_area_listener; - art->init = view3d_tools_area_init; - art->draw = view3d_tools_area_draw; + art->listener = view3d_props_region_listener; + art->init = view3d_tools_region_init; + art->draw = view3d_tools_region_draw; BLI_addhead(&st->regiontypes, art); view3d_tool_props_register(art); @@ -1481,9 +1481,9 @@ void ED_spacetype_view3d(void) art->regionid = RGN_TYPE_HEADER; art->prefsizey = HEADERY; art->keymapflag = ED_KEYMAP_UI | ED_KEYMAP_VIEW2D | ED_KEYMAP_FRAMES | ED_KEYMAP_HEADER; - art->listener = view3d_header_area_listener; - art->init = view3d_header_area_init; - art->draw = view3d_header_area_draw; + art->listener = view3d_header_region_listener; + art->init = view3d_header_region_init; + art->draw = view3d_header_region_draw; BLI_addhead(&st->regiontypes, art); BKE_spacetype_register(st); diff --git a/source/blender/editors/space_view3d/view3d_draw.c b/source/blender/editors/space_view3d/view3d_draw.c index f9101d15d04..9393092fffa 100644 --- a/source/blender/editors/space_view3d/view3d_draw.c +++ b/source/blender/editors/space_view3d/view3d_draw.c @@ -2223,7 +2223,7 @@ void view3d_update_depths_rect(ARegion *ar, ViewDepths *d, rcti *rect) { int x, y, w, h; rcti r; - /* clamp rect by area */ + /* clamp rect by region */ r.xmin = 0; r.xmax = ar->winx - 1; @@ -2703,7 +2703,7 @@ void ED_view3d_update_viewmat(Scene *scene, View3D *v3d, ARegion *ar, float view } /** - * Shared by #ED_view3d_draw_offscreen and #view3d_main_area_draw_objects + * Shared by #ED_view3d_draw_offscreen and #view3d_main_region_draw_objects * * \note \a C and \a grid_unit will be NULL when \a draw_offscreen is set. * \note Drawing lamps and opengl render uses this, so dont do grease pencil or view widgets here. @@ -2902,7 +2902,7 @@ static void view3d_draw_objects( } } -static void view3d_main_area_setup_view(Scene *scene, View3D *v3d, ARegion *ar, float viewmat[4][4], float winmat[4][4]) +static void view3d_main_region_setup_view(Scene *scene, View3D *v3d, ARegion *ar, float viewmat[4][4], float winmat[4][4]) { RegionView3D *rv3d = ar->regiondata; @@ -2966,7 +2966,7 @@ void ED_view3d_draw_offscreen_init(Scene *scene, View3D *v3d) /* * Function to clear the view */ -static void view3d_main_area_clear(Scene *scene, View3D *v3d, ARegion *ar) +static void view3d_main_region_clear(Scene *scene, View3D *v3d, ARegion *ar) { if (scene->world && (v3d->flag3 & V3D_SHOW_WORLD)) { bool glsl = BKE_scene_use_new_shading_nodes(scene) && scene->world->nodetree && scene->world->use_nodes; @@ -3223,7 +3223,7 @@ void ED_view3d_draw_offscreen( if ((viewname != NULL && viewname[0] != '\0') && (viewmat == NULL) && rv3d->persp == RV3D_CAMOB && v3d->camera) view3d_stereo3d_setup_offscreen(scene, v3d, ar, winmat, viewname); else - view3d_main_area_setup_view(scene, v3d, ar, viewmat, winmat); + view3d_main_region_setup_view(scene, v3d, ar, viewmat, winmat); /* framebuffer fx needed, we need to draw offscreen first */ if (v3d->fx_settings.fx_flag && fx) { @@ -3242,7 +3242,7 @@ void ED_view3d_draw_offscreen( /* clear opengl buffers */ if (do_sky) { - view3d_main_area_clear(scene, v3d, ar); + view3d_main_region_clear(scene, v3d, ar); } else { glClearColor(0.0f, 0.0f, 0.0f, 0.0f); @@ -3573,7 +3573,7 @@ void ED_scene_draw_fps(Scene *scene, const rcti *rect) #endif } -static bool view3d_main_area_do_render_draw(Scene *scene) +static bool view3d_main_region_do_render_draw(Scene *scene) { RenderEngineType *type = RE_engines_find(scene->r.engine); @@ -3587,7 +3587,7 @@ bool ED_view3d_calc_render_border(Scene *scene, View3D *v3d, ARegion *ar, rcti * bool use_border; /* test if there is a 3d view rendering */ - if (v3d->drawtype != OB_RENDER || !view3d_main_area_do_render_draw(scene)) + if (v3d->drawtype != OB_RENDER || !view3d_main_region_do_render_draw(scene)) return false; /* test if there is a border render */ @@ -3621,7 +3621,7 @@ bool ED_view3d_calc_render_border(Scene *scene, View3D *v3d, ARegion *ar, rcti * return true; } -static bool view3d_main_area_draw_engine(const bContext *C, Scene *scene, +static bool view3d_main_region_draw_engine(const bContext *C, Scene *scene, ARegion *ar, View3D *v3d, bool clip_border, const rcti *border_rect) { @@ -3649,7 +3649,7 @@ static bool view3d_main_area_draw_engine(const bContext *C, Scene *scene, } /* setup view matrices */ - view3d_main_area_setup_view(scene, v3d, ar, NULL, NULL); + view3d_main_region_setup_view(scene, v3d, ar, NULL, NULL); /* background draw */ ED_region_pixelspace(ar); @@ -3689,7 +3689,7 @@ static bool view3d_main_area_draw_engine(const bContext *C, Scene *scene, return true; } -static void view3d_main_area_draw_engine_info(View3D *v3d, RegionView3D *rv3d, ARegion *ar, bool render_border) +static void view3d_main_region_draw_engine_info(View3D *v3d, RegionView3D *rv3d, ARegion *ar, bool render_border) { float fill_color[4] = {0.0f, 0.0f, 0.0f, 0.25f}; @@ -3698,7 +3698,7 @@ static void view3d_main_area_draw_engine_info(View3D *v3d, RegionView3D *rv3d, A if (render_border) { /* draw darkened background color. no alpha because border render does - * partial redraw and will not redraw the area behind this info bar */ + * partial redraw and will not redraw the region behind this info bar */ float alpha = 1.0f - fill_color[3]; Camera *camera = ED_view3d_camera_data_get(v3d, rv3d); @@ -3745,7 +3745,7 @@ static bool view3d_stereo3d_active(const bContext *C, Scene *scene, View3D *v3d, * we have no winmatrix (i.e., projection matrix) defined at that time. * Since the camera and the camera shift are needed for the winmat calculation * we do a small hack to replace it temporarily so we don't need to change the - * view3d)main_area_setup_view() code to account for that. + * view3d)main_region_setup_view() code to account for that. */ static void view3d_stereo3d_setup(Scene *scene, View3D *v3d, ARegion *ar) { @@ -3773,7 +3773,7 @@ static void view3d_stereo3d_setup(Scene *scene, View3D *v3d, ARegion *ar) data->shiftx = BKE_camera_multiview_shift_x(&scene->r, v3d->camera, viewname); BKE_camera_multiview_view_matrix(&scene->r, v3d->camera, is_left, viewmat); - view3d_main_area_setup_view(scene, v3d, ar, viewmat, NULL); + view3d_main_region_setup_view(scene, v3d, ar, viewmat, NULL); data->shiftx = shiftx; BLI_unlock_thread(LOCK_VIEW3D); @@ -3787,7 +3787,7 @@ static void view3d_stereo3d_setup(Scene *scene, View3D *v3d, ARegion *ar) v3d->camera = camera; BKE_camera_multiview_view_matrix(&scene->r, camera, false, viewmat); - view3d_main_area_setup_view(scene, v3d, ar, viewmat, NULL); + view3d_main_region_setup_view(scene, v3d, ar, viewmat, NULL); v3d->camera = view_ob; BLI_unlock_thread(LOCK_VIEW3D); @@ -3803,14 +3803,14 @@ static void view3d_stereo3d_setup_offscreen(Scene *scene, View3D *v3d, ARegion * const bool is_left = STREQ(viewname, STEREO_LEFT_NAME); BKE_camera_multiview_view_matrix(&scene->r, v3d->camera, is_left, viewmat); - view3d_main_area_setup_view(scene, v3d, ar, viewmat, winmat); + view3d_main_region_setup_view(scene, v3d, ar, viewmat, winmat); } else { /* SCE_VIEWS_FORMAT_MULTIVIEW */ float viewmat[4][4]; Object *camera = BKE_camera_multiview_render(scene, v3d->camera, viewname); BKE_camera_multiview_view_matrix(&scene->r, camera, false, viewmat); - view3d_main_area_setup_view(scene, v3d, ar, viewmat, winmat); + view3d_main_region_setup_view(scene, v3d, ar, viewmat, winmat); } } @@ -3828,7 +3828,7 @@ static void update_lods(Scene *scene, float camera_pos[3]) } #endif -static void view3d_main_area_draw_objects(const bContext *C, Scene *scene, View3D *v3d, +static void view3d_main_region_draw_objects(const bContext *C, Scene *scene, View3D *v3d, ARegion *ar, const char **grid_unit) { RegionView3D *rv3d = ar->regiondata; @@ -3851,7 +3851,7 @@ static void view3d_main_area_draw_objects(const bContext *C, Scene *scene, View3 if (view3d_stereo3d_active(C, scene, v3d, rv3d)) view3d_stereo3d_setup(scene, v3d, ar); else - view3d_main_area_setup_view(scene, v3d, ar, NULL, NULL); + view3d_main_region_setup_view(scene, v3d, ar, NULL, NULL); rv3d->rflag &= ~RV3D_IS_GAME_ENGINE; #ifdef WITH_GAMEENGINE @@ -3881,7 +3881,7 @@ static void view3d_main_area_draw_objects(const bContext *C, Scene *scene, View3 } /* clear the background */ - view3d_main_area_clear(scene, v3d, ar); + view3d_main_region_clear(scene, v3d, ar); /* enables anti-aliasing for 3D view drawing */ if (U.ogl_multisamples != USER_MULTISAMPLE_NONE) { @@ -3948,7 +3948,7 @@ static bool is_cursor_visible(Scene *scene) return true; } -static void view3d_main_area_draw_info(const bContext *C, Scene *scene, +static void view3d_main_region_draw_info(const bContext *C, Scene *scene, ARegion *ar, View3D *v3d, const char *grid_unit, bool render_border) { @@ -3997,7 +3997,7 @@ static void view3d_main_area_draw_info(const bContext *C, Scene *scene, } if (rv3d->render_engine) { - view3d_main_area_draw_engine_info(v3d, rv3d, ar, render_border); + view3d_main_region_draw_engine_info(v3d, rv3d, ar, render_border); return; } @@ -4026,7 +4026,7 @@ static void view3d_main_area_draw_info(const bContext *C, Scene *scene, } } -void view3d_main_area_draw(const bContext *C, ARegion *ar) +void view3d_main_region_draw(const bContext *C, ARegion *ar) { Scene *scene = CTX_data_scene(C); View3D *v3d = CTX_wm_view3d(C); @@ -4040,8 +4040,8 @@ void view3d_main_area_draw(const bContext *C, ARegion *ar) clip_border = (render_border && !BLI_rcti_compare(&ar->drawrct, &border_rect)); /* draw viewport using opengl */ - if (v3d->drawtype != OB_RENDER || !view3d_main_area_do_render_draw(scene) || clip_border) { - view3d_main_area_draw_objects(C, scene, v3d, ar, &grid_unit); + if (v3d->drawtype != OB_RENDER || !view3d_main_region_do_render_draw(scene) || clip_border) { + view3d_main_region_draw_objects(C, scene, v3d, ar, &grid_unit); #ifdef DEBUG_DRAW bl_debug_draw(); @@ -4054,9 +4054,9 @@ void view3d_main_area_draw(const bContext *C, ARegion *ar) /* draw viewport using external renderer */ if (v3d->drawtype == OB_RENDER) - view3d_main_area_draw_engine(C, scene, ar, v3d, clip_border, &border_rect); + view3d_main_region_draw_engine(C, scene, ar, v3d, clip_border, &border_rect); - view3d_main_area_draw_info(C, scene, ar, v3d, grid_unit, render_border); + view3d_main_region_draw_info(C, scene, ar, v3d, grid_unit, render_border); v3d->flag |= V3D_INVALID_BACKBUF; } diff --git a/source/blender/editors/space_view3d/view3d_intern.h b/source/blender/editors/space_view3d/view3d_intern.h index 94c1db8aa5d..325fd9ecbe2 100644 --- a/source/blender/editors/space_view3d/view3d_intern.h +++ b/source/blender/editors/space_view3d/view3d_intern.h @@ -180,7 +180,7 @@ void draw_mesh_paint(View3D *v3d, RegionView3D *rv3d, void draw_sim_debug_data(Scene *scene, View3D *v3d, ARegion *ar); /* view3d_draw.c */ -void view3d_main_area_draw(const struct bContext *C, struct ARegion *ar); +void view3d_main_region_draw(const struct bContext *C, struct ARegion *ar); void ED_view3d_draw_depth(Scene *scene, struct ARegion *ar, View3D *v3d, bool alphaoverride); void ED_view3d_draw_depth_gpencil(Scene *scene, ARegion *ar, View3D *v3d); void ED_view3d_after_add(ListBase *lb, Base *base, const short dflag); |