Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 6049 → Rev 6050

/programs/cmm/examples/example.c
File deleted
\ No newline at end of file
/programs/cmm/examples/compile.bat
1,14 → 1,20
c-- example.c
c-- window.c
c-- collections.c
c-- menu.c
c-- mixcolors.c
 
@del @@example
@del @@collections
@del @@menu
@echo off
@del _window
@del _collections
@del _menu
@del _mixcolors
 
@rename example.com @@example
@rename collections.com @@collections
@rename menu.com @@menu
@rename window.com _window
@rename collections.com _collections
@rename menu.com _menu
@rename mixcolors.com _mixcolors
 
@del warning.txt
@echo on
 
@pause
/programs/cmm/examples/window.c
0,0 → 1,42
#define MEMSIZE 4096*10
 
#include "../lib/io.h"
#include "../lib/gui.h"
 
void main()
{
word id;
dword file;
io.dir.load(0,DIR_ONLYREAL);
loop() switch(WaitEvent())
{
case evButton:
id=GetButtonID();
if (id==1) ExitProcess();
break;
case evKey:
GetKeys();
if (key_scancode == SCAN_CODE_ESC ) ExitProcess();
break;
case evReDraw:
draw_window();
break;
}
}
void draw_window()
{
proc_info Form;
int i;
DefineAndDrawWindow(215,100,350,300,0x34,0xFFFFFF,"Window header");
GetProcessInfo(#Form, SelfInfo);
for (i=0; i<io.dir.count; i++)
{
WriteText(5,i*8+3,0x80,0xFF00FF,io.dir.position(i));
}
DrawCaptButton(100, 10, 100, 22, 22, 0xCCCccc, 0x000000, "Button");
WriteText(100,50,0x80,0,"Textline small");
WriteText(100,70,0x90,0,"Textline big");
DrawBar(100, 110, 100, 100, 0x66AF86);
}