RMGui 0.15.0
C11 retained-mode UI library: layout kernel, style schema, widget painters, fonts, software framebuffer
Loading...
Searching...
No Matches
rmgui_host_t Struct Reference

All callbacks are optional and synchronous; context and the record are borrowed while used. More...

#include <host.h>

Data Fields

void * context
int(*) clipboard_get (void *context, char *bytes, size_t capacity, size_t *length)
int(*) clipboard_set (void *context, const char *bytes, size_t length)
void(*) text_input_rect (void *context, rmgui_rect_t rect)
void(*) request_cursor (void *context, rmgui_cursor_t cursor)

Detailed Description

All callbacks are optional and synchronous; context and the record are borrowed while used.

Clipboard get writes at most capacity UTF-8 bytes (no terminator required) and their count to length; returns 0 on success, -1 without changing outputs on refusal, including insufficient capacity. Clipboard set copies bytes before returning 0, or returns -1 on refusal. The host must not reenter the field from a callback. Rectangle coordinates are logical framebuffer pixels. Cursor requests follow input.h arbitration.

Field Documentation

◆ context

void* rmgui_host_t::context

◆ clipboard_get

int(*) rmgui_host_t::clipboard_get(void *context, char *bytes, size_t capacity, size_t *length)

◆ clipboard_set

int(*) rmgui_host_t::clipboard_set(void *context, const char *bytes, size_t length)

◆ text_input_rect

void(*) rmgui_host_t::text_input_rect(void *context, rmgui_rect_t rect)

◆ request_cursor

void(*) rmgui_host_t::request_cursor(void *context, rmgui_cursor_t cursor)

The documentation for this struct was generated from the following file: