Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Eisel <julian@blender.org>2020-03-06 18:56:42 +0300
committerJulian Eisel <julian@blender.org>2020-03-06 19:19:23 +0300
commitb2ee1770d4c31078518f4ec9edd5196a41345162 (patch)
tree6b7f6ff9057322245fc3b3407bece3f1c0cb3eb5 /source/blender/editors/space_topbar
parentb825a95ec311a169d33fe21e28418f11a516c82f (diff)
Cleanup: Rename ARegion variables from ar to region
The old convention was easy to confuse with ScrArea. Part of https://developer.blender.org/T74432. This is mostly a batch rename with some manual fixing. Only single word variable names are changed, no prefixed/suffixed names. Brecht van Lommel and Campbell Barton both gave me a green light for this convention change. Also ran clan clang format on affected files.
Diffstat (limited to 'source/blender/editors/space_topbar')
-rw-r--r--source/blender/editors/space_topbar/space_topbar.c58
1 files changed, 29 insertions, 29 deletions
diff --git a/source/blender/editors/space_topbar/space_topbar.c b/source/blender/editors/space_topbar/space_topbar.c
index d62fcf45d68..facdba46b21 100644
--- a/source/blender/editors/space_topbar/space_topbar.c
+++ b/source/blender/editors/space_topbar/space_topbar.c
@@ -54,26 +54,26 @@
static SpaceLink *topbar_new(const ScrArea *UNUSED(area), const Scene *UNUSED(scene))
{
- ARegion *ar;
+ ARegion *region;
SpaceTopBar *stopbar;
stopbar = MEM_callocN(sizeof(*stopbar), "init topbar");
stopbar->spacetype = SPACE_TOPBAR;
/* header */
- ar = MEM_callocN(sizeof(ARegion), "left aligned header for topbar");
- BLI_addtail(&stopbar->regionbase, ar);
- ar->regiontype = RGN_TYPE_HEADER;
- ar->alignment = RGN_ALIGN_TOP;
- ar = MEM_callocN(sizeof(ARegion), "right aligned header for topbar");
- BLI_addtail(&stopbar->regionbase, ar);
- ar->regiontype = RGN_TYPE_HEADER;
- ar->alignment = RGN_ALIGN_RIGHT | RGN_SPLIT_PREV;
+ region = MEM_callocN(sizeof(ARegion), "left aligned header for topbar");
+ BLI_addtail(&stopbar->regionbase, region);
+ region->regiontype = RGN_TYPE_HEADER;
+ region->alignment = RGN_ALIGN_TOP;
+ region = MEM_callocN(sizeof(ARegion), "right aligned header for topbar");
+ BLI_addtail(&stopbar->regionbase, region);
+ region->regiontype = RGN_TYPE_HEADER;
+ region->alignment = RGN_ALIGN_RIGHT | RGN_SPLIT_PREV;
/* main regions */
- ar = MEM_callocN(sizeof(ARegion), "main region of topbar");
- BLI_addtail(&stopbar->regionbase, ar);
- ar->regiontype = RGN_TYPE_WINDOW;
+ region = MEM_callocN(sizeof(ARegion), "main region of topbar");
+ BLI_addtail(&stopbar->regionbase, region);
+ region->regiontype = RGN_TYPE_WINDOW;
return (SpaceLink *)stopbar;
}
@@ -121,17 +121,17 @@ static void topbar_keymap(struct wmKeyConfig *UNUSED(keyconf))
}
/* add handlers, stuff you only do once or on area/region changes */
-static void topbar_header_region_init(wmWindowManager *UNUSED(wm), ARegion *ar)
+static void topbar_header_region_init(wmWindowManager *UNUSED(wm), ARegion *region)
{
- if (RGN_ALIGN_ENUM_FROM_MASK(ar->alignment) == RGN_ALIGN_RIGHT) {
- ar->flag |= RGN_FLAG_DYNAMIC_SIZE;
+ if (RGN_ALIGN_ENUM_FROM_MASK(region->alignment) == RGN_ALIGN_RIGHT) {
+ region->flag |= RGN_FLAG_DYNAMIC_SIZE;
}
- ED_region_header_init(ar);
+ ED_region_header_init(region);
}
static void topbar_main_region_listener(wmWindow *UNUSED(win),
ScrArea *UNUSED(sa),
- ARegion *ar,
+ ARegion *region,
wmNotifier *wmn,
const Scene *UNUSED(scene))
{
@@ -139,22 +139,22 @@ static void topbar_main_region_listener(wmWindow *UNUSED(win),
switch (wmn->category) {
case NC_WM:
if (wmn->data == ND_HISTORY) {
- ED_region_tag_redraw(ar);
+ ED_region_tag_redraw(region);
}
break;
case NC_SCENE:
if (wmn->data == ND_MODE) {
- ED_region_tag_redraw(ar);
+ ED_region_tag_redraw(region);
}
break;
case NC_SPACE:
if (wmn->data == ND_SPACE_VIEW3D) {
- ED_region_tag_redraw(ar);
+ ED_region_tag_redraw(region);
}
break;
case NC_GPENCIL:
if (wmn->data == ND_DATA) {
- ED_region_tag_redraw(ar);
+ ED_region_tag_redraw(region);
}
break;
}
@@ -162,7 +162,7 @@ static void topbar_main_region_listener(wmWindow *UNUSED(win),
static void topbar_header_listener(wmWindow *UNUSED(win),
ScrArea *UNUSED(sa),
- ARegion *ar,
+ ARegion *region,
wmNotifier *wmn,
const Scene *UNUSED(scene))
{
@@ -170,22 +170,22 @@ static void topbar_header_listener(wmWindow *UNUSED(win),
switch (wmn->category) {
case NC_WM:
if (wmn->data == ND_JOB) {
- ED_region_tag_redraw(ar);
+ ED_region_tag_redraw(region);
}
break;
case NC_SPACE:
if (wmn->data == ND_SPACE_INFO) {
- ED_region_tag_redraw(ar);
+ ED_region_tag_redraw(region);
}
break;
case NC_SCREEN:
if (wmn->data == ND_LAYER) {
- ED_region_tag_redraw(ar);
+ ED_region_tag_redraw(region);
}
break;
case NC_SCENE:
if (wmn->data == ND_SCENEBROWSE) {
- ED_region_tag_redraw(ar);
+ ED_region_tag_redraw(region);
}
break;
}
@@ -196,12 +196,12 @@ static void topbar_header_region_message_subscribe(const struct bContext *UNUSED
struct Scene *UNUSED(scene),
struct bScreen *UNUSED(screen),
struct ScrArea *UNUSED(sa),
- struct ARegion *ar,
+ struct ARegion *region,
struct wmMsgBus *mbus)
{
wmMsgSubscribeValue msg_sub_value_region_tag_redraw = {
- .owner = ar,
- .user_data = ar,
+ .owner = region,
+ .user_data = region,
.notify = ED_region_do_msg_notify_tag_redraw,
};