16#include "RNA_prototypes.hh"
24#define ASSERT_CALLBACKS_INITIALIZED() \
25 BLI_assert_msg(callbacks_initialized, \
26 "Callbacks should be initialized with BKE_callback_global_init() before using " \
27 "the callback system.")
36 funcstore.func(bmain, pointers, pointers_num, funcstore.arg);
60 PointerRNA *pointers[2] = {&id_ptr, &depsgraph_ptr};
110 if (funcstore->
alloc) {
111 MEM_delete(funcstore);
127 for (funcstore = lb->first(); funcstore; funcstore = funcstore_next) {
128 funcstore_next = funcstore->
next;
Read Blender memory allocation and freeing.
#define BLI_assert_msg(a, msg)
#define ASSERT_CALLBACKS_INITIALIZED()
void BKE_callback_exec_id_depsgraph(Main *bmain, ID *id, Depsgraph *depsgraph, eCbEvent evt)
void BKE_callback_exec_string(Main *bmain, const char *str, eCbEvent evt)
void BKE_callback_exec_null(Main *bmain, eCbEvent evt)
PointerRNA RNA_id_pointer_create(ID *id)
void BKE_callback_exec_boolean(Main *bmain, bool value, eCbEvent evt)
void BKE_callback_exec_id(Main *bmain, ID *id, eCbEvent evt)
void BKE_callback_add(bCallbackFuncStore *funcstore, eCbEvent evt)
int BLI_findindex(const ListBase *listbase, const void *vlink) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
void BLI_remlink(ListBase *listbase, void *vlink) ATTR_NONNULL(1)
BMesh const char void * data
void BKE_callback_remove(bCallbackFuncStore *funcstore, eCbEvent evt)
constexpr size_t ARRAY_SIZE(const T(&arg)[N]) noexcept
PointerRNA RNA_pointer_create_discrete(ID *id, StructRNA *type, void *data)
void BKE_callback_global_finalize()
void BLI_addtail(ListBase *listbase, void *vlink) ATTR_NONNULL(1)
static bool callbacks_initialized
void BKE_callback_global_init()
static ListBaseT< bCallbackFuncStore > callback_slots[BKE_CB_EVT_TOT]
void BKE_callback_exec(Main *bmain, PointerRNA **pointers, int pointers_num, eCbEvent evt)
bCallbackFuncStore * next