Platform-specific package target: windows_amd64

Collection Info

View Source
Collection
core
Path
sys/orca
Entries
624

Source Files

Constants

125

UNICODE_AEGEAN_NUMBERS #

Source
UNICODE_AEGEAN_NUMBERS :: unicode_range{0x10100, 63}

UNICODE_ALPHABETIC_PRESENTATION_FORMS #

Source
UNICODE_ALPHABETIC_PRESENTATION_FORMS :: unicode_range{0xfb00, 79}

UNICODE_ARABIC_PRESENTATION_FORMS_A #

Source
UNICODE_ARABIC_PRESENTATION_FORMS_A :: unicode_range{0xfb50, 687}

UNICODE_ARABIC_PRESENTATION_FORMS_B #

Source
UNICODE_ARABIC_PRESENTATION_FORMS_B :: unicode_range{0xfe70, 143}

UNICODE_ARMENIAN #

Source
UNICODE_ARMENIAN :: unicode_range{0x0530, 95}

UNICODE_BASIC_LATIN #

Source
UNICODE_BASIC_LATIN :: unicode_range{0x0000, 127}

UNICODE_BENGALI_ASSAMESE #

Source
UNICODE_BENGALI_ASSAMESE :: unicode_range{0x0980, 127}

UNICODE_BLOCK_ELEMENTS #

Source
UNICODE_BLOCK_ELEMENTS :: unicode_range{0x2580, 31}

UNICODE_BOPOMOFO #

Source
UNICODE_BOPOMOFO :: unicode_range{0x3100, 47}

UNICODE_BOPOMOFO_EXTENDED #

Source
UNICODE_BOPOMOFO_EXTENDED :: unicode_range{0x31a0, 31}

UNICODE_BOX_DRAWING #

Source
UNICODE_BOX_DRAWING :: unicode_range{0x2500, 127}

UNICODE_BRAILLE_PATTERNS #

Source
UNICODE_BRAILLE_PATTERNS :: unicode_range{0x2800, 255}

UNICODE_BYZANTINE_MUSICAL_SYMBOLS #

Source
UNICODE_BYZANTINE_MUSICAL_SYMBOLS :: unicode_range{0x1d000, 255}

UNICODE_C1_CONTROLS_AND_LATIN_1_SUPPLEMENT #

Source
UNICODE_C1_CONTROLS_AND_LATIN_1_SUPPLEMENT :: unicode_range{0x0080, 127}

UNICODE_CHEROKEE #

Source
UNICODE_CHEROKEE :: unicode_range{0x13a0, 95}

UNICODE_CJK_COMPATIBILITY #

Source
UNICODE_CJK_COMPATIBILITY :: unicode_range{0x3300, 255}

UNICODE_CJK_COMPATIBILITY_FORMS #

Source
UNICODE_CJK_COMPATIBILITY_FORMS :: unicode_range{0xfe30, 31}

UNICODE_CJK_COMPATIBILITY_IDEOGRAPHS #

Source
UNICODE_CJK_COMPATIBILITY_IDEOGRAPHS :: unicode_range{0xf900, 511}

UNICODE_CJK_COMPATIBILITY_IDEOGRAPHS_SUPPLEMENT #

Source
UNICODE_CJK_COMPATIBILITY_IDEOGRAPHS_SUPPLEMENT :: unicode_range{0x2f800, 543}

UNICODE_CJK_RADICALS_SUPPLEMENT #

Source
UNICODE_CJK_RADICALS_SUPPLEMENT :: unicode_range{0x2e80, 127}

UNICODE_CJK_SYMBOLS_AND_PUNCTUATION #

Source
UNICODE_CJK_SYMBOLS_AND_PUNCTUATION :: unicode_range{0x3000, 63}

UNICODE_CJK_UNIFIED_IDEOGRAPHS #

Source
UNICODE_CJK_UNIFIED_IDEOGRAPHS :: unicode_range{0x4e00, 20911}

UNICODE_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_A #

Source
UNICODE_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_A :: unicode_range{0x3400, 6591}

UNICODE_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_B #

Source
UNICODE_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_B :: unicode_range{0x20000, 42719}

UNICODE_COMBINING_DIACRITICAL_MARKS #

Source
UNICODE_COMBINING_DIACRITICAL_MARKS :: unicode_range{0x0300, 111}

UNICODE_COMBINING_DIACRITICAL_MARKS_FOR_SYMBOLS #

Source
UNICODE_COMBINING_DIACRITICAL_MARKS_FOR_SYMBOLS :: unicode_range{0x20d0, 47}

UNICODE_COMBINING_HALF_MARKS #

Source
UNICODE_COMBINING_HALF_MARKS :: unicode_range{0xfe20, 15}

UNICODE_CONTROL_PICTURES #

Source
UNICODE_CONTROL_PICTURES :: unicode_range{0x2400, 63}

UNICODE_CURRENCY_SYMBOLS #

Source
UNICODE_CURRENCY_SYMBOLS :: unicode_range{0x20a0, 47}

UNICODE_CYPRIOT_SYLLABARY #

Source
UNICODE_CYPRIOT_SYLLABARY :: unicode_range{0x10800, 63}

UNICODE_CYRILLIC #

Source
UNICODE_CYRILLIC :: unicode_range{0x0400, 255}

UNICODE_CYRILLIC_SUPPLEMENT #

Source
UNICODE_CYRILLIC_SUPPLEMENT :: unicode_range{0x0500, 47}

UNICODE_DESERET #

Source
UNICODE_DESERET :: unicode_range{0x10400, 79}

UNICODE_DEVANAGARI #

Source
UNICODE_DEVANAGARI :: unicode_range{0x0900, 127}

UNICODE_DINGBATS #

Source
UNICODE_DINGBATS :: unicode_range{0x2700, 191}

UNICODE_ENCLOSED_ALPHANUMERICS #

Source
UNICODE_ENCLOSED_ALPHANUMERICS :: unicode_range{0x2460, 159}

UNICODE_ENCLOSED_CJK_LETTERS_AND_MONTHS #

Source
UNICODE_ENCLOSED_CJK_LETTERS_AND_MONTHS :: unicode_range{0x3200, 255}

UNICODE_ETHIOPIC #

Source
UNICODE_ETHIOPIC :: unicode_range{0x1200, 383}

UNICODE_GENERAL_PUNCTUATION #

Source
UNICODE_GENERAL_PUNCTUATION :: unicode_range{0x2000, 111}

UNICODE_GEOMETRIC_SHAPES #

Source
UNICODE_GEOMETRIC_SHAPES :: unicode_range{0x25a0, 95}

UNICODE_GEORGIAN #

Source
UNICODE_GEORGIAN :: unicode_range{0x10a0, 95}

UNICODE_GREEK_COPTIC #

Source
UNICODE_GREEK_COPTIC :: unicode_range{0x0370, 143}

UNICODE_GREEK_EXTENDED #

Source
UNICODE_GREEK_EXTENDED :: unicode_range{0x1f00, 255}

UNICODE_GUJARATI #

Source
UNICODE_GUJARATI :: unicode_range{0x0a80, 127}

UNICODE_GURMUKHI #

Source
UNICODE_GURMUKHI :: unicode_range{0x0a00, 127}

UNICODE_HALFWIDTH_AND_FULLWIDTH_FORMS #

Source
UNICODE_HALFWIDTH_AND_FULLWIDTH_FORMS :: unicode_range{0xff00, 239}

UNICODE_HANGUL_COMPATIBILITY_JAMO #

Source
UNICODE_HANGUL_COMPATIBILITY_JAMO :: unicode_range{0x3130, 95}

UNICODE_HANGUL_JAMO #

Source
UNICODE_HANGUL_JAMO :: unicode_range{0x1100, 255}

UNICODE_HANGUL_SYLLABLES #

Source
UNICODE_HANGUL_SYLLABLES :: unicode_range{0xac00, 11183}

UNICODE_HANUNOO #

Source
UNICODE_HANUNOO :: unicode_range{0x1720, 31}

UNICODE_HIGH_SURROGATE_AREA #

Source
UNICODE_HIGH_SURROGATE_AREA :: unicode_range{0xd800, 1023}

UNICODE_HIRAGANA #

Source
UNICODE_HIRAGANA :: unicode_range{0x3040, 95}

UNICODE_IDEOGRAPHIC_DESCRIPTION_CHARACTERS #

Source
UNICODE_IDEOGRAPHIC_DESCRIPTION_CHARACTERS :: unicode_range{0x2ff0, 15}

UNICODE_IPA_EXTENSIONS #

Source
UNICODE_IPA_EXTENSIONS :: unicode_range{0x0250, 95}

UNICODE_KANBUN_KUNTEN #

Source
UNICODE_KANBUN_KUNTEN :: unicode_range{0x3190, 15}

UNICODE_KANGXI_RADICALS #

Source
UNICODE_KANGXI_RADICALS :: unicode_range{0x2f00, 223}

UNICODE_KANNADA #

Source
UNICODE_KANNADA :: unicode_range{0x0c80, 127}

UNICODE_KATAKANA #

Source
UNICODE_KATAKANA :: unicode_range{0x30a0, 95}

UNICODE_KATAKANA_PHONETIC_EXTENSIONS #

Source
UNICODE_KATAKANA_PHONETIC_EXTENSIONS :: unicode_range{0x31f0, 15}

UNICODE_KHMER_SYMBOLS #

Source
UNICODE_KHMER_SYMBOLS :: unicode_range{0x19e0, 31}

UNICODE_LATIN_EXTENDED_A #

Source
UNICODE_LATIN_EXTENDED_A :: unicode_range{0x0100, 127}

UNICODE_LATIN_EXTENDED_ADDITIONAL #

Source
UNICODE_LATIN_EXTENDED_ADDITIONAL :: unicode_range{0x1e00, 255}

UNICODE_LATIN_EXTENDED_B #

Source
UNICODE_LATIN_EXTENDED_B :: unicode_range{0x0180, 207}

UNICODE_LETTERLIKE_SYMBOLS #

Source
UNICODE_LETTERLIKE_SYMBOLS :: unicode_range{0x2100, 79}

UNICODE_LINEAR_B_IDEOGRAMS #

Source
UNICODE_LINEAR_B_IDEOGRAMS :: unicode_range{0x10080, 127}

UNICODE_LINEAR_B_SYLLABARY #

Source
UNICODE_LINEAR_B_SYLLABARY :: unicode_range{0x10000, 127}

UNICODE_LOW_SURROGATE_AREA #

Source
UNICODE_LOW_SURROGATE_AREA :: unicode_range{0xdc00, 1023}

UNICODE_MALAYALAM #

Source
UNICODE_MALAYALAM :: unicode_range{0x0d00, 255}

UNICODE_MATHEMATICAL_ALPHANUMERIC_SYMBOLS #

Source
UNICODE_MATHEMATICAL_ALPHANUMERIC_SYMBOLS :: unicode_range{0x1d400, 1023}

UNICODE_MATHEMATICAL_OPERATORS #

Source
UNICODE_MATHEMATICAL_OPERATORS :: unicode_range{0x2200, 255}

UNICODE_MISCELLANEOUS_MATHEMATICAL_SYMBOLS_A #

Source
UNICODE_MISCELLANEOUS_MATHEMATICAL_SYMBOLS_A :: unicode_range{0x27c0, 47}

UNICODE_MISCELLANEOUS_MATHEMATICAL_SYMBOLS_B #

Source
UNICODE_MISCELLANEOUS_MATHEMATICAL_SYMBOLS_B :: unicode_range{0x2980, 127}

UNICODE_MISCELLANEOUS_SYMBOLS #

Source
UNICODE_MISCELLANEOUS_SYMBOLS :: unicode_range{0x2600, 255}

UNICODE_MISCELLANEOUS_SYMBOLS_AND_ARROWS #

Source
UNICODE_MISCELLANEOUS_SYMBOLS_AND_ARROWS :: unicode_range{0x2b00, 255}

UNICODE_MISCELLANEOUS_TECHNICAL #

Source
UNICODE_MISCELLANEOUS_TECHNICAL :: unicode_range{0x2300, 255}

UNICODE_MONGOLIAN #

Source
UNICODE_MONGOLIAN :: unicode_range{0x1800, 175}

UNICODE_MUSICAL_SYMBOLS #

Source
UNICODE_MUSICAL_SYMBOLS :: unicode_range{0x1d100, 255}

UNICODE_MYANMAR #

Source
UNICODE_MYANMAR :: unicode_range{0x1000, 159}

UNICODE_NUMBER_FORMS #

Source
UNICODE_NUMBER_FORMS :: unicode_range{0x2150, 63}

UNICODE_OLD_ITALIC #

Source
UNICODE_OLD_ITALIC :: unicode_range{0x10300, 47}

UNICODE_OPTICAL_CHARACTER_RECOGNITION #

Source
UNICODE_OPTICAL_CHARACTER_RECOGNITION :: unicode_range{0x2440, 31}

UNICODE_OSMANYA #

Source
UNICODE_OSMANYA :: unicode_range{0x10480, 47}

UNICODE_PHONETIC_EXTENSIONS #

Source
UNICODE_PHONETIC_EXTENSIONS :: unicode_range{0x1d00, 127}

UNICODE_PRIVATE_USE_AREA #

Source
UNICODE_PRIVATE_USE_AREA :: unicode_range{0xe000, 6399}

UNICODE_SHAVIAN #

Source
UNICODE_SHAVIAN :: unicode_range{0x10450, 47}

UNICODE_SINHALA #

Source
UNICODE_SINHALA :: unicode_range{0x0d80, 127}

UNICODE_SMALL_FORM_VARIANTS #

Source
UNICODE_SMALL_FORM_VARIANTS :: unicode_range{0xfe50, 31}

UNICODE_SPACING_MODIFIER_LETTERS #

Source
UNICODE_SPACING_MODIFIER_LETTERS :: unicode_range{0x02b0, 79}

UNICODE_SPECIALS #

Source
UNICODE_SPECIALS :: unicode_range{0xfff0, 15}

UNICODE_SUPERSCRIPTS_AND_SUBSCRIPTS #

Source
UNICODE_SUPERSCRIPTS_AND_SUBSCRIPTS :: unicode_range{0x2070, 47}

UNICODE_SUPPLEMENTAL_ARROWS_A #

Source
UNICODE_SUPPLEMENTAL_ARROWS_A :: unicode_range{0x27f0, 15}

UNICODE_SUPPLEMENTAL_ARROWS_B #

Source
UNICODE_SUPPLEMENTAL_ARROWS_B :: unicode_range{0x2900, 127}

UNICODE_SUPPLEMENTAL_MATHEMATICAL_OPERATORS #

Source
UNICODE_SUPPLEMENTAL_MATHEMATICAL_OPERATORS :: unicode_range{0x2a00, 255}

UNICODE_SUPPLEMENTARY_PRIVATE_USE_AREA_A #

Source
UNICODE_SUPPLEMENTARY_PRIVATE_USE_AREA_A :: unicode_range{0xf0000, 65533}

UNICODE_SUPPLEMENTARY_PRIVATE_USE_AREA_B #

Source
UNICODE_SUPPLEMENTARY_PRIVATE_USE_AREA_B :: unicode_range{0x100000, 65533}

UNICODE_TAGALOG #

Source
UNICODE_TAGALOG :: unicode_range{0x1700, 31}

UNICODE_TAGBANWA #

Source
UNICODE_TAGBANWA :: unicode_range{0x1760, 31}

UNICODE_TAI_XUAN_JING_SYMBOLS #

Source
UNICODE_TAI_XUAN_JING_SYMBOLS :: unicode_range{0x1d300, 95}

UNICODE_TIBETAN #

Source
UNICODE_TIBETAN :: unicode_range{0x0f00, 255}

UNICODE_UGARITIC #

Source
UNICODE_UGARITIC :: unicode_range{0x10380, 31}

UNICODE_UNIFIED_CANADIAN_ABORIGINAL_SYLLABICS #

Source
UNICODE_UNIFIED_CANADIAN_ABORIGINAL_SYLLABICS :: unicode_range{0x1400, 639}

UNICODE_VARIATION_SELECTORS #

Source
UNICODE_VARIATION_SELECTORS :: unicode_range{0xfe00, 15}

UNICODE_VARIATION_SELECTORS_SUPPLEMENT #

Source
UNICODE_VARIATION_SELECTORS_SUPPLEMENT :: unicode_range{0xe0100, 239}

UNICODE_YI_RADICALS #

Source
UNICODE_YI_RADICALS :: unicode_range{0xa490, 63}

UNICODE_YI_SYLLABLES #

Source
UNICODE_YI_SYLLABLES :: unicode_range{0xa000, 1167}

UNICODE_YIJING_HEXAGRAM_SYMBOLS #

Source
UNICODE_YIJING_HEXAGRAM_SYMBOLS :: unicode_range{0x4dc0, 63}

Types

115

arena #

Source
arena :: arena

A memory arena, allowing to allocate memory in a linear or stack-like fashion.

arena_scope #

Source
arena_scope :: arena_scope

This struct provides a way to store the current offset in a given arena, in order to reset the arena to that offset later. This allows using arenas in a stack-like fashion, e.g. to create temporary "scratch" allocations

canvas_context #

Source
canvas_context :: distinct canvas_context

An opaque handle to a canvas context. Canvas contexts are used to hold contextual state about drawing commands, such as the current color or the current line width, and to record drawing commands. Once commands have been recorded, they can be rendered to a surface using `oc_canvas_render()`.

event_type #

Source
event_type :: event_type

This enum defines the type events that can be sent to the application by the runtime. This determines which member of the `oc_event` union field is active.

file_open_flag #

Source
file_open_flag :: file_open_flag

The type of file open flags describing file open options. Flags for the `oc_file_open()` function.

file_whence #

Source
file_whence :: file_whence

This enum is used in `oc_file_seek()` to specify the starting point of the seek operation.

io_error #

Source
io_error :: io_error

A type identifying an I/O error. This enum declares all I/O error values.

io_op #

Source
io_op :: io_op

A type used to identify I/O operations. This enum declares all I/O operations.

key_code #

Source
key_code :: key_code

A code identifying a key. The physical location of the key corresponding to a given key code depends on the system's keyboard layout.

mouse_event #

Source
mouse_event :: mouse_event

A structure describing a mouse move or a mouse wheel event. Mouse coordinates have their origin at the top-left corner of the window, with the y axis going down.

rect_atlas #

Source
rect_atlas :: rect_atlas

An opaque struct representing a rectangle atlas. This is used to allocate rectangular regions of an image to make texture atlases.

scan_code #

Source
scan_code :: scan_code

A code representing a key's physical location. This is independent of the system's keyboard layout.

str16 #

Source
str16 :: distinct str16

A type describing a string of 16-bits characters (typically used for UTF-16).

str32 #

Source
str32 :: distinct str32

A type describing a string of 32-bits characters (typically used for UTF-32 codepoints).

utf8_status #

Source
utf8_status :: utf8_status

This enum declares the possible return status of UTF8 decoding/encoding operations.

Procedures

384

abort_ext #

Source
abort_ext :: proc "c" (file: cstring, function: cstring, line: i32, fmt: cstring, args: ..any) -> ! ---

Abort the application, showing an error message. This function should not be called directly by user code, which should use the `OC_ABORT` macro instead, as the macro takes care of filling in the source location parameters of the function.

arena_cleanup #

Source
arena_cleanup :: proc "c" (arena: ^arena) ---

Release all resources allocated to a memory arena.

arena_clear #

Source
arena_clear :: proc "c" (arena: ^arena) ---

Reset an arena. All memory that was previously allocated from this arena is released to the arena, and can be reallocated by later calls to `oc_arena_push` and similar functions. No memory is actually released _to the system_.

arena_init_with_options #

Source
arena_init_with_options :: proc "c" (arena: ^arena, options: ^arena_options) ---

Initialize a memory arena with additional options.

arena_push #

Source
arena_push :: proc "c" (arena: ^arena, size: u64) -> rawptr ---

Allocate a zero initialized block of memory from an arena.

arena_push_aligned #

Source
arena_push_aligned :: proc "c" (arena: ^arena, size: u64, alignment: u32) -> rawptr ---

Allocate an aligned, zero initialized block of memory from an arena.

arena_push_aligned_uninitialized #

Source
arena_push_aligned_uninitialized :: proc "c" (arena: ^arena, size: u64, alignment: u32) -> rawptr ---

Allocate an aligned block of memory from an arena.

arena_push_uninitialized #

Source
arena_push_uninitialized :: proc "c" (arena: ^arena, size: u64) -> rawptr ---

Allocate a block of memory from an arena.

arena_scope_begin #

Source
arena_scope_begin :: proc "c" (arena: ^arena) -> arena_scope ---

Begin a memory scope. This creates an `oc_arena_scope` object that stores the current offset of the arena. The arena can later be reset to that offset by calling `oc_arena_scope_end`, releasing all memory that was allocated within the scope to the arena.

arena_scope_end #

Source
arena_scope_end :: proc "c" (scope: arena_scope) ---

End a memory scope. This resets an arena to the offset it had when the scope was created. All memory allocated within the scope is released back to the arena.

assert_fail #

Source
assert_fail :: proc "c" (
	file:     cstring, 
	function: cstring, 
	line:     i32, 
	src:      cstring, 
	fmt:      cstring, 
	args:     ..any, 
) -> ! ---

Tigger a failed assertion. This aborts the application, showing the failed assertion and an error message. This function should not be called directly by user code, which should use the `OC_ASSERT` macro instead. The macro checks the assert condition and calls the function if it is false. It also takes care of filling in the source location parameters of the function.

canvas_context_select #

Source
canvas_context_select :: proc "c" (_context: canvas_context) -> canvas_context ---

Make a canvas context current in the calling thread. Subsequent canvas commands will refer to this context until another context is made current.

canvas_context_set_msaa_sample_count #

Source
canvas_context_set_msaa_sample_count :: proc "c" (_context: canvas_context, sampleCount: u32) ---

Set the multisample anti-aliasing sample count for the commands of a context.

clear #

Source
clear :: proc "c" () ---

Clear the canvas to the current color.

clip_pop #

Source
clip_pop :: proc "c" () ---

Pop from the clip stack.

clip_top #

Source
clip_top :: proc "c" () -> rect ---

Get the clip rectangle from the top of the clip stack.

clipboard_set_string #

Source
clipboard_set_string :: proc "c" (string: string) ---

Put a string in the clipboard.

close_path #

Source
close_path :: proc "c" () ---

Close the current path with a line.

codepoints_outlines #

Source
codepoints_outlines :: proc "c" (string: str32) ---

Add the outlines of a glyph run to the path, using unicode codepoints.

cubic_to #

Source
cubic_to :: proc "c" (
	x1: f32, 
	y1: f32, 
	x2: f32, 
	y2: f32, 
	x3: f32, 
	y3: f32, 
) ---

Add a cubic Bézier curve to the path from the current position to a new one.

font_get_glyph_index #

Source
font_get_glyph_index :: proc "c" (font: font, codePoint: rune) -> u32 ---

Get the glyp index of a single codepoint in a given font.

font_get_glyph_indices #

Source
font_get_glyph_indices :: proc "c" (font: font, codePoints: str32, backing: str32) -> str32 ---

Get the glyph indices of a run of unicode code points in a given font.

font_get_scale_for_em_pixels #

Source
font_get_scale_for_em_pixels :: proc "c" (font: font, emSize: f32) -> f32 ---

Get a scale factor to apply to unscaled font metrics to obtain a given 'm' size.

font_push_glyph_indices #

Source
font_push_glyph_indices :: proc "c" (arena: ^arena, font: font, codePoints: str32) -> str32 ---

Get the glyph indices of a run of unicode code points in a given font and push them on an arena.

get_font_size #

Source
get_font_size :: proc "c" () -> f32 ---

Get the current font size.

get_image_source_region #

Source
get_image_source_region :: proc "c" () -> rect ---

Get the current image source region.

get_max_joint_excursion #

Source
get_max_joint_excursion :: proc "c" () -> f32 ---

Get the current max joint excursion.

get_position #

Source
get_position :: proc "c" () -> [2]f32 ---

Get the current cursor position.

get_text_flip #

Source
get_text_flip :: proc "c" () -> bool ---

Get the current text flip value.

get_tolerance #

Source
get_tolerance :: proc "c" () -> f32 ---

Get the current line width tolerance.

gles_surface_create #

Source
gles_surface_create :: proc "c" () -> surface ---

Create a graphics surface for GLES rendering.

gles_surface_make_current #

Source
gles_surface_make_current :: proc "c" (surface: surface) ---

Make the GL context of the surface current.

gles_surface_swap_buffers #

Source
gles_surface_swap_buffers :: proc "c" (surface: surface) ---

Swap the buffers of a GLES surface.

glyph_outlines #

Source
glyph_outlines :: proc "c" (glyphIndices: str32) -> rect ---

Add the outlines of a glyph run to the path, using glyph indices.

image_atlas_alloc_from_rgba8 #

Source
image_atlas_alloc_from_rgba8 :: proc "c" (atlas: ^rect_atlas, backingImage: image, width: u32, height: u32, pixels: [^]u8) -> image_region ---

Allocate an image region from an atlas and upload pixels to that region.

image_create_from_rgba8 #

Source
image_create_from_rgba8 :: proc "c" (renderer: canvas_renderer, width: u32, height: u32, pixels: [^]u8) -> image ---

Create an image from an array of 8 bit per channel rgba values.

image_draw_region #

Source
image_draw_region :: proc "c" (image: image, srcRegion: rect, dstRegion: rect) ---

Draw a sub-region of an image.

image_upload_region_rgba8 #

Source
image_upload_region_rgba8 :: proc "c" (image: image, region: rect, pixels: [^]u8) ---

Upload pixels to an image.

io_wait_single_req #

Source
io_wait_single_req :: proc "c" (req: ^io_req) -> io_cmp ---

Send a single I/O request and wait for its completion.

line_to #

Source
line_to :: proc "c" (x, y: f32) ---

Add a line to the path from the current position to a new one.

list_init #

Source
list_init :: proc "c" (list: ^list) ---

Zero-initializes a linked list.

list_push_front #

Source
list_push_front :: proc "c" (list: ^list, elt: ^list_elt) ---

Add an element at the beginning of a list.

log_ext #

Source
log_ext :: proc "c" (
	level:    log_level, 
	function: cstring, 
	file:     cstring, 
	line:     i32, 
	fmt:      cstring, 
	args:     ..any, 
) ---

Log a message to the console. This function should not be called directly by user code, which should use the `oc_log_XXX` family of macros instead. The macros take care of filling in the message level and source location parameters of the function.

mat2x3_inv #

Source
mat2x3_inv :: proc "c" (x: [6]f32) -> [6]f32 ---

Invert an affine transform represented as a 2x3 matrix.

mat2x3_mul #

Source
mat2x3_mul :: proc "c" (m: [6]f32, p: [2]f32) -> [2]f32 ---

Transforms a vector by an affine transformation represented as a 2x3 matrix.

mat2x3_mul_m #

Source
mat2x3_mul_m :: proc "c" (lhs: [6]f32, rhs: [6]f32) -> [6]f32 ---

Multiply two affine transformations represented as 2x3 matrices. Both matrices are treated as 3x3 matrices with an implicit `(0, 0, 1)` bottom row

mat2x3_rotate #

Source
mat2x3_rotate :: proc "c" (radians: f32) -> [6]f32 ---

Return a 2x3 matrix representing a rotation.

mat2x3_scale #

Source
mat2x3_scale :: proc "c" (x, y: f32) -> [6]f32 ---

Return a 2x3 matrix representing a scale.

mat2x3_translate #

Source
mat2x3_translate :: proc "c" (x, y: f32) -> [6]f32 ---

Return a 2x3 matrix representing a translation.

matrix_multiply_push #

Source
matrix_multiply_push :: proc "c" (_matrix: [6]f32) ---

Multiply a matrix with the top of the transform stack, and push the result on the top of the stack.

matrix_pop #

Source
matrix_pop :: proc "c" () ---

Pop a matrix from the transform stack.

matrix_push #

Source
matrix_push :: proc "c" (_matrix: [6]f32) ---

Push a matrix on the transform stack.

matrix_top #

Source
matrix_top :: proc "c" () -> [6]f32 ---

Get the top matrix of the transform stack.

move_to #

Source
move_to :: proc "c" (x, y: f32) ---

Move the cursor to a given position.

path_is_absolute #

Source
path_is_absolute :: proc "c" (path: string) -> bool ---

Test wether a path is an absolute path.

path_slice_directory #

Source
path_slice_directory :: proc "c" (path: string) -> string ---

Get a string slice of the directory part of a path.

path_slice_filename #

Source
path_slice_filename :: proc "c" (path: string) -> string ---

Get a string slice of the file name part of a path.

quadratic_to #

Source
quadratic_to :: proc "c" (x1: f32, y1: f32, x2: f32, y2: f32) ---

Add a quadratic Bézier curve to the path from the current position to a new one.

rect_atlas_recycle #

Source
rect_atlas_recycle :: proc "c" (atlas: ^rect_atlas, rect: rect) ---

Recycle a rectangular region that was previously allocated from an atlas.

request_quit #

Source
request_quit :: proc "c" () ---

Request the system to quit the application.

rounded_rectangle_fill #

Source
rounded_rectangle_fill :: proc "c" (x: f32, y: f32, w: f32, h: f32, r: f32) ---

Draw a filled rounded rectangle.

rounded_rectangle_stroke #

Source
rounded_rectangle_stroke :: proc "c" (x: f32, y: f32, w: f32, h: f32, r: f32) ---

Draw a stroked rounded rectangle.

scancode_to_keycode #

Source
scancode_to_keycode :: proc "c" (scanCode: scan_code) -> key_code ---

Convert a scancode to a keycode, according to current keyboard layout.

scratch_begin #

Source
scratch_begin :: proc "c" () -> arena_scope ---

Begin a scratch scope. This creates a memory scope on a per-thread, global "scratch" arena. This allows easily creating temporary memory for scratch computations or intermediate results, in a stack-like fashion. If you must return results in an arena passed by the caller, and you also use a scratch arena to do intermediate computations, beware that the results arena could itself be a scatch arena. In this case, you have to be careful not to intermingle your scratch computations with the final result, or clear your result entirely. You can either: - Allocate memory for the result upfront and call `oc_scratch_begin` afterwards, if possible. - Use `oc_scratch_begin_next()` and pass it the result arena, to get a scratch arena that does not conflict with it.

