Used with ecs_observer_init().
More...
#include <flecs.h>
Used with ecs_observer_init().
Definition at line 1274 of file flecs.h.
◆ _canary
int32_t ecs_observer_desc_t::_canary |
Used for validity testing.
Must be 0.
Definition at line 1276 of file flecs.h.
◆ callback
Callback to invoke on an event, invoked when the observer matches.
Definition at line 1292 of file flecs.h.
◆ callback_ctx
void* ecs_observer_desc_t::callback_ctx |
Context associated with callback (for language bindings).
Definition at line 1309 of file flecs.h.
◆ callback_ctx_free
Callback to free callback ctx.
Definition at line 1312 of file flecs.h.
◆ ctx
void* ecs_observer_desc_t::ctx |
User context to pass to callback.
Definition at line 1303 of file flecs.h.
◆ ctx_free
Callback to free ctx.
Definition at line 1306 of file flecs.h.
◆ entity
Existing entity to associate with observer (optional)
Definition at line 1279 of file flecs.h.
◆ events
Events to observe (OnAdd, OnRemove, OnSet)
Definition at line 1285 of file flecs.h.
◆ flags_
ecs_flags32_t ecs_observer_desc_t::flags_ |
◆ last_event_id
int32_t* ecs_observer_desc_t::last_event_id |
Optional shared last event id for multiple observers.
Ensures only one of the observers with the shared id gets triggered for an event
Definition at line 1325 of file flecs.h.
◆ observable
Observable with which to register the observer.
Definition at line 1321 of file flecs.h.
◆ query
Query for observer.
Definition at line 1282 of file flecs.h.
◆ run
Callback invoked on an event.
When left to NULL the default runner is used which matches the event with the observer's query, and calls 'callback' when it matches. A reason to override the run function is to improve performance, if there are more efficient way to test whether an event matches the observer than the general purpose query matcher.
Definition at line 1300 of file flecs.h.
◆ run_ctx
void* ecs_observer_desc_t::run_ctx |
Context associated with run (for language bindings).
Definition at line 1315 of file flecs.h.
◆ run_ctx_free
Callback to free run ctx.
Definition at line 1318 of file flecs.h.
◆ term_index_
int8_t ecs_observer_desc_t::term_index_ |
Used for internal purposes.
Definition at line 1328 of file flecs.h.
◆ yield_existing
bool ecs_observer_desc_t::yield_existing |
When observer is created, generate events from existing data.
For example, EcsOnAdd Position
would match all existing instances of Position
.
Definition at line 1289 of file flecs.h.
The documentation for this struct was generated from the following file: