Subversion Repositories Kolibri OS

Rev

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

Rev Author Line No. Line
3363 leency 1
#define MEMSIZE 0x3E80
3225 leency 2
#include "..\lib\kolibri.h"
3363 leency 3
#include "..\lib\strings.h"
3225 leency 4
#include "..\lib\file_system.h"
5
 
6
 
7
void main()
8
{
9
	int id, key;
10
 
11
	loop()
12
   {
13
      switch(WaitEvent())
14
      {
15
         case evButton:
16
            id=GetButtonID();
17
            if (id==1) ExitProcess();
18
			break;
19
 
20
        case evKey:
21
			key = GetKey();
22
			IF (key==013){ //Enter
23
				WriteText(50,90,0x80,0xFF00FF,"Pressed Enter");
24
			}
25
			break;
26
 
27
         case evReDraw:
28
			draw_window();
29
			break;
30
      }
31
   }
32
}
33
 
34
 
35
void draw_window()
36
{
3363 leency 37
	proc_info Form;
3225 leency 38
	DefineAndDrawWindow(215,100,250,200,0x34,0xFFFFFF,"Window header");
3363 leency 39
	GetProcessInfo(#Form, SelfInfo);
3225 leency 40
	WriteText(50,80,0x80,0,"Press Enter");
41
}
42
 
43
 
44
stop: