Primordial Machine's Core Library

Primordial Machine's Core Library is a C library. The library has the following four objectives:

  • protect developers from compilation and execution environment idiosyncracies and enables cross-platform development
  • provide developers with a framework (code and patterns) for object-oriented programming and concurrent programming as well as error handling and resolution in order to create maintainable, re-usable, efficient, and safe programs in the C language.
  • provide developers implement functionality on top of the aforementioned framework that is dearly missed when writing programs in the C language. This functionality includes (but is not restricted to) UTF-8 string representations and operations, code annotations, memory management, data structures (array lists, hash maps, etc.), mathematics, safe arithmetic.

The library emphasizes error-safety for embedding programs: that is, when used as intended, it will never never simply terminate upon an failure and always either resolve or propagate errors.

Core_ApplicationMessage

Signature

typedef struct Core_ApplicationMessage Core_ApplicationMessage;

Extends

Core_Message

Description

A message pertaining to an Application.

Core_ApplicationMessage_create

Signature

Core_Result Core_ApplicationMessage_create(Core_ApplicationMessage** RETURN, Core_ApplicationMessageKind kind);

Description

Create a Core_ApplicationMessage object.

Parameters

RETURNCore_ApplicationMessage**A pointer to a Core_ApplicationMessage* variable.
kindCore_ApplicationMessageKindThe kind of this application message.

Success

*RETURN was assigned a pointer to the Core_ApplicationMessage object.

Errors

Core_Error_ArgumentInvalidRETURN is a null pointer.
Core_Error_AllocationFailedAn allocation failed.

Return

Core_Success on success. Core_Failure on failure.

Remarks

This function sets the by-thread error variable on failure.

Core_ApplicationMessageKind

Signature

typedef enum Core_ApplicationMessageKind <implementation> Core_ApplicationMessageKind;

Description

An enumeration of kinds of application messages.

Elements

Core_ApplicationMessageKind_QuitRequestedKind of canvas state changed message.

Core_Assets_Ref

Signature

typedef struct Core_Assets_Ref Core_Assets_Ref;

Extends

Core_Object

Description

A reference to an asset definition.

Core_AudialsBackend

Signature

#define Core_AudialsBackend <implementation>

Description

Symbolic constant denoting the audials backend this library was compiled for.
It is always defined as one of the Core_AudialsBackend_* constants.

Core_AudialsBackend_OpenAl

Signature

#define Core_Visuals_OpenAl <implementation>

Description

Symbolic constant defined to a numeric value that is different from the values of all other Core_AudialsBackend_* symbolic constants.
The symbolic constant denotes the OPENAL audials backend.

Core_Boolean

Signature

typedef <implementation> Core_Boolean;

Description

A type with two values Core_True and Core_False indicating logically true and logically value, respectively.

Core_ceil

Signature

Core_Result Core_ceil<Suffix>(<Type>* RETURN, <Type> x);

where <Suffix> and <Type> can assume the values of

<Suffix> <Type>
R32 Core_Real32
R64 Core_Real64

Description

Computes the smallest integer value not less than x.

Parameters

RETURN<Type>*A pointer to a <Type> variable.
x<Type>A value.

Success

*RETURN was assigned the smallest integer value not less than x.

±∞ and ±0 are returned unmodified.

NaN is returned if a value is NaN.

Errors

Core_Error_ArgumentInvalidRETURN is a null pointer

Return

Core_Success on success. Core_Failure on failure.

Remarks

This function sets the by-thread error variable on failure.

Core_clearBits

Signature

Core_Result Core_clearBits<Suffix>(<Type>* RETURN, Core_Size i, Core_Size n);

where <Suffix> and <Type> can assume the values of

<Suffix> <Type>
N8 Core_Natural8
N16 Core_Natural16
N32 Core_Natural32
N64 Core_Natural64

Description

Clear bits.

Parameters

RETURN<Type>*A pointer to a <Type> variable.
v<Type>The value.
iCore_SizeThe index of the Bit in the range [i, i + n).
nCore_SizeThe number of Bits in the range [i, i + n).

Success

*RETURN was assigned the value x with the Bits [i, i + n) all 0.

Errors

Core_Error_ArgumentInvalidRETURN is a null pointer.
Core_Error_ArgumentInvalidi is greater than the width of the type minus one.
Core_Error_ArgumentInvalidi + n is greater than the width of the type.

Return

Core_Success on success. Core_Failure on failure.

Remarks

This function sets the by-thread error variable on failure.

Core_combineHashes

Signature

Core_Result Core_combineHashes(Core_Size* RETURN, Core_Size x, Core_Size x);

Description

Combine hash values.

Parameters

RETURNCore_Size*A pointer to a Core_Size variable.
xCore_SizeThe first hash value.
yCore_SizeThe second hash value.

Success

*RETURN was assigned the combination of the hash value x and the hash values y.

Errors

Core_Error_ArgumentInvalidRETURN is a null pointer

Return

Core_Success on success. Core_Failure on failure.

Remarks

This function sets the by-thread error variable on failure.

Core_Compiler_C

Signature

#define Core_Compiler_C <implementation>

Description

Symbolic constant denoting the C compiler used for compiling this library.
Is defined to one of the Core_Compiler_C_* constants.

Core_Compiler_C_Clang

Signature

#define Core_Compiler_C_Clang <implementation>

Description

Symbolic constant defined to a numeric value that is different from the values of the other Core_Compiler_C_* symbolic constants.
The symbolic constant denotes the CLANG C compiler.

Core_Compiler_C_Gcc

Signature

#define Core_Compiler_C_Gcc <implementation>

Description

Symbolic constant defined to a numeric value that is different from the values of the other Core_Compiler_C_* symbolic constants.
The symbolic constant denotes the GCC C compiler.

Core_Compiler_C_Msvc

Signature

#define Core_Failure <implementation>

Description

Symbolic constant defined to a numeric value that is different from the values of the other Core_Compiler_C_* symbolic constants.
The symbolic constant denotes the MSVC C compiler.

Core_Compiler_Cpp

Signature

#define Core_Compiler_Cpp <implementation>

Description

Symbolic constant denoting the C++ compiler used for compiling this library.
Is defined to one of the Core_Compiler_Cpp_* constants.

Core_Compiler_Cpp_Clang

Signature

#define Core_Compiler_Cpp_Clang <implementation>

Description

Symbolic constant defined to a numeric value that is different from the values of the other Core_Compiler_Cpp_* symbolic constants.
The symbolic constant denotes the CLANG C++ compiler.

Core_Compiler_Cpp_Gcc

Signature

#define Core_Compiler_Cpp_Gcc <implementation>

Description

Symbolic constant defined to a numeric value that is different from the values of the other Core_Compiler_Cpp_* symbolic constants.
The symbolic constant denotes the GCC C++ compiler.

Core_Compiler_Cpp_Msvc

Signature

#define Core_Compiler_Cpp_Msvc <implementation>

Description

Symbolic constant defined to a numeric value that is different from the values of the other Core_Compiler_Cpp_* symbolic constants.
The symbolic constant denotes the MSVC C++ compiler.

Core_convertStringTo

Signature

Core_Result Core_convertStringTo<Suffix>(<Type>* RETURN, Core_Natural8 const* p, Core_Size n);

where <Suffix> and <Type> can assume the values of

<Suffix> <Type>
I8 Core_Integer8
I16 Core_Integer16
I32 Core_Integer32
I64 Core_Integer64
N8 Core_Natural8
N16 Core_Natural16
N32 Core_Natural32
N64 Core_Natural64
Sz Core_Size
R32 Core_Real32
R64 Core_Real64
B Core_Boolean

Description

Convert a UTF-8 Byte sequence into a value.

Parameters

RETURN<Type>*A pointer to a <Type> variable.
pCore_Natural8 const*A pointer to a valid UTF-8 Byte sequence.
nCore_SizeThe number of Bytes in the UTF-8 Byte sequence pointed to by p.

Success

*RETURN was assigned the value represented by the UTF-8 Byte sequence.

Errors

Core_Error_ArgumentInvalidRETURN is a null pointer.
Core_Error_ArgumentInvalidp is a null pointer.
Core_Error_ConversionFailedThe Byte sequence pointed to by p is not a UTF-8 Byte sequence.
Core_Error_ConversionFailedThe UTF-8 Byte sequence does not represent a value of the specified type.

Return

Core_Success on success. Core_Failure on failure.

Remarks

This function sets the by-thread error variable on failure.

Core_cos

Signature

Core_Result Core_cos<Suffix>(<Type>* RETURN, <Type> x);

where <Suffix> and <Type> can assume the values of

<Suffix> <Type>
R32 Core_Real32
R64 Core_Real64

Description

Computes the cosine value of the value x.

Parameters

RETURN<Type>*A pointer to a <Type> variable

Success

*RETURN was assigned the cosine value of the value x.

Errors

Core_Error_ArgumentInvalidRETURN is a null pointer
Core_Error_ArgumentInvalidx is ±∞ or NaN

Return

Core_Success on success. Core_Failure on failure.

Remarks

This function sets the by-thread error variable on failure.

Core_countLeadingZeroes

Signature

Core_Result Core_countLeadingZeroes<Suffix>(Core_Size* RETURN, <&Type> x);

where <Suffix> and <Type> can assume the values of

<Suffix> <Type>
N8 Core_Natural8n
N16 Core_Natural16
N32 Core_Natural32
N64 Core_Natural64
Sz Core_Size

Description

Compute the number of leading zeroes in the binary representation of the specified value.

Parameters

RETURNCore_Size*A pointer to a Core_Size variable.
x<Type>The value.

Success

*RETURN was assigned the number of leading zeroes in the binary representation of the value x.

Errors

Core_Error_ArgumentInvalidRETURN is a null pointer

Return

Core_Success on success. Core_Failure on failure.

Remarks

This function sets the by-thread error variable on failure.

Core_createDirectoryFile

Signature

Core_Result Core_createDirectoryFile(Core_String* path);

Description

Delete a directory file.The path to the ancestor directory must exist for this function to succeed.

Parameters

pathCore_String*The path of the directory file.

Success

The directory file was created.

Errors

Core_Error_ArgumentInvalidpath is a null pointer.
Core_Error_NotFoundThe directory file was not found.
Core_Error_EnvironmentFailedDeleting the directory file failed.

Return

Core_Success on success. Core_Failure on failure.

Remarks

This function sets the by-thread error variable on failure.

Core_deleteDirectoryFile

Signature

Core_Result Core_deleteDirectoryFile(Core_String* path);

Description

Delete a directory file.The directory must be empty for this function to succeed.

Parameters

pathCore_String*The path of the directory file.

Success

The directory file was deleted.

Errors

Core_Error_ArgumentInvalidpath is a null pointer.
Core_Error_NotFoundThe directory file was not found.
Core_Error_EnvironmentFailedDeleting the directory file failed.

Return

Core_Success on success. Core_Failure on failure.

Remarks

This function sets the by-thread error variable on failure.

Core_deleteRegularFile

Signature

Core_Result Core_deleteRegularFile(Core_String* path);

Description

Delete a regular file.

Parameters

pathCore_String*The path of the regular file.

Success

The regular file was deleted.

Errors

Core_Error_ArgumentInvalidpath is a null pointer.
Core_Error_NotFoundThe regular file was not found.
Core_Error_EnvironmentFailedDeleting the regular file failed.

Return

Core_Success on success. Core_Failure on failure.

Remarks

This function sets the by-thread error variable on failure.

Core_EmitMessage

Signature

typedef struct Core_EmitMessage Core_EmitMessage;

Extends

Core_Message

Description

A message that emits text to the Default Emission Channel.

Core_EmitMessage_create

Signature

Core_Result Core_EmitMessage_create(Core_EmitMessage** RETURN, Core_ApplicationMessageKind kind);

Description

Create a Core_EmitMessage object.

Parameters

RETURNCore_EmitMessage**A pointer to a Core_EmitMessage* variable.
messageCore_String*The message to emit.

Success

*RETURN was assigned a pointer to the Core_EmitMessage object.

Errors

Core_Error_ArgumentInvalidRETURN is a null pointer.
Core_Error_ArgumentInvalidmessage is a null pointer.
Core_Error_AllocationFailedAn allocation failed.

Return

Core_Success on success. Core_Failure on failure.

Remarks

This function sets the by-thread error variable on failure.

Core_Error

Signature

typedef <implementation> Core_Error;

Description

Integer type of error values.

Core_Error_AllocationFailed

Signature

#define Core_Error_AllocationFailed <implementation>

Description

Symbolic constant for a Core_Error value. That value indicates that an allocation failed. The value is guaranteed to be a non-zero value.

Core_Error_ArgumentInvalid

Signature

#define Core_Error_ArgumentInvalid <implementation>

Description

Symbolic constant for a Core_Error value. That value indicates that an argument is invalid. The value is guaranteed to be a non-zero value.

Core_Error_ConversionFailed

Signature

#define Core_Error_ConversionFailed <implementation>

Description

Symbolic constant for a Core_Error value. That value indicates that a conversion failed. The value is guaranteed to be a non-zero value.

Core_Error_DecodingFailed

Signature

#define Core_Error_DecodingFailed <implementation>

Description

Symbolic constant for a Core_Error value. That value indicates that a decoding failed. The value is guaranteed to be a non-zero value.

Core_Error_Empty

Signature

#define Core_Error_Empty <implementation>

Description

Symbolic constant for a Core_Error value. That value indicates that an an error occurred because something was empty (but should not have been empty). The value is guaranteed to be a non-zero value.

Core_Error_EncodingFailed

Signature

#define Core_Error_EncodingFailed <implementation>

Description

Symbolic constant for a Core_Error value. That value indicates that an encoding failed. The value is guaranteed to be a non-zero value.

Core_Error_EnvironmentFailed

Signature

#define Core_Error_EnvironmentFailed <implementation>

Description

Symbolic constant for a Core_Error value. That value indicates that the executing environment failed. The value is guaranteed to be a non-zero value.

Core_Error_Exists

Signature

#define Core_Error_Exists <implementation>

Description

Symbolic constant for a Core_Error value. That value indicates that an an error occurred because something existed (but should not have existed). The value is guaranteed to be a non-zero value.

Core_Error_Found

Signature

#define Core_Error_Found <implementation>

Description

Symbolic constant for a Core_Error value. That value indicates a failure because something was found (but should not have been found). The value is guaranteed to be a non-zero value.

Core_Error_Initialized

Signature

#define Core_Error_Initialized <implementation>

Description

Symbolic constant for a Core_Error value. That value indicates that an an error occurred because something was initialized (but should not have been initialized). The value is guaranteed to be a non-zero value.

Core_Error_LexicalAnalysisFailed

Signature

#define Core_Error_LexicalAnalysisFailed <implementation>

Description

Symbolic constant for a Core_Error value. That value indicates that a lexical analysis failed. The value is guaranteed to be a non-zero value.

Core_Error_NoError

Signature

#define Core_Error_NoError <implementation>

Description

Symbolic constant for a Core_Error value. That value indicates that no error occurred. The value is guaranteed to be a zero value.

Core_Error_NotEmpty

Signature

#define Core_Error_NotEmpty <implementation>

Description

Symbolic constant for a Core_Error value. That value indicates that an an error occurred because something was not empty (but should have been empty). The value is guaranteed to be a non-zero value.

Core_Error_NotExists

Signature

#define Core_Error_NotExists <implementation>

Description

Symbolic constant for a Core_Error value. That value indicates that an an error occurred because something did not exist (but should have existed). The value is guaranteed to be a non-zero value.

Core_Error_NotFound

Signature

#define Core_Error_NotFound <implementation>

Description

Symbolic constant for a Core_Error value. That value indicates a failure because something was not found (but should have been found). The value is guaranteed to be a non-zero value.

Core_Error_NotImplemented

Signature

#define Core_Error_NotImplemented <implementation>

Description

Symbolic constant for a Core_Error value. That value indicates a failure because something was not implemented. The value is guaranteed to be a non-zero value.

Core_Error_NotInitialized

Signature

#define Core_Error_NotInitialized <implementation>

Description

Symbolic constant for a Core_Error value. That value indicates that an an error occurred because something was not initialized (but should have been initialized). The value is guaranteed to be a non-zero value.

Core_Error_NumericOverflow

Signature

#define Core_Error_NumericOverflow <implementation>

Description

Symbolic constant for a Core_Error value. That value indicates a failure because of a numeric overflow. The value is guaranteed to be a non-zero value.

Core_Error_OperationInvalid

Signature

#define Core_Error_OperationInvalid <implementation>

Description

Symbolic constant for a Core_Error value. That value indicates that an operation is invalid. The value is guaranteed to be a non-zero value.

Core_Error_SemanticalAnalysisFailed

Signature

#define Core_Error_SemanticalError <implementation>

Description

Symbolic constant for a Core_Error value. That value indicates that a semantical analysis failed. The value is guaranteed to be a non-zero value.

Core_Error_SyntacticalAnalysisFailed

Signature

#define Core_Error_SyntacticalAnalysisFailed <implementation>

Description

Symbolic constant for a Core_Error value. That value indicates that a syntactical analysis failed. The value is guaranteed to be a non-zero value.

Core_Error_TestFailed

Signature

#define Core_Error_TestFailed <implementation>

Description

Symbolic constant for a Core_Error value. That value indicates that an an error occurred because a test failed. The value is guaranteed to be a non-zero value.

Core_ExistingFilePolicy

Signature

typedef enum Core_ExistingFilePolicy <implementation> Core_ExistingFilePolicy;

Description

