package core:sys/orca

Warning: This was generated for -target:windows_amd64 and might not represent every target this package supports.

⌘K
Ctrl+K
or
/

    External Examples 3 ¶

    The programs in odin-lang/examples about this package, and how many of its declarations each uses.

    Index

    Types (115)
    Constants (125)
    Variables (0)

    This section is empty.

    Procedures (384)
    Procedure Groups (0)

    This section is empty.

    Types

    arena_chunk ¶

    arena_chunk :: struct {
    	listElt:   list_elt,
    	ptr:       cstring,
    	offset:    u64,
    	committed: u64,
    	cap:       u64,
    }
     

    A contiguous chunk of memory managed by a memory arena.

    arena_options ¶

    arena_options :: struct {
    	// The base allocator to use with this arena
    	base:    ^base_allocator,
    	// The amount of memory to reserve up-front when creating the arena.
    	reserve: u64,
    }
     

    Options for arena creation.

    arena_scope ¶

    arena_scope :: struct {
    	// The arena which offset is stored.
    	arena:  ^arena,
    	// The arena chunk to which the offset belongs.
    	chunk:  ^arena_chunk,
    	// The offset to rewind the arena to.
    	offset: u64,
    }
     

    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

    Related Procedures With Returns

    base_allocator ¶

    base_allocator :: struct {
    	// A procedure to reserve memory from the system.
    	reserve:  mem_reserve_proc,
    	// A procedure to commit memory from the system.
    	commit:   mem_modify_proc,
    	// A procedure to decommit memory from the system.
    	decommit: mem_modify_proc,
    	// A procedure to release memory previously reserved from the system.
    	release:  mem_modify_proc,
    }
     

    A structure that defines how to allocate memory from the system.

    canvas_context ¶

    canvas_context :: distinct u64
     

    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().

    External examples orca/breakout · orca/clock · orca/ui

    Related Procedures With Parameters

    Related Procedures With Returns

    canvas_renderer ¶

    canvas_renderer :: distinct u64
     

    An opaque handle representing a rendering engine for the canvas API.

    External examples orca/breakout · orca/clock · orca/ui

    Related Procedures With Parameters

    Related Procedures With Returns

    cap_type ¶

    cap_type :: enum u32 {
    	// Don't draw caps.
    	NONE   = 0, 
    	// Square caps.
    	SQUARE = 1, 
    }
     

    Cap types.

    char_event ¶

    char_event :: struct {
    	// The unicode codepoint of the character.
    	codepoint: rune,
    	// The utf8 sequence of the character.
    	sequence:  [8]u8,
    	// The utf8 sequence length.
    	seqLen:    u8,
    }
     

    A structure describing a character input event.

    clipboard_state ¶

    clipboard_state :: struct {
    	lastUpdate: u64,
    	pastedText: string,
    }

    clock_kind ¶

    clock_kind :: enum u32 {
    	// A clock incrementing monotonically.
    	MONOTONIC = 0, 
    	// A clock incrementing monotonically during uptime.
    	UPTIME    = 1, 
    	// A clock driven by the platform time.
    	DATE      = 2, 
    }

    color ¶

    color :: struct {
    	using c:    [4]f32,
    	colorSpace: color_space,
    }
     

    A struct representing a color.

    External examples orca/breakout · orca/ui

    Related Procedures With Parameters

    Related Procedures With Returns

    color_space ¶

    color_space :: enum u32 {
    	// A linear RGB color space.
    	RGB  = 0, 
    	// An sRGB color space.
    	SRGB = 1, 
    }
     

    An enum identifying possible color spaces.

    datestamp ¶

    datestamp :: struct {
    	seconds:  i64,
    	fraction: u64,
    }

    event ¶

    event :: struct {
    	// The window in which this event happened.
    	window: window,
    	// The type of the event. This determines which member of the event union is active.
    	type:   event_type,
    	using _: struct #raw_union {
    		key:       key_event,
    		character: char_event,
    		mouse:     mouse_event,
    		move:      move_event,
    		paths:     str8_list,
    	},
    }
     

    A structure describing an event sent to the application.

    External examples orca/ui

    Related Procedures With Parameters

    event_type ¶

    event_type :: enum u32 {
    	// No event. That could be used simply to wake up the application.
    	NONE            = 0, 
    	// A modifier key event. This event is sent when a key such as <kbd>Alt</kbd>, <kbd>Control</kbd>, <kbd>Command</kbd> or <kbd>Shift</kbd> are pressed, released, or repeated. The `key` field contains the event's details.
    	KEYBOARD_MODS   = 1, 
    	// A key event. This event is sent when a normal key is pressed, released, or repeated. The `key` field contains the event's details.
    	KEYBOARD_KEY    = 2, 
    	// A character input event. This event is sent when an input character is produced by the keyboard. The `character` field contains the event's details.
    	KEYBOARD_CHAR   = 3, 
    	// A mouse button event. This is event sent when one of the mouse buttons is pressed, released, or clicked. The `key` field contains the event's details.
    	MOUSE_BUTTON    = 4, 
    	// A mouse move event. This is event sent when the mouse is moved. The `mouse` field contains the event's details.
    	MOUSE_MOVE      = 5, 
    	// A mouse wheel event. This is event sent when the mouse wheel is moved (or when a trackpad is scrolled). The `mouse` field contains the event's details.
    	MOUSE_WHEEL     = 6, 
    	// A mouse enter event. This event is sent when the mouse enters the application's window. The `mouse` field contains the event's details.
    	MOUSE_ENTER     = 7, 
    	// A mouse leave event. This event is sent when the mouse leaves the application's window.
    	MOUSE_LEAVE     = 8, 
    	// A clipboard paste event. This event is sent when the user uses the paste shortcut while the application window has focus.
    	CLIPBOARD_PASTE = 9, 
    	// A resize event. This event is sent when the application's window is resized. The `move` field contains the event's details.
    	WINDOW_RESIZE   = 10, 
    	// A move event. This event is sent when the window is moved. The `move` field contains the event's details.
    	WINDOW_MOVE     = 11, 
    	// A focus event. This event is sent when the application gains focus.
    	WINDOW_FOCUS    = 12, 
    	// An unfocus event. This event is sent when the application looses focus.
    	WINDOW_UNFOCUS  = 13, 
    	// A hide event. This event is sent when the application's window is hidden or minimized.
    	WINDOW_HIDE     = 14, 
    	// A show event. This event is sent when the application's window is shown or de-minimized.
    	WINDOW_SHOW     = 15, 
    	// A close event. This event is sent when the window is about to be closed.
    	WINDOW_CLOSE    = 16, 
    	// A path drop event. This event is sent when the user drops files onto the application's window. The `paths` field contains the event's details.
    	PATHDROP        = 17, 
    	// A frame event. This event is sent when the application should render a frame.
    	FRAME           = 18, 
    	// A quit event. This event is sent when the application has been requested to quit.
    	QUIT            = 19, 
    }
     

    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_access_flag ¶

    file_access_flag :: enum u16 {
    	// The file handle can be used for reading from the file.
    	READ  = 0, 
    	// The file handle can be used for writing to the file.
    	WRITE, 
    }
     

    This enum describes the access permissions of a file handle.

    file_dialog_button ¶

    file_dialog_button :: enum u32 {
    	// The user clicked the "Cancel" button, or closed the dialog box.
    	CANCEL = 0, 
    	// The user clicked the "OK" button.
    	OK     = 1, 
    }
     

    An enum identifying the button clicked by the user when a file dialog returns.

    file_dialog_desc ¶

    file_dialog_desc :: struct {
    	// The kind of file dialog, see `oc_file_dialog_kind`.
    	kind:      file_dialog_kind,
    	// A combination of file dialog flags used to enable file dialog options.
    	flags:     bit_set[file_dialog_flag; u32],
    	// The title of the dialog, displayed in the dialog title bar.
    	title:     string,
    	// Optional. The label of the OK button, e.g. "Save" or "Open".
    	okLabel:   string,
    	// Optional. A file handle to the root directory for the dialog. If set to zero, the root directory is the application's default data directory.
    	startAt:   file,
    	// Optional. The path of the starting directory of the dialog, relative to its root directory. If set to nil, the dialog starts at its root directory.
    	startPath: string,
    	// A list of file extensions used to restrict which files can be selected in this dialog. An empty list allows all files to be selected. Extensions should be provided without a leading dot.
    	filters:   str8_list,
    }
     

    A structure describing a file dialog.

    file_dialog_flag ¶

    file_dialog_flag :: enum u32 {
    	// This dialog allows selecting files.
    	FILES              = 0, 
    	// This dialog allows selecting directories.
    	DIRECTORIES, 
    	// This dialog allows selecting multiple items.
    	MULTIPLE, 
    	// This dialog allows creating directories.
    	CREATE_DIRECTORIES, 
    }
     

    A type for flags describing various file dialog options. File dialog flags.

    file_dialog_kind ¶

    file_dialog_kind :: enum u32 {
    	// The file dialog is a save dialog.
    	SAVE = 0, 
    	// The file dialog is an open dialog.
    	OPEN = 1, 
    }
     

    This enum describes the kinds of possible file dialogs.

    file_dialog_result ¶

    file_dialog_result :: struct {
    	// The button clicked by the user.
    	button:    file_dialog_button,
    	// The path that was selected when the user clicked the OK button. If the dialog box had the `OC_FILE_DIALOG_MULTIPLE` flag set, this is the first file of the list of selected paths.
    	path:      string,
    	// If the dialog box had the `OC_FILE_DIALOG_MULTIPLE` flag set and the user clicked the OK button, this list contains the selected paths.
    	selection: str8_list,
    }
     

    A structure describing the result of a file dialog.

    file_list ¶

    file_list :: struct {
    	list:     list,
    	eltCount: u64,
    }
     

    An type describing a list of enumerated files in a given directory.

    file_listdir_elt ¶

    file_listdir_elt :: struct {
    	listElt:  list_elt,
    	basename: string,
    	type:     file_type,
    }

    file_open_flag ¶

    file_open_flag :: enum u16 {
    	// Open the file in 'append' mode. All writes append data at the end of the file.
    	APPEND    = 0, 
    	// Truncate the file to 0 bytes when opening.
    	TRUNCATE, 
    	// Create the file if it does not exist.
    	CREATE, 
    	// If the file is a symlink, open the symlink itself instead of following it.
    	SYMLINK, 
    	// If the file is a symlink, the call to open will fail.
    	NO_FOLLOW, 
    	// Reserved.
    	RESTRICT, 
    }
     

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

    file_open_with_dialog_elt ¶

    file_open_with_dialog_elt :: struct {
    	listElt: list_elt,
    	file:    file,
    }
     

    An element of a list of file handles acquired through a file dialog.

    file_open_with_dialog_result ¶

    file_open_with_dialog_result :: struct {
    	// The button of the file dialog clicked by the user.
    	button:    file_dialog_button,
    	// The file that was opened through the dialog. If the dialog had the `OC_FILE_DIALOG_MULTIPLE` flag set, this is equal to the first handle in the `selection` list.
    	file:      file,
    	// If the dialog had the `OC_FILE_DIALOG_MULTIPLE` flag set, this list of `oc_file_open_with_dialog_elt` contains the handles of the opened files.
    	selection: list,
    }
     

    A structure describing the result of a call to oc_file_open_with_dialog().

    file_perm_flag ¶

    file_perm_flag :: enum u16 {
    	OTHER_EXEC  = 0, 
    	OTHER_WRITE, 
    	OTHER_READ, 
    	GROUP_EXEC, 
    	GROUP_WRITE, 
    	GROUP_READ, 
    	OWNER_EXEC, 
    	OWNER_WRITE, 
    	OWNER_READ, 
    	STICKY_BIT, 
    	SET_GID, 
    	SET_UID, 
    }
     

    A type describing file permissions.

    file_status ¶

    file_status :: struct {
    	uid:              u64,
    	type:             file_type,
    	perm:             bit_set[file_perm_flag; u16],
    	size:             u64,
    	creationDate:     datestamp,
    	accessDate:       datestamp,
    	modificationDate: datestamp,
    }

    file_type ¶

    file_type :: enum u32 {
    	// The file is of unknown type.
    	UNKNOWN   = 0, 
    	// The file is a regular file.
    	REGULAR   = 1, 
    	// The file is a directory.
    	DIRECTORY = 2, 
    	// The file is a symbolic link.
    	SYMLINK   = 3, 
    	// The file is a block device.
    	BLOCK     = 4, 
    	// The file is a character device.
    	CHARACTER = 5, 
    	// The file is a FIFO pipe.
    	FIFO      = 6, 
    	// The file is a socket.
    	SOCKET    = 7, 
    }
     

    An enum identifying the type of a file.

    file_whence ¶

    file_whence :: enum u32 {
    	// Set the file position relative to the beginning of the file.
    	SET     = 0, 
    	// Set the file position relative to the end of the file.
    	END     = 1, 
    	// Set the file position relative to the current position.
    	CURRENT = 2, 
    }
     

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

    font_metrics ¶

    font_metrics :: struct {
    	// The ascent from the baseline to the top of the line (a positive value means the top line is above the baseline). 
    	ascent:    f32,
    	// The descent from the baseline to the bottom line (a positive value means the bottom line is below the baseline). 
    	descent:   f32,
    	// The gap between two lines of text.
    	lineGap:   f32,
    	// The height of the lowercase character 'x'.
    	xHeight:   f32,
    	// The height of capital letters.
    	capHeight: f32,
    	// The maximum character width.
    	width:     f32,
    }
     

    A struct describing the metrics of a font.

    Related Procedures With Returns

    glyph_metrics ¶

    glyph_metrics :: struct {
    	ink:     rect,
    	// The default amount from which to advance the cursor after drawing this glyph.
    	advance: [2]f32,
    }
     

    A struct describing the metrics of a single glyph.

    gradient_blend_space ¶

    gradient_blend_space :: enum u32 {
    	// The gradient colors are interpolated in linear space.
    	LINEAR = 0, 
    	// The gradient colors are interpolated in sRGB space.
    	SRGB   = 1, 
    }
     

    This enum describes possible blending modes for color gradient.

    image_region ¶

    image_region :: struct {
    	// The image handle.
    	image: image,
    	// The rectangular region of the image.
    	rect:  rect,
    }
     

    A struct describing a rectangular sub-region of an image.

    Related Procedures With Returns

    io_cmp ¶

    io_cmp :: struct {
    	// The request ID as passed in the `oc_io_req` request that generated this completion.
    	id:    u64,
    	// The error value for the operation.
    	error: io_error,
    	using _: struct #raw_union {
    		result: i64,
    		size:   u64,
    		offset: i64,
    		handle: file,
    	},
    }
     

    A structure describing the completion of an I/O operation.

    io_error ¶

    io_error :: enum u32 {
    	// No error.
    	OK          = 0, 
    	// An unexpected error happened.
    	UNKNOWN     = 1, 
    	// The request had an invalid operation.
    	OP          = 2, 
    	// The request had an invalid handle.
    	HANDLE      = 3, 
    	// The operation was not carried out because the file handle has previous errors.
    	PREV        = 4, 
    	// The request contained wrong arguments.
    	ARG         = 5, 
    	// The operation requires permissions that the file handle doesn't have.
    	PERM        = 6, 
    	// The operation couldn't complete due to a lack of space in the result buffer.
    	SPACE       = 7, 
    	// One of the directory in the path does not exist or couldn't be traversed.
    	NO_ENTRY    = 8, 
    	// The file already exists.
    	EXISTS      = 9, 
    	// The file is not a directory.
    	NOT_DIR     = 10, 
    	// The file is a directory.
    	DIR         = 11, 
    	// There are too many opened files.
    	MAX_FILES   = 12, 
    	// The path contains too many symbolic links (this may be indicative of a symlink loop).
    	MAX_LINKS   = 13, 
    	// The path is too long.
    	PATH_LENGTH = 14, 
    	// The file is too large.
    	FILE_SIZE   = 15, 
    	// The file is too large to be opened.
    	OVERFLOW    = 16, 
    	// The file is locked or the device on which it is stored is not ready.
    	NOT_READY   = 17, 
    	// The system is out of memory.
    	MEM         = 18, 
    	// The operation was interrupted by a signal.
    	INTERRUPT   = 19, 
    	// A physical error happened.
    	PHYSICAL    = 20, 
    	// The device on which the file is stored was not found.
    	NO_DEVICE   = 21, 
    	// One element along the path is outside the root directory subtree.
    	WALKOUT     = 22, 
    }
     

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

    io_op ¶

    io_op :: enum u32 {
    	// ['Open a file at a path relative to a given root directory.', '', "    - `handle` is the handle to the root directory. If it is nil, the application's default directory is used.", '    - `size` is the size of the path, in bytes.', '    - `buffer` points to an array containing the path of the file to open, relative to the directory identified by `handle`.', '    - `open` contains the permissions and flags for the open operation.']
    	OPEN_AT        = 0, 
    	// ['Close a file handle.', '', '    - `handle` is the handle to close.']
    	CLOSE          = 1, 
    	// ['Get status information for a file handle.', '', '    - `handle` is the handle to stat.', '    - `size` is the size of the result buffer. It should be at least `sizeof(oc_file_status)`.', '    - `buffer` is the result buffer.']
    	FSTAT          = 2, 
    	// ['Move the file position in a file.', '', '    - `handle` is the handle of the file.', '    - `offset` specifies the offset of the new position, relative to the base position specified by `whence`.', '    - `whence` determines the base position for the seek operation.']
    	SEEK           = 3, 
    	// ['Read data from a file.', '', '    - `handle` is the handle of the file.', '    - `size` is the number of bytes to read.', '    - `buffer` is the result buffer. It should be big enough to hold `size` bytes.']
    	READ           = 4, 
    	// ['Write data to a file.', '', '    - `handle` is the handle of the file.', '    - `size` is the number of bytes to write.', '    - `buffer` contains the data to write to the file.']
    	WRITE          = 5, 
    	// ['Get the error attached to a file handle.', '', '    - `handle` is the handle of the file.']
    	OC_OC_IO_ERROR = 6, 
    }
     

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

    io_req ¶

    io_req :: struct {
    	// An identifier for the request. You can set this to any value you want. It is passed back in the `oc_io_cmp` completion and can be used to match requests and completions.
    	id:     u64,
    	// The requested operation.
    	op:     io_op,
    	// A file handle used by some operations.
    	handle: file,
    	// An offset used by some operations.
    	offset: i64,
    	// A size indicating the capacity of the buffer pointed to by `buffer`, in bytes.
    	size:   u64,
    	using _: struct #raw_union {
    		buffer: [^]u8,
    		unused: u64,
    	},
    	using _: struct #raw_union {
    		using open: struct {
    			// The access permissions requested on the file to open.
    			rights: bit_set[file_access_flag; u16],
    			// The options to use when opening the file.
    			flags:  bit_set[file_open_flag; u16],
    		},
    		whence: file_whence,
    	},
    }
     

    A structure describing an I/O request.

    joint_type ¶

    joint_type :: enum u32 {
    	// Miter joint.
    	MITER = 0, 
    	// Bevel joint.
    	BEVEL = 1, 
    	// Don't join path segments.
    	NONE  = 2, 
    }
     

    Stroke joint types.

    key_action ¶

    key_action :: enum u32 {
    	// No action happened on that key.
    	NO_ACTION = 0, 
    	// The key was pressed.
    	PRESS     = 1, 
    	// The key was released.
    	RELEASE   = 2, 
    	// The key was maintained pressed at least for the system's key repeat period.
    	REPEAT    = 3, 
    }
     

    This enum describes the actions that can happen to a key.

    key_code ¶

    key_code :: enum u32 {
    	UNKNOWN       = 0, 
    	SPACE         = 32, 
    	APOSTROPHE    = 39, 
    	COMMA         = 44, 
    	MINUS         = 45, 
    	PERIOD        = 46, 
    	SLASH         = 47, 
    	_0            = 48, 
    	_1            = 49, 
    	_2            = 50, 
    	_3            = 51, 
    	_4            = 52, 
    	_5            = 53, 
    	_6            = 54, 
    	_7            = 55, 
    	_8            = 56, 
    	_9            = 57, 
    	SEMICOLON     = 59, 
    	EQUAL         = 61, 
    	LEFT_BRACKET  = 91, 
    	BACKSLASH     = 92, 
    	RIGHT_BRACKET = 93, 
    	GRAVE_ACCENT  = 96, 
    	A             = 97, 
    	B             = 98, 
    	C             = 99, 
    	D             = 100, 
    	E             = 101, 
    	F             = 102, 
    	G             = 103, 
    	H             = 104, 
    	I             = 105, 
    	J             = 106, 
    	K             = 107, 
    	L             = 108, 
    	M             = 109, 
    	N             = 110, 
    	O             = 111, 
    	P             = 112, 
    	Q             = 113, 
    	R             = 114, 
    	S             = 115, 
    	T             = 116, 
    	U             = 117, 
    	V             = 118, 
    	W             = 119, 
    	X             = 120, 
    	Y             = 121, 
    	Z             = 122, 
    	WORLD_1       = 161, 
    	WORLD_2       = 162, 
    	ESCAPE        = 256, 
    	ENTER         = 257, 
    	TAB           = 258, 
    	BACKSPACE     = 259, 
    	INSERT        = 260, 
    	DELETE        = 261, 
    	RIGHT         = 262, 
    	LEFT          = 263, 
    	DOWN          = 264, 
    	UP            = 265, 
    	PAGE_UP       = 266, 
    	PAGE_DOWN     = 267, 
    	HOME          = 268, 
    	END           = 269, 
    	CAPS_LOCK     = 280, 
    	SCROLL_LOCK   = 281, 
    	NUM_LOCK      = 282, 
    	PRINT_SCREEN  = 283, 
    	PAUSE         = 284, 
    	F1            = 290, 
    	F2            = 291, 
    	F3            = 292, 
    	F4            = 293, 
    	F5            = 294, 
    	F6            = 295, 
    	F7            = 296, 
    	F8            = 297, 
    	F9            = 298, 
    	F10           = 299, 
    	F11           = 300, 
    	F12           = 301, 
    	F13           = 302, 
    	F14           = 303, 
    	F15           = 304, 
    	F16           = 305, 
    	F17           = 306, 
    	F18           = 307, 
    	F19           = 308, 
    	F20           = 309, 
    	F21           = 310, 
    	F22           = 311, 
    	F23           = 312, 
    	F24           = 313, 
    	F25           = 314, 
    	KP_0          = 320, 
    	KP_1          = 321, 
    	KP_2          = 322, 
    	KP_3          = 323, 
    	KP_4          = 324, 
    	KP_5          = 325, 
    	KP_6          = 326, 
    	KP_7          = 327, 
    	KP_8          = 328, 
    	KP_9          = 329, 
    	KP_DECIMAL    = 330, 
    	KP_DIVIDE     = 331, 
    	KP_MULTIPLY   = 332, 
    	KP_SUBTRACT   = 333, 
    	KP_ADD        = 334, 
    	KP_ENTER      = 335, 
    	KP_EQUAL      = 336, 
    	LEFT_SHIFT    = 340, 
    	LEFT_CONTROL  = 341, 
    	LEFT_ALT      = 342, 
    	LEFT_SUPER    = 343, 
    	RIGHT_SHIFT   = 344, 
    	RIGHT_CONTROL = 345, 
    	RIGHT_ALT     = 346, 
    	RIGHT_SUPER   = 347, 
    	MENU          = 348, 
    	COUNT         = 349, 
    }
     

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

    External examples orca/breakout

    Related Procedures With Parameters

    key_event ¶

    key_event :: struct {
    	// The action that was done on the key.
    	action:     key_action,
    	// The scan code of the key. Only valid for key events.
    	scanCode:   scan_code,
    	// The key code of the key. Only valid for key events.
    	keyCode:    key_code,
    	// The button of the mouse. Only valid for mouse button events.
    	button:     mouse_button,
    	// Modifier flags indicating which modifier keys where pressed at the time of the event.
    	mods:       bit_set[keymod_flag; u32],
    	// The number of clicks that where detected for the button. Only valid for mouse button events.
    	clickCount: u8,
    }
     

    A structure describing a key event or a mouse button event.

    key_state ¶

    key_state :: struct {
    	lastUpdate:       u64,
    	transitionCount:  u32,
    	repeatCount:      u32,
    	down:             bool,
    	sysClicked:       bool,
    	sysDoubleClicked: bool,
    	sysTripleClicked: bool,
    }

    keyboard_state ¶

    keyboard_state :: struct {
    	keys: [349]key_state,
    	mods: bit_set[keymod_flag; u32],
    }

    keymod_flag ¶

    keymod_flag :: enum u32 {
    	ALT           = 0, 
    	SHIFT, 
    	CTRL, 
    	CMD, 
    	MAIN_MODIFIER, 
    }

    keymod_flags ¶

    keymod_flags :: bit_set[keymod_flag; u32]

    list ¶

    list :: struct {
    	// Points to the first element in the list.
    	first: ^list_elt,
    	// Points to the last element in the list.
    	last:  ^list_elt,
    }
     

    A doubly-linked list.

    Related Procedures With Parameters

    list_elt ¶

    list_elt :: struct {
    	// Points to the previous element in the list.
    	prev: ^list_elt,
    	// Points to the next element in the list.
    	next: ^list_elt,
    }
     

    An element of an intrusive doubly-linked list.

    External examples orca/ui

    Related Procedures With Parameters

    Related Procedures With Returns

    log_level ¶

    log_level :: enum u32 {
    	// Only errors are logged.
    	ERROR   = 0, 
    	// Only warnings and errors are logged.
    	WARNING = 1, 
    	// All messages are logged.
    	INFO    = 2, 
    	COUNT   = 3, 
    }
     

    Constants allowing to specify the level of logging verbosity.

    Related Procedures With Parameters

    mat2x3 ¶

    mat2x3 :: [6]f32
     

    A 2-by-3 matrix.

    External examples orca/breakout · orca/clock

    Related Procedures With Parameters

    Related Procedures With Returns

    mem_modify_proc ¶

    mem_modify_proc :: proc "c" (_context: ^base_allocator, ptr: rawptr, size: u64)
     

    The prototype of a procedure to modify a memory reservation.

    mem_reserve_proc ¶

    mem_reserve_proc :: proc "c" (_context: ^base_allocator, size: u64) -> rawptr
     

    The prototype of a procedure to reserve memory from the system.

    mouse_button ¶

    mouse_button :: enum u32 {
    	LEFT         = 0, 
    	RIGHT        = 1, 
    	MIDDLE       = 2, 
    	EXT1         = 3, 
    	EXT2         = 4, 
    	BUTTON_COUNT = 5, 
    }
     

    A code identifying a mouse button.

    Related Procedures With Parameters

    mouse_event ¶

    mouse_event :: struct {
    	// The x coordinate of the mouse.
    	x:      f32,
    	// The y coordinate of the mouse.
    	y:      f32,
    	// The delta from the last x coordinate of the mouse, or the scroll value along the x coordinate.
    	deltaX: f32,
    	// The delta from the last y coordinate of the mouse, or the scoll value along the y  coordinate.
    	deltaY: f32,
    	// Modifier flags indicating which modifier keys where pressed at the time of the event.
    	mods:   bit_set[keymod_flag; u32],
    }
     

    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.

    mouse_state ¶

    mouse_state :: struct {
    	lastUpdate: u64,
    	posValid:   bool,
    	pos:        [2]f32,
    	delta:      [2]f32,
    	wheel:      [2]f32,
    	using _:    struct #raw_union {
    		buttons: [5]key_state,
    		using _: struct {
    			left:   key_state,
    			right:  key_state,
    			middle: key_state,
    			ext1:   key_state,
    			ext2:   key_state,
    		},
    	},
    }

    move_event ¶

    move_event :: struct {
    	// The position and dimension of the frame rectangle, i.e. including the window title bar and border.
    	frame:   rect,
    	// The position and dimension of the content rectangle, relative to the frame rectangle.
    	content: rect,
    }
     

    A structure describing a window move or resize event.

    pool ¶

    pool :: struct {
    	arena:     arena,
    	freeList:  list,
    	blockSize: u64,
    }
     

    currently missing in the api.json

    rect ¶

    rect :: struct {
    	x: f32,
    	y: f32,
    	w: f32,
    	h: f32,
    }
     

    An axis-aligned rectangle.

    External examples orca/breakout

    Related Procedures With Parameters

    Related Procedures With Returns

    rect_atlas ¶

    rect_atlas :: struct {}
     

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

    Related Procedures With Parameters

    scan_code ¶

    scan_code :: enum u32 {
    	UNKNOWN       = 0, 
    	SPACE         = 32, 
    	APOSTROPHE    = 39, 
    	COMMA         = 44, 
    	MINUS         = 45, 
    	PERIOD        = 46, 
    	SLASH         = 47, 
    	_0            = 48, 
    	_1            = 49, 
    	_2            = 50, 
    	_3            = 51, 
    	_4            = 52, 
    	_5            = 53, 
    	_6            = 54, 
    	_7            = 55, 
    	_8            = 56, 
    	_9            = 57, 
    	SEMICOLON     = 59, 
    	EQUAL         = 61, 
    	LEFT_BRACKET  = 91, 
    	BACKSLASH     = 92, 
    	RIGHT_BRACKET = 93, 
    	GRAVE_ACCENT  = 96, 
    	A             = 97, 
    	B             = 98, 
    	C             = 99, 
    	D             = 100, 
    	E             = 101, 
    	F             = 102, 
    	G             = 103, 
    	H             = 104, 
    	I             = 105, 
    	J             = 106, 
    	K             = 107, 
    	L             = 108, 
    	M             = 109, 
    	N             = 110, 
    	O             = 111, 
    	P             = 112, 
    	Q             = 113, 
    	R             = 114, 
    	S             = 115, 
    	T             = 116, 
    	U             = 117, 
    	V             = 118, 
    	W             = 119, 
    	X             = 120, 
    	Y             = 121, 
    	Z             = 122, 
    	WORLD_1       = 161, 
    	WORLD_2       = 162, 
    	ESCAPE        = 256, 
    	ENTER         = 257, 
    	TAB           = 258, 
    	BACKSPACE     = 259, 
    	INSERT        = 260, 
    	DELETE        = 261, 
    	RIGHT         = 262, 
    	LEFT          = 263, 
    	DOWN          = 264, 
    	UP            = 265, 
    	PAGE_UP       = 266, 
    	PAGE_DOWN     = 267, 
    	HOME          = 268, 
    	END           = 269, 
    	CAPS_LOCK     = 280, 
    	SCROLL_LOCK   = 281, 
    	NUM_LOCK      = 282, 
    	PRINT_SCREEN  = 283, 
    	PAUSE         = 284, 
    	F1            = 290, 
    	F2            = 291, 
    	F3            = 292, 
    	F4            = 293, 
    	F5            = 294, 
    	F6            = 295, 
    	F7            = 296, 
    	F8            = 297, 
    	F9            = 298, 
    	F10           = 299, 
    	F11           = 300, 
    	F12           = 301, 
    	F13           = 302, 
    	F14           = 303, 
    	F15           = 304, 
    	F16           = 305, 
    	F17           = 306, 
    	F18           = 307, 
    	F19           = 308, 
    	F20           = 309, 
    	F21           = 310, 
    	F22           = 311, 
    	F23           = 312, 
    	F24           = 313, 
    	F25           = 314, 
    	KP_0          = 320, 
    	KP_1          = 321, 
    	KP_2          = 322, 
    	KP_3          = 323, 
    	KP_4          = 324, 
    	KP_5          = 325, 
    	KP_6          = 326, 
    	KP_7          = 327, 
    	KP_8          = 328, 
    	KP_9          = 329, 
    	KP_DECIMAL    = 330, 
    	KP_DIVIDE     = 331, 
    	KP_MULTIPLY   = 332, 
    	KP_SUBTRACT   = 333, 
    	KP_ADD        = 334, 
    	KP_ENTER      = 335, 
    	KP_EQUAL      = 336, 
    	LEFT_SHIFT    = 340, 
    	LEFT_CONTROL  = 341, 
    	LEFT_ALT      = 342, 
    	LEFT_SUPER    = 343, 
    	RIGHT_SHIFT   = 344, 
    	RIGHT_CONTROL = 345, 
    	RIGHT_ALT     = 346, 
    	RIGHT_SUPER   = 347, 
    	MENU          = 348, 
    	COUNT         = 349, 
    }
     

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

    External examples orca/breakout

    Related Procedures With Parameters

    str16 ¶

    str16 :: distinct []u16
     

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

    Related Procedures With Parameters

    Related Procedures With Returns

    str16_elt ¶

    str16_elt :: struct {
    	// The string element is linked into its parent string list through this field.
    	listElt: list_elt,
    	// The string for this element.
    	string:  str16,
    }
     

    A type representing an element of an oc_str16 list.

    str16_list ¶

    str16_list :: struct {
    	// A linked-list of `oc_str16_elt`.
    	list:     list,
    	// The number of elements in `list`.
    	eltCount: u64,
    	// The total length of the string list, which is the sum of the lengths over all elements.
    	len:      u64,
    }

    Related Procedures With Parameters

    str32_elt ¶

    str32_elt :: struct {
    	// The string element is linked into its parent string list through this field.
    	listElt: list_elt,
    	// The string for this element.
    	string:  str32,
    }
     

    A type representing an element of an oc_str32 list.

    str32_list ¶

    str32_list :: struct {
    	// A linked-list of `oc_str16_elt`.
    	list:     list,
    	// The number of elements in `list`.
    	eltCount: u64,
    	// The total length of the string list, which is the sum of the lengths over all elements.
    	len:      u64,
    }

    Related Procedures With Parameters

    str8 ¶

    str8 :: string
     

    A type representing a string of bytes.

    External examples orca/ui

    Related Procedures With Parameters

    Related Procedures With Returns

    str8_elt ¶

    str8_elt :: struct {
    	// The string element is linked into its parent string list through this field.
    	listElt: list_elt,
    	// The string for this element.
    	string:  string,
    }
     

    A type representing an element of a string list.

    External examples orca/ui

    str8_list ¶

    str8_list :: struct {
    	// A linked-list of `oc_str16_elt`.
    	list:     list,
    	// The number of elements in `list`.
    	eltCount: u64,
    	// The total length of the string list, which is the sum of the lengths over all elements.
    	len:      u64,
    }
     

    A type representing a string list.

    External examples orca/ui

    Related Procedures With Parameters

    text_metrics ¶

    text_metrics :: struct {
    	// The bounding box of the inked portion of the text.
    	ink:     rect,
    	// The logical bounding box of the text (including ascents, descents, and line gaps).
    	logical: rect,
    	// The amount from which to advance the cursor after drawing the text.
    	advance: [2]f32,
    }
     

    A struct describing the metrics of a run of glyphs.

    Related Procedures With Returns

    text_state ¶

    text_state :: struct {
    	lastUpdate: u64,
    	backing:    [64]rune,
    	codePoints: str32,
    }

    ui_align ¶

    ui_align :: enum u32 {
    	START  = 0, 
    	END    = 1, 
    	CENTER = 2, 
    }

    ui_attribute ¶

    ui_attribute :: enum u32 {
    	WIDTH           = 0, 
    	HEIGHT          = 1, 
    	AXIS            = 2, 
    	MARGIN_X        = 3, 
    	MARGIN_Y        = 4, 
    	SPACING         = 5, 
    	ALIGN_X         = 6, 
    	ALIGN_Y         = 7, 
    	FLOATING_X      = 8, 
    	FLOATING_Y      = 9, 
    	FLOAT_TARGET_X  = 10, 
    	FLOAT_TARGET_Y  = 11, 
    	OVERFLOW_X      = 12, 
    	OVERFLOW_Y      = 13, 
    	CONSTRAIN_X     = 14, 
    	CONSTRAIN_Y     = 15, 
    	COLOR           = 16, 
    	BG_COLOR        = 17, 
    	BORDER_COLOR    = 18, 
    	FONT            = 19, 
    	TEXT_SIZE       = 20, 
    	BORDER_SIZE     = 21, 
    	ROUNDNESS       = 22, 
    	DRAW_MASK       = 23, 
    	ANIMATION_TIME  = 24, 
    	ANIMATION_MASK  = 25, 
    	CLICK_THROUGH   = 26, 
    	ATTRIBUTE_COUNT = 27, 
    }

    Related Procedures With Parameters

    ui_attribute_mask ¶

    ui_attribute_mask :: enum u32 {
    	NONE            = 0, 
    	SIZE_WIDTH      = 1, 
    	SIZE_HEIGHT     = 2, 
    	LAYOUT_AXIS     = 4, 
    	LAYOUT_MARGIN_X = 8, 
    	LAYOUT_MARGIN_Y = 16, 
    	LAYOUT_SPACING  = 32, 
    	LAYOUT_ALIGN_X  = 64, 
    	LAYOUT_ALIGN_Y  = 128, 
    	FLOATING_X      = 256, 
    	FLOATING_Y      = 512, 
    	FLOAT_TARGET_X  = 1024, 
    	FLOAT_TARGET_Y  = 2048, 
    	OVERFLOW_X      = 4096, 
    	OVERFLOW_Y      = 8192, 
    	CONSTRAIN_X     = 16384, 
    	CONSTRAIN_Y     = 32768, 
    	COLOR           = 65536, 
    	BG_COLOR        = 131072, 
    	BORDER_COLOR    = 262144, 
    	FONT            = 524288, 
    	FONT_SIZE       = 1048576, 
    	BORDER_SIZE     = 2097152, 
    	ROUNDNESS       = 4194304, 
    	DRAW_MASK       = 8388608, 
    	ANIMATION_TIME  = 16777216, 
    	ANIMATION_MASK  = 33554432, 
    	CLICK_THROUGH   = 67108864, 
    }

    ui_axis ¶

    ui_axis :: enum u32 {
    	X     = 0, 
    	Y     = 1, 
    	COUNT = 2, 
    }

    ui_box ¶

    ui_box :: struct {
    	listElt:          list_elt,
    	children:         list,
    	parent:           ^ui_box,
    	overlayElt:       list_elt,
    	overlay:          bool,
    	bucketElt:        list_elt,
    	key:              ui_key,
    	frameCounter:     u64,
    	keyString:        string,
    	text:             string,
    	tags:             list,
    	drawProc:         ui_box_draw_proc,
    	drawData:         rawptr,
    	rules:            list,
    	targetStyle:      ^ui_style,
    	style:            ui_style,
    	z:                u32,
    	floatPos:         [2]f32,
    	childrenSum:      [2]f32,
    	spacing:          [2]f32,
    	minSize:          [2]f32,
    	rect:             rect,
    	styleVariables:   list,
    	sig:              ui_sig,
    	fresh:            bool,
    	closed:           bool,
    	parentClosed:     bool,
    	dragging:         bool,
    	hot:              bool,
    	active:           bool,
    	scroll:           [2]f32,
    	pressedMouse:     [2]f32,
    	hotTransition:    f32,
    	activeTransition: f32,
    }

    Related Procedures With Parameters

    Related Procedures With Returns

    ui_box_draw_proc ¶

    ui_box_draw_proc :: proc "c" (arg0: ^ui_box, arg1: rawptr)

    Related Procedures With Parameters

    ui_context ¶

    ui_context :: struct {}
    External examples orca/ui

    Related Procedures With Parameters

    Related Procedures With Returns

    ui_draw_mask ¶

    ui_draw_mask :: enum u32 {
    	BACKGROUND = 1, 
    	BORDER     = 2, 
    	TEXT       = 4, 
    	PROC       = 8, 
    }
     

    These bits disable the corresponding element when they're set.

    ui_edit_move ¶

    ui_edit_move :: enum u32 {
    	NONE = 0, 
    	CHAR = 1, 
    	WORD = 2, 
    	LINE = 3, 
    }

    ui_key ¶

    ui_key :: struct {
    	hash: u64,
    }

    ui_layout ¶

    ui_layout :: struct {
    	axis:      ui_axis,
    	spacing:   f32,
    	margin:    [2]f32,
    	align:     [2]ui_align,
    	overflow:  [2]ui_overflow,
    	constrain: [2]bool,
    }

    ui_overflow ¶

    ui_overflow :: enum u32 {
    	CLIP   = 0, 
    	ALLOW  = 1, 
    	SCROLL = 2, 
    }

    ui_radio_group_info ¶

    ui_radio_group_info :: struct {
    	changed:       bool,
    	selectedIndex: i32,
    	optionCount:   i32 `fmt:"-"`,
    	options:       [^]string `fmt:"s,optionCount"`,
    }
    External examples orca/ui

    Related Procedures With Parameters

    ui_select_popup_info ¶

    ui_select_popup_info :: struct {
    	changed:       bool,
    	selectedIndex: i32,
    	optionCount:   i32 `fmt:"-"`,
    	options:       [^]string `fmt:"s,optionCount"`,
    	placeholder:   string,
    }
    External examples orca/ui

    Related Procedures With Parameters

    ui_sig ¶

    ui_sig :: struct {
    	box:              ^ui_box,
    	mouse:            [2]f32,
    	delta:            [2]f32,
    	wheel:            [2]f32,
    	lastPressedMouse: [2]f32,
    	pressed:          bool,
    	released:         bool,
    	clicked:          bool,
    	doubleClicked:    bool,
    	tripleClicked:    bool,
    	rightPressed:     bool,
    	closed:           bool,
    	active:           bool,
    	hover:            bool,
    	focus:            bool,
    	pasted:           bool,
    }

    Related Procedures With Returns

    ui_size ¶

    ui_size :: struct {
    	kind:    ui_size_kind,
    	value:   f32,
    	relax:   f32,
    	minSize: f32,
    }

    Related Procedures With Parameters

    Related Procedures With Returns

    ui_size_kind ¶

    ui_size_kind :: enum u32 {
    	CHILDREN            = 0, 
    	TEXT                = 1, 
    	PIXELS              = 2, 
    	PARENT              = 3, 
    	PARENT_MINUS_PIXELS = 4, 
    }

    ui_style ¶

    ui_style :: struct {
    	size:          [2]ui_size,
    	layout:        ui_layout,
    	floating:      [2]bool,
    	floatTarget:   [2]f32,
    	_color:        color,
    	bgColor:       color,
    	borderColor:   color,
    	font:          font,
    	fontSize:      f32,
    	borderSize:    f32,
    	roundness:     f32,
    	drawMask:      u32,
    	animationTime: f32,
    	animationMask: ui_attribute_mask,
    	clickThrough:  bool,
    }
    External examples orca/ui

    ui_text_box_info ¶

    ui_text_box_info :: struct {
    	text:                       string,
    	defaultText:                string,
    	cursor:                     i32,
    	mark:                       i32,
    	selectionMode:              ui_edit_move,
    	wordSelectionInitialCursor: i32,
    	wordSelectionInitialMark:   i32,
    	firstDisplayedChar:         i32,
    	cursorBlinkStart:           f64,
    }

    Related Procedures With Parameters

    ui_text_box_result ¶

    ui_text_box_result :: struct {
    	changed:  bool,
    	accepted: bool,
    	text:     string,
    	box:      ^ui_box,
    }

    Related Procedures With Returns

    unicode_range ¶

    unicode_range :: struct {
    	// The first codepoint of the range.
    	firstCodePoint: rune,
    	// The number of codepoints in the range.
    	count:          u32,
    }
     

    A type representing a contiguous range of unicode codepoints.

    External examples orca/breakout · orca/ui · orca/clock

    Related Procedures With Parameters

    Related Constants

    utf32 ¶

    utf32 :: rune
     

    A unicode codepoint.

    Related Procedures With Parameters

    utf8_dec ¶

    utf8_dec :: struct {
    	// The status of the decoding operation. If not `OC_UTF8_OK`, it describes the error that was encountered during decoding.
    	status:    utf8_status,
    	// The decoded codepoint.
    	codepoint: rune,
    	// The size of the utf8 sequence encoding that codepoint.
    	size:      u32,
    }
     

    A type representing the result of decoding of utf8-encoded codepoint.

    Related Procedures With Returns

    utf8_status ¶

    utf8_status :: enum u32 {
    	// The operation was successful.
    	OK                           = 0, 
    	// The operation unexpectedly encountered the end of the utf8 sequence.
    	OUT_OF_BOUNDS                = 1, 
    	// A continuation byte was encountered where a leading byte was expected.
    	UNEXPECTED_CONTINUATION_BYTE = 2, 
    	// A leading byte was encountered in the middle of the encoding of utf8 codepoint.
    	UNEXPECTED_LEADING_BYTE      = 3, 
    	// The utf8 sequence contains an invalid byte.
    	INVALID_BYTE                 = 4, 
    	// The operation encountered an invalid utf8 codepoint.
    	INVALID_CODEPOINT            = 5, 
    	// The utf8 sequence contains an overlong encoding of a utf8 codepoint.
    	OVERLONG_ENCODING            = 6, 
    }
     

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

    vec2 ¶

    vec2 :: [2]f32
     

    A 2D vector type.

    External examples orca/breakout · orca/clock · orca/ui

    Related Procedures With Parameters

    Related Procedures With Returns

    vec2i ¶

    vec2i :: [2]i32
     

    A 2D integer vector type.

    vec3 ¶

    vec3 :: [3]f32
     

    A 3D vector type.

    vec4 ¶

    vec4 :: [4]f32
     

    A 4D vector type.

    window ¶

    window :: distinct u64
     

    An opaque handle identifying a window.

    Constants

    UNICODE_AEGEAN_NUMBERS ¶

    UNICODE_AEGEAN_NUMBERS :: unicode_range{0x10100, 63}

    UNICODE_ALPHABETIC_PRESENTATION_FORMS ¶

    UNICODE_ALPHABETIC_PRESENTATION_FORMS :: unicode_range{0xfb00, 79}

    UNICODE_ARABIC ¶

    UNICODE_ARABIC :: unicode_range{0x0600, 255}

    UNICODE_ARABIC_PRESENTATION_FORMS_A ¶

    UNICODE_ARABIC_PRESENTATION_FORMS_A :: unicode_range{0xfb50, 687}

    UNICODE_ARABIC_PRESENTATION_FORMS_B ¶

    UNICODE_ARABIC_PRESENTATION_FORMS_B :: unicode_range{0xfe70, 143}

    UNICODE_ARMENIAN ¶

    UNICODE_ARMENIAN :: unicode_range{0x0530, 95}

    UNICODE_ARROWS ¶

    UNICODE_ARROWS :: unicode_range{0x2190, 111}

    UNICODE_BASIC_LATIN ¶

    UNICODE_BASIC_LATIN :: unicode_range{0x0000, 127}
    External examples orca/breakout · orca/ui · orca/clock

    UNICODE_BENGALI_ASSAMESE ¶

    UNICODE_BENGALI_ASSAMESE :: unicode_range{0x0980, 127}

    UNICODE_BLOCK_ELEMENTS ¶

    UNICODE_BLOCK_ELEMENTS :: unicode_range{0x2580, 31}

    UNICODE_BOPOMOFO ¶

    UNICODE_BOPOMOFO :: unicode_range{0x3100, 47}

    UNICODE_BOPOMOFO_EXTENDED ¶

    UNICODE_BOPOMOFO_EXTENDED :: unicode_range{0x31a0, 31}

    UNICODE_BOX_DRAWING ¶

    UNICODE_BOX_DRAWING :: unicode_range{0x2500, 127}

    UNICODE_BRAILLE_PATTERNS ¶

    UNICODE_BRAILLE_PATTERNS :: unicode_range{0x2800, 255}

    UNICODE_BUHID ¶

    UNICODE_BUHID :: unicode_range{0x1740, 31}

    UNICODE_BYZANTINE_MUSICAL_SYMBOLS ¶

    UNICODE_BYZANTINE_MUSICAL_SYMBOLS :: unicode_range{0x1d000, 255}

    UNICODE_C1_CONTROLS_AND_LATIN_1_SUPPLEMENT ¶

    UNICODE_C1_CONTROLS_AND_LATIN_1_SUPPLEMENT :: unicode_range{0x0080, 127}
    External examples orca/breakout · orca/ui · orca/clock

    UNICODE_CHEROKEE ¶

    UNICODE_CHEROKEE :: unicode_range{0x13a0, 95}

    UNICODE_CJK_COMPATIBILITY ¶

    UNICODE_CJK_COMPATIBILITY :: unicode_range{0x3300, 255}

    UNICODE_CJK_COMPATIBILITY_FORMS ¶

    UNICODE_CJK_COMPATIBILITY_FORMS :: unicode_range{0xfe30, 31}

    UNICODE_CJK_COMPATIBILITY_IDEOGRAPHS ¶

    UNICODE_CJK_COMPATIBILITY_IDEOGRAPHS :: unicode_range{0xf900, 511}

    UNICODE_CJK_COMPATIBILITY_IDEOGRAPHS_SUPPLEMENT ¶

    UNICODE_CJK_COMPATIBILITY_IDEOGRAPHS_SUPPLEMENT :: unicode_range{0x2f800, 543}

    UNICODE_CJK_RADICALS_SUPPLEMENT ¶

    UNICODE_CJK_RADICALS_SUPPLEMENT :: unicode_range{0x2e80, 127}

    UNICODE_CJK_SYMBOLS_AND_PUNCTUATION ¶

    UNICODE_CJK_SYMBOLS_AND_PUNCTUATION :: unicode_range{0x3000, 63}

    UNICODE_CJK_UNIFIED_IDEOGRAPHS ¶

    UNICODE_CJK_UNIFIED_IDEOGRAPHS :: unicode_range{0x4e00, 20911}

    UNICODE_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_A ¶

    UNICODE_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_A :: unicode_range{0x3400, 6591}

    UNICODE_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_B ¶

    UNICODE_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_B :: unicode_range{0x20000, 42719}

    UNICODE_COMBINING_DIACRITICAL_MARKS ¶

    UNICODE_COMBINING_DIACRITICAL_MARKS :: unicode_range{0x0300, 111}

    UNICODE_COMBINING_DIACRITICAL_MARKS_FOR_SYMBOLS ¶

    UNICODE_COMBINING_DIACRITICAL_MARKS_FOR_SYMBOLS :: unicode_range{0x20d0, 47}

    UNICODE_COMBINING_HALF_MARKS ¶

    UNICODE_COMBINING_HALF_MARKS :: unicode_range{0xfe20, 15}

    UNICODE_CONTROL_PICTURES ¶

    UNICODE_CONTROL_PICTURES :: unicode_range{0x2400, 63}

    UNICODE_CURRENCY_SYMBOLS ¶

    UNICODE_CURRENCY_SYMBOLS :: unicode_range{0x20a0, 47}

    UNICODE_CYPRIOT_SYLLABARY ¶

    UNICODE_CYPRIOT_SYLLABARY :: unicode_range{0x10800, 63}

    UNICODE_CYRILLIC ¶

    UNICODE_CYRILLIC :: unicode_range{0x0400, 255}

    UNICODE_CYRILLIC_SUPPLEMENT ¶

    UNICODE_CYRILLIC_SUPPLEMENT :: unicode_range{0x0500, 47}

    UNICODE_DESERET ¶

    UNICODE_DESERET :: unicode_range{0x10400, 79}

    UNICODE_DEVANAGARI ¶

    UNICODE_DEVANAGARI :: unicode_range{0x0900, 127}

    UNICODE_DINGBATS ¶

    UNICODE_DINGBATS :: unicode_range{0x2700, 191}

    UNICODE_ENCLOSED_ALPHANUMERICS ¶

    UNICODE_ENCLOSED_ALPHANUMERICS :: unicode_range{0x2460, 159}

    UNICODE_ENCLOSED_CJK_LETTERS_AND_MONTHS ¶

    UNICODE_ENCLOSED_CJK_LETTERS_AND_MONTHS :: unicode_range{0x3200, 255}

    UNICODE_ETHIOPIC ¶

    UNICODE_ETHIOPIC :: unicode_range{0x1200, 383}

    UNICODE_GENERAL_PUNCTUATION ¶

    UNICODE_GENERAL_PUNCTUATION :: unicode_range{0x2000, 111}

    UNICODE_GEOMETRIC_SHAPES ¶

    UNICODE_GEOMETRIC_SHAPES :: unicode_range{0x25a0, 95}

    UNICODE_GEORGIAN ¶

    UNICODE_GEORGIAN :: unicode_range{0x10a0, 95}

    UNICODE_GOTHIC ¶

    UNICODE_GOTHIC :: unicode_range{0x10330, 31}

    UNICODE_GREEK_COPTIC ¶

    UNICODE_GREEK_COPTIC :: unicode_range{0x0370, 143}

    UNICODE_GREEK_EXTENDED ¶

    UNICODE_GREEK_EXTENDED :: unicode_range{0x1f00, 255}

    UNICODE_GUJARATI ¶

    UNICODE_GUJARATI :: unicode_range{0x0a80, 127}

    UNICODE_GURMUKHI ¶

    UNICODE_GURMUKHI :: unicode_range{0x0a00, 127}

    UNICODE_HALFWIDTH_AND_FULLWIDTH_FORMS ¶

    UNICODE_HALFWIDTH_AND_FULLWIDTH_FORMS :: unicode_range{0xff00, 239}

    UNICODE_HANGUL_COMPATIBILITY_JAMO ¶

    UNICODE_HANGUL_COMPATIBILITY_JAMO :: unicode_range{0x3130, 95}

    UNICODE_HANGUL_JAMO ¶

    UNICODE_HANGUL_JAMO :: unicode_range{0x1100, 255}

    UNICODE_HANGUL_SYLLABLES ¶

    UNICODE_HANGUL_SYLLABLES :: unicode_range{0xac00, 11183}

    UNICODE_HANUNOO ¶

    UNICODE_HANUNOO :: unicode_range{0x1720, 31}

    UNICODE_HEBREW ¶

    UNICODE_HEBREW :: unicode_range{0x0590, 111}

    UNICODE_HIGH_SURROGATE_AREA ¶

    UNICODE_HIGH_SURROGATE_AREA :: unicode_range{0xd800, 1023}

    UNICODE_HIRAGANA ¶

    UNICODE_HIRAGANA :: unicode_range{0x3040, 95}

    UNICODE_IDEOGRAPHIC_DESCRIPTION_CHARACTERS ¶

    UNICODE_IDEOGRAPHIC_DESCRIPTION_CHARACTERS :: unicode_range{0x2ff0, 15}

    UNICODE_IPA_EXTENSIONS ¶

    UNICODE_IPA_EXTENSIONS :: unicode_range{0x0250, 95}

    UNICODE_KANBUN_KUNTEN ¶

    UNICODE_KANBUN_KUNTEN :: unicode_range{0x3190, 15}

    UNICODE_KANGXI_RADICALS ¶

    UNICODE_KANGXI_RADICALS :: unicode_range{0x2f00, 223}

    UNICODE_KANNADA ¶

    UNICODE_KANNADA :: unicode_range{0x0c80, 127}

    UNICODE_KATAKANA ¶

    UNICODE_KATAKANA :: unicode_range{0x30a0, 95}

    UNICODE_KATAKANA_PHONETIC_EXTENSIONS ¶

    UNICODE_KATAKANA_PHONETIC_EXTENSIONS :: unicode_range{0x31f0, 15}

    UNICODE_KHMER ¶

    UNICODE_KHMER :: unicode_range{0x1780, 127}

    UNICODE_KHMER_SYMBOLS ¶

    UNICODE_KHMER_SYMBOLS :: unicode_range{0x19e0, 31}

    UNICODE_LAO ¶

    UNICODE_LAO :: unicode_range{0x0e80, 127}

    UNICODE_LATIN_EXTENDED_A ¶

    UNICODE_LATIN_EXTENDED_A :: unicode_range{0x0100, 127}
    External examples orca/breakout · orca/ui · orca/clock

    UNICODE_LATIN_EXTENDED_ADDITIONAL ¶

    UNICODE_LATIN_EXTENDED_ADDITIONAL :: unicode_range{0x1e00, 255}

    UNICODE_LATIN_EXTENDED_B ¶

    UNICODE_LATIN_EXTENDED_B :: unicode_range{0x0180, 207}
    External examples orca/breakout · orca/ui · orca/clock

    UNICODE_LETTERLIKE_SYMBOLS ¶

    UNICODE_LETTERLIKE_SYMBOLS :: unicode_range{0x2100, 79}

    UNICODE_LIMBU ¶

    UNICODE_LIMBU :: unicode_range{0x1900, 79}

    UNICODE_LINEAR_B_IDEOGRAMS ¶

    UNICODE_LINEAR_B_IDEOGRAMS :: unicode_range{0x10080, 127}

    UNICODE_LINEAR_B_SYLLABARY ¶

    UNICODE_LINEAR_B_SYLLABARY :: unicode_range{0x10000, 127}

    UNICODE_LOW_SURROGATE_AREA ¶

    UNICODE_LOW_SURROGATE_AREA :: unicode_range{0xdc00, 1023}

    UNICODE_MALAYALAM ¶

    UNICODE_MALAYALAM :: unicode_range{0x0d00, 255}

    UNICODE_MATHEMATICAL_ALPHANUMERIC_SYMBOLS ¶

    UNICODE_MATHEMATICAL_ALPHANUMERIC_SYMBOLS :: unicode_range{0x1d400, 1023}

    UNICODE_MATHEMATICAL_OPERATORS ¶

    UNICODE_MATHEMATICAL_OPERATORS :: unicode_range{0x2200, 255}

    UNICODE_MISCELLANEOUS_MATHEMATICAL_SYMBOLS_A ¶

    UNICODE_MISCELLANEOUS_MATHEMATICAL_SYMBOLS_A :: unicode_range{0x27c0, 47}

    UNICODE_MISCELLANEOUS_MATHEMATICAL_SYMBOLS_B ¶

    UNICODE_MISCELLANEOUS_MATHEMATICAL_SYMBOLS_B :: unicode_range{0x2980, 127}

    UNICODE_MISCELLANEOUS_SYMBOLS ¶

    UNICODE_MISCELLANEOUS_SYMBOLS :: unicode_range{0x2600, 255}

    UNICODE_MISCELLANEOUS_SYMBOLS_AND_ARROWS ¶

    UNICODE_MISCELLANEOUS_SYMBOLS_AND_ARROWS :: unicode_range{0x2b00, 255}

    UNICODE_MISCELLANEOUS_TECHNICAL ¶

    UNICODE_MISCELLANEOUS_TECHNICAL :: unicode_range{0x2300, 255}

    UNICODE_MONGOLIAN ¶

    UNICODE_MONGOLIAN :: unicode_range{0x1800, 175}

    UNICODE_MUSICAL_SYMBOLS ¶

    UNICODE_MUSICAL_SYMBOLS :: unicode_range{0x1d100, 255}

    UNICODE_MYANMAR ¶

    UNICODE_MYANMAR :: unicode_range{0x1000, 159}

    UNICODE_NUMBER_FORMS ¶

    UNICODE_NUMBER_FORMS :: unicode_range{0x2150, 63}

    UNICODE_OGHAM ¶

    UNICODE_OGHAM :: unicode_range{0x1680, 31}

    UNICODE_OLD_ITALIC ¶

    UNICODE_OLD_ITALIC :: unicode_range{0x10300, 47}

    UNICODE_OPTICAL_CHARACTER_RECOGNITION ¶

    UNICODE_OPTICAL_CHARACTER_RECOGNITION :: unicode_range{0x2440, 31}

    UNICODE_ORIYA ¶

    UNICODE_ORIYA :: unicode_range{0x0b00, 127}

    UNICODE_OSMANYA ¶

    UNICODE_OSMANYA :: unicode_range{0x10480, 47}

    UNICODE_PHONETIC_EXTENSIONS ¶

    UNICODE_PHONETIC_EXTENSIONS :: unicode_range{0x1d00, 127}

    UNICODE_PRIVATE_USE_AREA ¶

    UNICODE_PRIVATE_USE_AREA :: unicode_range{0xe000, 6399}

    UNICODE_RUNIC ¶

    UNICODE_RUNIC :: unicode_range{0x16a0, 95}

    UNICODE_SHAVIAN ¶

    UNICODE_SHAVIAN :: unicode_range{0x10450, 47}

    UNICODE_SINHALA ¶

    UNICODE_SINHALA :: unicode_range{0x0d80, 127}

    UNICODE_SMALL_FORM_VARIANTS ¶

    UNICODE_SMALL_FORM_VARIANTS :: unicode_range{0xfe50, 31}

    UNICODE_SPACING_MODIFIER_LETTERS ¶

    UNICODE_SPACING_MODIFIER_LETTERS :: unicode_range{0x02b0, 79}

    UNICODE_SPECIALS ¶

    UNICODE_SPECIALS :: unicode_range{0xfff0, 15}
    External examples orca/breakout · orca/ui · orca/clock

    UNICODE_SUPERSCRIPTS_AND_SUBSCRIPTS ¶

    UNICODE_SUPERSCRIPTS_AND_SUBSCRIPTS :: unicode_range{0x2070, 47}

    UNICODE_SUPPLEMENTAL_ARROWS_A ¶

    UNICODE_SUPPLEMENTAL_ARROWS_A :: unicode_range{0x27f0, 15}

    UNICODE_SUPPLEMENTAL_ARROWS_B ¶

    UNICODE_SUPPLEMENTAL_ARROWS_B :: unicode_range{0x2900, 127}

    UNICODE_SUPPLEMENTAL_MATHEMATICAL_OPERATORS ¶

    UNICODE_SUPPLEMENTAL_MATHEMATICAL_OPERATORS :: unicode_range{0x2a00, 255}

    UNICODE_SUPPLEMENTARY_PRIVATE_USE_AREA_A ¶

    UNICODE_SUPPLEMENTARY_PRIVATE_USE_AREA_A :: unicode_range{0xf0000, 65533}

    UNICODE_SUPPLEMENTARY_PRIVATE_USE_AREA_B ¶

    UNICODE_SUPPLEMENTARY_PRIVATE_USE_AREA_B :: unicode_range{0x100000, 65533}

    UNICODE_SYRIAC ¶

    UNICODE_SYRIAC :: unicode_range{0x0700, 79}

    UNICODE_TAGALOG ¶

    UNICODE_TAGALOG :: unicode_range{0x1700, 31}

    UNICODE_TAGBANWA ¶

    UNICODE_TAGBANWA :: unicode_range{0x1760, 31}

    UNICODE_TAGS ¶

    UNICODE_TAGS :: unicode_range{0xe0000, 127}

    UNICODE_TAI_LE ¶

    UNICODE_TAI_LE :: unicode_range{0x1950, 47}

    UNICODE_TAI_XUAN_JING_SYMBOLS ¶

    UNICODE_TAI_XUAN_JING_SYMBOLS :: unicode_range{0x1d300, 95}

    UNICODE_TAMIL ¶

    UNICODE_TAMIL :: unicode_range{0x0b80, 127}

    UNICODE_TELUGU ¶

    UNICODE_TELUGU :: unicode_range{0x0c00, 127}

    UNICODE_THAANA ¶

    UNICODE_THAANA :: unicode_range{0x0780, 63}

    UNICODE_THAI ¶

    UNICODE_THAI :: unicode_range{0x0e00, 127}

    UNICODE_TIBETAN ¶

    UNICODE_TIBETAN :: unicode_range{0x0f00, 255}

    UNICODE_UGARITIC ¶

    UNICODE_UGARITIC :: unicode_range{0x10380, 31}

    UNICODE_UNIFIED_CANADIAN_ABORIGINAL_SYLLABICS ¶

    UNICODE_UNIFIED_CANADIAN_ABORIGINAL_SYLLABICS :: unicode_range{0x1400, 639}

    UNICODE_VARIATION_SELECTORS ¶

    UNICODE_VARIATION_SELECTORS :: unicode_range{0xfe00, 15}

    UNICODE_VARIATION_SELECTORS_SUPPLEMENT ¶

    UNICODE_VARIATION_SELECTORS_SUPPLEMENT :: unicode_range{0xe0100, 239}

    UNICODE_YIJING_HEXAGRAM_SYMBOLS ¶

    UNICODE_YIJING_HEXAGRAM_SYMBOLS :: unicode_range{0x4dc0, 63}

    UNICODE_YI_RADICALS ¶

    UNICODE_YI_RADICALS :: unicode_range{0xa490, 63}

    UNICODE_YI_SYLLABLES ¶

    UNICODE_YI_SYLLABLES :: unicode_range{0xa000, 1167}

    Variables

    This section is empty.

    Procedures

    abort ¶

    abort :: proc "contextless" (msg: cstring, loc := #caller_location) {…}

    abort_ext ¶
    C · oc_abort_extSource · orca.odin:238

    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.

    arc ¶

    arc :: proc "c" (x: f32, y: f32, r: f32, arcAngle: f32, startAngle: f32) ---
     

    Add an arc to the path.

    arena_cleanup ¶
    C · oc_arena_cleanupSource · orca.odin:363

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

    Release all resources allocated to a memory arena.

    arena_clear ¶
    C · oc_arena_clearSource · orca.odin:373

    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.

    External examples orca/ui

    arena_init ¶
    C · oc_arena_initSource · orca.odin:359

    arena_init :: proc "c" (arena: ^arena) ---
     

    Initialize a memory arena.

    External examples orca/ui

    arena_init_with_options ¶
    C · oc_arena_init_with_optionsSource · orca.odin:361

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

    Initialize a memory arena with additional options.

    arena_push ¶
    C · oc_arena_pushSource · orca.odin:365

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

    Allocate a zero initialized block of memory from an arena.

    External examples orca/ui

    arena_push_aligned ¶
    C · oc_arena_push_alignedSource · orca.odin:367

    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 ¶
    C · oc_arena_push_aligned_uninitializedSource · orca.odin:371

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

    Allocate an aligned block of memory from an arena.

    arena_push_array ¶

    arena_push_array :: proc "contextless" (arena: ^arena, $T: typeid, count: u64) -> []T {…}

    arena_push_type ¶

    arena_push_type :: proc "contextless" (arena: ^arena, $T: typeid) -> ^T {…}

    arena_push_uninitialized ¶
    C · oc_arena_push_uninitializedSource · orca.odin:369

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

    Allocate a block of memory from an arena.

    arena_scope_begin ¶
    C · oc_arena_scope_beginSource · orca.odin:375

    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 ¶
    C · oc_arena_scope_endSource · orca.odin:377

    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 ¶
    C · oc_assert_failSource · orca.odin:244

    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_create ¶
    C · oc_canvas_context_createSource · orca.odin:1615

    canvas_context_create :: proc "c" () -> canvas_context ---
     

    Create a canvas context.

    External examples orca/breakout · orca/ui · orca/clock

    canvas_context_destroy ¶
    C · oc_canvas_context_destroySource · orca.odin:1617

    canvas_context_destroy :: proc "c" (_context: canvas_context) ---
     

    Destroy a canvas context

    canvas_context_is_nil ¶
    C · oc_canvas_context_is_nilSource · orca.odin:1613

    canvas_context_is_nil :: proc "c" (_context: canvas_context) -> bool ---
     

    Checks if a canvas context handle is nil.

    canvas_context_nil ¶
    C · oc_canvas_context_nilSource · orca.odin:1611

    canvas_context_nil :: proc "c" () -> canvas_context ---
     

    Returns a nil canvas context handle.

    canvas_context_select ¶
    C · oc_canvas_context_selectSource · orca.odin:1619

    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.

    External examples orca/clock · orca/breakout · orca/ui

    canvas_context_set_msaa_sample_count ¶
    C · oc_canvas_context_set_msaa_sample_countSource · orca.odin:1621

    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.

    canvas_present ¶
    C · oc_canvas_presentSource · orca.odin:1607

    canvas_present :: proc "c" (renderer: canvas_renderer, surface: surface) ---
     

    Present a canvas surface to the display.

    External examples orca/breakout · orca/clock · orca/ui

    canvas_render ¶
    C · oc_canvas_renderSource · orca.odin:1605

    canvas_render :: proc "c" (
    	renderer: canvas_renderer, 
    	_context: canvas_context, 
    	surface:  surface, 
    ) ---
     

    Render canvas commands onto a surface.

    External examples orca/breakout · orca/clock · orca/ui

    canvas_renderer_create ¶
    C · oc_canvas_renderer_createSource · orca.odin:1601

    canvas_renderer_create :: proc "c" () -> canvas_renderer ---
     

    Create a canvas renderer.

    External examples orca/breakout · orca/ui · orca/clock

    canvas_renderer_destroy ¶
    C · oc_canvas_renderer_destroySource · orca.odin:1603

    canvas_renderer_destroy :: proc "c" (renderer: canvas_renderer) ---
     

    Destroy a canvas renderer.

    canvas_renderer_is_nil ¶
    C · oc_canvas_renderer_is_nilSource · orca.odin:1599

    canvas_renderer_is_nil :: proc "c" (renderer: canvas_renderer) -> bool ---
     

    Checks if a canvas renderer handle is nil.

    canvas_renderer_nil ¶
    C · oc_canvas_renderer_nilSource · orca.odin:1597

    canvas_renderer_nil :: proc "c" () -> canvas_renderer ---
     

    Returns a nil canvas renderer handle.

    canvas_surface_create ¶
    C · oc_canvas_surface_createSource · orca.odin:1609

    canvas_surface_create :: proc "c" (renderer: canvas_renderer) -> surface ---
     

    Create a surface for rendering vector graphics.

    External examples orca/breakout · orca/ui · orca/clock

    circle_fill ¶
    C · oc_circle_fillSource · orca.odin:1787

    circle_fill :: proc "c" (x: f32, y: f32, r: f32) ---
     

    Draw a filled circle.

    External examples orca/clock · orca/breakout

    circle_stroke ¶
    C · oc_circle_strokeSource · orca.odin:1789

    circle_stroke :: proc "c" (x: f32, y: f32, r: f32) ---
     

    Draw a stroked circle.

    clear ¶

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

    Clear the canvas to the current color.

    External examples orca/breakout · orca/clock · orca/ui

    clip_pop ¶
    C · oc_clip_popSource · orca.odin:1697

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

    Pop from the clip stack.

    clip_push ¶
    C · oc_clip_pushSource · orca.odin:1695

    clip_push :: proc "c" (x: f32, y: f32, w: f32, h: f32) ---
     

    Push a clip rectangle to the clip stack.

    clip_top ¶
    C · oc_clip_topSource · orca.odin:1699

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

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

    clipboard_pasted ¶
    C · oc_clipboard_pastedSource · orca.odin:1155

    clipboard_pasted :: proc "c" (state: ^input_state) -> bool ---

    clipboard_pasted_text ¶
    C · oc_clipboard_pasted_textSource · orca.odin:1156

    clipboard_pasted_text :: proc "c" (state: ^input_state) -> string ---

    clipboard_set_string ¶
    C · oc_clipboard_set_stringSource · orca.odin:1154

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

    Put a string in the clipboard.

    clock_time ¶
    C · oc_clock_timeSource · orca.odin:213

    clock_time :: proc "c" (clock: clock_kind) -> f64 ---
    External examples orca/clock · orca/ui

    close_path ¶
    C · oc_close_pathSource · orca.odin:1761

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

    Close the current path with a line.

    codepoints_outlines ¶
    C · oc_codepoints_outlinesSource · orca.odin:1765

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

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

    color_convert ¶
    C · oc_color_convertSource · orca.odin:1595

    color_convert :: proc "c" (_color: color, colorSpace: color_space) -> color ---
     

    Convert a color from one color space to another.

    color_rgba ¶
    C · oc_color_rgbaSource · orca.odin:1591

    color_rgba :: proc "c" (r: f32, g: f32, b: f32, a: f32) -> color ---
     

    Create a color using RGBA values.

    color_srgba ¶
    C · oc_color_srgbaSource · orca.odin:1593

    color_srgba :: proc "c" (r: f32, g: f32, b: f32, a: f32) -> color ---
     

    Create a current color using sRGBA values.

    create_odin_logger ¶

    create_odin_logger :: proc(
    	lowest: runtime.Logger_Level = runtime.Logger_Level.Debug, 
    	ident:  string = "", 
    ) -> runtime.Logger {…}
    External examples orca/breakout · orca/ui

    cubic_to ¶
    C · oc_cubic_toSource · orca.odin:1759

    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.

    ellipse_fill ¶
    C · oc_ellipse_fillSource · orca.odin:1783

    ellipse_fill :: proc "c" (x: f32, y: f32, rx: f32, ry: f32) ---
     

    Draw a filled ellipse.

    ellipse_stroke ¶
    C · oc_ellipse_strokeSource · orca.odin:1785

    ellipse_stroke :: proc "c" (x: f32, y: f32, rx: f32, ry: f32) ---
     

    Draw a stroked ellipse.

    file_close ¶
    C · oc_file_closeSource · orca.odin:1399

    file_close :: proc "c" (file: file) ---
     

    Close a file.

    External examples orca/ui

    file_get_status ¶
    C · oc_file_get_statusSource · orca.odin:1410

    file_get_status :: proc "c" (file: file) -> file_status ---

    file_is_nil ¶
    C · oc_file_is_nilSource · orca.odin:1393

    file_is_nil :: proc "c" (handle: file) -> bool ---
     

    Test if a file handle is nil.

    file_last_error ¶
    C · oc_file_last_errorSource · orca.odin:1409

    file_last_error :: proc "c" (handle: file) -> io_error ---
     

    Get the last error on a file handle.

    External examples orca/ui

    file_listdir ¶
    C · oc_file_listdirSource · orca.odin:1413

    file_listdir :: proc "c" (arena: ^arena, directory: string) -> file_list ---

    file_nil ¶
    C · oc_file_nilSource · orca.odin:1391

    file_nil :: proc "c" () -> file ---
     

    Returns a nil file handle

    file_open ¶
    C · oc_file_openSource · orca.odin:1395

    file_open :: proc "c" (
    	path:   string, 
    	rights: bit_set[file_access_flag; u16], 
    	flags:  bit_set[file_open_flag; u16], 
    ) -> file ---
     

    Open a file in the applications' default directory subtree.

    External examples orca/ui

    file_open_at ¶
    C · oc_file_open_atSource · orca.odin:1397

    file_open_at :: proc "c" (
    	dir:    file, 
    	path:   string, 
    	rights: bit_set[file_access_flag; u16], 
    	flags:  bit_set[file_open_flag; u16], 
    ) -> file ---
     

    Open a file in a given directory's subtree.

    file_open_with_dialog ¶
    C · oc_file_open_with_dialogSource · orca.odin:1439

    file_open_with_dialog :: proc "c" (
    	arena:  ^arena, 
    	rights: bit_set[file_access_flag; u16], 
    	flags:  bit_set[file_open_flag; u16], 
    	desc:   ^file_dialog_desc, 
    ) -> file_open_with_dialog_result ---
     

    Open files through a file dialog. This allows the user to select files outside the root directories currently accessible to the applications, giving them a way to provide new file capabilities to the application.

    file_open_with_request ¶
    C · oc_file_open_with_requestSource · orca.odin:1412

    file_open_with_request :: proc "c" (
    	path:   string, 
    	rights: bit_set[file_access_flag; u16], 
    	flags:  bit_set[file_open_flag; u16], 
    ) -> file ---

    file_pos ¶
    C · oc_file_posSource · orca.odin:1401

    file_pos :: proc "c" (file: file) -> i64 ---
     

    Get the current position in a file.

    file_read ¶
    C · oc_file_readSource · orca.odin:1407

    file_read :: proc "c" (file: file, size: u64, buffer: [^]u8) -> u64 ---
     

    Read from a file.

    External examples orca/ui

    file_read_slice ¶

    file_read_slice :: proc(file: file, slice: []u8) -> u64 {…}

    file_seek ¶
    C · oc_file_seekSource · orca.odin:1403

    file_seek :: proc "c" (file: file, offset: i64, whence: file_whence) -> i64 ---
     

    Set the current position in a file.

    file_size ¶
    C · oc_file_sizeSource · orca.odin:1411

    file_size :: proc "c" (file: file) -> u64 ---
    External examples orca/ui

    file_write ¶
    C · oc_file_writeSource · orca.odin:1405

    file_write :: proc "c" (file: file, size: u64, buffer: [^]u8) -> u64 ---
     

    Write data to a file.

    file_write_slice ¶

    file_write_slice :: proc(file: file, slice: []u8) -> u64 {…}

    fill ¶

    fill :: proc "c" () ---
     

    Fill the current path.

    External examples orca/breakout

    font_create_from_file ¶
    C · oc_font_create_from_fileSource · orca.odin:1629

    font_create_from_file :: proc "c" (
    	file:       file, 
    	rangeCount: u32, 
    	ranges:     ^unicode_range, 
    ) -> font ---
     

    Create a font from a TrueType font file.

    font_create_from_memory ¶
    C · oc_font_create_from_memorySource · orca.odin:1627

    font_create_from_memory :: proc "c" (
    	mem:        string, 
    	rangeCount: u32, 
    	ranges:     ^unicode_range, 
    ) -> font ---
     

    Create a font from in-memory TrueType data.

    External examples orca/ui

    font_create_from_path ¶
    C · oc_font_create_from_pathSource · orca.odin:1631

    font_create_from_path :: proc "c" (
    	path:       string, 
    	rangeCount: u32, 
    	ranges:     ^unicode_range, 
    ) -> font ---
     

    Create a font from a TrueType font file path.

    External examples orca/breakout · orca/clock

    font_destroy ¶
    C · oc_font_destroySource · orca.odin:1633

    font_destroy :: proc "c" (font: font) ---
     

    Destroy a font.

    font_get_glyph_index ¶
    C · oc_font_get_glyph_indexSource · orca.odin:1639

    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 ¶
    C · oc_font_get_glyph_indicesSource · orca.odin:1635

    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_metrics ¶
    C · oc_font_get_metricsSource · orca.odin:1641

    font_get_metrics :: proc "c" (font: font, emSize: f32) -> font_metrics ---
     

    Get a font's metrics for a given font size.

    font_get_metrics_unscaled ¶
    C · oc_font_get_metrics_unscaledSource · orca.odin:1643

    font_get_metrics_unscaled :: proc "c" (font: font) -> font_metrics ---
     

    Get a font's unscaled metrics.

    font_get_scale_for_em_pixels ¶
    C · oc_font_get_scale_for_em_pixelsSource · orca.odin:1645

    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_is_nil ¶
    C · oc_font_is_nilSource · orca.odin:1625

    font_is_nil :: proc "c" (font: font) -> bool ---
     

    Check if a font handle is nil.

    font_nil ¶
    C · oc_font_nilSource · orca.odin:1623

    font_nil :: proc "c" () -> font ---
     

    Return a nil font handle.

    font_push_glyph_indices ¶
    C · oc_font_push_glyph_indicesSource · orca.odin:1637

    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.

    font_text_metrics ¶
    C · oc_font_text_metricsSource · orca.odin:1649

    font_text_metrics :: proc "c" (font: font, fontSize: f32, text: string) -> text_metrics ---
     

    Get the text metrics for a utf8 string.

    External examples orca/breakout · orca/clock

    font_text_metrics_utf32 ¶
    C · oc_font_text_metrics_utf32Source · orca.odin:1647

    font_text_metrics_utf32 :: proc "c" (
    	font:       font, 
    	fontSize:   f32, 
    	codepoints: str32, 
    ) -> text_metrics ---
     

    Get text metrics for a run of unicode code points.

    get_cap ¶

    get_cap :: proc "c" () -> cap_type ---
     

    Get the current cap style.

    get_color ¶
    C · oc_get_colorSource · orca.odin:1729

    get_color :: proc "c" () -> color ---
     

    Get the current color

    get_font ¶
    C · oc_get_fontSource · orca.odin:1741

    get_font :: proc "c" () -> font ---
     

    Get the current font.

    get_font_size ¶
    C · oc_get_font_sizeSource · orca.odin:1743

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

    Get the current font size.

    get_image ¶
    C · oc_get_imageSource · orca.odin:1747

    get_image :: proc "c" () -> image ---
     

    Get the current source image.

    get_image_source_region ¶
    C · oc_get_image_source_regionSource · orca.odin:1749

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

    Get the current image source region.

    get_joint ¶
    C · oc_get_jointSource · orca.odin:1735

    get_joint :: proc "c" () -> joint_type ---
     

    Get the current joint style.

    get_max_joint_excursion ¶
    C · oc_get_max_joint_excursionSource · orca.odin:1737

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

    Get the current max joint excursion.

    get_position ¶
    C · oc_get_positionSource · orca.odin:1751

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

    Get the current cursor position.

    get_text_flip ¶
    C · oc_get_text_flipSource · orca.odin:1745

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

    Get the current text flip value.

    get_tolerance ¶
    C · oc_get_toleranceSource · orca.odin:1733

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

    Get the current line width tolerance.

    get_width ¶
    C · oc_get_widthSource · orca.odin:1731

    get_width :: proc "c" () -> f32 ---
     

    Get the current line width.

    gles_surface_create ¶
    C · oc_gles_surface_createSource · orca.odin:1807

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

    Create a graphics surface for GLES rendering.

    gles_surface_make_current ¶
    C · oc_gles_surface_make_currentSource · orca.odin:1809

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

    Make the GL context of the surface current.

    gles_surface_swap_buffers ¶
    C · oc_gles_surface_swap_buffersSource · orca.odin:1811

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

    Swap the buffers of a GLES surface.

    glyph_outlines ¶
    C · oc_glyph_outlinesSource · orca.odin:1763

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

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

    image_atlas_alloc_from_file ¶
    C · oc_image_atlas_alloc_from_fileSource · orca.odin:1681

    image_atlas_alloc_from_file :: proc "c" (
    	atlas:        ^rect_atlas, 
    	backingImage: image, 
    	file:         file, 
    	flip:         bool, 
    ) -> image_region ---
     

    Allocate an image region from an atlas and upload an image to it.

    image_atlas_alloc_from_memory ¶
    C · oc_image_atlas_alloc_from_memorySource · orca.odin:1679

    image_atlas_alloc_from_memory :: proc "c" (
    	atlas:        ^rect_atlas, 
    	backingImage: image, 
    	mem:          string, 
    	flip:         bool, 
    ) -> image_region ---
     

    Allocate an image region from an atlas and upload an image to it.

    image_atlas_alloc_from_path ¶
    C · oc_image_atlas_alloc_from_pathSource · orca.odin:1683

    image_atlas_alloc_from_path :: proc "c" (
    	atlas:        ^rect_atlas, 
    	backingImage: image, 
    	path:         string, 
    	flip:         bool, 
    ) -> image_region ---
     

    Allocate an image region from an atlas and upload an image to it.

    image_atlas_alloc_from_rgba8 ¶
    C · oc_image_atlas_alloc_from_rgba8Source · orca.odin:1677

    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_atlas_recycle ¶
    C · oc_image_atlas_recycleSource · orca.odin:1685

    image_atlas_recycle :: proc "c" (atlas: ^rect_atlas, imageRgn: image_region) ---
     

    Recycle an image region allocated from an atlas.

    image_create ¶
    C · oc_image_createSource · orca.odin:1655

    image_create :: proc "c" (renderer: canvas_renderer, width: u32, height: u32) -> image ---
     

    Create an uninitialized image.

    image_create_from_file ¶
    C · oc_image_create_from_fileSource · orca.odin:1661

    image_create_from_file :: proc "c" (
    	renderer: canvas_renderer, 
    	file:     file, 
    	flip:     bool, 
    ) -> image ---
     

    Create an image from an image file. Supported formats are: png, jpeg or bmp.

    image_create_from_memory ¶
    C · oc_image_create_from_memorySource · orca.odin:1659

    image_create_from_memory :: proc "c" (
    	renderer: canvas_renderer, 
    	mem:      string, 
    	flip:     bool, 
    ) -> image ---
     

    Create an image from in-memory png, jpeg or bmp data.

    image_create_from_path ¶
    C · oc_image_create_from_pathSource · orca.odin:1663

    image_create_from_path :: proc "c" (
    	renderer: canvas_renderer, 
    	path:     string, 
    	flip:     bool, 
    ) -> image ---
     

    Create an image from an image file path. Supported formats are: png, jpeg or bmp.

    External examples orca/breakout

    image_create_from_rgba8 ¶
    C · oc_image_create_from_rgba8Source · orca.odin:1657

    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_destroy ¶
    C · oc_image_destroySource · orca.odin:1665

    image_destroy :: proc "c" (image: image) ---
     

    Destroy an image.

    image_draw ¶
    C · oc_image_drawSource · orca.odin:1795

    image_draw :: proc "c" (image: image, rect: rect) ---
     

    Draw an image.

    External examples orca/breakout

    image_draw_region ¶
    C · oc_image_draw_regionSource · orca.odin:1797

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

    Draw a sub-region of an image.

    image_is_nil ¶
    C · oc_image_is_nilSource · orca.odin:1653

    image_is_nil :: proc "c" (a: image) -> bool ---
     

    Check if an image handle is nil.

    External examples orca/breakout

    image_nil ¶
    C · oc_image_nilSource · orca.odin:1651

    image_nil :: proc "c" () -> image ---
     

    Returns a nil image handle.

    External examples orca/breakout

    image_size ¶
    C · oc_image_sizeSource · orca.odin:1669

    image_size :: proc "c" (image: image) -> [2]f32 ---
     

    Get the size of an image.

    image_upload_region_rgba8 ¶
    C · oc_image_upload_region_rgba8Source · orca.odin:1667

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

    Upload pixels to an image.

    input_next_frame ¶
    C · oc_input_next_frameSource · orca.odin:1134

    input_next_frame :: proc "c" (state: ^input_state) ---

    input_process_event ¶
    C · oc_input_process_eventSource · orca.odin:1133

    input_process_event :: proc "c" (arena: ^arena, state: ^input_state, event: ^event) ---

    input_text_utf32 ¶
    C · oc_input_text_utf32Source · orca.odin:1151

    input_text_utf32 :: proc "c" (arena: ^arena, state: ^input_state) -> str32 ---

    input_text_utf8 ¶
    C · oc_input_text_utf8Source · orca.odin:1152

    input_text_utf8 :: proc "c" (arena: ^arena, state: ^input_state) -> string ---

    io_wait_single_req ¶
    C · oc_io_wait_single_reqSource · orca.odin:1389

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

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

    key_down ¶
    C · oc_key_downSource · orca.odin:1135

    key_down :: proc "c" (state: ^input_state, key: key_code) -> bool ---

    key_down_scancode ¶
    C · oc_key_down_scancodeSource · orca.odin:1139

    key_down_scancode :: proc "c" (state: ^input_state, key: scan_code) -> bool ---

    key_mods ¶
    C · oc_key_modsSource · orca.odin:1157

    key_mods :: proc "c" (state: ^input_state) -> bit_set[keymod_flag; u32] ---

    key_press_count ¶
    C · oc_key_press_countSource · orca.odin:1136

    key_press_count :: proc "c" (state: ^input_state, key: key_code) -> u8 ---

    key_press_count_scancode ¶
    C · oc_key_press_count_scancodeSource · orca.odin:1140

    key_press_count_scancode :: proc "c" (state: ^input_state, key: scan_code) -> u8 ---

    key_release_count ¶
    C · oc_key_release_countSource · orca.odin:1137

    key_release_count :: proc "c" (state: ^input_state, key: key_code) -> u8 ---

    key_release_count_scancode ¶
    C · oc_key_release_count_scancodeSource · orca.odin:1141

    key_release_count_scancode :: proc "c" (state: ^input_state, key: scan_code) -> u8 ---

    key_repeat_count ¶
    C · oc_key_repeat_countSource · orca.odin:1138

    key_repeat_count :: proc "c" (state: ^input_state, key: key_code) -> u8 ---

    key_repeat_count_scancode ¶
    C · oc_key_repeat_count_scancodeSource · orca.odin:1142

    key_repeat_count_scancode :: proc "c" (state: ^input_state, key: scan_code) -> u8 ---

    line_to ¶

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

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

    list_checked_entry ¶

    list_checked_entry :: proc "contextless" (elt: ^list_elt, $T: typeid, $member: string) -> ^T {…}
     

    Same as list_entry but elt might be nil.

    list_empty ¶
    C · oc_list_emptySource · orca.odin:278

    list_empty :: proc "c" (list: list) -> bool ---
     

    Check if a list is empty.

    External examples orca/ui

    list_entry ¶

    list_entry :: proc "contextless" (elt: ^list_elt, $T: typeid, $member: string) -> ^T {…}
     

    Get the entry for a given list element.

    list_first_entry ¶

    list_first_entry :: proc "contextless" (list: ^list, $T: typeid, $member: string) -> ^T {…}

    list_for ¶

    list_for :: proc "contextless" (
    	list:   ^list, 
    	elt:    ^^list_elt, 
    	$T:      typeid, 
    	$member: string, 
    ) -> (^T, bool) {…}
     
    Example:
    _elt: ^list_elt
    for elt in oc.list_for(list, &_elt, int, "elt") {
    }
    
    External examples orca/ui

    list_for_reverse ¶

    list_for_reverse :: proc "contextless" (
    	list:   ^list, 
    	elt:    ^^list_elt, 
    	$T:      typeid, 
    	$member: string, 
    ) -> (^T, bool) {…}

    list_init ¶
    C · oc_list_initSource · orca.odin:280

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

    Zero-initializes a linked list.

    External examples orca/ui

    list_insert ¶
    C · oc_list_insertSource · orca.odin:282

    list_insert :: proc "c" (list: ^list, afterElt: ^list_elt, elt: ^list_elt) ---
     

    Insert an element in a list after a given element.

    list_insert_before ¶
    C · oc_list_insert_beforeSource · orca.odin:284

    list_insert_before :: proc "c" (list: ^list, beforeElt: ^list_elt, elt: ^list_elt) ---
     

    Insert an element in a list before a given element.

    list_iter ¶

    list_iter :: list_for
     
    Example:
    _elt: ^list_elt
    for elt in oc.list_for(list, &_elt, int, "elt") {
    }
    

    list_last_entry ¶

    list_last_entry :: proc "contextless" (list: ^list, $T: typeid, $member: string) -> ^T {…}

    list_next_entry ¶

    list_next_entry :: proc "contextless" (
    	list:   ^list, 
    	elt:    ^list_elt, 
    	$T:      typeid, 
    	$member: string, 
    ) -> ^T {…}
     

    Get the next entry in a list.

    list_pop_back ¶
    C · oc_list_pop_backSource · orca.odin:290

    list_pop_back :: proc "c" (list: ^list) -> ^list_elt ---
     

    Remove the last element from a list.

    list_pop_back_entry ¶

    list_pop_back_entry :: proc "contextless" (list: ^list, $T: typeid, $member: string) -> ^T {…}

    list_pop_front ¶
    C · oc_list_pop_frontSource · orca.odin:294

    list_pop_front :: proc "c" (list: ^list) -> ^list_elt ---
     

    Remove the first element from a list.

    list_pop_front_entry ¶

    list_pop_front_entry :: proc "contextless" (list: ^list, $T: typeid, $member: string) -> ^T {…}

    list_prev_entry ¶

    list_prev_entry :: proc "contextless" (
    	list:   ^list, 
    	elt:    ^list_elt, 
    	$T:      typeid, 
    	$member: string, 
    ) -> ^T {…}
     

    Get the previous entry in a list.

    list_push_back ¶
    C · oc_list_push_backSource · orca.odin:288

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

    Add an element at the end of a list.

    list_push_front ¶
    C · oc_list_push_frontSource · orca.odin:292

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

    Add an element at the beginning of a list.

    list_remove ¶
    C · oc_list_removeSource · orca.odin:286

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

    Remove an element from a list.

    log_error ¶

    log_error :: proc "contextless" (msg: cstring, loc := #caller_location) {…}
    External examples orca/breakout

    log_ext ¶

    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.

    External examples orca/breakout

    log_info ¶

    log_info :: proc "contextless" (msg: cstring, loc := #caller_location) {…}
    External examples orca/breakout

    log_set_level ¶
    C · oc_log_set_levelSource · orca.odin:246

    log_set_level :: proc "c" (level: log_level) ---
     

    Set the logging verbosity.

    log_typed ¶

    log_typed :: proc "contextless" (level: log_level, msg: cstring, loc := #caller_location) {…}

    log_warning ¶

    log_warning :: proc "contextless" (msg: cstring, loc := #caller_location) {…}

    mat2x3_inv ¶
    C · oc_mat2x3_invSource · orca.odin:189

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

    Invert an affine transform represented as a 2x3 matrix.

    mat2x3_mul ¶
    C · oc_mat2x3_mulSource · orca.odin:185

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

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

    External examples orca/clock

    mat2x3_mul_m ¶
    C · oc_mat2x3_mul_mSource · orca.odin:187

    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

    External examples orca/clock

    mat2x3_rotate ¶
    C · oc_mat2x3_rotateSource · orca.odin:191

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

    Return a 2x3 matrix representing a rotation.

    External examples orca/clock

    mat2x3_scale ¶
    C · oc_mat2x3_scaleSource · orca.odin:195

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

    Return a 2x3 matrix representing a scale.

    mat2x3_translate ¶
    C · oc_mat2x3_translateSource · orca.odin:193

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

    Return a 2x3 matrix representing a translation.

    External examples orca/clock

    matrix_multiply_push ¶
    C · oc_matrix_multiply_pushSource · orca.odin:1689

    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.

    External examples orca/breakout · orca/clock

    matrix_pop ¶
    C · oc_matrix_popSource · orca.odin:1691

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

    Pop a matrix from the transform stack.

    External examples orca/breakout · orca/clock

    matrix_push ¶
    C · oc_matrix_pushSource · orca.odin:1687

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

    Push a matrix on the transform stack.

    matrix_top ¶
    C · oc_matrix_topSource · orca.odin:1693

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

    Get the top matrix of the transform stack.

    mouse_clicked ¶
    C · oc_mouse_clickedSource · orca.odin:1146

    mouse_clicked :: proc "c" (state: ^input_state, button: mouse_button) -> bool ---

    mouse_delta ¶
    C · oc_mouse_deltaSource · orca.odin:1149

    mouse_delta :: proc "c" (state: ^input_state) -> [2]f32 ---

    mouse_double_clicked ¶
    C · oc_mouse_double_clickedSource · orca.odin:1147

    mouse_double_clicked :: proc "c" (state: ^input_state, button: mouse_button) -> bool ---

    mouse_down ¶
    C · oc_mouse_downSource · orca.odin:1143

    mouse_down :: proc "c" (state: ^input_state, button: mouse_button) -> bool ---

    mouse_position ¶
    C · oc_mouse_positionSource · orca.odin:1148

    mouse_position :: proc "c" (state: ^input_state) -> [2]f32 ---

    mouse_pressed ¶
    C · oc_mouse_pressedSource · orca.odin:1144

    mouse_pressed :: proc "c" (state: ^input_state, button: mouse_button) -> u8 ---

    mouse_released ¶
    C · oc_mouse_releasedSource · orca.odin:1145

    mouse_released :: proc "c" (state: ^input_state, button: mouse_button) -> u8 ---

    mouse_wheel ¶
    C · oc_mouse_wheelSource · orca.odin:1150

    mouse_wheel :: proc "c" (state: ^input_state) -> [2]f32 ---

    move_to ¶

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

    Move the cursor to a given position.

    External examples orca/breakout

    odin_logger_proc ¶

    odin_logger_proc :: proc(
    	logger_data: rawptr, 
    	level:       runtime.Logger_Level, 
    	text:        string, 
    	options:     bit_set[runtime.Logger_Option], 
    	location := #caller_location, 
    ) {…}

    path_append ¶
    C · oc_path_appendSource · orca.odin:1457

    path_append :: proc "c" (arena: ^arena, parent: string, relPath: string) -> string ---
     

    Append a path to another path.

    path_is_absolute ¶
    C · oc_path_is_absoluteSource · orca.odin:1459

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

    Test wether a path is an absolute path.

    path_join ¶
    C · oc_path_joinSource · orca.odin:1455

    path_join :: proc "c" (arena: ^arena, elements: str8_list) -> string ---
     

    Join path elements to form a path.

    path_slice_directory ¶
    C · oc_path_slice_directorySource · orca.odin:1449

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

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

    path_slice_filename ¶
    C · oc_path_slice_filenameSource · orca.odin:1451

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

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

    path_split ¶
    C · oc_path_splitSource · orca.odin:1453

    path_split :: proc "c" (arena: ^arena, path: string) -> str8_list ---
     

    Split a path into path elements.

    quadratic_to ¶
    C · oc_quadratic_toSource · orca.odin:1757

    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_alloc ¶
    C · oc_rect_atlas_allocSource · orca.odin:1673

    rect_atlas_alloc :: proc "c" (atlas: ^rect_atlas, width: i32, height: i32) -> rect ---
     

    Allocate a rectangular region from an atlas.

    rect_atlas_create ¶
    C · oc_rect_atlas_createSource · orca.odin:1671

    rect_atlas_create :: proc "c" (arena: ^arena, width: i32, height: i32) -> ^rect_atlas ---
     

    Create a rectangle atlas.

    rect_atlas_recycle ¶
    C · oc_rect_atlas_recycleSource · orca.odin:1675

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

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

    rectangle_fill ¶
    C · oc_rectangle_fillSource · orca.odin:1775

    rectangle_fill :: proc "c" (x: f32, y: f32, w: f32, h: f32) ---
     

    Draw a filled rectangle.

    rectangle_stroke ¶
    C · oc_rectangle_strokeSource · orca.odin:1777

    rectangle_stroke :: proc "c" (x: f32, y: f32, w: f32, h: f32) ---
     

    Draw a stroked rectangle.

    request_quit ¶
    C · oc_request_quitSource · orca.odin:1068

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

    Request the system to quit the application.

    External examples orca/breakout · orca/ui

    rounded_rectangle_fill ¶
    C · oc_rounded_rectangle_fillSource · orca.odin:1779

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

    Draw a filled rounded rectangle.

    External examples orca/breakout · orca/clock

    rounded_rectangle_stroke ¶
    C · oc_rounded_rectangle_strokeSource · orca.odin:1781

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

    Draw a stroked rounded rectangle.

    External examples orca/breakout

    scancode_to_keycode ¶
    C · oc_scancode_to_keycodeSource · orca.odin:1070

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

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

    scratch_begin ¶
    C · oc_scratch_beginSource · orca.odin:386

    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.
    External examples orca/breakout · orca/ui

    scratch_begin_next ¶
    C · oc_scratch_begin_nextSource · orca.odin:388

    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 ¶

    scratch_end :: arena_scope_end
     

    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.

    External examples orca/ui · orca/breakout

    set_cap ¶

    set_cap :: proc "c" (cap: cap_type) ---
     

    Set the current cap style.

    set_color ¶
    C · oc_set_colorSource · orca.odin:1701

    set_color :: proc "c" (_color: color) ---
     

    Set the current color.

    External examples orca/breakout · orca/ui

    set_color_rgba ¶
    C · oc_set_color_rgbaSource · orca.odin:1703

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

    Set the current color using linear RGBA values.

    External examples orca/clock · orca/breakout

    set_color_srgba ¶
    C · oc_set_color_srgbaSource · orca.odin:1705

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

    Set the current color using sRGBA values.

    External examples orca/clock

    set_font ¶
    C · oc_set_fontSource · orca.odin:1719

    set_font :: proc "c" (font: font) ---
     

    The the current font.

    External examples orca/breakout · orca/clock

    set_font_size ¶
    C · oc_set_font_sizeSource · orca.odin:1721

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

    Set the current font size.

    External examples orca/breakout · orca/clock

    set_gradient ¶
    C · oc_set_gradientSource · orca.odin:1707

    set_gradient :: proc "c" (
    	blendSpace:  gradient_blend_space, 
    	bottomLeft:  color, 
    	bottomRight: color, 
    	topRight:    color, 
    	topLeft:     color, 
    ) ---
     

    Set the current color gradient.

    set_image ¶
    C · oc_set_imageSource · orca.odin:1725

    set_image :: proc "c" (image: image) ---
     

    Set the current source image.

    External examples orca/breakout

    set_image_source_region ¶
    C · oc_set_image_source_regionSource · orca.odin:1727

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

    Set the current source image region.

    set_joint ¶
    C · oc_set_jointSource · orca.odin:1713

    set_joint :: proc "c" (joint: joint_type) ---
     

    Set the current joint style.

    set_max_joint_excursion ¶
    C · oc_set_max_joint_excursionSource · orca.odin:1715

    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 ¶
    C · oc_set_text_flipSource · orca.odin:1723

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

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

    set_tolerance ¶
    C · oc_set_toleranceSource · orca.odin:1711

    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 ¶
    C · oc_set_widthSource · orca.odin:1709

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

    Set the current line width.

    External examples orca/breakout

    str16_from_buffer ¶
    C · oc_str16_from_bufferSource · orca.odin:489

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

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

    str16_list_first ¶

    str16_list_first :: proc "contextless" (sl: ^str16_list) -> str16 {…}

    str16_list_for ¶

    str16_list_for :: proc "contextless" (
    	list: ^str16_list, 
    	elt:  ^^list_elt, 
    ) -> (^str16_elt, bool) {…}

    str16_list_join ¶
    C · oc_str16_list_joinSource · orca.odin:501

    str16_list_join :: proc "c" (arena: ^arena, list: str16_list) -> str16 ---
     

    Build a string by joining the elements of a string list.

    str16_list_last ¶

    str16_list_last :: proc "contextless" (sl: ^str16_list) -> str16 {…}

    str16_list_push ¶
    C · oc_str16_list_pushSource · orca.odin:499

    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 ¶
    C · oc_str16_push_bufferSource · orca.odin:493

    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 ¶
    C · oc_str16_push_copySource · orca.odin:495

    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 ¶
    C · oc_str16_push_sliceSource · orca.odin:497

    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 ¶
    C · oc_str16_sliceSource · orca.odin:491

    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 ¶
    C · oc_str16_splitSource · orca.odin:507

    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 ¶
    C · oc_str32_from_bufferSource · orca.odin:509

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

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

    str32_list_first ¶

    str32_list_first :: proc "contextless" (sl: ^str32_list) -> str32 {…}

    str32_list_for ¶

    str32_list_for :: proc "contextless" (
    	list: ^str32_list, 
    	elt:  ^^list_elt, 
    ) -> (^str32_elt, bool) {…}

    str32_list_join ¶
    C · oc_str32_list_joinSource · orca.odin:521

    str32_list_join :: proc "c" (arena: ^arena, list: str32_list) -> str32 ---
     

    Build a string by joining the elements of a string list.

    str32_list_last ¶

    str32_list_last :: proc "contextless" (sl: ^str32_list) -> str32 {…}

    str32_list_push ¶
    C · oc_str32_list_pushSource · orca.odin:519

    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 ¶
    C · oc_str32_push_bufferSource · orca.odin:513

    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 ¶
    C · oc_str32_push_copySource · orca.odin:515

    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 ¶
    C · oc_str32_push_sliceSource · orca.odin:517

    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 ¶
    C · oc_str32_sliceSource · orca.odin:511

    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 ¶
    C · oc_str32_splitSource · orca.odin:527

    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_cmp ¶
    C · oc_str8_cmpSource · orca.odin:471

    str8_cmp :: proc "c" (s1: string, s2: string) -> i32 ---
     

    Lexicographically compare the contents of two strings.

    str8_from_buffer ¶
    C · oc_str8_from_bufferSource · orca.odin:459

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

    Make a string from a bytes buffer and a length.

    External examples orca/ui

    str8_list_collate ¶
    C · oc_str8_list_collateSource · orca.odin:479

    str8_list_collate :: proc "c" (
    	arena:     ^arena, 
    	list:      str8_list, 
    	prefix:    string, 
    	separator: string, 
    	suffix:    string, 
    ) -> string ---
     

    Build a string by combining the elements of a string list with a prefix, a suffix, and separators.

    str8_list_empty ¶

    str8_list_empty :: proc "contextless" (list: str8_list) -> bool {…}

    str8_list_first ¶

    str8_list_first :: proc "contextless" (sl: ^str8_list) -> string {…}

    str8_list_for ¶

    str8_list_for :: proc "contextless" (list: ^str8_list, elt: ^^list_elt) -> (^str8_elt, bool) {…}

    str8_list_join ¶
    C · oc_str8_list_joinSource · orca.odin:481

    str8_list_join :: proc "c" (arena: ^arena, list: str8_list) -> string ---
     

    Build a string by joining the elements of a string list.

    str8_list_last ¶

    str8_list_last :: proc "contextless" (sl: ^str8_list) -> string {…}

    str8_list_push ¶
    C · oc_str8_list_pushSource · orca.odin:475

    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.

    External examples orca/ui

    str8_list_pushf ¶
    C · oc_str8_list_pushfSource · orca.odin:477

    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 ¶
    C · oc_str8_push_bufferSource · orca.odin:463

    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 ¶
    C · oc_str8_push_copySource · orca.odin:467

    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.

    External examples orca/ui

    str8_push_cstring ¶
    C · oc_str8_push_cstringSource · orca.odin:465

    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 ¶
    C · oc_str8_push_sliceSource · orca.odin:469

    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 ¶
    C · oc_str8_sliceSource · orca.odin:461

    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 ¶
    C · oc_str8_splitSource · orca.odin:487

    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 ¶
    C · oc_str8_to_cstringSource · orca.odin:473

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

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

    stroke ¶

    stroke :: proc "c" () ---
     

    Stroke the current path.

    surface_bring_to_front ¶
    C · oc_surface_bring_to_frontSource · orca.odin:1583

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

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

    surface_contents_scaling ¶
    C · oc_surface_contents_scalingSource · orca.odin:1581

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

    Get the scaling factor of a surface.

    surface_destroy ¶
    C · oc_surface_destroySource · orca.odin:1573

    surface_destroy :: proc "c" (surface: surface) ---
     

    Destroy a graphics surface.

    surface_get_hidden ¶
    C · oc_surface_get_hiddenSource · orca.odin:1587

    surface_get_hidden :: proc "c" (surface: surface) -> bool ---
     

    Checks if a surface is hidden.

    surface_get_size ¶
    C · oc_surface_get_sizeSource · orca.odin:1579

    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_is_nil ¶
    C · oc_surface_is_nilSource · orca.odin:1571

    surface_is_nil :: proc "c" (surface: surface) -> bool ---
     

    Check if a surface handle is nil.

    surface_nil ¶
    C · oc_surface_nilSource · orca.odin:1569

    surface_nil :: proc "c" () -> surface ---
     

    Returns a nil surface handle.

    surface_send_to_back ¶
    C · oc_surface_send_to_backSource · orca.odin:1585

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

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

    surface_set_hidden ¶
    C · oc_surface_set_hiddenSource · orca.odin:1589

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

    Set the hidden status of a surface.

    text_fill ¶
    C · oc_text_fillSource · orca.odin:1793

    text_fill :: proc "c" (x: f32, y: f32, text: string) ---
     

    Draw a text line.

    External examples orca/clock

    text_outlines ¶
    C · oc_text_outlinesSource · orca.odin:1767

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

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

    External examples orca/breakout

    ui_box_begin_str8 ¶
    C · oc_ui_box_begin_str8Source · orca.odin:2035

    ui_box_begin_str8 :: proc "c" (string: string) -> ^ui_box ---
    External examples orca/ui

    ui_box_end ¶
    C · oc_ui_box_endSource · orca.odin:2036

    ui_box_end :: proc "c" () -> ^ui_box ---
    External examples orca/ui

    ui_box_get_sig ¶
    C · oc_ui_box_get_sigSource · orca.odin:2045

    ui_box_get_sig :: proc "c" (box: ^ui_box) -> ui_sig ---

    ui_box_release_focus ¶
    C · oc_ui_box_release_focusSource · orca.odin:2044

    ui_box_release_focus :: proc "c" (box: ^ui_box) ---

    ui_box_request_focus ¶
    C · oc_ui_box_request_focusSource · orca.odin:2043

    ui_box_request_focus :: proc "c" (box: ^ui_box) ---

    ui_box_set_closed ¶
    C · oc_ui_box_set_closedSource · orca.odin:2040

    ui_box_set_closed :: proc "c" (box: ^ui_box, closed: bool) ---

    ui_box_set_draw_proc ¶
    C · oc_ui_box_set_draw_procSource · orca.odin:2037

    ui_box_set_draw_proc :: proc "c" (box: ^ui_box, _proc: ui_box_draw_proc, data: rawptr) ---

    ui_box_set_overlay ¶
    C · oc_ui_box_set_overlaySource · orca.odin:2039

    ui_box_set_overlay :: proc "c" (box: ^ui_box, overlay: bool) ---

    ui_box_set_text ¶
    C · oc_ui_box_set_textSource · orca.odin:2038

    ui_box_set_text :: proc "c" (box: ^ui_box, text: string) ---

    ui_box_tag_str8 ¶
    C · oc_ui_box_tag_str8Source · orca.odin:2055

    ui_box_tag_str8 :: proc "c" (box: ^ui_box, string: string) ---

    ui_box_user_data_get ¶
    C · oc_ui_box_user_data_getSource · orca.odin:2041

    ui_box_user_data_get :: proc "c" (box: ^ui_box) -> cstring ---

    ui_box_user_data_push ¶
    C · oc_ui_box_user_data_pushSource · orca.odin:2042

    ui_box_user_data_push :: proc "c" (box: ^ui_box, size: u64) -> cstring ---

    ui_button ¶
    C · oc_ui_buttonSource · orca.odin:2154

    ui_button :: proc "c" (key: cstring, text: cstring) -> ui_sig ---
    External examples orca/ui

    ui_button_str8 ¶
    C · oc_ui_button_str8Source · orca.odin:2155

    ui_button_str8 :: proc "c" (key: string, text: string) -> ui_sig ---

    ui_checkbox ¶
    C · oc_ui_checkboxSource · orca.odin:2156

    ui_checkbox :: proc "c" (key: cstring, checked: ^bool) -> ui_sig ---
    External examples orca/ui

    ui_checkbox_str8 ¶
    C · oc_ui_checkbox_str8Source · orca.odin:2157

    ui_checkbox_str8 :: proc "c" (key: string, checked: ^bool) -> ui_sig ---

    ui_container ¶

    @(deferred_none=ui_box_end)
    ui_container :: proc "contextless" (name: string) -> ^ui_box {…}
    External examples orca/ui

    ui_context_create ¶
    C · oc_ui_context_createSource · orca.odin:2024

    ui_context_create :: proc "c" (defaultFont: font) -> ^ui_context ---

    ui_context_destroy ¶
    C · oc_ui_context_destroySource · orca.odin:2025

    ui_context_destroy :: proc "c" (_context: ^ui_context) ---

    ui_draw ¶

    ui_draw :: proc "c" () ---
    External examples orca/ui

    ui_frame_arena ¶
    C · oc_ui_frame_arenaSource · orca.odin:2033

    ui_frame_arena :: proc "c" () -> ^arena ---

    ui_frame_begin ¶
    C · oc_ui_frame_beginSource · orca.odin:2029

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

    ui_frame_end ¶
    C · oc_ui_frame_endSource · orca.odin:2030

    ui_frame_end :: proc "c" () ---

    ui_frame_time ¶
    C · oc_ui_frame_timeSource · orca.odin:2034

    ui_frame_time :: proc "c" () -> f64 ---

    ui_get_context ¶
    C · oc_ui_get_contextSource · orca.odin:2026

    ui_get_context :: proc "c" () -> ^ui_context ---

    ui_get_sig ¶
    C · oc_ui_get_sigSource · orca.odin:2054

    ui_get_sig :: proc "c" () -> ui_sig ---

    ui_input ¶
    C · oc_ui_inputSource · orca.odin:2032

    ui_input :: proc "c" () -> ^input_state ---

    ui_label ¶
    C · oc_ui_labelSource · orca.odin:2152

    ui_label :: proc "c" (key: cstring, label: cstring) -> ui_sig ---
    External examples orca/ui

    ui_label_str8 ¶
    C · oc_ui_label_str8Source · orca.odin:2153

    ui_label_str8 :: proc "c" (key: string, label: string) -> ui_sig ---
    External examples orca/ui

    ui_menu ¶

    @(deferred_none=ui_menu_end)
    ui_menu :: proc "contextless" (key, name: string) {…}
    External examples orca/ui

    ui_menu_bar ¶

    @(deferred_none=ui_menu_bar_end)
    ui_menu_bar :: proc "contextless" (key: string) {…}
    External examples orca/ui

    ui_menu_bar_begin ¶
    C · oc_ui_menu_bar_beginSource · orca.odin:2162

    ui_menu_bar_begin :: proc "c" (key: cstring) ---

    ui_menu_bar_begin_str8 ¶
    C · oc_ui_menu_bar_begin_str8Source · orca.odin:2163

    ui_menu_bar_begin_str8 :: proc "c" (key: string) ---

    ui_menu_bar_end ¶
    C · oc_ui_menu_bar_endSource · orca.odin:2164

    ui_menu_bar_end :: proc "c" () ---

    ui_menu_begin ¶
    C · oc_ui_menu_beginSource · orca.odin:2165

    ui_menu_begin :: proc "c" (key: cstring, name: cstring) ---

    ui_menu_begin_str8 ¶
    C · oc_ui_menu_begin_str8Source · orca.odin:2166

    ui_menu_begin_str8 :: proc "c" (key, name: string) ---

    ui_menu_button ¶
    C · oc_ui_menu_buttonSource · orca.odin:2168

    ui_menu_button :: proc "c" (key: cstring, text: cstring) -> ui_sig ---
    External examples orca/ui

    ui_menu_button_str8 ¶
    C · oc_ui_menu_button_str8Source · orca.odin:2169

    ui_menu_button_str8 :: proc "c" (key: string, text: string) -> ui_sig ---

    ui_menu_end ¶
    C · oc_ui_menu_endSource · orca.odin:2167

    ui_menu_end :: proc "c" () ---

    ui_process_event ¶
    C · oc_ui_process_eventSource · orca.odin:2028

    ui_process_event :: proc "c" (event: ^event) ---
    External examples orca/ui

    ui_radio_group ¶
    C · oc_ui_radio_groupSource · orca.odin:2174

    ui_radio_group :: proc "c" (key: cstring, info: ^ui_radio_group_info) -> ui_radio_group_info ---
    External examples orca/ui

    ui_radio_group_str8 ¶
    C · oc_ui_radio_group_str8Source · orca.odin:2175

    ui_radio_group_str8 :: proc "c" (
    	key:  string, 
    	info: ^ui_radio_group_info, 
    ) -> ui_radio_group_info ---

    ui_release_focus ¶
    C · oc_ui_release_focusSource · orca.odin:2053

    ui_release_focus :: proc "c" () ---

    ui_request_focus ¶
    C · oc_ui_request_focusSource · orca.odin:2052

    ui_request_focus :: proc "c" () ---

    ui_select_popup ¶
    C · oc_ui_select_popupSource · orca.odin:2172

    ui_select_popup :: proc "c" (
    	key:  cstring, 
    	info: ^ui_select_popup_info, 
    ) -> ui_select_popup_info ---
    External examples orca/ui

    ui_select_popup_str8 ¶
    C · oc_ui_select_popup_str8Source · orca.odin:2173

    ui_select_popup_str8 :: proc "c" (
    	key:  string, 
    	info: ^ui_select_popup_info, 
    ) -> ui_select_popup_info ---

    ui_set_closed ¶
    C · oc_ui_set_closedSource · orca.odin:2049

    ui_set_closed :: proc "c" (closed: bool) ---

    ui_set_context ¶
    C · oc_ui_set_contextSource · orca.odin:2027

    ui_set_context :: proc "c" (_context: ^ui_context) ---

    ui_set_draw_proc ¶
    C · oc_ui_set_draw_procSource · orca.odin:2046

    ui_set_draw_proc :: proc "c" (_proc: ui_box_draw_proc, data: rawptr) ---

    ui_set_overlay ¶
    C · oc_ui_set_overlaySource · orca.odin:2048

    ui_set_overlay :: proc "c" (overlay: bool) ---

    ui_set_text ¶
    C · oc_ui_set_textSource · orca.odin:2047

    ui_set_text :: proc "c" (text: string) ---

    ui_slider ¶
    C · oc_ui_sliderSource · orca.odin:2158

    ui_slider :: proc "c" (name: cstring, value: ^f32) -> ^ui_box ---
    External examples orca/ui

    ui_slider_str8 ¶
    C · oc_ui_slider_str8Source · orca.odin:2159

    ui_slider_str8 :: proc "c" (name: string, value: ^f32) -> ^ui_box ---

    ui_style_rule_begin ¶
    C · oc_ui_style_rule_beginSource · orca.odin:2058

    ui_style_rule_begin :: proc "c" (pattern: string) ---

    ui_style_rule_end ¶
    C · oc_ui_style_rule_endSource · orca.odin:2059

    ui_style_rule_end :: proc "c" () ---

    ui_style_set_color ¶
    C · oc_ui_style_set_colorSource · orca.odin:2062

    ui_style_set_color :: proc "c" (attr: ui_attribute, _color: color) ---

    ui_style_set_f32 ¶
    C · oc_ui_style_set_f32Source · orca.odin:2061

    ui_style_set_f32 :: proc "c" (attr: ui_attribute, f: f32) ---

    ui_style_set_font ¶
    C · oc_ui_style_set_fontSource · orca.odin:2063

    ui_style_set_font :: proc "c" (attr: ui_attribute, font: font) ---

    ui_style_set_i32 ¶
    C · oc_ui_style_set_i32Source · orca.odin:2060

    ui_style_set_i32 :: proc "c" (attr: ui_attribute, i: i32) ---

    ui_style_set_size ¶
    C · oc_ui_style_set_sizeSource · orca.odin:2064

    ui_style_set_size :: proc "c" (attr: ui_attribute, size: ui_size) ---

    ui_style_set_var ¶
    C · oc_ui_style_set_varSource · orca.odin:2066

    ui_style_set_var :: proc "c" (attr: ui_attribute, var: cstring) ---

    ui_style_set_var_str8 ¶
    C · oc_ui_style_set_var_str8Source · orca.odin:2065

    ui_style_set_var_str8 :: proc "c" (attr: ui_attribute, var: string) ---

    ui_tag_next_str8 ¶
    C · oc_ui_tag_next_str8Source · orca.odin:2057

    ui_tag_next_str8 :: proc "c" (string: string) ---

    ui_tag_str8 ¶
    C · oc_ui_tag_str8Source · orca.odin:2056

    ui_tag_str8 :: proc "c" (string: string) ---

    ui_text_box ¶
    C · oc_ui_text_boxSource · orca.odin:2170

    ui_text_box :: proc "c" (
    	key:   cstring, 
    	arena: ^arena, 
    	info:  ^ui_text_box_info, 
    ) -> ui_text_box_result ---
    External examples orca/ui

    ui_text_box_str8 ¶
    C · oc_ui_text_box_str8Source · orca.odin:2171

    ui_text_box_str8 :: proc "c" (
    	key:   string, 
    	arena: ^arena, 
    	info:  ^ui_text_box_info, 
    ) -> ui_text_box_result ---

    ui_theme_dark ¶
    C · oc_ui_theme_darkSource · orca.odin:2101

    ui_theme_dark :: proc "c" () ---

    ui_theme_light ¶
    C · oc_ui_theme_lightSource · orca.odin:2102

    ui_theme_light :: proc "c" () ---

    ui_tooltip ¶
    C · oc_ui_tooltipSource · orca.odin:2160

    ui_tooltip :: proc "c" (key: cstring, text: cstring) ---
    External examples orca/ui

    ui_tooltip_str8 ¶
    C · oc_ui_tooltip_str8Source · orca.odin:2161

    ui_tooltip_str8 :: proc "c" (key: string, text: string) ---

    ui_user_data_get ¶
    C · oc_ui_user_data_getSource · orca.odin:2050

    ui_user_data_get :: proc "c" () -> cstring ---

    ui_user_data_push ¶
    C · oc_ui_user_data_pushSource · orca.odin:2051

    ui_user_data_push :: proc "c" (size: u64) -> cstring ---

    ui_var_default ¶
    C · oc_ui_var_defaultSource · orca.odin:2078

    ui_var_default :: proc "c" (name: cstring, src: cstring) ---

    ui_var_default_color ¶
    C · oc_ui_var_default_colorSource · orca.odin:2076

    ui_var_default_color :: proc "c" (name: cstring, _color: color) ---

    ui_var_default_color_str8 ¶
    C · oc_ui_var_default_color_str8Source · orca.odin:2070

    ui_var_default_color_str8 :: proc "c" (name: string, _color: color) ---

    ui_var_default_f32 ¶
    C · oc_ui_var_default_f32Source · orca.odin:2074

    ui_var_default_f32 :: proc "c" (name: cstring, f: f32) ---

    ui_var_default_f32_str8 ¶
    C · oc_ui_var_default_f32_str8Source · orca.odin:2068

    ui_var_default_f32_str8 :: proc "c" (name: string, f: f32) ---

    ui_var_default_font ¶
    C · oc_ui_var_default_fontSource · orca.odin:2077

    ui_var_default_font :: proc "c" (name: cstring, font: font) ---

    ui_var_default_font_str8 ¶
    C · oc_ui_var_default_font_str8Source · orca.odin:2071

    ui_var_default_font_str8 :: proc "c" (name: string, font: font) ---

    ui_var_default_i32 ¶
    C · oc_ui_var_default_i32Source · orca.odin:2073

    ui_var_default_i32 :: proc "c" (name: cstring, i: i32) ---

    ui_var_default_i32_str8 ¶
    C · oc_ui_var_default_i32_str8Source · orca.odin:2067

    ui_var_default_i32_str8 :: proc "c" (name: string, i: i32) ---

    ui_var_default_size ¶
    C · oc_ui_var_default_sizeSource · orca.odin:2075

    ui_var_default_size :: proc "c" (name: cstring, size: ui_size) ---

    ui_var_default_size_str8 ¶
    C · oc_ui_var_default_size_str8Source · orca.odin:2069

    ui_var_default_size_str8 :: proc "c" (name: string, size: ui_size) ---

    ui_var_default_str8 ¶
    C · oc_ui_var_default_str8Source · orca.odin:2072

    ui_var_default_str8 :: proc "c" (name: string, src: string) ---

    ui_var_get_color ¶
    C · oc_ui_var_get_colorSource · orca.odin:2099

    ui_var_get_color :: proc "c" (name: cstring) -> color ---

    ui_var_get_color_str8 ¶
    C · oc_ui_var_get_color_str8Source · orca.odin:2094

    ui_var_get_color_str8 :: proc "c" (name: string) -> color ---

    ui_var_get_f32 ¶
    C · oc_ui_var_get_f32Source · orca.odin:2097

    ui_var_get_f32 :: proc "c" (name: cstring) -> f32 ---

    ui_var_get_f32_str8 ¶
    C · oc_ui_var_get_f32_str8Source · orca.odin:2092

    ui_var_get_f32_str8 :: proc "c" (name: string) -> f32 ---

    ui_var_get_font ¶
    C · oc_ui_var_get_fontSource · orca.odin:2100

    ui_var_get_font :: proc "c" (name: cstring) -> font ---

    ui_var_get_font_str8 ¶
    C · oc_ui_var_get_font_str8Source · orca.odin:2095

    ui_var_get_font_str8 :: proc "c" (name: string) -> font ---

    ui_var_get_i32 ¶
    C · oc_ui_var_get_i32Source · orca.odin:2096

    ui_var_get_i32 :: proc "c" (name: cstring) -> i32 ---

    ui_var_get_i32_str8 ¶
    C · oc_ui_var_get_i32_str8Source · orca.odin:2091

    ui_var_get_i32_str8 :: proc "c" (name: string) -> i32 ---

    ui_var_get_size ¶
    C · oc_ui_var_get_sizeSource · orca.odin:2098

    ui_var_get_size :: proc "c" (name: cstring) -> ui_size ---

    ui_var_get_size_str8 ¶
    C · oc_ui_var_get_size_str8Source · orca.odin:2093

    ui_var_get_size_str8 :: proc "c" (name: string) -> ui_size ---

    ui_var_set ¶
    C · oc_ui_var_setSource · orca.odin:2090

    ui_var_set :: proc "c" (name: cstring, src: cstring) ---

    ui_var_set_color ¶
    C · oc_ui_var_set_colorSource · orca.odin:2088

    ui_var_set_color :: proc "c" (name: cstring, _color: color) ---

    ui_var_set_color_str8 ¶
    C · oc_ui_var_set_color_str8Source · orca.odin:2082

    ui_var_set_color_str8 :: proc "c" (name: string, _color: color) ---

    ui_var_set_f32 ¶
    C · oc_ui_var_set_f32Source · orca.odin:2086

    ui_var_set_f32 :: proc "c" (name: cstring, f: f32) ---

    ui_var_set_f32_str8 ¶
    C · oc_ui_var_set_f32_str8Source · orca.odin:2080

    ui_var_set_f32_str8 :: proc "c" (name: string, f: f32) ---

    ui_var_set_font ¶
    C · oc_ui_var_set_fontSource · orca.odin:2089

    ui_var_set_font :: proc "c" (name: cstring, font: font) ---

    ui_var_set_font_str8 ¶
    C · oc_ui_var_set_font_str8Source · orca.odin:2083

    ui_var_set_font_str8 :: proc "c" (name: string, font: font) ---

    ui_var_set_i32 ¶
    C · oc_ui_var_set_i32Source · orca.odin:2085

    ui_var_set_i32 :: proc "c" (name: cstring, i: i32) ---

    ui_var_set_i32_str8 ¶
    C · oc_ui_var_set_i32_str8Source · orca.odin:2079

    ui_var_set_i32_str8 :: proc "c" (name: string, i: i32) ---

    ui_var_set_size ¶
    C · oc_ui_var_set_sizeSource · orca.odin:2087

    ui_var_set_size :: proc "c" (name: cstring, size: ui_size) ---

    ui_var_set_size_str8 ¶
    C · oc_ui_var_set_size_str8Source · orca.odin:2081

    ui_var_set_size_str8 :: proc "c" (name: string, size: ui_size) ---

    ui_var_set_str8 ¶
    C · oc_ui_var_set_str8Source · orca.odin:2084

    ui_var_set_str8 :: proc "c" (name: string, src: string) ---

    utf8_byte_count_for_codepoints ¶
    C · oc_utf8_byte_count_for_codepointsSource · orca.odin:581

    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_count_for_string ¶
    C · oc_utf8_codepoint_count_for_stringSource · orca.odin:579

    utf8_codepoint_count_for_string :: proc "c" (string: string) -> u64 ---

    utf8_codepoint_size ¶
    C · oc_utf8_codepoint_sizeSource · orca.odin:578

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

    Get the size of the utf8 encoding of a codepoint.

    utf8_decode ¶
    C · oc_utf8_decodeSource · orca.odin:587

    utf8_decode :: proc "c" (string: string) -> utf8_dec ---
     

    Decode a utf8 encoded codepoint.

    utf8_decode_at ¶
    C · oc_utf8_decode_atSource · orca.odin:589

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

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

    utf8_encode ¶
    C · oc_utf8_encodeSource · orca.odin:591

    utf8_encode :: proc "c" (dst: cstring, codePoint: rune) -> string ---
     

    Encode a unicode codepoint into a utf8 sequence.

    utf8_from_codepoints ¶
    C · oc_utf8_from_codepointsSource · orca.odin:595

    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 ¶
    C · oc_utf8_next_offsetSource · orca.odin:583

    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 ¶
    C · oc_utf8_prev_offsetSource · orca.odin:585

    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 ¶
    C · oc_utf8_push_from_codepointsSource · orca.odin:599

    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 ¶
    C · oc_utf8_push_to_codepointsSource · orca.odin:597

    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 ¶
    C · oc_utf8_size_from_leading_charSource · orca.odin:576

    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 ¶
    C · oc_utf8_to_codepointsSource · orca.odin:593

    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.

    vec2_add ¶
    C · oc_vec2_addSource · orca.odin:183

    vec2_add :: proc "c" (v0: [2]f32, v1: [2]f32) -> [2]f32 ---
     

    Add two 2D vectors

    vec2_equal ¶
    C · oc_vec2_equalSource · orca.odin:179

    vec2_equal :: proc "c" (v0: [2]f32, v1: [2]f32) -> bool ---
     

    Check if two 2D vectors are equal.

    vec2_mul ¶
    C · oc_vec2_mulSource · orca.odin:181

    vec2_mul :: proc "c" (f: f32, v: [2]f32) -> [2]f32 ---
     

    Multiply a 2D vector by a scalar.

    window_set_size ¶
    C · oc_window_set_sizeSource · orca.odin:1066

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

    Set the size of the application's window.

    External examples orca/ui · orca/clock

    window_set_title ¶
    C · oc_window_set_titleSource · orca.odin:1064

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

    Set the title of the application's window.

    External examples orca/breakout · orca/ui · orca/clock

    Procedure Groups

    This section is empty.

    Source Files

    Generation Information

    Generated with odin version dev-2026-10 (vendor "odin") Windows_amd64 @ 2026-10-10 00:25:51.511820200 +0000 UTC