REFERENCE
C API
195 entries · Page 1 of 2
kui_devtools_dispatch_commandExecute a NUL-terminated CDP JSON command directly on the main thread and copy its JSON response. A short response buffer is truncated and reports the required length. Calling again executes the command again, so account for side effects.
kui_devtools_dispatch_key_eventInject a key-down, key-up, or character event into the focused element on the main thread only. key is the semantic name, code is an optional physical code, text supplies character input, and is_auto_repeat marks a held-key repeat.
kui_devtools_dispatch_mouse_eventInject a mouse move, press, release, or wheel event into a document on the main thread only. Coordinates are viewport-relative CSS pixels. Modifier bits are Alt=1, Ctrl=2, Meta=4, Shift=8; deltas apply to wheel events only.
kui_devtools_get_box_modelQuery the box model of the element matching a selector on the main thread only. Write 32 floats: eight each for content, padding, border, and margin, plus width and height in CSS pixels. No match returns NOT_FOUND.
kui_document_add_stylesheetAdd CSS stylesheet source to the document; call on the main thread. Input strings use UTF-8 and explicit byte lengths; length 0 means strlen. Required names, selectors, paths and source text must not be NULL.
kui_document_bodyGet a counted reference to the document body element and release it when done.
kui_document_clear_stylesheetsClear document stylesheets; call on the main thread.
kui_document_createCreate a standalone document and return one counted reference to release when done. This does not attach the document to a window.
kui_document_create_elementCreate a document element by tag name and return a counted reference to release. Creation does not itself insert it into the DOM. Call on the main thread. Input strings use UTF-8 and explicit byte lengths; length 0 means strlen. Required names, selectors, paths and source text must not be NULL.
kui_document_custom_element_is_definedCheck whether a tag is defined in the document custom element registry. Returns NOT_SUPPORTED when the registry is unavailable.
kui_document_define_custom_elementDefine a custom element tag and connected, disconnected, and observed-attribute callbacks on the main thread. Observed attribute names are copied during registration. Callback elements and text are borrowed; retain the element or copy text before keeping them. Returns NOT_SUPPORTED without a registry.
kui_document_extension_get_perf_statsRead an extension last, maximum, and total tick/paint times and invocation counts by tag name. Time fields are milliseconds. Returns NOT_SUPPORTED without an extension manager.
kui_document_extension_invokeInvoke a target extension element method on the main thread with typed arguments and a maximum result count. Release the returned result handle; inspect it separately for the extension invocation status. A missing extension manager returns NOT_SUPPORTED.
kui_document_extension_is_loadedCheck whether the document has loaded a DOM element extension for a tag name. Returns NOT_SUPPORTED when no extension manager is available.
kui_document_extension_reset_perf_statsReset performance statistics in the document extension manager. Returns NOT_SUPPORTED without an extension manager.
kui_document_get_element_by_idFind a document element by ID. The caller must release the returned element reference; lookup results follow the same reference-counting rule as constructors. Input strings use UTF-8 and explicit byte lengths; length 0 means strlen. Required names, selectors, paths and source text must not be NULL.
kui_document_headGet a counted reference to the document head element and release it when done.
kui_document_init_extensionsInitialize document DOM element extensions from a directory on the main thread and optionally report the loaded count. Returns NOT_SUPPORTED when the extension manager is unavailable. This uses the kuiext element extension protocol.
kui_document_load_htmlLoad document content from an HTML source string; DOM mutation must run on the main thread. Input strings use UTF-8 and explicit byte lengths; length 0 means strlen. Required names, selectors, paths and source text must not be NULL.
kui_document_load_html_fileLoad an HTML document from the supplied file path; DOM mutation must run on the main thread. Input strings use UTF-8 and explicit byte lengths; length 0 means strlen. Required names, selectors, paths and source text must not be NULL.
kui_document_print_to_pdfWrite a document to a PDF path on the main thread with metadata, page dimensions in points, font rasterization, and outline options. out_written reports whether writing succeeded. A windowless document temporarily receives a headless rendering backend; unavailable backends return NOT_SUPPORTED.
kui_document_query_selectorFind the first document element matching a CSS selector; the returned counted reference must be released. Input strings use UTF-8 and explicit byte lengths; length 0 means strlen. Required names, selectors, paths and source text must not be NULL.
kui_document_query_selector_allFind all document elements matching a selector, writing handles into a caller-provided array and reporting the count. Release every element reference actually returned. Input strings use UTF-8 and explicit byte lengths; length 0 means strlen. Required names, selectors, paths and source text must not be NULL.
kui_document_releaseDrop a document reference; only the last reference destroys the object. NULL is an error, and the released reference must not be used. Reference operations are atomic and safe from any thread.
kui_document_retainAdd a document reference. Pair each retain with release; reference operations are atomic and safe from any thread.
kui_document_rootGet a counted reference to the document root element and release it when done.
kui_element_add_event_listenerRegister an event-type listener and return its ID. The callback runs during main-thread dispatch and may mutate the DOM. evt is borrowed only during the callback: never store or release it. The caller manages user_data. Input strings use UTF-8 and explicit byte lengths; length 0 means strlen. Required names, selectors, paths and source text must not be NULL.
kui_element_append_childAppend a child element to its parent. The caller still releases its own element references. Mutate the DOM on the main thread.
kui_element_blurBlur the element; call on the main thread.
kui_element_child_countRead the child-element count, excluding text and other non-element nodes.
kui_element_class_list_addAdd the supplied token to the class list; call on the main thread. Input strings use UTF-8 and explicit byte lengths; length 0 means strlen. Required names, selectors, paths and source text must not be NULL.
kui_element_class_list_containsCheck whether the class list contains the supplied token. Input strings use UTF-8 and explicit byte lengths; length 0 means strlen. Required names, selectors, paths and source text must not be NULL.
kui_element_class_list_removeRemove the supplied token from the class list; call on the main thread. Input strings use UTF-8 and explicit byte lengths; length 0 means strlen. Required names, selectors, paths and source text must not be NULL.
kui_element_class_list_toggleToggle the presence of the supplied class token; call on the main thread. Input strings use UTF-8 and explicit byte lengths; length 0 means strlen. Required names, selectors, paths and source text must not be NULL.
kui_element_dispatch_eventDispatch a synthetic event at the element through the normal capture/bubble path. The element must be attached to a document or INVALID_ARG is returned. Optional out_not_canceled is 1 if no listener prevents the default. No mouse coordinates or key state are carried. Input strings use UTF-8 and explicit byte lengths; length 0 means strlen. Required names, selectors, paths and source text must not be NULL.
kui_element_first_childGet a counted reference to the first child element, skipping non-element nodes; release it when done.
kui_element_focusFocus the element; call on the main thread.
kui_element_get_attributeRead the value of the named element attribute. UTF-8 output uses the caller buffer: query with NULL/0, then allocate out_len+1; the length excludes NUL. Insufficient capacity returns BUFFER_TOO_SMALL and the required length; positive capacity still receives a truncated NUL-terminated result. Input strings use UTF-8 and explicit byte lengths; length 0 means strlen. Required names, selectors, paths and source text must not be NULL.
kui_element_get_bounding_rectRead the bounding rectangle of a laid-out element on the main thread, preserving subpixel geometry. A document that has never been laid out may return zero sizes successfully.
kui_element_get_class_nameRead the element full class-name string. UTF-8 output uses the caller buffer: query with NULL/0, then allocate out_len+1; the length excludes NUL. Insufficient capacity returns BUFFER_TOO_SMALL and the required length; positive capacity still receives a truncated NUL-terminated result.
kui_element_get_client_metricsRead client metrics for the padding box: left/top are border widths, and width/height exclude rendered scrollbars. All four values use floor(x+0.5). Individual outputs may be omitted, but not all of them. Read on the main thread after layout; a never-laid-out document may return zero values successfully.
kui_element_get_idRead the element ID. UTF-8 output uses the caller buffer: query with NULL/0, then allocate out_len+1; the length excludes NUL. Insufficient capacity returns BUFFER_TOO_SMALL and the required length; positive capacity still receives a truncated NUL-terminated result.
kui_element_get_inner_htmlRead the serialized element innerHTML. UTF-8 output uses the caller buffer: query with NULL/0, then allocate out_len+1; the length excludes NUL. Insufficient capacity returns BUFFER_TOO_SMALL and the required length; positive capacity still receives a truncated NUL-terminated result.
kui_element_get_offset_metricsRead border-box position and size relative to the offset parent. All four values use floor(x+0.5); use the bounding rectangle for subpixel geometry. Outputs may be omitted individually, but not all at once. Read on the main thread after layout; a never-laid-out document may return zero values successfully.
kui_element_get_scroll_metricsRead the current scroll offsets and full scrollable extent. left/top remain fractional, while width/height use floor(x+0.5). Individual outputs may be omitted, but not all of them. Read on the main thread after layout; a never-laid-out document may return zero values successfully.
kui_element_get_style_propertyRead the serialized value of a property in the element inline declaration. An unset property returns KUI_ERR_NOT_FOUND. color:red may serialize as #ff0000; the output need not match the input text. For UTF-8 output, query the length with NULL/0, then allocate need+1. The length excludes the terminating NUL; a short buffer returns BUFFER_TOO_SMALL and reports the full required length.
kui_element_get_style_property_countCount the properties actually set in the element inline declaration for inspection and enumeration.
kui_element_get_style_property_nameRead an inline declaration property name by index. Enumeration indices may change as soon as the declaration is modified. For UTF-8 output, query the length with NULL/0, then allocate need+1. The length excludes the terminating NUL; a short buffer returns BUFFER_TOO_SMALL and reports the full required length.
kui_element_get_style_textRead the serialized text of the complete inline style declaration, corresponding to the style attribute value. For UTF-8 output, query the length with NULL/0, then allocate need+1. The length excludes the terminating NUL; a short buffer returns BUFFER_TOO_SMALL and reports the full required length.
kui_element_get_tag_nameRead the element tag name. UTF-8 output uses the caller buffer: query with NULL/0, then allocate out_len+1; the length excludes NUL. Insufficient capacity returns BUFFER_TOO_SMALL and the required length; positive capacity still receives a truncated NUL-terminated result.
kui_element_get_text_contentRead the element textContent. UTF-8 output uses the caller buffer: query with NULL/0, then allocate out_len+1; the length excludes NUL. Insufficient capacity returns BUFFER_TOO_SMALL and the required length; positive capacity still receives a truncated NUL-terminated result.
kui_element_has_attributeCheck whether the element has the named attribute. Input strings use UTF-8 and explicit byte lengths; length 0 means strlen. Required names, selectors, paths and source text must not be NULL.
kui_element_last_childGet a counted reference to the last child element, skipping non-element nodes; release it when done.
kui_element_next_siblingGet a counted reference to the next sibling element, skipping non-element nodes; release it when done.
kui_element_parentGet a counted reference to the parent element and release it when done.
kui_element_position_relative_toPosition an element relative to an anchor on the main thread using placement and optional flip, viewport clamping, offset, and viewport margin settings. Both element handles must be valid.
kui_element_previous_siblingGet a counted reference to the previous sibling element, skipping non-element nodes; release it when done.
kui_element_query_selectorFind the first matching element within this element query scope; release the returned counted reference. Input strings use UTF-8 and explicit byte lengths; length 0 means strlen. Required names, selectors, paths and source text must not be NULL.
kui_element_query_selector_allFind all matching elements within this element query scope, writing to the caller handle array and reporting the count. Release each counted reference actually returned. Input strings use UTF-8 and explicit byte lengths; length 0 means strlen. Required names, selectors, paths and source text must not be NULL.
kui_element_releaseRelease one element reference. Other references can keep an element alive after DOM removal. Release each reference exactly once and do not reuse it; atomic reference operations are safe from any thread.
kui_element_removeRemove the element from its DOM tree. Existing handles keep it alive through reference counting. Call on the main thread.
kui_element_remove_attributeRemove a named element attribute; call on the main thread. Input strings use UTF-8 and explicit byte lengths; length 0 means strlen. Required names, selectors, paths and source text must not be NULL.
kui_element_remove_childRemove a child from the supplied parent. A missing child returns NOT_FOUND; existing counted references can keep it alive. Call on the main thread.
kui_element_remove_event_listenerRemove one listener using both event name and listener ID. IDs are scoped by event type, so an ID alone is ambiguous. Input strings use UTF-8 and explicit byte lengths; length 0 means strlen. Required names, selectors, paths and source text must not be NULL.
kui_element_remove_event_listenersRemove every listener registered on the element for the supplied event name. Input strings use UTF-8 and explicit byte lengths; length 0 means strlen. Required names, selectors, paths and source text must not be NULL.
kui_element_remove_style_propertyRemove one property from the element inline style declaration on the main thread.
kui_element_retainAdd an extra element reference. Ordinary handle-returning functions already provide one, so they need no extra retain. Pair every retain with release; atomic reference operations are safe from any thread.
kui_element_scroll_byScroll the element by dx/dy; call on the main thread.
kui_element_set_attributeSet a named element attribute value; call on the main thread. Input strings use UTF-8 and explicit byte lengths; length 0 means strlen. Required names, selectors, paths and source text must not be NULL.
kui_element_set_class_nameReplace the element class-name string; call on the main thread. Input strings use UTF-8 and explicit byte lengths; length 0 means strlen. Required names, selectors, paths and source text must not be NULL.
kui_element_set_inner_htmlReplace the element innerHTML with HTML source; mutate the DOM on the main thread. Input strings use UTF-8 and explicit byte lengths; length 0 means strlen. Required names, selectors, paths and source text must not be NULL.
kui_element_set_scroll_positionSet the element absolute left/top scroll position; call on the main thread.
kui_element_set_style_propertySet one inline style declaration on the main thread. A nonzero important flag marks it !important. This changes the element own declaration.
kui_element_set_style_textSet the complete element inline style declaration from CSS text on the main thread.
kui_element_set_text_contentSet the element textContent; mutate the DOM on the main thread. Input strings use UTF-8 and explicit byte lengths; length 0 means strlen. Required names, selectors, paths and source text must not be NULL.
kui_element_style_property_is_importantCheck whether the specified inline declaration is marked !important and return the result as an integer.
kui_event_drag_get_fileRead a dragged file path by index. Non-drag events or missing DataTransfer return NOT_SUPPORTED; an out-of-range index returns NOT_FOUND. Copy needed information before the event callback ends. For UTF-8 output, query the length with NULL/0, then allocate need+1. The length excludes the terminating NUL; a short buffer returns BUFFER_TOO_SMALL and reports the full required length.
kui_event_drag_get_file_countRead the file count in a drag event DataTransfer. A non-drag event or missing DataTransfer returns NOT_SUPPORTED. The event is borrowed only for its callback.
kui_event_get_current_targetGet a counted reference to the current event target element and release it when done. evt is valid only during the current callback and must not be stored or released.
kui_event_get_flagsRead the event bubbles, cancelable and defaultPrevented flags. evt is valid only during the current callback and must not be stored or released.
kui_event_get_targetGet a counted reference to the event target element and release it when done. A non-element target, such as a text node, returns NOT_FOUND. evt is valid only during the current callback and must not be stored or released.
kui_event_get_typeRead the current event type name. UTF-8 output uses the caller buffer: query with NULL/0, then allocate out_len+1; the length excludes NUL. Insufficient capacity returns BUFFER_TOO_SMALL and the required length; positive capacity still receives a truncated NUL-terminated result. evt is valid only during the current callback and must not be stored or released.
kui_event_get_type_tagRead the runtime tag of a borrowed event to distinguish base, mouse, wheel, pointer, keyboard, focus, input, and drag events. Access the event only while its callback remains active.
kui_event_key_get_codeRead the physical key code of a keyboard event, such as KeyA. Non-keyboard events return KUI_ERR_NOT_SUPPORTED. For UTF-8 output, query the length with NULL/0, then allocate need+1. The length excludes the terminating NUL; a short buffer returns BUFFER_TOO_SMALL and reports the full required length. The event is borrowed only within its callback; do not save or release it.
kui_event_key_get_keyRead the semantic key name of a keyboard event, such as a, Enter, or ArrowUp. Non-keyboard events return KUI_ERR_NOT_SUPPORTED. For UTF-8 output, query the length with NULL/0, then allocate need+1. The length excludes the terminating NUL; a short buffer returns BUFFER_TOO_SMALL and reports the full required length. The event is borrowed only within its callback; do not save or release it.
kui_event_key_get_modifiersRead Ctrl, Shift, Alt, and Meta states from a keyboard event. Unneeded outputs may be NULL. Non-keyboard events return KUI_ERR_NOT_SUPPORTED. The event is borrowed only within its callback; do not save or release it.
kui_event_mouse_get_buttonRead the KuiCMouseButton value of a mouse event. Non-mouse events return KUI_ERR_NOT_SUPPORTED. The event is borrowed for the current callback only; do not retain or release it.
kui_event_mouse_get_client_xyRead mouse client coordinates relative to the viewport; a non-mouse event returns NOT_SUPPORTED. evt is valid only during the current callback and must not be stored or released.
kui_event_mouse_get_offset_xyRead mouse offset coordinates relative to the target padding box; a non-mouse event returns NOT_SUPPORTED. evt is valid only during the current callback and must not be stored or released.
kui_event_mouse_get_page_xyRead mouse page coordinates including scroll offsets; a non-mouse event returns NOT_SUPPORTED. evt is valid only during the current callback and must not be stored or released.
kui_event_prevent_defaultPrevent the default action during the current event callback. evt is valid only during the current callback and must not be stored or released.
kui_event_stop_propagationStop further propagation during the current event callback. evt is valid only during the current callback and must not be stored or released.
kui_extension_result_get_countRead the number of values actually returned by an extension invocation for indexed access.
kui_extension_result_get_errorRead the error text stored in an extension invocation result. For UTF-8 output, query the length with NULL/0, then allocate need+1. The length excludes the terminating NUL; a short buffer returns BUFFER_TOO_SMALL and reports the full required length.
kui_extension_result_get_statusRead the extension method invocation status code. It is distinct from the KuiStatus returned by the result accessor itself.
kui_extension_result_get_stringCopy an extension string result by index. An out-of-range index returns NOT_FOUND; a non-string result returns NOT_SUPPORTED. For UTF-8 output, query the length with NULL/0, then allocate need+1. The length excludes the terminating NUL; a short buffer returns BUFFER_TOO_SMALL and reports the full required length.
kui_extension_result_get_valueRead an extension result type and scalar fields by index. An out-of-range index returns NOT_FOUND. For strings, string_len reports the length and string_value is NULL; copy the text with get_string.
kui_extension_result_releaseRelease an extension invocation result handle exactly once. Read any needed values and error text before release.
kui_get_versionRead the loaded library runtime version, which can differ from the compile-time version macros.
kui_http_client_cancel_allCancel all pending asynchronous requests belonging to this client.
kui_http_client_createCreate an HTTP client handle for synchronous or asynchronous requests. Release it with kui_http_client_release when finished.
kui_http_client_fetch_asyncFetch a URL asynchronously and call back on completion. The callback may run on a worker thread and must not mutate the DOM directly. It owns and must release the response handle. Allocation failure may pass NULL; the callback must not throw.
kui_http_client_fetch_syncFetch a URL synchronously, blocking until completion or timeout. Release the returned response handle separately. KUI_OK means the ABI call completed; inspect the response for HTTP status and network errors.
kui_http_client_releaseRelease and destroy an HTTP client handle exactly once. Do not start further requests through the released handle.
kui_http_client_set_user_agentSet the HTTP client User-Agent string. The UTF-8 pointer must be non-NULL; zero len reads through the NUL terminator.
kui_http_response_get_bodyCopy raw response body bytes, which may contain NUL. Query the required byte count, then allocate need+1 bytes. The current bridge also writes a terminating NUL; the body length excludes that terminator.
kui_http_response_get_content_typeRead the HTTP response Content-Type string. For UTF-8 output, query the length with NULL/0, then allocate need+1. The length excludes the terminating NUL; a short buffer returns BUFFER_TOO_SMALL and reports the full required length.
kui_http_response_get_errorRead the HTTP response network error string to inspect and display the reason for a failed request. For UTF-8 output, query the length with NULL/0, then allocate need+1. The length excludes the terminating NUL; a short buffer returns BUFFER_TOO_SMALL and reports the full required length.
kui_http_response_get_statusRead the HTTP response status code. Check the error text separately for transport failures.
kui_http_response_releaseRelease an HTTP response handle exactly once. The caller owns responses returned synchronously and responses received by asynchronous callbacks.
kui_lottie_get_completeQuery whether a Lottie resource has finished loading as 0 or 1. complete checks LoadState::Complete, not whether playback has ended. Non-Lottie elements return NOT_SUPPORTED.
kui_lottie_get_natural_sizeRead a Lottie animation natural width and height. One output may be omitted, but not both. Non-Lottie elements return NOT_SUPPORTED.
kui_lottie_pausePause animation of a Lottie element on the main thread. Non-Lottie elements return NOT_SUPPORTED.
kui_lottie_playRequest playback of a Lottie element on the main thread. Non-Lottie elements return NOT_SUPPORTED.
kui_lottie_set_srcSet a Lottie element source on the main thread. src must be non-NULL; non-Lottie elements return NOT_SUPPORTED.
kui_media_get_current_timeRead a media element current playback time in seconds. Non-media elements return NOT_SUPPORTED.
kui_media_get_durationRead the media resource duration in seconds. Non-media elements return NOT_SUPPORTED.
kui_media_get_mutedRead whether a media element is muted as 0 or 1. Non-media elements return NOT_SUPPORTED.
kui_media_get_network_stateRead the integer network-state enum value of a media element. Non-media elements return NOT_SUPPORTED.
kui_media_get_pausedRead whether a media element is paused as 0 or 1. Non-media elements return NOT_SUPPORTED.
kui_media_get_ready_stateRead the integer ready-state enum value of a media element. Non-media elements return NOT_SUPPORTED.
kui_media_get_volumeRead a media element current volume. Non-media elements return NOT_SUPPORTED.
kui_media_is_availableQuery whether media capability is available for a media element, returning 0 or 1. Non-media elements return NOT_SUPPORTED. Availability does not establish successful resource playback.
kui_media_pausePause a media element on the main thread. Non-media elements return NOT_SUPPORTED.
kui_media_playRequest playback of a media element on the main thread. A non-media element returns NOT_SUPPORTED; actual playback also depends on the media backend and resource state.
kui_media_set_controlsSet whether a media element displays playback controls on the main thread. A nonzero enabled flag enables them. Non-media elements return NOT_SUPPORTED.
kui_media_set_current_timeSet a media element playback position in seconds on the main thread. Non-media elements return NOT_SUPPORTED.
kui_media_set_mutedSet a media element muted state on the main thread. A nonzero muted flag mutes it. Non-media elements return NOT_SUPPORTED.
kui_media_set_srcSet a media element source on the main thread. src must be non-NULL, and non-media elements return NOT_SUPPORTED.
kui_media_set_volumeSet a media element volume on the main thread. Non-media elements return NOT_SUPPORTED. Value handling follows the media element implementation.
kui_platform_clear_timerClear a timeout or interval task by timer ID.
kui_platform_get_clipboard_textCopy text from the system clipboard into a caller-owned buffer. For UTF-8 output, query the length with NULL/0, then allocate need+1. The length excludes the terminating NUL; a short buffer returns BUFFER_TOO_SMALL and reports the full required length.
kui_platform_get_monitorRead a monitor bounds, work area, scale, and primary flag by index. Write its name into a caller-owned UTF-8 buffer. A missing index returns NOT_FOUND. For UTF-8 output, query the length with NULL/0, then allocate need+1. The length excludes the terminating NUL; a short buffer returns BUFFER_TOO_SMALL and reports the full required length.
kui_platform_get_monitor_countRead the current monitor count to determine the range for indexed monitor queries.
kui_platform_get_os_nameRead the current operating system name into a caller-owned buffer. For UTF-8 output, query the length with NULL/0, then allocate need+1. The length excludes the terminating NUL; a short buffer returns BUFFER_TOO_SMALL and reports the full required length.
kui_platform_get_os_versionRead the current operating system version string into a caller-owned buffer. For UTF-8 output, query the length with NULL/0, then allocate need+1. The length excludes the terminating NUL; a short buffer returns BUFFER_TOO_SMALL and reports the full required length.
kui_platform_get_primary_monitorRead the primary monitor bounds, work area, scale and primary flag.
kui_platform_get_primary_monitor_physical_sizeRead the primary monitor physical size. Either width or height may be omitted, but both outputs cannot be NULL.
kui_platform_has_clipboard_textCheck whether the system clipboard currently contains text and return the result as an integer.
kui_platform_initInitialize process-wide platform services before creating GUI windows and running the event loop.
kui_platform_open_file_dialogOpen a file picker with title, default path, filters, and multiple-selection options. Supply a valid output buffer for this one-shot operation; the header recommends 32768 bytes on Windows. Cancellation returns NOT_FOUND. Do not probe with an empty buffer and then reopen.
kui_platform_poll_eventsProcess pending events and return immediately, for embedding in a host that owns its event loop.
kui_platform_quitRequest that the platform event loop quit with the supplied exit code.
kui_platform_request_idleSchedule a callback once when the event loop next becomes idle. It runs on the main thread; KUI does not free user_data.
kui_platform_runRun the blocking platform event loop until quit is requested, returning the exit code through the output parameter.
kui_platform_save_file_dialogOpen a save-file dialog and return the chosen path. Supply a valid output buffer in this one-shot operation; 32768 bytes is recommended on Windows. Cancellation returns NOT_FOUND. The returned path does not itself save file contents.
kui_platform_select_folder_dialogOpen a folder picker with a title and copy the selected path. Provide a valid buffer for the one-shot operation; 32768 bytes is recommended on Windows. Cancellation returns NOT_FOUND.
kui_platform_set_clipboard_textWrite UTF-8 text to the system clipboard. text must be non-NULL; a zero len reads through the NUL terminator.
kui_platform_set_f12_devtools_enabledEnable or disable the platform behavior that opens DevTools with F12.
kui_platform_set_intervalSchedule a repeating callback at a millisecond interval and return its ID; clear it explicitly. Callbacks run on the main thread only while the event loop is active. The caller owns user_data and must keep it alive at least until the timer is cleared.