An enumeration of policies for opening a file in case of that the file exists.
The enumeration elements cannot be combined.

Elements

Core_ExistingFilePolicy_RetainRetain the file contents.
Core_ExistingFilePolicy_TruncateTruncate the file contants.

Core_Failure

Signature

#define Core_Failure <implementation>

Description

Symbolic constant for a non-zero value of type Core_Result indicating failure.

Core_False

Signature

#define Core_False <implementation>

Description

One of the two values of the type Core_Boolean indicating logically false.

Core_FileAccessMode

Signature

typedef enum Core_FileAccessMode <implementation> Core_FileAccessMode;

Description

An enumeration of file access modes.
The enumeration elements can be combined.

Elements

Core_FileAccessMode_ReadRead access. Can be combined with Core_FileAccessMode_Write.
Core_FileAccessMode_WriteWrite access. Can be combined with Core_FileAccessMode_Read.
Core_FileAccessMode_ReadWriteRead and write access. Alias for Core_FileAccessMode_Read|Core_FileAccessMode_Write and for Core_FileAccessMode_WriteRead.
Core_FileAccessMode_WriteReadWrite and read access. Alias for Core_FileAccessMode_Write|Core_FileAccessMode_Read and for Core_FileAccessMode_ReadWrite.

Core_FileType

Signature

typedef enum Core_FileType <implementation> Core_FileType;

Description

An enumeration of file types.
The enumeration elements cannot be combined.

Elements

Core_FileType_DirectoryA file is a directory file.
Core_FileType_RegularA file is a regular file.

Core_floor

Signature

Core_Result Core_floor<Suffix>(<Type>* RETURN, <Type> x);

where <Suffix> and <Type> can assume the values of

<Suffix> <Type>
R32 Core_Real32
R64 Core_Real64

Description

Computes the greatest integer value not greater than x.

Parameters

RETURN<Type>*A pointer to a <Type> variable.
x<Type>A value.

Success

*RETURN was greatest integer value not greater than x.

±∞ and ±0 are returned unmodified.

NaN is returned if a value is NaN.

Errors

Core_Error_ArgumentInvalidRETURN is a null pointer

Return

Core_Success on success. Core_Failure on failure.

Remarks

This function sets the by-thread error variable on failure.

Core_getError

Signature

Core_Error Core_getError();

Description

Get the value of the by-thread error variable.

Success

This function cannot fail.

Return

The value of the by-thread error variable.

Remarks

The initial value is Core_Error_NoError.

Core_getFileContents

Signature

Core_Result Core_getFileContents(Core_String* path, void **bytes, Core_Size *numberOfBytes);

Description

Get the contents of a file.

Parameters

pathCore_String*The path of the file.
bytesCore_Natural8**A pointer to a Core_Natural* variable.
numberOfBytesCore_Size*A pointer to a Core_Size variable.

Success

*bytes was assigned an array of Core_Natural8 values representing the contents of the file.

*numberOfBytes was assigned the length of that array.

Errors

Core_Error_ArgumentInvalidpath is a null pointer.
Core_Error_ArgumentInvalidbytes is a null pointer.
Core_Error_ArgumentInvalidnumberOfBytes is a null pointer.
Core_Error_EnvironmentFailedThe environment failed.

Return

Core_Success on success. Core_Failure on failure.

Remarks

This function sets the by-thread error variable on failure.

Core_getFileType

Signature

Core_Result Core_getFileType(Core_FileType* RETURN, Core_String* path);

Description

Get the file type of a file.

Parameters

RETURNCore_FileTypeA pointer to a Core_FileType variable.
pathCore_String*The path of the file.

Success

*RETURN was assigned the file type of the file.

Errors

Core_Error_ArgumentInvalidRETURN is a null pointer.
Core_Error_ArgumentInvalidpath is a null pointer.
Core_Error_ArgumentInvalidpath is not a valid path.
Core_Error_EnvironmentFailedThe environment failed.

Return

Core_Success on success. Core_Failure on failure.

Remarks

This function sets the by-thread error variable on failure.

Core_getNow

Signature

Core_Result Core_getNow(Core_Natural64* RETURN);

Description

Retrieves the number of milliseconds that have elapsed since the system was started.

Parameters

RETURNCore_Natural64*A pointer to a Core_Natural64 variable.

Success

*RETURN was assigned the number of milliseconds that have elapsed since the system was started.

Errors

Core_Error_ArgumentInvalidRETURN is a null pointer.

Return

Core_Success on success. Core_Failure on failure.

Remarks

This function sets the by-thread error variable on failure.

Core_getNumberOfCores

Signature

Core_Result Core_getNumbeOfCores(Core_Size* RETURN);

Description

Get the number of CPU cores of the executing target environment.

Parameters

RETURNCore_Size*A pointer to a Core_Size variable

Success

*RETURN was assigned the number of CPU cores.

Errors

Core_Error_ArgumentInvalidRETURN is a null pointer
Core_Error_EnvironmentFailedthe executing target environment failed

Return

Core_Success on success. Core_Failure on failure.

Remarks

This function sets the by-thread error variable on failure.

Core_getPageSize

Signature

Core_Result Core_getPageSize(Core_Size* RETURN);

Description

Get the memory page size of the executing target environment.

Parameters

RETURNCore_Size*A pointer to a Core_Size variable

Success

*RETURN was assigned the *RETURN was assigned the memory page size.

Errors

Core_Error_ArgumentInvalidRETURN is a null pointer
Core_Error_EnvironmentFailedthe executing target environment failed

Return

Core_Success on success. Core_Failure on failure.

Remarks

This function sets the by-thread error variable on failure.

Core_hash

Signature

Core_Result Core_hash<Suffix>(Core_Size* RETURN, <Type> x);

where <Suffix> and <Type> can assume the values of

<Suffix> <Type>
B Core_Boolean
R32 Core_Real32
R64 Core_Real64
Sz Core_Size
N8 Core_Natural8
N16 Core_Natural16
N32 Core_Natural32
N64 Core_Natural64
I8 Core_Integer8
I16 Core_Integer16
I32 Core_Integer32
I64 Core_Integer64

Description

Computes the hash value of the value x.

Parameters

RETURNCore_Size*A pointer to a Core_Size variable
x<Type>The value to be hashed.

Success

*RETURN was assigned the hash value of the value x.

The positive zero and the negative zero both hash to the same value.

Errors

Core_Error_ArgumentInvalidRETURN is a null pointer

Return

Core_Success on success. Core_Failure on failure.

Remarks

This function sets the by-thread error variable on failure.

Core_hashBytes

Signature

Core_Result Core_hashBytes(Core_Size* RETURN, void *p, Core_Size n);

Description

Computes the hash value of the value x.

Parameters

RETURNCore_Size*A pointer to a Core_Size variable.
pvoid*A pointer to an array of n Bytes.
nCore_SizeThe length, in Bytes, of the array pointed to by p. May be 0.

Success

*RETURN was assigned the hash value of the value x.

Errors

Core_Error_ArgumentInvalidRETURN is a null pointer
Core_Error_ArgumentInvalidp is a null pointer

Return

Core_Success on success. Core_Failure on failure.

Remarks

This function sets the by-thread error variable on failure.

Core_hashPointer

Signature

Core_Result Core_hashPointer(Core_Size* RETURN, void const*x);

Description

Computes the hash value of the value x.

Parameters

RETURNCore_Size*A pointer to a Core_Size variable.
xvoid const*The pointer to be hashed. May be the null pointer.

Success

*RETURN was assigned the hash value of the value x.

Errors

Core_Error_ArgumentInvalidRETURN is a null pointer.

Return

Core_Success on success. Core_Failure on failure.

Remarks

This function sets the by-thread error variable on failure.

Core_InlineArrayDeque

Signature

typedef struct Core_InlineArrayDeque<Suffix> Core_InlineArrayDeque<Suffix>;

where <Suffix> and <Suffix> can assume the values of

<Suffix> <Type>
N8 Core_Natural8

Description

A dynamic deque with elements of type <Type>. An array-like data structure is used underneath.

Core_InlineArrayDeque_AddedCallback

Signature

typedef void (Core_InlineArrayDeque<Suffix>_AddedCallback)(Core_InlineArrayDeque<Suffix>_Element* element);

where <Suffix> and <Type> can assume the values of

<Suffix> <Type>
N8 Core_Natural8

Description

Callback invoked when an object was added to a Core_InlineArrayDeque<Suffix> object.

Core_InlineArrayDeque_clear

Signature

Core_Result Core_InlineArrayDeque<Suffix>_clear(Core_InlineArrayDeque<Suffix>* SELF);

where <Suffix> and <Type> can assume the values of

<Suffix> <Type>
N8 Core_Natural8
P void*

Description

Remove all elements.

Parameters

SELFCore_InlineArrayDeque<Suffix>*A pointer to a Core_InlineArrayDeque<Suffix> object.

Success

All elements were removed from this Core_InlineArrayDeque<Suffix> object.

Consequently, the size of the Core_InlineArrayDeque<Suffix> object is zero.

If a Core_InlineArrayDeque<Suffix>_ElementRemovedCallback function is associated with this Core_InlineArrayDeque<Suffix> object,

the function was invoked on each removed element exactly once.

Errors

Core_Error_ArgumentInvalidSELF is a null pointer.

Return

Core_Success on success. Core_Failure on failure.

Remarks

This function sets the by-thread error variable on failure.This function fails only with the specified errors/error conditions.

Core_InlineArrayDeque_Element

Signature

typedef <implementation> Core_InlineArrayDeque<Suffix>_Element;

where <Suffix> and <Suffix> can assume the values of

<Suffix> <Type>
N8 Core_Natural8

Description

The type of an element of a dynamic deque Core_InlineArrayDeque<Suffix>.

Core_InlineArrayDeque_ensureFreeCapacity

Signature

Core_Result Core_InlineArrayDeque<Suffix>_ensureFreeCapacity(Core_InlineArrayDeque<Suffix>* SELF);

where <Suffix> and <Type> can assume the values of

<Suffix> <Type>
N8 Core_Natural8
P void*

Description

Ensure the free capacity is greater than or equal to a specified value.

Parameters

SELFCore_InlineArrayDeque<Suffix>*A pointer to a Core_InlineArrayDeque<Suffix> object.
requiredCore_SizeThe required free capacity in elements.

Success

The free capacity is at least required.

Errors

Core_Error_ArgumentInvalidSELF is a null pointer.
Core_Error_AllocationFailedAn allocation failed.

Return

Core_Success on success. Core_Failure on failure.

Remarks

This function sets the by-thread error variable on failure.

Core_InlineArrayDeque_getCapacity

Signature

Core_Result Core_InlineArrayDeque<Suffix>_getCapacity(Core_Size* RETURN, Core_InlineArrayDeque<Suffix>* SELF);

where <Suffix> and <Type> can assume the values of

<Suffix> <Type>
N8 Core_Natural8
P void*

Description

Get the capacity, in elements.

Parameters

RETURNCore_Size*A pointer to a Core_Size variable.
SELFCore_InlineArrayDeque<Suffix>*A pointer to a Core_InlineArray<Suffix> object.

Success

*RETURN was assigned the capacity, in elements, of this Core_InlineArrayDeque<Suffix> object.

Errors

Core_Error_ArgumentInvalidRETURN is a null pointer.
Core_Error_ArgumentInvalidSELF is a null pointer.

Return

Core_Success on success. Core_Failure on failure.

Remarks

This function sets the by-thread error variable on failure.This function fails only if SELF or RETURN is a null pointer.

Core_InlineArrayDeque_getFreeCapacity

Signature

Core_Result Core_InlineArrayDeque<Suffix>_getFreeCapacity(Core_Size* RETURN, Core_InlineArrayDeque<Suffix>* SELF);

where <Suffix> and <Type> can assume the values of

<Suffix> <Type>
N8 Core_Natural8
P void*

Description

Get the free capacity, in elements.

Parameters

RETURNCore_Size*A pointer to a Core_Size variable.
SELFCore_InlineArrayDeque<Suffix>*A pointer to a Core_InlineArrayDeque<Suffix> object.

Success

*RETURN was assigned the free capacity, in elements, of this Core_InlineArrayDeque<Suffix> object.

Errors

Core_Error_ArgumentInvalidRETURN is a null pointer.
Core_Error_ArgumentInvalidSELF is a null pointer.

Return

Core_Success on success. Core_Failure on failure.

Remarks

This function sets the by-thread error variable on failure.This function fails only if SELF or RETURN is a null pointer.

Core_InlineArrayDeque_getSize

Signature

Core_Result Core_InlineArrayDeque<Suffix>_getSize(Core_Size* RETURN, Core_InlineArrayDeque<Suffix>* SELF);

where <Suffix> and <Type> can assume the values of

<Suffix> <Type>
N8 Core_Natural8
P void*

Description

Get the size, in elements.

Parameters

RETURNCore_Size*A pointer to a Core_Size variable.
SELFCore_InlineArrayDeque<Suffix>*A pointer to a Core_InlineArrayDeque<Suffix> object.

Success

*RETURN was assigned the size, in elements, of this Core_InlineArrayDeque<Suffix> object.

Errors

Core_Error_ArgumentInvalidRETURN is a null pointer.
Core_Error_ArgumentInvalidSELF is a null pointer.

Return

Core_Success on success. Core_Failure on failure.

Remarks

This function sets the by-thread error variable on failure.This function fails only with the specified errors/error conditions.

Core_InlineArrayDeque_increaseCapacity

Signature

Core_Result Core_InlineArrayDeque<Suffix>_increaseCapacity(Core_InlineArrayDeque<Suffix>* SELF);

where <Suffix> and <Type> can assume the values of

<Suffix> <Type>
N8 Core_Natural8
P void*

Description

Increase the capacity by a specified value.

Parameters

SELFCore_InlineArrayDeque<Suffix>*A pointer to a Core_InlineArrayDeque<Suffix> object.
additionalCore_SizeThe amount to increase the capacity by in elements.

Success

The capacity was increased by at least additional.

Errors

Core_Error_ArgumentInvalidSELF is a null pointer.
Core_Error_AllocationFailedAn allocation failed.

Return

Core_Success on success. Core_Failure on failure.

Remarks

This function sets the by-thread error variable on failure.

Core_InlineArrayDeque_RemovedCallback

Signature

typedef void (Core_InlineArrayDeque<Suffix>_RemovedCallback)(Core_InlineArrayDeque<Suffix>_Element* element);

where <Suffix> and <Type> can assume the values of

<Suffix> <Type>
N8 Core_Natural8

Description

Callback invoked when an object was removed from a Core_InlineArrayDeque<Suffix> object.

Core_InlineArrayDeque_uninitialize

Signature

Core_Result Core_InlineArrayDeque<Suffix>_create(Core_InlineArrayDeque<Suffix>* SELF);

where <Suffix> and <Type> can assume the values of

<Suffix> <Type>
N8 Core_Natural8

Description

Uninitialize a Core_InlineArrayDeque<Suffix> object.

Parameters

SELFCore_InlineArrayDeque<Suffix>*A pointer to a Core_InlineArrayDeque<Suffix> object.

Success

The Core_InlineArrayDeque<Suffix> object was uninitialized.

Errors

Core_Error_ArgumentInvalidSELF is a null pointer.

Return

Core_Success on success. Core_Failure on failure.

Remarks

This function sets the by-thread error variable on failure.This function fails only if SELF is a null pointer.The behavior is undefined if SELF is not a null pointer but does not point to an initialized Core_InlineArrayDeque<Suffix> object.

Core_InlineArrayList

Signature

typedef struct Core_InlineArrayList<Suffix> Core_InlineArrayList<Suffix>;

where <Suffix> and <Suffix> can assume the values of

<Suffix> <Type>
N8 Core_Natural8

Description

A dynamic array with elements of type <Type>.

Core_InlineArrayList_AddedCallback

Signature

typedef void (Core_InlineArrayList<Suffix>_AddedCallback)(Core_InlineArrayList<Suffix>_Element* element);

where <Suffix> and <Type> can assume the values of

<Suffix> <Type>
N8 Core_Natural8

Description

Callback invoked when an object was added to a Core_InlineArrayList<Suffix> object.

Core_InlineArrayList_append

Signature

Core_Result Core_InlineArrayList<Suffix>_append(Core_InlineArrayList<Suffix>* SELF, <Type> element);

where <Suffix> and <Type> can assume the values of

<Suffix> <Type>
N8 Core_Natural8
P void*

Description

Append an element.

Parameters

SELFCore_InlineArrayList<Suffix>*A pointer to a Core_InlineArrayList<Suffix> object.
element<Type>The element to append.

Success

The element was appended to this this Core_InlineArrayList<Suffix> object.

Errors

Core_Error_ArgumentInvalidSELF is a null pointer.
Core_Error_AllocationFailedAn allocation failed.

Return

Core_Success on success. Core_Failure on failure.

Remarks

This function sets the by-thread error variable on failure.

Core_InlineArrayList_appendMany

Signature

Core_Result Core_InlineArrayList<Suffix>_appendMany(Core_InlineArrayList<Suffix>* SELF, <Type> const* elements, Core_Size numberOfElements);

where <Suffix> and <Type> can assume the values of

<Suffix> <Type>
N8 Core_Natural8
P void*

Description

Append elements.

Parameters

SELFCore_InlineArrayList<Suffix>*A pointer to a Core_InlineArrayList<Suffix> object.
elements<Type> const*A pointer to an array of numberOfElements elements.
numberOfElementsCore_InlineArrayList<Suffix>*The number of elements to append.

Success

The numberOfElements elements in the array elements were appended to this Core_InlineArrayList<Suffix;> object.

The elements were appended in the order of their appearance in the array elements.

Errors

Core_Error_ArgumentInvalidSELF is a null pointer.
Core_Error_ArgumentInvalidelements is a null pointer.
Core_Error_AllocationFailedAn allocation failed.

Return

Core_Success on success. Core_Failure on failure.

Remarks

This function sets the by-thread error variable on failure.

Core_InlineArrayList_clear

Signature

Core_Result Core_InlineArrayList<Suffix>_clear(Core_InlineArrayList<Suffix>* SELF);

where <Suffix> and <Type> can assume the values of

<Suffix> <Type>
N8 Core_Natural8
P void*

Description

Remove all elements.

Parameters

SELFCore_InlineArrayList<Suffix>*A pointer to a Core_InlineArrayList<Suffix> object.

Success

All elements were removed from this Core_InlineArrayList<Suffix> object.

Consequently, the size of the Core_InlineArrayList<Suffix> object is zero.

If a Core_InlineArrayList<Suffix>_ElementRemovedCallback function is associated with this Core_InlineArrayList<Suffix> object,

the function was invoked on each removed element exactly once.

Errors

Core_Error_ArgumentInvalidSELF is a null pointer.

Return

Core_Success on success. Core_Failure on failure.

Remarks

This function sets the by-thread error variable on failure.This function fails only with the specified errors/error conditions.

Core_InlineArrayList_Configuration

Signature

typedef struct Core_InlineArrayList<Suffix>_Configuration Core_InlineArrayList<Suffix>_Configuration;

where <Suffix> and <Suffix> can assume the values of

<Suffix> <Type>
N8 Core_Natural8
P void*

Description

A configuration for a Core_InlineArrayList<Suffix> object.

Members

keyAddedCallbackCore_InlineArrayList<Suffix>_KeyAddedCallback*A null pointer or a pointer to a Core_InlineArrayList<Suffix>_KeyAddedCallback function.
valueRemovedCallbackCore_InlineArrayList<Suffix>_ValueRemovedCallback*A null pointer or a pointer to a Core_InlineHa<Suffix>_KeyRemovedCallback function.

Core_InlineArrayList_Element

Signature

typedef <implementation> Core_InlineArrayList<Suffix>_Element;

where <Suffix> and <Suffix> can assume the values of

<Suffix> <Type>
N8 Core_Natural8

Description

The type of an element of a dynamic array Core_InlineArrayList<Suffix>.

Core_InlineArrayList_ensureFreeCapacity

Signature

Core_Result Core_InlineArrayList<Suffix>_ensureFreeCapacity(Core_InlineArrayList<Suffix>* SELF);

where <Suffix> and <Type> can assume the values of

<Suffix> <Type>
N8 Core_Natural8
P void*

Description

Ensure the free capacity is greater than or equal to a specified value.

Parameters

SELFCore_InlineArrayList<Suffix>*A pointer to a Core_InlineArrayList<Suffix> object.
requiredCore_SizeThe required free capacity in elements.

Success

The free capacity is at least required.

Errors

Core_Error_ArgumentInvalidSELF is a null pointer.
Core_Error_AllocationFailedAn allocation failed.

Return

Core_Success on success. Core_Failure on failure.

Remarks

This function sets the by-thread error variable on failure.

Core_InlineArrayList_get

Signature

Core_Result Core_InlineArrayList<Suffix>_get(<Type;>* RETURN, Core_InlineArrayList<Suffix>* SELF, Core_Size index);

where <Suffix> and <Type> can assume the values of

<Suffix> <Type>
N8 Core_Natural8
P void*

Description

Get the element at an index.

Parameters

RETURN<Type>*A pointer to a <Type> variable.
SELFCore_InlineArrayList<Suffix>*A pointer to a Core_InlineArrayList<Suffix> object.
indexCore_SizeThe index of the element.

Success

*RETURN was assigned the element at the specified index index in this Core_InlineArrayList<Suffix> object.

Errors

Core_Error_ArgumentInvalidRETURN is a null pointer.
Core_Error_ArgumentInvalidSELF is a null pointer.
Core_Error_ArgumentInvalidindex is greater than or equal to the size of this Core_InlineArrayList<Suffix> object.

Return

Core_Success on success. Core_Failure on failure.

Remarks

This function sets the by-thread error variable on failure.This function fails only with the specified errors/error conditions.

Core_InlineArrayList_getCapacity

Signature

Core_Result Core_InlineArrayList<Suffix>_getCapacity(Core_Size* RETURN, Core_InlineArrayList<Suffix>* SELF);

where <Suffix> and <Type> can assume the values of

<Suffix> <Type>
N8 Core_Natural8
P void*

Description

Get the capacity, in elements.

Parameters

RETURNCore_Size*A pointer to a Core_Size variable.
SELFCore_InlineArrayList<Suffix>*A pointer to a Core_InlineArrayList<Suffix> object.

Success

*RETURN was assigned the capacity, in elements, of this Core_InlineArrayList<Suffix> object.

Errors

Core_Error_ArgumentInvalidRETURN is a null pointer.
Core_Error_ArgumentInvalidSELF is a null pointer.

Return

Core_Success on success. Core_Failure on failure.

Remarks

This function sets the by-thread error variable on failure.This function fails only if SELF or RETURN is a null pointer.

Core_InlineArrayList_getFreeCapacity

Signature

Core_Result Core_InlineArrayList<Suffix>_getFreeCapacity(Core_Size* RETURN, Core_InlineArrayList<Suffix>* SELF);

where <Suffix> and <Type> can assume the values of

<Suffix> <Type>
N8 Core_Natural8
P void*

Description

Get the free capacity, in elements.

Parameters

RETURNCore_Size*A pointer to a Core_Size variable.
SELFCore_InlineArrayList<Suffix>*A pointer to a Core_InlineArrayList<Suffix> object.

Success

*RETURN was assigned the free capacity, in elements, of this Core_InlineArrayList<Suffix> object.

Errors

Core_Error_ArgumentInvalidRETURN is a null pointer.
Core_Error_ArgumentInvalidSELF is a null pointer.

Return

Core_Success on success. Core_Failure on failure.

Remarks

This function sets the by-thread error variable on failure.This function fails only if SELF or RETURN is a null pointer.

Core_InlineArrayList_getSize

Signature

Core_Result Core_InlineArrayList<Suffix>_getSize(Core_Size* RETURN, Core_InlineArrayList<Suffix>* SELF);

where <Suffix> and <Type> can assume the values of

<Suffix> <Type>
N8 Core_Natural8
P void*

Description

Get the size, in elements.

Parameters

RETURNCore_Size*A pointer to a Core_Size variable.
SELFCore_InlineArrayList<Suffix>*A pointer to a Core_InlineArrayList<Suffix> object.

Success

*RETURN was assigned the size, in elements, of this Core_InlineArrayList<Suffix> object.

Errors

Core_Error_ArgumentInvalidRETURN is a null pointer.
Core_Error_ArgumentInvalidSELF is a null pointer.

Return

Core_Success on success. Core_Failure on failure.

Remarks

This function sets the by-thread error variable on failure.This function fails only with the specified errors/error conditions.

Core_InlineArrayList_increaseCapacity

Signature

Core_Result Core_InlineArrayList<Suffix>_increaseCapacity(Core_InlineArrayList<Suffix>* SELF);

where <Suffix> and <Type> can assume the values of

<Suffix> <Type>
N8 Core_Natural8
P void*

Description

Increase the capacity by a specified value.

Parameters

SELFCore_InlineArrayList<Suffix>*A pointer to a Core_InlineArrayList<Suffix> object.
additionalCore_SizeThe amount to increase the capacity by in elements.

Success

The capacity was increased by at least additional.

Errors

Core_Error_ArgumentInvalidSELF is a null pointer.
Core_Error_AllocationFailedAn allocation failed.

Return

Core_Success on success. Core_Failure on failure.

Remarks

This function sets the by-thread error variable on failure.

Core_InlineArrayList_initialize

Signature

Core_Result Core_InlineArrayList<Suffix>_create(Core_InlineArrayList<Suffix>* SELF, Core_Size initialCapacity, Core_InlineArrayList<Suffix>_Configuration const* configuration);

where <Suffix> and <Type> can assume the values of

<Suffix> <Type>
N8 Core_Natural8

Description

Initialize a Core_InlineArrayList<Suffix> object.

Parameters

SELFCore_InlineArrayList<Suffix>*A pointer to a Core_InlineArrayList<Suffix> object.
initialCapacityCore_SizeThe initial capacity of the array. Can be 0.
configurationCore_InlineArrayList<Suffix>_Configuration const*A pointer to a Core_InlineArrayList<Suffix>_Configuration object. Can be NULL.

Success

The Core_InlineArrayList<Suffix> object was initialized.

The object was initialized using the specified capacity and configuration.

Errors

Core_Error_ArgumentInvalidSELF is a null pointer.
Core_Error_AllocationFailedAn allocation failed.

Return

Core_Success on success. Core_Failure on failure.

Remarks

This function sets the by-thread error variable on failure.

Core_InlineArrayList_insert

Signature

Core_Result Core_InlineArrayList<Suffix>_insert(Core_InlineArrayList<Suffix>* SELF, Core_Size index, <Type> element);

where <Suffix> and <Type> can assume the values of

<Suffix> <Type>
N8 Core_Natural8
P void*

Description

Insert an element.

Parameters

SELFCore_InlineArrayList<Suffix>*A pointer to a Core_InlineArrayList<Suffix> object.
indexCore_SizeThe index at which to insert the element.
element<Type>The element to append.

Success

The element was inserted to this this Core_InlineArrayList<Suffix> object at the specified index.

Errors

Core_Error_ArgumentInvalidSELF is a null pointer.
Core_Error_ArgumentInvalidindex is greater than the size of this Core_InlineArrayList<Suffix> object .
Core_Error_AllocationFailedAn allocation failed.

Return

Core_Success on success. Core_Failure on failure.

Remarks

This function sets the by-thread error variable on failure.

Core_InlineArrayList_insertMany

Signature

Core_Result Core_InlineArrayList<Suffix>_insertMany(Core_InlineArrayList<Suffix>* SELF, Core_Size index, <Type> const* elements, Core_Size numberOfElements);

where <Suffix> and <Type> can assume the values of

<Suffix> <Type>
N8 Core_Natural8
P void*

Description

Insert elements into this Core_InlineArrayList<Suffix> object.

Parameters

SELFCore_InlineArrayList<Suffix>*A pointer to a Core_InlineArrayList<Suffix> object.
indexCore_SizeThe index at which to insert the element.
elements<Type> const*A pointer to an array of numberOfElements elements.
numberOfElementsCore_InlineArrayList<Suffix>*The number of elements to append.

Success

The numberOfElements elements in the array elements were appended to this Core_InlineArrayList<Suffix;> object.

The elements were inserted in the order of their appearance in the array elements.

Errors

Core_Error_ArgumentInvalidSELF is a null pointer.
Core_Error_ArgumentInvalidelements is a null pointer.
Core_Error_ArgumentInvalidindex is greater than the size of this Core_InlineArrayList<Suffix> object .
Core_Error_AllocationFailedAn allocation failed.

Return

Core_Success on success. Core_Failure on failure.

Remarks

This function sets the by-thread error variable on failure.

Core_InlineArrayList_prepend

Signature

Core_Result Core_InlineArrayList<Suffix>_prepend(Core_InlineArrayList<Suffix>* SELF, <Type> element);

where <Suffix> and <Type> can assume the values of

<Suffix> <Type>
N8 Core_Natural8
P void*

Description

Prepend an element.

Parameters

SELFCore_InlineArrayList<Suffix>*A pointer to a Core_InlineArrayList<Suffix> object.
element<Type>The element to prepend.

Success

The element was prepended to this this Core_Inline_ArrayList<Suffix> object.

Errors

Core_Error_ArgumentInvalidSELF is a null pointer.
Core_Error_AllocationFailedAn allocation failed.

Return

Core_Success on success. Core_Failure on failure.

Remarks

This function sets the by-thread error variable on failure.

Core_InlineArrayList_prependMany

Signature

Core_Result Core_InlineArray<Suffix>_prependMany(Core_InlineArrayList<Suffix>* SELF, <Type> const* elements, Core_Size numberOfElements);

where <Suffix> and <Type> can assume the values of

<Suffix> <Type>
N8 Core_Natural8
P void*

Description

Prepend elements.

Parameters

SELFCore_InlineArrayList<Suffix>*A pointer to a Core_InlineArrayList<Suffix> object.
elements<Type> const*A pointer to an array of numberOfElements elements.
numberOfElementsCore_InlineArrayList<Suffix>*The number of elements to append.

Success

The numberOfElements elements in the array elements were prepended to this Core_InlineArrayList<Suffix;> object.

The elements were prepended in the order of their appearance in the array elements.

Errors

Core_Error_ArgumentInvalidSELF is a null pointer.
Core_Error_ArgumentInvalidelements is a null pointer.
Core_Error_AllocationFailedAn allocation failed.

Return

Core_Success on success. Core_Failure on failure.

Remarks

This function sets the by-thread error variable on failure.

Core_InlineArrayList_RemovedCallback

Signature

typedef void (Core_InlineArrayList<Suffix>_RemovedCallback)(Core_InlineArrayList<Suffix>_Element* element);

where <Suffix> and <Type> can assume the values of

<Suffix> <Type>
N8 Core_Natural8

Description

Callback invoked when an object was removed from a Core_InlineArrayList<Suffix> object.

Core_InlineArrayList_removeMany

Signature

Core_Result Core_InlineArrayList<Suffix>_removeMany(Core_InlineArrayList<Suffix>* SELF, Core_Size start, Core_Size length);

where <Suffix> and <Type> can assume the values of

<Suffix> <Type>
N8 Core_Natural8
P void*

Description

Remove a range of elements.

Parameters

SELFCore_InlineArrayList<Suffix>*A pointer to a Core_InlineArrayList<Suffix> object.
startCore_SizeThe starting index of the sequence of elements to remove.
lengthCore_SizeThe length of the sequence of elements to remove.

Success

The sequence of elements [start, length) was from this Core_InlineArrayList<Suffix> object.

Consequently, the size of the Core_InlineArrayList<Suffix> object is reduced by length.

If a Core_InlineArrayList<Suffix>_ElementRemovedCallback function is associated with this Core_InlineArrayList<Suffix> object,

the function was invoked on each removed element exactly once.

Errors

Core_Error_ArgumentInvalidSELF is a null pointer.
Core_Error_ArgumentInvalidindex + length is greater than the size of this Core_InlineArrayList<Suffix> object.

Return

Core_Success on success. Core_Failure on failure.

Remarks

This function sets the by-thread error variable on failure.This function fails only with the specified errors/error conditions.

Core_InlineArrayList_removeManyBack

Signature

Core_Result Core_InlineArrayList<Suffix>_removeManyBack(Core_InlineArrayList<Suffix>* SELF, Core_Size length);

where <Suffix> and <Type> can assume the values of

<Suffix> <Type>
N8 Core_Natural8
P void*

Description

Remove a range of elements from the back.

Parameters

SELFCore_InlineArrayList<Suffix>*A pointer to a Core_InlineArrayList<Suffix> object.
lengthCore_SizeThe length of the sequence of elements to remove.

Success

The sequence of elements [size, size - length) was removed from this Core_InlineArrayList<Suffix> object (where size is the size of this Core_InlineArrayList<Suffix> object).

Consequently, the size of the Core_InlineArrayList<Suffix> object is reduced by length.

If a Core_InlineArrayList<Suffix>_ElementRemovedCallback function is associated with this Core_InlineArrayList<Suffix> object,

the function was invoked on each removed element exactly once.

Errors

Core_Error_ArgumentInvalidSELF is a null pointer.
Core_Error_ArgumentInvalidlength is greater than the size of this Core_InlineArrayList<Suffix> object.

Return

Core_Success on success. Core_Failure on failure.

Remarks

This function sets the by-thread error variable on failure.This function fails only with the specified errors/error conditions.

Core_InlineArrayList_removeManyFront

Signature

Core_Result Core_InlineArrayList<Suffix>_removeManyFront(Core_InlineArrayList<Suffix>* SELF, Core_Size length);

where <Suffix> and <Type> can assume the values of

<Suffix> <Type>
N8 Core_Natural8
P void*

Description

Remove a range of elements from the front.

Parameters

SELFCore_InlineArrayList<Suffix>*A pointer to a Core_InlineArrayList<Suffix> object.
lengthCore_SizeThe length of the sequence of elements to remove.

Success

The sequence of elements [0, length) was removed from this Core_InlineArrayList<Suffix> object.

Consequently, the size of the Core_InlineArrayList<Suffix> object is reduced by length.

If a Core_InlineArrayList<Suffix>_ElementRemovedCallback function is associated with this Core_InlineArrayList<Suffix> object,

the function was invoked on each removed element exactly once.

Errors

Core_Error_ArgumentInvalidSELF is a null pointer.
Core_Error_ArgumentInvalidlength is greater than the size of this Core_InlineArrayList<Suffix> object.

Return

Core_Success on success. Core_Failure on failure.

Remarks

This function sets the by-thread error variable on failure.This function fails only with the specified errors/error conditions.

Core_InlineArrayList_uninitialize

Signature

Core_Result Core_InlineArrayList<Suffix>_create(Core_InlineArrayList<Suffix>* SELF);

where <Suffix> and <Type> can assume the values of

<Suffix> <Type>
N8 Core_Natural8

