Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/space_info/space_info.c
| Show First 20 Lines • Show All 198 Lines • ▼ Show 20 Lines | static void info_header_region_init(wmWindowManager *UNUSED(wm), ARegion *region) | ||||
| ED_region_header_init(region); | ED_region_header_init(region); | ||||
| } | } | ||||
| static void info_header_region_draw(const bContext *C, ARegion *region) | static void info_header_region_draw(const bContext *C, ARegion *region) | ||||
| { | { | ||||
| ED_region_header(C, region); | ED_region_header(C, region); | ||||
| } | } | ||||
| static void info_main_region_listener(wmWindow *UNUSED(win), | static void info_main_region_listener(const wmRegionListenerParams *params) | ||||
| ScrArea *UNUSED(area), | |||||
| ARegion *region, | |||||
| wmNotifier *wmn, | |||||
| const Scene *UNUSED(scene)) | |||||
| { | { | ||||
| // SpaceInfo *sinfo = area->spacedata.first; | ARegion *region = params->region; | ||||
| wmNotifier *wmn = params->notifier; | |||||
| /* context changes */ | /* context changes */ | ||||
| switch (wmn->category) { | switch (wmn->category) { | ||||
| case NC_SPACE: | case NC_SPACE: | ||||
| if (wmn->data == ND_SPACE_INFO_REPORT) { | if (wmn->data == ND_SPACE_INFO_REPORT) { | ||||
| /* redraw also but only for report view, could do less redraws by checking the type */ | /* redraw also but only for report view, could do less redraws by checking the type */ | ||||
| ED_region_tag_redraw(region); | ED_region_tag_redraw(region); | ||||
| } | } | ||||
| break; | break; | ||||
| } | } | ||||
| } | } | ||||
| static void info_header_listener(wmWindow *UNUSED(win), | static void info_header_listener(const wmRegionListenerParams *params) | ||||
| ScrArea *UNUSED(area), | |||||
| ARegion *region, | |||||
| wmNotifier *wmn, | |||||
| const Scene *UNUSED(scene)) | |||||
| { | { | ||||
| ARegion *region = params->region; | |||||
| wmNotifier *wmn = params->notifier; | |||||
| /* context changes */ | /* context changes */ | ||||
| switch (wmn->category) { | switch (wmn->category) { | ||||
| case NC_SCREEN: | case NC_SCREEN: | ||||
| if (ELEM(wmn->data, ND_LAYER, ND_ANIMPLAY)) { | if (ELEM(wmn->data, ND_LAYER, ND_ANIMPLAY)) { | ||||
| ED_region_tag_redraw(region); | ED_region_tag_redraw(region); | ||||
| } | } | ||||
| break; | break; | ||||
| case NC_WM: | case NC_WM: | ||||
| Show All 14 Lines | switch (wmn->category) { | ||||
| case NC_ID: | case NC_ID: | ||||
| if (wmn->action == NA_RENAME) { | if (wmn->action == NA_RENAME) { | ||||
| ED_region_tag_redraw(region); | ED_region_tag_redraw(region); | ||||
| } | } | ||||
| break; | break; | ||||
| } | } | ||||
| } | } | ||||
| static void info_header_region_message_subscribe(const bContext *UNUSED(C), | static void info_header_region_message_subscribe(const wmRegionMessageSubscribeParams *params) | ||||
| WorkSpace *UNUSED(workspace), | |||||
| Scene *UNUSED(scene), | |||||
| bScreen *UNUSED(screen), | |||||
| ScrArea *UNUSED(area), | |||||
| ARegion *region, | |||||
| struct wmMsgBus *mbus) | |||||
| { | { | ||||
| struct wmMsgBus *mbus = params->message_bus; | |||||
| ARegion *region = params->region; | |||||
| wmMsgSubscribeValue msg_sub_value_region_tag_redraw = { | wmMsgSubscribeValue msg_sub_value_region_tag_redraw = { | ||||
| .owner = region, | .owner = region, | ||||
| .user_data = region, | .user_data = region, | ||||
| .notify = ED_region_do_msg_notify_tag_redraw, | .notify = ED_region_do_msg_notify_tag_redraw, | ||||
| }; | }; | ||||
| WM_msg_subscribe_rna_anon_prop(mbus, Window, view_layer, &msg_sub_value_region_tag_redraw); | WM_msg_subscribe_rna_anon_prop(mbus, Window, view_layer, &msg_sub_value_region_tag_redraw); | ||||
| WM_msg_subscribe_rna_anon_prop(mbus, ViewLayer, name, &msg_sub_value_region_tag_redraw); | WM_msg_subscribe_rna_anon_prop(mbus, ViewLayer, name, &msg_sub_value_region_tag_redraw); | ||||
| ▲ Show 20 Lines • Show All 44 Lines • Show Last 20 Lines | |||||