Skip to content
modkitv0.2

types.h

#include <modkit/types.h>1 functions · 4 structs · 2 enums · 6 typedefs · 12 macros

Core types and definitions for modkit.

Functions

mk_color_to_abgrfunction

uint32_t mk_color_to_abgr(mk_color c)

Perform the color to abgr operation.

ParameterTypeDescription
cmk_colorValue for c.

Returns The resulting value.

Structs

mk_colorstruct

Data for color.

FieldTypeDescription
ruint8_tRed channel.
guint8_tGreen channel.
buint8_tBlue channel.
auint8_tAlpha channel.

mk_insetsstruct

Data for insets.

FieldTypeDescription
leftint32_tLeft inset.
topint32_tTop inset.
rightint32_tRight inset.
bottomint32_tBottom inset.

mk_rectstruct

Data for rect.

FieldTypeDescription
xint32_tLeft coordinate.
yint32_tTop coordinate.
widthint32_tWidth.
heightint32_tHeight.

mk_rectfstruct

Data for rectf.

FieldTypeDescription
xfloatLeft coordinate.
yfloatTop coordinate.
widthfloatWidth.
heightfloatHeight.

Enums

mk_color_space_tenum

Values for color space.

ValueDescription
MK_COLOR_SPACE_AUTOSelects auto.
MK_COLOR_SPACE_LINEARSelects linear.
MK_COLOR_SPACE_SRGBSelects srgb.

mk_resultenum

Values for result.

ValueDescription
MK_SUCCESSSelects success.
MK_ERROR_INIT_FAILEDSelects error init failed.
MK_ERROR_WINDOW_FAILEDSelects error window failed.
MK_ERROR_RENDERER_FAILEDSelects error renderer failed.
MK_ERROR_OUT_OF_MEMORYSelects error out of memory.
MK_ERROR_INVALID_ARGUMENTSelects error invalid argument.
MK_ERROR_VIEW_EXHAUSTEDSelects error view exhausted.
MK_ERROR_NOT_INITIALIZEDSelects error not initialized.
MK_ERROR_MATERIAL_TABLE_CAPACITYSelects error material table capacity.
MK_ERROR_UNSUPPORTED_PBR_VARIANTSelects error unsupported PBR variant.
MK_ERROR_VIEW_BUDGETSelects error view budget.
MK_ERROR_UNSUPPORTEDSelects error unsupported.
MK_ERROR_INVALID_STATESelects error invalid state.
MK_ERROR_RESOURCE_PENDINGSelects error resource pending.
MK_ERROR_RESOURCE_CYCLESelects error resource cycle.
MK_ERROR_RENDER_WORLD_CONFLICTSelects error render world conflict.
MK_ERROR_DRAW_BINDING_CAPACITYSelects error draw binding capacity.
MK_ERROR_DRAW_BINDING_CONFLICTSelects error draw binding conflict.
MK_ERROR_DRAW_BINDING_TYPESelects error draw binding type.
MK_ERROR_PERMISSION_DENIEDSelects error permission denied.
MK_ERROR_DEVICE_UNAVAILABLESelects error device unavailable.
MK_ERROR_QUEUE_FULLSelects error queue full.
MK_ERROR_DECODE_FAILEDSelects error decode failed.
MK_ERROR_IOSelects error I/O.
MK_ERROR_SHADER_COMPILESelects error shader compile.
MK_ERROR_CANCELLEDSelects error cancelled.
MK_ERROR_MESSAGE_TOO_LARGESelects error message too large.

Typedefs

mk_colortypedef

typedef struct mk_color mk_color

Data for color.

mk_color_space_ttypedef

typedef enum mk_color_space_t mk_color_space_t

Values for color space.

mk_insetstypedef

typedef struct mk_insets mk_insets

Data for insets.

mk_recttypedef

typedef struct mk_rect mk_rect

Data for rect.

mk_rectftypedef

typedef struct mk_rectf mk_rectf

Data for rectf.

mk_resulttypedef

typedef enum mk_result mk_result

Values for result.

Macros

MK_ABGRdefine

MK_ABGR(r, g, b, a)

Pack r,g,b,a (0-255) as 0xAABBGGRR bgfx vertex-color order.

MK_COLORdefine

MK_COLOR(r, g, b, a)

Constant for color.

MK_COLOR_BLACKdefine

MK_COLOR_BLACK

Constant for color black.

MK_COLOR_BLUEdefine

MK_COLOR_BLUE

Constant for color blue.

MK_COLOR_CORNFLOWER_BLUEdefine

MK_COLOR_CORNFLOWER_BLUE

Constant for color cornflower blue.

MK_COLOR_GREENdefine

MK_COLOR_GREEN

Constant for color green.

MK_COLOR_REDdefine

MK_COLOR_RED

Constant for color red.

MK_COLOR_WHITEdefine

MK_COLOR_WHITE

Constant for color white.

MK_DEPRECATEDdefine

MK_DEPRECATED(msg)

Constant for deprecated.

MK_RGBdefine

MK_RGB(r, g, b)

Pack r,g,b (0-255) as 0xRRGGBBFF (opaque) modkit API color order.

MK_RGBAdefine

MK_RGBA(r, g, b, a)

Pack r,g,b,a (0-255) as 0xRRGGBBAA modkit API color order.

MODKIT_APIdefine

MODKIT_API

Constant for modkit API.