Subversion Repositories Kolibri OS

Rev

Rev 5959 | Rev 6746 | Go to most recent revision | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 5959 Rev 6050
1
#define MEMSIZE 0x3E80
1
#define MEMSIZE 4096*10
2
 
2
 
-
 
3
#include "../lib/io.h"
3
#include "../lib/io.h"
4
#include "../lib/gui.h"
4
 
5
 
5
void main()
6
void main()
6
{   
7
{
7
	int id, key, i;
8
	word id;
8
	dword file;
9
	dword file;
9
	io.dir.load(0,DIR_ONLYREAL);
10
	io.dir.load(0,DIR_ONLYREAL);
10
	loop()
-
 
11
   {
-
 
12
      switch(WaitEvent())
11
	loop() switch(WaitEvent())
13
      {
12
	{
14
         case evButton:
13
		case evButton:
15
            id=GetButtonID();               
14
			id=GetButtonID();               
16
            if (id==1) ExitProcess();
15
			if (id==1) ExitProcess();
17
			break;
16
			break;
18
      
17
	  
19
        case evKey:
18
		case evKey:
20
			key = GetKey();
19
			GetKeys();
21
			if (key==013){ //Enter
20
			if (key_scancode == SCAN_CODE_ESC ) ExitProcess();
22
				draw_window();
-
 
23
				
-
 
24
			}
-
 
25
			break;
21
			break;
26
         
22
		 
27
         case evReDraw:
23
		case evReDraw:
28
			draw_window();
24
			draw_window();
29
			break;
25
			break;
30
      }
26
	}
31
   }
27
}
32
}
-
 
33
void draw_window()
28
void draw_window()
34
{
29
{
35
	proc_info Form;
30
	proc_info Form;
36
	int i;
31
	int i;
37
	i=0;
-
 
38
	DefineAndDrawWindow(215,100,250,200,0x34,0xFFFFFF,"Window header");
32
	DefineAndDrawWindow(215,100,350,300,0x34,0xFFFFFF,"Window header");
39
	GetProcessInfo(#Form, SelfInfo);
33
	GetProcessInfo(#Form, SelfInfo);
40
	while(i
34
	for (i=0; i
41
	{
35
	{
42
		WriteText(5,i*8+3,0x80,0xFF00FF,io.dir.position(i));
36
		WriteText(5,i*8+3,0x80,0xFF00FF,io.dir.position(i));
43
		i++;
-
 
44
	}
37
	}
-
 
38
	DrawCaptButton(100, 10, 100, 22, 22, 0xCCCccc, 0x000000, "Button");
45
	WriteText(10,110,0x80,0,#param);
39
	WriteText(100,50,0x80,0,"Textline small");
-
 
40
	WriteText(100,70,0x90,0,"Textline big");
-
 
41
	DrawBar(100, 110, 100, 100, 0x66AF86);
46
}
42
}
47
>
43