Zen API

- Home
- Topics
- Types
- Files

All Classes Files Functions Variables Typedefs Friends Macros Modules Pages
kEvent.h
Go to the documentation of this file.
1
10 #ifndef K_API_EVENT_H
11 #define K_API_EVENT_H
12
13 #include <kApi/kApiDef.h>
14
15 kBeginHeader()
16
17
23 //typedef kObject kEvent; --forward-declared in kApiDef.x.h
24
25
33 kFx(kStatus) kEvent_Construct(kEvent* evnt, kAlloc allocator);
34
44 kFx(kStatus) kEvent_Add(kEvent evnt, kCallbackFx function, kPointer receiver);
45
55 kFx(kStatus) kEvent_Remove(kEvent evnt, kCallbackFx function, kPointer receiver);
56
64 kFx(kStatus) kEvent_Clear(kEvent evnt);
65
75 kFx(kStatus) kEvent_Notify(kEvent evnt, kPointer sender, void* args);
76
84 kFx(kSize) kEvent_Count(kEvent evnt);
85
96 kFx(kList) kEvent_Listeners(kEvent evnt);
97
99 #define kEvent_Listeners_(EV) kxEvent_Listeners_(EV)
100
102 kEndHeader()
103
104 #include <kApi/Utils/kEvent.x.h>
105
106 #endif
kEvent::kEvent_Count
kSize kEvent_Count(kEvent evnt)
Count of event listeners.
kPointer
Represents a void pointer.
kSize
Represents an unsigned integer that can store a pointer address.
kAlloc
Abstract base class for memory allocator types.
kEvent
Represents a list of callbacks.
kEvent::kEvent_Construct
kStatus kEvent_Construct(kEvent *evnt, kAlloc allocator)
Constructs a kEvent object.
kEvent::kEvent_Listeners
kList kEvent_Listeners(kEvent evnt)
Gets the internal list of event listeners.
kApiDef.h
Core Zen type declarations.
kEvent::kEvent_Clear
kStatus kEvent_Clear(kEvent evnt)
Removes all listeners from the event.
kCallbackFx
kStatus(kCall * kCallbackFx)(kPointer receiver, kPointer sender, void *args)
Callback signature for a generic event handler.
Definition: kApiDef.h:1480
kEvent::kEvent_Remove
kStatus kEvent_Remove(kEvent evnt, kCallbackFx function, kPointer receiver)
Removes a listener from the event.
kEvent::kEvent_Add
kStatus kEvent_Add(kEvent evnt, kCallbackFx function, kPointer receiver)
Adds a listener to the event.
kList
Represents a doubly-linked list.
kStatus
Represents an error code.
kEvent::kEvent_Notify
kStatus kEvent_Notify(kEvent evnt, kPointer sender, void *args)
Notifies all event listeners.