|
Blender
V2.93
|
Go to the source code of this file.
Classes | |
| struct | wmMsgTypeInfo |
| struct | wmMsg |
| struct | wmMsgSubscribeKey |
| struct | wmMsgSubscribeValue |
| struct | wmMsgSubscribeValueLink |
| struct | wmMsgParams_Static |
| struct | wmMsg_Static |
| struct | wmMsgSubscribeKey_Static |
| struct | wmMsgParams_RNA |
| struct | wmMsg_RNA |
| struct | wmMsgSubscribeKey_RNA |
Macros | |
| #define | WM_MSG_TYPE_NUM 2 |
| #define | _WM_MESSAGE_EXTERN_BEGIN |
| #define | _WM_MESSAGE_EXTERN_END |
| #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 | |
| typedef void(* | wmMsgNotifyFn) (struct bContext *C, struct wmMsgSubscribeKey *msg_key, struct wmMsgSubscribeValue *msg_val) |
| typedef void(* | wmMsgSubscribeValueFreeDataFn) (struct wmMsgSubscribeKey *msg_key, struct wmMsgSubscribeValue *msg_val) |
| typedef void(* | wmMsgSubscribeValueUpdateIdFn) (struct bContext *C, struct wmMsgBus *mbus, struct ID *id_src, struct ID *id_dst, struct wmMsgSubscribeValue *msg_val) |
| typedef struct wmMsgTypeInfo | wmMsgTypeInfo |
| typedef struct wmMsg | wmMsg |
| typedef struct wmMsgSubscribeKey | wmMsgSubscribeKey |
| typedef struct wmMsgSubscribeValue | wmMsgSubscribeValue |
| typedef struct wmMsgSubscribeValueLink | wmMsgSubscribeValueLink |
| typedef struct wmMsgParams_Static | wmMsgParams_Static |
| typedef struct wmMsg_Static | wmMsg_Static |
| typedef struct wmMsgSubscribeKey_Static | wmMsgSubscribeKey_Static |
| typedef struct wmMsgParams_RNA | wmMsgParams_RNA |
| typedef struct wmMsg_RNA | wmMsg_RNA |
| typedef struct wmMsgSubscribeKey_RNA | wmMsgSubscribeKey_RNA |
Enumerations | |
| enum | { WM_MSG_TYPE_RNA = 0 , WM_MSG_TYPE_STATIC = 1 } |
| enum | { WM_MSG_STATICTYPE_WINDOW_DRAW = 0 , WM_MSG_STATICTYPE_SCREEN_EDIT = 1 , WM_MSG_STATICTYPE_FILE_READ = 2 } |
Functions | |
| void | WM_msgbus_types_init (void) |
| struct wmMsgBus * | WM_msgbus_create (void) |
| void | WM_msgbus_destroy (struct wmMsgBus *mbus) |
| void | WM_msgbus_clear_by_owner (struct wmMsgBus *mbus, void *owner) |
| void | WM_msg_dump (struct wmMsgBus *mbus, const char *info) |
| void | WM_msgbus_handle (struct wmMsgBus *mbus, struct bContext *C) |
| void | WM_msg_publish_with_key (struct wmMsgBus *mbus, wmMsgSubscribeKey *msg_key) |
| wmMsgSubscribeKey * | WM_msg_subscribe_with_key (struct wmMsgBus *mbus, const wmMsgSubscribeKey *msg_key_test, const wmMsgSubscribeValue *msg_val_params) |
| void | WM_msg_id_update (struct wmMsgBus *mbus, struct ID *id_src, struct ID *id_dst) |
| void | WM_msg_id_remove (struct wmMsgBus *mbus, const struct ID *id) |
| void | WM_msgtypeinfo_init_static (wmMsgTypeInfo *msgtype_info) |
| wmMsgSubscribeKey_Static * | WM_msg_lookup_static (struct wmMsgBus *mbus, const wmMsgParams_Static *msg_key_params) |
| void | WM_msg_publish_static_params (struct wmMsgBus *mbus, const wmMsgParams_Static *msg_key_params) |
| void | WM_msg_publish_static (struct wmMsgBus *mbus, int event) |
| void | WM_msg_subscribe_static_params (struct wmMsgBus *mbus, const wmMsgParams_Static *msg_key_params, const wmMsgSubscribeValue *msg_val_params, const char *id_repr) |
| void | WM_msg_subscribe_static (struct wmMsgBus *mbus, int event, const wmMsgSubscribeValue *msg_val_params, const char *id_repr) |
| void | WM_msgtypeinfo_init_rna (wmMsgTypeInfo *msgtype_info) |
| wmMsgSubscribeKey_RNA * | WM_msg_lookup_rna (struct wmMsgBus *mbus, const wmMsgParams_RNA *msg_key_params) |
| void | WM_msg_publish_rna_params (struct wmMsgBus *mbus, const wmMsgParams_RNA *msg_key_params) |
| void | WM_msg_publish_rna (struct wmMsgBus *mbus, PointerRNA *ptr, PropertyRNA *prop) |
| void | WM_msg_subscribe_rna_params (struct wmMsgBus *mbus, const wmMsgParams_RNA *msg_key_params, const wmMsgSubscribeValue *msg_val_params, const char *id_repr) |
| void | WM_msg_subscribe_rna (struct wmMsgBus *mbus, PointerRNA *ptr, const PropertyRNA *prop, const wmMsgSubscribeValue *msg_val_params, const char *id_repr) |
| void | WM_msg_subscribe_ID (struct wmMsgBus *mbus, struct ID *id, const wmMsgSubscribeValue *msg_val_params, const char *id_repr) |
| void | WM_msg_publish_ID (struct wmMsgBus *mbus, struct ID *id) |
| #define _WM_MESSAGE_EXTERN_BEGIN |
Definition at line 207 of file wm_message_bus.h.
| #define _WM_MESSAGE_EXTERN_END |
Definition at line 208 of file wm_message_bus.h.
| #define WM_msg_publish_rna_prop | ( | mbus, | |
| id_, | |||
| data_, | |||
| type_, | |||
| prop_ | |||
| ) |
Definition at line 237 of file wm_message_bus.h.
| #define WM_msg_subscribe_rna_anon_prop | ( | mbus, | |
| type_, | |||
| prop_, | |||
| value | |||
| ) |
Definition at line 275 of file wm_message_bus.h.
| #define WM_msg_subscribe_rna_anon_type | ( | mbus, | |
| type_, | |||
| value | |||
| ) |
Definition at line 261 of file wm_message_bus.h.
| #define WM_msg_subscribe_rna_prop | ( | mbus, | |
| id_, | |||
| data_, | |||
| type_, | |||
| prop_, | |||
| value | |||
| ) |
Definition at line 248 of file wm_message_bus.h.
| #define WM_MSG_TYPE_NUM 2 |
Definition at line 56 of file wm_message_bus.h.
| typedef struct wmMsg_Static wmMsg_Static |
| typedef void(* wmMsgNotifyFn) (struct bContext *C, struct wmMsgSubscribeKey *msg_key, struct wmMsgSubscribeValue *msg_val) |
Definition at line 40 of file wm_message_bus.h.
| typedef struct wmMsgParams_RNA wmMsgParams_RNA |
| typedef struct wmMsgParams_Static wmMsgParams_Static |
| typedef struct wmMsgSubscribeKey wmMsgSubscribeKey |
| typedef struct wmMsgSubscribeKey_RNA wmMsgSubscribeKey_RNA |
| typedef struct wmMsgSubscribeKey_Static wmMsgSubscribeKey_Static |
| typedef struct wmMsgSubscribeValue wmMsgSubscribeValue |
One of many in wmMsgSubscribeKey.values
| typedef void(* wmMsgSubscribeValueFreeDataFn) (struct wmMsgSubscribeKey *msg_key, struct wmMsgSubscribeValue *msg_val) |
Definition at line 43 of file wm_message_bus.h.
| typedef struct wmMsgSubscribeValueLink wmMsgSubscribeValueLink |
One of many in wmMsgSubscribeKey.values
| typedef void(* wmMsgSubscribeValueUpdateIdFn) (struct bContext *C, struct wmMsgBus *mbus, struct ID *id_src, struct ID *id_dst, struct wmMsgSubscribeValue *msg_val) |
Definition at line 47 of file wm_message_bus.h.
| typedef struct wmMsgTypeInfo wmMsgTypeInfo |
| anonymous enum |
| Enumerator | |
|---|---|
| WM_MSG_TYPE_RNA | |
| WM_MSG_TYPE_STATIC | |
Definition at line 52 of file wm_message_bus.h.
| anonymous enum |
| Enumerator | |
|---|---|
| WM_MSG_STATICTYPE_WINDOW_DRAW | |
| WM_MSG_STATICTYPE_SCREEN_EDIT | |
| WM_MSG_STATICTYPE_FILE_READ | |
Definition at line 137 of file wm_message_bus.h.
| void WM_msg_dump | ( | struct wmMsgBus * | mbus, |
| const char * | info | ||
| ) |
Definition at line 111 of file wm_message_bus.c.
References LISTBASE_FOREACH, wmMsgBus::messages, wmMsgTypeInfo::repr, wmMsg::type, wm_msg_subscribe_value_msg_cast(), and wm_msg_types.
Referenced by bpy_msgbus_subscribe_rna(), and WM_msgbus_handle().
Definition at line 224 of file wm_message_bus.c.
References NULL, wmMsgTypeInfo::remove_by_id, WM_MSG_TYPE_NUM, and wm_msg_types.
Referenced by WM_main_remap_editor_id_reference(), and WM_main_remove_notifier_reference().
Definition at line 214 of file wm_message_bus.c.
References NULL, wmMsgTypeInfo::update_by_id, WM_MSG_TYPE_NUM, and wm_msg_types.
Referenced by WM_main_remap_editor_id_reference().
| wmMsgSubscribeKey_RNA* WM_msg_lookup_rna | ( | struct wmMsgBus * | mbus, |
| const wmMsgParams_RNA * | msg_key_params | ||
| ) |
Definition at line 213 of file wm_message_bus_rna.c.
References BLI_gset_lookup(), wmMsgBus::messages_gset, wmMsgSubscribeKey_RNA::msg, wmMsg_RNA::params, and WM_MSG_TYPE_RNA.
Referenced by WM_msg_publish_rna_params().
| wmMsgSubscribeKey_Static* WM_msg_lookup_static | ( | struct wmMsgBus * | mbus, |
| const wmMsgParams_Static * | msg_key_params | ||
| ) |
Definition at line 86 of file wm_message_bus_static.c.
References BLI_gset_lookup(), wmMsgBus::messages_gset, wmMsgSubscribeKey_Static::msg, wmMsg_Static::params, and WM_MSG_TYPE_STATIC.
Referenced by WM_msg_publish_static_params().
Definition at line 347 of file wm_message_bus_rna.c.
References NULL, wmMsgParams_RNA::ptr, RNA_id_pointer_create(), and WM_msg_publish_rna_params().
| void WM_msg_publish_rna | ( | struct wmMsgBus * | mbus, |
| PointerRNA * | ptr, | ||
| PropertyRNA * | prop | ||
| ) |
Definition at line 269 of file wm_message_bus_rna.c.
References ptr, and WM_msg_publish_rna_params().
Referenced by rna_property_update().
| void WM_msg_publish_rna_params | ( | struct wmMsgBus * | mbus, |
| const wmMsgParams_RNA * | msg_key_params | ||
| ) |
Definition at line 221 of file wm_message_bus_rna.c.
References CLOG_INFO, PointerRNA::data, wmMsgSubscribeKey_RNA::head, ID::name, none(), NULL, PointerRNA::owner_id, wmMsgParams_RNA::prop, wmMsgParams_RNA::ptr, RNA_property_identifier(), RNA_struct_identifier(), PointerRNA::type, WM_LOG_MSGBUS_PUB, WM_msg_lookup_rna(), and WM_msg_publish_with_key().
Referenced by bpy_msgbus_publish_rna(), ED_view3d_cursor3d_update(), WM_msg_publish_ID(), and WM_msg_publish_rna().
| void WM_msg_publish_static | ( | struct wmMsgBus * | mbus, |
| int | event | ||
| ) |
Definition at line 104 of file wm_message_bus_static.c.
References WM_msg_publish_static_params().
Referenced by wm_file_read_post().
| void WM_msg_publish_static_params | ( | struct wmMsgBus * | mbus, |
| const wmMsgParams_Static * | msg_key_params | ||
| ) |
Definition at line 94 of file wm_message_bus_static.c.
References CLOG_INFO, wmMsgParams_Static::event, wmMsgSubscribeKey_Static::head, WM_LOG_MSGBUS_PUB, WM_msg_lookup_static(), and WM_msg_publish_with_key().
Referenced by WM_msg_publish_static().
| void WM_msg_publish_with_key | ( | struct wmMsgBus * | mbus, |
| wmMsgSubscribeKey * | msg_key | ||
| ) |
Definition at line 193 of file wm_message_bus.c.
References BLI_listbase_count(), CLOG_INFO, LISTBASE_FOREACH, wmMsgBus::messages_tag_count, NULL, wmMsgSubscribeKey::values, and WM_LOG_MSGBUS_SUB.
Referenced by WM_msg_publish_rna_params(), and WM_msg_publish_static_params().
| void WM_msg_subscribe_ID | ( | struct wmMsgBus * | mbus, |
| struct ID * | id, | ||
| const wmMsgSubscribeValue * | msg_val_params, | ||
| const char * | id_repr | ||
| ) |
Definition at line 337 of file wm_message_bus_rna.c.
References NULL, wmMsgParams_RNA::ptr, RNA_id_pointer_create(), and WM_msg_subscribe_rna_params().
| void WM_msg_subscribe_rna | ( | struct wmMsgBus * | mbus, |
| PointerRNA * | ptr, | ||
| const PropertyRNA * | prop, | ||
| const wmMsgSubscribeValue * | msg_val_params, | ||
| const char * | id_repr | ||
| ) |
Definition at line 314 of file wm_message_bus_rna.c.
References ptr, and WM_msg_subscribe_rna_params().
Referenced by ED_region_do_draw(), file_main_region_message_subscribe(), gizmo2d_pivot_point_message_subscribe(), gizmo_mesh_extrude_message_subscribe(), gizmo_mesh_spin_init_message_subscribe(), gizmo_xform_message_subscribe(), graph_region_message_subscribe(), nla_main_region_message_subscribe(), saction_main_region_message_subscribe(), sequencer_main_region_message_subscribe(), ui_block_message_subscribe(), WIDGETGROUP_camera_message_subscribe(), WIDGETGROUP_gizmo_message_subscribe(), and WM_gizmo_target_property_subscribe_all().
| void WM_msg_subscribe_rna_params | ( | struct wmMsgBus * | mbus, |
| const wmMsgParams_RNA * | msg_key_params, | ||
| const wmMsgSubscribeValue * | msg_val_params, | ||
| const char * | id_repr | ||
| ) |
Definition at line 278 of file wm_message_bus_rna.c.
References CLOG_INFO, PointerRNA::data, wmMsgParams_RNA::data_path, wmMsg_RNA::head, wmMsgSubscribeKey_RNA::head, wmMsg::id, wmMsgSubscribeValue::is_persistent, wmMsgSubscribeKey_RNA::msg, ID::name, none(), NULL, PointerRNA::owner_id, wmMsg_RNA::params, wmMsgParams_RNA::prop, wmMsgParams_RNA::ptr, RNA_path_from_ID_to_struct(), RNA_property_identifier(), RNA_struct_identifier(), PointerRNA::type, wmMsg::type, WM_LOG_MSGBUS_SUB, WM_msg_subscribe_with_key(), and WM_MSG_TYPE_RNA.
Referenced by bpy_msgbus_subscribe_rna(), gizmo_mesh_extrude_message_subscribe(), gizmo_mesh_spin_init_message_subscribe(), graph_region_message_subscribe(), nla_channel_region_message_subscribe(), saction_channel_region_message_subscribe(), sequencer_main_region_message_subscribe(), view3d_header_region_message_subscribe(), view3d_main_region_message_subscribe(), WM_msg_subscribe_ID(), and WM_msg_subscribe_rna().
| void WM_msg_subscribe_static | ( | struct wmMsgBus * | mbus, |
| int | event, | ||
| const wmMsgSubscribeValue * | msg_val_params, | ||
| const char * | id_repr | ||
| ) |
Definition at line 128 of file wm_message_bus_static.c.
References WM_msg_subscribe_static_params().
| void WM_msg_subscribe_static_params | ( | struct wmMsgBus * | mbus, |
| const wmMsgParams_Static * | msg_key_params, | ||
| const wmMsgSubscribeValue * | msg_val_params, | ||
| const char * | id_repr | ||
| ) |
Definition at line 112 of file wm_message_bus_static.c.
References wmMsg_Static::head, wmMsgSubscribeKey_Static::head, wmMsg::id, wmMsgSubscribeKey_Static::msg, NULL, wmMsg_Static::params, wmMsg::type, WM_msg_subscribe_with_key(), and WM_MSG_TYPE_STATIC.
Referenced by WM_msg_subscribe_static().
| wmMsgSubscribeKey* WM_msg_subscribe_with_key | ( | struct wmMsgBus * | mbus, |
| const wmMsgSubscribeKey * | msg_key_test, | ||
| const wmMsgSubscribeValue * | msg_val_params | ||
| ) |
| msg_key_test | Needs following wmMsgSubscribeKey fields filled in:
|
Definition at line 160 of file wm_message_bus.c.
References BLI_addtail(), BLI_assert, BLI_gset_ensure_p_ex(), LISTBASE_FOREACH, MEM_mallocN, wmMsgBus::messages, wmMsgBus::messages_gset, wmMsgTypeInfo::msg_key_size, wmMsgSubscribeValue::notify, NULL, wmMsgSubscribeValue::owner, wmMsgSubscribeValueLink::params, type, wmMsg::type, wmMsgSubscribeValue::user_data, wmMsgSubscribeKey::values, wm_msg_subscribe_value_msg_cast(), and wm_msg_types.
Referenced by WM_msg_subscribe_rna_params(), and WM_msg_subscribe_static_params().
| void WM_msgbus_clear_by_owner | ( | struct wmMsgBus * | mbus, |
| void * | owner | ||
| ) |
Definition at line 78 of file wm_message_bus.c.
References BLI_assert, BLI_gset_remove(), BLI_listbase_is_empty(), BLI_remlink(), ListBase::first, wmMsgTypeInfo::gset, wmMsgTypeInfo::key_free_fn, MEM_freeN, wmMsgBus::messages, wmMsgBus::messages_gset, wmMsgBus::messages_tag_count, wmMsgSubscribeKey::next, wmMsgSubscribeValueLink::next, wmMsg::type, UNUSED_VARS_NDEBUG, wmMsgSubscribeKey::values, wm_msg_subscribe_value_msg_cast(), and wm_msg_types.
Referenced by ED_region_do_draw(), and ED_region_exit().
| struct wmMsgBus* WM_msgbus_create | ( | void | ) |
Definition at line 57 of file wm_message_bus.c.
References BLI_gset_new_ex(), wmMsgTypeInfo::cmp_fn, wmMsgTypeInfo::gset, wmMsgTypeInfo::hash_fn, MEM_callocN, wmMsgBus::messages_gset, WM_MSG_TYPE_NUM, and wm_msg_types.
Referenced by WM_check().
| void WM_msgbus_destroy | ( | struct wmMsgBus * | mbus | ) |
Definition at line 69 of file wm_message_bus.c.
References BLI_gset_free(), wmMsgTypeInfo::gset, wmMsgTypeInfo::key_free_fn, MEM_freeN, wmMsgBus::messages_gset, WM_MSG_TYPE_NUM, and wm_msg_types.
Referenced by wm_close_and_free().
Definition at line 122 of file wm_message_bus.c.
References BLI_assert, C, LISTBASE_FOREACH, wmMsgBus::messages, wmMsgBus::messages_tag_count, and WM_msg_dump().
Referenced by wm_event_do_notifiers().
| void WM_msgbus_types_init | ( | void | ) |
Definition at line 50 of file wm_message_bus.c.
References wm_msg_init_fn, WM_MSG_TYPE_NUM, and wm_msg_types.
Referenced by WM_init().
| void WM_msgtypeinfo_init_rna | ( | wmMsgTypeInfo * | msgtype_info | ) |
Definition at line 198 of file wm_message_bus_rna.c.
References wmMsgTypeInfo::cmp_fn, wmMsgTypeInfo::gset, wmMsgTypeInfo::hash_fn, wmMsgTypeInfo::key_free_fn, wmMsgTypeInfo::msg_key_size, wmMsgTypeInfo::remove_by_id, wmMsgTypeInfo::repr, wmMsgTypeInfo::update_by_id, wm_msg_rna_gset_cmp(), wm_msg_rna_gset_hash(), wm_msg_rna_gset_key_free(), wm_msg_rna_remove_by_id(), wm_msg_rna_repr(), and wm_msg_rna_update_by_id().
| void WM_msgtypeinfo_init_static | ( | wmMsgTypeInfo * | msgtype_info | ) |
Definition at line 74 of file wm_message_bus_static.c.
References wmMsgTypeInfo::cmp_fn, wmMsgTypeInfo::gset, wmMsgTypeInfo::hash_fn, wmMsgTypeInfo::key_free_fn, wmMsgTypeInfo::msg_key_size, wmMsgTypeInfo::repr, wm_msg_static_gset_cmp(), wm_msg_static_gset_hash(), wm_msg_static_gset_key_free(), and wm_msg_static_repr().