API reference

kui_c.h · C API · 1/3

Browse entries grouped by interface file. Expand an entry for declarations, usage and version boundaries.

Read the related guide →

Entries retain declarations and sources. Runtime verification is recorded per entry; internal source candidates are not a promise of SDK delivery.

sdk/c/include/kui_c.h
kui_devtools_dispatch_command
Declared3.61.7C / Go / Rust

Execute 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_c.h
KUI_C_API KuiStatus kui_devtools_dispatch_command( KuiDocument* doc, const char* json_command, char* buf, size_t buf_capacity, size_t* out_len );

Verification scope

Indexed from current sources. Runtime, combination and platform checks have not been completed for every entry.

sdk/c/include/kui_c.h:672

Report an issue with this entry →
kui_devtools_dispatch_key_event
Declared3.61.7C / Go / Rust

Inject 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_c.h
KUI_C_API KuiStatus kui_devtools_dispatch_key_event( KuiDocument* doc, KuiCKeyEventType type, const char* key, size_t key_len, const char* code, size_t code_len, int modifiers, const char* text, size_t text_len, int is_auto_repeat );

Verification scope

Indexed from current sources. Runtime, combination and platform checks have not been completed for every entry.

sdk/c/include/kui_c.h:626

Report an issue with this entry →
kui_devtools_dispatch_mouse_event
Declared3.61.7C / Go / Rust

Inject 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_c.h
KUI_C_API KuiStatus kui_devtools_dispatch_mouse_event( KuiDocument* doc, KuiCMouseEventType type, float x, float y, KuiCMouseButton button, int modifiers, int click_count, float delta_x, float delta_y );

Verification scope

Indexed from current sources. Runtime, combination and platform checks have not been completed for every entry.

sdk/c/include/kui_c.h:599

Report an issue with this entry →
kui_devtools_get_box_model
Declared3.61.7C / Go / Rust

Query 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_c.h
KUI_C_API KuiStatus kui_devtools_get_box_model( KuiDocument* doc, const char* selector, float out_quads[32], float* out_width, float* out_height );

Verification scope

Indexed from current sources. Runtime, combination and platform checks have not been completed for every entry.

sdk/c/include/kui_c.h:649

Report an issue with this entry →
kui_document_add_stylesheet
Declared3.61.7C / Go / Rust

Add 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_c.h
KUI_C_API KuiStatus kui_document_add_stylesheet (KuiDocument* doc, const char* css, size_t css_len);

Verification scope

Indexed from current sources. Runtime, combination and platform checks have not been completed for every entry.

sdk/c/include/kui_c.h:295

Report an issue with this entry →
kui_document_body
Declared3.61.7C / Go / Rust

Get a counted reference to the document body element and release it when done.

kui_c.h
KUI_C_API KuiStatus kui_document_body (KuiDocument* doc, KuiElement** out);

Verification scope

Indexed from current sources. Runtime, combination and platform checks have not been completed for every entry.

sdk/c/include/kui_c.h:299

Report an issue with this entry →
kui_document_clear_stylesheets
Declared3.61.7C / Go / Rust

Clear document stylesheets; call on the main thread.

kui_c.h
KUI_C_API KuiStatus kui_document_clear_stylesheets(KuiDocument* doc);

Verification scope

Indexed from current sources. Runtime, combination and platform checks have not been completed for every entry.

sdk/c/include/kui_c.h:296

Report an issue with this entry →
kui_document_create
Declared3.61.7C / Go / Rust

Create a standalone document and return one counted reference to release when done. This does not attach the document to a window.

kui_c.h
KUI_C_API KuiStatus kui_document_create (KuiDocument** out);

Verification scope

Indexed from current sources. Runtime, combination and platform checks have not been completed for every entry.

sdk/c/include/kui_c.h:286

Report an issue with this entry →
kui_document_create_element
Declared3.61.7C / Go / Rust

Create 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_c.h
KUI_C_API KuiStatus kui_document_create_element(KuiDocument* doc, const char* tag, size_t tag_len, KuiElement** out);

Verification scope

Indexed from current sources. Runtime, combination and platform checks have not been completed for every entry.

sdk/c/include/kui_c.h:311

Report an issue with this entry →
kui_document_custom_element_is_defined
Declared3.61.7C / Go / Rust

Check whether a tag is defined in the document custom element registry. Returns NOT_SUPPORTED when the registry is unavailable.

kui_c.h
KUI_C_API KuiStatus kui_document_custom_element_is_defined(KuiDocument* document, const char* tag_name, size_t len, int* out_defined);

Verification scope

Indexed from current sources. Runtime, combination and platform checks have not been completed for every entry.

sdk/c/include/kui_c.h:922

Report an issue with this entry →
kui_document_define_custom_element
Declared3.61.7C / Go / Rust

Define 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_c.h
KUI_C_API KuiStatus kui_document_define_custom_element(KuiDocument* document, const char* tag_name, size_t len, const KuiCCustomElementCallbacks* callbacks);

Verification scope

Indexed from current sources. Runtime, combination and platform checks have not been completed for every entry.

sdk/c/include/kui_c.h:919

Report an issue with this entry →
kui_document_extension_get_perf_stats
Declared3.61.7C / Go / Rust

Read 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_c.h
KUI_C_API KuiStatus kui_document_extension_get_perf_stats(KuiDocument* document, const char* tag_name, size_t len, KuiCExtensionPerfStats* out_stats);

Verification scope

Indexed from current sources. Runtime, combination and platform checks have not been completed for every entry.

sdk/c/include/kui_c.h:899

Report an issue with this entry →
kui_document_extension_invoke
Declared3.61.7C / Go / Rust

Invoke 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_c.h
KUI_C_API KuiStatus kui_document_extension_invoke(KuiDocument* document, KuiElement* element, const char* method, size_t method_len, const KuiCExtensionValue* args, size_t arg_count, size_t max_results, KuiExtensionResult** out_result);

Verification scope

Indexed from current sources. Runtime, combination and platform checks have not been completed for every entry.

sdk/c/include/kui_c.h:878

Report an issue with this entry →
kui_document_extension_is_loaded
Declared3.61.7C / Go / Rust

Check whether the document has loaded a DOM element extension for a tag name. Returns NOT_SUPPORTED when no extension manager is available.

kui_c.h
KUI_C_API KuiStatus kui_document_extension_is_loaded(KuiDocument* document, const char* tag_name, size_t len, int* out_loaded);

Verification scope

Indexed from current sources. Runtime, combination and platform checks have not been completed for every entry.

sdk/c/include/kui_c.h:875

Report an issue with this entry →
kui_document_extension_reset_perf_stats
Declared3.61.7C / Go / Rust

Reset performance statistics in the document extension manager. Returns NOT_SUPPORTED without an extension manager.

kui_c.h
KUI_C_API KuiStatus kui_document_extension_reset_perf_stats(KuiDocument* document);

Verification scope

Indexed from current sources. Runtime, combination and platform checks have not been completed for every entry.

sdk/c/include/kui_c.h:902

Report an issue with this entry →
kui_document_get_element_by_id
Declared3.61.7C / Go / Rust

Find 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_c.h
KUI_C_API KuiStatus kui_document_get_element_by_id(KuiDocument* doc, const char* id, size_t id_len, KuiElement** out);

Verification scope

Indexed from current sources. Runtime, combination and platform checks have not been completed for every entry.

sdk/c/include/kui_c.h:302

Report an issue with this entry →
kui_document_head
Declared3.61.7C / Go / Rust

Get a counted reference to the document head element and release it when done.

kui_c.h
KUI_C_API KuiStatus kui_document_head (KuiDocument* doc, KuiElement** out);

Verification scope

Indexed from current sources. Runtime, combination and platform checks have not been completed for every entry.

sdk/c/include/kui_c.h:300

Report an issue with this entry →
kui_document_init_extensions
Declared3.61.7C / Go / Rust

Initialize 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_c.h
KUI_C_API KuiStatus kui_document_init_extensions(KuiDocument* document, const char* directory, size_t len, size_t* out_loaded_count);

Verification scope

Indexed from current sources. Runtime, combination and platform checks have not been completed for every entry.

sdk/c/include/kui_c.h:872

Report an issue with this entry →
kui_document_load_html
Declared3.61.7C / Go / Rust

Load 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_c.h
KUI_C_API KuiStatus kui_document_load_html (KuiDocument* doc, const char* html, size_t html_len);

Verification scope

Indexed from current sources. Runtime, combination and platform checks have not been completed for every entry.

sdk/c/include/kui_c.h:293

Report an issue with this entry →
kui_document_load_html_file
Declared3.61.7C / Go / Rust

Load 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_c.h
KUI_C_API KuiStatus kui_document_load_html_file (KuiDocument* doc, const char* path, size_t path_len);

Verification scope

Indexed from current sources. Runtime, combination and platform checks have not been completed for every entry.

sdk/c/include/kui_c.h:294

Report an issue with this entry →
kui_document_print_to_pdf
Declared3.61.7C / Go / Rust

Write 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_c.h
KUI_C_API KuiStatus kui_document_print_to_pdf(KuiDocument* document, const char* path, size_t path_len, const KuiCPDFOptions* options, int* out_written);

Verification scope

Indexed from current sources. Runtime, combination and platform checks have not been completed for every entry.

sdk/c/include/kui_c.h:939

Report an issue with this entry →
kui_document_query_selector
Declared3.61.7C / Go / Rust

Find 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_c.h
KUI_C_API KuiStatus kui_document_query_selector (KuiDocument* doc, const char* sel, size_t sel_len, KuiElement** out);

Verification scope

Indexed from current sources. Runtime, combination and platform checks have not been completed for every entry.

sdk/c/include/kui_c.h:304

Report an issue with this entry →
kui_document_query_selector_all
Declared3.61.7C / Go / Rust

Find 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_c.h
KUI_C_API KuiStatus kui_document_query_selector_all(KuiDocument* doc, const char* sel, size_t sel_len, KuiElement** out_buf, size_t buf_capacity, size_t* out_count);

Verification scope

Indexed from current sources. Runtime, combination and platform checks have not been completed for every entry.

sdk/c/include/kui_c.h:307

Report an issue with this entry →
kui_document_release
Declared3.61.7C / Go / Rust

Drop 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_c.h
KUI_C_API KuiStatus kui_document_release (KuiDocument* doc);

Verification scope

Indexed from current sources. Runtime, combination and platform checks have not been completed for every entry.

sdk/c/include/kui_c.h:291

Report an issue with this entry →
kui_document_retain
Declared3.61.7C / Go / Rust

Add a document reference. Pair each retain with release; reference operations are atomic and safe from any thread.

kui_c.h
KUI_C_API KuiStatus kui_document_retain (KuiDocument* doc);

Verification scope

Indexed from current sources. Runtime, combination and platform checks have not been completed for every entry.

sdk/c/include/kui_c.h:288

Report an issue with this entry →
kui_document_root
Declared3.61.7C / Go / Rust

Get a counted reference to the document root element and release it when done.

kui_c.h
KUI_C_API KuiStatus kui_document_root (KuiDocument* doc, KuiElement** out);

Verification scope

Indexed from current sources. Runtime, combination and platform checks have not been completed for every entry.

sdk/c/include/kui_c.h:298

Report an issue with this entry →
kui_element_add_event_listener
Declared3.61.7C / Go / Rust

Register 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_c.h
KUI_C_API KuiStatus kui_element_add_event_listener(KuiElement* el, const char* event_name, size_t len, KuiEventListenerFn fn, void* user_data, KuiListenerId* out_id);

Verification scope

Indexed from current sources. Runtime, combination and platform checks have not been completed for every entry.

sdk/c/include/kui_c.h:405

Report an issue with this entry →
kui_element_append_child
Declared3.61.7C / Go / Rust

Append a child element to its parent. The caller still releases its own element references. Mutate the DOM on the main thread.

kui_c.h
KUI_C_API KuiStatus kui_element_append_child(KuiElement* parent, KuiElement* child);

Verification scope

Indexed from current sources. Runtime, combination and platform checks have not been completed for every entry.

sdk/c/include/kui_c.h:370

Report an issue with this entry →
kui_element_blur
Declared3.61.7C / Go / Rust

Blur the element; call on the main thread.

kui_c.h
KUI_C_API KuiStatus kui_element_blur(KuiElement* el);

Verification scope

Indexed from current sources. Runtime, combination and platform checks have not been completed for every entry.

sdk/c/include/kui_c.h:376

Report an issue with this entry →
kui_element_child_count
Declared3.61.7C / Go / Rust

Read the child-element count, excluding text and other non-element nodes.

kui_c.h
KUI_C_API KuiStatus kui_element_child_count(KuiElement* el, size_t* out_count);

Verification scope

Indexed from current sources. Runtime, combination and platform checks have not been completed for every entry.

sdk/c/include/kui_c.h:368

Report an issue with this entry →
kui_element_class_list_add
Declared3.61.7C / Go / Rust

Add 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_c.h
KUI_C_API KuiStatus kui_element_class_list_add (KuiElement* el, const char* token, size_t len);

Verification scope

Indexed from current sources. Runtime, combination and platform checks have not been completed for every entry.

sdk/c/include/kui_c.h:351

Report an issue with this entry →
kui_element_class_list_contains
Declared3.61.7C / Go / Rust

Check 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_c.h
KUI_C_API KuiStatus kui_element_class_list_contains(KuiElement* el, const char* token, size_t len, int* out_contains);

Verification scope

Indexed from current sources. Runtime, combination and platform checks have not been completed for every entry.

sdk/c/include/kui_c.h:354

Report an issue with this entry →
kui_element_class_list_remove
Declared3.61.7C / Go / Rust

Remove 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_c.h
KUI_C_API KuiStatus kui_element_class_list_remove(KuiElement* el, const char* token, size_t len);

Verification scope

Indexed from current sources. Runtime, combination and platform checks have not been completed for every entry.

sdk/c/include/kui_c.h:352

Report an issue with this entry →
kui_element_class_list_toggle
Declared3.61.7C / Go / Rust

Toggle 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_c.h
KUI_C_API KuiStatus kui_element_class_list_toggle(KuiElement* el, const char* token, size_t len);

Verification scope

Indexed from current sources. Runtime, combination and platform checks have not been completed for every entry.

sdk/c/include/kui_c.h:353

Report an issue with this entry →
kui_element_dispatch_event
Declared3.61.7C / Go / Rust

Dispatch 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_c.h
KUI_C_API KuiStatus kui_element_dispatch_event(KuiElement* el, const char* event_name, size_t len, int bubbles, int cancelable, int* out_not_canceled);

Verification scope

Indexed from current sources. Runtime, combination and platform checks have not been completed for every entry.

sdk/c/include/kui_c.h:429

Report an issue with this entry →
kui_element_first_child
Declared3.61.7C / Go / Rust

Get a counted reference to the first child element, skipping non-element nodes; release it when done.

kui_c.h
KUI_C_API KuiStatus kui_element_first_child (KuiElement* el, KuiElement** out);

Verification scope

Indexed from current sources. Runtime, combination and platform checks have not been completed for every entry.

sdk/c/include/kui_c.h:364

Report an issue with this entry →
kui_element_focus
Declared3.61.7C / Go / Rust

Focus the element; call on the main thread.

kui_c.h
KUI_C_API KuiStatus kui_element_focus(KuiElement* el);

Verification scope

Indexed from current sources. Runtime, combination and platform checks have not been completed for every entry.

sdk/c/include/kui_c.h:375

Report an issue with this entry →
kui_element_get_attribute
Declared3.61.7C / Go / Rust

Read 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_c.h
KUI_C_API KuiStatus kui_element_get_attribute(KuiElement* el, const char* name, size_t name_len, char* buf, size_t buf_capacity, size_t* out_len);

Verification scope

Indexed from current sources. Runtime, combination and platform checks have not been completed for every entry.

sdk/c/include/kui_c.h:338

Report an issue with this entry →
kui_element_get_bounding_rect
Declared3.61.7C / Go / Rust

Read 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_c.h
KUI_C_API KuiStatus kui_element_get_bounding_rect(KuiElement* el, KuiRect* out);

Verification scope

Indexed from current sources. Runtime, combination and platform checks have not been completed for every entry.

sdk/c/include/kui_c.h:513

Report an issue with this entry →
kui_element_get_class_name
Declared3.61.7C / Go / Rust

Read 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_c.h
KUI_C_API KuiStatus kui_element_get_class_name(KuiElement* el, char* buf, size_t buf_capacity, size_t* out_len);

Verification scope

Indexed from current sources. Runtime, combination and platform checks have not been completed for every entry.

sdk/c/include/kui_c.h:331

Report an issue with this entry →
kui_element_get_client_metrics
Declared3.61.7C / Go / Rust

Read 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_c.h
KUI_C_API KuiStatus kui_element_get_client_metrics(KuiElement* el, float* out_left, float* out_top, float* out_width, float* out_height);

Verification scope

Indexed from current sources. Runtime, combination and platform checks have not been completed for every entry.

sdk/c/include/kui_c.h:519

Report an issue with this entry →
kui_element_get_id
Declared3.61.7C / Go / Rust

Read 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_c.h
KUI_C_API KuiStatus kui_element_get_id (KuiElement* el, char* buf, size_t buf_capacity, size_t* out_len);

Verification scope

Indexed from current sources. Runtime, combination and platform checks have not been completed for every entry.

sdk/c/include/kui_c.h:330

Report an issue with this entry →
kui_element_get_inner_html
Declared3.61.7C / Go / Rust

Read 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_c.h
KUI_C_API KuiStatus kui_element_get_inner_html(KuiElement* el, char* buf, size_t buf_capacity, size_t* out_len);

Verification scope

Indexed from current sources. Runtime, combination and platform checks have not been completed for every entry.

sdk/c/include/kui_c.h:348

Report an issue with this entry →
kui_element_get_offset_metrics
Declared3.61.7C / Go / Rust

Read 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_c.h
KUI_C_API KuiStatus kui_element_get_offset_metrics(KuiElement* el, float* out_left, float* out_top, float* out_width, float* out_height);

Verification scope

Indexed from current sources. Runtime, combination and platform checks have not been completed for every entry.

sdk/c/include/kui_c.h:525

Report an issue with this entry →
kui_element_get_scroll_metrics
Declared3.61.7C / Go / Rust

Read 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_c.h
KUI_C_API KuiStatus kui_element_get_scroll_metrics(KuiElement* el, float* out_left, float* out_top, float* out_width, float* out_height);

Verification scope

Indexed from current sources. Runtime, combination and platform checks have not been completed for every entry.

sdk/c/include/kui_c.h:530

Report an issue with this entry →
kui_element_get_style_property
Declared3.61.7C / Go / Rust

Read 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_c.h
KUI_C_API KuiStatus kui_element_get_style_property(KuiElement* el, const char* prop, size_t prop_len, char* buf, size_t buf_capacity, size_t* out_len);

Verification scope

Indexed from current sources. Runtime, combination and platform checks have not been completed for every entry.

sdk/c/include/kui_c.h:481

Report an issue with this entry →
kui_element_get_style_property_count
Declared3.61.7C / Go / Rust

Count the properties actually set in the element inline declaration for inspection and enumeration.

kui_c.h
KUI_C_API KuiStatus kui_element_get_style_property_count(KuiElement* el, size_t* out_count);

Verification scope

Indexed from current sources. Runtime, combination and platform checks have not been completed for every entry.

sdk/c/include/kui_c.h:498

Report an issue with this entry →
kui_element_get_style_property_name
Declared3.61.7C / Go / Rust

Read 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_c.h
KUI_C_API KuiStatus kui_element_get_style_property_name(KuiElement* el, size_t index, char* buf, size_t buf_capacity, size_t* out_len);

Verification scope

Indexed from current sources. Runtime, combination and platform checks have not been completed for every entry.

sdk/c/include/kui_c.h:499

Report an issue with this entry →
kui_element_get_style_text
Declared3.61.7C / Go / Rust

Read 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_c.h
KUI_C_API KuiStatus kui_element_get_style_text(KuiElement* el, char* buf, size_t buf_capacity, size_t* out_len);

Verification scope

Indexed from current sources. Runtime, combination and platform checks have not been completed for every entry.

sdk/c/include/kui_c.h:489

Report an issue with this entry →
kui_element_get_tag_name
Declared3.61.7C / Go / Rust

Read 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_c.h
KUI_C_API KuiStatus kui_element_get_tag_name(KuiElement* el, char* buf, size_t buf_capacity, size_t* out_len);

Verification scope

Indexed from current sources. Runtime, combination and platform checks have not been completed for every entry.

sdk/c/include/kui_c.h:329

Report an issue with this entry →
kui_element_get_text_content
Declared3.61.7C / Go / Rust

Read 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_c.h
KUI_C_API KuiStatus kui_element_get_text_content(KuiElement* el, char* buf, size_t buf_capacity, size_t* out_len);

Verification scope

Indexed from current sources. Runtime, combination and platform checks have not been completed for every entry.

sdk/c/include/kui_c.h:345

Report an issue with this entry →
kui_element_has_attribute
Declared3.61.7C / Go / Rust

Check 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_c.h
KUI_C_API KuiStatus kui_element_has_attribute(KuiElement* el, const char* name, size_t name_len, int* out_has);

Verification scope

Indexed from current sources. Runtime, combination and platform checks have not been completed for every entry.

sdk/c/include/kui_c.h:340

Report an issue with this entry →
kui_element_last_child
Declared3.61.7C / Go / Rust

Get a counted reference to the last child element, skipping non-element nodes; release it when done.

kui_c.h
KUI_C_API KuiStatus kui_element_last_child (KuiElement* el, KuiElement** out);

Verification scope

Indexed from current sources. Runtime, combination and platform checks have not been completed for every entry.

sdk/c/include/kui_c.h:365

Report an issue with this entry →
kui_element_next_sibling
Declared3.61.7C / Go / Rust

Get a counted reference to the next sibling element, skipping non-element nodes; release it when done.

kui_c.h
KUI_C_API KuiStatus kui_element_next_sibling (KuiElement* el, KuiElement** out);

Verification scope

Indexed from current sources. Runtime, combination and platform checks have not been completed for every entry.

sdk/c/include/kui_c.h:366

Report an issue with this entry →
kui_element_parent
Declared3.61.7C / Go / Rust

Get a counted reference to the parent element and release it when done.

kui_c.h
KUI_C_API KuiStatus kui_element_parent (KuiElement* el, KuiElement** out);

Verification scope

Indexed from current sources. Runtime, combination and platform checks have not been completed for every entry.

sdk/c/include/kui_c.h:363

Report an issue with this entry →
kui_element_position_relative_to
Declared3.61.7C / Go / Rust

Position 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_c.h
KUI_C_API KuiStatus kui_element_position_relative_to(KuiElement* element, KuiElement* anchor, const char* placement, size_t placement_len, const KuiCPositioningOptions* options);

Verification scope

Indexed from current sources. Runtime, combination and platform checks have not been completed for every entry.

sdk/c/include/kui_c.h:771

Report an issue with this entry →
kui_element_previous_sibling
Declared3.61.7C / Go / Rust

Get a counted reference to the previous sibling element, skipping non-element nodes; release it when done.

kui_c.h
KUI_C_API KuiStatus kui_element_previous_sibling (KuiElement* el, KuiElement** out);

Verification scope

Indexed from current sources. Runtime, combination and platform checks have not been completed for every entry.

sdk/c/include/kui_c.h:367

Report an issue with this entry →
kui_element_query_selector
Declared3.61.7C / Go / Rust

Find 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_c.h
KUI_C_API KuiStatus kui_element_query_selector(KuiElement* el, const char* sel, size_t sel_len, KuiElement** out);

Verification scope

Indexed from current sources. Runtime, combination and platform checks have not been completed for every entry.

sdk/c/include/kui_c.h:357

Report an issue with this entry →
kui_element_query_selector_all
Declared3.61.7C / Go / Rust

Find 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_c.h
KUI_C_API KuiStatus kui_element_query_selector_all(KuiElement* el, const char* sel, size_t sel_len, KuiElement** out_buf, size_t buf_capacity, size_t* out_count);

Verification scope

Indexed from current sources. Runtime, combination and platform checks have not been completed for every entry.

sdk/c/include/kui_c.h:359

Report an issue with this entry →
kui_element_release
Declared3.61.7C / Go / Rust

Release 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_c.h
KUI_C_API KuiStatus kui_element_release(KuiElement* el);

Verification scope

Indexed from current sources. Runtime, combination and platform checks have not been completed for every entry.

sdk/c/include/kui_c.h:327

Report an issue with this entry →
kui_element_remove
Declared3.61.7C / Go / Rust

Remove the element from its DOM tree. Existing handles keep it alive through reference counting. Call on the main thread.

kui_c.h
KUI_C_API KuiStatus kui_element_remove (KuiElement* el);

Verification scope

Indexed from current sources. Runtime, combination and platform checks have not been completed for every entry.

sdk/c/include/kui_c.h:372

Report an issue with this entry →
kui_element_remove_attribute
Declared3.61.7C / Go / Rust

Remove 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_c.h
KUI_C_API KuiStatus kui_element_remove_attribute(KuiElement* el, const char* name, size_t name_len);

Verification scope

Indexed from current sources. Runtime, combination and platform checks have not been completed for every entry.

sdk/c/include/kui_c.h:342

Report an issue with this entry →
kui_element_remove_child
Declared3.61.7C / Go / Rust

Remove 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_c.h
KUI_C_API KuiStatus kui_element_remove_child(KuiElement* parent, KuiElement* child);

Verification scope

Indexed from current sources. Runtime, combination and platform checks have not been completed for every entry.

sdk/c/include/kui_c.h:371

Report an issue with this entry →
kui_element_remove_event_listener
Declared3.61.7C / Go / Rust

Remove 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_c.h
KUI_C_API KuiStatus kui_element_remove_event_listener(KuiElement* el, const char* event_name, size_t len, KuiListenerId id);

Verification scope

Indexed from current sources. Runtime, combination and platform checks have not been completed for every entry.

sdk/c/include/kui_c.h:412

Report an issue with this entry →
kui_element_remove_event_listeners
Declared3.61.7C / Go / Rust

Remove 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_c.h
KUI_C_API KuiStatus kui_element_remove_event_listeners(KuiElement* el, const char* event_name, size_t len);

Verification scope

Indexed from current sources. Runtime, combination and platform checks have not been completed for every entry.

sdk/c/include/kui_c.h:416

Report an issue with this entry →
kui_element_remove_style_property
Declared3.61.7C / Go / Rust

Remove one property from the element inline style declaration on the main thread.

kui_c.h
KUI_C_API KuiStatus kui_element_remove_style_property(KuiElement* el, const char* prop, size_t prop_len);

Verification scope

Indexed from current sources. Runtime, combination and platform checks have not been completed for every entry.

sdk/c/include/kui_c.h:483

Report an issue with this entry →
kui_element_retain
Declared3.61.7C / Go / Rust

Add 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_c.h
KUI_C_API KuiStatus kui_element_retain (KuiElement* el);

Verification scope

Indexed from current sources. Runtime, combination and platform checks have not been completed for every entry.

sdk/c/include/kui_c.h:326

Report an issue with this entry →
kui_element_scroll_by
Declared3.61.7C / Go / Rust

Scroll the element by dx/dy; call on the main thread.

kui_c.h
KUI_C_API KuiStatus kui_element_scroll_by(KuiElement* el, float dx, float dy);

Verification scope

Indexed from current sources. Runtime, combination and platform checks have not been completed for every entry.

sdk/c/include/kui_c.h:374

Report an issue with this entry →
kui_element_set_attribute
Declared3.61.7C / Go / Rust

Set 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_c.h
KUI_C_API KuiStatus kui_element_set_attribute(KuiElement* el, const char* name, size_t name_len, const char* value, size_t value_len);

Verification scope

Indexed from current sources. Runtime, combination and platform checks have not been completed for every entry.

sdk/c/include/kui_c.h:336

Report an issue with this entry →
kui_element_set_class_name
Declared3.61.7C / Go / Rust

Replace 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_c.h
KUI_C_API KuiStatus kui_element_set_class_name(KuiElement* el, const char* value, size_t value_len);

Verification scope

Indexed from current sources. Runtime, combination and platform checks have not been completed for every entry.

sdk/c/include/kui_c.h:333

Report an issue with this entry →
kui_element_set_inner_html
Declared3.61.7C / Go / Rust

Replace 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_c.h
KUI_C_API KuiStatus kui_element_set_inner_html(KuiElement* el, const char* html, size_t html_len);

Verification scope

Indexed from current sources. Runtime, combination and platform checks have not been completed for every entry.

sdk/c/include/kui_c.h:347

Report an issue with this entry →
kui_element_set_scroll_position
Declared3.61.7C / Go / Rust

Set the element absolute left/top scroll position; call on the main thread.

kui_c.h
KUI_C_API KuiStatus kui_element_set_scroll_position(KuiElement* el, float left, float top);

Verification scope

Indexed from current sources. Runtime, combination and platform checks have not been completed for every entry.

sdk/c/include/kui_c.h:373

Report an issue with this entry →
kui_element_set_style_property
Declared3.61.7C / Go / Rust

Set one inline style declaration on the main thread. A nonzero important flag marks it !important. This changes the element own declaration.

kui_c.h
KUI_C_API KuiStatus kui_element_set_style_property(KuiElement* el, const char* prop, size_t prop_len, const char* value, size_t value_len, int important);

Verification scope

Indexed from current sources. Runtime, combination and platform checks have not been completed for every entry.

sdk/c/include/kui_c.h:477

Report an issue with this entry →
kui_element_set_style_text
Declared3.61.7C / Go / Rust

Set the complete element inline style declaration from CSS text on the main thread.

kui_c.h
KUI_C_API KuiStatus kui_element_set_style_text(KuiElement* el, const char* css, size_t css_len);

Verification scope

Indexed from current sources. Runtime, combination and platform checks have not been completed for every entry.

sdk/c/include/kui_c.h:491

Report an issue with this entry →
kui_element_set_text_content
Declared3.61.7C / Go / Rust

Set 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_c.h
KUI_C_API KuiStatus kui_element_set_text_content(KuiElement* el, const char* text, size_t text_len);

Verification scope

Indexed from current sources. Runtime, combination and platform checks have not been completed for every entry.

sdk/c/include/kui_c.h:344

Report an issue with this entry →
kui_element_style_property_is_important
Declared3.61.7C / Go / Rust

Check whether the specified inline declaration is marked !important and return the result as an integer.

kui_c.h
KUI_C_API KuiStatus kui_element_style_property_is_important(KuiElement* el, const char* prop, size_t prop_len, int* out_important);

Verification scope

Indexed from current sources. Runtime, combination and platform checks have not been completed for every entry.

sdk/c/include/kui_c.h:484

Report an issue with this entry →
kui_event_drag_get_file
Declared3.61.7C / Go / Rust

Read 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_c.h
KUI_C_API KuiStatus kui_event_drag_get_file(KuiEvent* event, size_t index, char* buf, size_t capacity, size_t* out_len);

Verification scope

Indexed from current sources. Runtime, combination and platform checks have not been completed for every entry.

sdk/c/include/kui_c.h:761

Report an issue with this entry →
kui_event_drag_get_file_count
Declared3.61.7C / Go / Rust

Read 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_c.h
KUI_C_API KuiStatus kui_event_drag_get_file_count(KuiEvent* event, size_t* out_count);

Verification scope

Indexed from current sources. Runtime, combination and platform checks have not been completed for every entry.

sdk/c/include/kui_c.h:760

Report an issue with this entry →
kui_event_get_current_target
Declared3.61.7C / Go / Rust

Get 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_c.h
KUI_C_API KuiStatus kui_event_get_current_target(KuiEvent* evt, KuiElement** out);

Verification scope

Indexed from current sources. Runtime, combination and platform checks have not been completed for every entry.

sdk/c/include/kui_c.h:438

Report an issue with this entry →
kui_event_get_flags
Declared3.61.7C / Go / Rust

Read the event bubbles, cancelable and defaultPrevented flags. evt is valid only during the current callback and must not be stored or released.

kui_c.h
KUI_C_API KuiStatus kui_event_get_flags (KuiEvent* evt, int* out_bubbles, int* out_cancelable, int* out_default_prevented);

Verification scope

Indexed from current sources. Runtime, combination and platform checks have not been completed for every entry.

sdk/c/include/kui_c.h:441

Report an issue with this entry →
Browse this reference type →