forked from KolibriOS/kolibrios
Add files
git-svn-id: svn://kolibrios.org@8168 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
ae214226bd
commit
62f378b0e5
19
programs/bcc32/examples/template/Makefile
Executable file
19
programs/bcc32/examples/template/Makefile
Executable file
@ -0,0 +1,19 @@
|
||||
# Path to /programs
|
||||
SVN_PROGR:=../../..
|
||||
|
||||
# Path to /programs/bcc32
|
||||
SVN_BCC32:=$(SVN_PROGR)/bcc32
|
||||
|
||||
# Path to t2fasm
|
||||
T2FASM:=$(SVN_BCC32)/t2fasm
|
||||
|
||||
# Path to include
|
||||
INCLUDE:=$(SVN_BCC32)/include
|
||||
|
||||
# Path to Bin folder
|
||||
KOS32_BCC:=/home/autobuild/borlandcpp/bin
|
||||
|
||||
# Filename without .cpp
|
||||
FILENAME:=template
|
||||
|
||||
include $(SVN_BCC32)/Makefile_app
|
52
programs/bcc32/examples/template/template.cpp
Executable file
52
programs/bcc32/examples/template/template.cpp
Executable file
@ -0,0 +1,52 @@
|
||||
#include <kolibri.h>
|
||||
#include <kos_heap.h>
|
||||
#include <kos_file.h>
|
||||
|
||||
using namespace Kolibri;
|
||||
|
||||
const char header[] = "bcc32 program template";
|
||||
|
||||
bool KolibriOnStart(TStartData &kos_start, TThreadData th)
|
||||
{
|
||||
kos_start.Left = 10;
|
||||
kos_start.Top = 40;
|
||||
kos_start.Width = 500;
|
||||
kos_start.Height = 500;
|
||||
kos_start.WinData.WindowColor = 0xFFFFFF;
|
||||
kos_start.WinData.WindowType = 0x34; // 0x34 - fixed, 0x33 - not fixed
|
||||
kos_start.WinData.Title = header;
|
||||
return true;
|
||||
}
|
||||
|
||||
void KolibriOnPaint(void)
|
||||
{
|
||||
// SOME DRAWING CODE
|
||||
}
|
||||
|
||||
void KolibriOnButton(long id, TThreadData th)
|
||||
{
|
||||
// button event (BUTTON ID)
|
||||
/*
|
||||
switch(id){
|
||||
case 2:
|
||||
SetWindowCaption("Red");
|
||||
break;
|
||||
...
|
||||
case N:
|
||||
SetWindowCaption("Yellow");
|
||||
//break;
|
||||
};
|
||||
*/
|
||||
}
|
||||
/*
|
||||
int KolibriOnIdle(TThreadData th)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
void KolibriOnSize(int window_rect[], TThreadData th) {}
|
||||
void KolibriOnKeyPress(TThreadData th)
|
||||
{
|
||||
GetKey();
|
||||
}
|
||||
void KolibriOnMouse(TThreadData th) {}
|
||||
*/
|
16
programs/bcc32/examples/template/template_cpp.bat
Executable file
16
programs/bcc32/examples/template/template_cpp.bat
Executable file
@ -0,0 +1,16 @@
|
||||
Set NAME=template
|
||||
Set BCC_DIR=..\..\..\bcc32
|
||||
kos32-bcc -S -v- -R- -6 -a4 -O2 -Og -Oi -Ov -OS -k- -D__KOLIBRI__ -I..\..\..\bcc32\include %NAME%.cpp
|
||||
|
||||
echo STACKSIZE equ 102400> kos_make.inc
|
||||
echo HEAPSIZE equ 102400>> kos_make.inc
|
||||
echo include "%BCC_DIR%\include\kos_start.inc">> kos_make.inc
|
||||
echo include "%BCC_DIR%\include\kos_func.inc">> kos_make.inc
|
||||
echo include "%BCC_DIR%\include\kos_heap.inc">> kos_make.inc
|
||||
|
||||
echo include "kos_make.inc" > f_%NAME%.asm
|
||||
t2fasm < %NAME%.asm >> f_%NAME%.asm
|
||||
fasm f_%NAME%.asm %NAME%.kex
|
||||
if exist %NAME%.kex kpack %NAME%.kex
|
||||
if exist %NAME%.kex del kos_make.inc
|
||||
pause
|
Loading…
Reference in New Issue
Block a user