Simple window in KolibriOS
The latest Ziron linker plugin supports KolibriOS executables. A sample app (code provided by 0CodErr)
program KOLIBRI32 'sample';
#include 'kolibrios.zir';
const MY_WIN_STYLE = WS_CAPTION or WS_COORD_CLIENT or WS_SKINNED_SIZABLE or WS_FILL_GRADIENT or 0x00C00DEE;
const MY_EVENT_MASK = EM_REDRAW or EM_BUTTON;
dword Width,Height,Left,Top;
SetEventMask(MY_EVENT_MASK);
// calculate left, top, width, height:
edx = GetScreenSize();
edx >> 17;
and eax, 0xFFFF;
eax >> 1;
Height = eax;
eax >> 1;
Top = eax;
Width = edx;
edx >> 1;
Left = edx;
repeat {
RedrawStart();
DrawWindow(Left, Width, Top, Height, MY_WIN_STYLE, 'Hello from Ziron :)');
RedrawFinish();
eax = WaitEvent();
} until (eax != 1);
ThreadTerminate();
