Blender V5.3
wm_message_bus.hh File Reference
#include "BLI_string_ref.hh"
#include "DNA_listBase.h"
#include "RNA_prototypes.hh"
#include "RNA_types.hh"
#include <cstdio>

Go to the source code of this file.

Classes

struct  blender::wmMsgTypeInfo
struct  blender::wmMsg
struct  blender::wmMsgSubscribeKey
struct  blender::wmMsgSubscribeValue
struct  blender::wmMsgParams_Static
struct  blender::wmMsg_Static
struct  blender::wmMsgSubscribeKey_Static
struct  blender::wmMsgParams_RemoteIO
struct  blender::wmMsg_RemoteIO
struct  blender::wmMsgSubscribeKey_RemoteIO
struct  blender::wmMsgParams_RNA
struct  blender::wmMsg_RNA
struct  blender::wmMsgSubscribeKey_RNA

Namespaces

namespace  blender
 BMesh Iterators.

Macros

#define WM_MSG_TYPE_NUM   3
#define WM_msg_publish_rna_prop(mbus, id_, data_, type_, prop_)
#define WM_msg_subscribe_rna_prop(mbus, id_, data_, type_, prop_, value)
#define WM_msg_subscribe_rna_anon_type(mbus, type_, value)
#define WM_msg_subscribe_rna_anon_prop(mbus, type_, prop_, value)

Typedefs

using blender::wmMsgNotifyFn
using blender::wmMsgSubscribeValueFreeDataFn
using blender::wmMsgSubscribeValueUpdateIdFn

Enumerations

enum  { blender::WM_MSG_TYPE_RNA = 0 , blender::WM_MSG_TYPE_STATIC = 1 , blender::WM_MSG_TYPE_REMOTE_IO = 2 }
enum  { blender::WM_MSG_STATICTYPE_WINDOW_DRAW = 0 , blender::WM_MSG_STATICTYPE_SCREEN_EDIT = 1 , blender::WM_MSG_STATICTYPE_FILE_READ = 2 }

Functions

void blender::WM_msgtypeinfo_init_static (wmMsgTypeInfo *msgtype_info)
wmMsgSubscribeKey_Static * blender::WM_msg_lookup_static (wmMsgBus *mbus, const wmMsgParams_Static *msg_key_params)
void blender::WM_msg_publish_static_params (wmMsgBus *mbus, const wmMsgParams_Static *msg_key_params)
void blender::WM_msg_publish_static (wmMsgBus *mbus, int event)
void blender::WM_msg_subscribe_static_params (wmMsgBus *mbus, const wmMsgParams_Static *msg_key_params, const wmMsgSubscribeValue *msg_val_params, const char *id_repr)
void blender::WM_msg_subscribe_static (wmMsgBus *mbus, int event, const wmMsgSubscribeValue *msg_val_params, const char *id_repr)
void blender::WM_msgtypeinfo_init_remote_io (wmMsgTypeInfo *msgtype_info)
wmMsgSubscribeKey_RemoteIO * blender::WM_msg_lookup_remote_io (wmMsgBus *mbus, const wmMsgParams_RemoteIO *msg_key_params)
void blender::WM_msg_publish_remote_io_params (wmMsgBus *mbus, const wmMsgParams_RemoteIO *msg_key_params)
void blender::WM_msg_publish_remote_io (wmMsgBus *mbus, const StringRef remote_url)
void blender::WM_msg_subscribe_remote_io_params (wmMsgBus *mbus, const wmMsgParams_RemoteIO *msg_key_params, const wmMsgSubscribeValue *msg_val_params, const char *id_repr)
void blender::WM_msg_subscribe_remote_io (wmMsgBus *mbus, const StringRef remote_url, const wmMsgSubscribeValue *msg_val_params, const char *id_repr)
Public API
void blender::WM_msgbus_types_init ()
wmMsgBus * blender::WM_msgbus_create ()
void blender::WM_msgbus_destroy (wmMsgBus *mbus)
void blender::WM_msgbus_clear_by_owner (wmMsgBus *mbus, void *owner)
void blender::WM_msg_dump (wmMsgBus *mbus, const char *info_str)
void blender::WM_msgbus_handle (wmMsgBus *mbus, bContext *C)
void blender::WM_msg_publish_with_key (wmMsgBus *mbus, wmMsgSubscribeKey *msg_key)
wmMsgSubscribeKey * blender::WM_msg_subscribe_with_key (wmMsgBus *mbus, const wmMsgSubscribeKey *msg_key_test, const wmMsgSubscribeValue *msg_val_params)
void blender::WM_msg_id_update (wmMsgBus *mbus, ID *id_src, ID *id_dst)
void blender::WM_msg_id_remove (wmMsgBus *mbus, const ID *id)
Internal Utilities
void blender::WM_msgtypeinfo_init_rna (wmMsgTypeInfo *msgtype_info)
RNA API
wmMsgSubscribeKey_RNA * blender::WM_msg_lookup_rna (wmMsgBus *mbus, const wmMsgParams_RNA *msg_key_params)
void blender::WM_msg_publish_rna_params (wmMsgBus *mbus, const wmMsgParams_RNA *msg_key_params)
void blender::WM_msg_publish_rna (wmMsgBus *mbus, PointerRNA *ptr, PropertyRNA *prop)
void blender::WM_msg_subscribe_rna_params (wmMsgBus *mbus, const wmMsgParams_RNA *msg_key_params, const wmMsgSubscribeValue *msg_val_params, const char *id_repr)
void blender::WM_msg_subscribe_rna (wmMsgBus *mbus, PointerRNA *ptr, const PropertyRNA *prop, const wmMsgSubscribeValue *msg_val_params, const char *id_repr)
ID variants of RNA API
Note
While we could have a separate type for ID's, use RNA since there is enough overlap.
void blender::WM_msg_subscribe_ID (wmMsgBus *mbus, ID *id, const wmMsgSubscribeValue *msg_val_params, const char *id_repr)
void blender::WM_msg_publish_ID (wmMsgBus *mbus, ID *id)

