Example 02: Basic Window
An introduction to libui and creating graphical apps.
---
This example demonstrates how to create an empty window that stays active on the screen until the user explicitly closes it by clicking the 'X' button.
## 📝 Concepts Introduced
* Including `libui.h` and the event structure.
* Creating a `ui_window_t` handle.
* Creating an infinite event loop using `ui_get_event()`.
* Yielding CPU time to the kernel via `sys_yield()`.
---
## 💻 The Code (`src/userland/gui/basic_window.c`)
```c
#include