Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/screen/area_utils.c
| Show All 16 Lines | |||||
| /** \file | /** \file | ||||
| * \ingroup edscr | * \ingroup edscr | ||||
| * | * | ||||
| * Helper functions for area/region API. | * Helper functions for area/region API. | ||||
| */ | */ | ||||
| #include "DNA_userdef_types.h" | #include "DNA_userdef_types.h" | ||||
| #include "BKE_screen.h" | |||||
| #include "BLI_blenlib.h" | #include "BLI_blenlib.h" | ||||
| #include "BLI_utildefines.h" | #include "BLI_utildefines.h" | ||||
| #include "RNA_access.h" | #include "RNA_access.h" | ||||
| #include "RNA_types.h" | #include "RNA_types.h" | ||||
| #include "WM_message.h" | #include "WM_message.h" | ||||
| #include "ED_screen.h" | #include "ED_screen.h" | ||||
| #include "UI_interface.h" | #include "UI_interface.h" | ||||
| #include "UI_interface_icons.h" | #include "UI_interface_icons.h" | ||||
| /* -------------------------------------------------------------------- */ | /* -------------------------------------------------------------------- */ | ||||
| /** \name Generic Tool System Region Callbacks | /** \name Generic Tool System Region Callbacks | ||||
| * \{ */ | * \{ */ | ||||
| /** | /** | ||||
| * Callback for #ARegionType.message_subscribe | * Callback for #ARegionType.message_subscribe | ||||
| */ | */ | ||||
| void ED_region_generic_tools_region_message_subscribe(const struct bContext *UNUSED(C), | void ED_region_generic_tools_region_message_subscribe(const wmRegionMessageSubscribeParams *params) | ||||
| struct WorkSpace *UNUSED(workspace), | |||||
| struct Scene *UNUSED(scene), | |||||
| struct bScreen *UNUSED(screen), | |||||
| struct ScrArea *UNUSED(area), | |||||
| struct 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, WorkSpace, tools, &msg_sub_value_region_tag_redraw); | WM_msg_subscribe_rna_anon_prop(mbus, WorkSpace, tools, &msg_sub_value_region_tag_redraw); | ||||
| } | } | ||||
| Show All 36 Lines | |||||