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
186 typedef xk64f k64f;
187
189 #define k64F_MIN (2.2250738585072014e-308)
190 #define k64F_MAX (1.7976931348623157e+308)
191 #define k64F_NULL (-k64F_MAX)
192
202 kFx(k32s) k64f_IsNanOrInf(k64f value);
203
212 typedef xkByte kByte;
213
222 typedef xkSize kSize;
223
225 #define kSIZE_MAX xkSIZE_MAX
226 #define kSIZE_NULL kSIZE_MAX
227
239 kInlineFx(kSize) kSize_Align(kSize value, kSize to)
240 {
241 return ((value >> to) + !!(value & ((1 << to) - 1))) << to;
242 }
243
250 typedef xkSSize kSSize;
251
253 #define kSSIZE_MIN xkSSIZE_MIN
254 #define kSSIZE_MAX xkSSIZE_MAX
255 #define kSSIZE_NULL kSSIZE_MIN
256
265 typedef void* kPointer;
266
267 #define kNULL (0)
268
269
278 kInlineFx(void*) kPointer_ByteOffset(const void* pointer, kSSize offset)
279 {
280 return (kByte*)pointer + offset;
281 }
282
292 kInlineFx(void*) kPointer_ItemOffset(const void* pointer, kSSize itemIndex, kSize itemSize)
293 {
294 return kPointer_ByteOffset(pointer, itemIndex*(kSSize)itemSize);
295 }
296
305 kInlineFx(kSSize) kPointer_Diff(void* a, void* b)
306 {
307 return (kSSize)a - (kSSize)b;
308 }
309
318 #define kPointer_ReadAs(POINTER, TYPE) \
319 (*(TYPE*)(POINTER))
320
329 #define kPointer_WriteAs(POINTER, VALUE, TYPE) \
330 (*(TYPE*)(POINTER) = (TYPE)(VALUE))
331
339 #define kIsNull(POINTER) \
340 ((POINTER) == kNULL)
341
350 typedef k32s kBool;
351
353 #define kFALSE (0)
354 #define kTRUE (1)
355
365 typedef xkChar kChar;
366
374 kInlineFx(kChar) kChar_ToLower(kChar ch)
375 {
376 return (ch >= 'A' && ch <= 'Z') ? (ch - 'A' + 'a') : ch;
377 }
378
386 kInlineFx(kChar) kChar_ToUpper(kChar ch)
387 {
388 return (ch >= 'a' && ch <= 'z') ? (ch - 'a' + 'A') : ch;
389 }
390
398 kInlineFx(kBool) kChar_IsSpace(kChar ch)
399 {
400 return ch == ' ';
401 }
402
410 kInlineFx(kBool) kChar_IsLetter(kChar ch)
411 {
412 return ((ch >= 'a') && (ch <= 'z') ) || ((ch >= 'A') && (ch <= 'Z'));
413 }
414
422 kInlineFx(kBool) kChar_IsDigit(kChar ch)
423 {
424 return ch >= '0' && ch <= '9';
425 }
426
435 typedef kChar kText16[16];
436
445 typedef kChar kText32[32];
446
455 typedef kChar kText64[64];
456
465 typedef kChar kText128[128];
466
475 typedef kChar kText256[256];
476
485 typedef k32s kStatus;
486
488 #define kERROR_STATE (-1000)
489 #define kERROR_NOT_FOUND (-999)
490 #define kERROR_COMMAND (-998)
491 #define kERROR_PARAMETER (-997)
492 #define kERROR_UNIMPLEMENTED (-996)
493 #define kERROR_MEMORY (-994)
494 #define kERROR_TIMEOUT (-993)
495 #define kERROR_INCOMPLETE (-992)
496 #define kERROR_STREAM (-991)
497 #define kERROR_CLOSED (-990)
498 #define kERROR_VERSION (-989)
499 #define kERROR_ABORT (-988)
500 #define kERROR_ALREADY_EXISTS (-987)
501 #define kERROR_NETWORK (-986)
502 #define kERROR_HEAP (-985)
503 #define kERROR_FORMAT (-984)
504 #define kERROR_READ_ONLY (-983)
505 #define kERROR_WRITE_ONLY (-982)
506 #define kERROR_BUSY (-981)
507 #define kERROR_CONFLICT (-980)
508 #define kERROR_OS (-979)
509 #define kERROR_DEVICE (-978)
510 #define kERROR_FULL (-977)
511 #define kERROR_IN_PROGRESS (-976)
512 #define kERROR (0)
513 #define kOK (1)
514
525 kFx(const kChar*) kStatus_Name(kStatus status);
526
534 kInlineFx(kBool) kIsError(kStatus status)
535 {
536 return status != kOK;
537 }
538
546 kInlineFx(kBool) kSuccess(kStatus status)
547 {
548 return status == kOK;
549 }
550
559 #define kCheck(EXPRESSION) \
560 xkCheck(EXPRESSION)
561
571 #define kCheckTrue(EXPRESSION, STATUS) \
572 xkCheckTrue(EXPRESSION, STATUS)
573
582 #define kCheckArgs(EXPRESSION) \
583 xkCheckArgs(EXPRESSION)
584
593 #define kCheckState(EXPRESSION) \
594 xkCheckState(EXPRESSION)
595
601 #define kTry \
602 xkTry
603
610 #define kThrow(EXPRESSION) \
611 xkThrow(EXPRESSION)
612
622 #define kTest(EXPRESSION) \
623 xkTest(EXPRESSION)
624
635 #define kTestTrue(EXPRESSION, STATUS) \
636 xkTestTrue(EXPRESSION, STATUS)
637
647 #define kTestArgs(EXPRESSION) \
648 xkTestArgs(EXPRESSION)
649
659 #define kTestState(EXPRESSION) \
660 xkTestState(EXPRESSION)
661
668 #define kCatch(STATUS_POINTER) \
669 xkCatch(STATUS_POINTER)
670
679 #define kEndCatch(STATUS) \
680 xkEndCatch(STATUS)
681
687 #define kFinally \
688 xkFinally
689
698 #define kEndFinally() \
699 xkEndFinally()
700
707 #define kCatchEx(STATUS_POINTER) \
708 xkCatchEx(STATUS_POINTER)
709
720 #define kEndCatchEx(STATUS) \
721 xkEndCatchEx(STATUS)
722
728 #define kFinallyEx \
729 xkFinallyEx
730
739 #define kEndFinallyEx() \
740 xkEndFinallyEx()
741
749 #define kAssert(EXPRESSION) \
750 xkAssert(EXPRESSION)
751
762 #define kAssertType(OBJECT, SYMBOL) \
763 xkAssertType(OBJECT, SYMBOL)
764
772 #define kTrace(TAG) \
773 xkTrace(TAG)
774
783 typedef k32u kVersion;
784
785 #define kVERSION_NULL (k32U_NULL) // kVersion invalid value.
786
797 kInlineFx(kVersion) kVersion_Create(k32u major, k32u minor, k32u release, k32u build)
798 {
799 return (major & 0xFF) << 24 |
800 (minor & 0xFF) << 16 |
801 (release & 0xFF) << 8 |
802 (build & 0xFF);
803 }
804
815 #define kVersion_Stringify_(MAJOR, MINOR, RELEASE, BUILD) \
816 xkStringize(MAJOR) "." xkStringize(MINOR) "." xkStringize(RELEASE) "." xkStringize(BUILD)
817
826 kFx(kStatus) kVersion_Parse(kVersion* version, const kChar* buffer);
827
837 kFx(kStatus) kVersion_Format(kVersion version, kChar* buffer, kSize capacity);
838
850 kInlineFx(k32s) kVersion_Compare(kVersion version1, kVersion version2)
851 {
852 return (k32s)version1 - (k32s)version2;
853 }
854
862 kInlineFx(k8u) kVersion_Major(kVersion version)
863 {
864 return (version >> 24) & 0xFF;
865 }
866
874 kInlineFx(k8u) kVersion_Minor(kVersion version)
875 {
876 return (version >> 16) & 0xFF;
877 }
878
886 kInlineFx(k8u) kVersion_Release(kVersion version)
887 {
888 return (version >> 8) & 0xFF;
889 }
890
898 kInlineFx(k8u) kVersion_Build(kVersion version)
899 {
900 return (version) & 0xFF;
901 }
902
909 typedef k32s kEndianness;
910
912 #define kENDIANNESS_LITTLE (1)
913 #define kENDIANNESS_BIG (2)
914
921 kInlineFx(kEndianness) kEndianness_Host()
922 {
923 return K_ENDIANNESS;
924 }
925
932 kInlineFx(kBool) kEndianness_ShouldReverse(kEndianness endianness)
933 {
934 return endianness != kEndianness_Host();
935 }
936
951 kFx(kStatus) k8u_Format(k8u value, kChar* buffer, kSize capacity);
952
961 kFx(kStatus) k8u_Parse(k8u* value, const kChar* str);
962
977 kFx(kStatus) k8s_Format(k8s value, kChar* buffer, kSize capacity);
978
987 kFx(kStatus) k8s_Parse(k8s* value, const kChar* str);
988
1003 kFx(kStatus) k16u_Format(k16u value, kChar* buffer, kSize capacity);
1004
1013 kFx(kStatus) k16u_Parse(k16u* value, const kChar* str);
1014
1029 kFx(kStatus) k16s_Format(k16s value, kChar* buffer, kSize capacity);
1030
1039 kFx(kStatus) k16s_Parse(k16s* value, const kChar* str);
1040
1055 kFx(kStatus) k32u_Format(k32u value, kChar* buffer, kSize capacity);
1056
1065 kFx(kStatus) k32u_Parse(k32u* value, const kChar* str);
1066
1081 kFx(kStatus) k32s_Format(k32s value, kChar* buffer, kSize capacity);
1082
1091 kFx(kStatus) k32s_Parse(k32s* value, const kChar* str);
1092
1107 kFx(kStatus) k64u_Format(k64u value, kChar* buffer, kSize capacity);
1108
1117 kFx(kStatus) k64u_Parse(k64u* value, const kChar* str);
1118
1133 kFx(kStatus) k64s_Format(k64s value, kChar* buffer, kSize capacity);
1134
1143 kFx(kStatus) k64s_Parse(k64s* value, const kChar* str);
1144
1159 kFx(kStatus) kBool_Format(kBool value, kChar* buffer, kSize capacity);
1160
1169 kFx(kStatus) kBool_Parse(kBool* value, const kChar* str);
1170
1185 kFx(kStatus) kSize_Format(kSize value, kChar* buffer, kSize capacity);
1186
1195 kFx(kStatus) kSize_Parse(kSize* value, const kChar* str);
1196
1211 kFx(kStatus) kSSize_Format(kSSize value, kChar* buffer, kSize capacity);
1212
1221 kFx(kStatus) kSSize_Parse(kSSize* value, const kChar* str);
1222
1237 kFx(kStatus) k32f_Format(k32f value, kChar* buffer, kSize capacity);
1238
1247 kFx(kStatus) k32f_Parse(k32f* value, const kChar* str);
1248
1263 kFx(kStatus) k64f_Format(k64f value, kChar* buffer, kSize capacity);
1264
1273 kFx(kStatus) k64f_Parse(k64f* value, const kChar* str);
1274
1283 typedef struct kPoint16s
1284 {
1285 k16s x;
1286 k16s y;
1287 } kPoint16s;
1288
1297 typedef struct kPoint32s
1298 {
1299 k32s x;
1300 k32s y;
1301 } kPoint32s;
1302
1311 typedef struct kPoint32f
1312 {
1313 k32f x;
1314 k32f y;
1315 } kPoint32f;
1316
1325 typedef struct kPoint64f
1326 {
1327 k64f x;
1328 k64f y;
1329 } kPoint64f;
1330
1340 #define kPoint_Init_(POINT, X, Y) xkPoint_Init_(POINT, X, Y)
1341
1350 typedef struct kPoint3d16s
1351 {
1352 k16s x;
1353 k16s y;
1354 k16s z;
1355 } kPoint3d16s;
1356
1365 typedef struct kPoint3d32s
1366 {
1367 k32s x;
1368 k32s y;
1369 k32s z;
1370 } kPoint3d32s;
1371
1380 typedef struct kPoint3d32f
1381 {
1382 k32f x;
1383 k32f y;
1384 k32f z;
1385 } kPoint3d32f;
1386
1395 typedef struct kPoint3d64f
1396 {
1397 k64f x;
1398 k64f y;
1399 k64f z;
1400 } kPoint3d64f;
1401
1412 #define kPoint3d_Init_(POINT, X, Y, Z) xkPoint3d_Init_(POINT, X, Y, Z)
1413
1422 typedef struct kRect16s
1423 {
1424 k16s x;
1425 k16s y;
1426 k16s width;
1427 k16s height;
1428 } kRect16s;
1429
1438 typedef struct kRect32s
1439 {
1440 k32s x;
1441 k32s y;
1442 k32s width;
1443 k32s height;
1444 } kRect32s;
1445
1454 typedef struct kRect32f
1455 {
1456 k32f x;
1457 k32f y;
1458 k32f width;
1459 k32f height;
1460 } kRect32f;
1461
1470 typedef struct kRect64f
1471 {
1472 k64f x;
1473 k64f y;
1474 k64f width;
1475 k64f height;
1476 } kRect64f;
1477
1489 #define kRect_Init_(RECT, X, Y, W, H) \
1490 xkRect_Init_(RECT, X, Y, W, H)
1491
1500 typedef struct kRect3d64f
1501 {
1502 k64f x;
1503 k64f y;
1504 k64f z;
1505 k64f width;
1506 k64f height;
1507 k64f depth;
1508 } kRect3d64f;
1509
1521 #define kRect3d_Init_(RECT, X, Y, Z, W, H, D) \
1522 xkRect3d_Init_(RECT, X, Y, Z, W, H, D)
1523
1532 typedef struct kRotatedRect32s
1533 {
1534 k32s xc;
1535 k32s yc;
1536 k32s width;
1537 k32s height;
1538 k32s angle;
1539 } kRotatedRect32s;
1540
1549 typedef struct kRotatedRect32f
1550 {
1551 k32f xc;
1552 k32f yc;
1553 k32f width;
1554 k32f height;
1555 k32f angle;
1556 } kRotatedRect32f;
1557
1570 #define kRotatedRect_Init_(RECT, XC, YC, W, H, A) \
1571 xkRotatedRect_Init_(RECT, XC, YC, W, H, A)
1572
1581 typedef k32s kPixelFormat;
1582
1584 #define kPIXEL_FORMAT_NULL (0)
1585 #define kPIXEL_FORMAT_8BPP_GREYSCALE (1)
1586 #define kPIXEL_FORMAT_8BPP_CFA (2)
1587 #define kPIXEL_FORMAT_8BPC_BGRX (3)
1588 #define kPIXEL_FORMAT_1BPP_GREYSCALE (4)
1589
1599 typedef k32s kCfa;
1600
1602 #define kCFA_NONE (0)
1603 #define kCFA_BAYER_BGGR (1)
1604 #define kCFA_BAYER_GBRG (2)
1605 #define kCFA_BAYER_RGGB (3)
1606 #define kCFA_BAYER_GRBG (4)
1607
1617 typedef struct kRgb
1618 {
1619 k8u b;
1620 k8u g;
1621 k8u r;
1622 k8u x;
1623 } kRgb;
1624
1634 #define kRgb_Init_(RGB, R, G, B) \
1635 xkRgb_Init_(RGB, R, G, B)
1636
1645 typedef struct kArgb
1646 {
1647 k8u b;
1648 k8u g;
1649 k8u r;
1650 k8u a;
1651 } kArgb;
1652
1663 #define kArgb_Init_(ARGB, A, R, G, B) \
1664 xkArgb_Init_(ARGB, A, R, G, B)
1665
1672 typedef k32s kComparison;
1673
1674 #define kCOMPARISON_EQ (0)
1675 #define kCOMPARISON_NEQ (1)
1676 #define kCOMPARISON_LT (2)
1677 #define kCOMPARISON_LTE (3)
1678 #define kCOMPARISON_GT (4)
1679 #define kCOMPARISON_GTE (5)
1680
1681
1688 typedef kBool (kCall* kEqualsFx)(const void* item1, const void* item2);
1689
1696 typedef kSize (kCall* kHashFx)(const void* item);
1697
1706 typedef kStatus (kCall* kCallbackFx)(kPointer receiver, kPointer sender, void* args);
1707
1714 typedef struct kCallback
1715 {
1716 kCallbackFx function;
1717 kPointer receiver;
1718 } kCallback;
1719
1726 typedef k32s kFileMode;
1727
1729 #define kFILE_MODE_READ (0x1)
1730 #define kFILE_MODE_WRITE (0x2)
1731 #define kFILE_MODE_UPDATE (0x4)
1732
1740 typedef k32s kSeekOrigin;
1741
1743 #define kSEEK_ORIGIN_BEGIN (0)
1744 #define kSEEK_ORIGIN_CURRENT (1)
1745 #define kSEEK_ORIGIN_END (2)
1746
1754 typedef k32s kCompressionType;
1755
1757 #define kCOMPRESSION_TYPE_NULL (0)
1758 #define kCOMPRESSION_TYPE_ZSTD (1)
1759
1760
1768 typedef k32s kCompressionPreset;
1769
1771 #define kCOMPRESSION_PRESET_MIN (-1)
1772 #define kCOMPRESSION_PRESET_FAST (-2)
1773 #define kCOMPRESSION_PRESET_DEFAULT (-3)
1774 #define kCOMPRESSION_PRESET_DENSE (-4)
1775 #define kCOMPRESSION_PRESET_MAX (-5)
1776
1786 #define kCountOf(CARRAY) \
1787 (sizeof(CARRAY)/sizeof(CARRAY[0]))
1788
1789
1799 #define kCast(TYPE, ITEM) \
1800 ((TYPE)(ITEM))
1801
1811 #define kMin_(A, B) \
1812 (((A) < (B)) ? (A) : (B))
1813
1814
1824 #define kMax_(A, B) \
1825 (((A) > (B)) ? (A) : (B))
1826
1837 #define kClamp_(V, VMIN, VMAX) \
1838 (kMin_(kMax_((V), (VMIN)), (VMAX)))
1839
1848 #define kAbs_(A) \
1849 (((A) >= 0) ? (A) : -(A))
1850
1851
1861 #define kDivideFloorInt_(A, B) \
1862 (((A) >= 0) ? (A) / (B) : ((A) - (B) + 1) / (B))
1863
1873 #define kDivideCeilInt_(A, B) \
1874 (((A) >= 0) ? ((A) + (B) - 1) / (B) : (A) / (B))
1875
1883 #define kDivideFloorUInt_(A, B) \
1884 ((A) / (B))
1885
1895 #define kDivideCeilUInt_(A, B) \
1896 (((A) + (B) - 1) / (B))
1897
1903 #define kZero(VALUE) \
1904 memset(&VALUE, 0, sizeof(VALUE))
1905
1920 kInlineFx(void) kItemCopy(void* dest, const void* src, kSize size)
1921 {
1922 memcpy(dest, src, size);
1923 }
1924
1938 kInlineFx(void) kItemZero(void* dest, kSize size)
1939 {
1940 memset(dest, 0, size);
1941 }
1942
1943 /*
1944 * Forward declarations
1945 */
1946
1947 typedef void* kObject;
1948 typedef kObject kType;
1949
1951 #define kTypeName kText64
1952
1960 typedef k32u kTypeFlags;
1961
1963 #define kTYPE_FLAGS_CLASS (0x01)
1964 #define kTYPE_FLAGS_INTERFACE (0x02)
1965 #define kTYPE_FLAGS_VALUE (0x04)
1966 #define kTYPE_FLAGS_ENUM (0x08)
1967 #define kTYPE_FLAGS_ABSTRACT (0x20)
1968 #define kTYPE_FLAGS_ARRAY_VALUE (0x40)
1969 #define kTYPE_FLAGS_PRIMITIVE (0x80)
1970
1978 typedef kPointer kTypeVersion;
1979
1985 typedef struct kMethodInfo
1986 {
1987 kTypeName methodName;
1988 kTypeName functionName;
1989 kFunction function;
1990 } kMethodInfo;
1991
1997 typedef struct kFieldInfo
1998 {
1999 kTypeName name;
2000 kType type;
2001 kSize offset;
2002 kSize count;
2003 } kFieldInfo;
2004
2010 typedef struct kEnumeratorInfo
2011 {
2012 k32s value;
2013 kTypeName name;
2014 kTypeName displayName;
2015 } kEnumeratorInfo;
2016
2017
2043 #define kTypeOf(SYMBOL) \
2044 xkTypeOf(SYMBOL)
2045
2071 #define kAssemblyOf(SYMBOL) \
2072 xkAssemblyOf(SYMBOL)
2073
2082 #define kStaticOf(SYMBOL) \
2083 xkStaticOf(SYMBOL)
2084
2092 #define kDeprecate(SYMBOL) \
2093 xkDeprecate(#SYMBOL)
2094
2103 #define kWarn(MESSAGE) \
2104 xkWarn(MESSAGE)
2105
2106 /*
2107 *
2108 * Type Declaration/Definition Macros, Generation 1.
2109 *
2110 * These type declaration/definition macros continue to be supported. However, consider using the Generation 2
2111 * macros (defined below) in new code.
2112 *
2113 */
2114
2122 #define kDeclareAssembly(PREFIX, SYMBOL) \
2123 xkDeclareAssembly(PREFIX, SYMBOL)
2124
2134 #define kBeginAssembly(PREFIX, SYMBOL, VERSION, PLATFORM_VERSION) \
2135 xkBeginAssembly(PREFIX, SYMBOL, VERSION, PLATFORM_VERSION)
2136
2142 #define kEndAssembly() \
2143 xkEndAssembly()
2144
2153 #define kDeclareValue(PREFIX, SYMBOL, BASE) \
2154 xkDeclareValue(PREFIX, SYMBOL, BASE)
2155
2164 #define kBeginValue(PREFIX, SYMBOL, BASE) \
2165 xkBeginValue(PREFIX, SYMBOL, BASE)
2166
2172 #define kEndValue() \
2173 xkEndValue()
2174
2183 #define kDeclareEnum(PREFIX, SYMBOL, BASE) \
2184 xkDeclareEnum(PREFIX, SYMBOL, BASE)
2185
2194 #define kBeginEnum(PREFIX, SYMBOL, BASE) \
2195 xkBeginEnum(PREFIX, SYMBOL, BASE)
2196
2202 #define kEndEnum() \
2203 xkEndEnum()
2204
2213 #define kDeclareArrayValue(PREFIX, SYMBOL, BASE) \
2214 xkDeclareArrayValue(PREFIX, SYMBOL, BASE)
2215
2225 #define kBeginArrayValue(PREFIX, SYMBOL, TYPE, BASE) \
2226 xkBeginArrayValue(PREFIX, SYMBOL, TYPE, BASE)
2227
2233 #define kEndArrayValue() \
2234 xkEndArrayValue()
2235
2244 #define kDeclareInterface(PREFIX, SYMBOL, BASE) \
2245 xkDeclareInterface(PREFIX, SYMBOL, BASE)
2246
2255 #define kBeginInterface(PREFIX, SYMBOL, BASE) \
2256 xkBeginInterface(PREFIX, SYMBOL, BASE)
2257
2263 #define kEndInterface() \
2264 xkEndInterface()
2265
2274 #define kDeclareFullClass(PREFIX, SYMBOL, BASE) \
2275 xkDeclareFullClass(PREFIX, SYMBOL, BASE)
2276
2285 #define kBeginFullClass(PREFIX, SYMBOL, BASE) \
2286 xkBeginFullClass(PREFIX, SYMBOL, BASE)
2287
2293 #define kEndFullClass() \
2294 xkEndFullClass()
2295
2304 #define kDeclareVirtualClass(PREFIX, SYMBOL, BASE) \
2305 xkDeclareVirtualClass(PREFIX, SYMBOL, BASE)
2306
2315 #define kBeginVirtualClass(PREFIX, SYMBOL, BASE) \
2316 xkBeginVirtualClass(PREFIX, SYMBOL, BASE)
2317
2323 #define kEndVirtualClass() \
2324 xkEndVirtualClass()
2325
2333 #define kDeclareStaticClass(PREFIX, SYMBOL) \
2334 xkDeclareStaticClass(PREFIX, SYMBOL)
2335
2343 #define kBeginStaticClass(PREFIX, SYMBOL) \
2344 xkBeginStaticClass(PREFIX, SYMBOL)
2345
2351 #define kEndStaticClass() \
2352 xkEndStaticClass()
2353
2362 #define kDeclareClass(PREFIX, SYMBOL, BASE) \
2363 xkDeclareClass(PREFIX, SYMBOL, BASE)
2364
2373 #define kBeginClass(PREFIX, SYMBOL, BASE) \
2374 xkBeginClass(PREFIX, SYMBOL, BASE)
2375
2381 #define kEndClass() \
2382 xkEndClass()
2383
2384 /*
2385 *
2386 * Type Declaration/Definition Macros, Generation 2.
2387 *
2388 * These macros are used to declare and define elements of the type system, such
2389 * as assemblies, classes and values. These macros supersede the Generation 1 macros,
2390 * defined above.
2391 *
2392 */
2393
2401 #define kDeclareAssemblyEx(PREFIX, SYMBOL) \
2402 xkDeclareAssemblyEx(PREFIX, SYMBOL)
2403
2413 #define kBeginAssemblyEx(PREFIX, SYMBOL, VERSION, PLATFORM_VERSION) \
2414 xkBeginAssemblyEx(PREFIX, SYMBOL, VERSION, PLATFORM_VERSION)
2415
2421 #define kEndAssemblyEx() \
2422 xkEndAssemblyEx()
2423
2432 #define kDeclareValueEx(PREFIX, SYMBOL, BASE) \
2433 xkDeclareValueEx(PREFIX, SYMBOL, BASE)
2434
2442 #define kBeginValueEx(PREFIX, SYMBOL) \
2443 xkBeginValueEx(PREFIX, SYMBOL)
2444
2450 #define kEndValueEx() \
2451 xkEndValueEx()
2452
2461 #define kDeclareEnumEx(PREFIX, SYMBOL, BASE) \
2462 xkDeclareEnumEx(PREFIX, SYMBOL, BASE)
2463
2471 #define kBeginEnumEx(PREFIX, SYMBOL) \
2472 xkBeginEnumEx(PREFIX, SYMBOL)
2473
2479 #define kEndEnumEx() \
2480 xkEndEnumEx()
2481
2490 #define kDeclareArrayValueEx(PREFIX, SYMBOL, BASE) \
2491 xkDeclareArrayValueEx(PREFIX, SYMBOL, BASE)
2492
2501 #define kBeginArrayValueEx(PREFIX, SYMBOL, TYPE) \
2502 xkBeginArrayValueEx(PREFIX, SYMBOL, TYPE)
2503
2509 #define kEndArrayValueEx() \
2510 xkEndArrayValueEx()
2511
2520 #define kDeclareInterfaceEx(PREFIX, SYMBOL, BASE) \
2521 xkDeclareInterfaceEx(PREFIX, SYMBOL, BASE)
2522
2530 #define kBeginInterfaceEx(PREFIX, SYMBOL) \
2531 xkBeginInterfaceEx(PREFIX, SYMBOL)
2532
2538 #define kEndInterfaceEx() \
2539 xkEndInterfaceEx()
2540
2549 #define kDeclareFullClassEx(PREFIX, SYMBOL, BASE) \
2550 xkDeclareFullClassEx(PREFIX, SYMBOL, BASE)
2551
2559 #define kBeginFullClassEx(PREFIX, SYMBOL) \
2560 xkBeginFullClassEx(PREFIX, SYMBOL)
2561
2567 #define kEndFullClassEx() \
2568 xkEndFullClassEx()
2569
2578 #define kDeclareVirtualClassEx(PREFIX, SYMBOL, BASE) \
2579 xkDeclareVirtualClassEx(PREFIX, SYMBOL, BASE)
2580
2588 #define kBeginVirtualClassEx(PREFIX, SYMBOL) \
2589 xkBeginVirtualClassEx(PREFIX, SYMBOL)
2590
2596 #define kEndVirtualClassEx() \
2597 xkEndVirtualClassEx()
2598
2606 #define kDeclareStaticClassEx(PREFIX, SYMBOL) \
2607 xkDeclareStaticClassEx(PREFIX, SYMBOL)
2608
2616 #define kBeginStaticClassEx(PREFIX, SYMBOL) \
2617 xkBeginStaticClassEx(PREFIX, SYMBOL)
2618
2624 #define kEndStaticClassEx() \
2625 xkEndStaticClassEx()
2626
2635 #define kDeclareClassEx(PREFIX, SYMBOL, BASE) \
2636 xkDeclareClassEx(PREFIX, SYMBOL, BASE)
2637
2645 #define kBeginClassEx(PREFIX, SYMBOL) \
2646 xkBeginClassEx(PREFIX, SYMBOL)
2647
2653 #define kEndClassEx() \
2654 xkEndClassEx()
2655
2656 /*
2657 *
2658 * Type Implementation Macros
2659 *
2660 * These macros are used to provide type-specific details. They are typically used between
2661 * type definition begin/end macros (e.g., kBeginClass/kEndClass).
2662 *
2663 */
2664
2671 #define kAddDependency(SYMBOL) \
2672 xkAddDependency(SYMBOL)
2673
2680 #define kAddType(SYMBOL) \
2681 xkAddType(SYMBOL)
2682
2693 #define kAddPriority(SYMBOL) \
2694 xkAddPriority(SYMBOL)
2695
2704 #define kAddStatic(SYMBOL) \
2705 xkAddStatic(SYMBOL)
2706
2714 #define kAddInterface(SYMBOL, IFACE) \
2715 xkAddInterface(SYMBOL, IFACE)
2716
2724 #define kAddMethod(SYMBOL, METHOD) \
2725 xkAddMethod(SYMBOL, METHOD)
2726
2735 #define kAddVMethod(IN_TYPE, FROM_TYPE, METHOD) \
2736 xkAddVMethod(IN_TYPE, FROM_TYPE, METHOD)
2737
2748 #define kAddPrivateVMethod(IN_TYPE, FROM_TYPE, METHOD) \
2749 xkAddPrivateVMethod(IN_TYPE, FROM_TYPE, METHOD)
2750
2760 #define kAddIVMethod(IN_TYPE, FROM_IFACE, IMETHOD, CMETHOD) \
2761 xkAddIVMethod(IN_TYPE, FROM_IFACE, IMETHOD, CMETHOD)
2762
2774 #define kAddPrivateIVMethod(IN_TYPE, FROM_IFACE, IMETHOD, CMETHOD) \
2775 xkAddPrivateIVMethod(IN_TYPE, FROM_IFACE, IMETHOD, CMETHOD)
2776
2785 #define kAddField(VALUE, FIELD_TYPE, FIELD) \
2786 xkAddField(VALUE, FIELD_TYPE, FIELD)
2787
2795 #define kAddEnumerator \
2796 xkAddEnumerator
2797
2809 #define kAddVersion(TYPE, FORMAT, FORMAT_VER, GUID, WRITE_METHOD, READ_METHOD) \
2810 xkAddVersion(TYPE, FORMAT, FORMAT_VER, GUID, WRITE_METHOD, READ_METHOD)
2811
2825 #define kAddPrivateVersion(TYPE, FORMAT, FORMAT_VER, GUID, WRITE_METHOD, READ_METHOD) \
2826 xkAddPrivateVersion(TYPE, FORMAT, FORMAT_VER, GUID, WRITE_METHOD, READ_METHOD)
2827
2841 #define kAddAbstractVersion(TYPE, FORMAT, FORMAT_VER, GUID) \
2842 xkAddAbstractVersion(TYPE, FORMAT, FORMAT_VER, GUID)
2843
2851 #define kAddFlags(TYPE, FLAGS) \
2852 xkAddFlags(TYPE, FLAGS)
2853
2875 #define kDefineDebugHints() \
2876 xkDefineDebugHints()
2877
2878 /*
2879 *
2880 * Method Implementation Macros
2881 *
2882 * These macros are used in the implementation of class methods.
2883 *
2884 */
2885
2892 #define kObj(TypeName_T, T_object) \
2893 TypeName_T##Class* obj K_ATTRIBUTE_UNUSED = xx##TypeName_T##_Cast(T_object, __FILE__, __LINE__)
2894
2904 #define kObjR(TypeName_T, T_object) \
2905 TypeName_T##Class* obj K_ATTRIBUTE_UNUSED = x##TypeName_T##_CastRaw(T_object)
2906
2918 #define kObjN(TypeName_T, VarName_obj, T_object) \
2919 TypeName_T##Class* VarName_obj = xx##TypeName_T##_Cast(T_object, __FILE__, __LINE__)
2920
2931 #define kObjNR(TypeName_T, VarName_obj, T_object) \
2932 TypeName_T##Class* VarName_obj = x##TypeName_T##_CastRaw(T_object)
2933
2939 #define kStaticObj(TypeName_T) \
2940 TypeName_T##Static* sobj = kStaticOf(TypeName_T)
2941
2953 #define kInitFields(TYPE, OBJECT) \
2954 xkInitFields(TYPE, OBJECT)
2955
2966 #define kCastClass_(TYPE, OBJECT) \
2967 xkCastClass_(TYPE, OBJECT)
2968
2979 #define kCastVTable_(TYPE, OBJECT) \
2980 xkCastVTable_(TYPE, OBJECT)
2981
2992 #define kCastIVTable_(IFACE, OBJECT) \
2993 xkCastIVTable_(IFACE, OBJECT)
2994
3000 #define kDebugBreak() \
3001 xkDebugBreak()
3002
3003 #include <kApi/kApiDef.x.h>
3004
3005 #endif
kPoint32f::y
k32f y
Y-coordinate value.
Definition: kApiDef.h:1314
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:1506
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:1441
kChar::kChar_IsSpace
kBool kChar_IsSpace(kChar ch)
Checks whether ASCII character is a some kind of white space character type.
Definition: kApiDef.h:398
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:1475
kRect32f::x
k32f x
X-coordinate of the origin.
Definition: kApiDef.h:1456
kRect32s
Rectangle structure with 32-bit signed integer fields.
Definition: kApiDef.h:1438
kPoint3d32f
3D point structure with 32-bit floating-point fields.
Definition: kApiDef.h:1380
kRect64f::x
k64f x
X-coordinate of the origin.
Definition: kApiDef.h:1472
kRotatedRect32s::width
k32s width
Width of the rectangle.
Definition: kApiDef.h:1536
kRgb::b
k8u b
Blue component value.
Definition: kApiDef.h:1619
kPoint3d32s::y
k32s y
Y-coordinate value.
Definition: kApiDef.h:1368
kRect16s::width
k16s width
Width of the rectangle.
Definition: kApiDef.h:1426
kArgb
32-bit color pixel structure (B/G/R/A).
Definition: kApiDef.h:1645
kRect16s::y
k16s y
Y-coordinate of the origin.
Definition: kApiDef.h:1425
kPoint16s
2D point structure with 16-bit signed integer fields.
Definition: kApiDef.h:1283
kChar::kChar_ToLower
kChar kChar_ToLower(kChar ch)
Convert ASCII character to lower case.
Definition: kApiDef.h:374
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:546
kText256
Represents a 256-unit, null-terminated, kChar sequence.
kMethodInfo::methodName
kTypeName methodName
Method name (e.g. "Clone").
Definition: kApiDef.h:1987
kCallback::receiver
kPointer receiver
Callback receiver context pointer.
Definition: kApiDef.h:1717
kEnumeratorInfo::name
kTypeName name
Enumerator name (e.g. "kPIXEL_FORMAT_8BPP_GREYSCALE").
Definition: kApiDef.h:2013
kRotatedRect32f
Rotated rectangle structure with 32-bit floating-point fields.
Definition: kApiDef.h:1549
kRect64f::y
k64f y
Y-coordinate of the origin.
Definition: kApiDef.h:1473
kPoint3d32s::z
k32s z
Z-coordinate value.
Definition: kApiDef.h:1369
kPointer
Represents a void pointer.
kRgb
32-bit color pixel structure (B/G/R/X).
Definition: kApiDef.h:1617
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:1313
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:410
kPoint3d16s::z
k16s z
Z-coordinate value.
Definition: kApiDef.h:1354
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:1534
kRotatedRect32s
Rotated rectangle structure with 32-bit signed integer fields.
Definition: kApiDef.h:1532
kRotatedRect32f::yc
k32f yc
Y-coordinate of the rectangle center.
Definition: kApiDef.h:1552
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:1538
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:292
kEnumeratorInfo::displayName
kTypeName displayName
Formatted display name (e.g. "8bpp Greyscale");.
Definition: kApiDef.h:2014
kFieldInfo
Represents type field information.
Definition: kApiDef.h:1997
kRect3d64f::width
k64f width
Width of the rectangular cuboid.
Definition: kApiDef.h:1505
k8u
Represents an 8-bit unsigned integer.
kRect3d64f::x
k64f x
X-coordinate of the origin.
Definition: kApiDef.h:1502
kRect3d64f::depth
k64f depth
Depth of the rectangular cuboid.
Definition: kApiDef.h:1507
kInlineFx
#define kInlineFx(TYPE)
Inline method declaration helper.
Definition: kApiDef.h:26
kPoint3d64f::y
k64f y
Y-coordinate value.
Definition: kApiDef.h:1398
kPoint3d64f::x
k64f x
X-coordinate value.
Definition: kApiDef.h:1397
kEnumeratorInfo
Represents enumerator information.
Definition: kApiDef.h:2010
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:1285
kPoint3d16s::y
k16s y
Y-coordinate value.
Definition: kApiDef.h:1353
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:1696
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:1555
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:1443
kRect32f
Rectangle structure with 32-bit floating-point fields.
Definition: kApiDef.h:1454
kIsError
kBool kIsError(kStatus status)
Returns kTRUE if the given status value is not kOK.
Definition: kApiDef.h:534
kVersion::kVersion_Compare
k32s kVersion_Compare(kVersion version1, kVersion version2)
Returns an integral value indicating the relationship between the versions.
Definition: kApiDef.h:850
kRect32s::width
k32s width
Width of the rectangle.
Definition: kApiDef.h:1442
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:1299
kPixelFormat
Pixel format descriptor.
kRotatedRect32s::height
k32s height
Height of the rectangle.
Definition: kApiDef.h:1537
kRect64f
Rectangle structure with 64-bit floating-point fields.
Definition: kApiDef.h:1470
kText128
Represents a 128-unit, null-terminated, kChar sequence.
kPoint3d32f::x
k32f x
X-coordinate value.
Definition: kApiDef.h:1382
kVersion::kVersion_Minor
k8u kVersion_Minor(kVersion version)
Returns the minor part of a version number.
Definition: kApiDef.h:874
kChar::kChar_ToUpper
kChar kChar_ToUpper(kChar ch)
Convert ASCII character to upper case.
Definition: kApiDef.h:386
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:1688
kVersion::kVersion_Major
k8u kVersion_Major(kVersion version)
Returns the major part of a version number.
Definition: kApiDef.h:862
kPoint16s::y
k16s y
Y-coordinate value.
Definition: kApiDef.h:1286
kMethodInfo
Represents type method information.
Definition: kApiDef.h:1985
kPoint3d16s::x
k16s x
X-coordinate value.
Definition: kApiDef.h:1352
kPoint3d32f::z
k32f z
Z-coordinate value.
Definition: kApiDef.h:1384
kFieldInfo::name
kTypeName name
Field name.
Definition: kApiDef.h:1999
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:1474
kPoint3d64f::z
k64f z
Z-coordinate value.
Definition: kApiDef.h:1399
kCallback
Represents a callback function and context pointer.
Definition: kApiDef.h:1714
kItemCopy
void kItemCopy(void *dest, const void *src, kSize size)
Performs a small copy with minimal overhead.
Definition: kApiDef.h:1920
kVersion::kVersion_Build
k8u kVersion_Build(kVersion version)
Returns the build part of a version number.
Definition: kApiDef.h:898
kArgb::r
k8u r
Red component value.
Definition: kApiDef.h:1649
kPoint32f
2D point structure with 32-bit floating-point fields.
Definition: kApiDef.h:1311
kRect3d64f::y
k64f y
Y-coordinate of the origin.
Definition: kApiDef.h:1503
k32s::k32s_Format
kStatus k32s_Format(k32s value, kChar *buffer, kSize capacity)
Converts k32s value to string.
kCompressionPreset
Preset compression levels.
kRotatedRect32s::yc
k32s yc
Y-coordinate of the rectangle center.
Definition: kApiDef.h:1535
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:278
kFunction
void(kCall * kFunction)()
Generic pointer to function.
Definition: kApiDef.h:28
kRgb::r
k8u r
Red component value.
Definition: kApiDef.h:1621
kRotatedRect32f::height
k32f height
Height of the rectangle.
Definition: kApiDef.h:1554
kChar::kChar_IsDigit
kBool kChar_IsDigit(kChar ch)
Checks whether ASCII character is a digit.
Definition: kApiDef.h:422
kPoint64f::x
k64f x
X-coordinate value.
Definition: kApiDef.h:1327
kItemZero
void kItemZero(void *dest, kSize size)
Zero-initializes a small amount of memory with minimal overhead.
Definition: kApiDef.h:1938
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:797
kFieldInfo::type
kType type
Field type.
Definition: kApiDef.h:2000
kVersion::kVersion_Release
k8u kVersion_Release(kVersion version)
Returns the release part of a version number.
Definition: kApiDef.h:886
kEndianness::kEndianness_Host
kEndianness kEndianness_Host()
Reports the endianness of the current platform.
Definition: kApiDef.h:921
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:1325
kEndianness_ShouldReverse
kBool kEndianness_ShouldReverse(kEndianness endianness)
Reports whether byte ordering must be reversed to be consistent with the current platform.
Definition: kApiDef.h:932
kCallbackFx
kStatus(kCall * kCallbackFx)(kPointer receiver, kPointer sender, void *args)
Callback signature for a generic event handler.
Definition: kApiDef.h:1706
kRgb::g
k8u g
Green component value.
Definition: kApiDef.h:1620
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:1553
kArgb::b
k8u b
Blue component value.
Definition: kApiDef.h:1647
kRect16s::height
k16s height
Height of the rectangle.
Definition: kApiDef.h:1427
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:1648
k64s::k64s_Parse
kStatus k64s_Parse(k64s *value, const kChar *str)
Converts string to k64s value.
kPoint3d32s::x
k32s x
X-coordinate value.
Definition: kApiDef.h:1367
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:1350
kEnumeratorInfo::value
k32s value
Enumerator numeric value.
Definition: kApiDef.h:2012
kMethodInfo::functionName
kTypeName functionName
Full function name (e.g. "kObject_Clone").
Definition: kApiDef.h:1988
k16s
Represents a 16-bit signed integer.
kRect32f::y
k32f y
Y-coordinate of the origin.
Definition: kApiDef.h:1457
k32f
Represents a 32-bit floating-point number.
kPoint64f::y
k64f y
Y-coordinate value.
Definition: kApiDef.h:1328
kObject
Root of all Zen classes.
kVersion
Represents a version number.
kArgb::a
k8u a
Alpha component value.
Definition: kApiDef.h:1650
kStatus::kOK
#define kOK
Operation successful.
Definition: kApiDef.h:513
kStatus
Represents an error code.
kRect3d64f::z
k64f z
Z-coordinate of the origin.
Definition: kApiDef.h:1504
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:1622
kPoint32s::y
k32s y
Y-coordinate value.
Definition: kApiDef.h:1300
kFieldInfo::offset
kSize offset
Offset of field within structure (bytes).
Definition: kApiDef.h:2001
kCall
#define kCall
kApi standard function calling convention.
Definition: kApiDef.h:15
kRect32f::width
k32f width
Width of the rectangle.
Definition: kApiDef.h:1458
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:1500
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:1422
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:305
kRect32s::x
k32s x
X-coordinate of the origin.
Definition: kApiDef.h:1440
kRotatedRect32f::xc
k32f xc
X-coordinate of the rectangle center.
Definition: kApiDef.h:1551
kPoint32s
2D point structure with 32-bit signed integer fields.
Definition: kApiDef.h:1297
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:1424
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:2002
kRect32f::height
k32f height
Height of the rectangle.
Definition: kApiDef.h:1459
kPoint3d64f
3D point structure with 64-bit floating-point fields.
Definition: kApiDef.h:1395
kPoint3d32s
3D point structure with 32-bit signed integer fields.
Definition: kApiDef.h:1365
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:1383
k8s::k8s_Parse
kStatus k8s_Parse(k8s *value, const kChar *str)
Converts string to k8s value.