{"id":44734047,"url":"https://github.com/intent-garden/wui","last_synced_at":"2026-04-02T15:13:40.272Z","repository":{"id":39975564,"uuid":"439236814","full_name":"intent-garden/wui","owner":"intent-garden","description":"Window User Interface Library :: libWUI offical repo","archived":false,"fork":false,"pushed_at":"2026-03-27T11:03:39.000Z","size":24426,"stargazers_count":61,"open_issues_count":10,"forks_count":4,"subscribers_count":3,"default_branch":"main","last_synced_at":"2026-03-27T22:42:17.813Z","etag":null,"topics":["cpp","ui-components","ui-library","uikit"],"latest_commit_sha":null,"homepage":"https://libwui.org","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsl-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/intent-garden.png","metadata":{"files":{"readme":"README.en.md","changelog":"ChangeLog.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"custom":["https://intent-garden.org/"]}},"created_at":"2021-12-17T06:44:36.000Z","updated_at":"2026-03-27T11:00:52.000Z","dependencies_parsed_at":"2025-04-10T10:38:12.854Z","dependency_job_id":"958c0cb0-d4a3-4ef2-babc-082f06bc2758","html_url":"https://github.com/intent-garden/wui","commit_stats":null,"previous_names":["intent-garden/wui"],"tags_count":18,"template":false,"template_full_name":null,"purl":"pkg:github/intent-garden/wui","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/intent-garden%2Fwui","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/intent-garden%2Fwui/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/intent-garden%2Fwui/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/intent-garden%2Fwui/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/intent-garden","download_url":"https://codeload.github.com/intent-garden/wui/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/intent-garden%2Fwui/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31308749,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-02T12:59:32.332Z","status":"ssl_error","status_checked_at":"2026-04-02T12:54:48.875Z","response_time":89,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cpp","ui-components","ui-library","uikit"],"created_at":"2026-02-15T19:27:54.783Z","updated_at":"2026-04-02T15:13:40.265Z","avatar_url":"https://github.com/intent-garden.png","language":"C++","readme":"# WUI (Window User Interface Library)\n\nWUI is a cross-platform modern C++ library for creating graphical user interfaces. The library uses C++17 and has a minimalistic API. Currently it supports Windows (XP - 11) and Linux (glibc 2.23 and above).\n\nWUI is designed to provide developers with a simple and efficient tool for creating cross-platform GUI applications in C++. The library allows focusing on application logic rather than platform-specific interface implementation details.\n\n## Features\n\n- Cross-platform: supports Windows and Linux, with macOS planned\n- Minimalistic API, ease of use\n- Common interfaces for drawing and event handling, platform-independent\n- Support for themes and localization\n- Ability to create and integrate custom controls\n- Application configuration management (Windows registry, ini files, JSON)\n\n## Architecture\n\nThe project is based on three key entities:\n\n- **Window** — a window that receives system events and manages controls\n- **Control** — a visual interface element (buttons, input fields, etc.)\n- **Graphic** — an interface for rendering, abstracting platform-dependent drawing methods\n\n![WUI Architecture](doc/en/docs/img/system.png)\n\n**Control** is any visual element for user interaction: button, input field, list, menu, etc. Control knows how to handle events coming from Window, stores its states, and draws itself on the graphical context provided by the containing window.\n\n**Window** receives system events and provides their distribution to subscribers. The window also commands its controls to redraw and provides them with its graphic. In addition, the window controls the input focus, can make modality, and send an event to the subscribed user or to the system.\n\n**Graphic** is the third base entity that provides an interface to system drawing methods. Currently, drawing is implemented on Windows GDI/GDI+ and Linux xcb/cairo.\n\nThe library also has auxiliary tools:\n- **common** — basic types (`rect`, `color`, `font`)\n- **event** — mouse, keyboard, internal and system events\n- **theme** — constant system for visual themes support\n- **locale** — subsystem for storing text content\n\n## Platforms\n\nCurrently supported:\n\n- **Windows** (WinAPI + GDI)\n- **Linux** (X11 + xcb)\n\nmacOS support will be completed soon.\n\nAll platform-dependent code is collected in two elements — `window` and `graphic` (rendering subsystem).\n\n## Fundamental Principles\n\nThe window receives system events: need to render, mouse and keyboard input, device changes, user messages. These messages are passed to window event subscribers — controls contained on the window and user code of the application.\n\nReceiving events from a control is performed by callbacks specific to that control. This allowed us to simplify the event system without losing functionality.\n\nWhen it is necessary to draw a part of the window, we search for controls falling into the redrawing area and call the `draw()` method of each control sequentially. Controls with `topmost() == true` are drawn last, to be at the top of the control stack.\n\n### Flat Control Ownership Model\n\nWUI uses a flat control ownership model: all window controls are owned by a single parent object (usually a dialog class), which stores them in `std::shared_ptr`. When the parent is destroyed, all controls are automatically released.\n\n```cpp\nclass DialingDialog {\n    std::shared_ptr\u003cwui::window\u003e window;\n    std::shared_ptr\u003cwui::text\u003e text;\n    std::shared_ptr\u003cwui::image\u003e image;\n    std::shared_ptr\u003cwui::button\u003e cancelButton;\n};\n```\n\nThis approach provides:\n- Simple memory management without manual deletion\n- Predictable control lifecycle\n- No circular references\n- Safety through `std::shared_ptr`/`std::weak_ptr`\n\n[More about flat control ownership](doc/en/docs/base/ownership.md)\n\n### Flat Event Subscription Model\n\nWUI implements a **\"flat subscription\"** model: the window acts as a central event dispatcher, and any object can subscribe to the events it needs.\n\n```cpp\n// Subscribe to keyboard and system events\nstd::string sub_id = window-\u003esubscribe(\n    [this](const wui::event\u0026 ev) {\n        if (ev.type \u0026 wui::event_type::keyboard) {\n            // Hotkey logic\n        }\n    },\n    wui::event_type::keyboard | wui::event_type::system\n);\n\n// Unsubscribe by ID\nwindow-\u003eunsubscribe(sub_id);\n```\n\nAdvantages:\n- **Decoupling from hierarchy** — no need to inherit from controls to handle events\n- **Flexibility** — any object can subscribe to events of any control\n- **Lifetime management** — dynamic subscribe/unsubscribe via unique ID\n- **Performance** — subscribers stored in `std::vector` for cache locality\n\n[More about events](doc/en/docs/base/event.md)\n\n## Documentation and Resources\n\n- Documentation: [https://libwui.org/doc](https://libwui.org/doc)\n- Website: [https://libwui.org](https://libwui.org)\n- Telegram chat: [https://t.me/libwui_chat](https://t.me/libwui_chat)\n- Email: [info@libwui.org](mailto:info@libwui.org)\n\n## Examples\n\n![WUI screen 1](doc/en/docs/img/hw0.png)\n![WUI screen 2](doc/en/docs/img/hw1.png)\n\n## Maintainer\n\nThe project is supported by the independent laboratory of deterministic synthesis [🌿 Intent-Garden](https://intent-garden.org).\n\n🌿 [Intent-Garden](https://intent-garden.org) | 📜 [RuleROM](https://rulerom.com) | 🐉 [Decima8](https://decima8.org) | 🎨 [libwui](https://libwui.org)\n","funding_links":["https://intent-garden.org/"],"categories":["Frameworks"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fintent-garden%2Fwui","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fintent-garden%2Fwui","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fintent-garden%2Fwui/lists"}