Appearance
Examples
All of these are in examples/.
| Example | Shows |
|---|---|
hello.c | arguments, stdout, the time |
parent.c, child.c | os9_fork, os9_wait, exit status |
signal.c | os9_intercept, os9_send, waking os9_sleep |
link.c | os9_link to a module, its header |
stress.c | the runtime under load |
ui-hello.c | the smallest NavX UI app: a counter with a focus ring, inside the shell |
c
/* ui-hello.c, the loop */
for (;;) {
int e = ui_app_wait(5);
if (e < 0) continue;
if (e == UI_HOME) ui_app_exit(0);
if (e == UI_PREV && foc > 0) foc--;
if (e == UI_NEXT && foc < 2) foc++;
if (e == UI_SELECT) {
if (foc == 0) ui_app_exit(0); /* back at the top: done */
n += foc == 2 ? 1 : -1;
}
draw();
}The bigger apps are ibusx (the I-Bus monitor) and the NavX shell itself. Both are closed source and built on the same library.