Description

Uninitialize a Core_InlineArrayList<Suffix> object.

Parameters

SELFCore_InlineArray<Suffix>*A pointer to a Core_InlineArray<Suffix> object.

Success

The Core_InlineArray<Suffix> object was uninitialized.

Errors

Core_Error_ArgumentInvalidSELF is a null pointer.

Return

Core_Success on success. Core_Failure on failure.

Remarks

This function sets the by-thread error variable on failure.This function fails only if SELF is a null pointer.The behavior is undefined if SELF is not a null pointer but does not point to an initialized Core_InlineArrayList<Suffix> object.

Core_InlineHashMap

Signature

typedef struct Core_InlineHashMap<Suffix> Core_InlineHashMap<Suffix>;

where <KeySuffix> <ValueSuffix> can assume the value of P.

Description

The type of an inline hashmap.

Core_InlineHashMap_clear

Signature

Core_Result Core_InlineHashMap<Suffix>_clear(Core_InlineHashMap<Suffix>* SELF);

where <KeySuffix> <ValueSuffix> can assume the value of P.

Description

Remove all elements.

Parameters

SELFCore_InlineHashMap<Suffix>*A pointer to a Core_InlineHashMap<Suffix> object.

Success

All elements were removed from this Core_InlineHashMap<Suffix> object.

Consequently, the size of the Core_InlineHashMap<Suffix> object is zero.

If a Core_InlineHashMap<Suffix>_ElementRemovedCallback function is associated with this Core_InlineHashMap<Suffix> object,

the function was invoked on each removed element exactly once.

Errors

Core_Error_ArgumentInvalidSELF is a null pointer.

Return

Core_Success on success. Core_Failure on failure.

Remarks

This function sets the by-thread error variable on failure.This function fails only with the specified errors/error conditions.

Core_InlineHashMap_CompareKeysCallback

Signature

typedef Core_Result (Core_InlineHashMap<Suffix>_CompareKeysCallback)(Core_Boolean*, Core_InlineHashMap<Suffix>_Key*, Core_InlineHashMap<Suffix>_Key*);

where <KeySuffix> <ValueSuffix> can assume the value of P.

Description

The type of a callback invoked to compare two keys.

Parameters

RETURNCore_Boolean*A pointer to a Core_Boolean variable.
xCore_InlineHashMap<Suffix>_Key*A pointer to a Core_InlineHashMap<Suffix>_Key value.
yCore_InlineHashMap<Suffix>_Key*A pointer to a Core_InlineHashMap<Suffix>_Key value.

Success

*RETURN was assigned Core_True if the keys are equal and Core_False otherwise.

Errors

Core_Error_ArgumentInvalidRETURN is a null pointer.
Core_Error_ArgumentInvalidx is a null pointer.
Core_Error_ArgumentInvalidy is a null pointer.

Return

Core_Success on success. Core_Failure on failure.

Remarks

This function sets the by-thread error variable on failure.

Core_InlineHashMap_Configuration

Signature

typedef struct Core_InlineHashMapSuffix>​_Configuration Core_InlineHashMapSuffix>​_Configuration;

where <KeySuffix> <ValueSuffix> can assume the value of P.

Description

A configuration for a Core_InlineHashMap<Suffix> object.

Members

keyAddedCallbackCore_InlineHashMapSuffix>​_KeyAddedCallback*A null pointer or a pointer to a Core_InlineHashMapSuffix>​_KeyAddedCallback function.
keyRemovedCallbackCore_InlineHashMap<Suffix>_KeyRemovedCallback*A null pointer or a pointer to a Core_InlineHashMap<Suffix>_KeyRemovedCallback function.
valueAddedCallbackCore_InlineHashMapSuffix>​_ValueAddedCallback*A null pointer or a pointer to a Core_InlineHashMapSuffix>​_ValueAddedCallback function.
valueRemovedCallbackCore_InlineHashMapSuffix>​_ValueRemovedCallback*A null pointer or a pointer to a Core_InlineHashMapSuffix>​_ValueRemovedCallback function.
hashKeyCallbackCore_InlineHashMap<Suffix>_HashKeyCallback*A pointer to a Core_InlineHashMap<Suffix>_HashKeyCallback function.
compareKeysCallbackCore_InlineHashMap<Suffix>_CompareKeysCallback*A pointer to a Core_InlineHashMap<Suffix>_CompareKeysCallback function.

Core_InlineHashMap_get

Signature

Core_Result Core_InlineHashMap<Suffix>_get(Core_Size* RETURN, Core_InlineHashMap<Suffix>* SELF);

where <KeySuffix> <ValueSuffix> can assume the value of P.

Description

Get the value of an entry.

Parameters

RETURNCore_InlineHashMap<Suffix>_Value*A pointer to a Core_InlineHashMap<Suffix>_Value variable.
SELFCore_InlineHashMap<Suffix>*A pointer to a Core_InlineHashMap<Suffix> object.
keyCore_InlineHashMap<Suffix>_Key*The key.

Success

*RETURN was assigned value.

Errors

Core_Error_ArgumentInvalidRETURN is a null pointer.
Core_Error_ArgumentInvalidSELF is a null pointer.
Core_Error_NotFoundThe entry does not exist.

Return

Core_Success on success. Core_Failure on failure.

Remarks

This function sets the by-thread error variable on failure.This function fails only with the specified errors/error conditions.

Core_InlineHashMap_getCapacity

Signature

Core_Result Core_InlineHashMap<Suffix>_getCapacity(Core_Size* RETURN, Core_InlineHashMap<Suffix>* SELF);

where <KeySuffix> <ValueSuffix> can assume the value of P.

Description

Get the capacity, in elements.

Parameters

RETURNCore_Size*A pointer to a Core_Size variable.
SELFCore_InlineHashMap<Suffix>*A pointer to a Core_InlineHashMap<Suffix> object.

Success

*RETURN was assigned the capacity, in elements, of this Core_InlineHashMap<Suffix> object.

Errors

Core_Error_ArgumentInvalidRETURN is a null pointer.
Core_Error_ArgumentInvalidSELF is a null pointer.

Return

Core_Success on success. Core_Failure on failure.

Remarks

This function sets the by-thread error variable on failure.This function fails only if SELF or RETURN is a null pointer.

Core_InlineHashMap_getFreeCapacity

Signature

Core_Result Core_InlineHashMap<Suffix>_getFreeCapacity(Core_Size* RETURN, Core_InlineHashMap<Suffix>* SELF);

where <KeySuffix> <ValueSuffix> can assume the value of P.

Description

Get the free capacity, in elements.

Parameters

RETURNCore_Size*A pointer to a Core_Size variable.
SELFCore_InlineHashMap<Suffix>*A pointer to a Core_InlineHashMap<Suffix> object.

Success

*RETURN was assigned the free capacity, in elements, of this Core_InlineHashMap<Suffix> object.

Errors

Core_Error_ArgumentInvalidRETURN is a null pointer.
Core_Error_ArgumentInvalidSELF is a null pointer.

Return

Core_Success on success. Core_Failure on failure.

Remarks

This function sets the by-thread error variable on failure.This function fails only if SELF or RETURN is a null pointer.

Core_InlineHashMap_getSize

Signature

Core_Result Core_InlineHashMap<Suffix>_getSize(Core_Size* RETURN, Core_InlineHashMap<Suffix>* SELF);

where <KeySuffix> <ValueSuffix> of P.

Description

Get the size, in elements.

Parameters

RETURNCore_Size*A pointer to a Core_Size variable.
SELFCore_InlineHashMap<Suffix>*A pointer to a Core_InlineHashMap<Suffix> object.

Success

*RETURN was assigned the size, in elements, of this Core_InlineHashMap<Suffix> object.

Errors

Core_Error_ArgumentInvalidRETURN is a null pointer.
Core_Error_ArgumentInvalidSELF is a null pointer.

Return

Core_Success on success. Core_Failure on failure.

Remarks

This function sets the by-thread error variable on failure.This function fails only with the specified errors/error conditions.

Core_InlineHashMap_HashKeyCallback

Signature

typedef Core_Result (Core_InlineHashMap<Suffix>_KeyAddedCallback)(Core_Size* RETURN, Core_InlineHashMap<Suffix>_Key* x);

where <KeySuffix> <ValueSuffix> can assume the value of P.

Description

The type of a callback invoked to get the hash value for a key.

Parameters

RETURNCore_Size*A pointer to a Core_Size variable.
xCore_InlineHashMap<Suffix>_Key*A pointer to a Core_InlineHashMap<Suffix>_Key value.

Success

*RETURN was assigned the hash value of the key.

Errors

Core_Error_ArgumentInvalidRETURN is a null pointer.
Core_Error_ArgumentInvalidx is a null pointer.

Return

Core_Success on success. Core_Failure on failure.

Remarks

This function sets the by-thread error variable on failure.

Core_InlineHashMap_Key

Signature

typedef /*Implementation*/ Core_InlineMap<Suffix>_Key;

where <KeySuffix> <ValueSuffix> can assume the value of P.

Description

The type of a key stored in a Core_InlineHashMap.

Core_InlineHashMap_KeyAddedCallback

Signature

typedef void (Core_InlineHashMap<Suffix>_KeyAddedCallback)(Core_InlineHashMap<Suffix>_Key*);

where <KeySuffix> <ValueSuffix> can assume the value of P.

Description

The type of a callback invoked if a key is added to an inline pointer hash map.

Parameters

keyCore_InlineHashMap<Suffix>_Key*A pointer to a Core_InlineHashMap<Suffix>_Key value.

Core_InlineHashMap_KeyRemovedCallback

Signature

typedef void (Core_InlineHashMap<Suffix>_KeyRemovedCallback)(Core_InlineHashMap<Suffix>_Key* key);

where <KeySuffix> <ValueSuffix> can assume the value of P.

Description

The type of a callback invoked if a key is removed from an inline pointer hash map.

Parameters

keyCore_InlineHashMap<Suffix>_Key*A pointer to a Core_InlineHashMap<Suffix>_Key value.

Core_InlineHashMap_set

Signature

Core_Result Core_InlineHashMap<Suffix>_set(Core_InlineHashMap<Suffix>* SELF, Core_InlineHashMap<Suffix>_Key key, Core_InlineHashMap<Suffix>_Value value);

where <KeySuffix> <ValueSuffix> can assume the value of P.

Description

Add or update an entry in this hash map.

Parameters

SELFCore_InlineHashMap<Suffix>*A pointer to a Core_InlineHashMap<Suffix> object.
keyCore_InlineHashMap_Key<Suffix>The key.
valueCore_InlineHashMap_Value<Suffix>The value.

Success

*RETURN was assigned the size, in elements, of this Core_InlineHashMap<Suffix> object.

Errors

Core_Error_ArgumentInvalidSELF is a null pointer.
Core_Error_AllocationFailedAn allcation failed.

Return

Core_Success on success. Core_Failure on failure.

Remarks

This function sets the by-thread error variable on failure.This function fails only with the specified errors/error conditions.

Core_InlineHashMap_uninitialize

Signature

Core_Result Core_InlineHashMap<Suffix>_create(Core_InlineHashMap<Suffix>* SELF);

where <KeySuffix> <ValueSuffix> can assume the value of P.

Description

Uninitialize a Core_InlineHashMap<Suffix> object.

Parameters

SELFCore_InlineHashMap<Suffix>*A pointer to a Core_InlineHashMap<Suffix> object.

Success

The Core_InlineHashMap<Suffix> object was uninitialized.

Errors

Core_Error_ArgumentInvalidSELF is a null pointer.

Return

Core_Success on success. Core_Failure on failure.

Remarks

This function sets the by-thread error variable on failure.This function fails only if SELF is a null pointer.The behavior is undefined if SELF is not a null pointer but does not point to an initialized Core_InlineHashMap<Suffix> object.

Core_InlineHashMap_Value

Signature

typedef /*Implementation*/ Core_InlineHashMap<Suffix>_Key;

where <KeySuffix> <ValueSuffix> can assume the value of P.

Description

The type of a value stored in a Core_InlineHashMap<Suffix>.

Core_InlineHashMap_ValueAddedCallback

Signature

typedef void (Core_InlineHashMap<Suffix>_ValueAddedCallback)(Core_InlineHashMap<Suffix>_Value* value);

where <KeySuffix> <ValueSuffix> can assume the value of P.

Description

The type of a callback invoked if a value is added to an inline pointer hash map.

Parameters

valueCore_InlineHashMap<Suffix>_Value*A pointer to a Core_InlineHashMap<Suffix>_Value value.

Core_InlineHashMap_ValueRemovedCallback

Signature

typedef void (Core_InlineHashMap<Suffix>_ValueRemovedCallback)(Core_InlineHashMap<Suffix>_Value* value);

where <KeySuffix> <ValueSuffix> can assume the value of P.

Description

The type of a callback invoked if a value is removed from an inline pointer hash map.

Parameters

valueCore_InlineHashMap<Suffix>_Value*A pointer to a Core_InlineHashMap<Suffix>_Value value.

Core_InputMessage

Signature

typedef struct Core_InputMessage Core_InputMessage;

Extends

Core_Message

Description

An input message.

Core_InputMessage_construct

Signature

Core_Result Core_InputMessage_construct(Core_InputMessage* SELF, Core_InputMessageKind kind, Core_ModifiersKey modifierKeys);

Description

Construct a Core_InputMessage object.

Parameters

SELFCore_InputMessage*A pointer to this Core_InputMessage object.
kindCore_InputMessageKindThe kind of this input message object.
modifierKeysCore_ModifierKeysThe modifier keys of this input message object.

Success

This Core_InputMessage object was constructed.

Errors

Core_Error_ArgumentInvalidSELF is a null pointer.
Core_Error_AllocationFailedAn allocation failed.

Return

Core_Success on success. Core_Failure on failure.

Remarks

This function sets the by-thread error variable on failure.

Core_InputMessage_getKind

Signature

Core_Result Core_InputMessage_getKind(Core_InputMessageKind* RETURN, Core_InputMessage* SELF);

Description

Get the kind of this input message.

Parameters

RETURNCore_InputMessageKind*A pointer to a Core_InputMessageKind variable.
SELFCore_InputMessage*A pointer to this Core_InputMessage object.

Success

*RETURN was assigned the kind of this input message.

Errors

Core_Error_ArgumentInvalidRETURN is a null pointer.
Core_Error_ArgumentInvalidSELF is a null pointer.

Return

Core_Success on success. Core_Failure on failure.

Remarks

This function sets the by-thread error variable on failure.

Core_InputMessage_getModifierKeys

Signature

Core_Result Core_InputMessage_getModifierKeys(Core_ModifierKeys* RETURN, Core_InputMessage* SELF);

Description

Get the modifier keys of this input message.

Parameters

RETURNCore_ModifiereKeys*A pointer to a Core_ModifiereKeys variable.
SELFCore_InputMessage*A pointer to this Core_InputMessage object.

Success

*RETURN was assigned the modifier keys of this input message.

Errors

Core_Error_ArgumentInvalidRETURN is a null pointer.
Core_Error_ArgumentInvalidSELF is a null pointer.

Return

Core_Success on success. Core_Failure on failure.

Remarks

This function sets the by-thread error variable on failure.

Core_InputMessageKind

Signature

typedef enum Core_InputMessageKind <implementation> Core_InputMessageKind;

Description

An enumeration of kinds of canvas messages.

Elements

Core_InputMessageKind_KeyboardKeyKind of keyboard key message.
Core_InputMessageKind_MouseButtonKind of a mouse button message.
Core_InputMessageKind_MousePointerKind of a mouse pointer message.

Core_Integer16

Signature

typedef <implementation> Core_Integer16;

Description

A two's complement integer of a width of 16 Bits. This usually is an alias of int16_t.

Core_Integer16_Greatest

Signature

#define Core_Integer16_Greatest <implementation>

Description

The greatest value of type Core_Integer16.

Core_Integer16_Least

Signature

#define Core_Integer16_Least <implementation>

Description

The least value of type Core_Integer16.

Core_Integer32

Signature

typedef <implementation> Core_Integer32;

Description

A two's complement integer of a width of 32 Bits. This usually is an alias of int32_t.

Core_Integer32_Greatest

Signature

#define Core_Integer32_Greatest <implementation>

Description

The greatest value of type Core_Integer32.

Core_Integer32_Least

Signature

#define Core_Integer32_Least <implementation>

Description

The least value of type Core_Integer32.

Core_Integer64

Signature

typedef <implementation> Core_Integer64;

Description

A two's complement integer of a width of 64 Bits. This usually is an alias of int64_t.

Core_Integer64_Greatest

Signature

#define Core_Integer64_Greatest <implementation>

Description

The greatest value of type Core_Integer64.

Core_Integer64_Least

Signature

#define Core_Integer64_Least <implementation>

Description

The least value of type Core_Integer64.

Core_Integer8

Signature

typedef <implementation> Core_Integer8;

Description

A two's complement integer of a width of 8 Bits. This is an alias of int8_t.

Core_Integer8_Greatest

Signature

#define Core_Integer8_Greatest <implementation>

Description

The greatest value of type Core_Integer8.

Core_Integer8_Least

Signature

#define Core_Integer8_Least <implementation>

Description

The least value of type Code_Integer8.

Core_isInfinity

Signature

Core_Result Core_isInfinity<Suffix>(Core_Boolean* RETURN, <Type> x);

where <Suffix> and <Type> can assume the values of

<Suffix> <Type>
R32 Core_Real32
R64 Core_Real64

Description

Get if a value is ±∞.

Parameters

