Orion is a standalone C11 UI framework for desktop applications and tools. It uses WinAPI-style windows, messages, commands, and controls with snake_case APIs, native Platform backends, and hardware-accelerated rendering.
The framework includes:
- Windows, nested input routing, message queues, accelerators, and dialogs
- Reusable controls, auto-layout containers, menus, toolbars, and scrollbars
- Declarative
.orionresources compiled into typed C definitions - Database-bound forms and table views
- Standalone applications and loadable GEM modules from the same source
- Native macOS, Linux, and Windows support
- JPEG screenshot capture for documentation and automated presentation
git clone https://github.com/corepunch/orion-ui.git
cd orion-ui
git submodule update --init --recursive
make apps
make testBuild individual programs or loadable modules:
make build/bin/helloworld
make build/bin/shell
make build/gem/helloworld.gem
build/bin/helloworld
build/bin/shellBuild the framework libraries with make library, or install the complete
suite under /opt/orion with make install.
Applications expose a gem_init entry point and use the standard launcher to
produce both a standalone executable and a loadable GEM:
#include<orion/ui.h>#include<orion/gem.h>staticwindow_t*g_main_win;
staticresult_tmain_proc(window_t*win, uint32_tmsg,
uint32_twparam, void*lparam) {
switch (msg) {
caseevCreate: return true;
caseevPaint:
draw_text_small("Hello from Orion", 16, 16, get_sys_color(brTextNormal));
return true;
caseevDestroy:
if (win==g_main_win) ui_request_quit();
return true;
default: return false;
}
}
staticboolgem_init(intargc, char**argv, hinstance_thinstance) {
(void)argc;
(void)argv;
g_main_win=create_window("Hello", 0, MAKERECT(40, 40, 320, 180),
NULL, main_proc, hinstance, NULL);
returng_main_win!=NULL;
}
staticvoidgem_shutdown(void) {
if (g_main_win) destroy_window(g_main_win);
g_main_win=NULL;
}
GEM_DEFINE("Hello", "1.0", gem_init, gem_shutdown, NULL)
GEM_STANDALONE_MAIN("Hello", UI_INIT_DESKTOP, 640, 480, NULL, NULL)See Getting Started for the complete source and build setup, including declarative forms and SDK compiler flags.
apps/ Applications, resources, components, and app-specific tests
orion/user/ Windows, messages, input, drawing, forms, and resources
orion/kernel/ Runtime services, graphics lifecycle, and rendering
orion/commctl/ Reusable controls and layout containers
orion/commdlg/ Modal dialogs and common pickers
platform/ Native windows, events, filesystems, processes, and networking
share/ Framework fonts, icons, shaders, and deployable assets
tests/ Framework behavior and integration tests
tools/ Resource compilers, generators, and release utilities
Platform events become Orion messages. Window procedures handle lifecycle and
input, controls notify their root with evCommand, controllers mutate
application state, and invalidated windows draw during evPaint.
Read Architecture for layer ownership, coordinate spaces, message flow, resource compilation, application boundaries, and debugging.
.orion XML is the canonical source for forms, menus, toolbars, accelerators,
and database metadata. orionc compiles it into typed C headers during the
build. Database forms identify resources with full paths such as
field="db.authors.name"; after registering db, the form resolves and saves
records without receiving a database pointer from its caller.
show_db_dialog(&myapp_edit_author_form, "Edit Author", parent, author_id);See Database Forms and Dialogs & DDX.
The bundled apps are usable programs and architectural references:
- Form Editor: declarative UI authoring, plugins, inspectors, and live views
- Image Editor: MDI, canvas rendering, tools, layers, palettes, and animation
- Git Client: tabs, report views, staging, history, GitHub data, and diffs
- Social Feed: database-bound forms, tables, and MVC boundaries
- Task Manager: project data, commands, table views, and dialogs
- Vibe Office: desktop-style custom controls and process-backed state
- Scener: scene editing plus headless and CLI rendering
Browse screenshots and learning notes in the Application Gallery. App contributors should also read apps/README.md.
Press F12 for an interactive JPEG capture. Standalone apps using
GEM_STANDALONE_MAIN can capture the first fully painted frame and exit:
build/bin/imageeditor images/logo.png \
--screenshot docs/screenshots/imageeditor_orion.jpgSee Presenting an Application for screenshot and app documentation standards.
- Getting Started
- Architecture
- Window System
- Controls
- Dialogs & DDX
- Messages & Events
- Drawing & Rendering
- GEM Plugin System
- Package Manager
The documentation site is published with GitHub Pages from docs/.
