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
Examples
(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!
== Minimal PlexyUI example == The following example is based on <code>examples/hello_uikit.c</code>: <pre> #include <plexy_ui.h> #include <stdio.h> static void on_click(uint32_t widget_id, void* userdata) { printf("Button clicked! (widget %u)\n", widget_id); } int main(void) { PlexyApp* app = plexy_app_create("Hello UIKit"); PlexyWindow* win = plexy_window_create(app, 400, 300, "Hello PlexyDesk"); uint32_t root = plexy_window_root(win); plexy_padding(win, root, 24, 24, 24, 24); plexy_gap(win, root, 16); plexy_justify(win, root, PLEXY_JUSTIFY_CENTER); plexy_align(win, root, PLEXY_ALIGN_CENTER); uint32_t title = plexy_label(win, root, "Welcome to PlexyDesk UIKit"); plexy_set_text_color_hex(win, title, "#1f2937"); uint32_t btn = plexy_button(win, root, "Click Me"); plexy_set_fill_color_hex(win, btn, "#3b82f6"); plexy_set_text_color_hex(win, btn, "#ffffff"); plexy_on_click(win, btn, on_click, NULL); plexy_app_run(app); plexy_app_destroy(app); return 0; } </pre> Build and run: <pre> gcc -o hello_uikit hello_uikit.c -L../lib -lplexyui ./hello_uikit </pre>
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)