diff options
Diffstat (limited to 'source/blender/editors/space_topbar/space_topbar.c')
-rw-r--r-- | source/blender/editors/space_topbar/space_topbar.c | 58 |
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, }; |