scratch_begin_next #

Source
scratch_begin_next :: proc "c" (used: ^arena) -> arena_scope ---

Begin a scratch scope that does not conflict with a given arena. See `oc_scratch_begin()` for more details about when to use this function.

scratch_end #

Source
scratch_end :: proc "c" (scope: arena_scope) ---

End a memory scope. This resets an arena to the offset it had when the scope was created. All memory allocated within the scope is released back to the arena.

set_color_rgba #

Source
set_color_rgba :: proc "c" (r: f32, g: f32, b: f32, a: f32) ---

Set the current color using linear RGBA values.

set_color_srgba #

Source
set_color_srgba :: proc "c" (r: f32, g: f32, b: f32, a: f32) ---

Set the current color using sRGBA values.

set_font_size #

Source
set_font_size :: proc "c" (size: f32) ---

Set the current font size.

set_image_source_region #

Source
set_image_source_region :: proc "c" (region: rect) ---

Set the current source image region.

set_max_joint_excursion #

Source
set_max_joint_excursion :: proc "c" (maxJointExcursion: f32) ---

Set the maximum joint excursion. If a joint would extend past this threshold, the renderer falls back to a bevel joint.

set_text_flip #

Source
set_text_flip :: proc "c" (flip: bool) ---

Set the current text flip value. `true` flips the y-axis of text rendering commands.

set_tolerance #

Source
set_tolerance :: proc "c" (tolerance: f32) ---

Set the current tolerance for the line width. Bigger values increase performance but allow more inconsistent stroke widths along a path.

set_width #

Source
set_width :: proc "c" (width: f32) ---

Set the current line width.

str16_from_buffer #

Source
str16_from_buffer :: proc "c" (len: u64, buffer: [^]u16) -> str16 ---

Make an `oc_str16` string from a buffer of 16-bit characters.

str16_list_push #

Source
str16_list_push :: proc "c" (arena: ^arena, list: ^str16_list, str: str16) ---

Push a string element to the back of a string list. This creates a `oc_str16_elt` element referring to the contents of the input string, and links that element at the end of the string list.

str16_push_buffer #

Source
str16_push_buffer :: proc "c" (arena: ^arena, len: u64, buffer: [^]u16) -> str16 ---

Copy the content of a 16-bit character buffer on an arena and make a new `oc_str16` referencing the copied contents.

str16_push_copy #

Source
str16_push_copy :: proc "c" (arena: ^arena, s: str16) -> str16 ---

Copy the contents of an `oc_str16` string and make a new string referencing the copied contents.

str16_push_slice #

Source
str16_push_slice :: proc "c" (arena: ^arena, s: str16, start: u64, end: u64) -> str16 ---

Copy a slice of an `oc_str16` string an make a new string referencing the copies contents.

str16_slice #

Source
str16_slice :: proc "c" (s: str16, start: u64, end: u64) -> str16 ---

Make an `oc_str16` string from a slice of another `oc_str16` string.

str16_split #

Source
str16_split :: proc "c" (arena: ^arena, str: str16, separators: str16_list) -> str16_list ---

Split a list into a string list according to separators. No string copies are made. The elements of the resulting string list refer to subsequences of the input string.

str32_from_buffer #

Source
str32_from_buffer :: proc "c" (len: u64, buffer: [^]u32) -> str32 ---

Make an `oc_str32` string from a buffer of 32-bit characters.

str32_list_push #

Source
str32_list_push :: proc "c" (arena: ^arena, list: ^str32_list, str: str32) ---

Push a string element to the back of a string list. This creates a `oc_str32_elt` element referring to the contents of the input string, and links that element at the end of the string list.

str32_push_buffer #

Source
str32_push_buffer :: proc "c" (arena: ^arena, len: u64, buffer: [^]u32) -> str32 ---

Copy the content of a 32-bit character buffer on an arena and make a new `oc_str32` referencing the copied contents.

str32_push_copy #

Source
str32_push_copy :: proc "c" (arena: ^arena, s: str32) -> str32 ---

Copy the contents of an `oc_str32` string and make a new string referencing the copied contents.

str32_push_slice #

Source
str32_push_slice :: proc "c" (arena: ^arena, s: str32, start: u64, end: u64) -> str32 ---

Copy a slice of an `oc_str32` string an make a new string referencing the copies contents.

str32_slice #

Source
str32_slice :: proc "c" (s: str32, start: u64, end: u64) -> str32 ---

Make an `oc_str32` string from a slice of another `oc_str32` string.

str32_split #

Source
str32_split :: proc "c" (arena: ^arena, str: str32, separators: str32_list) -> str32_list ---

Split a list into a string list according to separators. No string copies are made. The elements of the resulting string list refer to subsequences of the input string.

str8_from_buffer #

Source
str8_from_buffer :: proc "c" (len: u64, buffer: [^]u8) -> string ---

Make a string from a bytes buffer and a length.

str8_list_push #

Source
str8_list_push :: proc "c" (arena: ^arena, list: ^str8_list, str: string) ---

Push a string element to the back of a string list. This creates a `oc_str8_elt` element referring to the contents of the input string, and links that element at the end of the string list.

