kolibrios/programs/cmm/example/example.c
pavelyakov 110a703c5e Example.c update
git-svn-id: svn://kolibrios.org@5641 a494cfbc-eb01-0410-851d-a64ba20cac60
2015-08-01 22:19:10 +00:00

44 lines
802 B
C

#define MEMSIZE 0x3E80
#include "../lib/io.h"
void main()
{
int id, key, i;
dword file;
mem_Init();
io.dir_buffer("/sys/",DIR_ONLYREAL);
loop()
{
switch(WaitEvent())
{
case evButton:
id=GetButtonID();
if (id==1) ExitProcess();
break;
case evKey:
key = GetKey();
if (key==013){ //Enter
draw_window();
WriteText(50,90,0x80,0xFF00FF,io.dir_position(i));
if(i<io.dir.count)i++;
}
break;
case evReDraw:
draw_window();
break;
}
}
}
void draw_window()
{
proc_info Form;
DefineAndDrawWindow(215,100,250,200,0x34,0xFFFFFF,"Window header");
GetProcessInfo(#Form, SelfInfo);
WriteText(10,110,0x80,0,#param);
}
stop: