2016-11-07 15:41:01 +01:00
|
|
|
/*
|
2018-11-12 11:41:56 +01:00
|
|
|
* Template C-- program
|
2016-11-07 15:41:01 +01:00
|
|
|
*/
|
|
|
|
|
2020-05-01 22:57:17 +02:00
|
|
|
#define MEMSIZE 1024*40
|
2016-11-07 15:41:01 +01:00
|
|
|
|
2018-10-04 22:08:44 +02:00
|
|
|
#include "../lib/io.h"
|
|
|
|
#include "../lib/gui.h"
|
2016-11-07 15:41:01 +01:00
|
|
|
|
|
|
|
proc_info Form;
|
|
|
|
|
|
|
|
void main()
|
|
|
|
{
|
2018-10-04 22:08:44 +02:00
|
|
|
word btn;
|
|
|
|
loop() switch(WaitEvent())
|
|
|
|
{
|
|
|
|
case evButton:
|
|
|
|
btn = GetButtonID();
|
|
|
|
if (btn == 1) ExitProcess();
|
|
|
|
break;
|
|
|
|
|
|
|
|
case evKey:
|
|
|
|
GetKeys();
|
|
|
|
if (key_scancode == SCAN_CODE_ESC) ExitProcess();
|
|
|
|
break;
|
|
|
|
|
|
|
|
case evReDraw:
|
|
|
|
draw_window();
|
|
|
|
break;
|
|
|
|
}
|
2016-11-07 15:41:01 +01:00
|
|
|
}
|
|
|
|
|
2018-10-04 22:08:44 +02:00
|
|
|
void draw_window()
|
|
|
|
{
|
|
|
|
DefineAndDrawWindow(215, 100, 350, 300, 0x34, 0xEEEeee, "Window title",0);
|
|
|
|
GetProcessInfo(#Form, SelfInfo);
|
|
|
|
}
|