RETURNCore_Boolean*A pointer to a Core_Boolean variable

Success

*RETURN was assigned Core_True if the value x is ±∞ and was assigned Core_False otherwise.

Errors

Core_Error_ArgumentInvalidRETURN is a null pointer

Return

Core_Success on success. Core_Failure on failure.

Remarks

This function sets the by-thread error variable on failure.

Core_isNoNumber

Signature

Core_Result Core_isNoNumber<Suffix>(Core_Boolean* RETURN, <Type> x);

where <Suffix> and <Type> can assume the values of

<Suffix> <Type>
R32 Core_Real32
R64 Core_Real64

Description

Get if a value is no number.

Parameters

RETURNCore_Boolean*A pointer to a Core_Boolean variable

Success

*RETURN was assigned Core_True if the value x is no number and was assigned Core_False otherwise.

Errors

Core_Error_ArgumentInvalidRETURN is a null pointer

Return

Core_Success on success. Core_Failure on failure.

Remarks

This function sets the by-thread error variable on failure.

Core_KeyboardKey

Signature

typedef enum Core_KeyboardKey <implementation> Core_KeyboardKey;

Description

An enumeration of keyboard keys.

The numeric values of the digit keys form a consecutive range with Core_KeyboardKey_D0 being the lowest of value and Core_KeyboardKey_D9 being the highest of value.
Furthermore, the digit key constant of a lower number has a lower value than the digit key constant of a higher number.

The numeric values of the letter keys form a consecutive range with Core_KeyboardKey_A being the lowest value and Core_KeyboardKey_Z being the highest of value.
Furthermore, the letter key constant of a letter lower in the alphabet has a lower value than the letter key constant of a letter higher in the alphabet.

The numeric values of the numpad digit keys form a consecutive range with Core_KeyboardKey_NumPad0 being the lowest of value and Core_KeyboardKey_NumPad9 being the highest of value.
Furthermore, the numpad digit key constant of a lower digit has a lower value than the numpad digit key constant of a higher number.

Elements

Core_KeyboardKey_AThe A key.
Core_KeyboardKey_AcceptThe IME Accept key.
Core_KeyboardKey_AddThe Add key.
Core_KeyboardKey_ApplicationsThe Applications key (on Microsoft Natural Keyboard).
Core_KeyboardKey_BThe B key.
Core_KeyboardKey_BackspaceThe Backspace key.
Core_KeyboardKey_BrowserBackThe Browser Back key.
Core_KeyboardKey_BrowserFavoritesThe Browser Favorites key.
Core_KeyboardKey_BrowserForwardThe Browser Forward key.
Core_KeyboardKey_BrowserHomeThe Browser Home key.
Core_KeyboardKey_BrowserRefreshThe Browser Refresh key.
Core_KeyboardKey_BrowserSearchThe Browser Search key.
Core_KeyboardKey_BrowserStopThe Browser Stop key.
Core_KeyboardKey_CThe C key.
Core_KeyboardKey_CapitalThe Capital key.
Core_KeyboardKey_CapsLockThe Caps Lock key.
Core_KeyboardKey_ClearThe Clear key.
Core_KeyboardKey_CommaThe Comma key.
Core_KeyboardKey_ConvertThe IME Convert key.
Core_KeyboardKey_DThe D key.
Core_KeyboardKey_D0The 0 key.
Core_KeyboardKey_D1The 1 key.
Core_KeyboardKey_D2The 2 key.
Core_KeyboardKey_D3The 3 key.
Core_KeyboardKey_D4The 4 key.
Core_KeyboardKey_D5The 5 key.
Core_KeyboardKey_D6The 6 key.
Core_KeyboardKey_D7The 7 key.
Core_KeyboardKey_D8The 8 key.
Core_KeyboardKey_D9The 9 key.
Core_KeyboardKey_DecimalThe Decimal Separator key (on number pad).
Core_KeyboardKey_DeleteThe Delete key.
Core_KeyboardKey_DownThe Down Arrow key.
Core_KeyboardKey_DownArrowThe Down Arrow key.
Core_KeyboardKey_EThe E key.
Core_KeyboardKey_EndThe End key.
Core_KeyboardKey_EscapeThe Escape key.
Core_KeyboardKey_FThe F key.
Core_KeyboardKey_F1The F1 key.
Core_KeyboardKey_F10The F10 key.
Core_KeyboardKey_F11The F11 key.
Core_KeyboardKey_F12The F12 key.
Core_KeyboardKey_F13The F13 key.
Core_KeyboardKey_F14The F14 key.
Core_KeyboardKey_F15The F15 key.
Core_KeyboardKey_F16The F16 key.
Core_KeyboardKey_F17The F17 key.
Core_KeyboardKey_F18The F18 key.
Core_KeyboardKey_F19The F19 key.
Core_KeyboardKey_F2The F2 key.
Core_KeyboardKey_F20The F20 key.
Core_KeyboardKey_F21The F21 key.
Core_KeyboardKey_F22The F22 key.
Core_KeyboardKey_F23The F23 key.
Core_KeyboardKey_F24The F24 key.
Core_KeyboardKey_F3The F3 key.
Core_KeyboardKey_F4The F4 key.
Core_KeyboardKey_F5The F5 key.
Core_KeyboardKey_F6The F6 key.
Core_KeyboardKey_F7The F7 key.
Core_KeyboardKey_F8The F8 key.
Core_KeyboardKey_F9The F9 key.
Core_KeyboardKey_FinalModeThe IME Final Mode key.
Core_KeyboardKey_GThe G key.
Core_KeyboardKey_HThe H key.
Core_KeyboardKey_HangulModeThe IME Hangul Mode key.
Core_KeyboardKey_HanjaModeThe IME Hanja Mode key.
Core_KeyboardKey_HomeThe Home key.
Core_KeyboardKey_IThe I key.
Core_KeyboardKey_InsertThe Insert key.
Core_KeyboardKey_JThe J key.
Core_KeyboardKey_JunjaModeThe IME Junja mode key.
Core_KeyboardKey_KThe K key.
Core_KeyboardKey_KanaModeThe IME Kana Mode key.
Core_KeyboardKey_KanjiModeThe IME Kanji Mode key.
Core_KeyboardKey_LThe L key.
Core_KeyboardKey_LeftControlThe Left Control key.
Core_KeyboardKey_LeftMenuThe Left Menu key.
Core_KeyboardKey_LeftShiftThe Left Shift key.
Core_KeyboardKey_LeftWindowsThe Left Windows key (on Microsoft Natural Keyboard).
Core_KeyboardKey_MThe M key.
Core_KeyboardKey_MinusThe Minus key.
Core_KeyboardKey_ModeChangeThe IME Mode Change key.
Core_KeyboardKey_MultiplyThe Multiply Change key.
Core_KeyboardKey_NThe N key.
Core_KeyboardKey_NonConvertThe IME Non Convert key.
Core_KeyboardKey_NumberSignThe Number Sign key.
Core_KeyboardKey_NumPad0The 0 key on the numeric keypad.
Core_KeyboardKey_NumPad1The 1 key on the numeric keypad.
Core_KeyboardKey_NumPad2The 2 key on the numeric keypad.
Core_KeyboardKey_NumPad3The 3 key on the numeric keypad.
Core_KeyboardKey_NumPad4The 4 key on the numeric keypad.
Core_KeyboardKey_NumPad5The 5 key on the numeric keypad.
Core_KeyboardKey_NumPad6The 6 key on the numeric keypad.
Core_KeyboardKey_NumPad7The 7 key on the numeric keypad.
Core_KeyboardKey_NumPad8The 8 key on the numeric keypad.
Core_KeyboardKey_NumPad9The 9 key on the numeric keypad.
Core_KeyboardKey_OThe O key.
Core_KeyboardKey_PThe P key.
Core_KeyboardKey_PageDownThe Page Down key.
Core_KeyboardKey_PageUpThe Page Up key.
Core_KeyboardKey_PauseThe Pause key.
Core_KeyboardKey_PeriodThe Period key.
Core_KeyboardKey_PrintThe Print key.
Core_KeyboardKey_PlusThe Plus key.
Core_KeyboardKey_QThe Q key.
Core_KeyboardKey_RThe R key.
Core_KeyboardKey_ReturnThe Return key.
Core_KeyboardKey_RightThe Right Arrow key.
Core_KeyboardKey_RightArrowThe Right Arrow key.
Core_KeyboardKey_RightControlThe Right Control key.
Core_KeyboardKey_RightMenuThe Right Menu key.
Core_KeyboardKey_RightShiftThe Right Shift key.
Core_KeyboardKey_RightShiftThe Right Windows key.
Core_KeyboardKey_SThe S key.
Core_KeyboardKey_ScrollLockThe Scroll Lock key.
Core_KeyboardKey_SleepThe Sleep key.
Core_KeyboardKey_SpaceThe Space key.
Core_KeyboardKey_SubtractThe Subtract key.
Core_KeyboardKey_TThe T key.
Core_KeyboardKey_TabulatorThe Tabulator key.
Core_KeyboardKey_UThe U key.
Core_KeyboardKey_UpThe Up Arrow key.
Core_KeyboardKey_UpArrowThe Up Arrow key.
Core_KeyboardKey_VThe V key.
Core_KeyboardKey_WThe W key.
Core_KeyboardKey_XThe X key.
Core_KeyboardKey_YThe Y key.
Core_KeyboardKey_ZThe Z key.

Core_KeyboardKeyAction

Signature

typedef enum Core_KeyboardKeyAction <implementation> Core_KeyboardKeyAction;

Description

An enumeration of keyboard key actions.

Elements

Core_KeyboardKeyAction_PressedA keyboard key was pressed.
Core_KeyboardKeyAction_ReleasedA keyboard key was released.

Core_KeyboardKeyMessage

Signature

typedef struct Core_KeyboardKeyMessage Core_KeyboardKeyMessage;

Extends

Core_InputMessage

Description

A keyboard key message.

Core_KeyboardKeyMessage_construct

Signature

Core_Result Core_KeyboardKeyMessage_construct(Core_KeyboardKeyMessage* SELF, Core_KeyboardKeyAction action, Core_KeyboardKey key, Core_ModifiersKey modifierKeys);

Description

Construct a Core_KeyboardKeyMessage object.

Parameters

SELFCore_KeyboardKeyMessage*A pointer to this Core_KeyboardKeyMessage object.
actionCore_KeyboardKeyActionThe action of the key.
keyCore_KeyboardKeyThe keyboard key.
modifierKeysCore_ModifierKeysThe modifier keys by the time the key was operated.

Success

This Core_KeyboardKeyMessage object was constructed.

Errors

Core_Error_ArgumentInvalidSELF is a null pointer.
Core_Error_AllocationFailedAn allocation failed.

Return

Core_Success on success. Core_Failure on failure.

Remarks

This function sets the by-thread error variable on failure.

Core_KeyboardKeyMessage_create

Signature

Core_Result Core_KeyboardKeyMessage_create(Core_KeyboardKeyMessage** RETURN, Core_KeyboardKeyAction action, Core_KeyboardKey key, Core_ModifiersKey modifierKeys);

Description

Create a Core_KeyboardKeyMessage object.

Parameters

RETURNCore_KeyboardKeyMessage**A pointer to a Core_KeyboardKeyMessage* variable.
actionCore_KeyboardKeyActionThe action of the key.
keyCore_KeyboardKeyThe keyboard key.
modifierKeysCore_ModifierKeysThe modifier keys by the time the key was operated.

Success

*RETURN was assigned a pointer to the Core_KeyboardKeyMessage object.

Errors

Core_Error_ArgumentInvalidRETURN is a null pointer.
Core_Error_AllocationFailedAn allocation failed.

Return

Core_Success on success. Core_Failure on failure.

Remarks

This function sets the by-thread error variable on failure.

Core_KeyboardKeyMessage_getAction

Signature

Core_Result Core_KeyboardKeyMessage_getAction(Core_KeyboardKeyAction* RETURN, Core_KeyboardKeyMessage* SELF);

Description

Get the keyboard key action.

Parameters

RETURNCore_KeyboardKeyAction*A pointer to a Core_KeyboardKeyAction variable.
SELFCore_KeyboardKeyMessage*A pointer to this Core_KeyboardKeyMessage object.

Success

*RETURN was assigned the keyboard key action.

Errors

Core_Error_ArgumentInvalidRETURN is a null pointer.
Core_Error_ArgumentInvalidSELF is a null pointer.

Return

Core_Success on success. Core_Failure on failure.

Remarks

This function sets the by-thread error variable on failure.

Core_KeyboardKeyMessage_getKey

Signature

Core_Result Core_KeyboardKeyMessage_getKey(Core_KeyboardKey* RETURN, Core_KeyboardKeyMessage* SELF);

Description

Get the keyboard key.

Parameters

RETURNCore_KeyboardKey*A pointer to a Core_KeyboardKey variable.
SELFCore_KeyboardKeyMessage*A pointer to this Core_KeyboardKeyMessage object.

Success

*RETURN was assigned the keyboard key.

Errors

Core_Error_ArgumentInvalidRETURN is a null pointer.
Core_Error_ArgumentInvalidSELF is a null pointer.

Return

Core_Success on success. Core_Failure on failure.

Remarks

This function sets the by-thread error variable on failure.

Core_KeyboardKey_toString

Signature

Core_Result Core_KeyboardKey_toString(Core_String** RETURN, Core_KeyboardKey SELF);

Description

Get a human-readable description of this Core_KeyboardKey value.

Parameters

RETURNCore_String**A pointer to a Core_String* variable.
SELFCore_KeyboardKeyThis Core_KeyboardKey value.

Success

This *RETURN was assigned a pointer to a Core_String object which is a human-readable description of the specified keyboard key.

The caller acquired a reference to that object.

Errors

Core_Error_ArgumentInvalidRETURN is a null pointer.
Core_Error_AllocationFailedAn allocation failed.

Return

Core_Success on success. Core_Failure on failure.

Remarks

This function sets the by-thread error variable on failure.

Core_Likely

Signature

#define Core_Likely() <implementation>

Description

Expression annotation aiding branch prediction by indicating an expression is likely to evaluate to logically true.

In the following example, we use this function annotation to indicate that a call to malloc is likely to succeed.
void* p = malloc(sizeof(char));
if (Core_Likely(NULL != p))
}

Core_makeBitMask

Signature

Core_Result Core_makeBitMask<Suffix>(<Type>* RETURN, Core_Size i, Core_Size n);

where <Suffix> and <Type> can assume the values of

<Suffix> <Type>
N8 Core_Natural8
N16 Core_Natural16
N32 Core_Natural32
N64 Core_Natural64

Description

Create a Bit mask.

Parameters

RETURN<Type>*A pointer to a <Type> variable.
iCore_SizeThe index of the Bit in the range [i, i + n).
nCore_SizeThe number of Bits in the range [i, i + n).

Success

*RETURN was assigned the Bit mask.

Errors

Core_Error_ArgumentInvalidRETURN is a null pointer.
Core_Error_ArgumentInvalidi is greater than the width of the type minus one.
Core_Error_ArgumentInvalidi + n is greater than the width of the type.

Return

Core_Success on success. Core_Failure on failure.

Remarks

This function sets the by-thread error variable on failure.

Core_max

Signature

Core_Result Core_max<Suffix>(<Type>* RETURN, <Type> x, <Type> y);

where <Suffix> and <Type> can assume the values of

<Suffix> <Type>
R32 Core_Real32
R64 Core_Real64
Sz Core_Size
N8 Core_Natural8
N16 Core_Natural16
N32 Core_Natural32
N64 Core_Natural64
I8 Core_Integer8
I16 Core_Integer16
I32 Core_Integer32
I64 Core_Integer64

Description

Computes the maximum of two values x and y.

Parameters

RETURN<Type>*A pointer to a <Type> variable.
x<Type>The first value.
y<Type>The second value.

Success

*RETURN was assigned the maximum of the two values x and y.

+∞ is returned if a value is +∞.

NaN is returned if a value is NaN.

Errors

Core_Error_ArgumentInvalidRETURN is a null pointer

Return

Core_Success on success. Core_Failure on failure.

Remarks

This function sets the by-thread error variable on failure.

Core_Memory_allocate

Signature

Core_Result Core_Memory_allocate(void **RETURN, Core_Size n);

Description

Allocate a memory block.

Parameters

RETURNvoid**A pointer to a void* variable.
nCore_SizeThe size, in Bytes, of the memory block to allocate. Can be 0.

Success

*RETURN was assigned a pointer to a new memory block of size n.

Errors

Core_Error_ArgumentInvalidRETURN is a null pointer
Core_Error_AllocationFailedthe allocation failed

Return

Core_Success on success. Core_Failure on failure.

Remarks

This function sets the by-thread error variable on failure.

Core_Memory_compare

Signature

Core_Result Core_Memory_compare(Core_Natural8* RETURN, void const* p, void const* q, Core_Size n);

Description

Compare the Bytes of memory blocks.

Parameters

pvoid*A pointer to a memory block.
pvoid*A pointer to a memory block.
nCore_SizeThe number of Bytes to compare.

Success

This function compares the Byte values of the memory blocks pointed to by p and q from the Byte.

If all Byte values are equal, *RETURN was assigned 0.

If there are Byte values that are not equal, then the first mismatching Byte values are compared:

*RETURN is assigned -1 if the Byte value in p is smaller than the Byte value in q.

*RETURN is assigned +1 if the Byte value in p is greater than the Byte value in q.

Errors

Core_Error_ArgumentInvalidRETURN is a null pointer.
Core_Error_ArgumentInvalidp is a null pointer.
Core_Error_ArgumentInvalidq is a null pointer.

Core_Memory_copy

Signature

Core_Result Core_Memory_copy(void *p, void const* q, Core_Size n);

Description

Assign each Byte of a memory block the specified value. The memory blocks must not overlap.

Parameters

pvoid*A pointer to the target memory block.
qvoid const*A pointer to the source memory block.
nCore_SizeThe number of Bytes to copy.

Errors

Core_Error_ArgumentInvalidp is a null pointer
Core_Error_ArgumentInvalidq is a null pointer

Return

Core_Success on success. Core_Failure on failure.

Remarks

This function sets the by-thread error variable on failure.

Core_Memory_deallocate

Signature

Core_Result Core_Memory_deallocate(void* p);

Description

Deallocate a memory block.

Parameters

pvoid*A pointer to a memory block previously allocated by a call to Core_Memory_allocate.

Success

The memory block pointed to by p was deallocated.

Errors

Core_Error_ArgumentInvalidp is a null pointer.

Core_Memory_fill

Signature

Core_Result Core_Memory_fill(void *p, Core_Size n, Core_Natural8 v);

Description

Assign each Byte of a memory block the specified value.

Parameters

pvoid*A pointer to a memory block of size n
nCore_SizeThe size of the memory block pointed to by p
vCore_Natural8The value to assign to each Byte of the memory block

Errors

Core_Error_ArgumentInvalidp is a null pointer

Return

Core_Success on success. Core_Failure on failure.

Remarks

This function sets the by-thread error variable on failure.

Core_Memory_move

Signature

Core_Result Core_Memory_move(void *p, void const* q, Core_Size n);

Description

Assign the values of a source memory block to a target memory block. The memory blocks may overlap.

Parameters

pvoid*A pointer to the target memory block.
qvoid const*A pointer to the source memory block.
nCore_SizeThe number of Bytes to copy.

Errors

Core_Error_ArgumentInvalidp is a null pointer
Core_Error_ArgumentInvalidq is a null pointer

Return

Core_Success on success. Core_Failure on failure.

Remarks

This function sets the by-thread error variable on failure.

Core_Memory_reallocate

Signature

Core_Result Core_Memory_reallocate(void **RETURN, void* p, Core_Size n);

Description

Reallocate a memory block.

Parameters

RETURNvoid**A pointer to a void* variable.
pvoid*A pointer to a memory block previously allocated by a call to Core_Memory_allocate*.
nCore_SizeThe size, in Bytes, to reallocate the memory block pointed to by p to. Can be 0.

Success

*RETURN was assigned a pointer to a new memory block of size n.

The old memory block was deallocated.

A new memory block of size n was allocated by a call to Core_Memory_allocate.

The first min(x,y) Bytes of the new memory block and the old memory block are equal where

x is the size of the new memory block and y is the size of the old memory block.

Errors

Core_Error_ArgumentInvalidRETURN is a null pointer.
Core_Error_ArgumentInvalidp is a null pointer.
Core_Error_AllocationFailedAn allocation failed.

Return

Core_Success on success. Core_Failure on failure.

Remarks

This function sets the by-thread error variable on failure.

Core_Memory_zero

Signature

Core_Result Core_Memory_zero(void *p, Core_Size n);

Description

Assign each Byte of a memory block the value zero.

Parameters

pvoid*A pointer to a memory block of size n.
nCore_SizeThe size of the memory block pointed to by p.

Errors

Core_Error_ArgumentInvalidp is a null pointer.

Return

Core_Success on success. Core_Failure on failure.

Remarks

The callCore_Memory_zero(p,n)is possibly faster but other than that equivalent to the callCore_Memory_fill(p, n, 0)This function sets the by-thread error variable on failure.

Core_Message

Signature

typedef struct Core_Message Core_Message;

Extends

Core_Object

Description

A message.

Core_min

Signature

Core_Result Core_min<Suffix>(<Type>* RETURN, <Type> x, <Type> y);

where <Suffix> and <Type> can assume the values of

<Suffix> <Type>
R32 Core_Real32
R64 Core_Real64
Sz Core_Size
N8 Core_Natural8
N16 Core_Natural16
N32 Core_Natural32
N64 Core_Natural64
I8 Core_Integer8
I16 Core_Integer16
I32 Core_Integer32
I64 Core_Integer64

Description

Computes the minimum of two values x and y.

Parameters

RETURN<Type>*A pointer to a <Type> variable.
x<Type>The first value.
y<Type>The second value.

Success

*RETURN was assigned the minimum of the two values x and y.

-∞ is returned if a value is -∞.

NaN is returned if a value is NaN.

Errors

Core_Error_ArgumentInvalidRETURN is a null pointer

Return

Core_Success on success. Core_Failure on failure.

Remarks

This function sets the by-thread error variable on failure.

Core_ModifierKeys

Signature

typedef enum Core_ModifierKeys <implementation> Core_ModifierKeys;

Description

An enumeration flags of modifier keys.

Elements

Core_ModifierKeys_LeftControlThe "Left control" modifier key.
Core_ModifierKeys_LeftMenuThe "Left menu" modifier key.
Core_ModifierKeys_LeftShiftThe "Left shift" modifier key.
Core_ModifierKeys_RightControlThe "Right control" modifier key.
Core_ModifierKeys_RightMenuThe "Right menu" modifier key.
Core_ModifierKeys_RightShiftThe "Right shift" modifier key.

Core_MouseButton

Signature

typedef enum Core_MouseButton <implementation> Core_MouseButton;

Description

An enumeration of mouse buttons.

Elements

Core_MouseButton_Button0The zeroeth mouse button.
Core_MouseButton_Button1The first mouse button.
Core_MouseButton_Button2The second mouse button.
Core_MouseButton_Button3The third mouse button.
Core_MouseButton_Button4The fourth mouse button.
Core_MouseButton_Button5The fifth mouse button.
Core_MouseButton_Button6The sixth mouse button.
Core_MouseButton_Button7The seventh mouse button.

Core_MouseButtonAction

Signature

typedef enum Core_MouseButtonAction <implementation> Core_MouseButtonAction;

Description

An enumeration of mouse button actions.

Elements

Core_MouseButtonAction_PressedA mouse button was pressed.
Core_MouseButtonAction_ReleasedA mouse button was released.

Core_MouseButtonMessage

Signature

typedef struct Core_MouseButtonMessage Core_MouseButtonMessage;

Extends

Core_InputMessage

Description

An mouse button message.

Core_MouseButtonMessage_construct

Signature

Core_Result Core_MouseButtonMessage_construct(Core_MouseButtonMessage* SELF, Core_MouseButtonAction action, Core_MouseButton button, Core_ModifiersKey modifierKeys, Core_Real32 x, Core_Real32 y);

Description

Construct a Core_MouseButtonMessage object.

Parameters

SELFCore_MouseButtonMessage*A pointer to this Core_MouseButtonMessage object.
actionCore_MouseButtonActionThe action of the button.
buttonCore_MouseButtonThe mouse button.
modifierKeysCore_ModifierKeysThe modifier keys by the time the button was operated.
xCore_Real32The position of the mouse pointer, in canvas coordinates, by the time the button was operated.
yCore_Real32The position of the mouse pointer, in canvas coordinates, by the time the button was operated.

Success

This Core_MouseButtonMessage object was constructed.

Errors

Core_Error_ArgumentInvalidSELF is a null pointer.
Core_Error_AllocationFailedAn allocation failed.

Return

Core_Success on success. Core_Failure on failure.

Remarks

This function sets the by-thread error variable on failure.
In the canvas coordinate system, the origin (0,0) is at the left/top of the canvas,the positive x-axis is pointing right, and the positive y-axis is pointing down.

Core_MouseButtonMessage_create

Signature

Core_Result Core_MouseButtonMessage_create(Core_MouseButtonMessage** RETURN, Core_MouseButtonAction action, Core_MouseButton button, Core_ModifiersKey modifierKeys, Core_Real32 x, Core_Real32 y);

Description

Create a Core_MouseButtonMessage object.

Parameters

RETURNCore_MouseButtonMessage**A pointer to a Core_MouseButtonMessage* variable.
actionCore_MouseButtonActionThe action of the button.
buttonCore_MouseButtonThe mouse button.
modifierKeysCore_ModifierKeysThe modifier keys by the time the button was operated.
xCore_Real32The position of the mouse pointer, in canvas coordinates, by the time the button was operated.
yCore_Real32The position of the mouse pointer, in canvas coordinates, by the time the button was operated.

Success

*RETURN was assigned a pointer to the Core_MouseButtonMessage.

Errors

Core_Error_ArgumentInvalidRETURN is a null pointer.
Core_Error_AllocationFailedAn allocation failed.

Return

Core_Success on success. Core_Failure on failure.

Remarks

This function sets the by-thread error variable on failure.
In the canvas coordinate system, the origin (0,0) is at the left/top of the canvas,the positive x-axis is pointing right, and the positive y-axis is pointing down.

Core_MouseButtonMessage_getAction

Signature

Core_Result Core_MouseButtonMessage_getAction(Core_MouseButtonAction* RETURN, Core_MouseButtonMessage* SELF);

Description

Get the mouse button action.

Parameters

RETURNCore_MouseButtonAction*A pointer to a Core_MouseButtonAction variable.
SELFCore_MouseButtonMessage*A pointer to this Core_MouseButtonMessage object.

Success

*RETURN was assigned the mouse button action.

Errors

Core_Error_ArgumentInvalidRETURN is a null pointer.
Core_Error_ArgumentInvalidSELF is a null pointer.

Return

Core_Success on success. Core_Failure on failure.

Remarks

This function sets the by-thread error variable on failure.

Core_MouseButtonMessage_getButton

Signature

Core_Result Core_MouseButtonMessage_getButton(Core_MouseButton* RETURN, Core_MouseButtonMessage* SELF);

Description

Get the mouse button.

Parameters

RETURNCore_MouseButton*A pointer to a Core_MouseButton variable.
SELFCore_MouseButtonMessage*A pointer to this Core_MouseButtonMessage object.

Success

*RETURN was assigned the mouse button.

Errors

Core_Error_ArgumentInvalidRETURN is a null pointer.
Core_Error_ArgumentInvalidSELF is a null pointer.

Return

Core_Success on success. Core_Failure on failure.

Remarks

This function sets the by-thread error variable on failure.

Core_MouseButtonMessage_getX

Signature

Core_Result Core_MouseButtonMessage_getX(Core_Real32* RETURN, Core_MouseButtonMessage* SELF);

Description

Get the position of the mouse pointer along the x-axis in canvas coordinates.

Parameters

RETURNCore_Real32*A pointer to a Core_Real32 variable.
SELFCore_MouseButtonMessage*A pointer to this Core_MouseButtonMessage object.

Success

*RETURN was assigned the position of the mouse pointer along the x-axis in canvas coordinates.

Errors

Core_Error_ArgumentInvalidRETURN is a null pointer.
Core_Error_ArgumentInvalidSELF is a null pointer.

Return

Core_Success on success. Core_Failure on failure.

Remarks

This function sets the by-thread error variable on failure.

Core_MouseButtonMessage_getY

Signature

Core_Result Core_MouseButtonMessage_getY(Core_Real32* RETURN, Core_MouseButtonMessage* SELF);

Description

Get the position of the mouse pointer along the y-axis in canvas coordinates.

Parameters

RETURNCore_Real32*A pointer to a Core_Real32 variable.
SELFCore_MouseButtonMessage*A pointer to this Core_MouseButtonMessage object.

Success

*RETURN was assigned the position of the mouse pointer along the y-axis in canvas coordinates.

Errors

Core_Error_ArgumentInvalidRETURN is a null pointer.
Core_Error_ArgumentInvalidSELF is a null pointer.

Return

Core_Success on success. Core_Failure on failure.

Remarks

This function sets the by-thread error variable on failure.

Core_MouseButton_toString

Signature

Core_Result Core_MouseButton_toString(Core_String** RETURN, Core_MouseButton SELF);

Description

Get a human-readable description of this Core_MouseButton value.

Parameters

RETURNCore_String**A pointer to a Core_String* variable.
SELFCore_MouseButtonThis Core_MouseButton value.

Success

This *RETURN was assigned a pointer to a Core_String object which is a human-readable description of the specified mouse button.

The caller acquired a reference to that object.

Errors

Core_Error_ArgumentInvalidRETURN is a null pointer.
Core_Error_AllocationFailedAn allocation failed.

Return

Core_Success on success. Core_Failure on failure.

Remarks

This function sets the by-thread error variable on failure.

Core_MousePointerAction

Signature

typedef enum Core_MousePointerAction <implementation> Core_MousePointerAction;

Description

An enumeration of mouse pointer actions.

Elements

Core_MousePointerAction_EnteredA mouse pointer entered a canvas.
Core_MousePointerAction_ExitedA mouse pointer exited a canvas.
Core_MousePointerAction_MovedA mouse pointer moved.

Core_MousePointerMessage

Signature

typedef struct Core_MousePointerMessage Core_MousePointerMessage;

Extends

Core_InputMessage

Description

A mouse pointer message.

Core_MousePointerMessage_construct

Signature

Core_Result Core_MousePointerMessage_construct(Core_MousePointerMessage* SELF, Core_MousePointerAction action, Core_Real32 x, Core_Real32 y, Core_ModifiersKey modifierKeys);

Description

Construct a Core_MousePointerMessage object.

Parameters

SELFCore_MousePointerMessage*A pointer to this Core_MousePointerMessage object.
actionCore_MouseButtonActionThe action of the button.
xCore_Real32The position of the mouse pointer, in canvas coordinates.
yCore_Real32The position of the mouse pointer, in canvas coordinates.
modifierKeysCore_ModifierKeysThe modifier keys by the time the button was operated.

Success

This Core_MousePointerMessage object was constructed.

Errors

Core_Error_ArgumentInvalidSELF is a null pointer.
Core_Error_AllocationFailedAn allocation failed.

Return

Core_Success on success. Core_Failure on failure.

Remarks

This function sets the by-thread error variable on failure.
In the canvas coordinate system, the origin (0,0) is at the left/top of the canvas,the positive x-axis is pointing right, and the positive y-axis is pointing down.

Core_MousePointerMessage_create

Signature

Core_Result Core_MousePointerMessage_create(Core_MousePointerMessage** RETURN, Core_MousePointerAction action, Core_Real32 x, Core_Real32 y, Core_ModifiersKey modifierKeys);

Description

Create a Core_MousePointerMessage object.

Parameters

RETURNCore_MousePointerMessage**A pointer to a Core_MousePointerMessage* variable.
actionCore_MouseButtonActionThe action of the button.
xCore_Real32The position of the mouse pointer, in canvas coordinates.
yCore_Real32The position of the mouse pointer, in canvas coordinates.
modifierKeysCore_ModifierKeysThe modifier keys by the time the button was operated.

Success

*RETURN was assigned a pointer to the Core_MousPointerMessage.

Errors

Core_Error_ArgumentInvalidRETURN is a null pointer.
Core_Error_AllocationFailedAn allocation failed.

Return

Core_Success on success. Core_Failure on failure.

Remarks

This function sets the by-thread error variable on failure.
In the canvas coordinate system, the origin (0,0) is at the left/top of the canvas,the positive x-axis is pointing right, and the positive y-axis is pointing down.

Core_MousePointerMessage_getAction

Signature

Core_Result Core_MousePointerMessage_getAction(Core_MousePointerAction* RETURN, Core_MousePointerMessage* SELF);

Description

Get the mouse pointer action.

Parameters

RETURNCore_MousePointerAction*A pointer to a Core_MousePointerAction variable.
SELFCore_MousePointerMessage*A pointer to this Core_MousePointerMessage object.

Success

*RETURN was assigned the mouse pointer action.

Errors

Core_Error_ArgumentInvalidRETURN is a null pointer.
Core_Error_ArgumentInvalidSELF is a null pointer.

Return

Core_Success on success. Core_Failure on failure.

Remarks

This function sets the by-thread error variable on failure.

Core_MousePointerMessage_getX

Signature

Core_Result Core_MousePointerMessage_getX(Core_Real32* RETURN, Core_MousePointerMessage* SELF);

Description

Get the position of the mouse pointer along the x-axis in canvas coordinates.

Parameters

RETURNCore_Real32*A pointer to a Core_Real32 variable.
SELFCore_MousePointerMessage*A pointer to this Core_MousePointerMessage object.

Success

*RETURN was assigned the position of the mouse pointer along the x-axis in canvas coordinates.

Errors

Core_Error_ArgumentInvalidRETURN is a null pointer.
Core_Error_ArgumentInvalidSELF is a null pointer.

Return

Core_Success on success. Core_Failure on failure.

Remarks

This function sets the by-thread error variable on failure.

Core_MousePointerMessage_getY

Signature

Core_Result Core_MousePointerMessage_getY(Core_Real32* RETURN, Core_MousePointerMessage* SELF);

Description

Get the position of the mouse pointer along the y-axis in canvas coordinates.

Parameters

RETURNCore_Real32*A pointer to a Core_Real32 variable.
SELFCore_MousePointerMessage*A pointer to this Core_MousePointerMessage object.

Success

*RETURN was assigned the position of the mouse pointer along the y-axis in canvas coordinates.

Errors

Core_Error_ArgumentInvalidRETURN is a null pointer.
Core_Error_ArgumentInvalidSELF is a null pointer.

Return

Core_Success on success. Core_Failure on failure.

Remarks

This function sets the by-thread error variable on failure.

Core_Natural16

Signature

