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
15 kBeginHeader()
16
17
18 typedef kStatus (kCall* kApiMemAllocFx)(kPointer provider, kSize size, void* mem);
19
21 typedef kStatus (kCall* kApiMemFreeFx)(kPointer provider, void* mem);
22
24 typedef kStatus(kCall* kApiAssertFx)(const kChar* file, k32u line);
25
27 typedef kStatus(kCall* kApiLogfFx)(const kChar* format, va_list args);
28
30 typedef k32u(kCall* kApiLockFx)(kPointer provider);
31
33 typedef k32u(kCall* kApiUnlockFx)(kPointer provider);
34
58 kFx(kStatus) kApiLib_Construct(kAssembly* assembly);
59
72 kFx(kStatus) kApiLib_SetLogfHandler(kApiLogfFx function);
73
89 kFx(kStatus) kApiLib_SetAssertHandler(kApiAssertFx function);
90
105 kFx(kStatus) kApiLib_SetMemAllocHandlers(kApiMemAllocFx allocFx, kApiMemFreeFx freeFx, kPointer provider);
106
121 kFx(kBool) kApiLib_LeaksDetected();
122
135 kFx(kStatus) kApiLib_EnableNetworkInitialization(kBool enable);
136
150 kFx(kStatus) kApiLib_EnableSymbolInitialization(kBool enable);
151
167 kFx(kStatus) kApiLib_SetSymbolLockHandlers(kApiLockFx lockFx, kApiUnlockFx unlockFx, kPointer provider);
168
169 kEndHeader()
170
171 #include <kApi/kApiLib.x.h>
172
173 #endif
k32u
Represents a 32-bit unsigned integer.
kAssembly
Represents a library of types.
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.
kApiLib::kApiLib_LeaksDetected
kBool kApiLib_LeaksDetected()
Reports whether memory leaks occurred during use of this library.
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.
kChar
Represents a single unit (byte) in a UTF-8 character.
kApiUnlockFx
k32u(kCall * kApiUnlockFx)(kPointer provider)
Function signature for an unlock (exclusive access) operation.
Definition: kApiLib.h:33
kApiLogfFx
kStatus(kCall * kApiLogfFx)(const kChar *format, va_list args)
Function signature for debug log handler.
Definition: kApiLib.h:27
kApiMemAllocFx
kStatus(kCall * kApiMemAllocFx)(kPointer provider, kSize size, void *mem)
Function signature for memory allocation handler.
Definition: kApiLib.h:18
kApiLib::kApiLib_EnableSymbolInitialization
kStatus kApiLib_EnableSymbolInitialization(kBool enable)
Enables or disables initialization of symbol table resources by this library.
kApiDef.h
Core Zen type declarations.
kApiMemFreeFx
kStatus(kCall * kApiMemFreeFx)(kPointer provider, void *mem)
Function signature for memory free handler.
Definition: kApiLib.h:21
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).
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:17
kApiAssertFx
kStatus(kCall * kApiAssertFx)(const kChar *file, k32u line)
Function signature for debug assertion handler.
Definition: kApiLib.h:24
kBool
Represents a boolean value.
kApiLockFx
k32u(kCall * kApiLockFx)(kPointer provider)
Function signature for a lock (exclusive access) operation.
Definition: kApiLib.h:30