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 (113)
- 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
- surface
- text_metrics
- text_state
- ui_align
- ui_attribute
- ui_attribute_mask
- ui_axis
- ui_box
- ui_box_draw_proc
- ui_box_floating
- ui_box_size
- ui_context
- ui_draw_mask
- ui_edit_move
- ui_key
- ui_layout
- ui_layout_align
- ui_overflow
- ui_radio_group_info
- ui_select_popup_info
- ui_sig
- ui_size
- ui_size_kind
- ui_style
- ui_text_box_info
- ui_text_box_result
- unicode_range
- utf32
- utf8_dec
- utf8_status
- vec2
- vec2i
- vec3
- vec4
- window
Constants (125)
- BACKING_SIZE
- 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 (0)
This section is empty.
Procedures (380)
- 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
- 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
- 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_typed
- 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_box_begin_str8
- ui_box_end
- ui_box_get_sig
- ui_box_release_focus
- ui_box_request_focus
- ui_box_set_closed
- ui_box_set_draw_proc
- ui_box_set_overlay
- ui_box_set_text
- ui_box_tag_str8
- ui_box_user_data_get
- ui_box_user_data_push
- ui_button
- ui_button_str8
- ui_checkbox
- ui_checkbox_str8
- ui_container
- ui_context_create
- ui_context_destroy
- ui_draw
- ui_frame_arena
- ui_frame_begin
- ui_frame_end
- ui_frame_time
- ui_get_context
- ui_get_sig
- ui_input
- ui_label
- ui_label_str8
- ui_menu
- ui_menu_bar
- ui_menu_bar_begin
- ui_menu_bar_begin_str8
- ui_menu_bar_end
- ui_menu_begin
- ui_menu_begin_str8
- ui_menu_button
- ui_menu_button_str8
- ui_menu_end
- ui_process_event
- ui_radio_group
- ui_radio_group_str8
- ui_release_focus
- ui_request_focus
- ui_select_popup
- ui_select_popup_str8
- ui_set_closed
- ui_set_context
- ui_set_draw_proc
- ui_set_overlay
- ui_set_text
- ui_slider
- ui_slider_str8
- ui_style_rule_begin
- ui_style_rule_end
- ui_style_set_color
- ui_style_set_f32
- ui_style_set_font
- ui_style_set_i32
- ui_style_set_size
- ui_style_set_var
- ui_style_set_var_str8
- ui_tag_next_str8
- ui_tag_str8
- ui_text_box
- ui_text_box_str8
- ui_theme_dark
- ui_theme_light
- ui_tooltip
- ui_tooltip_str8
- ui_user_data_get
- ui_user_data_push
- ui_var_default
- ui_var_default_color
- ui_var_default_color_str8
- ui_var_default_f32
- ui_var_default_f32_str8
- ui_var_default_font
- ui_var_default_font_str8
- ui_var_default_i32
- ui_var_default_i32_str8
- ui_var_default_size
- ui_var_default_size_str8
- ui_var_default_str8
- ui_var_get_color
- ui_var_get_color_str8
- ui_var_get_f32
- ui_var_get_f32_str8
- ui_var_get_font
- ui_var_get_font_str8
- ui_var_get_i32
- ui_var_get_i32_str8
- ui_var_get_size
- ui_var_get_size_str8
- ui_var_set
- ui_var_set_color
- ui_var_set_color_str8
- ui_var_set_f32
- ui_var_set_f32_str8
- ui_var_set_font
- ui_var_set_font_str8
- ui_var_set_i32
- ui_var_set_i32_str8
- ui_var_set_size
- ui_var_set_size_str8
- ui_var_set_str8
- 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_text_box
- ui_text_box_str8
- utf8_push_from_codepoints
- utf8_push_to_codepoints
Related Procedures With Returns
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
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()
.
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
An opaque handle representing a rendering engine for the canvas API.
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 { // Don't draw caps. NONE = 0, // Square caps. SQUARE = 1, }
Cap types.
Related Procedures With Parameters
Related Procedures With Returns
char_event ¶
char_event :: struct { // The unicode codepoint of the character. codepoint: untyped 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, }
A struct representing a color.
Related Procedures With Parameters
- color_convert
- set_color
- set_gradient
- ui_style_set_color
- ui_var_default_color
- ui_var_default_color_str8
- ui_var_set_color
- ui_var_set_color_str8
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.
Related Procedures With Parameters
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 = 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_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
An opaque font handle.
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
- ui_context_create
- ui_style_set_font
- ui_var_default_font
- ui_var_default_font_str8
- ui_var_set_font
- ui_var_set_font_str8
Related Procedures With Returns
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.
Related Procedures With Parameters
image ¶
image :: distinct u64
An opaque image handle.
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
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 Parameters
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
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.
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 { 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.
Related Procedures With Parameters
joint_type ¶
joint_type :: enum u32 { // Miter joint. MITER = 0, // Bevel joint. BEVEL = 1, // Don't join path segments. NONE = 2, }
Stroke joint types.
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 {}
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
- 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 []untyped 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
Related Procedures With Returns
surface ¶
surface :: distinct u64
An opaque handle to a graphics surface.
Related Procedures With Parameters
- canvas_present
- canvas_render
- gles_surface_make_current
- gles_surface_swap_buffers
- 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 ¶
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
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_ALIGN_X = 64, LAYOUT_ALIGN_Y = 128, LAYOUT_SPACING = 32, LAYOUT_MARGIN_X = 8, LAYOUT_MARGIN_Y = 16, 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, BORDER_SIZE = 2097152, ROUNDNESS = 4194304, FONT = 524288, FONT_SIZE = 1048576, DRAW_MASK = 8388608, ANIMATION_TIME = 16777216, ANIMATION_MASK = 33554432, CLICK_THROUGH = 67108864, }
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
- ui_box_get_sig
- ui_box_release_focus
- ui_box_request_focus
- ui_box_set_closed
- ui_box_set_draw_proc
- ui_box_set_overlay
- ui_box_set_text
- ui_box_tag_str8
- ui_box_user_data_get
- ui_box_user_data_push
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 {}
Related Procedures With Parameters
Related Procedures With Returns
ui_draw_mask ¶
ui_draw_mask :: enum u32 { BACKGROUND = 1, BORDER = 2, TEXT = 4, PROC = 8, }
ui_edit_move ¶
ui_edit_move :: enum u32 { NONE = 0, CHAR = 1, WORD = 2, LINE = 3, }
ui_layout_align ¶
ui_layout_align :: [2]ui_align
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"`, }
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_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_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 ¶
Related Procedures With Returns
unicode_range ¶
unicode_range :: struct { // The first codepoint of the range. firstCodePoint: untyped 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 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: untyped 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 = 3, // A leading byte was encountered in the middle of the encoding of utf8 codepoint. UNEXPECTED_LEADING_BYTE = 4, // The utf8 sequence contains an invalid byte. INVALID_BYTE = 5, // The operation encountered an invalid utf8 codepoint. INVALID_CODEPOINT = 6, // The utf8 sequence contains an overlong encoding of a utf8 codepoint. OVERLONG_ENCODING = 7, }
This enum declares the possible return status of UTF8 decoding/encoding operations.
Constants
BACKING_SIZE ¶
BACKING_SIZE: int : 64
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
This section is empty.
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.
arc ¶
Add an arc to the path.
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 ---
Create a canvas context.
canvas_context_destroy ¶
canvas_context_destroy :: proc "c" (_context: canvas_context) ---
Destroy a canvas context
canvas_context_is_nil ¶
canvas_context_is_nil :: proc "c" (_context: canvas_context) -> bool ---
Checks if a canvas context handle is nil
.
canvas_context_nil ¶
canvas_context_nil :: proc "c" () -> canvas_context ---
Returns a nil
canvas context handle.
canvas_context_select ¶
canvas_context_select :: proc "c" (_context: canvas_context) -> canvas_context ---
Make a canvas context current in the calling thread. Subsequent canvas commands will refer to this context until another context is made current.
canvas_context_set_msaa_sample_count ¶
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 ¶
canvas_present :: proc "c" (renderer: canvas_renderer, surface: surface) ---
Present a canvas surface to the display.
canvas_render ¶
canvas_render :: proc "c" (renderer: canvas_renderer, _context: canvas_context, surface: surface) ---
Render canvas commands onto a surface.
canvas_renderer_create ¶
canvas_renderer_create :: proc "c" () -> canvas_renderer ---
Create a canvas renderer.
canvas_renderer_destroy ¶
canvas_renderer_destroy :: proc "c" (renderer: canvas_renderer) ---
Destroy a canvas renderer.
canvas_renderer_is_nil ¶
canvas_renderer_is_nil :: proc "c" (renderer: canvas_renderer) -> bool ---
Checks if a canvas renderer handle is nil
.
canvas_renderer_nil ¶
canvas_renderer_nil :: proc "c" () -> canvas_renderer ---
Returns a nil
canvas renderer handle.
canvas_surface_create ¶
canvas_surface_create :: proc "c" (renderer: canvas_renderer) -> surface ---
Create a surface for rendering vector graphics.
clip_push ¶
Push a clip rectangle to the clip stack.
clip_top ¶
clip_top :: proc "c" () -> rect ---
Get the clip rectangle from the top of the clip stack.
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 ---
codepoints_outlines ¶
codepoints_outlines :: proc "c" (string: str32) ---
Add the outlines of a glyph run to the path, using unicode codepoints.
color_convert ¶
color_convert :: proc "c" (_color: color, colorSpace: color_space) -> color ---
Convert a color from one color space to another.
color_rgba ¶
Create a color using RGBA values.
color_srgba ¶
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 {…}
cubic_to ¶
Add a cubic Bézier curve to the path from the current position to a new one.
ellipse_fill ¶
Draw a filled ellipse.
ellipse_stroke ¶
Draw a stroked ellipse.
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 ---
Create a font from a TrueType font file.
font_create_from_memory ¶
font_create_from_memory :: proc "c" (mem: string, rangeCount: u32, ranges: ^unicode_range) -> font ---
Create a font from in-memory TrueType data.
font_create_from_path ¶
font_create_from_path :: proc "c" (path: string, rangeCount: u32, ranges: ^unicode_range) -> font ---
Create a font from a TrueType font file path.
font_get_glyph_index ¶
Get the glyp index of a single codepoint in a given font.
font_get_glyph_indices ¶
Get the glyph indices of a run of unicode code points in a given font.
font_get_metrics ¶
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 ¶
font_get_metrics_unscaled :: proc "c" (font: font) -> font_metrics ---
Get a font's unscaled metrics.
font_get_scale_for_em_pixels ¶
Get a scale factor to apply to unscaled font metrics to obtain a given 'm' size.
font_push_glyph_indices ¶
Get the glyph indices of a run of unicode code points in a given font and push them on an arena.
font_text_metrics ¶
font_text_metrics :: proc "c" (font: font, fontSize: f32, text: string) -> text_metrics ---
Get the text metrics for a utf8 string.
font_text_metrics_utf32 ¶
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_image_source_region ¶
get_image_source_region :: proc "c" () -> rect ---
Get the current image source region.
get_max_joint_excursion ¶
get_max_joint_excursion :: proc "c" () -> f32 ---
Get the current max joint excursion.
gles_surface_create ¶
gles_surface_create :: proc "c" () -> surface ---
Create a graphics surface for GLES rendering.
gles_surface_make_current ¶
gles_surface_make_current :: proc "c" (surface: surface) ---
Make the GL context of the surface current.
gles_surface_swap_buffers ¶
gles_surface_swap_buffers :: proc "c" (surface: surface) ---
Swap the buffers of a GLES surface.
glyph_outlines ¶
Add the outlines of a glyph run to the path, using glyph indices.
image_atlas_alloc_from_file ¶
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 ¶
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 ¶
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 ¶
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 ¶
image_atlas_recycle :: proc "c" (atlas: ^rect_atlas, imageRgn: image_region) ---
Recycle an image region allocated from an atlas.
image_create ¶
image_create :: proc "c" (renderer: canvas_renderer, width: u32, height: u32) -> image ---
Create an uninitialized image.
image_create_from_file ¶
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 ¶
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 ¶
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.
image_create_from_rgba8 ¶
image_create_from_rgba8 :: proc "c" (renderer: canvas_renderer, width: u32, height: u32, pixels: [^]u8) -> image ---
Create an image from an array of 8 bit per channel rgba values.
image_draw_region ¶
Draw a sub-region of an image.
image_is_nil ¶
Check if an image handle is nil
.
image_upload_region_rgba8 ¶
Upload pixels to an 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 ---
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 = ) -> ^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_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 ¶
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) ---
Multiply a matrix with the top of the transform stack, and push the result on the top of the stack.
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.
quadratic_to ¶
Add a quadratic Bézier curve to the path from the current position to a new one.
rect_atlas_alloc ¶
rect_atlas_alloc :: proc "c" (atlas: ^rect_atlas, width: i32, height: i32) -> rect ---
Allocate a rectangular region from an atlas.
rect_atlas_create ¶
rect_atlas_create :: proc "c" (arena: ^arena, width: i32, height: i32) -> ^rect_atlas ---
Create a rectangle atlas.
rect_atlas_recycle ¶
rect_atlas_recycle :: proc "c" (atlas: ^rect_atlas, rect: rect) ---
Recycle a rectangular region that was previously allocated from an atlas.
rectangle_fill ¶
Draw a filled rectangle.
rectangle_stroke ¶
Draw a stroked rectangle.
rounded_rectangle_fill ¶
Draw a filled rounded rectangle.
rounded_rectangle_stroke ¶
Draw a stroked rounded rectangle.
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_rgba ¶
Set the current color using linear RGBA values.
set_color_srgba ¶
Set the current color using sRGBA values.
set_gradient ¶
set_gradient :: proc "c" (blendSpace: gradient_blend_space, bottomLeft: color, bottomRight: color, topRight: color, topLeft: color) ---
Set the current color gradient.
set_image_source_region ¶
set_image_source_region :: proc "c" (region: rect) ---
Set the current source image region.
set_max_joint_excursion ¶
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 ¶
set_text_flip :: proc "c" (flip: bool) ---
Set the current text flip value. true
flips the y-axis of text rendering commands.
set_tolerance ¶
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.
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) ---
Bring a surface to the foreground, rendering it on top of other surfaces.
surface_contents_scaling ¶
Get the scaling factor of a surface.
surface_get_hidden ¶
Checks if a surface is hidden.
surface_get_size ¶
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 ¶
Check if a surface handle is nil
.
surface_send_to_back ¶
surface_send_to_back :: proc "c" (surface: surface) ---
Send a surface to the background, rendering it below other surfaces.
surface_set_hidden ¶
Set the hidden status of a surface.
text_outlines ¶
text_outlines :: proc "c" (string: string) ---
Add the outlines of a glyph run to the path, using a utf8 string.
ui_box_end ¶
ui_box_end :: proc "c" () -> ^ui_box ---
ui_box_release_focus ¶
ui_box_release_focus :: proc "c" (box: ^ui_box) ---
ui_box_request_focus ¶
ui_box_request_focus :: 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_context_create ¶
ui_context_create :: proc "c" (defaultFont: font) -> ^ui_context ---
ui_context_destroy ¶
ui_context_destroy :: proc "c" (_context: ^ui_context) ---
ui_frame_arena ¶
ui_frame_arena :: proc "c" () -> ^arena ---
ui_frame_begin ¶
ui_frame_begin :: proc "c" (size: [2]f32) ---
ui_frame_end ¶
ui_frame_end :: proc "c" () ---
ui_frame_time ¶
ui_frame_time :: proc "c" () -> f64 ---
ui_get_context ¶
ui_get_context :: proc "c" () -> ^ui_context ---
ui_get_sig ¶
ui_get_sig :: proc "c" () -> ui_sig ---
ui_input ¶
ui_input :: proc "c" () -> ^input_state ---
ui_menu_bar ¶
ui_menu_bar :: proc "contextless" (key: string) {…}
ui_menu_bar_begin ¶
ui_menu_bar_begin :: proc "c" (key: cstring) ---
ui_menu_bar_begin_str8 ¶
ui_menu_bar_begin_str8 :: proc "c" (key: string) ---
ui_menu_bar_end ¶
ui_menu_bar_end :: proc "c" () ---
ui_menu_begin_str8 ¶
ui_menu_begin_str8 :: proc "c" (key, name: string) ---
ui_menu_end ¶
ui_menu_end :: proc "c" () ---
ui_process_event ¶
ui_process_event :: proc "c" (event: ^event) ---
ui_radio_group ¶
ui_radio_group :: proc "c" (key: cstring, info: ^ui_radio_group_info) -> ui_radio_group_info ---
ui_radio_group_str8 ¶
ui_radio_group_str8 :: proc "c" (key: string, info: ^ui_radio_group_info) -> ui_radio_group_info ---
ui_release_focus ¶
ui_release_focus :: proc "c" () ---
ui_request_focus ¶
ui_request_focus :: proc "c" () ---
ui_select_popup ¶
ui_select_popup :: proc "c" (key: cstring, info: ^ui_select_popup_info) -> ui_select_popup_info ---
ui_select_popup_str8 ¶
ui_select_popup_str8 :: proc "c" (key: string, info: ^ui_select_popup_info) -> ui_select_popup_info ---
ui_set_closed ¶
ui_set_closed :: proc "c" (closed: bool) ---
ui_set_context ¶
ui_set_context :: proc "c" (_context: ^ui_context) ---
ui_set_draw_proc ¶
ui_set_draw_proc :: proc "c" (_proc: ui_box_draw_proc, data: rawptr) ---
ui_set_overlay ¶
ui_set_overlay :: proc "c" (overlay: bool) ---
ui_set_text ¶
ui_set_text :: proc "c" (text: string) ---
ui_style_rule_begin ¶
ui_style_rule_begin :: proc "c" (pattern: string) ---
ui_style_rule_end ¶
ui_style_rule_end :: proc "c" () ---
ui_style_set_color ¶
ui_style_set_color :: proc "c" (attr: ui_attribute, _color: color) ---
ui_style_set_f32 ¶
ui_style_set_f32 :: proc "c" (attr: ui_attribute, f: f32) ---
ui_style_set_font ¶
ui_style_set_font :: proc "c" (attr: ui_attribute, font: font) ---
ui_style_set_i32 ¶
ui_style_set_i32 :: proc "c" (attr: ui_attribute, i: i32) ---
ui_style_set_size ¶
ui_style_set_size :: proc "c" (attr: ui_attribute, size: ui_size) ---
ui_style_set_var ¶
ui_style_set_var :: proc "c" (attr: ui_attribute, var: cstring) ---
ui_style_set_var_str8 ¶
ui_style_set_var_str8 :: proc "c" (attr: ui_attribute, var: string) ---
ui_tag_next_str8 ¶
ui_tag_next_str8 :: proc "c" (string: string) ---
ui_tag_str8 ¶
ui_tag_str8 :: proc "c" (string: string) ---
ui_text_box ¶
ui_text_box :: proc "c" (key: cstring, arena: ^arena, info: ^ui_text_box_info) -> ui_text_box_result ---
ui_text_box_str8 ¶
ui_text_box_str8 :: proc "c" (key: string, arena: ^arena, info: ^ui_text_box_info) -> ui_text_box_result ---
ui_theme_dark ¶
ui_theme_dark :: proc "c" () ---
ui_theme_light ¶
ui_theme_light :: proc "c" () ---
ui_user_data_get ¶
ui_user_data_get :: proc "c" () -> cstring ---
utf8_byte_count_for_codepoints ¶
Get the length of the utf8 encoding of a sequence of unicode codepoints.
utf8_codepoint_size ¶
utf8_codepoint_size :: proc "c" (codePoint: untyped rune) -> u32 ---
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-2025-03 (vendor "odin") Windows_amd64 @ 2025-03-25 21:11:15.672176100 +0000 UTC