typedef <implementation> Core_Natural16;

Description

An unsigned integer of a width of 16 Bits. This usually is an alias of uint16_t.

Core_Natural16_Greatest

Signature

#define Core_Natural16_Greatest <implementation>

Description

The greatest value of type Core_Natural16.

Core_Natural16_Least

Signature

#define Core_Natural16_Least <implementation>

Description

The least value of type Core_Natural16. This usually is an alias of 0u16.

Core_Natural32

Signature

typedef <implementation> Core_Natural32;

Description

An unsigned integer of a width of 32 Bits. This usually is an alias of uint32_t.

Core_Natural32_Greatest

Signature

#define Core_Natural32_Greatest <implementation>

Description

The greatest value of type Core_Natural32.

Core_Natural32_Least

Signature

#define Core_Natural32_Least <implementation>

Description

The least value of type Core_Natural32. This usually is an alias of 0u32.

Core_Natural64

Signature

typedef <implementation> Core_Natural64;

Description

An unsigned integer of a width of 64 Bits. This usually is an alias of uint64_t.

Core_Natural64_Greatest

Signature

#define Core_Natural64_Greatest <implementation>

Description

The greatest value of type Core_Natural64.

Core_Natural64_Least

Signature

#define Core_Natural64_Least <implementation>

Description

The least value of type Core_Natural64. This usually is an alias of 0u64.

Core_Natural8

Signature

typedef <implementation> Core_Natural8;

Description

An unsigned integer of a width of 8 Bits. This usually is an alias of uint8_t.

Core_Natural8_Greatest

Signature

#define Core_Natural8_Greatest <implementation>

Description

The greatest value of type Core_Natural8.

Core_Natural8_Least

Signature

#define Core_Natural8_Least <implementation>

Description

The least value of type Core_Natural8. This is usually an alias of 0u8.

Core_NonExistingFilePolicy

Signature

typedef enum Core_NonExistingFilePolicy <implementation> Core_NonExistingFilePolicy;

Description

An enumeration of policies for opening a file in case of that the file does not exist.
The enumeration elements cannot be combined.

Elements

Core_NonExistingFilePolicy_FailFail if the file does not exist.
Core_NonExistingFilePolicy_CreateCreate the file if it does not exist.

Core_NoReturn

Signature

#define Core_NoReturn() <implementation>

Description

Function annotation indicating that a function never returns.

Core_Object

Signature

typedef struct Core_Object Core_Object;

Description

The base of all Objects.

Core_Object_construct

Signature

Core_Result Core_Object_construct(Core_Object* SELF);

Description

Construct a Core_Object object.

Parameters

SELFCore_Object*A pointer to this Core_Object object.

Success

This Core_Object object was constructed.

Errors

Core_Error_ArgumentInvalidSELF is a null pointer.
Core_Error_AllocationFailedAn allocation failed.

Return

Core_Success on success. Core_Failure on failure.

Remarks

This function sets the by-thread error variable on failure.

Core_OperatingSystem

Signature

#define Core_OperatingSystem <implementation>

Description

Symbolic constant denoting the operating system this library was compiled for.
It is always defined as one of the Core_OperatingSystem_* constants.

Core_OperatingSystem_Cygwin

Signature

#define Core_OperatingSystem_Cygwin <implementation>

Description

Symbolic constant defined to a numeric value that is different from the values of the other Core_OperatingSystem_* symbolic constants.
The symbolic constant denotes a CYGWIN operating system.

Core_OperatingSystem_Ios

Signature

#define Core_OperatingSystem_Ios <implementation>

Description

Symbolic constant defined to a numeric value that is different from the values of the other Core_OperatingSystem_* symbolic constants.
The symbolic constant denotes an IOS operating system.

Core_OperatingSystem_IosEmulator

Signature

#define Core_OperatingSystem_IosEmulator <implementation>

Description

Symbolic constant defined to a numeric value that is different from the values of the other Core_OperatingSystem_* symbolic constants.
The symbolic constant denotes an IOS EMULATOR operating system.

Core_OperatingSystem_Linux

Signature

#define Core_OperatingSystem_Linux <implementation>

Description

Symbolic constant defined to a numeric value that is different from the values of the other Core_OperatingSystem_* symbolic constants.
The symbolic constant denotes a LINUX operating system.

Core_OperatingSystem_Macos

Signature

#define Core_OperatingSystem_Macos <implementation>

Description

Symbolic constant defined to a numeric value that is different from the values of the other Core_OperatingSystem_* symbolic constants.
The symbolic constant denotes a MACOS operating system.

Core_OperatingSystem_Mingw

Signature

#define Core_OperatingSystem_Mingw <implementation>

Description

Symbolic constant defined to a numeric value that is different from the values of the other Core_OperatingSystem_* symbolic constants).
The symbolic constant denotes a MINGW operating system.

Core_OperatingSystem_Msys

Signature

#define Core_OperatingSystem_Msys <implementation>

Description

Symbolic constant defined to a numeric value that is different from the values of the other Core_OperatingSystem_* symbolic constants.
The symbolic constant denotes an MSYS operating system.

Core_OperatingSystem_Unix

Signature

#define Core_OperatingSystem_Unix <implementation>

Description

Symbolic constant defined to a numeric value that is different from the values of the other Core_OperatingSystem_* symbolic constants).
The symbolic constant denotes an UNIX operating system.

Core_OperatingSystem_Windows

Signature

#define Core_OperatingSystem_Windows <implementation>

Description

Symbolic constant defined to a numeric value that is different from the values of the other Core_OperatingSystem_* symbolic constants.
The symbolic constant denotes a WINDOWS operating system.

Core_Real32

Signature

typedef <implementation> Core_Real32;

Description

An IEEE 754 32 bit floating point value. This usually is an alias of float.

Core_Real32_Greatest

Signature

#define Core_Real32_Greatest <implementation>

Description

The greatest value of type Core_Real32. This usually is an alias of +FLT_MAX.

Core_Real32_GreatestBaseTenExponent

Signature

#define Core_Real32_GreatestBaseTenExponent <implementation>

Description

The greatest integer such that ten raised to the power of that value minus one is a normalized Core_Real32 value. This usually is an alias of FLT_MAX_10_EXP.

Core_Real32_GreatestBaseTwoExponent

Signature

#define Core_Real32_GreatestBaseTwoExponent <implementation>

Description

The greatest integer such that two raised to the power of that value minus one is a normalized Core_Real32 value. This usually is an alias of FLT_MAX_EXP.

Core_Real32_Least

Signature

#define Core_Real32_Least <implementation>

Description

The least value of type Core_Real32. This usually is an alias of -FLT_MAX.

Core_Real32_LeastBaseTenExponent

Signature

#define Core_Real32_LeastBaseTenExponent <implementation>

Description

The least integer such that ten raised to the power of that value minus one is a normalized Core_Real32 value. This usually is an alias of FLT_MIN_10_EXP.

Core_Real32_LeastBaseTwoExponent

Signature

#define Core_Real32_LeastBaseTwoExponent <implementation>

Description

The least integer such that two raised to the power of that value minus one is a normalized Core_Real32 value. This usually is an alias of FLT_MIN_EXP.

Core_Real32_NegativeInfinity

Signature

#define Core_Real32_NegativeInfinity <implementation>

Description

The negative infinity value of type Core_Real32. This usually is an alias of -INFINITY.

Core_Real32_NoNumber

Signature

#define Core_Real32_NoNumber <implementation>

Description

The no number value of type Core_Real32. This usually is an alias of NAN.

Core_Real32_PositiveInfinity

Signature

#define Core_Real32_PositiveInfinity <implementation>

Description

The positive infinity value of type Core_Real32. This usually is an alias of +INFINITY.

Core_Real64

Signature

typedef <implementation> Core_Real64;

Description

An IEEE 754 64 bit floating point value. This usually is an alias of double.

Core_Real64_Greatest

Signature

#define Core_Real64_Greatest <implementation>

Description

The greatest value of type Core_Real64. This usually is an alias of +DBL_MAX.

Core_Real64_GreatestBaseTenExponent

Signature

#define Core_Real64_GreatestBaseTenExponent <implementation>

Description

The greatest integer such that ten raised to the power of that value minus one is a normalized Core_Real64 value. This usually is an alias of DBL_MAX_10_EXP.

Core_Real64_GreatestBaseTwoExponent

Signature

#define Core_Real64_GreatestBaseTwoExponent <implementation>

Description

The greatest integer such that two raised to the power of that value minus one is a normalized Core_Real64 value. This usually is an alias of DBL_MAX_EXP.

Core_Real64_Least

Signature

#define Core_Real64_Least <implementation>

Description

The least value of type Core_Real64. This usually is an alias of -DBL_MAX.

Core_Real64_LeastBaseTenExponent

Signature

#define Core_Real64_LeastBaseTenExponent <implementation>

Description

The least integer such that ten raised to the power of that value minus one is a normalized Core_Real64 value. This usually is an alias of DBL_MIN_10_EXP.

Core_Real64_LeastBaseTwoExponent

Signature

#define Core_Real64_LeastBaseTwoExponent <implementation>

Description

The least integer such that two raised to the power of that value minus one is a normalized Core_Real64 value. This usually is an alias of DBL_MIN_EXP.

Core_Real64_NegativeInfinity

Signature

#define Core_Real64_NegativeInfinity <implementation>

Description

The negative infinity value of type Core_Real64. This usually is an alias of -INFINITY.

Core_Real64_NoNumber

Signature

#define Core_Real64_NoNumber <implementation>

Description

The no number value of type Core_Real64. This usually is an alias of NAN.

Core_Real64_PositiveInfinity

Signature

#define Core_Real64_PositiveInfinity <implementation>

Description

The positive infinity value of type Core_Real64. This usually is an alias of +INFINITY.

Core_reference

Signature

void Core_reference(Core_Object* SELF);

Description

Increment the reference count of an object.

Parameters

objectCore_Object*A pointer to a Core_Object object.

Success

This reference count of the object was incremented by 1.

Core_Result

Signature

typedef <implementation> Core_Result;

Description

An integer type. The only two values of this type are Core_Success and Core_Failure.

Core_safeAdd

Signature

Core_Result Core_safeAdd<Suffix>(<Type>* RETURN, <Type> x, <Type> y, <Type>* overflow);

where <Suffix> and <Type> can assume the values of

<Suffix> <Type>
N8 Core_Natural8
N16 Core_Natural16
N32 Core_Natural32
N64 Core_Natural64

Description

Computes the sum of two <Type> values. The computation is conceptually performed using arbitrary precision arithmetic.

Parameters

RETURN<Type>*A pointer to a <Type> variable
x<Type>The augend/first summand.
y<Type>The addend/second summand.
overflow<Type>*A pointer to a <Type> variable.

Success

The values x and y are extended to twice their previous number of Bits and added.

The lower half of the Bits of the result are assigned to *RETURN. The upper half of the Bits of the result are assigned to *overflow.

Errors

Core_Error_ArgumentInvalidRETURN is a null pointer
Core_Error_ArgumentInvalidoverflow is a null pointer

Return

Core_Success on success. Core_Failure on failure.

Remarks

This function sets the by-thread error variable on failure.

Core_safeMul

Signature

Core_Result Core_safeMul<Suffix>(<Type>* RETURN, <Type> x, <Type> y, <Type>* overflow);

where <Suffix> and <Type> can assume the values of

<Suffix> <Type>
I8 Core_Integer8
I16 Core_Integer16
I32 Core_Integer32
I64 Core_Integer64
N8 Core_Natural8
N16 Core_Natural16
N32 Core_Natural32
N64 Core_Natural64

Description

Computes the product of two <Type> values. The computation is conceptually performed using arbitrary precision arithmetic.

Parameters

RETURN<Type>*A pointer to a <Type> variable
x<Type>The multiplier/first factor.
y<Type>The multiplicand/second factor.
overflow<Type>*A pointer to a <Type> variable.

Success

If <Type> is Core_Natural(8|16|32|64):

The values x and y are extended to twice their previous number of bits and multiplied.

The lower half of the Bits of the result are assigned to *RETURN. The upper half of the Bits of the result are assigned to *overflow.


If <Type> is Core_Integer(8|16|32|64):

The values x and y are sign extended to twice their previous number of Bits and multiplied.

The lower half of the Bits of the result are assigned to *RETURN. The upper half of the Bits of the result are assigned to *overflow.

Errors

Core_Error_ArgumentInvalidRETURN is a null pointer
Core_Error_ArgumentInvalidoverflow is a null pointer

Return

Core_Success on success. Core_Failure on failure.

Remarks

This function sets the by-thread error variable on failure.

Core_Scanner

Signature

typedef struct Core_Scanner Core_Scanner;

Extends

Core_Object

Description

The base of a lexical analysis (aka scanner, aka lexer, aka lexical analyzer, ...).
A lexical analysis ensures a Byte sequence is an UTF-8 Byte sequence and splits the symbols into words (aka tokens, ...).
A lexical analysis provides

  • the Bytes of the word,
  • the start offset and the end offset, in Bytes, of the word.

Core_Scanner_construct

Signature

Core_Result Core_Scanner_construct(Core_Scanner* SELF);

Description

Construct a Core_Scanner object.

Parameters

SELFCore_Scanner*A pointer to this Core_Scanner object.

Success

This Core_Scanner object was constructed.

The scanner was assigned the empty input and is in its initial state wrt that input.

Errors

Core_Error_ArgumentInvalidSELF is a null pointer.
Core_Error_AllocationFailedAn allocation failed.

Return

Core_Success on success. Core_Failure on failure.

Remarks

This function sets the by-thread error variable on failure.

Core_Scanner_getWordEndOffset

Signature

Core_Result Core_Scanner_getWordEndOffset(Core_Size* RETURN, Core_Scanner* SELF);

Description

Get the offset, in Bytes, at which the current word ends.

Parameters

RETURNCore_Size*A pointer to a Core_Size variable.
SELFCore_Scanner*A pointer to this Core_Scanner* object.

Success

*RETURN was assigned the offset, in Bytes, at which the current word ends.

Errors

Core_Error_ArgumentInvalidSELF is a null pointer.

Return

Core_Success on success. Core_Failure on failure.

Remarks

This function sets the by-thread error variable on failure.

Core_Scanner_getWordStartOffset

Signature

Core_Result Core_Scanner_getWordStartOffset(Core_Size* RETURN, Core_Scanner* SELF);

Description

Get the offset, in Bytes, at which the current word starts.

Parameters

RETURNCore_Size*A pointer to a Core_Size variable.
SELFCore_Scanner*A pointer to this Core_Scanner* object.

Success

*RETURN was assigned the offset, in Bytes, at which the current word starts.

Errors

Core_Error_ArgumentInvalidSELF is a null pointer.

Return

Core_Success on success. Core_Failure on failure.

Remarks

This function sets the by-thread error variable on failure.

Core_Scanner_getWordTextBytes

Signature

Core_Result Core_Scanner_getWordTextBytes(void** RETURN, Core_Scanner* SELF);

Description

Get a pointer to the Bytes of the current word.
The pointer remains valid as long as the Core_Scanner or derived type object is valid and the word does not change.

Parameters

RETURNvoid**A pointer to a void* variable.
SELFCore_Scanner*A pointer to this Core_Scanner* object.

Success

*RETURN was assigned a pointer to the Bytes of the current word.

Errors

Core_Error_ArgumentInvalidSELF is a null pointer.

Return

Core_Success on success. Core_Failure on failure.

Remarks

This function sets the by-thread error variable on failure.

Core_Scanner_getWordTextNumberOfBytes

Signature

Core_Result Core_Scanner_getWordTextNumberOfBytes(Core_Size* RETURN, Core_Scanner* SELF);

Description

Get the number of Bytes of the word text of the current word.

Parameters

RETURNCore_Size*A pointer to a Core_Size variable.
SELFCore_Scanner*A pointer to this Core_Scanner* object.

Success

*RETURN was assigned the number of Bytes of the word text of the current word.

Errors

Core_Error_ArgumentInvalidSELF is a null pointer.

Return

Core_Success on success. Core_Failure on failure.

Remarks

This function sets the by-thread error variable on failure.

Core_Scanner_setInput

Signature

Core_Result Core_Scanner_setInput(Core_Scanner* SELF, void* bytes, Core_Size numberOfBytes);

Description

Set the input of the scanner.

Parameters

SELFCore_Scanner*A pointer to this Core_Scanner* object.
bytesvoid*A pointer to an array of Bytes.
numberOfBytesCore_SizeThe number of Bytes in the array pointed to by bytes.

Success

The scanner was assigned the empty input and is in its initial state wrt that input.

Errors

Core_Error_ArgumentInvalidSELF is a null pointer.
Core_Error_ArgumentInvalidvoid* is a null pointer.
Core_Error_AllocationFailedAn allocation failed.

Return

Core_Success on success. Core_Failure on failure.

Remarks

This function sets the by-thread error variable on failure.

Core_Scanner_step

Signature

Core_Result Core_Scanner_step(Core_Scanner* SELF);

Description

Advance to the next word.
The scanner retains its current state

  • the current word is the end of input word
  • the current word is an error word

Parameters

SELFCore_Scanner*A pointer to this Core_Scanner* object.

Errors

Core_Error_ArgumentInvalidSELF is a null pointer.
Core_Error_AllocationFailedAn allocation failed.
Core_Error_LexicalAnalysisFailedThe lexical analysis of a word failed.

Return

Core_Success on success. Core_Failure on failure.

Remarks

This function sets the by-thread error variable on failure.

Core_setError

Signature

