package core:sys/orca
Warning: This was generated for -target:windows_amd64
and might not represent every target this package supports.
Overview
File contains implementations of the Orca API that are defined as macros in Orca.
File contains Odin specific helpers.
Index
Types (125)
- arena
- arena_chunk
- arena_options
- arena_scope
- base_allocator
- canvas_context
- canvas_renderer
- cap_type
- char
- char_event
- clipboard_state
- clock_kind
- color
- color_space
- datestamp
- event
- event_type
- file
- file_access
- file_access_flag
- file_dialog_button
- file_dialog_desc
- file_dialog_flag
- file_dialog_flags
- file_dialog_kind
- file_dialog_result
- file_open_flag
- file_open_flags
- file_open_with_dialog_elt
- file_open_with_dialog_result
- file_perm
- file_perm_flag
- file_status
- file_type
- file_whence
- font
- font_metrics
- glyph_metrics
- gradient_blend_space
- image
- image_region
- input_state
- io_cmp
- io_error
- io_op
- io_req
- io_req_id
- joint_type
- key_action
- key_code
- key_event
- key_state
- keyboard_state
- keymod_flag
- keymod_flags
- list
- list_elt
- log_level
- mat2x3
- mem_modify_proc
- mem_reserve_proc
- mouse_button
- mouse_event
- mouse_state
- move_event
- pool
- rect
- rect_atlas
- scan_code
- str16
- str16_elt
- str16_list
- str32
- str32_elt
- str32_list
- str8
- str8_elt
- str8_list
- style_enum
- surface
- sys_err_def
- text_metrics
- text_state
- ui_align
- ui_axis
- ui_box
- ui_box_draw_proc
- ui_box_floating
- ui_box_size
- ui_context
- ui_edit_move
- ui_flag
- ui_flags
- ui_input_text
- ui_key
- ui_layout
- ui_layout_align
- ui_palette
- ui_pattern
- ui_radio_group_info
- ui_select_popup_info
- ui_selector
- ui_selector_kind
- ui_selector_op
- ui_sig
- ui_size
- ui_size_kind
- ui_stack_elt
- ui_status
- ui_status_flag
- ui_style
- ui_style_mask
- ui_style_rule
- ui_tag
- ui_tag_elt
- ui_text_box_result
- ui_theme
- unicode_range
- utf32
- utf8_dec
- vec2
- vec2i
- vec3
- vec4
- window
Constants (133)
- BACKING_SIZE
- BOX_MAP_BUCKET_COUNT
- FLOAT
- LAYOUT
- LAYOUT_MARGINS
- MASK_INHERITED
- MAX_INPUT_CHAR_PER_FRAME
- SIZE
- SYS_MAX_ERROR
- UNICODE_AEGEAN_NUMBERS
- UNICODE_ALPHABETIC_PRESENTATION_FORMS
- UNICODE_ARABIC
- UNICODE_ARABIC_PRESENTATION_FORMS_A
- UNICODE_ARABIC_PRESENTATION_FORMS_B
- UNICODE_ARMENIAN
- UNICODE_ARROWS
- UNICODE_BASIC_LATIN
- UNICODE_BENGALI_ASSAMESE
- UNICODE_BLOCK_ELEMENTS
- UNICODE_BOPOMOFO
- UNICODE_BOPOMOFO_EXTENDED
- UNICODE_BOX_DRAWING
- UNICODE_BRAILLE_PATTERNS
- UNICODE_BUHID
- UNICODE_BYZANTINE_MUSICAL_SYMBOLS
- UNICODE_C1_CONTROLS_AND_LATIN_1_SUPPLEMENT
- UNICODE_CHEROKEE
- UNICODE_CJK_COMPATIBILITY
- UNICODE_CJK_COMPATIBILITY_FORMS
- UNICODE_CJK_COMPATIBILITY_IDEOGRAPHS
- UNICODE_CJK_COMPATIBILITY_IDEOGRAPHS_SUPPLEMENT
- UNICODE_CJK_RADICALS_SUPPLEMENT
- UNICODE_CJK_SYMBOLS_AND_PUNCTUATION
- UNICODE_CJK_UNIFIED_IDEOGRAPHS
- UNICODE_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_A
- UNICODE_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_B
- UNICODE_COMBINING_DIACRITICAL_MARKS
- UNICODE_COMBINING_DIACRITICAL_MARKS_FOR_SYMBOLS
- UNICODE_COMBINING_HALF_MARKS
- UNICODE_CONTROL_PICTURES
- UNICODE_CURRENCY_SYMBOLS
- UNICODE_CYPRIOT_SYLLABARY
- UNICODE_CYRILLIC
- UNICODE_CYRILLIC_SUPPLEMENT
- UNICODE_DESERET
- UNICODE_DEVANAGARI
- UNICODE_DINGBATS
- UNICODE_ENCLOSED_ALPHANUMERICS
- UNICODE_ENCLOSED_CJK_LETTERS_AND_MONTHS
- UNICODE_ETHIOPIC
- UNICODE_GENERAL_PUNCTUATION
- UNICODE_GEOMETRIC_SHAPES
- UNICODE_GEORGIAN
- UNICODE_GOTHIC
- UNICODE_GREEK_COPTIC
- UNICODE_GREEK_EXTENDED
- UNICODE_GUJARATI
- UNICODE_GURMUKHI
- UNICODE_HALFWIDTH_AND_FULLWIDTH_FORMS
- UNICODE_HANGUL_COMPATIBILITY_JAMO
- UNICODE_HANGUL_JAMO
- UNICODE_HANGUL_SYLLABLES
- UNICODE_HANUNOO
- UNICODE_HEBREW
- UNICODE_HIGH_SURROGATE_AREA
- UNICODE_HIRAGANA
- UNICODE_IDEOGRAPHIC_DESCRIPTION_CHARACTERS
- UNICODE_IPA_EXTENSIONS
- UNICODE_KANBUN_KUNTEN
- UNICODE_KANGXI_RADICALS
- UNICODE_KANNADA
- UNICODE_KATAKANA
- UNICODE_KATAKANA_PHONETIC_EXTENSIONS
- UNICODE_KHMER
- UNICODE_KHMER_SYMBOLS
- UNICODE_LAO
- UNICODE_LATIN_EXTENDED_A
- UNICODE_LATIN_EXTENDED_ADDITIONAL
- UNICODE_LATIN_EXTENDED_B
- UNICODE_LETTERLIKE_SYMBOLS
- UNICODE_LIMBU
- UNICODE_LINEAR_B_IDEOGRAMS
- UNICODE_LINEAR_B_SYLLABARY
- UNICODE_LOW_SURROGATE_AREA
- UNICODE_MALAYALAM
- UNICODE_MATHEMATICAL_ALPHANUMERIC_SYMBOLS
- UNICODE_MATHEMATICAL_OPERATORS
- UNICODE_MISCELLANEOUS_MATHEMATICAL_SYMBOLS_A
- UNICODE_MISCELLANEOUS_MATHEMATICAL_SYMBOLS_B
- UNICODE_MISCELLANEOUS_SYMBOLS
- UNICODE_MISCELLANEOUS_SYMBOLS_AND_ARROWS
- UNICODE_MISCELLANEOUS_TECHNICAL
- UNICODE_MONGOLIAN
- UNICODE_MUSICAL_SYMBOLS
- UNICODE_MYANMAR
- UNICODE_NUMBER_FORMS
- UNICODE_OGHAM
- UNICODE_OLD_ITALIC
- UNICODE_OPTICAL_CHARACTER_RECOGNITION
- UNICODE_ORIYA
- UNICODE_OSMANYA
- UNICODE_PHONETIC_EXTENSIONS
- UNICODE_PRIVATE_USE_AREA
- UNICODE_RUNIC
- UNICODE_SHAVIAN
- UNICODE_SINHALA
- UNICODE_SMALL_FORM_VARIANTS
- UNICODE_SPACING_MODIFIER_LETTERS
- UNICODE_SPECIALS
- UNICODE_SUPERSCRIPTS_AND_SUBSCRIPTS
- UNICODE_SUPPLEMENTAL_ARROWS_A
- UNICODE_SUPPLEMENTAL_ARROWS_B
- UNICODE_SUPPLEMENTAL_MATHEMATICAL_OPERATORS
- UNICODE_SUPPLEMENTARY_PRIVATE_USE_AREA_A
- UNICODE_SUPPLEMENTARY_PRIVATE_USE_AREA_B
- UNICODE_SYRIAC
- UNICODE_TAGALOG
- UNICODE_TAGBANWA
- UNICODE_TAGS
- UNICODE_TAI_LE
- UNICODE_TAI_XUAN_JING_SYMBOLS
- UNICODE_TAMIL
- UNICODE_TELUGU
- UNICODE_THAANA
- UNICODE_THAI
- UNICODE_TIBETAN
- UNICODE_UGARITIC
- UNICODE_UNIFIED_CANADIAN_ABORIGINAL_SYLLABICS
- UNICODE_VARIATION_SELECTORS
- UNICODE_VARIATION_SELECTORS_SUPPLEMENT
- UNICODE_YIJING_HEXAGRAM_SYMBOLS
- UNICODE_YI_RADICALS
- UNICODE_YI_SYLLABLES
Variables (5)
Procedures (334)
- abort
- abort_ext
- arc
- arena_cleanup
- arena_clear
- arena_init
- arena_init_with_options
- arena_push
- arena_push_aligned
- arena_push_array
- arena_push_type
- arena_scope_begin
- arena_scope_end
- assert_fail
- canvas_context_create
- canvas_context_destroy
- canvas_context_is_nil
- canvas_context_nil
- canvas_context_select
- canvas_context_set_msaa_sample_count
- canvas_present
- canvas_render
- canvas_renderer_create
- canvas_renderer_destroy
- canvas_renderer_is_nil
- canvas_renderer_nil
- canvas_surface_create
- canvas_surface_swap_interval
- circle_fill
- circle_stroke
- clear
- clip_pop
- clip_push
- clip_top
- clipboard_pasted
- clipboard_pasted_text
- clipboard_set_string
- clock_time
- close_path
- codepoints_outlines
- color_convert
- color_rgba
- color_srgba
- create_odin_logger
- cubic_to
- ellipse_fill
- ellipse_stroke
- file_close
- file_get_status
- file_is_nil
- file_last_error
- file_nil
- file_open
- file_open_at
- file_open_with_dialog
- file_open_with_request
- file_pos
- file_read
- file_read_slice
- file_seek
- file_size
- file_write
- file_write_slice
- fill
- font_create_from_file
- font_create_from_memory
- font_create_from_path
- font_destroy
- font_get_glyph_index
- font_get_glyph_indices
- font_get_metrics
- font_get_metrics_unscaled
- font_get_scale_for_em_pixels
- font_is_nil
- font_nil
- font_push_glyph_indices
- font_text_metrics
- font_text_metrics_utf32
- get_cap
- get_color
- get_font
- get_font_size
- get_image
- get_image_source_region
- get_joint
- get_max_joint_excursion
- get_position
- get_text_flip
- get_tolerance
- get_width
- gles_surface_create
- gles_surface_make_current
- gles_surface_swap_buffers
- gles_surface_swap_interval
- glyph_outlines
- image_atlas_alloc_from_file
- image_atlas_alloc_from_memory
- image_atlas_alloc_from_path
- image_atlas_alloc_from_rgba8
- image_atlas_recycle
- image_create
- image_create_from_file
- image_create_from_memory
- image_create_from_path
- image_create_from_rgba8
- image_destroy
- image_draw
- image_draw_region
- image_is_nil
- image_nil
- image_size
- image_upload_region_rgba8
- input_next_frame
- input_process_event
- input_text_utf32
- input_text_utf8
- io_wait_single_req
- key_down
- key_down_scancode
- key_mods
- key_press_count
- key_press_count_scancode
- key_release_count
- key_release_count_scancode
- key_repeat_count
- key_repeat_count_scancode
- line_to
- list_checked_entry
- list_empty
- list_entry
- list_first_entry
- list_for
- list_for_reverse
- list_init
- list_insert
- list_insert_before
- list_iter
- list_iter_reverse
- list_last_entry
- list_next_entry
- list_pop_back
- list_pop_back_entry
- list_pop_front
- list_pop_front_entry
- list_prev_entry
- list_push_back
- list_push_front
- list_remove
- log_error
- log_ext
- log_info
- log_set_level
- log_warning
- mat2x3_inv
- mat2x3_mul
- mat2x3_mul_m
- mat2x3_rotate
- mat2x3_translate
- matrix_multiply_push
- matrix_pop
- matrix_push
- matrix_top
- mouse_clicked
- mouse_delta
- mouse_double_clicked
- mouse_down
- mouse_position
- mouse_pressed
- mouse_released
- mouse_wheel
- move_to
- odin_logger_proc
- path_append
- path_is_absolute
- path_join
- path_slice_directory
- path_slice_filename
- path_split
- quadratic_to
- rect_atlas_alloc
- rect_atlas_create
- rect_atlas_recycle
- rectangle_fill
- rectangle_stroke
- request_quit
- rounded_rectangle_fill
- rounded_rectangle_stroke
- scancode_to_keycode
- scratch_begin
- scratch_begin_next
- scratch_end
- set_cap
- set_color
- set_color_rgba
- set_color_srgba
- set_font
- set_font_size
- set_gradient
- set_image
- set_image_source_region
- set_joint
- set_max_joint_excursion
- set_text_flip
- set_tolerance
- set_width
- str16_from_buffer
- str16_list_first
- str16_list_for
- str16_list_join
- str16_list_last
- str16_list_push
- str16_push_buffer
- str16_push_copy
- str16_push_slice
- str16_slice
- str16_split
- str32_from_buffer
- str32_list_first
- str32_list_for
- str32_list_join
- str32_list_last
- str32_list_push
- str32_push_buffer
- str32_push_copy
- str32_push_slice
- str32_slice
- str32_split
- str8_cmp
- str8_from_buffer
- str8_list_collate
- str8_list_empty
- str8_list_first
- str8_list_for
- str8_list_iter
- str8_list_join
- str8_list_last
- str8_list_push
- str8_list_pushf
- str8_push_buffer
- str8_push_copy
- str8_push_cstring
- str8_push_slice
- str8_slice
- str8_split
- str8_to_cstring
- stroke
- surface_bring_to_front
- surface_contents_scaling
- surface_destroy
- surface_get_hidden
- surface_get_size
- surface_is_nil
- surface_nil
- surface_send_to_back
- surface_set_hidden
- text_fill
- text_outlines
- ui_apply_style_with_mask
- ui_begin_frame
- ui_box_activate
- ui_box_active
- ui_box_begin_str8
- ui_box_closed
- ui_box_deactivate
- ui_box_end
- ui_box_hot
- ui_box_lookup_key
- ui_box_lookup_str8
- ui_box_make_str8
- ui_box_pop
- ui_box_push
- ui_box_set_closed
- ui_box_set_draw_proc
- ui_box_set_hot
- ui_box_sig
- ui_box_top
- ui_button
- ui_checkbox
- ui_container
- ui_draw
- ui_end_frame
- ui_frame
- ui_get_context
- ui_init
- ui_key_make_path
- ui_key_make_str8
- ui_label
- ui_label_str8
- ui_menu
- ui_menu_bar
- ui_menu_bar_begin
- ui_menu_bar_end
- ui_menu_begin
- ui_menu_button
- ui_menu_end
- ui_panel
- ui_panel_begin
- ui_panel_end
- ui_pattern_all
- ui_pattern_owner
- ui_pattern_push
- ui_process_event
- ui_radio_group
- ui_scrollbar
- ui_select_popup
- ui_set_context
- ui_set_theme
- ui_slider
- ui_style_match_after
- ui_style_match_before
- ui_style_next
- ui_tag_box_str8
- ui_tag_make_str8
- ui_tag_next_str8
- ui_text_box
- ui_tooltip
- utf8_byte_count_for_codepoints
- utf8_codepoint_count_for_string
- utf8_codepoint_size
- utf8_decode
- utf8_decode_at
- utf8_encode
- utf8_from_codepoints
- utf8_next_offset
- utf8_prev_offset
- utf8_push_from_codepoints
- utf8_push_to_codepoints
- utf8_size_from_leading_char
- utf8_to_codepoints
- vec2_add
- vec2_equal
- vec2_mul
- window_set_size
- window_set_title
Procedure Groups (0)
This section is empty.
Types
arena ¶
arena :: struct { // An allocator providing memory pages from the system base: ^base_allocator, // A list of `oc_arena_chunk` chunks. chunks: list, // The chunk new memory allocations are pulled from. currentChunk: ^arena_chunk, }
A memory arena, allowing to allocate memory in a linear or stack-like fashion.
Related Procedures With Parameters
- arena_cleanup
- arena_clear
- arena_init
- arena_init_with_options
- arena_push
- arena_push_aligned
- arena_push_array
- arena_push_type
- arena_scope_begin
- file_open_with_dialog
- font_push_glyph_indices
- input_process_event
- input_text_utf32
- input_text_utf8
- path_append
- path_join
- path_split
- rect_atlas_create
- scratch_begin_next
- str16_list_join
- str16_list_push
- str16_push_buffer
- str16_push_copy
- str16_push_slice
- str16_split
- str32_list_join
- str32_list_push
- str32_push_buffer
- str32_push_copy
- str32_push_slice
- str32_split
- str8_list_collate
- str8_list_join
- str8_list_push
- str8_list_pushf
- str8_push_buffer
- str8_push_copy
- str8_push_cstring
- str8_push_slice
- str8_split
- str8_to_cstring
- ui_pattern_push
- ui_text_box
- utf8_push_from_codepoints
- utf8_push_to_codepoints
arena_chunk ¶
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.
Related Procedures With Parameters
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 Parameters
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
Related Procedures With Parameters
- canvas_context_destroy
- canvas_context_is_nil
- canvas_context_select
- canvas_context_set_msaa_sample_count
- canvas_render
Related Procedures With Returns
canvas_renderer ¶
canvas_renderer :: distinct u64
Related Procedures With Parameters
- canvas_present
- canvas_render
- canvas_renderer_destroy
- canvas_renderer_is_nil
- canvas_surface_create
- image_create
- image_create_from_file
- image_create_from_memory
- image_create_from_path
- image_create_from_rgba8
Related Procedures With Returns
cap_type ¶
cap_type :: enum u32 { NONE = 0, SQUARE = 1, }
Related Procedures With Parameters
Related Procedures With Returns
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.
color ¶
color :: struct { using c: [4]f32, colorSpace: color_space, }
Related Procedures With Parameters
Related Procedures With Returns
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.
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 ¶
file :: distinct u64
An opaque handle identifying an opened file.
Related Procedures With Parameters
- file_close
- file_get_status
- file_is_nil
- file_last_error
- file_open_at
- file_pos
- file_read
- file_read_slice
- file_seek
- file_size
- file_write
- file_write_slice
- font_create_from_file
- image_atlas_alloc_from_file
- image_create_from_file
Related Procedures With Returns
file_access ¶
file_access :: bit_set[file_access_flag; u16]
file_access_flag ¶
file_access_flag :: enum u16 { // The file handle can be used for reading from the file. READ = 1, // 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.
Related Procedures With Parameters
file_dialog_flag ¶
file_dialog_flag :: enum u32 { // This dialog allows selecting files. FILES = 1, // 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_flags ¶
file_dialog_flags :: bit_set[file_dialog_flag; u32]
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_open_flag ¶
file_open_flag :: enum u16 { // Open the file in 'append' mode. All writes append data at the end of the file. APPEND = 1, // 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_flags ¶
file_open_flags :: bit_set[file_open_flag; u16]
file_open_with_dialog_elt ¶
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()
.
Related Procedures With Returns
file_perm ¶
file_perm :: bit_set[file_perm_flag; u16]
file_perm_flag ¶
file_perm_flag :: enum u16 { OTHER_EXEC = 1, 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, }
Related Procedures With Returns
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.
Related Procedures With Parameters
font ¶
font :: distinct u64
Related Procedures With Parameters
- font_destroy
- font_get_glyph_index
- font_get_glyph_indices
- font_get_metrics
- font_get_metrics_unscaled
- font_get_scale_for_em_pixels
- font_is_nil
- font_push_glyph_indices
- font_text_metrics
- font_text_metrics_utf32
- set_font
Related Procedures With Returns
font_metrics ¶
font_metrics :: struct { ascent: f32, descent: f32, lineGap: f32, xHeight: f32, capHeight: f32, width: f32, }
Related Procedures With Returns
gradient_blend_space ¶
gradient_blend_space :: enum u32 { LINEAR = 0, SRGB = 1, }
Related Procedures With Parameters
image ¶
image :: distinct u64
Related Procedures With Parameters
- image_atlas_alloc_from_file
- image_atlas_alloc_from_memory
- image_atlas_alloc_from_path
- image_atlas_alloc_from_rgba8
- image_destroy
- image_draw
- image_draw_region
- image_is_nil
- image_size
- image_upload_region_rgba8
- set_image
Related Procedures With Returns
input_state ¶
input_state :: struct { frameCounter: u64, keyboard: keyboard_state, mouse: mouse_state, text: text_state, clipboard: clipboard_state, }
Related Procedures With Parameters
- clipboard_pasted
- clipboard_pasted_text
- input_next_frame
- input_process_event
- input_text_utf32
- input_text_utf8
- key_down
- key_down_scancode
- key_mods
- key_press_count
- key_press_count_scancode
- key_release_count
- key_release_count_scancode
- key_repeat_count
- key_repeat_count_scancode
- mouse_clicked
- mouse_delta
- mouse_double_clicked
- mouse_down
- mouse_position
- mouse_pressed
- mouse_released
- mouse_wheel
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.
Related Procedures With Returns
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.
Related Procedures With Returns
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 { 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.
Related Procedures With Parameters
joint_type ¶
joint_type :: enum u32 { MITER = 0, BEVEL = 1, NONE = 2, }
Related Procedures With Parameters
Related Procedures With Returns
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.
Related Procedures With Parameters
Related Procedures With Returns
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.
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.
Related Procedures With Parameters
- list_checked_entry
- list_entry
- list_insert
- list_insert_before
- list_next_entry
- list_prev_entry
- list_push_back
- list_push_front
- list_remove
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
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.
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 ¶
currently missing in the api.json
rect ¶
An axis-aligned rectangle.
Related Procedures With Parameters
Related Procedures With Returns
rect_atlas ¶
rect_atlas :: struct {}
Related Procedures With Parameters
- image_atlas_alloc_from_file
- image_atlas_alloc_from_memory
- image_atlas_alloc_from_path
- image_atlas_alloc_from_rgba8
- image_atlas_recycle
- rect_atlas_alloc
- rect_atlas_recycle
Related Procedures With Returns
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.
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.
Related Procedures With Returns
str16_list ¶
str16_list :: struct { // A linked-list of `oc_str8_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 ¶
str32 :: distinct []rune
A type describing a string of 32-bits characters (typically used for UTF-32 codepoints).
Related Procedures With Parameters
- codepoints_outlines
- font_get_glyph_indices
- font_push_glyph_indices
- font_text_metrics_utf32
- glyph_outlines
- str32_list_push
- str32_push_copy
- str32_push_slice
- str32_slice
- str32_split
- utf8_byte_count_for_codepoints
- utf8_from_codepoints
- utf8_push_from_codepoints
Related Procedures With Returns
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.
Related Procedures With Returns
str32_list ¶
str32_list :: struct { // A linked-list of `oc_str8_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_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.
Related Procedures With Returns
str8_list ¶
str8_list :: struct { // A linked-list of `oc_str8_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.
Related Procedures With Parameters
- path_join
- str8_list_collate
- str8_list_empty
- str8_list_first
- str8_list_for
- str8_list_join
- str8_list_last
- str8_list_push
- str8_list_pushf
- str8_split
- ui_key_make_path
Related Procedures With Returns
style_enum ¶
style_enum :: enum int { SIZE_WIDTH = 1, SIZE_HEIGHT, LAYOUT_AXIS, LAYOUT_ALIGN_X, LAYOUT_ALIGN_Y, LAYOUT_SPACING, LAYOUT_MARGIN_X, LAYOUT_MARGIN_Y, FLOAT_X, FLOAT_Y, COLOR, BG_COLOR, BORDER_COLOR, BORDER_SIZE, ROUNDNESS, FONT, FONT_SIZE, ANIMATION_TIME, ANIMATION_MASK, }
surface ¶
surface :: distinct u64
Related Procedures With Parameters
- canvas_present
- canvas_render
- canvas_surface_swap_interval
- gles_surface_make_current
- gles_surface_swap_buffers
- gles_surface_swap_interval
- surface_bring_to_front
- surface_contents_scaling
- surface_destroy
- surface_get_hidden
- surface_get_size
- surface_is_nil
- surface_send_to_back
- surface_set_hidden
Related Procedures With Returns
text_metrics ¶
Related Procedures With Returns
ui_align ¶
ui_align :: enum u32 { START = 0, END = 1, CENTER = 2, }
ui_box ¶
ui_box :: struct { listElt: list_elt, children: list, parent: ^ui_box, overlayElt: list_elt, bucketElt: list_elt, key: ui_key, frameCounter: u64, flags: bit_set[ui_flag; u32], string: string, tags: list, drawProc: ui_box_draw_proc, drawData: rawptr, beforeRules: list, afterRules: list, targetStyle: ^ui_style, style: ui_style, z: u32, floatPos: [2]f32, childrenSum: [2]f32, spacing: [2]f32, minSize: [2]f32, rect: rect, 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
- ui_box_activate
- ui_box_active
- ui_box_closed
- ui_box_deactivate
- ui_box_hot
- ui_box_push
- ui_box_set_closed
- ui_box_set_draw_proc
- ui_box_set_hot
- ui_box_sig
- ui_tag_box_str8
Related Procedures With Returns
ui_box_draw_proc ¶
Related Procedures With Parameters
ui_box_floating ¶
ui_box_floating :: [2]bool
ui_box_size ¶
ui_box_size :: [2]ui_size
ui_context ¶
ui_context :: struct { init: bool, input: input_state, frameCounter: u64, frameTime: f64, lastFrameDuration: f64, frameArena: arena, boxPool: pool, boxMap: [1024]list, root: ^ui_box, overlay: ^ui_box, overlayList: list, boxStack: ^ui_stack_elt, clipStack: ^ui_stack_elt, nextBoxBeforeRules: list, nextBoxAfterRules: list, nextBoxTags: list, z: u32, hovered: ^ui_box, focus: ^ui_box, editCursor: i32, editMark: i32, editFirstDisplayedChar: i32, editCursorBlinkStart: f64, editSelectionMode: ui_edit_move, editWordSelectionInitialCursor: i32, editWordSelectionInitialMark: i32, theme: ^ui_theme, }
Related Procedures With Parameters
Related Procedures With Returns
ui_edit_move ¶
ui_edit_move :: enum u32 { NONE = 0, CHAR = 1, WORD = 2, LINE = 3, }
ui_flag ¶
ui_flag :: enum u32 { CLICKABLE = 0, SCROLL_WHEEL_X, SCROLL_WHEEL_Y, BLOCK_MOUSE, HOT_ANIMATION, ACTIVE_ANIMATION, OVERFLOW_ALLOW_X, OVERFLOW_ALLOW_Y, CLIP, DRAW_BACKGROUND, DRAW_FOREGROUND, DRAW_BORDER, DRAW_TEXT, DRAW_PROC, OVERLAY, }
ui_key ¶
ui_key :: struct { hash: u64, }
Related Procedures With Parameters
Related Procedures With Returns
ui_layout_align ¶
ui_layout_align :: [2]ui_align
ui_palette ¶
ui_palette :: struct { red0: color, red1: color, red2: color, red3: color, red4: color, red5: color, red6: color, red7: color, red8: color, red9: color, orange0: color, orange1: color, orange2: color, orange3: color, orange4: color, orange5: color, orange6: color, orange7: color, orange8: color, orange9: color, amber0: color, amber1: color, amber2: color, amber3: color, amber4: color, amber5: color, amber6: color, amber7: color, amber8: color, amber9: color, yellow0: color, yellow1: color, yellow2: color, yellow3: color, yellow4: color, yellow5: color, yellow6: color, yellow7: color, yellow8: color, yellow9: color, lime0: color, lime1: color, lime2: color, lime3: color, lime4: color, lime5: color, lime6: color, lime7: color, lime8: color, lime9: color, lightGreen0: color, lightGreen1: color, lightGreen2: color, lightGreen3: color, lightGreen4: color, lightGreen5: color, lightGreen6: color, lightGreen7: color, lightGreen8: color, lightGreen9: color, green0: color, green1: color, green2: color, green3: color, green4: color, green5: color, green6: color, green7: color, green8: color, green9: color, teal0: color, teal1: color, teal2: color, teal3: color, teal4: color, teal5: color, teal6: color, teal7: color, teal8: color, teal9: color, cyan0: color, cyan1: color, cyan2: color, cyan3: color, cyan4: color, cyan5: color, cyan6: color, cyan7: color, cyan8: color, cyan9: color, lightBlue0: color, lightBlue1: color, lightBlue2: color, lightBlue3: color, lightBlue4: color, lightBlue5: color, lightBlue6: color, lightBlue7: color, lightBlue8: color, lightBlue9: color, blue0: color, blue1: color, blue2: color, blue3: color, blue4: color, blue5: color, blue6: color, blue7: color, blue8: color, blue9: color, indigo0: color, indigo1: color, indigo2: color, indigo3: color, indigo4: color, indigo5: color, indigo6: color, indigo7: color, indigo8: color, indigo9: color, violet0: color, violet1: color, violet2: color, violet3: color, violet4: color, violet5: color, violet6: color, violet7: color, violet8: color, violet9: color, purple0: color, purple1: color, purple2: color, purple3: color, purple4: color, purple5: color, purple6: color, purple7: color, purple8: color, purple9: color, pink0: color, pink1: color, pink2: color, pink3: color, pink4: color, pink5: color, pink6: color, pink7: color, pink8: color, pink9: color, grey0: color, grey1: color, grey2: color, grey3: color, grey4: color, grey5: color, grey6: color, grey7: color, grey8: color, grey9: color, black: color, white: color, }
ui_pattern ¶
ui_pattern :: struct { l: list, }
Related Procedures With Parameters
Related Procedures With Returns
ui_radio_group_info ¶
ui_radio_group_info :: struct { changed: bool, selectedIndex: i32, optionCount: i32 `fmt:"-"`, options: [^]string `fmt:"s,optionCount"`, }
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, }
Related Procedures With Parameters
ui_selector ¶
ui_selector :: struct { listElt: list_elt, kind: ui_selector_kind, op: ui_selector_op, using _: struct #raw_union { text: string, key: ui_key, tag: ui_tag, status: bit_set[ui_status_flag; u8], }, }
Related Procedures With Parameters
ui_selector_kind ¶
ui_selector_kind :: enum u32 { ANY = 0, OWNER = 1, TEXT = 2, TAG = 3, STATUS = 4, KEY = 5, }
ui_selector_op ¶
ui_selector_op :: enum u32 { DESCENDANT = 0, AND = 1, }
ui_sig ¶
ui_sig :: struct { box: ^ui_box, mouse: [2]f32, delta: [2]f32, wheel: [2]f32, pressed: bool, released: bool, clicked: bool, doubleClicked: bool, tripleClicked: bool, rightPressed: bool, dragging: bool, hovering: bool, pasted: bool, }
Related Procedures With Returns
ui_size_kind ¶
ui_size_kind :: enum u32 { TEXT = 0, PIXELS = 1, CHILDREN = 2, PARENT = 3, PARENT_MINUS_PIXELS = 4, }
ui_stack_elt ¶
ui_stack_elt :: struct { parent: ^ui_stack_elt, using _: struct #raw_union { box: ^ui_box, size: ui_size, clip: rect, }, }
ui_status ¶
ui_status :: bit_set[ui_status_flag; u8]
ui_status_flag ¶
ui_status_flag :: enum u8 { HOVER = 1, HOT, ACTIVE, DRAGGING, }
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, animationTime: f32, animationMask: bit_set[style_enum; u64], }
Related Procedures With Parameters
ui_style_rule ¶
ui_style_rule :: struct { boxElt: list_elt, buildElt: list_elt, tmpElt: list_elt, owner: ^ui_box, pattern: ui_pattern, mask: bit_set[style_enum; u64], style: ^ui_style, }
ui_text_box_result ¶
Related Procedures With Returns
ui_theme ¶
ui_theme :: struct { white: color, primary: color, primaryHover: color, primaryActive: color, border: color, fill0: color, fill1: color, fill2: color, bg0: color, bg1: color, bg2: color, bg3: color, bg4: color, text0: color, text1: color, text2: color, text3: color, sliderThumbBorder: color, elevatedBorder: color, roundnessSmall: f32, roundnessMedium: f32, roundnessLarge: f32, palette: ^ui_palette, }
Related Procedures With Parameters
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.
Related Procedures With Parameters
Related Constants
- UNICODE_AEGEAN_NUMBERS
- UNICODE_ALPHABETIC_PRESENTATION_FORMS
- UNICODE_ARABIC
- UNICODE_ARABIC_PRESENTATION_FORMS_A
- UNICODE_ARABIC_PRESENTATION_FORMS_B
- UNICODE_ARMENIAN
- UNICODE_ARROWS
- UNICODE_BASIC_LATIN
- UNICODE_BENGALI_ASSAMESE
- UNICODE_BLOCK_ELEMENTS
- UNICODE_BOPOMOFO
- UNICODE_BOPOMOFO_EXTENDED
- UNICODE_BOX_DRAWING
- UNICODE_BRAILLE_PATTERNS
- UNICODE_BUHID
- UNICODE_BYZANTINE_MUSICAL_SYMBOLS
- UNICODE_C1_CONTROLS_AND_LATIN_1_SUPPLEMENT
- UNICODE_CHEROKEE
- UNICODE_CJK_COMPATIBILITY
- UNICODE_CJK_COMPATIBILITY_FORMS
- UNICODE_CJK_COMPATIBILITY_IDEOGRAPHS
- UNICODE_CJK_COMPATIBILITY_IDEOGRAPHS_SUPPLEMENT
- UNICODE_CJK_RADICALS_SUPPLEMENT
- UNICODE_CJK_SYMBOLS_AND_PUNCTUATION
- UNICODE_CJK_UNIFIED_IDEOGRAPHS
- UNICODE_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_A
- UNICODE_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_B
- UNICODE_COMBINING_DIACRITICAL_MARKS
- UNICODE_COMBINING_DIACRITICAL_MARKS_FOR_SYMBOLS
- UNICODE_COMBINING_HALF_MARKS
- UNICODE_CONTROL_PICTURES
- UNICODE_CURRENCY_SYMBOLS
- UNICODE_CYPRIOT_SYLLABARY
- UNICODE_CYRILLIC
- UNICODE_CYRILLIC_SUPPLEMENT
- UNICODE_DESERET
- UNICODE_DEVANAGARI
- UNICODE_DINGBATS
- UNICODE_ENCLOSED_ALPHANUMERICS
- UNICODE_ENCLOSED_CJK_LETTERS_AND_MONTHS
- UNICODE_ETHIOPIC
- UNICODE_GENERAL_PUNCTUATION
- UNICODE_GEOMETRIC_SHAPES
- UNICODE_GEORGIAN
- UNICODE_GOTHIC
- UNICODE_GREEK_COPTIC
- UNICODE_GREEK_EXTENDED
- UNICODE_GUJARATI
- UNICODE_GURMUKHI
- UNICODE_HALFWIDTH_AND_FULLWIDTH_FORMS
- UNICODE_HANGUL_COMPATIBILITY_JAMO
- UNICODE_HANGUL_JAMO
- UNICODE_HANGUL_SYLLABLES
- UNICODE_HANUNOO
- UNICODE_HEBREW
- UNICODE_HIGH_SURROGATE_AREA
- UNICODE_HIRAGANA
- UNICODE_IDEOGRAPHIC_DESCRIPTION_CHARACTERS
- UNICODE_IPA_EXTENSIONS
- UNICODE_KANBUN_KUNTEN
- UNICODE_KANGXI_RADICALS
- UNICODE_KANNADA
- UNICODE_KATAKANA
- UNICODE_KATAKANA_PHONETIC_EXTENSIONS
- UNICODE_KHMER
- UNICODE_KHMER_SYMBOLS
- UNICODE_LAO
- UNICODE_LATIN_EXTENDED_A
- UNICODE_LATIN_EXTENDED_ADDITIONAL
- UNICODE_LATIN_EXTENDED_B
- UNICODE_LETTERLIKE_SYMBOLS
- UNICODE_LIMBU
- UNICODE_LINEAR_B_IDEOGRAMS
- UNICODE_LINEAR_B_SYLLABARY
- UNICODE_LOW_SURROGATE_AREA
- UNICODE_MALAYALAM
- UNICODE_MATHEMATICAL_ALPHANUMERIC_SYMBOLS
- UNICODE_MATHEMATICAL_OPERATORS
- UNICODE_MISCELLANEOUS_MATHEMATICAL_SYMBOLS_A
- UNICODE_MISCELLANEOUS_MATHEMATICAL_SYMBOLS_B
- UNICODE_MISCELLANEOUS_SYMBOLS
- UNICODE_MISCELLANEOUS_SYMBOLS_AND_ARROWS
- UNICODE_MISCELLANEOUS_TECHNICAL
- UNICODE_MONGOLIAN
- UNICODE_MUSICAL_SYMBOLS
- UNICODE_MYANMAR
- UNICODE_NUMBER_FORMS
- UNICODE_OGHAM
- UNICODE_OLD_ITALIC
- UNICODE_OPTICAL_CHARACTER_RECOGNITION
- UNICODE_ORIYA
- UNICODE_OSMANYA
- UNICODE_PHONETIC_EXTENSIONS
- UNICODE_PRIVATE_USE_AREA
- UNICODE_RUNIC
- UNICODE_SHAVIAN
- UNICODE_SINHALA
- UNICODE_SMALL_FORM_VARIANTS
- UNICODE_SPACING_MODIFIER_LETTERS
- UNICODE_SPECIALS
- UNICODE_SUPERSCRIPTS_AND_SUBSCRIPTS
- UNICODE_SUPPLEMENTAL_ARROWS_A
- UNICODE_SUPPLEMENTAL_ARROWS_B
- UNICODE_SUPPLEMENTAL_MATHEMATICAL_OPERATORS
- UNICODE_SUPPLEMENTARY_PRIVATE_USE_AREA_A
- UNICODE_SUPPLEMENTARY_PRIVATE_USE_AREA_B
- UNICODE_SYRIAC
- UNICODE_TAGALOG
- UNICODE_TAGBANWA
- UNICODE_TAGS
- UNICODE_TAI_LE
- UNICODE_TAI_XUAN_JING_SYMBOLS
- UNICODE_TAMIL
- UNICODE_TELUGU
- UNICODE_THAANA
- UNICODE_THAI
- UNICODE_TIBETAN
- UNICODE_UGARITIC
- UNICODE_UNIFIED_CANADIAN_ABORIGINAL_SYLLABICS
- UNICODE_VARIATION_SELECTORS
- UNICODE_VARIATION_SELECTORS_SUPPLEMENT
- UNICODE_YIJING_HEXAGRAM_SYMBOLS
- UNICODE_YI_RADICALS
- UNICODE_YI_SYLLABLES
utf8_dec ¶
utf8_dec :: struct { // 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
Constants
BACKING_SIZE ¶
BACKING_SIZE :: 64
BOX_MAP_BUCKET_COUNT ¶
BOX_MAP_BUCKET_COUNT :: 1024
FLOAT ¶
FLOAT: bit_set[style_enum; u64] : ui_style_mask{.FLOAT_X, .FLOAT_Y}
LAYOUT ¶
LAYOUT: bit_set[style_enum; u64] : ui_style_mask{.LAYOUT_AXIS, .LAYOUT_ALIGN_X, .LAYOUT_ALIGN_Y, .LAYOUT_SPACING, .LAYOUT_MARGIN_X, .LAYOUT_MARGIN_Y}
LAYOUT_MARGINS ¶
LAYOUT_MARGINS: bit_set[style_enum; u64] : ui_style_mask{.LAYOUT_MARGIN_X, .LAYOUT_MARGIN_Y}
MASK_INHERITED ¶
MASK_INHERITED: bit_set[style_enum; u64] : ui_style_mask{.COLOR, .FONT, .FONT_SIZE, .ANIMATION_TIME, .ANIMATION_MASK}
MAX_INPUT_CHAR_PER_FRAME ¶
MAX_INPUT_CHAR_PER_FRAME :: 64
SIZE ¶
SIZE: bit_set[style_enum; u64] : ui_style_mask{.SIZE_WIDTH, .SIZE_HEIGHT}
Masks like the C version that can be used as common combinations
SYS_MAX_ERROR ¶
SYS_MAX_ERROR :: 1024
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}
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}
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}
UNICODE_LATIN_EXTENDED_ADDITIONAL ¶
UNICODE_LATIN_EXTENDED_ADDITIONAL :: unicode_range{0x1e00, 255}
UNICODE_LATIN_EXTENDED_B ¶
UNICODE_LATIN_EXTENDED_B :: unicode_range{0x0180, 207}
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}
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
UI_DARK_PALETTE ¶
UI_DARK_PALETTE: ui_palette
UI_DARK_THEME ¶
UI_DARK_THEME: ui_theme
UI_LIGHT_PALETTE ¶
UI_LIGHT_PALETTE: ui_palette
UI_LIGHT_THEME ¶
UI_LIGHT_THEME: ui_theme
sys_error ¶
sys_error: sys_err_def
Procedures
abort ¶
abort :: proc "contextless" (msg: cstring, loc := #caller_location) {…}
abort_ext ¶
abort_ext :: proc "c" (file: cstring, function: cstring, line: i32, fmt: cstring, .. args: ..any) -> ! ---
Abort the application, showing an error message.
This function should not be called directly by user code, which should use the OC_ABORT
macro instead, as the macro takes care of filling in the source location parameters of the function.
arena_cleanup ¶
arena_cleanup :: proc "c" (arena: ^arena) ---
Release all resources allocated to a memory arena.
arena_clear ¶
arena_clear :: proc "c" (arena: ^arena) ---
Reset an arena. All memory that was previously allocated from this arena is released to the arena, and can be reallocated by later calls to oc_arena_push
and similar functions. No memory is actually released _to the system_.
arena_init_with_options ¶
arena_init_with_options :: proc "c" (arena: ^arena, options: ^arena_options) ---
Initialize a memory arena with additional options.
arena_push ¶
Allocate a block of memory from an arena.
arena_push_aligned ¶
Allocate an aligned block of memory from an arena.
arena_scope_begin ¶
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 ¶
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 ¶
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 ¶
canvas_context_create :: proc "c" () -> canvas_context ---
canvas_context_destroy ¶
canvas_context_destroy :: proc "c" (_context: canvas_context) ---
canvas_context_is_nil ¶
canvas_context_is_nil :: proc "c" (_context: canvas_context) -> bool ---
canvas_context_nil ¶
canvas_context_nil :: proc "c" () -> canvas_context ---
canvas_context_select ¶
canvas_context_select :: proc "c" (_context: canvas_context) -> canvas_context ---
canvas_context_set_msaa_sample_count ¶
canvas_context_set_msaa_sample_count :: proc "c" (_context: canvas_context, sampleCount: u32) ---
canvas_present ¶
canvas_present :: proc "c" (renderer: canvas_renderer, surface: surface) ---
canvas_render ¶
canvas_render :: proc "c" (renderer: canvas_renderer, _context: canvas_context, surface: surface) ---
canvas_renderer_create ¶
canvas_renderer_create :: proc "c" () -> canvas_renderer ---
canvas_renderer_destroy ¶
canvas_renderer_destroy :: proc "c" (renderer: canvas_renderer) ---
canvas_renderer_is_nil ¶
canvas_renderer_is_nil :: proc "c" (renderer: canvas_renderer) -> bool ---
canvas_renderer_nil ¶
canvas_renderer_nil :: proc "c" () -> canvas_renderer ---
canvas_surface_create ¶
canvas_surface_create :: proc "c" (renderer: canvas_renderer) -> surface ---
clip_pop ¶
clip_pop :: proc "c" () ---
clip_top ¶
clip_top :: proc "c" () -> rect ---
clipboard_pasted ¶
clipboard_pasted :: proc "c" (state: ^input_state) -> bool ---
clipboard_pasted_text ¶
clipboard_pasted_text :: proc "c" (state: ^input_state) -> string ---
clipboard_set_string ¶
clipboard_set_string :: proc "c" (string: string) ---
Put a string in the clipboard.
clock_time ¶
clock_time :: proc "c" (clock: clock_kind) -> f64 ---
close_path ¶
close_path :: proc "c" () ---
codepoints_outlines ¶
codepoints_outlines :: proc "c" (string: str32) ---
color_convert ¶
color_convert :: proc "c" (_color: color, colorSpace: color_space) -> color ---
create_odin_logger ¶
create_odin_logger :: proc(lowest: runtime.Logger_Level = runtime.Logger_Level.Debug, ident: string = "") -> runtime.Logger {…}
file_get_status ¶
file_get_status :: proc "c" (file: file) -> file_status ---
file_is_nil ¶
Test if a file handle is nil
.
file_last_error ¶
Get the last error on a file handle.
file_open ¶
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.
file_open_at ¶
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 ¶
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 ¶
file_open_with_request :: proc "c" (path: string, rights: bit_set[file_access_flag; u16], flags: bit_set[file_open_flag; u16]) -> file ---
file_read ¶
Read from a file.
file_seek ¶
file_seek :: proc "c" (file: file, offset: i64, whence: file_whence) -> i64 ---
Set the current position in a file.
file_write ¶
Write data to a file.
font_create_from_file ¶
font_create_from_file :: proc "c" (file: file, rangeCount: u32, ranges: ^unicode_range) -> font ---
font_create_from_memory ¶
font_create_from_memory :: proc "c" (mem: string, rangeCount: u32, ranges: ^unicode_range) -> font ---
font_create_from_path ¶
font_create_from_path :: proc "c" (path: string, rangeCount: u32, ranges: ^unicode_range) -> font ---
font_destroy ¶
font_destroy :: proc "c" (font: font) ---
font_get_metrics ¶
font_get_metrics :: proc "c" (font: font, emSize: f32) -> font_metrics ---
font_get_metrics_unscaled ¶
font_get_metrics_unscaled :: proc "c" (font: font) -> font_metrics ---
font_nil ¶
font_nil :: proc "c" () -> font ---
font_text_metrics ¶
font_text_metrics :: proc "c" (font: font, fontSize: f32, text: string) -> text_metrics ---
font_text_metrics_utf32 ¶
font_text_metrics_utf32 :: proc "c" (font: font, fontSize: f32, codepoints: str32) -> text_metrics ---
get_color ¶
get_color :: proc "c" () -> color ---
get_font ¶
get_font :: proc "c" () -> font ---
get_font_size ¶
get_font_size :: proc "c" () -> f32 ---
get_image ¶
get_image :: proc "c" () -> image ---
get_image_source_region ¶
get_image_source_region :: proc "c" () -> rect ---
get_joint ¶
get_joint :: proc "c" () -> joint_type ---
get_max_joint_excursion ¶
get_max_joint_excursion :: proc "c" () -> f32 ---
get_position ¶
get_position :: proc "c" () -> [2]f32 ---
get_text_flip ¶
get_text_flip :: proc "c" () -> bool ---
get_tolerance ¶
get_tolerance :: proc "c" () -> f32 ---
get_width ¶
get_width :: proc "c" () -> f32 ---
gles_surface_create ¶
gles_surface_create :: proc "c" () -> surface ---
gles_surface_make_current ¶
gles_surface_make_current :: proc "c" (surface: surface) ---
gles_surface_swap_buffers ¶
gles_surface_swap_buffers :: proc "c" (surface: surface) ---
image_atlas_alloc_from_file ¶
image_atlas_alloc_from_file :: proc "c" (atlas: ^rect_atlas, backingImage: image, file: file, flip: bool) -> image_region ---
image_atlas_alloc_from_memory ¶
image_atlas_alloc_from_memory :: proc "c" (atlas: ^rect_atlas, backingImage: image, mem: string, flip: bool) -> image_region ---
image_atlas_alloc_from_path ¶
image_atlas_alloc_from_path :: proc "c" (atlas: ^rect_atlas, backingImage: image, path: string, flip: bool) -> image_region ---
image_atlas_alloc_from_rgba8 ¶
image_atlas_alloc_from_rgba8 :: proc "c" (atlas: ^rect_atlas, backingImage: image, width: u32, height: u32, pixels: [^]u8) -> image_region ---
image_atlas_recycle ¶
image_atlas_recycle :: proc "c" (atlas: ^rect_atlas, imageRgn: image_region) ---
image_create ¶
image_create :: proc "c" (renderer: canvas_renderer, width: u32, height: u32) -> image ---
image_create_from_file ¶
image_create_from_file :: proc "c" (renderer: canvas_renderer, file: file, flip: bool) -> image ---
image_create_from_memory ¶
image_create_from_memory :: proc "c" (renderer: canvas_renderer, mem: string, flip: bool) -> image ---
image_create_from_path ¶
image_create_from_path :: proc "c" (renderer: canvas_renderer, path: string, flip: bool) -> image ---
image_create_from_rgba8 ¶
image_create_from_rgba8 :: proc "c" (renderer: canvas_renderer, width: u32, height: u32, pixels: [^]u8) -> image ---
image_destroy ¶
image_destroy :: proc "c" (image: image) ---
image_nil ¶
image_nil :: proc "c" () -> image ---
input_next_frame ¶
input_next_frame :: proc "c" (state: ^input_state) ---
input_process_event ¶
input_process_event :: proc "c" (arena: ^arena, state: ^input_state, event: ^event) ---
input_text_utf32 ¶
input_text_utf32 :: proc "c" (arena: ^arena, state: ^input_state) -> str32 ---
input_text_utf8 ¶
input_text_utf8 :: proc "c" (arena: ^arena, state: ^input_state) -> string ---
io_wait_single_req ¶
Send a single I/O request and wait for its completion.
key_down ¶
key_down :: proc "c" (state: ^input_state, key: key_code) -> bool ---
key_down_scancode ¶
key_down_scancode :: proc "c" (state: ^input_state, key: scan_code) -> bool ---
key_mods ¶
key_mods :: proc "c" (state: ^input_state) -> bit_set[keymod_flag; u32] ---
key_press_count ¶
key_press_count :: proc "c" (state: ^input_state, key: key_code) -> u8 ---
key_press_count_scancode ¶
key_press_count_scancode :: proc "c" (state: ^input_state, key: scan_code) -> u8 ---
key_release_count ¶
key_release_count :: proc "c" (state: ^input_state, key: key_code) -> u8 ---
key_release_count_scancode ¶
key_release_count_scancode :: proc "c" (state: ^input_state, key: scan_code) -> u8 ---
key_repeat_count ¶
key_repeat_count :: proc "c" (state: ^input_state, key: key_code) -> u8 ---
key_repeat_count_scancode ¶
key_repeat_count_scancode :: proc "c" (state: ^input_state, key: scan_code) -> u8 ---
list_checked_entry ¶
list_checked_entry :: proc "contextless" (elt: ^list_elt, $T: typeid, $member: string = ) -> ^typeid {…}
Same as list_entry
but elt
might be nil
.
list_entry ¶
Get the entry for a given list element.
list_for ¶
list_for :: proc "contextless" (list: ^list, elt: ^^list_elt, $T: typeid, $member: string = ) -> (^typeid, bool) {…}
Example:
_elt: ^list_elt
for elt in oc.list_for(list, &_elt, int, "elt") {
}
list_insert ¶
Insert an element in a list after a given element.
list_insert_before ¶
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_iter_reverse ¶
list_iter_reverse :: list_for_reverse
list_next_entry ¶
list_next_entry :: proc "contextless" (list: ^list, elt: ^list_elt, $T: typeid, $member: string = ) -> ^typeid {…}
Get the next entry in a list.
list_pop_back ¶
Remove the last element from a list.
list_pop_front ¶
Remove the first element from a list.
list_prev_entry ¶
list_prev_entry :: proc "contextless" (list: ^list, elt: ^list_elt, $T: typeid, $member: string = ) -> ^typeid {…}
Get the previous entry in a list.
list_push_back ¶
Add an element at the end of a list.
list_push_front ¶
Add an element at the beginning of a list.
list_remove ¶
Remove an element from a list.
log_error ¶
log_error :: proc "contextless" (msg: cstring, loc := #caller_location) {…}
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.
log_info ¶
log_info :: proc "contextless" (msg: cstring, loc := #caller_location) {…}
log_warning ¶
log_warning :: proc "contextless" (msg: cstring, loc := #caller_location) {…}
mat2x3_inv ¶
Invert an affine transform represented as a 2x3 matrix.
mat2x3_mul ¶
Transforms a vector by an affine transformation represented as a 2x3 matrix.
mat2x3_mul_m ¶
Multiply two affine transformations represented as 2x3 matrices. Both matrices are treated as 3x3 matrices with an implicit (0, 0, 1)
bottom row
mat2x3_rotate ¶
Return a 2x3 matrix representing a rotation.
mat2x3_translate ¶
Return a 2x3 matrix representing a translation.
matrix_multiply_push ¶
matrix_multiply_push :: proc "c" (_matrix: [6]f32) ---
matrix_pop ¶
matrix_pop :: proc "c" () ---
matrix_push ¶
matrix_push :: proc "c" (_matrix: [6]f32) ---
matrix_top ¶
matrix_top :: proc "c" () -> [6]f32 ---
mouse_clicked ¶
mouse_clicked :: proc "c" (state: ^input_state, button: mouse_button) -> bool ---
mouse_delta ¶
mouse_delta :: proc "c" (state: ^input_state) -> [2]f32 ---
mouse_double_clicked ¶
mouse_double_clicked :: proc "c" (state: ^input_state, button: mouse_button) -> bool ---
mouse_down ¶
mouse_down :: proc "c" (state: ^input_state, button: mouse_button) -> bool ---
mouse_position ¶
mouse_position :: proc "c" (state: ^input_state) -> [2]f32 ---
mouse_pressed ¶
mouse_pressed :: proc "c" (state: ^input_state, button: mouse_button) -> u8 ---
mouse_released ¶
mouse_released :: proc "c" (state: ^input_state, button: mouse_button) -> u8 ---
mouse_wheel ¶
mouse_wheel :: proc "c" (state: ^input_state) -> [2]f32 ---
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 ¶
Append a path to another path.
path_is_absolute ¶
Test wether a path is an absolute path.
path_join ¶
Join path elements to form a path.
path_slice_directory ¶
Get a string slice of the directory part of a path.
path_slice_filename ¶
Get a string slice of the file name part of a path.
path_split ¶
Split a path into path elements.
rect_atlas_alloc ¶
rect_atlas_alloc :: proc "c" (atlas: ^rect_atlas, width: i32, height: i32) -> rect ---
rect_atlas_create ¶
rect_atlas_create :: proc "c" (arena: ^arena, width: i32, height: i32) -> ^rect_atlas ---
rect_atlas_recycle ¶
rect_atlas_recycle :: proc "c" (atlas: ^rect_atlas, rect: rect) ---
scancode_to_keycode ¶
Convert a scancode to a keycode, according to current keyboard layout.
scratch_begin ¶
scratch_begin :: proc "c" () -> arena_scope ---
Begin a scratch scope. This creates a memory scope on a per-thread, global "scratch" arena. This allows easily creating temporary memory for scratch computations or intermediate results, in a stack-like fashion.
If you must return results in an arena passed by the caller, and you also use a scratch arena to do intermediate computations, beware that the results arena could itself be a scatch arena. In this case, you have to be careful not to intermingle your scratch computations with the final result, or clear your result entirely. You can either:
Allocate memory for the result upfront and call oc_scratch_begin
afterwards, if possible.
Use oc_scratch_begin_next()
and pass it the result arena, to get a scratch arena that does not conflict with it.
scratch_begin_next ¶
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.
set_color ¶
set_color :: proc "c" (_color: color) ---
set_font ¶
set_font :: proc "c" (font: font) ---
set_font_size ¶
set_font_size :: proc "c" (size: f32) ---
set_gradient ¶
set_gradient :: proc "c" (blendSpace: gradient_blend_space, bottomLeft: color, bottomRight: color, topRight: color, topLeft: color) ---
set_image ¶
set_image :: proc "c" (image: image) ---
set_image_source_region ¶
set_image_source_region :: proc "c" (region: rect) ---
set_joint ¶
set_joint :: proc "c" (joint: joint_type) ---
set_max_joint_excursion ¶
set_max_joint_excursion :: proc "c" (maxJointExcursion: f32) ---
set_text_flip ¶
set_text_flip :: proc "c" (flip: bool) ---
set_tolerance ¶
set_tolerance :: proc "c" (tolerance: f32) ---
set_width ¶
set_width :: proc "c" (width: f32) ---
str16_from_buffer ¶
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 ¶
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 ¶
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 ¶
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 ¶
Copy the contents of an oc_str16
string and make a new string referencing the copied contents.
str16_push_slice ¶
Copy a slice of an oc_str16
string an make a new string referencing the copies contents.
str16_slice ¶
Make an oc_str16
string from a slice of another oc_str16
string.
str16_split ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
Copy the contents of an oc_str32
string and make a new string referencing the copied contents.
str32_push_slice ¶
Copy a slice of an oc_str32
string an make a new string referencing the copies contents.
str32_slice ¶
Make an oc_str32
string from a slice of another oc_str32
string.
str32_split ¶
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 ¶
Lexicographically compare the contents of two strings.
str8_from_buffer ¶
Make a string from a bytes buffer and a length.
str8_list_collate ¶
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_iter ¶
str8_list_iter :: str8_list_for
str8_list_join ¶
Build a string by joining the elements of a string list.
str8_list_push ¶
Push a string element to the back of a string list. This creates a oc_str8_elt
element referring to the contents of the input string, and links that element at the end of the string list.
str8_list_pushf ¶
Build a string from a null-terminated format string an variadic arguments, and append it to a string list.
str8_push_buffer ¶
Pushes a copy of a buffer to an arena, and makes a string refering to that copy.
str8_push_copy ¶
Copy the contents of a string on an arena and make a new string referring to the copied bytes.
str8_push_cstring ¶
Pushes a copy of a C null-terminated string to an arena, and makes a string referring to that copy.
str8_push_slice ¶
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 ¶
Make a string from a slice of another string. The resulting string designates some subsequence of the input string.
str8_split ¶
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 ¶
Create a null-terminated C-string from an oc_str8
string.
surface_bring_to_front ¶
surface_bring_to_front :: proc "c" (surface: surface) ---
surface_destroy ¶
surface_destroy :: proc "c" (surface: surface) ---
surface_nil ¶
surface_nil :: proc "c" () -> surface ---
surface_send_to_back ¶
surface_send_to_back :: proc "c" (surface: surface) ---
text_outlines ¶
text_outlines :: proc "c" (string: string) ---
ui_apply_style_with_mask ¶
ui_apply_style_with_mask :: proc "c" (dst: ^ui_style, src: ^ui_style, mask: bit_set[style_enum; u64]) ---
ui_begin_frame ¶
ui_begin_frame :: proc "c" (size: [2]f32, #by_ptr defaultStyle: ui_style, mask: bit_set[style_enum; u64]) ---
ui_box_activate ¶
ui_box_activate :: proc "c" (box: ^ui_box) ---
ui_box_deactivate ¶
ui_box_deactivate :: proc "c" (box: ^ui_box) ---
ui_box_end ¶
ui_box_end :: proc "c" () -> ^ui_box ---
ui_box_pop ¶
ui_box_pop :: proc "c" () ---
ui_box_push ¶
ui_box_push :: proc "c" (box: ^ui_box) ---
ui_box_set_draw_proc ¶
ui_box_set_draw_proc :: proc "c" (box: ^ui_box, _proc: ui_box_draw_proc, data: rawptr) ---
ui_box_top ¶
ui_box_top :: proc "c" () -> ^ui_box ---
ui_end_frame ¶
ui_end_frame :: proc "c" () ---
ui_frame ¶
ui_frame :: proc "contextless" (frame_size: [2]f32, style: ui_style, mask: bit_set[style_enum; u64]) {…}
ui_get_context ¶
ui_get_context :: proc "c" () -> ^ui_context ---
ui_init ¶
ui_init :: proc "c" (_context: ^ui_context) ---
ui_menu_bar ¶
ui_menu_bar :: proc "contextless" (name: cstring) {…}
ui_menu_bar_begin ¶
ui_menu_bar_begin :: proc "c" (name: cstring) ---
ui_menu_bar_end ¶
ui_menu_bar_end :: proc "c" () ---
ui_menu_begin ¶
ui_menu_begin :: proc "c" (label: cstring) ---
ui_menu_end ¶
ui_menu_end :: proc "c" () ---
ui_panel_end ¶
ui_panel_end :: proc "c" () ---
ui_pattern_all ¶
ui_pattern_all :: proc "c" () -> ui_pattern ---
ui_pattern_owner ¶
ui_pattern_owner :: proc "c" () -> ui_pattern ---
ui_pattern_push ¶
ui_pattern_push :: proc "c" (arena: ^arena, pattern: ^ui_pattern, selector: ui_selector) ---
ui_process_event ¶
ui_process_event :: proc "c" (event: ^event) ---
ui_radio_group ¶
ui_radio_group :: proc "c" (name: cstring, info: ^ui_radio_group_info) -> ui_radio_group_info ---
ui_select_popup ¶
ui_select_popup :: proc "c" (name: cstring, info: ^ui_select_popup_info) -> ui_select_popup_info ---
ui_set_context ¶
ui_set_context :: proc "c" (_context: ^ui_context) ---
ui_set_theme ¶
ui_set_theme :: proc "c" (theme: ^ui_theme) ---
ui_style_match_after ¶
ui_style_match_after :: proc "c" (pattern: ui_pattern, #by_ptr style: ui_style, mask: bit_set[style_enum; u64]) ---
ui_style_match_before ¶
ui_style_match_before :: proc "c" (pattern: ui_pattern, #by_ptr style: ui_style, mask: bit_set[style_enum; u64]) ---
ui_style_next ¶
ui_style_next :: proc "c" (#by_ptr style: ui_style, mask: bit_set[style_enum; u64]) ---
ui_tag_next_str8 ¶
ui_tag_next_str8 :: proc "c" (string: string) ---
ui_text_box ¶
ui_text_box :: proc "c" (name: cstring, arena: ^arena, text: string) -> ui_text_box_result ---
ui_tooltip ¶
ui_tooltip :: proc "c" (label: cstring) ---
utf8_byte_count_for_codepoints ¶
Get the length of the utf8 encoding of a sequence of unicode codepoints.
utf8_codepoint_size ¶
Get the size of the utf8 encoding of a codepoint.
utf8_decode ¶
Decode a utf8 encoded codepoint.
utf8_decode_at ¶
Decode a codepoint at a given offset in a utf8 encoded string.
utf8_encode ¶
Encode a unicode codepoint into a utf8 sequence.
utf8_from_codepoints ¶
Encode a string of unicode codepoints into a utf8 string using memory passed by the caller.
utf8_next_offset ¶
Get the offset of the next codepoint after a given offset, in a utf8 encoded string.
utf8_prev_offset ¶
Get the offset of the previous codepoint before a given offset, in a utf8 encoded string.
utf8_push_from_codepoints ¶
Encode a string of unicode codepoints into a utf8 string using an arena.
utf8_push_to_codepoints ¶
Decode a utf8 encoded string to a string of unicode codepoints using an arena.
utf8_size_from_leading_char ¶
Get the size of a utf8-encoded codepoint for the first byte of the encoded sequence.
utf8_to_codepoints ¶
Decode a utf8 string to a string of unicode codepoints using memory passed by the caller.
vec2_equal ¶
Check if two 2D vectors are equal.
vec2_mul ¶
Multiply a 2D vector by a scalar.
window_set_size ¶
window_set_size :: proc "c" (size: [2]f32) ---
Set the size of the application's window.
window_set_title ¶
window_set_title :: proc "c" (title: string) ---
Set the title of the application's window.
Procedure Groups
This section is empty.
Source Files
Generation Information
Generated with odin version dev-2024-12 (vendor "odin") Windows_amd64 @ 2024-12-06 21:12:12.945558300 +0000 UTC