Macro Definition Documentation

◆ WM_msg_publish_rna_prop

#define WM_msg_publish_rna_prop ( mbus,
id_,
data_,
type_,
prop_ )
Value:
{ \
wmMsgParams_RNA msg_key_params_ = {{}}; \
msg_key_params_.ptr = RNA_pointer_create_discrete(id_, RNA_##type_, data_); \
msg_key_params_.prop = &rna_##type_##_##prop_; \
WM_msg_publish_rna_params(mbus, &msg_key_params_); \
} \
((void)0)
PointerRNA RNA_pointer_create_discrete(ID *id, StructRNA *type, void *data)

Definition at line 263 of file wm_message_bus.hh.

Referenced by blender::ed::object::base_active_refresh(), blender::click_select_channel_grease_pencil_layer(), blender::ed::outliner::collection_hierarchy_delete_exec(), blender::ed::transform::create_orientation_exec(), blender::ed::sculpt_paint::curves_sculptmode_enter(), blender::ed::sculpt_paint::curves_sculptmode_toggle_exec(), blender::ed::transform::delete_orientation_exec(), blender::ed::object::editmode_toggle_exec(), blender::ed::greasepencil::grease_pencil_layer_active_exec(), blender::ed::greasepencil::grease_pencil_layer_add_exec(), blender::ed::greasepencil::grease_pencil_layer_duplicate_exec(), blender::ed::greasepencil::grease_pencil_layer_group_add_exec(), blender::ed::greasepencil::grease_pencil_layer_group_remove_exec(), blender::ed::greasepencil::grease_pencil_layer_move_exec(), blender::ed::greasepencil::grease_pencil_layer_remove_exec(), blender::ed::greasepencil::grease_pencil_merge_layer_exec(), blender::ed::outliner::namebutton_fn(), blender::ui::greasepencil::LayerGroupViewItem::on_activate(), blender::ui::greasepencil::LayerViewItem::on_activate(), blender::ui::greasepencil::LayerNodeDropTarget::on_drop(), blender::ed::outliner::outliner_delete_exec(), blender::ed::greasepencil::paintmode_toggle_exec(), blender::particle_edit_toggle_exec(), blender::ed::object::posemode_exec(), blender::ed::sculpt_paint::sculpt_mode_toggle_exec(), blender::ed::greasepencil::sculptmode_toggle_exec(), blender::ed::transform::select_orientation_exec(), blender::texture_paint_toggle_exec(), blender::ed::outliner::tree_element_grease_pencil_node_activate(), blender::uv_set_2d_cursor_exec(), blender::ed::greasepencil::vertexmode_toggle_exec(), blender::view3d_all_exec(), blender::vpaint_mode_toggle_exec(), blender::ed::greasepencil::weightmode_toggle_exec(), blender::WM_toolsystem_ref_set_from_runtime(), and blender::wpaint_mode_toggle_exec().

◆ WM_msg_subscribe_rna_anon_prop

#define WM_msg_subscribe_rna_anon_prop ( mbus,
type_,
prop_,
value )

◆ WM_msg_subscribe_rna_anon_type

#define WM_msg_subscribe_rna_anon_type ( mbus,
type_,
value )
Value:
{ \
PointerRNA msg_ptr_ = {nullptr, RNA_##type_, nullptr}; \
wmMsgParams_RNA msg_key_params_ = {{}}; \
msg_key_params_.ptr = msg_ptr_; \
\
WM_msg_subscribe_rna_params(mbus, &msg_key_params_, value, __func__); \
} \
((void)0)

Definition at line 281 of file wm_message_bus.hh.

Referenced by blender::view3d_main_region_message_subscribe().

◆ WM_msg_subscribe_rna_prop

#define WM_msg_subscribe_rna_prop ( mbus,
id_,
data_,
type_,
prop_,
value )
Value:
{ \
wmMsgParams_RNA msg_key_params_ = {{}}; \
msg_key_params_.ptr = RNA_pointer_create_discrete(id_, RNA_##type_, data_); \
msg_key_params_.prop = &rna_##type_##_##prop_; \
WM_msg_subscribe_rna_params(mbus, &msg_key_params_, value, __func__); \
} \
((void)0)

Definition at line 271 of file wm_message_bus.hh.

Referenced by blender::ED_area_do_mgs_subscribe_for_tool_header(), blender::ED_area_do_mgs_subscribe_for_tool_ui(), blender::file_main_region_message_subscribe(), blender::ed::asset::shelf::region_message_subscribe(), and blender::topbar_header_region_message_subscribe().

◆ WM_MSG_TYPE_NUM