kolibrios-gitea/programs/develop/ktcc/trunk/samples/other/melibc_example/hello.c
maxcodehack f75ba1987d Add example to TCC melibc #2
git-svn-id: svn://kolibrios.org@8231 a494cfbc-eb01-0410-851d-a64ba20cac60
2020-11-21 13:31:00 +00:00

33 lines
565 B
C
Executable File

#include <menuet/os.h>
char title[] = "Menuetlibc in TinyC";
char string[] = "Text";
void draw_window(void)
{
// start redraw
__menuet__window_redraw(1);
// define&draw window
__menuet__define_window(10,40,300,150,0x33FFFFFF,0,(__u32)title);
// display string
__menuet__write_text(30,10,0x80000000,string,0);
// end redraw
__menuet__window_redraw(2);
}
int main()
{
draw_window();
for (;;)
{
switch (__menuet__wait_for_event())
{
case 1:
draw_window();
break;
case 3:
return;
}
}
}