Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/screen/area.c
| Show First 20 Lines • Show All 45 Lines • ▼ Show 20 Lines | |||||
| #include "BKE_global.h" | #include "BKE_global.h" | ||||
| #include "BKE_screen.h" | #include "BKE_screen.h" | ||||
| #include "RNA_access.h" | #include "RNA_access.h" | ||||
| #include "RNA_types.h" | #include "RNA_types.h" | ||||
| #include "WM_api.h" | #include "WM_api.h" | ||||
| #include "WM_types.h" | #include "WM_types.h" | ||||
| #include "WM_message.h" | |||||
| #include "wm_subwindow.h" | #include "wm_subwindow.h" | ||||
| #include "ED_screen.h" | #include "ED_screen.h" | ||||
| #include "ED_screen_types.h" | #include "ED_screen_types.h" | ||||
| #include "ED_space_api.h" | #include "ED_space_api.h" | ||||
| #include "GPU_immediate.h" | #include "GPU_immediate.h" | ||||
| #include "GPU_immediate_util.h" | #include "GPU_immediate_util.h" | ||||
| ▲ Show 20 Lines • Show All 444 Lines • ▼ Show 20 Lines | void ED_region_set(const bContext *C, ARegion *ar) | ||||
| /* note; this sets state, so we can use wmOrtho and friends */ | /* note; this sets state, so we can use wmOrtho and friends */ | ||||
| wmSubWindowScissorSet(win, ar->swinid, &ar->drawrct, true); | wmSubWindowScissorSet(win, ar->swinid, &ar->drawrct, true); | ||||
| UI_SetTheme(sa ? sa->spacetype : 0, ar->type ? ar->type->regionid : 0); | UI_SetTheme(sa ? sa->spacetype : 0, ar->type ? ar->type->regionid : 0); | ||||
| ED_region_pixelspace(ar); | ED_region_pixelspace(ar); | ||||
| } | } | ||||
| /* Follow wmMsgNotifyFn spec */ | |||||
| void ED_region_do_msg_notify_tag_redraw( | |||||
| bContext *UNUSED(C), wmMsgSubscribeKey *UNUSED(msg_key), wmMsgSubscribeValue *msg_val) | |||||
| { | |||||
| ARegion *ar = msg_val->owner; | |||||
| ED_region_tag_redraw(ar); | |||||
| } | |||||
| /* only exported for WM */ | /* only exported for WM */ | ||||
| void ED_region_do_draw(bContext *C, ARegion *ar) | void ED_region_do_draw(bContext *C, ARegion *ar) | ||||
| { | { | ||||
| wmWindow *win = CTX_wm_window(C); | wmWindow *win = CTX_wm_window(C); | ||||
| ScrArea *sa = CTX_wm_area(C); | ScrArea *sa = CTX_wm_area(C); | ||||
| ARegionType *at = ar->type; | ARegionType *at = ar->type; | ||||
| bool scissor_pad; | bool scissor_pad; | ||||
| Show All 9 Lines | void ED_region_do_draw(bContext *C, ARegion *ar) | ||||
| } | } | ||||
| else { | else { | ||||
| /* extra clip for safety */ | /* extra clip for safety */ | ||||
| BLI_rcti_isect(&ar->winrct, &ar->drawrct, &ar->drawrct); | BLI_rcti_isect(&ar->winrct, &ar->drawrct, &ar->drawrct); | ||||
| scissor_pad = false; | scissor_pad = false; | ||||
| } | } | ||||
| ar->do_draw |= RGN_DRAWING; | ar->do_draw |= RGN_DRAWING; | ||||
| { | |||||
| wmWindowManager *wm = CTX_wm_manager(C); | |||||
| WM_msgbus_clear_by_owner(wm->message_bus, ar); | |||||
| } | |||||
| /* note; this sets state, so we can use wmOrtho and friends */ | /* note; this sets state, so we can use wmOrtho and friends */ | ||||
| wmSubWindowScissorSet(win, ar->swinid, &ar->drawrct, scissor_pad); | wmSubWindowScissorSet(win, ar->swinid, &ar->drawrct, scissor_pad); | ||||
| wmOrtho2_region_pixelspace(ar); | wmOrtho2_region_pixelspace(ar); | ||||
| UI_SetTheme(sa ? sa->spacetype : 0, at->regionid); | UI_SetTheme(sa ? sa->spacetype : 0, at->regionid); | ||||
| /* optional header info instead? */ | /* optional header info instead? */ | ||||
| ▲ Show 20 Lines • Show All 2,050 Lines • Show Last 20 Lines | |||||