Zen API

- Home
- Topics
- Types
- Files

All Classes Files Functions Variables Typedefs Friends Macros Modules Pages
kApiDef.h
Go to the documentation of this file.
1
10 #ifndef K_API_API_DEF_H
11 #define K_API_API_DEF_H
12
13 #include <kApi/kApiCfg.h>
14
15 #define kCall xkCall
16 #define kDlCall xkDlCall
17
18 #if defined(K_EMIT)
19 # define kFx(TYPE) kExportFx(TYPE)
20 # define kDx(TYPE) kExportDx(TYPE)
21 #else
22 # define kFx(TYPE) kImportFx(TYPE)
23 # define kDx(TYPE) kImportDx(TYPE)
24 #endif
25
26 #define kInlineFx(TYPE) xkInlineFx(TYPE)
27
28 typedef void (kCall* kFunction)();
29
38 typedef xk8u k8u;
39
41 #define k8U_MIN (0)
42 #define k8U_MAX (255U)
43 #define k8U_NULL (k8U_MAX)
44
54 typedef xk16u k16u;
55
57 #define k16U_MIN (0)
58 #define k16U_MAX (65535U)
59 #define k16U_NULL (k16U_MAX)
60
70 typedef xk32u k32u;
71
73 #define k32U_MIN (0)
74 #define k32U_MAX (4294967295U)
75 #define k32U_NULL (k32U_MAX)
76
86 typedef xk64u k64u;
87
89 #define k64U(CONST) xk64U(CONST)
90 #define k64U_MIN k64U(0)
91 #define k64U_MAX k64U(18446744073709551615)
92 #define k64U_NULL (k64U_MAX)
93
95 #define kINFINITE k64U_MAX
96
97
105 typedef xk8s k8s;
106
108 #define k8S_MAX (127)
109 #define k8S_MIN (-k8S_MAX -1)
110 #define k8S_NULL (k8S_MIN)
111
121 typedef xk16s k16s;
122
124 #define k16S_MAX (32767)
125 #define k16S_MIN (-k16S_MAX -1)
126 #define k16S_NULL (k16S_MIN)
127
137 typedef xk32s k32s;
138
140 #define k32S_MAX (2147483647)
141 #define k32S_MIN (-k32S_MAX -1)
142 #define k32S_NULL (k32S_MIN)
143
153 typedef xk64s k64s;
154
156 #define k64S(CONST) xk64S(CONST)
157 #define k64S_MAX k64S(9223372036854775807)
158 #define k64S_MIN (-k64S_MAX -1)
159 #define k64S_NULL (k64S_MIN)
160
170 typedef xk32f k32f;
171
173 #define k32F_MIN (1.175494351e-38F)
174 #define k32F_MAX (3.402823466e+38F)
175 #define k32F_NULL (-k32F_MAX)
176 #define k32F_DIGITS (9)
177
187 typedef xk64f k64f;
188
190 #define k64F_MIN (2.2250738585072014e-308)
191 #define k64F_MAX (1.7976931348623157e+308)
192 #define k64F_NULL (-k64F_MAX)
193 #define k64F_DIGITS (17)
194
204 kFx(k32s) k64f_IsNanOrInf(k64f value);
205
214 typedef xkByte kByte;
215
224 typedef xkSize kSize;
225
227 #define kSIZE_MAX xkSIZE_MAX
228 #define kSIZE_NULL kSIZE_MAX
229
241 kInlineFx(kSize) kSize_Align(kSize value, kSize to)
242 {
243 return ((value >> to) + !!(value & ((1 << to) - 1))) << to;
244 }
245
252 typedef xkSSize kSSize;
253
255 #define kSSIZE_MIN xkSSIZE_MIN
256 #define kSSIZE_MAX xkSSIZE_MAX
257 #define kSSIZE_NULL kSSIZE_MIN
258
267 typedef void* kPointer;
268
269 #define kNULL (0)
270
271
280 kInlineFx(void*) kPointer_ByteOffset(const void* pointer, kSSize offset)
281 {
282 return (kByte*)pointer + offset;
283 }
284
294 kInlineFx(void*) kPointer_ItemOffset(const void* pointer, kSSize itemIndex, kSize itemSize)
295 {
296 return kPointer_ByteOffset(pointer, itemIndex*(kSSize)itemSize);
297 }
298
307 kInlineFx(kSSize) kPointer_Diff(void* a, void* b)
308 {
309 return (kSSize)a - (kSSize)b;
310 }
311
320 #define kPointer_ReadAs(POINTER, TYPE) \
321 (*(TYPE*)(POINTER))
322
331 #define kPointer_WriteAs(POINTER, VALUE, TYPE) \
332 (*(TYPE*)(POINTER) = (TYPE)(VALUE))
333
341 #define kIsNull(POINTER) \
342 ((POINTER) == kNULL)
343
352 typedef k32s kBool;
353
355 #define kFALSE (0)
356 #define kTRUE (1)
357
367 typedef xkChar kChar;
368
376 kInlineFx(kChar) kChar_ToLower(kChar ch)
377 {
378 return (ch >= 'A' && ch <= 'Z') ? (ch - 'A' + 'a') : ch;
379 }
380
388 kInlineFx(kChar) kChar_ToUpper(kChar ch)
389 {
390 return (ch >= 'a' && ch <= 'z') ? (ch - 'a' + 'A') : ch;
391 }
392
400 kInlineFx(kBool) kChar_IsSpace(kChar ch)
401 {
402 return ch == ' ';
403 }
404
412 kInlineFx(kBool) kChar_IsLetter(kChar ch)
413 {
414 return ((ch >= 'a') && (ch <= 'z') ) || ((ch >= 'A') && (ch <= 'Z'));
415 }
416
424 kInlineFx(kBool) kChar_IsDigit(kChar ch)
425 {
426 return ch >= '0' && ch <= '9';
427 }
428
437 typedef kChar kText16[16];
438
447 typedef kChar kText32[32];
448
457 typedef kChar kText64[64];
458
467 typedef kChar kText128[128];
468
477 typedef kChar kText256[256];
478
487 typedef k32s kStatus;
488
490 #define kERROR_STATE (-1000)
491 #define kERROR_NOT_FOUND (-999)
492 #define kERROR_COMMAND (-998)
493 #define kERROR_PARAMETER (-997)
494 #define kERROR_UNIMPLEMENTED (-996)
495 #define kERROR_MEMORY (-994)
496 #define kERROR_TIMEOUT (-993)
497 #define kERROR_INCOMPLETE (-992)
498 #define kERROR_STREAM (-991)
499 #define kERROR_CLOSED (-990)
500 #define kERROR_VERSION (-989)
501 #define kERROR_ABORT (-988)
502 #define kERROR_ALREADY_EXISTS (-987)
503 #define kERROR_NETWORK (-986)
504 #define kERROR_HEAP (-985)
505 #define kERROR_FORMAT (-984)
506 #define kERROR_READ_ONLY (-983)
507 #define kERROR_WRITE_ONLY (-982)
508 #define kERROR_BUSY (-981)
509 #define kERROR_CONFLICT (-980)
510 #define kERROR_OS (-979)
511 #define kERROR_DEVICE (-978)
512 #define kERROR_FULL (-977)
513 #define kERROR_IN_PROGRESS (-976)
514 #define kERROR (0)
515 #define kOK (1)
516
527 kFx(const kChar*) kStatus_Name(kStatus status);
528
536 kInlineFx(kBool) kIsError(kStatus status)
537 {
538 return status != kOK;
539 }
540
548 kInlineFx(kBool) kSuccess(kStatus status)
549 {
550 return status == kOK;
551 }
552
561 #define kCheck(EXPRESSION) \
562 xkCheck(EXPRESSION)
563
573 #define kCheckTrue(EXPRESSION, STATUS) \
574 xkCheckTrue(EXPRESSION, STATUS)
575
584 #define kCheckArgs(EXPRESSION) \
585 xkCheckArgs(EXPRESSION)
586
595 #define kCheckState(EXPRESSION) \
596 xkCheckState(EXPRESSION)
597
603 #define kTry \
604 xkTry
605
612 #define kThrow(EXPRESSION) \
613 xkThrow(EXPRESSION)
614
624 #define kTest(EXPRESSION) \
625 xkTest(EXPRESSION)
626
637 #define kTestTrue(EXPRESSION, STATUS) \
638 xkTestTrue(EXPRESSION, STATUS)
639
649 #define kTestArgs(EXPRESSION) \
650 xkTestArgs(EXPRESSION)
651
661 #define kTestState(EXPRESSION) \
662 xkTestState(EXPRESSION)
663
670 #define kCatch(STATUS_POINTER) \
671 xkCatch(STATUS_POINTER)
672
681 #define kEndCatch(STATUS) \
682 xkEndCatch(STATUS)
683
689 #define kFinally \
690 xkFinally
691
700 #define kEndFinally() \
701 xkEndFinally()
702
709 #define kCatchEx(STATUS_POINTER) \
710 xkCatchEx(STATUS_POINTER)
711
722 #define kEndCatchEx(STATUS) \
723 xkEndCatchEx(STATUS)
724
730 #define kFinallyEx \
731 xkFinallyEx
732
741 #define kEndFinallyEx() \
742 xkEndFinallyEx()
743
751 #define kAssert(EXPRESSION) \
752 xkAssert(EXPRESSION)
753
764 #define kAssertType(OBJECT, SYMBOL) \
765 xkAssertType(OBJECT, SYMBOL)
766
774 #define kTrace(TAG) \
775 xkTrace(TAG)
776
785 typedef k32u kVersion;
786
787 #define kVERSION_NULL (k32U_NULL) // kVersion invalid value.
788
799 kInlineFx(kVersion) kVersion_Create(k32u major, k32u minor, k32u release, k32u build)
800 {
801 return (major & 0xFF) << 24 |
802 (minor & 0xFF) << 16 |
803 (release & 0xFF) << 8 |
804 (build & 0xFF);
805 }
806
817 #define kVersion_Stringify_(MAJOR, MINOR, RELEASE, BUILD) \
818 xkStringize(MAJOR) "." xkStringize(MINOR) "." xkStringize(RELEASE) "." xkStringize(BUILD)
819
828 kFx(kStatus) kVersion_Parse(kVersion* version, const kChar* buffer);
829
839 kFx(kStatus) kVersion_Format(kVersion version, kChar* buffer, kSize capacity);
840
852 kInlineFx(k32s) kVersion_Compare(kVersion version1, kVersion version2)
853 {
854 return (k32s)version1 - (k32s)version2;
855 }
856
864 kInlineFx(k8u) kVersion_Major(kVersion version)
865 {
866 return (version >> 24) & 0xFF;
867 }
868
876 kInlineFx(k8u) kVersion_Minor(kVersion version)
877 {
878 return (version >> 16) & 0xFF;
879 }
880
888 kInlineFx(k8u) kVersion_Release(kVersion version)
889 {
890 return (version >> 8) & 0xFF;
891 }
892
900 kInlineFx(k8u) kVersion_Build(kVersion version)
901 {
902 return (version) & 0xFF;
903 }
904
911 typedef k32s kEndianness;
912
914 #define kENDIANNESS_LITTLE (1)
915 #define kENDIANNESS_BIG (2)
916
923 kInlineFx(kEndianness) kEndianness_Host()
924 {
925 return K_ENDIANNESS;
926 }
927
934 kInlineFx(kBool) kEndianness_ShouldReverse(kEndianness endianness)
935 {
936 return endianness != kEndianness_Host();
937 }
938
953 kFx(kStatus) k8u_Format(k8u value, kChar* buffer, kSize capacity);
954
963 kFx(kStatus) k8u_Parse(k8u* value, const kChar* str);
964
979 kFx(kStatus) k8s_Format(k8s value, kChar* buffer, kSize capacity);
980
989 kFx(kStatus) k8s_Parse(k8s* value, const kChar* str);
990
1005 kFx(kStatus) k16u_Format(k16u value, kChar* buffer, kSize capacity);
1006
1015 kFx(kStatus) k16u_Parse(k16u* value, const kChar* str);
1016
1031 kFx(kStatus) k16s_Format(k16s value, kChar* buffer, kSize capacity);
1032
1041 kFx(kStatus) k16s_Parse(k16s* value, const kChar* str);
1042
1057 kFx(kStatus) k32u_Format(k32u value, kChar* buffer, kSize capacity);
1058
1067 kFx(kStatus) k32u_Parse(k32u* value, const kChar* str);
1068
1083 kFx(kStatus) k32s_Format(k32s value, kChar* buffer, kSize capacity);
1084
1093 kFx(kStatus) k32s_Parse(k32s* value, const kChar* str);
1094
1109 kFx(kStatus) k64u_Format(k64u value, kChar* buffer, kSize capacity);
1110
1119 kFx(kStatus) k64u_Parse(k64u* value, const kChar* str);
1120
1135 kFx(kStatus) k64s_Format(k64s value, kChar* buffer, kSize capacity);
1136
1145 kFx(kStatus) k64s_Parse(k64s* value, const kChar* str);
1146
1161 kFx(kStatus) kBool_Format(kBool value, kChar* buffer, kSize capacity);
1162
1171 kFx(kStatus) kBool_Parse(kBool* value, const kChar* str);
1172
1187 kFx(kStatus) kSize_Format(kSize value, kChar* buffer, kSize capacity);
1188
1197 kFx(kStatus) kSize_Parse(kSize* value, const kChar* str);
1198
1213 kFx(kStatus) kSSize_Format(kSSize value, kChar* buffer, kSize capacity);
1214
1223 kFx(kStatus) kSSize_Parse(kSSize* value, const kChar* str);
1224
1239 kFx(kStatus) k32f_Format(k32f value, kChar* buffer, kSize capacity);
1240
1249 kFx(kStatus) k32f_Parse(k32f* value, const kChar* str);
1250
1265 kFx(kStatus) k64f_Format(k64f value, kChar* buffer, kSize capacity);
1266
1275 kFx(kStatus) k64f_Parse(k64f* value, const kChar* str);
1276
1285 typedef struct kPoint16s
1286 {
1287 k16s x;
1288 k16s y;
1289 } kPoint16s;
1290
1299 typedef struct kPoint32s
1300 {
1301 k32s x;
1302 k32s y;
1303 } kPoint32s;
1304
1313 typedef struct kPoint32f
1314 {
1315 k32f x;
1316 k32f y;
1317 } kPoint32f;
1318
1327 typedef struct kPoint64f
1328 {
1329 k64f x;
1330 k64f y;
1331 } kPoint64f;
1332
1342 #define kPoint_Init_(POINT, X, Y) xkPoint_Init_(POINT, X, Y)
1343
1352 typedef struct kPoint3d16s
1353 {
1354 k16s x;
1355 k16s y;
1356 k16s z;
1357 } kPoint3d16s;
1358
1367 typedef struct kPoint3d32s
1368 {
1369 k32s x;
1370 k32s y;
1371 k32s z;
1372 } kPoint3d32s;
1373
1382 typedef struct kPoint3d32f
1383 {
1384 k32f x;
1385 k32f y;
1386 k32f z;
1387 } kPoint3d32f;
1388
1397 typedef struct kPoint3d64f
1398 {
1399 k64f x;
1400 k64f y;
1401 k64f z;
1402 } kPoint3d64f;
1403
1414 #define kPoint3d_Init_(POINT, X, Y, Z) xkPoint3d_Init_(POINT, X, Y, Z)
1415
1424 typedef struct kPoint4d16s
1425 {
1426 k16s x;
1427 k16s y;
1428 k16s z;
1429 k16s w;
1430 } kPoint4d16s;
1431
1443 #define kPoint4d_Init_(POINT, X, Y, Z, W) xkPoint4d_Init_(POINT, X, Y, Z, W)
1444
1453 typedef struct kRect16s
1454 {
1455 k16s x;
1456 k16s y;
1457 k16s width;
1458 k16s height;
1459 } kRect16s;
1460
1469 typedef struct kRect32s
1470 {
1471 k32s x;
1472 k32s y;
1473 k32s width;
1474 k32s height;
1475 } kRect32s;
1476
1485 typedef struct kRect32f
1486 {
1487 k32f x;
1488 k32f y;
1489 k32f width;
1490 k32f height;
1491 } kRect32f;
1492
1501 typedef struct kRect64f
1502 {
1503 k64f x;
1504 k64f y;
1505 k64f width;
1506 k64f height;
1507 } kRect64f;
1508
1520 #define kRect_Init_(RECT, X, Y, W, H) \
1521 xkRect_Init_(RECT, X, Y, W, H)
1522
1531 typedef struct kRect3d64f
1532 {
1533 k64f x;
1534 k64f y;
1535 k64f z;
1536 k64f width;
1537 k64f height;
1538 k64f depth;
1539 } kRect3d64f;
1540
1552 #define kRect3d_Init_(RECT, X, Y, Z, W, H, D) \
1553 xkRect3d_Init_(RECT, X, Y, Z, W, H, D)
1554
1563 typedef struct kRotatedRect32s
1564 {
1565 k32s xc;
1566 k32s yc;
1567 k32s width;
1568 k32s height;
1569 k32s angle;
1570 } kRotatedRect32s;
1571
1580 typedef struct kRotatedRect32f
1581 {
1582 k32f xc;
1583 k32f yc;
1584 k32f width;
1585 k32f height;
1586 k32f angle;
1587 } kRotatedRect32f;
1588
1601 #define kRotatedRect_Init_(RECT, XC, YC, W, H, A) \
1602 xkRotatedRect_Init_(RECT, XC, YC, W, H, A)
1603
1612 typedef k32s kPixelFormat;
1613
1615 #define kPIXEL_FORMAT_NULL (0)
1616 #define kPIXEL_FORMAT_8BPP_GREYSCALE (1)
1617 #define kPIXEL_FORMAT_8BPP_CFA (2)
1618 #define kPIXEL_FORMAT_8BPC_BGRX (3)
1619 #define kPIXEL_FORMAT_1BPP_GREYSCALE (4)
1620
1630 typedef k32s kCfa;
1631
1633 #define kCFA_NONE (0)
1634 #define kCFA_BAYER_BGGR (1)
1635 #define kCFA_BAYER_GBRG (2)
1636 #define kCFA_BAYER_RGGB (3)
1637 #define kCFA_BAYER_GRBG (4)
1638
1648 typedef struct kRgb
1649 {
1650 k8u b;
1651 k8u g;
1652 k8u r;
1653 k8u x;
1654 } kRgb;
1655
1665 #define kRgb_Init_(RGB, R, G, B) \
1666 xkRgb_Init_(RGB, R, G, B)
1667
1676 typedef struct kArgb
1677 {
1678 k8u b;
1679 k8u g;
1680 k8u r;
1681 k8u a;
1682 } kArgb;
1683
1694 #define kArgb_Init_(ARGB, A, R, G, B) \
1695 xkArgb_Init_(ARGB, A, R, G, B)
1696
1703 typedef k32s kComparison;
1704
1705 #define kCOMPARISON_EQ (0)
1706 #define kCOMPARISON_NEQ (1)
1707 #define kCOMPARISON_LT (2)
1708 #define kCOMPARISON_LTE (3)
1709 #define kCOMPARISON_GT (4)
1710 #define kCOMPARISON_GTE (5)
1711
1712
1719 typedef kBool (kCall* kEqualsFx)(const void* item1, const void* item2);
1720
1727 typedef kSize (kCall* kHashFx)(const void* item);
1728
1737 typedef kStatus (kCall* kCallbackFx)(kPointer receiver, kPointer sender, void* args);
1738
1745 typedef struct kCallback
1746 {
1747 kCallbackFx function;
1748 kPointer receiver;
1749 } kCallback;
1750
1757 typedef k32s kFileMode;
1758
1760 #define kFILE_MODE_READ (0x1)
1761 #define kFILE_MODE_WRITE (0x2)
1762 #define kFILE_MODE_UPDATE (0x4)
1763
1771 typedef k32s kSeekOrigin;
1772
1774 #define kSEEK_ORIGIN_BEGIN (0)
1775 #define kSEEK_ORIGIN_CURRENT (1)
1776 #define kSEEK_ORIGIN_END (2)
1777
1785 typedef k32s kCompressionType;
1786
1788 #define kCOMPRESSION_TYPE_NULL (0)
1789 #define kCOMPRESSION_TYPE_ZSTD (1)
1790
1791
1799 typedef k32s kCompressionPreset;
1800
1802 #define kCOMPRESSION_PRESET_MIN (-1)
1803 #define kCOMPRESSION_PRESET_FAST (-2)
1804 #define kCOMPRESSION_PRESET_DEFAULT (-3)
1805 #define kCOMPRESSION_PRESET_DENSE (-4)
1806 #define kCOMPRESSION_PRESET_MAX (-5)
1807
1817 #define kCountOf(CARRAY) \
1818 (sizeof(CARRAY)/sizeof(CARRAY[0]))
1819
1820
1830 #define kCast(TYPE, ITEM) \
1831 ((TYPE)(ITEM))
1832
1842 #define kMin_(A, B) \
1843 (((A) < (B)) ? (A) : (B))
1844
1845
1855 #define kMax_(A, B) \
1856 (((A) > (B)) ? (A) : (B))
1857
1868 #define kClamp_(V, VMIN, VMAX) \
1869 (kMin_(kMax_((V), (VMIN)), (VMAX)))
1870
1879 #define kAbs_(A) \
1880 (((A) >= 0) ? (A) : -(A))
1881
1882
1892 #define kDivideFloorInt_(A, B) \
1893 (((A) >= 0) ? (A) / (B) : ((A) - (B) + 1) / (B))
1894
1904 #define kDivideCeilInt_(A, B) \
1905 (((A) >= 0) ? ((A) + (B) - 1) / (B) : (A) / (B))
1906
1914 #define kDivideFloorUInt_(A, B) \
1915 ((A) / (B))
1916
1926 #define kDivideCeilUInt_(A, B) \
1927 (((A) + (B) - 1) / (B))
1928
1934 #define kZero(VALUE) \
1935 memset(&VALUE, 0, sizeof(VALUE))
1936
1951 kInlineFx(void) kItemCopy(void* dest, const void* src, kSize size)
1952 {
1953 memcpy(dest, src, size);
1954 }
1955
1969 kInlineFx(void) kItemZero(void* dest, kSize size)
1970 {
1971 memset(dest, 0, size);
1972 }
1973
1974 /*
1975 * Forward declarations
1976 */
1977
1978 typedef void* kObject;
1979 typedef kObject kType;
1980
1982 #define kTypeName kText64
1983
1991 typedef k32u kTypeFlags;
1992
1994 #define kTYPE_FLAGS_CLASS (0x01)
1995 #define kTYPE_FLAGS_INTERFACE (0x02)
1996 #define kTYPE_FLAGS_VALUE (0x04)
1997 #define kTYPE_FLAGS_ENUM (0x08)
1998 #define kTYPE_FLAGS_ABSTRACT (0x20)
1999 #define kTYPE_FLAGS_ARRAY_VALUE (0x40)
2000 #define kTYPE_FLAGS_PRIMITIVE (0x80)
2001
2009 typedef kPointer kTypeVersion;
2010
2016 typedef struct kMethodInfo
2017 {
2018 kTypeName methodName;
2019 kTypeName functionName;
2020 kFunction function;
2021 } kMethodInfo;
2022
2028 typedef struct kFieldInfo
2029 {
2030 kTypeName name;
2031 kType type;
2032 kSize offset;
2033 kSize count;
2034 } kFieldInfo;
2035
2041 typedef struct kEnumeratorInfo
2042 {
2043 k32s value;
2044 kTypeName name;
2045 kTypeName displayName;
2046 } kEnumeratorInfo;
2047
2048
2074 #define kTypeOf(SYMBOL) \
2075 xkTypeOf(SYMBOL)
2076
2102 #define kAssemblyOf(SYMBOL) \
2103 xkAssemblyOf(SYMBOL)
2104
2113 #define kStaticOf(SYMBOL) \
2114 xkStaticOf(SYMBOL)
2115
2123 #define kDeprecate(SYMBOL) \
2124 xkDeprecate(#SYMBOL)
2125
2134 #define kWarn(MESSAGE) \
2135 xkWarn(MESSAGE)
2136
2137 /*
2138 *
2139 * Type Declaration/Definition Macros, Generation 1.
2140 *
2141 * These type declaration/definition macros continue to be supported. However, consider using the Generation 2
2142 * macros (defined below) in new code.
2143 *
2144 */
2145
2153 #define kDeclareAssembly(PREFIX, SYMBOL) \
2154 xkDeclareAssembly(PREFIX, SYMBOL)
2155
2165 #define kBeginAssembly(PREFIX, SYMBOL, VERSION, PLATFORM_VERSION) \
2166 xkBeginAssembly(PREFIX, SYMBOL, VERSION, PLATFORM_VERSION)
2167
2173 #define kEndAssembly() \
2174 xkEndAssembly()
2175
2184 #define kDeclareValue(PREFIX, SYMBOL, BASE) \
2185 xkDeclareValue(PREFIX, SYMBOL, BASE)
2186
2195 #define kBeginValue(PREFIX, SYMBOL, BASE) \
2196 xkBeginValue(PREFIX, SYMBOL, BASE)
2197
2203 #define kEndValue() \
2204 xkEndValue()
2205
2214 #define kDeclareEnum(PREFIX, SYMBOL, BASE) \
2215 xkDeclareEnum(PREFIX, SYMBOL, BASE)
2216
2225 #define kBeginEnum(PREFIX, SYMBOL, BASE) \
2226 xkBeginEnum(PREFIX, SYMBOL, BASE)
2227
2233 #define kEndEnum() \
2234 xkEndEnum()
2235
2244 #define kDeclareArrayValue(PREFIX, SYMBOL, BASE) \
2245 xkDeclareArrayValue(PREFIX, SYMBOL, BASE)
2246
2256 #define kBeginArrayValue(PREFIX, SYMBOL, TYPE, BASE) \
2257 xkBeginArrayValue(PREFIX, SYMBOL, TYPE, BASE)
2258
2264 #define kEndArrayValue() \
2265 xkEndArrayValue()
2266
2275 #define kDeclareInterface(PREFIX, SYMBOL, BASE) \
2276 xkDeclareInterface(PREFIX, SYMBOL, BASE)
2277
2286 #define kBeginInterface(PREFIX, SYMBOL, BASE) \
2287 xkBeginInterface(PREFIX, SYMBOL, BASE)
2288
2294 #define kEndInterface() \
2295 xkEndInterface()
2296
2305 #define kDeclareFullClass(PREFIX, SYMBOL, BASE) \
2306 xkDeclareFullClass(PREFIX, SYMBOL, BASE)
2307
2316 #define kBeginFullClass(PREFIX, SYMBOL, BASE) \
2317 xkBeginFullClass(PREFIX, SYMBOL, BASE)
2318
2324 #define kEndFullClass() \
2325 xkEndFullClass()
2326
2335 #define kDeclareVirtualClass(PREFIX, SYMBOL, BASE) \
2336 xkDeclareVirtualClass(PREFIX, SYMBOL, BASE)
2337
2346 #define kBeginVirtualClass(PREFIX, SYMBOL, BASE) \
2347 xkBeginVirtualClass(PREFIX, SYMBOL, BASE)
2348
2354 #define kEndVirtualClass() \
2355 xkEndVirtualClass()
2356
2364 #define kDeclareStaticClass(PREFIX, SYMBOL) \
2365 xkDeclareStaticClass(PREFIX, SYMBOL)
2366
2374 #define kBeginStaticClass(PREFIX, SYMBOL) \
2375 xkBeginStaticClass(PREFIX, SYMBOL)
2376
2382 #define kEndStaticClass() \
2383 xkEndStaticClass()
2384
2393 #define kDeclareClass(PREFIX, SYMBOL, BASE) \
2394 xkDeclareClass(PREFIX, SYMBOL, BASE)
2395
2404 #define kBeginClass(PREFIX, SYMBOL, BASE) \
2405 xkBeginClass(PREFIX, SYMBOL, BASE)
2406
2412 #define kEndClass() \
2413 xkEndClass()
2414
2415 /*
2416 *
2417 * Type Declaration/Definition Macros, Generation 2.
2418 *
2419 * These macros are used to declare and define elements of the type system, such
2420 * as assemblies, classes and values. These macros supersede the Generation 1 macros,
2421 * defined above.
2422 *
2423 */
2424
2432 #define kDeclareAssemblyEx(PREFIX, SYMBOL) \
2433 xkDeclareAssemblyEx(PREFIX, SYMBOL)
2434
2444 #define kBeginAssemblyEx(PREFIX, SYMBOL, VERSION, PLATFORM_VERSION) \
2445 xkBeginAssemblyEx(PREFIX, SYMBOL, VERSION, PLATFORM_VERSION)
2446
2452 #define kEndAssemblyEx() \
2453 xkEndAssemblyEx()
2454
2463 #define kDeclareValueEx(PREFIX, SYMBOL, BASE) \
2464 xkDeclareValueEx(PREFIX, SYMBOL, BASE)
2465
2473 #define kBeginValueEx(PREFIX, SYMBOL) \
2474 xkBeginValueEx(PREFIX, SYMBOL)
2475
2481 #define kEndValueEx() \
2482 xkEndValueEx()
2483
2492 #define kDeclareEnumEx(PREFIX, SYMBOL, BASE) \
2493 xkDeclareEnumEx(PREFIX, SYMBOL, BASE)
2494
2502 #define kBeginEnumEx(PREFIX, SYMBOL) \
2503 xkBeginEnumEx(PREFIX, SYMBOL)
2504
2510 #define kEndEnumEx() \
2511 xkEndEnumEx()
2512
2521 #define kDeclareArrayValueEx(PREFIX, SYMBOL, BASE) \
2522 xkDeclareArrayValueEx(PREFIX, SYMBOL, BASE)
2523
2532 #define kBeginArrayValueEx(PREFIX, SYMBOL, TYPE) \
2533 xkBeginArrayValueEx(PREFIX, SYMBOL, TYPE)
2534
2540 #define kEndArrayValueEx() \
2541 xkEndArrayValueEx()
2542
2551 #define kDeclareInterfaceEx(PREFIX, SYMBOL, BASE) \
2552 xkDeclareInterfaceEx(PREFIX, SYMBOL, BASE)
2553
2561 #define kBeginInterfaceEx(PREFIX, SYMBOL) \
2562 xkBeginInterfaceEx(PREFIX, SYMBOL)
2563
2569 #define kEndInterfaceEx() \
2570 xkEndInterfaceEx()
2571
2580 #define kDeclareFullClassEx(PREFIX, SYMBOL, BASE) \
2581 xkDeclareFullClassEx(PREFIX, SYMBOL, BASE)
2582
2590 #define kBeginFullClassEx(PREFIX, SYMBOL) \
2591 xkBeginFullClassEx(PREFIX, SYMBOL)
2592
2598 #define kEndFullClassEx() \
2599 xkEndFullClassEx()
2600
2609 #define kDeclareVirtualClassEx(PREFIX, SYMBOL, BASE) \
2610 xkDeclareVirtualClassEx(PREFIX, SYMBOL, BASE)
2611
2619 #define kBeginVirtualClassEx(PREFIX, SYMBOL) \
2620 xkBeginVirtualClassEx(PREFIX, SYMBOL)
2621
2627 #define kEndVirtualClassEx() \
2628 xkEndVirtualClassEx()
2629
2637 #define kDeclareStaticClassEx(PREFIX, SYMBOL) \
2638 xkDeclareStaticClassEx(PREFIX, SYMBOL)
2639
2647 #define kBeginStaticClassEx(PREFIX, SYMBOL) \
2648 xkBeginStaticClassEx(PREFIX, SYMBOL)
2649
2655 #define kEndStaticClassEx() \
2656 xkEndStaticClassEx()
2657
2666 #define kDeclareClassEx(PREFIX, SYMBOL, BASE) \
2667 xkDeclareClassEx(PREFIX, SYMBOL, BASE)
2668
2676 #define kBeginClassEx(PREFIX, SYMBOL) \
2677 xkBeginClassEx(PREFIX, SYMBOL)
2678
2684 #define kEndClassEx() \
2685 xkEndClassEx()
2686
2687 /*
2688 *
2689 * Type Implementation Macros
2690 *
2691 * These macros are used to provide type-specific details. They are typically used between
2692 * type definition begin/end macros (e.g., kBeginClass/kEndClass).
2693 *
2694 */
2695
2702 #define kAddDependency(SYMBOL) \
2703 xkAddDependency(SYMBOL)
2704
2711 #define kAddType(SYMBOL) \
2712 xkAddType(SYMBOL)
2713
2724 #define kAddPriority(SYMBOL) \
2725 xkAddPriority(SYMBOL)
2726
2735 #define kAddStatic(SYMBOL) \
2736 xkAddStatic(SYMBOL)
2737
2745 #define kAddInterface(SYMBOL, IFACE) \
2746 xkAddInterface(SYMBOL, IFACE)
2747
2755 #define kAddMethod(SYMBOL, METHOD) \
2756 xkAddMethod(SYMBOL, METHOD)
2757
2766 #define kAddVMethod(IN_TYPE, FROM_TYPE, METHOD) \
2767 xkAddVMethod(IN_TYPE, FROM_TYPE, METHOD)
2768
2779 #define kAddPrivateVMethod(IN_TYPE, FROM_TYPE, METHOD) \
2780 xkAddPrivateVMethod(IN_TYPE, FROM_TYPE, METHOD)
2781
2791 #define kAddIVMethod(IN_TYPE, FROM_IFACE, IMETHOD, CMETHOD) \
2792 xkAddIVMethod(IN_TYPE, FROM_IFACE, IMETHOD, CMETHOD)
2793
2805 #define kAddPrivateIVMethod(IN_TYPE, FROM_IFACE, IMETHOD, CMETHOD) \
2806 xkAddPrivateIVMethod(IN_TYPE, FROM_IFACE, IMETHOD, CMETHOD)
2807
2816 #define kAddField(VALUE, FIELD_TYPE, FIELD) \
2817 xkAddField(VALUE, FIELD_TYPE, FIELD)
2818
2826 #define kAddEnumerator \
2827 xkAddEnumerator
2828
2840 #define kAddVersion(TYPE, FORMAT, FORMAT_VER, GUID, WRITE_METHOD, READ_METHOD) \
2841 xkAddVersion(TYPE, FORMAT, FORMAT_VER, GUID, WRITE_METHOD, READ_METHOD)
2842
2856 #define kAddPrivateVersion(TYPE, FORMAT, FORMAT_VER, GUID, WRITE_METHOD, READ_METHOD) \
2857 xkAddPrivateVersion(TYPE, FORMAT, FORMAT_VER, GUID, WRITE_METHOD, READ_METHOD)
2858
2872 #define kAddAbstractVersion(TYPE, FORMAT, FORMAT_VER, GUID) \
2873 xkAddAbstractVersion(TYPE, FORMAT, FORMAT_VER, GUID)
2874
2882 #define kAddFlags(TYPE, FLAGS) \
2883 xkAddFlags(TYPE, FLAGS)
2884
2906 #define kDefineDebugHints() \
2907 xkDefineDebugHints()
2908
2909 /*
2910 *
2911 * Method Implementation Macros
2912 *
2913 * These macros are used in the implementation of class methods.
2914 *
2915 */
2916
2923 #define kObj(TypeName_T, T_object) \
2924 TypeName_T##Class* obj K_ATTRIBUTE_UNUSED = xx##TypeName_T##_Cast(T_object, __FILE__, __LINE__)
2925
2935 #define kObjR(TypeName_T, T_object) \
2936 TypeName_T##Class* obj K_ATTRIBUTE_UNUSED = x##TypeName_T##_CastRaw(T_object)
2937
2949 #define kObjN(TypeName_T, VarName_obj, T_object) \
2950 TypeName_T##Class* VarName_obj = xx##TypeName_T##_Cast(T_object, __FILE__, __LINE__)
2951
2962 #define kObjNR(TypeName_T, VarName_obj, T_object) \
2963 TypeName_T##Class* VarName_obj = x##TypeName_T##_CastRaw(T_object)
2964
2970 #define kStaticObj(TypeName_T) \
2971 TypeName_T##Static* sobj = kStaticOf(TypeName_T)
2972
2983 #define kCastClass_(TYPE, OBJECT) \
2984 xkCastClass_(TYPE, OBJECT)
2985
2996 #define kCastVTable_(TYPE, OBJECT) \
2997 xkCastVTable_(TYPE, OBJECT)
2998
3009 #define kCastIVTable_(IFACE, OBJECT) \
3010 xkCastIVTable_(IFACE, OBJECT)
3011
3017 #define kDebugBreak() \
3018 xkDebugBreak()
3019
3020 #include <kApi/kApiDef.x.h>
3021
3022 #endif
kPoint32f::y
k32f y
Y-coordinate value.
Definition: kApiDef.h:1316
k32s::k32s_Parse
kStatus k32s_Parse(k32s *value, const kChar *str)
Converts string to k32s value.
kRect3d64f::height
k64f height
Height of the rectangular cuboid.
Definition: kApiDef.h:1537
kText64
Represents a 64-unit, null-terminated, kChar sequence.
k32u
Represents a 32-bit unsigned integer.
kRect32s::y
k32s y
Y-coordinate of the origin.
Definition: kApiDef.h:1472
kChar::kChar_IsSpace
kBool kChar_IsSpace(kChar ch)
Checks whether ASCII character is a some kind of white space character type.
Definition: kApiDef.h:400
kBool::kBool_Parse
kStatus kBool_Parse(kBool *value, const kChar *str)
Converts string to kBool value.
kRect64f::height
k64f height
Height of the rectangle.
Definition: kApiDef.h:1506
kRect32f::x
k32f x
X-coordinate of the origin.
Definition: kApiDef.h:1487
kRect32s
Rectangle structure with 32-bit signed integer fields.
Definition: kApiDef.h:1469
kPoint3d32f
3D point structure with 32-bit floating-point fields.
Definition: kApiDef.h:1382
kRect64f::x
k64f x
X-coordinate of the origin.
Definition: kApiDef.h:1503
kRotatedRect32s::width
k32s width
Width of the rectangle.
Definition: kApiDef.h:1567
kRgb::b
k8u b
Blue component value.
Definition: kApiDef.h:1650
kPoint3d32s::y
k32s y
Y-coordinate value.
Definition: kApiDef.h:1370
kRect16s::width
k16s width
Width of the rectangle.
Definition: kApiDef.h:1457
kArgb
32-bit color pixel structure (B/G/R/A).
Definition: kApiDef.h:1676
kRect16s::y
k16s y
Y-coordinate of the origin.
Definition: kApiDef.h:1456
kPoint16s
2D point structure with 16-bit signed integer fields.
Definition: kApiDef.h:1285
kChar::kChar_ToLower
kChar kChar_ToLower(kChar ch)
Convert ASCII character to lower case.
Definition: kApiDef.h:376
k64u
Represents a 64-bit unsigned integer.
kApiCfg.h
Architecture/compiler-specific definitions.
kSuccess
kBool kSuccess(kStatus status)
Returns kTRUE if the given expression value is kOK.
Definition: kApiDef.h:548
kText256
Represents a 256-unit, null-terminated, kChar sequence.
kMethodInfo::methodName
kTypeName methodName
Method name (e.g. "Clone").
Definition: kApiDef.h:2018
kCallback::receiver
kPointer receiver
Callback receiver context pointer.
Definition: kApiDef.h:1748
kEnumeratorInfo::name
kTypeName name
Enumerator name (e.g. "kPIXEL_FORMAT_8BPP_GREYSCALE").
Definition: kApiDef.h:2044
kRotatedRect32f
Rotated rectangle structure with 32-bit floating-point fields.
Definition: kApiDef.h:1580
kRect64f::y
k64f y
Y-coordinate of the origin.
Definition: kApiDef.h:1504
kPoint3d32s::z
k32s z
Z-coordinate value.
Definition: kApiDef.h:1371
kPointer
Represents a void pointer.
kRgb
32-bit color pixel structure (B/G/R/X).
Definition: kApiDef.h:1648
kSize::kSize_Parse
kStatus kSize_Parse(kSize *value, const kChar *str)
Converts string to kSize value.
kPoint32f::x
k32f x
X-coordinate value.
Definition: kApiDef.h:1315
kSSize::kSSize_Parse
kStatus kSSize_Parse(kSSize *value, const kChar *str)
Converts string to kSSize value.
kChar::kChar_IsLetter
kBool kChar_IsLetter(kChar ch)
Checks whether ASCII character is a letter.
Definition: kApiDef.h:412
kPoint3d16s::z
k16s z
Z-coordinate value.
Definition: kApiDef.h:1356
k32f::k32f_Format
kStatus k32f_Format(k32f value, kChar *buffer, kSize capacity)
Converts k32f value to string.
k16u
Represents a 16-bit unsigned integer.
k32u::k32u_Format
kStatus k32u_Format(k32u value, kChar *buffer, kSize capacity)
Converts k32u value to string.
kRotatedRect32s::xc
k32s xc
X-coordinate of the rectangle center.
Definition: kApiDef.h:1565
kRotatedRect32s
Rotated rectangle structure with 32-bit signed integer fields.
Definition: kApiDef.h:1563
kRotatedRect32f::yc
k32f yc
Y-coordinate of the rectangle center.
Definition: kApiDef.h:1583
kBool::kBool_Format
kStatus kBool_Format(kBool value, kChar *buffer, kSize capacity)
Converts kBool value to string.
kSize
Represents an unsigned integer that can store a pointer address.
kRotatedRect32s::angle
k32s angle
Rotation angle of the rectangle.
Definition: kApiDef.h:1569
kPointer::kPointer_ItemOffset
void * kPointer_ItemOffset(const void *pointer, kSSize itemIndex, kSize itemSize)
Gets a pointer to the Nth element of an array.
Definition: kApiDef.h:294
kEnumeratorInfo::displayName
kTypeName displayName
Formatted display name (e.g. "8bpp Greyscale");.
Definition: kApiDef.h:2045
kFieldInfo
Represents type field information.
Definition: kApiDef.h:2028
kRect3d64f::width
k64f width
Width of the rectangular cuboid.
Definition: kApiDef.h:1536
k8u
Represents an 8-bit unsigned integer.
kRect3d64f::x
k64f x
X-coordinate of the origin.
Definition: kApiDef.h:1533
kRect3d64f::depth
k64f depth
Depth of the rectangular cuboid.
Definition: kApiDef.h:1538
kInlineFx
#define kInlineFx(TYPE)
Inline method declaration helper.
Definition: kApiDef.h:26
kPoint3d64f::y
k64f y
Y-coordinate value.
Definition: kApiDef.h:1400
kPoint3d64f::x
k64f x
X-coordinate value.
Definition: kApiDef.h:1399
kEnumeratorInfo
Represents enumerator information.
Definition: kApiDef.h:2041
kChar
Represents a single unit (byte) in a UTF-8 character.
kByte
Represents a byte on the current platform.
k64s::k64s_Format
kStatus k64s_Format(k64s value, kChar *buffer, kSize capacity)
Converts k64s value to string.
k16u::k16u_Parse
kStatus k16u_Parse(k16u *value, const kChar *str)
Converts string to k16u value.
kPoint16s::x
k16s x
X-coordinate value.
Definition: kApiDef.h:1287
kPoint3d16s::y
k16s y
Y-coordinate value.
Definition: kApiDef.h:1355
kSSize::kSSize_Format
kStatus kSSize_Format(kSSize value, kChar *buffer, kSize capacity)
Converts kSSize value to string.
kHashFx
kSize(kCall * kHashFx)(const void *item)
Callback signature to determine hash code of an item.
Definition: kApiDef.h:1727
k64f::k64f_Parse
kStatus k64f_Parse(k64f *value, const kChar *str)
Converts string to k64f value.
kRotatedRect32f::angle
k32f angle
Rotation angle of the rectangle.
Definition: kApiDef.h:1586
kSSize
Represents a signed integer that can store a pointer address.
kMsgQueueItemOption::kStatus
typedef kStatus(kCall *kMsgQueueDropFx)(kPointer receiver
Defines the signature of a callback function to handle dropped items.
kRect32s::height
k32s height
Height of the rectangle.
Definition: kApiDef.h:1474
kRect32f
Rectangle structure with 32-bit floating-point fields.
Definition: kApiDef.h:1485
kIsError
kBool kIsError(kStatus status)
Returns kTRUE if the given status value is not kOK.
Definition: kApiDef.h:536
kVersion::kVersion_Compare
k32s kVersion_Compare(kVersion version1, kVersion version2)
Returns an integral value indicating the relationship between the versions.
Definition: kApiDef.h:852
kRect32s::width
k32s width
Width of the rectangle.
Definition: kApiDef.h:1473
k32u::k32u_Parse
kStatus k32u_Parse(k32u *value, const kChar *str)
Converts string to k32u value.
kPoint32s::x
k32s x
X-coordinate value.
Definition: kApiDef.h:1301
kPixelFormat
Pixel format descriptor.
kRotatedRect32s::height
k32s height
Height of the rectangle.
Definition: kApiDef.h:1568
kRect64f
Rectangle structure with 64-bit floating-point fields.
Definition: kApiDef.h:1501
kText128
Represents a 128-unit, null-terminated, kChar sequence.
kPoint3d32f::x
k32f x
X-coordinate value.
Definition: kApiDef.h:1384
kVersion::kVersion_Minor
k8u kVersion_Minor(kVersion version)
Returns the minor part of a version number.
Definition: kApiDef.h:876
kChar::kChar_ToUpper
kChar kChar_ToUpper(kChar ch)
Convert ASCII character to upper case.
Definition: kApiDef.h:388
k16s::k16s_Format
kStatus k16s_Format(k16s value, kChar *buffer, kSize capacity)
Converts k16s value to string.
kEqualsFx
kBool(kCall * kEqualsFx)(const void *item1, const void *item2)
Callback signature to determine equality of two items.
Definition: kApiDef.h:1719
kVersion::kVersion_Major
k8u kVersion_Major(kVersion version)
Returns the major part of a version number.
Definition: kApiDef.h:864
kPoint16s::y
k16s y
Y-coordinate value.
Definition: kApiDef.h:1288
kMethodInfo
Represents type method information.
Definition: kApiDef.h:2016
kPoint3d16s::x
k16s x
X-coordinate value.
Definition: kApiDef.h:1354
kPoint3d32f::z
k32f z
Z-coordinate value.
Definition: kApiDef.h:1386
kFieldInfo::name
kTypeName name
Field name.
Definition: kApiDef.h:2030
k32f::k32f_Parse
kStatus k32f_Parse(k32f *value, const kChar *str)
Converts string to k32f value.
kRect64f::width
k64f width
Width of the rectangle.
Definition: kApiDef.h:1505
kPoint3d64f::z
k64f z
Z-coordinate value.
Definition: kApiDef.h:1401
kCallback
Represents a callback function and context pointer.
Definition: kApiDef.h:1745
kItemCopy
void kItemCopy(void *dest, const void *src, kSize size)
Performs a small copy with minimal overhead.
Definition: kApiDef.h:1951
kVersion::kVersion_Build
k8u kVersion_Build(kVersion version)
Returns the build part of a version number.
Definition: kApiDef.h:900
kArgb::r
k8u r
Red component value.
Definition: kApiDef.h:1680
kPoint32f
2D point structure with 32-bit floating-point fields.
Definition: kApiDef.h:1313
kRect3d64f::y
k64f y
Y-coordinate of the origin.
Definition: kApiDef.h:1534
k32s::k32s_Format
kStatus k32s_Format(k32s value, kChar *buffer, kSize capacity)
Converts k32s value to string.
kCompressionPreset
Preset compression levels.
kPoint4d16s::w
k16s w
W-coordinate value.
Definition: kApiDef.h:1429
kRotatedRect32s::yc
k32s yc
Y-coordinate of the rectangle center.
Definition: kApiDef.h:1566
k32s
Represents a 32-bit signed integer.
kPointer::kPointer_ByteOffset
void * kPointer_ByteOffset(const void *pointer, kSSize offset)
Calculates a pointer address from a base address and a byte offset.
Definition: kApiDef.h:280
kFunction
void(kCall * kFunction)()
Generic pointer to function.
Definition: kApiDef.h:28
kRgb::r
k8u r
Red component value.
Definition: kApiDef.h:1652
kRotatedRect32f::height
k32f height
Height of the rectangle.
Definition: kApiDef.h:1585
kChar::kChar_IsDigit
kBool kChar_IsDigit(kChar ch)
Checks whether ASCII character is a digit.
Definition: kApiDef.h:424
kPoint64f::x
k64f x
X-coordinate value.
Definition: kApiDef.h:1329
kItemZero
void kItemZero(void *dest, kSize size)
Zero-initializes a small amount of memory with minimal overhead.
Definition: kApiDef.h:1969
kVersion::kVersion_Create
kVersion kVersion_Create(k32u major, k32u minor, k32u release, k32u build)
Creates a version value from its constituent parts.
Definition: kApiDef.h:799
kFieldInfo::type
kType type
Field type.
Definition: kApiDef.h:2031
kVersion::kVersion_Release
k8u kVersion_Release(kVersion version)
Returns the release part of a version number.
Definition: kApiDef.h:888
kEndianness::kEndianness_Host
kEndianness kEndianness_Host()
Reports the endianness of the current platform.
Definition: kApiDef.h:923
k16s::k16s_Parse
kStatus k16s_Parse(k16s *value, const kChar *str)
Converts string to k16s value.
kPoint64f
2D point structure with 64-bit floating-point fields.
Definition: kApiDef.h:1327
kEndianness_ShouldReverse
kBool kEndianness_ShouldReverse(kEndianness endianness)
Reports whether byte ordering must be reversed to be consistent with the current platform.
Definition: kApiDef.h:934
kCallbackFx
kStatus(kCall * kCallbackFx)(kPointer receiver, kPointer sender, void *args)
Callback signature for a generic event handler.
Definition: kApiDef.h:1737
kRgb::g
k8u g
Green component value.
Definition: kApiDef.h:1651
k64s
Represents a 64-bit signed integer.
kSize::kSize_Format
kStatus kSize_Format(kSize value, kChar *buffer, kSize capacity)
Converts kSize value to string.
kVersion::kVersion_Format
kStatus kVersion_Format(kVersion version, kChar *buffer, kSize capacity)
Formats a version to a string buffer.
kText16
Represents a 16-unit, null-terminated, kChar sequence.
kFileMode
Flags that control how a file is opened.
k8s
Represents an 8-bit signed integer.
kEndianness
Represents the byte-ordering of primitive data types.
kRotatedRect32f::width
k32f width
Width of the rectangle.
Definition: kApiDef.h:1584
kArgb::b
k8u b
Blue component value.
Definition: kApiDef.h:1678
kRect16s::height
k16s height
Height of the rectangle.
Definition: kApiDef.h:1458
k8s::k8s_Format
kStatus k8s_Format(k8s value, kChar *buffer, kSize capacity)
Converts k8s value to string.
kType
Represents metadata about a type (class, interface, or value).
kArgb::g
k8u g
Green component value.
Definition: kApiDef.h:1679
k64s::k64s_Parse
kStatus k64s_Parse(k64s *value, const kChar *str)
Converts string to k64s value.
kPoint4d16s::x
k16s x
X-coordinate value.
Definition: kApiDef.h:1426
kPoint3d32s::x
k32s x
X-coordinate value.
Definition: kApiDef.h:1369
kVersion::kVersion_Parse
kStatus kVersion_Parse(kVersion *version, const kChar *buffer)
Parses a version from a formatted string.
kText32
Represents a 32-unit, null-terminated, kChar sequence.
kPoint3d16s
3D point structure with 16-bit signed integer fields.
Definition: kApiDef.h:1352
kEnumeratorInfo::value
k32s value
Enumerator numeric value.
Definition: kApiDef.h:2043
kMethodInfo::functionName
kTypeName functionName
Full function name (e.g. "kObject_Clone").
Definition: kApiDef.h:2019
k16s
Represents a 16-bit signed integer.
kRect32f::y
k32f y
Y-coordinate of the origin.
Definition: kApiDef.h:1488
k32f
Represents a 32-bit floating-point number.
kPoint64f::y
k64f y
Y-coordinate value.
Definition: kApiDef.h:1330
kObject
Root of all Zen classes.
kVersion
Represents a version number.
kArgb::a
k8u a
Alpha component value.
Definition: kApiDef.h:1681
kStatus::kOK
#define kOK
Operation successful.
Definition: kApiDef.h:515
kStatus
Represents an error code.
kRect3d64f::z
k64f z
Z-coordinate of the origin.
Definition: kApiDef.h:1535
k64u::k64u_Format
kStatus k64u_Format(k64u value, kChar *buffer, kSize capacity)
Converts k64u value to string.
kRgb::x
k8u x
Undefined.
Definition: kApiDef.h:1653
kPoint32s::y
k32s y
Y-coordinate value.
Definition: kApiDef.h:1302
kFieldInfo::offset
kSize offset
Offset of field within structure (bytes).
Definition: kApiDef.h:2032
kPoint4d16s::y
k16s y
Y-coordinate value.
Definition: kApiDef.h:1427
kCall
#define kCall
kApi standard function calling convention.
Definition: kApiDef.h:15
kRect32f::width
k32f width
Width of the rectangle.
Definition: kApiDef.h:1489
k16u::k16u_Format
kStatus k16u_Format(k16u value, kChar *buffer, kSize capacity)
Converts k16u value to string.
kRect3d64f
Rectangular cuboid structure with 64-bit floating-point fields.
Definition: kApiDef.h:1531
k64f::k64f_Format
kStatus k64f_Format(k64f value, kChar *buffer, kSize capacity)
Converts k64f value to string.
kRect16s
Rectangle structure with 16-bit signed integer fields.
Definition: kApiDef.h:1453
k8u::k8u_Format
kStatus k8u_Format(k8u value, kChar *buffer, kSize capacity)
Converts k8u value to string.
k64f
Represents a 64-bit floating-point number.
kComparison
Represents a comparison type.
kPointer::kPointer_Diff
kSSize kPointer_Diff(void *a, void *b)
Calculates the signed difference between two pointers.
Definition: kApiDef.h:307
kRect32s::x
k32s x
X-coordinate of the origin.
Definition: kApiDef.h:1471
kRotatedRect32f::xc
k32f xc
X-coordinate of the rectangle center.
Definition: kApiDef.h:1582
kPoint32s
2D point structure with 32-bit signed integer fields.
Definition: kApiDef.h:1299
kBool
Represents a boolean value.
k64u::k64u_Parse
kStatus k64u_Parse(k64u *value, const kChar *str)
Converts string to k64u value.
kRect16s::x
k16s x
X-coordinate of the origin.
Definition: kApiDef.h:1455
kFieldInfo::count
kSize count
Count of values in this field (typically 1; can be higher for "array value" fields, e.g. kText32).
Definition: kApiDef.h:2033
kRect32f::height
k32f height
Height of the rectangle.
Definition: kApiDef.h:1490
kPoint3d64f
3D point structure with 64-bit floating-point fields.
Definition: kApiDef.h:1397
kPoint3d32s
3D point structure with 32-bit signed integer fields.
Definition: kApiDef.h:1367
kPoint4d16s::z
k16s z
Z-coordinate value.
Definition: kApiDef.h:1428
k8u::k8u_Parse
kStatus k8u_Parse(k8u *value, const kChar *str)
Converts string to k8u value.
kPoint3d32f::y
k32f y
Y-coordinate value.
Definition: kApiDef.h:1385
kPoint4d16s
4D point structure with 16-bit signed integer fields.
Definition: kApiDef.h:1424
k8s::k8s_Parse
kStatus k8s_Parse(k8s *value, const kChar *str)
Converts string to k8s value.