void Core_setError(Core_Error error);

Description

Set the value of the by-thread error variable.

Parameters

errorCore_ErrorThe Core_Error value to be assigned to the by-thread error variable.

Success

This function cannot fail.

Core_sin

Signature

Core_Result Core_sin<Suffix>(<Type>* RETURN, <Type> x);

where <Suffix> and <Type> can assume the values of

<Suffix> <Type>
R32 Core_Real32
R64 Core_Real64

Description

Computes the sine value of the value x.

Parameters

RETURN<Type>*A pointer to a <Type> variable

Success

*RETURN was assigned the sine value of the value x.

Errors

Core_Error_ArgumentInvalidRETURN is a null pointer
Core_Error_ArgumentInvalidx is ±∞ or NaN

Return

Core_Success on success. Core_Failure on failure.

Remarks

This function sets the by-thread error variable on failure.

Core_Size

Signature

typedef <implementation> Core_Size

Description

The greatest value of type Core_Size.

Core_Size_Greatest

Signature

#define Core_Size_Greatest <implementation>

Description

The greatest value of type Core_Size.

Core_Size_Least

Signature

#define Core_Size_Least <implementation>

Description

The least value of type Core_Size.

Core_String

Signature

typedef struct Core_String Core_String;

Extends

Core_Object

Description

An immutable UTF-8 Byte sequence.

Core_StringBuffer

Signature

typedef struct Core_StringBuffer Core_StringBuffer;

Extends

Core_Object

Description

A mutable UTF-8 Byte sequence.

Core_StringBuffer_appendBytes

Signature

Core_Result Core_StringBuffer_appendBytes(Core_StringBuffer* SELF, Core_Natural8 const* bytes, Core_Size numberOfBytes);

Description

Append a UTF-8 Byte sequence to the UTF-8 Byte sequence of this Core_StringBuffer object.

Parameters

SELFCore_StringBuffer*A pointer to this Core_StringBuffer object.
bytesCore_Natural8 const*A pointer to an array of numberOfBytes Bytes.
numberOfBytesCore_SizeThe number of Bytes in the array pointed to by bytes.

Success

The Byte sequence is a valid UTF-8 Byte sequence and was appended to the UTF-8 Byte sequence of this Core_StringBuffer object.

Errors

Core_Error_ArgumentInvalidSELF is a null pointer.
Core_Error_ArgumentInvalidbytes is a null pointer.
Core_Error_ArgumentInvalidThe Byte sequence is not a valid UTF-8 Byte sequence.
Core_Error_AllocationFailedAn allocation failed.

Return

Core_Success on success. Core_Failure on failure.

Remarks

This function sets the by-thread error variable on failure.This function fails only with the specified errors/error conditions.

Core_StringBuffer_appendString

Signature

Core_Result Core_StringBuffer_appendString(Core_StringBuffer* SELF, Core_String* string);

Description

Append the UTF-8 Byte sequence of a Core_String object to the UTF-8 Byte sequence of this Core_StringBuffer object.

Parameters

SELFCore_StringBuffer*A pointer to this Core_StringBuffer object.
stringCore_String*A pointer to a Core_String object.

Success

The UTF-8 Byte sequence of the Core_String object was appended to the UTF-8 Byte sequence of this Core_StringBuffer object.

Errors

Core_Error_ArgumentInvalidSELF is a null pointer.
Core_Error_ArgumentInvalidstring is a null pointer.
Core_Error_AllocationFailedAn allocation failed.

Return

Core_Success on success. Core_Failure on failure.

Remarks

This function sets the by-thread error variable on failure.This function fails only with the specified errors/error conditions.

Core_StringBuffer_clear

Signature

Core_Result Core_StringBuffer_clear(Core_StringBuffer* SELF);

Description

Remove all Bytes.

Parameters

SELFCore_StringBuffer*A pointer to a Core_StringBuffer object.

Success

All Bytes were removed from this Core_StringBuffer object.

Consequently, the number of Bytes in this Core_StringBuffer object is zero.

Errors

Core_Error_ArgumentInvalidSELF is a null pointer.

Return

Core_Success on success. Core_Failure on failure.

Remarks

This function sets the by-thread error variable on failure.This function fails only with the specified errors/error conditions.

Core_StringBuffer_getNumberOfBytes

Signature

Core_Result Core_StringBuffer_getNumberOfBytes(Core_Size* RETURN, Core_StringBuffer* SELF);

Description

Get the length of the UTF-8 Byte sequence of this Core_StringBuffer object.

Parameters

RETURNCore_Size*A pointer to a Core_Size variable.
SELFCore_StringBuffer*A pointer to this Core_StringBuffer object.

Success

*RETURN was assigned the length of this UTF-8 Byte sequence of this Core_StringBuffer object.

Errors

Core_Error_ArgumentInvalidRETURN is a null pointer.
Core_Error_ArgumentInvalidSELF is a null pointer.

Return

Core_Success on success. Core_Failure on failure.

Remarks

This function sets the by-thread error variable on failure.This function fails only with the specified errors/error conditions.

Core_StringBuffer_getNumberOfSymbols

Signature

Core_Result Core_StringBuffer_getNumberOfSymbols(Core_Size* RETURN, Core_StringBuffer* SELF);

Description

Get the length of the UTF-8 symbol sequence of this Core_StringBuffer object.

Parameters

RETURNCore_Size*A pointer to a Core_Size variable.
SELFCore_StringBuffer*A pointer to this Core_StringBuffer object.

Success

*RETURN was assigned the length of this UTF-8 symbol sequence of this Core_StringBuffer object.

Errors

Core_Error_ArgumentInvalidRETURN is a null pointer.
Core_Error_ArgumentInvalidSELF is a null pointer.

Return

Core_Success on success. Core_Failure on failure.

Remarks

This function sets the by-thread error variable on failure.This function fails only with the specified errors/error conditions.

Core_StringBuffer_getString

Signature

Core_Result Core_StringBuffer_getString(Core_String** RETURN, Core_StringBuffer* SELF);

Description

Get a copy of the UTF-8 symbol sequence of this Core_StringBuffer object as a Core_String object.

Parameters

RETURNCore_String**A pointer to a Core_String* variable.
SELFCore_StringBuffer*A pointer to this Core_StringBuffer object.

Success

*RETURN was assigned a pointer to a Core_String object.

The UTF-8 symbol sequencs of that Core_String object is a copy of the UTF-8 symbol sequence of this Core_StringBuffer object.

The caller acquired a reference to that Core_String object.

Errors

Core_Error_ArgumentInvalidRETURN is a null pointer.
Core_Error_ArgumentInvalidSELF is a null pointer.
Core_Error_AllocationFailedAn allocation failed.

Return

Core_Success on success. Core_Failure on failure.

Remarks

This function sets the by-thread error variable on failure.This function fails only with the specified errors/error conditions.

Core_StringBuffer_getSubString

Signature

Core_Result Core_StringBuffer_getSubString(Core_String** RETURN, Core_StringBuffer* SELF, Core_Size start, Core_Size length);

Description

Get a copy of a subsequence of the UTF-8 symbol sequence of this Core_StringBuffer object as a Core_String object.

Parameters

RETURNCore_String**A pointer to a Core_String* variable.
SELFCore_StringBuffer*A pointer to this Core_StringBuffer object.
startCore_Size*The index of the UTF-8 symbol at which the substring starts.
lengthCore_Size*The length in UTF-8 symbols of the substring.

Success

*RETURN was assigned a pointer to a Core_String object.

The UTF-8 symbol sequence of that Core_String object is the subsequence of the UTF-8 symbol sequence of this Core_StringBuffer object.

The subsequence starts at the symbol start and ends before the symbol start+length.

The caller acquired a reference to that Core_String object.

Errors

Core_Error_ArgumentInvalidRETURN is a null pointer.
Core_Error_ArgumentInvalidSELF is a null pointer.
Core_Error_ArgumentInvalidstart+length is greater than the number of UTF-8 symbols in this Core_StringBuffer object.
Core_Error_AllocationFailedAn allocation failed.

Return

Core_Success on success. Core_Failure on failure.

Remarks

This function sets the by-thread error variable on failure.This function fails only with the specified errors/error conditions.

Core_StringBuffer_prependBytes

Signature

Core_Result Core_StringBuffer_prependBytes(Core_StringBuffer* SELF, Core_Natural8 const* bytes, Core_Size numberOfBytes);

Description

Prepend a UTF-8 Byte sequence to the UTF-8 Byte sequence of this Core_StringBuffer object.

Parameters

SELFCore_StringBuffer*A pointer to this Core_StringBuffer object.
bytesCore_Natural8 const*A pointer to an array of numberOfBytes Bytes.
numberOfBytesCore_SizeThe number of Bytes in the array pointed to by bytes.

Success

The Byte sequence is a valid UTF-8 Byte sequence and was prepended to the UTF-8 Byte sequence of this Core_StringBuffer object.

Errors

Core_Error_ArgumentInvalidSELF is a null pointer.
Core_Error_ArgumentInvalidbytes is a null pointer.
Core_Error_ArgumentInvalidThe Byte sequence is not a valid UTF-8 Byte sequence.
Core_Error_AllocationFailedAn allocation failed.

Return

Core_Success on success. Core_Failure on failure.

Remarks

This function sets the by-thread error variable on failure.This function fails only with the specified errors/error conditions.

Core_StringBuffer_prependString

Signature

Core_Result Core_StringBuffer_prependString(Core_StringBuffer* SELF, Core_String* string);

Description

Prepend the UTF-8 Byte sequence of a Core_String object to the UTF-8 Byte seuqnece of this Core_StringBuffer object.

Parameters

SELFCore_StringBuffer*A pointer to this Core_StringBuffer object.
stringCore_String*A pointer to a Core_String object.

Success

The UTF-8 Byte sequence of the Core_String object was prepended to the UTF-8 Byte sequence of this Core_StringBuffer object.

Errors

Core_Error_ArgumentInvalidSELF is a null pointer.
Core_Error_ArgumentInvalidstring is a null pointer.
Core_Error_AllocationFailedAn allocation failed.

Return

Core_Success on success. Core_Failure on failure.

Remarks

This function sets the by-thread error variable on failure.

Core_StringBuffer_setBytes

Signature

Core_Result Core_StringBuffer_setBytes(Core_StringBuffer* SELF, Core_Natural8 const* bytes, Core_Size numberOfBytes);

Description

Set the UTF-8 Byte sequence of this Core_StringBuffer object.

Parameters

SELFCore_StringBuffer*A pointer to this Core_StringBuffer object.
bytesCore_Natural8 const*A pointer to an array of numberOfBytes Bytes.
numberOfBytesCore_SizeThe number of Bytes in the array pointed to by bytes.

Success

The Byte sequence is a valid UTF-8 Byte sequence and was assigned as the UTF-8 Byte sequence of this Core_StringBuffer object.

Errors

Core_Error_ArgumentInvalidSELF is a null pointer.
Core_Error_ArgumentInvalidbytes is a null pointer.
Core_Error_ArgumentInvalidThe Byte sequence is not a valid UTF-8 Byte sequence.
Core_Error_AllocationFailedAn allocation failed.

Return

Core_Success on success. Core_Failure on failure.

Remarks

This function sets the by-thread error variable on failure.This function fails only with the specified errors/error conditions.

Core_StringBuffer_setString

Signature

Core_Result Core_StringBuffer_setString(Core_StringBuffer* SELF, Core_String* string);

Description

Set the UTF-8 Byte sequence of this Core_StringBuffer object.

Parameters

SELFCore_StringBuffer*A pointer to this Core_StringBuffer object.
stringCore_String*A pointer to a Core_String object.

Success

The UTF-8 Byte sequence of the Core_String object was assigned as the UTF-8 Byte sequence of this Core_StringBuffer object.

Errors

Core_Error_ArgumentInvalidSELF is a null pointer.
Core_Error_ArgumentInvalidbytes is a null pointer.
Core_Error_ArgumentInvalidThe Byte sequence is not a valid UTF-8 Byte sequence.
Core_Error_AllocationFailedAn allocation failed.

Return

Core_Success on success. Core_Failure on failure.

Remarks

This function sets the by-thread error variable on failure.

Core_Success

Signature

#define Core_Success <implementation>

Description

Symbolic constant for a zero value of type Core_Result indicating success.

Core_ThreadLocal

Signature

#define Core_ThreadLocal() <implementation>

Description

Variable annotation indicating thread local storage.

Core_True

Signature

#define Core_True <implementation>

Description

One the two values of the type Core_Boolean indicating logically true.

Core_Unlikely

Signature

#define Core_Unlikely() <implementation>

Description

Expression annotation aiding branch prediction by indicating an expression is unlikely to evaluate to logically true.

In the following example, we use this function annotation to indicate that a call to malloc is unlikely to fail.
void* p = malloc(sizeof(char));
if (Core_Unlikely(NULL == p))
}

Core_unreference

Signature

void Core_unreference(Core_Object* object);

Description

Decrement the reference count of an object.

Parameters

objectCore_Object*A pointer to a Core_Object object.

Success

This reference count of the object was decremented by 1.

Core_Version_Major

Signature

#define Core_Version_Major <implementation>

Description

Symbolic constant defined to a non-negative integer value denoting the major version of this library.

Core_Version_Minor

Signature

#define Core_Version_Minor <implementation>

Description

Symbolic constant defined to a non-negative integer value denoting the minor version of this library.

Core_VisualsBackend

Signature

#define Core_VisualsBackend <implementation>

Description

Symbolic constant denoting the visuals backend this library was compiled for.
It is always defined as one of the Core_VisualsBackend_* constants.

Core_VisualsBackend_Direct3d12

Signature

#define Core_VisualsBackend_Direct3d12 <implementation>

Description

Symbolic constant defined to a numeric value that is different from the values of the other Core_VisualsBackend_* symbolic constants.
The symbolic constant denotes the DIRECT3D 12 visuals.

Core_VisualsBackend_OpenGl4

Signature

#define Core_VisualsBackend_OpenGL4 <implementation>

Description

Symbolic constant defined to a numeric value that is different from the values of the other Core_VisualsBackend_* symbolic constants.
The symbolic constant denotes the OPENGL4 visuals backend.

Core_VisualsBackend_Vulkan

Signature

#define Core_VisualsBackend_Vulkan <implementation>

Description

Symbolic constant defined to a numeric value that is different from the values of the other Core_VisualsBackend_* symbolic constants.The symbolic constant denotes the VULKAN visuals.

Core_WeakReference

Signature

typedef struct Core_WeakReference Core_WeakReference;

Extends

Core_Object

Description

A weak reference.

Core_WeakReference_acquire

Signature

Core_Result Core_WeakReference_acquire(Core_Object** RETURN, Core_WeakReference* SELF);

Description

Acquire a strong reference from a weak reference.

Parameters

RETURNCore_Object**A pointer to this Core_Object* variable.
SELFCore_WeakReference*A pointer to this Core_WeakReference* object.

Success

*RETURN was assigned pointer.

If this Core_WeakReference* object references a Core_Object, *RETURN was assigned a pointer to the object and the caller acquired a reference to that object.

Otherwise *RETURN was assigned a null pointer.

Errors

Core_Error_ArgumentInvalidRETURN is a null pointer.
Core_Error_ArgumentInvalidSELF is a null pointer.

Return

Core_Success on success. Core_Failure on failure.

Remarks

This function sets the by-thread error variable on failure.

Core_WeakReference_construct

Signature

Core_Result Core_WeakReference_construct(Core_WeakReference* SELF, Core_Object* object);

Description

Construct a Core_WeakReference object.

Parameters

SELFCore_WeakReference*A pointer to this Core_WeakReference object.
objectCore_Object*A pointer to a Core_Object object or a null pointer.

Success

This Core_WeakReference object was constructed.

The weak reference holds a null pointer if object is a null pointer.

Otherwise it holds a pointer to the Core_Object pointed to by object.

Errors

Core_Error_ArgumentInvalidSELF is a null pointer.
Core_Error_AllocationFailedAn allocation failed.

Return

Core_Success on success. Core_Failure on failure.

Remarks

This function sets the by-thread error variable on failure.

Core_WeakReference_create

Signature

Core_Result Core_WeakReference_create(Core_WeakReference** RETURN, Core_Object* object);

Description

Create a Core_WeakReference object.

Parameters

SELFCore_WeakReference*A pointer to this Core_WeakReference object.
objectCore_Object*A pointer to a Core_Object object or a null pointer.

Success

A Core_WeakReference object was created. *RETURN was assigned a pointer to that object.

The weak reference holds a null pointer if object is a null pointer.

Otherwise it holds a pointer to the Core_Object pointed to by object.

Errors

Core_Error_ArgumentInvalidSELF is a null pointer.
Core_Error_AllocationFailedAn allocation failed.

Return

Core_Success on success. Core_Failure on failure.

Remarks

This function sets the by-thread error variable on failure.

Core_WeakReference_set

Signature

Core_Result Core_WeakReference_set(Core_WeakReference* SELF, Core_Object* object);

Description

Create a Core_WeakReference object.

Parameters

SELFCore_WeakReference*A pointer to this Core_WeakReference object.
objectCore_Object*A pointer to a Core_Object object or a null pointer.

Success

The weak reference holds a null pointer if object is a null pointer.

Otherwise it holds a pointer to the Core_Object pointed to by object.

Errors

Core_Error_ArgumentInvalidSELF is a null pointer.
Core_Error_AllocationFailedAn allocation failed.

Return

Core_Success on success. Core_Failure on failure.

Remarks

This function sets the by-thread error variable on failure.