Subversion Repositories Kolibri OS

Rev

Rev 7433 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
7433 leency 1
/*
2
 * Template C-- program.
3
*/
4
 
5
#define MEMSIZE 4096*15
6
 
7
#include "../lib/io.h"
8
#include "../lib/gui.h"
9
 
10
#define WIN_W 12*10+30
11
#define WIN_H 80
12
 
13
void main()
14
{
15
	word btn;
16
	loop() switch(WaitEvent())
17
	{
18
		case evButton:
19
			btn = GetButtonID();
20
			if (btn == 1) ExitProcess();
21
			break;
22
 
23
		case evKey:
24
			GetKeys();
25
			if (key_scancode == SCAN_CODE_ESC) ExitProcess();
26
			break;
27
 
28
		case evReDraw:
29
			draw_window();
30
			break;
31
	}
32
}
33
 
34
 
35
inline GetRevisionNumber()
36
{
37
	char buf[32];
38
	EAX = 18;
39
	EBX = 13;
40
	ECX = #buf;
41
	return ESDWORD[#buf+5];
42
}
43
 
44
void draw_window()
45
{
7806 leency 46
	sc.get();
7433 leency 47
	DefineUnDragableWindow(screen.width-WIN_W-15, GetClientHeight()-WIN_H-15, WIN_W-1, WIN_H-1);
48
	DrawBar(0,0,WIN_W,WIN_H,0x414155);
49
	DrawWideRectangle(0,0,WIN_W,WIN_H, 3, 0x5555FF);
50
	WriteText(15, 20,    0x81, 0xFFFF55, " REV 7321 ");
51
	WriteText(15, 20+25, 0x81, 0xFFFF55, "17.09.2018");
52
}