Zen API

- Home
- Topics
- Types
- Files

All Classes Files Functions Variables Typedefs Friends Macros Modules Pages
kApiLib.h
Go to the documentation of this file.
1
10 #include <kApi/kApiDef.h> //--inclusion order controlled by kApiDef
11
12 #ifndef K_API_LIB_H
13 #define K_API_LIB_H
14
19 typedef kStatus (kCall* kApiMemAllocFx)(kPointer provider, kSize size, void* mem);
20
25 typedef kStatus (kCall* kApiMemFreeFx)(kPointer provider, void* mem);
26
31 typedef kStatus(kCall* kApiAssertFx)(const kChar* file, k32u line);
32
37 typedef kStatus(kCall* kApiLogfFx)(const kChar* format, va_list args);
38
43 typedef k32u(kCall* kApiLockFx)(kPointer provider);
44
49 typedef k32u(kCall* kApiUnlockFx)(kPointer provider);
50
74 kFx(kStatus) kApiLib_Construct(kAssembly* assembly);
75
88 kFx(kStatus) kApiLib_SetLogfHandler(kApiLogfFx function);
89
105 kFx(kStatus) kApiLib_SetAssertHandler(kApiAssertFx function);
106
121 kFx(kStatus) kApiLib_SetMemAllocHandlers(kApiMemAllocFx allocFx, kApiMemFreeFx freeFx, kPointer provider);
122
137 kInlineFx(kSize) kApiLib_LeaksDetected();
138
151 kFx(kStatus) kApiLib_EnableNetworkInitialization(kBool enable);
152
166 kFx(kStatus) kApiLib_EnableSymbolInitialization(kBool enable);
167
183 kFx(kStatus) kApiLib_SetSymbolLockHandlers(kApiLockFx lockFx, kApiUnlockFx unlockFx, kPointer provider);
184
185 #include <kApi/kApiLib.x.h>
186
187 #endif
k32u
Represents a 32-bit unsigned integer.
kApiLib::kApiMemFreeFx
kStatus(kCall * kApiMemFreeFx)(kPointer provider, void *mem)
Function signature for memory free handler.
Definition: kApiLib.h:25
kAssembly
Represents a library of types.
kApiLib::kApiMemAllocFx
kStatus(kCall * kApiMemAllocFx)(kPointer provider, kSize size, void *mem)
Function signature for memory allocation handler.
Definition: kApiLib.h:19
kPointer
Represents a void pointer.
kApiLib::kApiLib_SetMemAllocHandlers
kStatus kApiLib_SetMemAllocHandlers(kApiMemAllocFx allocFx, kApiMemFreeFx freeFx, kPointer provider)
Sets handler functions for memory alloc/free operations.
kApiLib::kApiLib_SetAssertHandler
kStatus kApiLib_SetAssertHandler(kApiAssertFx function)
Sets a handler function for debug assertions.
kSize
Represents an unsigned integer that can store a pointer address.
kApiLib::kApiLib_SetLogfHandler
kStatus kApiLib_SetLogfHandler(kApiLogfFx function)
Sets a handler function for debug logging operations.
kApiLib::kApiAssertFx
kStatus(kCall * kApiAssertFx)(const kChar *file, k32u line)
Function signature for debug assertion handler.
Definition: kApiLib.h:31
kInlineFx
#define kInlineFx(TYPE)
Inline method declaration helper.
Definition: kApiDef.h:26
kChar
Represents a single unit (byte) in a UTF-8 character.
kMsgQueueItemOption::kStatus
typedef kStatus(kCall *kMsgQueueDropFx)(kPointer receiver
Defines the signature of a callback function to handle dropped items.
kApiLib::kApiLib_LeaksDetected
kSize kApiLib_LeaksDetected()
Reports memory leaks that occurred during use of this library.
kApiLib::kApiLib_EnableSymbolInitialization
kStatus kApiLib_EnableSymbolInitialization(kBool enable)
Enables or disables initialization of symbol table resources by this library.
kApiLib::kApiUnlockFx
k32u(kCall * kApiUnlockFx)(kPointer provider)
Function signature for an unlock (exclusive access) operation.
Definition: kApiLib.h:49
kApiDef.h
Core Zen type declarations.
kApiLib::kApiLib_EnableNetworkInitialization
kStatus kApiLib_EnableNetworkInitialization(kBool enable)
Enables or disables initialization of network services by this library.
kApiLib::kApiLib_Construct
kStatus kApiLib_Construct(kAssembly *assembly)
Constructs the Zen API type assembly (kApiLib).
kApiLib::kApiLogfFx
kStatus(kCall * kApiLogfFx)(const kChar *format, va_list args)
Function signature for debug log handler.
Definition: kApiLib.h:37
kStatus
Represents an error code.
kApiLib::kApiLib_SetSymbolLockHandlers
kStatus kApiLib_SetSymbolLockHandlers(kApiLockFx lockFx, kApiUnlockFx unlockFx, kPointer provider)
Sets handler functions for symbol table lock/unlock operations.
kCall
#define kCall
kApi standard function calling convention.
Definition: kApiDef.h:15
kBool
Represents a boolean value.
kApiLib::kApiLockFx
k32u(kCall * kApiLockFx)(kPointer provider)
Function signature for a lock (exclusive access) operation.
Definition: kApiLib.h:43