PlexyDesk : GPU accelerated Display Server for GNU/Linux and BSD
Search
PlexyDesk
Not logged in
Talk
Contributions
Create account
Log in
Open Desktop Systems Journal
Main page
Documentation
Architecture
Development
Components
News
Gallery
Community
Page
Discussion
Read
Edit
Edit source
View history
Editing
PlexyUI API
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
= PlexyUI API Reference = ''Generated from <code>include/plexy/plexy_ui.h</code> by <code>scripts/generate_plexy_uikit_docs.py</code>. Do not edit this page by hand; regenerate it from the header instead.'' PlexyUI β Client Library for PlexyDesk GPU-Accelerated Widgets Renders widgets locally using libplexycanvas (SDF shaders, FreeType text, flexbox layout) and submits DMA-BUF frames via the standard plexy protocol. Client crash does not affect the compositor (plexyshell). == Opaque types == === PlexyApp === <pre>typedef struct PlexyApp PlexyApp;</pre> Opaque handle for the lifetime of a PlexyDesk application. === PlexyWindow === <pre>typedef struct PlexyWindow PlexyWindow;</pre> Opaque handle for a PlexyDesk window and its widget tree. == Callback types == === PlexyClickCallback === <pre>typedef void (*PlexyClickCallback)(uint32_t widget_id, void* userdata);</pre> Called when a widget reports a click-style activation. ==== Parameters ==== {| class="wikitable" |- ! Parameter !! Type !! Description |- | <code>widget_id</code> || <code>uint32_t</code> || Widget ID of the target control or container. |- | <code>userdata</code> || <code>void*</code> || Caller-provided context passed back into the callback. |} === PlexyValueCallback === <pre>typedef void (*PlexyValueCallback)(uint32_t widget_id, float value, void* userdata);</pre> Called when a widget emits a numeric value change. ==== Parameters ==== {| class="wikitable" |- ! Parameter !! Type !! Description |- | <code>widget_id</code> || <code>uint32_t</code> || Widget ID of the target control or container. |- | <code>value</code> || <code>float</code> || Numeric value to apply or report. |- | <code>userdata</code> || <code>void*</code> || Caller-provided context passed back into the callback. |} === PlexyTextCallback === <pre>typedef void (*PlexyTextCallback)(uint32_t widget_id, const char* text, void* userdata);</pre> Called when widget text content changes. ==== Parameters ==== {| class="wikitable" |- ! Parameter !! Type !! Description |- | <code>widget_id</code> || <code>uint32_t</code> || Widget ID of the target control or container. |- | <code>text</code> || <code>const char*</code> || Text content to display or apply. |- | <code>userdata</code> || <code>void*</code> || Caller-provided context passed back into the callback. |} === PlexyKeyCallback === <pre>typedef void (*PlexyKeyCallback)(uint32_t widget_id, uint32_t keycode, uint32_t mods, void* userdata);</pre> Called when a widget receives keyboard input. ==== Parameters ==== {| class="wikitable" |- ! Parameter !! Type !! Description |- | <code>widget_id</code> || <code>uint32_t</code> || Widget ID of the target control or container. |- | <code>keycode</code> || <code>uint32_t</code> || Key code supplied with a key event. |- | <code>mods</code> || <code>uint32_t</code> || Modifier state supplied with a key event. |- | <code>userdata</code> || <code>void*</code> || Caller-provided context passed back into the callback. |} === PlexyMenuCallback === <pre>typedef void (*PlexyMenuCallback)(uint32_t item_id, void* userdata);</pre> Called when an application menubar item is chosen. ==== Parameters ==== {| class="wikitable" |- ! Parameter !! Type !! Description |- | <code>item_id</code> || <code>uint32_t</code> || Identifier of a menu item. |- | <code>userdata</code> || <code>void*</code> || Caller-provided context passed back into the callback. |} == App lifecycle == These functions manage the lifetime of a PlexyDesk application object and its main loop. === <code>plexy_app_create</code> === <pre>PlexyApp* plexy_app_create(const char* name);</pre> Create a top-level PlexyDesk application object. ==== Parameters ==== {| class="wikitable" |- ! Parameter !! Type !! Description |- | <code>name</code> || <code>const char*</code> || Human-readable name used to identify the application. |} * '''Returns:''' A new <code>PlexyApp</code> handle. === <code>plexy_app_run</code> === <pre>void plexy_app_run(PlexyApp* app);</pre> Enter the application event loop and keep the UI running until it exits. ==== Parameters ==== {| class="wikitable" |- ! Parameter !! Type !! Description |- | <code>app</code> || <code>PlexyApp*</code> || Application handle that owns the operation. |} === <code>plexy_app_quit</code> === <pre>void plexy_app_quit(PlexyApp* app);</pre> Request that the application event loop stops. ==== Parameters ==== {| class="wikitable" |- ! Parameter !! Type !! Description |- | <code>app</code> || <code>PlexyApp*</code> || Application handle that owns the operation. |} === <code>plexy_app_destroy</code> === <pre>void plexy_app_destroy(PlexyApp* app);</pre> Release the application object and its remaining resources. ==== Parameters ==== {| class="wikitable" |- ! Parameter !! Type !! Description |- | <code>app</code> || <code>PlexyApp*</code> || Application handle that owns the operation. |} == Window == These functions create, inspect, and destroy PlexyDesk windows. === <code>plexy_window_create</code> === <pre>PlexyWindow* plexy_window_create(PlexyApp* app, uint32_t width, uint32_t height, const char* title);</pre> Create a new window for an application. ==== Parameters ==== {| class="wikitable" |- ! Parameter !! Type !! Description |- | <code>app</code> || <code>PlexyApp*</code> || Application handle that owns the operation. |- | <code>width</code> || <code>uint32_t</code> || Requested width in pixels. |- | <code>height</code> || <code>uint32_t</code> || Requested height in pixels. |- | <code>title</code> || <code>const char*</code> || Human-readable label, title, or heading text. |} * '''Returns:''' A new <code>PlexyWindow</code> handle. === <code>plexy_window_root</code> === <pre>uint32_t plexy_window_root(PlexyWindow* win);</pre> Return the root widget ID for the window's layout tree. ==== Parameters ==== {| class="wikitable" |- ! Parameter !! Type !! Description |- | <code>win</code> || <code>PlexyWindow*</code> || Window handle that owns or contains the widget tree. |} * '''Returns:''' The root widget ID for the window. === <code>plexy_window_destroy</code> === <pre>void plexy_window_destroy(PlexyWindow* win);</pre> Destroy a window and release its widget tree. ==== Parameters ==== {| class="wikitable" |- ! Parameter !! Type !! Description |- | <code>win</code> || <code>PlexyWindow*</code> || Window handle that owns or contains the widget tree. |} == Widget creation == These functions create widgets and containers inside an existing window. === <code>plexy_label</code> === <pre>uint32_t plexy_label(PlexyWindow* win, uint32_t parent, const char* text);</pre> Create a label and return its widget ID. ==== Parameters ==== {| class="wikitable" |- ! Parameter !! Type !! Description |- | <code>win</code> || <code>PlexyWindow*</code> || Window handle that owns or contains the widget tree. |- | <code>parent</code> || <code>uint32_t</code> || Parent widget ID that will contain the new child widget. |- | <code>text</code> || <code>const char*</code> || Text content to display or apply. |} * '''Returns:''' A widget ID for the created or referenced widget. === <code>plexy_button</code> === <pre>uint32_t plexy_button(PlexyWindow* win, uint32_t parent, const char* text);</pre> Create a button and return its widget ID. ==== Parameters ==== {| class="wikitable" |- ! Parameter !! Type !! Description |- | <code>win</code> || <code>PlexyWindow*</code> || Window handle that owns or contains the widget tree. |- | <code>parent</code> || <code>uint32_t</code> || Parent widget ID that will contain the new child widget. |- | <code>text</code> || <code>const char*</code> || Text content to display or apply. |} * '''Returns:''' A widget ID for the created or referenced widget. === <code>plexy_text_input</code> === <pre>uint32_t plexy_text_input(PlexyWindow* win, uint32_t parent, const char* placeholder);</pre> Create a text input and return its widget ID. ==== Parameters ==== {| class="wikitable" |- ! Parameter !! Type !! Description |- | <code>win</code> || <code>PlexyWindow*</code> || Window handle that owns or contains the widget tree. |- | <code>parent</code> || <code>uint32_t</code> || Parent widget ID that will contain the new child widget. |- | <code>placeholder</code> || <code>const char*</code> || Placeholder text shown before the user enters content. |} * '''Returns:''' A widget ID for the created or referenced widget. === <code>plexy_text_area</code> === <pre>uint32_t plexy_text_area(PlexyWindow* win, uint32_t parent, const char* initial_text);</pre> Create a text area and return its widget ID. ==== Parameters ==== {| class="wikitable" |- ! Parameter !! Type !! Description |- | <code>win</code> || <code>PlexyWindow*</code> || Window handle that owns or contains the widget tree. |- | <code>parent</code> || <code>uint32_t</code> || Parent widget ID that will contain the new child widget. |- | <code>initial_text</code> || <code>const char*</code> || Initial text content for the widget. |} * '''Returns:''' A widget ID for the created or referenced widget. === <code>plexy_checkbox</code> === <pre>uint32_t plexy_checkbox(PlexyWindow* win, uint32_t parent, const char* label);</pre> Create a checkbox and return its widget ID. ==== Parameters ==== {| class="wikitable" |- ! Parameter !! Type !! Description |- | <code>win</code> || <code>PlexyWindow*</code> || Window handle that owns or contains the widget tree. |- | <code>parent</code> || <code>uint32_t</code> || Parent widget ID that will contain the new child widget. |- | <code>label</code> || <code>const char*</code> || Display label shown with the widget. |} * '''Returns:''' A widget ID for the created or referenced widget. === <code>plexy_switch_widget</code> === <pre>uint32_t plexy_switch_widget(PlexyWindow* win, uint32_t parent, const char* label);</pre> Create a switch widget and return its widget ID. ==== Parameters ==== {| class="wikitable" |- ! Parameter !! Type !! Description |- | <code>win</code> || <code>PlexyWindow*</code> || Window handle that owns or contains the widget tree. |- | <code>parent</code> || <code>uint32_t</code> || Parent widget ID that will contain the new child widget. |- | <code>label</code> || <code>const char*</code> || Display label shown with the widget. |} * '''Returns:''' A widget ID for the created or referenced widget. === <code>plexy_slider</code> === <pre>uint32_t plexy_slider(PlexyWindow* win, uint32_t parent, float min, float max, float initial);</pre> Create a slider and return its widget ID. ==== Parameters ==== {| class="wikitable" |- ! Parameter !! Type !! Description |- | <code>win</code> || <code>PlexyWindow*</code> || Window handle that owns or contains the widget tree. |- | <code>parent</code> || <code>uint32_t</code> || Parent widget ID that will contain the new child widget. |- | <code>min</code> || <code>float</code> || Minimum allowed value for the control. |- | <code>max</code> || <code>float</code> || Maximum allowed value for the control. |- | <code>initial</code> || <code>float</code> || Initial numeric value for the control. |} * '''Returns:''' A widget ID for the created or referenced widget. === <code>plexy_progress</code> === <pre>uint32_t plexy_progress(PlexyWindow* win, uint32_t parent, float value);</pre> Create a progress and return its widget ID. ==== Parameters ==== {| class="wikitable" |- ! Parameter !! Type !! Description |- | <code>win</code> || <code>PlexyWindow*</code> || Window handle that owns or contains the widget tree. |- | <code>parent</code> || <code>uint32_t</code> || Parent widget ID that will contain the new child widget. |- | <code>value</code> || <code>float</code> || Numeric value to apply or report. |} * '''Returns:''' A widget ID for the created or referenced widget. === <code>plexy_separator</code> === <pre>uint32_t plexy_separator(PlexyWindow* win, uint32_t parent);</pre> Create a separator and return its widget ID. ==== Parameters ==== {| class="wikitable" |- ! Parameter !! Type !! Description |- | <code>win</code> || <code>PlexyWindow*</code> || Window handle that owns or contains the widget tree. |- | <code>parent</code> || <code>uint32_t</code> || Parent widget ID that will contain the new child widget. |} * '''Returns:''' A widget ID for the created or referenced widget. === <code>plexy_spacer</code> === <pre>uint32_t plexy_spacer(PlexyWindow* win, uint32_t parent);</pre> Create a spacer and return its widget ID. ==== Parameters ==== {| class="wikitable" |- ! Parameter !! Type !! Description |- | <code>win</code> || <code>PlexyWindow*</code> || Window handle that owns or contains the widget tree. |- | <code>parent</code> || <code>uint32_t</code> || Parent widget ID that will contain the new child widget. |} * '''Returns:''' A widget ID for the created or referenced widget. === <code>plexy_panel</code> === <pre>uint32_t plexy_panel(PlexyWindow* win, uint32_t parent);</pre> Create a panel and return its widget ID. ==== Parameters ==== {| class="wikitable" |- ! Parameter !! Type !! Description |- | <code>win</code> || <code>PlexyWindow*</code> || Window handle that owns or contains the widget tree. |- | <code>parent</code> || <code>uint32_t</code> || Parent widget ID that will contain the new child widget. |} * '''Returns:''' A widget ID for the created or referenced widget. === <code>plexy_scroll_view</code> === <pre>uint32_t plexy_scroll_view(PlexyWindow* win, uint32_t parent);</pre> Create a scroll view and return its widget ID. ==== Parameters ==== {| class="wikitable" |- ! Parameter !! Type !! Description |- | <code>win</code> || <code>PlexyWindow*</code> || Window handle that owns or contains the widget tree. |- | <code>parent</code> || <code>uint32_t</code> || Parent widget ID that will contain the new child widget. |} * '''Returns:''' A widget ID for the created or referenced widget. === <code>plexy_list_view</code> === <pre>uint32_t plexy_list_view(PlexyWindow* win, uint32_t parent, const char* items_text);</pre> Create a list view and return its widget ID. ==== Parameters ==== {| class="wikitable" |- ! Parameter !! Type !! Description |- | <code>win</code> || <code>PlexyWindow*</code> || Window handle that owns or contains the widget tree. |- | <code>parent</code> || <code>uint32_t</code> || Parent widget ID that will contain the new child widget. |- | <code>items_text</code> || <code>const char*</code> || Text payload describing the initial items for the view. |} * '''Returns:''' A widget ID for the created or referenced widget. === <code>plexy_icon_view</code> === <pre>uint32_t plexy_icon_view(PlexyWindow* win, uint32_t parent, const char* items_text);</pre> Create a icon view and return its widget ID. ==== Parameters ==== {| class="wikitable" |- ! Parameter !! Type !! Description |- | <code>win</code> || <code>PlexyWindow*</code> || Window handle that owns or contains the widget tree. |- | <code>parent</code> || <code>uint32_t</code> || Parent widget ID that will contain the new child widget. |- | <code>items_text</code> || <code>const char*</code> || Text payload describing the initial items for the view. |} * '''Returns:''' A widget ID for the created or referenced widget. === <code>plexy_list_clear</code> === <pre>void plexy_list_clear(PlexyWindow* win, uint32_t list_view_id);</pre> Remove all items from a list view. ==== Parameters ==== {| class="wikitable" |- ! Parameter !! Type !! Description |- | <code>win</code> || <code>PlexyWindow*</code> || Window handle that owns or contains the widget tree. |- | <code>list_view_id</code> || <code>uint32_t</code> || Widget ID of the target list view. |} === <code>plexy_list_append</code> === <pre>uint32_t plexy_list_append(PlexyWindow* win, uint32_t list_view_id, const char* item_text);</pre> Append a new item to a list view and return the new child widget ID. ==== Parameters ==== {| class="wikitable" |- ! Parameter !! Type !! Description |- | <code>win</code> || <code>PlexyWindow*</code> || Window handle that owns or contains the widget tree. |- | <code>list_view_id</code> || <code>uint32_t</code> || Widget ID of the target list view. |- | <code>item_text</code> || <code>const char*</code> || Text content for an inserted list or icon item. |} * '''Returns:''' A widget ID for the created or referenced widget. === <code>plexy_list_select</code> === <pre>void plexy_list_select(PlexyWindow* win, uint32_t list_view_id, int index);</pre> Select an item in a list view by index. ==== Parameters ==== {| class="wikitable" |- ! Parameter !! Type !! Description |- | <code>win</code> || <code>PlexyWindow*</code> || Window handle that owns or contains the widget tree. |- | <code>list_view_id</code> || <code>uint32_t</code> || Widget ID of the target list view. |- | <code>index</code> || <code>int</code> || Zero-based item index. |} === <code>plexy_icon_clear</code> === <pre>void plexy_icon_clear(PlexyWindow* win, uint32_t icon_view_id);</pre> Remove all items from an icon view. ==== Parameters ==== {| class="wikitable" |- ! Parameter !! Type !! Description |- | <code>win</code> || <code>PlexyWindow*</code> || Window handle that owns or contains the widget tree. |- | <code>icon_view_id</code> || <code>uint32_t</code> || Widget ID of the target icon view. |} === <code>plexy_icon_append</code> === <pre>uint32_t plexy_icon_append(PlexyWindow* win, uint32_t icon_view_id, const char* item_text);</pre> Append a new item to an icon view and return the new child widget ID. ==== Parameters ==== {| class="wikitable" |- ! Parameter !! Type !! Description |- | <code>win</code> || <code>PlexyWindow*</code> || Window handle that owns or contains the widget tree. |- | <code>icon_view_id</code> || <code>uint32_t</code> || Widget ID of the target icon view. |- | <code>item_text</code> || <code>const char*</code> || Text content for an inserted list or icon item. |} * '''Returns:''' A widget ID for the created or referenced widget. === <code>plexy_icon_select</code> === <pre>void plexy_icon_select(PlexyWindow* win, uint32_t icon_view_id, int index);</pre> Select an item in an icon view by index. ==== Parameters ==== {| class="wikitable" |- ! Parameter !! Type !! Description |- | <code>win</code> || <code>PlexyWindow*</code> || Window handle that owns or contains the widget tree. |- | <code>icon_view_id</code> || <code>uint32_t</code> || Widget ID of the target icon view. |- | <code>index</code> || <code>int</code> || Zero-based item index. |} === <code>plexy_destroy_widget</code> === <pre>void plexy_destroy_widget(PlexyWindow* win, uint32_t widget_id);</pre> Remove a widget from the window and destroy it. ==== Parameters ==== {| class="wikitable" |- ! Parameter !! Type !! Description |- | <code>win</code> || <code>PlexyWindow*</code> || Window handle that owns or contains the widget tree. |- | <code>widget_id</code> || <code>uint32_t</code> || Widget ID of the target control or container. |} == Layout containers (convenience) == These helpers create common container shapes for arranging child widgets. === <code>plexy_row</code> === <pre>uint32_t plexy_row(PlexyWindow* win, uint32_t parent);</pre> Create a row and return its widget ID. ==== Parameters ==== {| class="wikitable" |- ! Parameter !! Type !! Description |- | <code>win</code> || <code>PlexyWindow*</code> || Window handle that owns or contains the widget tree. |- | <code>parent</code> || <code>uint32_t</code> || Parent widget ID that will contain the new child widget. |} * '''Returns:''' A widget ID for the created or referenced widget. === <code>plexy_column</code> === <pre>uint32_t plexy_column(PlexyWindow* win, uint32_t parent);</pre> Create a column and return its widget ID. ==== Parameters ==== {| class="wikitable" |- ! Parameter !! Type !! Description |- | <code>win</code> || <code>PlexyWindow*</code> || Window handle that owns or contains the widget tree. |- | <code>parent</code> || <code>uint32_t</code> || Parent widget ID that will contain the new child widget. |} * '''Returns:''' A widget ID for the created or referenced widget. == macOS-style widgets == These widgets model shell-like controls, navigation elements, and drawers. === <code>plexy_toolbar</code> === <pre>uint32_t plexy_toolbar(PlexyWindow* win, uint32_t parent);</pre> Create a toolbar and return its widget ID. ==== Parameters ==== {| class="wikitable" |- ! Parameter !! Type !! Description |- | <code>win</code> || <code>PlexyWindow*</code> || Window handle that owns or contains the widget tree. |- | <code>parent</code> || <code>uint32_t</code> || Parent widget ID that will contain the new child widget. |} * '''Returns:''' A widget ID for the created or referenced widget. === <code>plexy_toolbar_item</code> === <pre>uint32_t plexy_toolbar_item(PlexyWindow* win, uint32_t parent, const char* label);</pre> Create a toolbar item and return its widget ID. ==== Parameters ==== {| class="wikitable" |- ! Parameter !! Type !! Description |- | <code>win</code> || <code>PlexyWindow*</code> || Window handle that owns or contains the widget tree. |- | <code>parent</code> || <code>uint32_t</code> || Parent widget ID that will contain the new child widget. |- | <code>label</code> || <code>const char*</code> || Display label shown with the widget. |} * '''Returns:''' A widget ID for the created or referenced widget. === <code>plexy_sidebar</code> === <pre>uint32_t plexy_sidebar(PlexyWindow* win, uint32_t parent);</pre> Create a sidebar and return its widget ID. ==== Parameters ==== {| class="wikitable" |- ! Parameter !! Type !! Description |- | <code>win</code> || <code>PlexyWindow*</code> || Window handle that owns or contains the widget tree. |- | <code>parent</code> || <code>uint32_t</code> || Parent widget ID that will contain the new child widget. |} * '''Returns:''' A widget ID for the created or referenced widget. === <code>plexy_sidebar_item</code> === <pre>uint32_t plexy_sidebar_item(PlexyWindow* win, uint32_t parent, const char* label);</pre> Create a sidebar item and return its widget ID. ==== Parameters ==== {| class="wikitable" |- ! Parameter !! Type !! Description |- | <code>win</code> || <code>PlexyWindow*</code> || Window handle that owns or contains the widget tree. |- | <code>parent</code> || <code>uint32_t</code> || Parent widget ID that will contain the new child widget. |- | <code>label</code> || <code>const char*</code> || Display label shown with the widget. |} * '''Returns:''' A widget ID for the created or referenced widget. === <code>plexy_sidebar_item_with_icon</code> === <pre>uint32_t plexy_sidebar_item_with_icon(PlexyWindow* win, uint32_t parent, const char* label, const char* icon_name);</pre> Create a sidebar item with icon and return its widget ID. ==== Parameters ==== {| class="wikitable" |- ! Parameter !! Type !! Description |- | <code>win</code> || <code>PlexyWindow*</code> || Window handle that owns or contains the widget tree. |- | <code>parent</code> || <code>uint32_t</code> || Parent widget ID that will contain the new child widget. |- | <code>label</code> || <code>const char*</code> || Display label shown with the widget. |- | <code>icon_name</code> || <code>const char*</code> || Icon name value. |} * '''Returns:''' A widget ID for the created or referenced widget. === <code>plexy_sidebar_section</code> === <pre>uint32_t plexy_sidebar_section(PlexyWindow* win, uint32_t parent, const char* title);</pre> Create a sidebar section and return its widget ID. ==== Parameters ==== {| class="wikitable" |- ! Parameter !! Type !! Description |- | <code>win</code> || <code>PlexyWindow*</code> || Window handle that owns or contains the widget tree. |- | <code>parent</code> || <code>uint32_t</code> || Parent widget ID that will contain the new child widget. |- | <code>title</code> || <code>const char*</code> || Human-readable label, title, or heading text. |} * '''Returns:''' A widget ID for the created or referenced widget. === <code>plexy_search_field</code> === <pre>uint32_t plexy_search_field(PlexyWindow* win, uint32_t parent, const char* placeholder);</pre> Create a search field and return its widget ID. ==== Parameters ==== {| class="wikitable" |- ! Parameter !! Type !! Description |- | <code>win</code> || <code>PlexyWindow*</code> || Window handle that owns or contains the widget tree. |- | <code>parent</code> || <code>uint32_t</code> || Parent widget ID that will contain the new child widget. |- | <code>placeholder</code> || <code>const char*</code> || Placeholder text shown before the user enters content. |} * '''Returns:''' A widget ID for the created or referenced widget. === <code>plexy_breadcrumb</code> === <pre>uint32_t plexy_breadcrumb(PlexyWindow* win, uint32_t parent, const char* path);</pre> Create a breadcrumb and return its widget ID. ==== Parameters ==== {| class="wikitable" |- ! Parameter !! Type !! Description |- | <code>win</code> || <code>PlexyWindow*</code> || Window handle that owns or contains the widget tree. |- | <code>parent</code> || <code>uint32_t</code> || Parent widget ID that will contain the new child widget. |- | <code>path</code> || <code>const char*</code> || Path text or breadcrumb string. |} * '''Returns:''' A widget ID for the created or referenced widget. === <code>plexy_split_view</code> === <pre>uint32_t plexy_split_view(PlexyWindow* win, uint32_t parent);</pre> Create a split view and return its widget ID. ==== Parameters ==== {| class="wikitable" |- ! Parameter !! Type !! Description |- | <code>win</code> || <code>PlexyWindow*</code> || Window handle that owns or contains the widget tree. |- | <code>parent</code> || <code>uint32_t</code> || Parent widget ID that will contain the new child widget. |} * '''Returns:''' A widget ID for the created or referenced widget. === <code>plexy_status_bar</code> === <pre>uint32_t plexy_status_bar(PlexyWindow* win, uint32_t parent, const char* text);</pre> Create a status bar and return its widget ID. ==== Parameters ==== {| class="wikitable" |- ! Parameter !! Type !! Description |- | <code>win</code> || <code>PlexyWindow*</code> || Window handle that owns or contains the widget tree. |- | <code>parent</code> || <code>uint32_t</code> || Parent widget ID that will contain the new child widget. |- | <code>text</code> || <code>const char*</code> || Text content to display or apply. |} * '''Returns:''' A widget ID for the created or referenced widget. === <code>plexy_drawer</code> === <pre>uint32_t plexy_drawer(PlexyWindow* win, uint32_t parent, int edge, float size);</pre> Create a drawer and return its widget ID. ==== Parameters ==== {| class="wikitable" |- ! Parameter !! Type !! Description |- | <code>win</code> || <code>PlexyWindow*</code> || Window handle that owns or contains the widget tree. |- | <code>parent</code> || <code>uint32_t</code> || Parent widget ID that will contain the new child widget. |- | <code>edge</code> || <code>int</code> || Drawer edge constant indicating which side the drawer attaches to. |- | <code>size</code> || <code>float</code> || Generic size value or drawer size. |} * '''Returns:''' A widget ID for the created or referenced widget. === <code>plexy_drawer_set_open</code> === <pre>void plexy_drawer_set_open(PlexyWindow* win, uint32_t drawer_id, int open, int animated);</pre> Open or close a drawer and optionally animate the change. ==== Parameters ==== {| class="wikitable" |- ! Parameter !! Type !! Description |- | <code>win</code> || <code>PlexyWindow*</code> || Window handle that owns or contains the widget tree. |- | <code>drawer_id</code> || <code>uint32_t</code> || Drawer id value. |- | <code>open</code> || <code>int</code> || Whether the drawer should be open. |- | <code>animated</code> || <code>int</code> || Whether the state change should be animated. |} === <code>plexy_drawer_toggle</code> === <pre>void plexy_drawer_toggle(PlexyWindow* win, uint32_t drawer_id, int animated);</pre> Toggle a drawer between open and closed states. ==== Parameters ==== {| class="wikitable" |- ! Parameter !! Type !! Description |- | <code>win</code> || <code>PlexyWindow*</code> || Window handle that owns or contains the widget tree. |- | <code>drawer_id</code> || <code>uint32_t</code> || Drawer id value. |- | <code>animated</code> || <code>int</code> || Whether the state change should be animated. |} === <code>plexy_drawer_is_open</code> === <pre>int plexy_drawer_is_open(PlexyWindow* win, uint32_t drawer_id);</pre> Report whether a drawer is currently open. ==== Parameters ==== {| class="wikitable" |- ! Parameter !! Type !! Description |- | <code>win</code> || <code>PlexyWindow*</code> || Window handle that owns or contains the widget tree. |- | <code>drawer_id</code> || <code>uint32_t</code> || Drawer id value. |} * '''Returns:''' A non-zero value when the drawer is open, otherwise zero. == Layout properties == These functions change how a widget is positioned, aligned, or sized inside its parent layout. === <code>plexy_flex_direction</code> === <pre>void plexy_flex_direction(PlexyWindow* win, uint32_t widget_id, int direction);</pre> Set the flex direction property on an existing widget. '''Note:''' 0=row, 1=column ==== Parameters ==== {| class="wikitable" |- ! Parameter !! Type !! Description |- | <code>win</code> || <code>PlexyWindow*</code> || Window handle that owns or contains the widget tree. |- | <code>widget_id</code> || <code>uint32_t</code> || Widget ID of the target control or container. |- | <code>direction</code> || <code>int</code> || Layout direction constant, such as row or column. |} === <code>plexy_justify</code> === <pre>void plexy_justify(PlexyWindow* win, uint32_t widget_id, int justify);</pre> Set the justify property on an existing widget. ==== Parameters ==== {| class="wikitable" |- ! Parameter !! Type !! Description |- | <code>win</code> || <code>PlexyWindow*</code> || Window handle that owns or contains the widget tree. |- | <code>widget_id</code> || <code>uint32_t</code> || Widget ID of the target control or container. |- | <code>justify</code> || <code>int</code> || Main-axis justification constant. |} === <code>plexy_align</code> === <pre>void plexy_align(PlexyWindow* win, uint32_t widget_id, int align);</pre> Set the align property on an existing widget. ==== Parameters ==== {| class="wikitable" |- ! Parameter !! Type !! Description |- | <code>win</code> || <code>PlexyWindow*</code> || Window handle that owns or contains the widget tree. |- | <code>widget_id</code> || <code>uint32_t</code> || Widget ID of the target control or container. |- | <code>align</code> || <code>int</code> || Cross-axis alignment constant. |} === <code>plexy_flex_grow</code> === <pre>void plexy_flex_grow(PlexyWindow* win, uint32_t widget_id, float grow);</pre> Set the flex grow property on an existing widget. ==== Parameters ==== {| class="wikitable" |- ! Parameter !! Type !! Description |- | <code>win</code> || <code>PlexyWindow*</code> || Window handle that owns or contains the widget tree. |- | <code>widget_id</code> || <code>uint32_t</code> || Widget ID of the target control or container. |- | <code>grow</code> || <code>float</code> || Flex growth factor used during layout. |} === <code>plexy_size</code> === <pre>void plexy_size(PlexyWindow* win, uint32_t widget_id, float width, float height);</pre> Set the size property on an existing widget. ==== Parameters ==== {| class="wikitable" |- ! Parameter !! Type !! Description |- | <code>win</code> || <code>PlexyWindow*</code> || Window handle that owns or contains the widget tree. |- | <code>widget_id</code> || <code>uint32_t</code> || Widget ID of the target control or container. |- | <code>width</code> || <code>float</code> || Requested width in pixels. |- | <code>height</code> || <code>float</code> || Requested height in pixels. |} === <code>plexy_margin</code> === <pre>void plexy_margin(PlexyWindow* win, uint32_t widget_id, float top, float right, float bottom, float left);</pre> Set the margin property on an existing widget. ==== Parameters ==== {| class="wikitable" |- ! Parameter !! Type !! Description |- | <code>win</code> || <code>PlexyWindow*</code> || Window handle that owns or contains the widget tree. |- | <code>widget_id</code> || <code>uint32_t</code> || Widget ID of the target control or container. |- | <code>top</code> || <code>float</code> || Top edge distance or coordinate. |- | <code>right</code> || <code>float</code> || Right edge distance. |- | <code>bottom</code> || <code>float</code> || Bottom edge distance. |- | <code>left</code> || <code>float</code> || Left edge distance. |} === <code>plexy_padding</code> === <pre>void plexy_padding(PlexyWindow* win, uint32_t widget_id, float top, float right, float bottom, float left);</pre> Set the padding property on an existing widget. ==== Parameters ==== {| class="wikitable" |- ! Parameter !! Type !! Description |- | <code>win</code> || <code>PlexyWindow*</code> || Window handle that owns or contains the widget tree. |- | <code>widget_id</code> || <code>uint32_t</code> || Widget ID of the target control or container. |- | <code>top</code> || <code>float</code> || Top edge distance or coordinate. |- | <code>right</code> || <code>float</code> || Right edge distance. |- | <code>bottom</code> || <code>float</code> || Bottom edge distance. |- | <code>left</code> || <code>float</code> || Left edge distance. |} === <code>plexy_gap</code> === <pre>void plexy_gap(PlexyWindow* win, uint32_t widget_id, float gap);</pre> Set the gap property on an existing widget. ==== Parameters ==== {| class="wikitable" |- ! Parameter !! Type !! Description |- | <code>win</code> || <code>PlexyWindow*</code> || Window handle that owns or contains the widget tree. |- | <code>widget_id</code> || <code>uint32_t</code> || Widget ID of the target control or container. |- | <code>gap</code> || <code>float</code> || Spacing inserted between child items. |} == Widget state == These functions update widget content or toggle widget state after creation. === <code>plexy_set_text</code> === <pre>void plexy_set_text(PlexyWindow* win, uint32_t widget_id, const char* text);</pre> Replace the text content of an existing widget. ==== Parameters ==== {| class="wikitable" |- ! Parameter !! Type !! Description |- | <code>win</code> || <code>PlexyWindow*</code> || Window handle that owns or contains the widget tree. |- | <code>widget_id</code> || <code>uint32_t</code> || Widget ID of the target control or container. |- | <code>text</code> || <code>const char*</code> || Text content to display or apply. |} === <code>plexy_set_value</code> === <pre>void plexy_set_value(PlexyWindow* win, uint32_t widget_id, float value);</pre> Set the numeric value of a widget. ==== Parameters ==== {| class="wikitable" |- ! Parameter !! Type !! Description |- | <code>win</code> || <code>PlexyWindow*</code> || Window handle that owns or contains the widget tree. |- | <code>widget_id</code> || <code>uint32_t</code> || Widget ID of the target control or container. |- | <code>value</code> || <code>float</code> || Numeric value to apply or report. |} === <code>plexy_set_visible</code> === <pre>void plexy_set_visible(PlexyWindow* win, uint32_t widget_id, int visible);</pre> Show or hide a widget. ==== Parameters ==== {| class="wikitable" |- ! Parameter !! Type !! Description |- | <code>win</code> || <code>PlexyWindow*</code> || Window handle that owns or contains the widget tree. |- | <code>widget_id</code> || <code>uint32_t</code> || Widget ID of the target control or container. |- | <code>visible</code> || <code>int</code> || Visibility flag, typically non-zero for visible. |} === <code>plexy_set_enabled</code> === <pre>void plexy_set_enabled(PlexyWindow* win, uint32_t widget_id, int enabled);</pre> Enable or disable user interaction for a widget. ==== Parameters ==== {| class="wikitable" |- ! Parameter !! Type !! Description |- | <code>win</code> || <code>PlexyWindow*</code> || Window handle that owns or contains the widget tree. |- | <code>widget_id</code> || <code>uint32_t</code> || Widget ID of the target control or container. |- | <code>enabled</code> || <code>int</code> || Enabled flag, typically non-zero for enabled. |} === <code>plexy_set_readonly</code> === <pre>void plexy_set_readonly(PlexyWindow* win, uint32_t widget_id, int readonly);</pre> Toggle whether a text-capable widget is read-only. ==== Parameters ==== {| class="wikitable" |- ! Parameter !! Type !! Description |- | <code>win</code> || <code>PlexyWindow*</code> || Window handle that owns or contains the widget tree. |- | <code>widget_id</code> || <code>uint32_t</code> || Widget ID of the target control or container. |- | <code>readonly</code> || <code>int</code> || Read-only flag, typically non-zero to prevent editing. |} == Style == These functions control visual appearance such as color, corner radius, and surface material. === <code>plexy_set_corner_radius</code> === <pre>void plexy_set_corner_radius(PlexyWindow* win, uint32_t widget_id, float radius);</pre> Set the widget corner radius. ==== Parameters ==== {| class="wikitable" |- ! Parameter !! Type !! Description |- | <code>win</code> || <code>PlexyWindow*</code> || Window handle that owns or contains the widget tree. |- | <code>widget_id</code> || <code>uint32_t</code> || Widget ID of the target control or container. |- | <code>radius</code> || <code>float</code> || Corner radius value. |} === <code>plexy_set_elevation</code> === <pre>void plexy_set_elevation(PlexyWindow* win, uint32_t widget_id, float level);</pre> Set the widget elevation or depth styling level. ==== Parameters ==== {| class="wikitable" |- ! Parameter !! Type !! Description |- | <code>win</code> || <code>PlexyWindow*</code> || Window handle that owns or contains the widget tree. |- | <code>widget_id</code> || <code>uint32_t</code> || Widget ID of the target control or container. |- | <code>level</code> || <code>float</code> || Elevation level used to influence depth styling. |} === <code>plexy_set_fill_color</code> === <pre>void plexy_set_fill_color(PlexyWindow* win, uint32_t widget_id, float r, float g, float b, float a);</pre> Apply a fill color using RGBA components. ==== Parameters ==== {| class="wikitable" |- ! Parameter !! Type !! Description |- | <code>win</code> || <code>PlexyWindow*</code> || Window handle that owns or contains the widget tree. |- | <code>widget_id</code> || <code>uint32_t</code> || Widget ID of the target control or container. |- | <code>r</code> || <code>float</code> || Red color component. |- | <code>g</code> || <code>float</code> || Green color component. |- | <code>b</code> || <code>float</code> || Blue color component. |- | <code>a</code> || <code>float</code> || Alpha or opacity component. |} === <code>plexy_set_fill_color_hex</code> === <pre>void plexy_set_fill_color_hex(PlexyWindow* win, uint32_t widget_id, const char* hex);</pre> Apply a fill color using a hex color string. ==== Parameters ==== {| class="wikitable" |- ! Parameter !! Type !! Description |- | <code>win</code> || <code>PlexyWindow*</code> || Window handle that owns or contains the widget tree. |- | <code>widget_id</code> || <code>uint32_t</code> || Widget ID of the target control or container. |- | <code>hex</code> || <code>const char*</code> || Hexadecimal color string. |} === <code>plexy_set_text_color</code> === <pre>void plexy_set_text_color(PlexyWindow* win, uint32_t widget_id, float r, float g, float b, float a);</pre> Apply a text color using RGBA components. ==== Parameters ==== {| class="wikitable" |- ! Parameter !! Type !! Description |- | <code>win</code> || <code>PlexyWindow*</code> || Window handle that owns or contains the widget tree. |- | <code>widget_id</code> || <code>uint32_t</code> || Widget ID of the target control or container. |- | <code>r</code> || <code>float</code> || Red color component. |- | <code>g</code> || <code>float</code> || Green color component. |- | <code>b</code> || <code>float</code> || Blue color component. |- | <code>a</code> || <code>float</code> || Alpha or opacity component. |} === <code>plexy_set_text_color_hex</code> === <pre>void plexy_set_text_color_hex(PlexyWindow* win, uint32_t widget_id, const char* hex);</pre> Apply a text color using a hex color string. ==== Parameters ==== {| class="wikitable" |- ! Parameter !! Type !! Description |- | <code>win</code> || <code>PlexyWindow*</code> || Window handle that owns or contains the widget tree. |- | <code>widget_id</code> || <code>uint32_t</code> || Widget ID of the target control or container. |- | <code>hex</code> || <code>const char*</code> || Hexadecimal color string. |} === <code>plexy_set_font_size</code> === <pre>void plexy_set_font_size(PlexyWindow* win, uint32_t widget_id, float size);</pre> Set the rendered font size for the widget. ==== Parameters ==== {| class="wikitable" |- ! Parameter !! Type !! Description |- | <code>win</code> || <code>PlexyWindow*</code> || Window handle that owns or contains the widget tree. |- | <code>widget_id</code> || <code>uint32_t</code> || Widget ID of the target control or container. |- | <code>size</code> || <code>float</code> || Generic size value or drawer size. |} === <code>plexy_set_border</code> === <pre>void plexy_set_border(PlexyWindow* win, uint32_t widget_id, float r, float g, float b, float a, float width);</pre> Set border color and width for a widget. ==== Parameters ==== {| class="wikitable" |- ! Parameter !! Type !! Description |- | <code>win</code> || <code>PlexyWindow*</code> || Window handle that owns or contains the widget tree. |- | <code>widget_id</code> || <code>uint32_t</code> || Widget ID of the target control or container. |- | <code>r</code> || <code>float</code> || Red color component. |- | <code>g</code> || <code>float</code> || Green color component. |- | <code>b</code> || <code>float</code> || Blue color component. |- | <code>a</code> || <code>float</code> || Alpha or opacity component. |- | <code>width</code> || <code>float</code> || Requested width in pixels. |} === <code>plexy_set_glass</code> === <pre>void plexy_set_glass(PlexyWindow* win, uint32_t widget_id, float opacity);</pre> Apply a glass-style material effect with the given opacity. ==== Parameters ==== {| class="wikitable" |- ! Parameter !! Type !! Description |- | <code>win</code> || <code>PlexyWindow*</code> || Window handle that owns or contains the widget tree. |- | <code>widget_id</code> || <code>uint32_t</code> || Widget ID of the target control or container. |- | <code>opacity</code> || <code>float</code> || Opacity amount for the material effect. |} === <code>plexy_set_glass_material</code> === <pre>void plexy_set_glass_material(PlexyWindow* win, uint32_t widget_id, float opacity);</pre> Apply the full glass material treatment with the given opacity. ==== Parameters ==== {| class="wikitable" |- ! Parameter !! Type !! Description |- | <code>win</code> || <code>PlexyWindow*</code> || Window handle that owns or contains the widget tree. |- | <code>widget_id</code> || <code>uint32_t</code> || Widget ID of the target control or container. |- | <code>opacity</code> || <code>float</code> || Opacity amount for the material effect. |} === <code>plexy_set_surface_material</code> === <pre>void plexy_set_surface_material(PlexyWindow* win, uint32_t widget_id);</pre> Switch the widget back to an opaque surface-style material. ==== Parameters ==== {| class="wikitable" |- ! Parameter !! Type !! Description |- | <code>win</code> || <code>PlexyWindow*</code> || Window handle that owns or contains the widget tree. |- | <code>widget_id</code> || <code>uint32_t</code> || Widget ID of the target control or container. |} == Events == These functions register callbacks and direct focus for interactive widgets. === <code>plexy_on_click</code> === <pre>void plexy_on_click(PlexyWindow* win, uint32_t widget_id, PlexyClickCallback cb, void* userdata);</pre> Register a click callback for a widget. ==== Parameters ==== {| class="wikitable" |- ! Parameter !! Type !! Description |- | <code>win</code> || <code>PlexyWindow*</code> || Window handle that owns or contains the widget tree. |- | <code>widget_id</code> || <code>uint32_t</code> || Widget ID of the target control or container. |- | <code>cb</code> || <code>PlexyClickCallback</code> || Callback function invoked when the event fires. |- | <code>userdata</code> || <code>void*</code> || Caller-provided context passed back into the callback. |} === <code>plexy_on_value_changed</code> === <pre>void plexy_on_value_changed(PlexyWindow* win, uint32_t widget_id, PlexyValueCallback cb, void* userdata);</pre> Register a callback for value changes. ==== Parameters ==== {| class="wikitable" |- ! Parameter !! Type !! Description |- | <code>win</code> || <code>PlexyWindow*</code> || Window handle that owns or contains the widget tree. |- | <code>widget_id</code> || <code>uint32_t</code> || Widget ID of the target control or container. |- | <code>cb</code> || <code>PlexyValueCallback</code> || Callback function invoked when the event fires. |- | <code>userdata</code> || <code>void*</code> || Caller-provided context passed back into the callback. |} === <code>plexy_on_text_changed</code> === <pre>void plexy_on_text_changed(PlexyWindow* win, uint32_t widget_id, PlexyTextCallback cb, void* userdata);</pre> Register a callback for text changes. ==== Parameters ==== {| class="wikitable" |- ! Parameter !! Type !! Description |- | <code>win</code> || <code>PlexyWindow*</code> || Window handle that owns or contains the widget tree. |- | <code>widget_id</code> || <code>uint32_t</code> || Widget ID of the target control or container. |- | <code>cb</code> || <code>PlexyTextCallback</code> || Callback function invoked when the event fires. |- | <code>userdata</code> || <code>void*</code> || Caller-provided context passed back into the callback. |} === <code>plexy_on_key</code> === <pre>void plexy_on_key(PlexyWindow* win, uint32_t widget_id, PlexyKeyCallback cb, void* userdata);</pre> Register a callback for widget key events. ==== Parameters ==== {| class="wikitable" |- ! Parameter !! Type !! Description |- | <code>win</code> || <code>PlexyWindow*</code> || Window handle that owns or contains the widget tree. |- | <code>widget_id</code> || <code>uint32_t</code> || Widget ID of the target control or container. |- | <code>cb</code> || <code>PlexyKeyCallback</code> || Callback function invoked when the event fires. |- | <code>userdata</code> || <code>void*</code> || Caller-provided context passed back into the callback. |} === <code>plexy_set_focus</code> === <pre>void plexy_set_focus(PlexyWindow* win, uint32_t widget_id);</pre> Move keyboard focus to the specified widget. ==== Parameters ==== {| class="wikitable" |- ! Parameter !! Type !! Description |- | <code>win</code> || <code>PlexyWindow*</code> || Window handle that owns or contains the widget tree. |- | <code>widget_id</code> || <code>uint32_t</code> || Widget ID of the target control or container. |} === <code>plexy_on_menu</code> === <pre>void plexy_on_menu(PlexyWindow* win, PlexyMenuCallback cb, void* userdata);</pre> Register a callback for desktop menubar item selections. ==== Parameters ==== {| class="wikitable" |- ! Parameter !! Type !! Description |- | <code>win</code> || <code>PlexyWindow*</code> || Window handle that owns or contains the widget tree. |- | <code>cb</code> || <code>PlexyMenuCallback</code> || Callback function invoked when the event fires. |- | <code>userdata</code> || <code>void*</code> || Caller-provided context passed back into the callback. |} == App menubar model (desktop menubar integration) == These functions describe an application menu structure for the desktop menubar. === <code>plexy_menu_begin</code> === <pre>int plexy_menu_begin(PlexyWindow* win, int supported, const char* app_title);</pre> Begin describing an application menu model for the desktop menubar. ==== Parameters ==== {| class="wikitable" |- ! Parameter !! Type !! Description |- | <code>win</code> || <code>PlexyWindow*</code> || Window handle that owns or contains the widget tree. |- | <code>supported</code> || <code>int</code> || Flag indicating whether desktop menubar support is available. |- | <code>app_title</code> || <code>const char*</code> || Application title to expose through the menubar model. |} * '''Returns:''' An integer status or result code. === <code>plexy_menu_add</code> === <pre>int plexy_menu_add(PlexyWindow* win, uint32_t menu_id, const char* title);</pre> Create a new menu within the current menubar model. ==== Parameters ==== {| class="wikitable" |- ! Parameter !! Type !! Description |- | <code>win</code> || <code>PlexyWindow*</code> || Window handle that owns or contains the widget tree. |- | <code>menu_id</code> || <code>uint32_t</code> || Identifier of the target menu. |- | <code>title</code> || <code>const char*</code> || Human-readable label, title, or heading text. |} * '''Returns:''' An integer status or result code. === <code>plexy_menu_add_item</code> === <pre>int plexy_menu_add_item(PlexyWindow* win, uint32_t menu_id, uint32_t item_id, const char* label, int enabled);</pre> Add a menu item to an existing menu. ==== Parameters ==== {| class="wikitable" |- ! Parameter !! Type !! Description |- | <code>win</code> || <code>PlexyWindow*</code> || Window handle that owns or contains the widget tree. |- | <code>menu_id</code> || <code>uint32_t</code> || Identifier of the target menu. |- | <code>item_id</code> || <code>uint32_t</code> || Identifier of a menu item. |- | <code>label</code> || <code>const char*</code> || Display label shown with the widget. |- | <code>enabled</code> || <code>int</code> || Enabled flag, typically non-zero for enabled. |} * '''Returns:''' An integer status or result code. === <code>plexy_menu_commit</code> === <pre>int plexy_menu_commit(PlexyWindow* win);</pre> Submit the completed menubar model to the shell. ==== Parameters ==== {| class="wikitable" |- ! Parameter !! Type !! Description |- | <code>win</code> || <code>PlexyWindow*</code> || Window handle that owns or contains the widget tree. |} * '''Returns:''' An integer status or result code. == Batch updates (reduces IPC round-trips) == These functions group a series of widget updates so they can be applied together. === <code>plexy_batch_begin</code> === <pre>void plexy_batch_begin(PlexyWindow* win);</pre> Begin a batch of widget changes. ==== Parameters ==== {| class="wikitable" |- ! Parameter !! Type !! Description |- | <code>win</code> || <code>PlexyWindow*</code> || Window handle that owns or contains the widget tree. |} === <code>plexy_batch_end</code> === <pre>void plexy_batch_end(PlexyWindow* win);</pre> End a batch of widget changes and flush the grouped update. ==== Parameters ==== {| class="wikitable" |- ! Parameter !! Type !! Description |- | <code>win</code> || <code>PlexyWindow*</code> || Window handle that owns or contains the widget tree. |} == Retained Path Drawing (Bezier) == These functions build retained vector paths and query rendered widget bounds. === <code>plexy_path_clear</code> === <pre>void plexy_path_clear(PlexyWindow* win);</pre> Clear any retained path drawing commands. ==== Parameters ==== {| class="wikitable" |- ! Parameter !! Type !! Description |- | <code>win</code> || <code>PlexyWindow*</code> || Window handle that owns or contains the widget tree. |} === <code>plexy_path_begin</code> === <pre>void plexy_path_begin(PlexyWindow* win);</pre> Start defining a new retained path. ==== Parameters ==== {| class="wikitable" |- ! Parameter !! Type !! Description |- | <code>win</code> || <code>PlexyWindow*</code> || Window handle that owns or contains the widget tree. |} === <code>plexy_path_move_to</code> === <pre>void plexy_path_move_to(PlexyWindow* win, float x, float y);</pre> Move the current drawing cursor to a new position. ==== Parameters ==== {| class="wikitable" |- ! Parameter !! Type !! Description |- | <code>win</code> || <code>PlexyWindow*</code> || Window handle that owns or contains the widget tree. |- | <code>x</code> || <code>float</code> || X coordinate or output storage for the X position. |- | <code>y</code> || <code>float</code> || Y coordinate or output storage for the Y position. |} === <code>plexy_path_line_to</code> === <pre>void plexy_path_line_to(PlexyWindow* win, float x, float y);</pre> Append a straight line segment to the current path. ==== Parameters ==== {| class="wikitable" |- ! Parameter !! Type !! Description |- | <code>win</code> || <code>PlexyWindow*</code> || Window handle that owns or contains the widget tree. |- | <code>x</code> || <code>float</code> || X coordinate or output storage for the X position. |- | <code>y</code> || <code>float</code> || Y coordinate or output storage for the Y position. |} === <code>plexy_path_bezier_to</code> === <pre>void plexy_path_bezier_to(PlexyWindow* win, float cp1x, float cp1y, float cp2x, float cp2y, float x, float y);</pre> Append a cubic Bezier curve to the current path. ==== Parameters ==== {| class="wikitable" |- ! Parameter !! Type !! Description |- | <code>win</code> || <code>PlexyWindow*</code> || Window handle that owns or contains the widget tree. |- | <code>cp1x</code> || <code>float</code> || First Bezier control point X coordinate. |- | <code>cp1y</code> || <code>float</code> || First Bezier control point Y coordinate. |- | <code>cp2x</code> || <code>float</code> || Second Bezier control point X coordinate. |- | <code>cp2y</code> || <code>float</code> || Second Bezier control point Y coordinate. |- | <code>x</code> || <code>float</code> || X coordinate or output storage for the X position. |- | <code>y</code> || <code>float</code> || Y coordinate or output storage for the Y position. |} === <code>plexy_path_set_stroke</code> === <pre>void plexy_path_set_stroke(PlexyWindow* win, float r, float g, float b, float a, float width);</pre> Set stroke color and width for retained path drawing. ==== Parameters ==== {| class="wikitable" |- ! Parameter !! Type !! Description |- | <code>win</code> || <code>PlexyWindow*</code> || Window handle that owns or contains the widget tree. |- | <code>r</code> || <code>float</code> || Red color component. |- | <code>g</code> || <code>float</code> || Green color component. |- | <code>b</code> || <code>float</code> || Blue color component. |- | <code>a</code> || <code>float</code> || Alpha or opacity component. |- | <code>width</code> || <code>float</code> || Requested width in pixels. |} === <code>plexy_path_stroke</code> === <pre>void plexy_path_stroke(PlexyWindow* win);</pre> Render the current retained path as a stroke. ==== Parameters ==== {| class="wikitable" |- ! Parameter !! Type !! Description |- | <code>win</code> || <code>PlexyWindow*</code> || Window handle that owns or contains the widget tree. |} === <code>plexy_widget_bounds</code> === <pre>int plexy_widget_bounds(PlexyWindow* win, uint32_t widget_id, float* x, float* y, float* width, float* height);</pre> Query the current bounds of a widget. ==== Parameters ==== {| class="wikitable" |- ! Parameter !! Type !! Description |- | <code>win</code> || <code>PlexyWindow*</code> || Window handle that owns or contains the widget tree. |- | <code>widget_id</code> || <code>uint32_t</code> || Widget ID of the target control or container. |- | <code>x</code> || <code>float*</code> || X coordinate or output storage for the X position. |- | <code>y</code> || <code>float*</code> || Y coordinate or output storage for the Y position. |- | <code>width</code> || <code>float*</code> || Requested width in pixels. |- | <code>height</code> || <code>float*</code> || Requested height in pixels. |} * '''Returns:''' An integer status or result code. == Constants == === Justify content === Constants used to choose how child widgets are distributed on the main layout axis. {| class="wikitable" |- ! Constant !! Value !! Description |- | <code>PLEXY_JUSTIFY_START</code> || <code>0</code> || Pack items toward the start of the main axis. |- | <code>PLEXY_JUSTIFY_END</code> || <code>1</code> || Pack items toward the end of the main axis. |- | <code>PLEXY_JUSTIFY_CENTER</code> || <code>2</code> || Center items along the main axis. |- | <code>PLEXY_JUSTIFY_SPACE_BETWEEN</code> || <code>3</code> || Distribute free space between items. |- | <code>PLEXY_JUSTIFY_SPACE_AROUND</code> || <code>4</code> || Distribute free space around items. |- | <code>PLEXY_JUSTIFY_SPACE_EVENLY</code> || <code>5</code> || Distribute free space evenly before, between, and after items. |} === Align items === Constants used to choose how child widgets align on the cross axis. {| class="wikitable" |- ! Constant !! Value !! Description |- | <code>PLEXY_ALIGN_START</code> || <code>0</code> || Align items at the start of the cross axis. |- | <code>PLEXY_ALIGN_END</code> || <code>1</code> || Align items at the end of the cross axis. |- | <code>PLEXY_ALIGN_CENTER</code> || <code>2</code> || Center items on the cross axis. |- | <code>PLEXY_ALIGN_STRETCH</code> || <code>3</code> || Stretch items to fill the cross axis. |} === Flex direction === Constants used to choose whether a layout flows as a row or a column. {| class="wikitable" |- ! Constant !! Value !! Description |- | <code>PLEXY_FLEX_ROW</code> || <code>0</code> || Lay out children horizontally. |- | <code>PLEXY_FLEX_COLUMN</code> || <code>1</code> || Lay out children vertically. |} === Drawer edges === Constants used to attach a drawer to a specific edge of its parent window. {| class="wikitable" |- ! Constant !! Value !! Description |- | <code>PLEXY_DRAWER_LEFT</code> || <code>0</code> || Attach the drawer to the left edge. |- | <code>PLEXY_DRAWER_RIGHT</code> || <code>1</code> || Attach the drawer to the right edge. |- | <code>PLEXY_DRAWER_TOP</code> || <code>2</code> || Attach the drawer to the top edge. |- | <code>PLEXY_DRAWER_BOTTOM</code> || <code>3</code> || Attach the drawer to the bottom edge. |}
Summary:
Please note that all contributions to PlexyDesk - Display Server for GNU/Linux may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Project:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)