str8_list_pushf #

Source
str8_list_pushf :: proc "c" (arena: ^arena, list: ^str8_list, format: cstring, args: ..any) ---

Build a string from a null-terminated format string an variadic arguments, and append it to a string list.

str8_push_buffer #

Source
str8_push_buffer :: proc "c" (arena: ^arena, len: u64, buffer: [^]u8) -> string ---

Pushes a copy of a buffer to an arena, and makes a string refering to that copy.

str8_push_copy #

Source
str8_push_copy :: proc "c" (arena: ^arena, s: string) -> string ---

Copy the contents of a string on an arena and make a new string referring to the copied bytes.

str8_push_cstring #

Source
str8_push_cstring :: proc "c" (arena: ^arena, str: cstring) -> string ---

Pushes a copy of a C null-terminated string to an arena, and makes a string referring to that copy.

str8_push_slice #

Source
str8_push_slice :: proc "c" (arena: ^arena, s: string, start: u64, end: u64) -> string ---

Make a copy of a string slice. This function copies a subsequence of the input string onto an arena, and returns a new string referring to the copied content.

str8_slice #

Source
str8_slice :: proc "c" (s: string, start: u64, end: u64) -> string ---

Make a string from a slice of another string. The resulting string designates some subsequence of the input string.

str8_split #

Source
str8_split :: proc "c" (arena: ^arena, str: string, separators: str8_list) -> str8_list ---

Split a list into a string list according to separators. No string copies are made. The elements of the resulting string list refer to subsequences of the input string.

str8_to_cstring #

Source
str8_to_cstring :: proc "c" (arena: ^arena, string: string) -> cstring ---

Create a null-terminated C-string from an `oc_str8` string.

surface_bring_to_front #

Source
surface_bring_to_front :: proc "c" (surface: surface) ---

Bring a surface to the foreground, rendering it on top of other surfaces.

surface_contents_scaling #

Source
surface_contents_scaling :: proc "c" (surface: surface) -> [2]f32 ---

Get the scaling factor of a surface.

surface_get_size #

Source
surface_get_size :: proc "c" (surface: surface) -> [2]f32 ---

Get a surface's size. The size is returned in device-independent "points". To get the size in pixels, multiply the size in points by the scaling factor returned by `oc_surface_contents_scaling()`.

surface_send_to_back #

Source
surface_send_to_back :: proc "c" (surface: surface) ---

Send a surface to the background, rendering it below other surfaces.

surface_set_hidden #

Source
surface_set_hidden :: proc "c" (surface: surface, hidden: bool) ---

Set the hidden status of a surface.

text_outlines #

Source
text_outlines :: proc "c" (string: string) ---

Add the outlines of a glyph run to the path, using a utf8 string.

ui_menu_bar #

Source
@(deferred_none=ui_menu_bar_end)
ui_menu_bar :: proc "contextless" (key: string) {…}

utf8_byte_count_for_codepoints #

Source
utf8_byte_count_for_codepoints :: proc "c" (codePoints: str32) -> u64 ---

Get the length of the utf8 encoding of a sequence of unicode codepoints.

utf8_codepoint_size #

Source
utf8_codepoint_size :: proc "c" (codePoint: rune) -> u32 ---

Get the size of the utf8 encoding of a codepoint.

utf8_decode_at #

Source
utf8_decode_at :: proc "c" (string: string, offset: u64) -> utf8_dec ---

Decode a codepoint at a given offset in a utf8 encoded string.

utf8_from_codepoints #

Source
utf8_from_codepoints :: proc "c" (maxBytes: u64, backing: cstring, codePoints: str32) -> string ---

Encode a string of unicode codepoints into a utf8 string using memory passed by the caller.

utf8_next_offset #

Source
utf8_next_offset :: proc "c" (string: string, byteOffset: u64) -> u64 ---

Get the offset of the next codepoint after a given offset, in a utf8 encoded string.

utf8_prev_offset #

Source
utf8_prev_offset :: proc "c" (string: string, byteOffset: u64) -> u64 ---

Get the offset of the previous codepoint before a given offset, in a utf8 encoded string.

utf8_push_from_codepoints #

Source
utf8_push_from_codepoints :: proc "c" (arena: ^arena, codePoints: str32) -> string ---

Encode a string of unicode codepoints into a utf8 string using an arena.

utf8_push_to_codepoints #

Source
utf8_push_to_codepoints :: proc "c" (arena: ^arena, string: string) -> str32 ---

Decode a utf8 encoded string to a string of unicode codepoints using an arena.

utf8_size_from_leading_char #

Source
utf8_size_from_leading_char :: proc "c" (leadingChar: u8) -> u32 ---

Get the size of a utf8-encoded codepoint for the first byte of the encoded sequence.

utf8_to_codepoints #

Source
utf8_to_codepoints :: proc "c" (maxCount: u64, backing: ^rune, string: string) -> str32 ---

Decode a utf8 string to a string of unicode codepoints using memory passed by the caller.

window_set_size #

Source
window_set_size :: proc "c" (size: [2]f32) ---

Set the size of the application's window.

window_set_title #

Source
window_set_title :: proc "c" (title: string) ---

Set the title of the application's window.