Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 6050 → Rev 6043

/programs/cmm/examples/window.c
File deleted
\ No newline at end of file
/programs/cmm/examples/compile.bat
1,20 → 1,14
c-- window.c
c-- example.c
c-- collections.c
c-- menu.c
c-- mixcolors.c
 
@echo off
@del _window
@del _collections
@del _menu
@del _mixcolors
@del @@example
@del @@collections
@del @@menu
 
@rename window.com _window
@rename collections.com _collections
@rename menu.com _menu
@rename mixcolors.com _mixcolors
@rename example.com @@example
@rename collections.com @@collections
@rename menu.com @@menu
 
@del warning.txt
@echo on
 
@pause
/programs/cmm/examples/example.c
0,0 → 1,46
#define MEMSIZE 0x3E80
 
#include "../lib/io.h"
 
void main()
{
int id, key, i;
dword file;
io.dir.load(0,DIR_ONLYREAL);
loop()
{
switch(WaitEvent())
{
case evButton:
id=GetButtonID();
if (id==1) ExitProcess();
break;
case evKey:
key = GetKey();
if (key==013){ //Enter
draw_window();
}
break;
case evReDraw:
draw_window();
break;
}
}
}
void draw_window()
{
proc_info Form;
int i;
i=0;
DefineAndDrawWindow(215,100,250,200,0x34,0xFFFFFF,"Window header");
GetProcessInfo(#Form, SelfInfo);
while(i<io.dir.count)
{
WriteText(5,i*8+3,0x80,0xFF00FF,io.dir.position(i));
i++;
}
WriteText(10,110,0x80,0,#param);
}