47 const char* file,
int line);
API export/import macros for cross-platform shared library symbol visibility.
#define API_EXPORT
Marks a symbol for export from (or import into) a shared library.
Definition Api.h:32
EventPriority
Priority levels that control listener dispatch order within an event.
Definition EventTypes.h:19
int32_t EventID
Numeric identifier for an event. -1 is uninitialized, IDs < -1 are internally registered,...
Definition EventTypes.h:8
void(* EventCallback)(IEvent *)
Callback signature for event listeners. The argument is the event payload cast to IEvent*.
Definition EventTypes.h:39
int64_t ListenerID
Numeric identifier for a registered listener; used to unregister later.
Definition EventTypes.h:10
std::shared_ptr< Ship::Events > EventSystemGetEvents()
Returns the current bridged Events component, if any.
API_EXPORT void EventSystemUnregisterListener(EventID ev, ListenerID id)
Removes a previously registered listener.
API_EXPORT void EventSystemCallEvent(EventID id, void *event, const char *file, int line, const char *key)
Fires an event synchronously.
API_EXPORT void EventSystemUnregisterEvent(EventID id)
Removes an event and all listeners registered to it.
void EventSystemSetEvents(std::shared_ptr< Ship::Events > events)
Sets the global Events instance used by the C bridge.
API_EXPORT ListenerID EventSystemRegisterListener(EventID id, EventCallback callback, EventPriority priority, const char *file, int line)
Registers a listener callback for the given event.
API_EXPORT EventID EventSystemRegisterEvent(const char *name)
Registers a new internally managed event type under the given name.
Core namespace for the libultraship engine framework.
Definition gfx_direct3d_common.h:14