/programs/bcc32/examples/window/hello_cpp.bat |
---|
File deleted |
Property changes: |
Deleted: svn:executable |
-* |
\ No newline at end of property |
/programs/bcc32/examples/window/hello.cpp |
---|
File deleted |
Property changes: |
Deleted: svn:executable |
-* |
\ No newline at end of property |
/programs/bcc32/examples/window/Makefile |
---|
14,6 → 14,6 |
KOS32_BCC:=/home/autobuild/borlandcpp/bin |
# Filename without .cpp |
FILENAME:=hello |
FILENAME:=window |
include $(SVN_BCC32)/Makefile_app |
/programs/bcc32/examples/window/window.cpp |
---|
0,0 → 1,39 |
#include <kolibri.h> |
#include <kos_heap.h> |
#include <kos_file.h> |
using namespace Kolibri; |
const char header[] = "Title"; |
const char string[] = "Exit"; |
bool KolibriOnStart(TStartData &kos_start, TThreadData th) |
{ |
kos_start.Left = 10; |
kos_start.Top = 40; |
kos_start.Width = 150; |
kos_start.Height = 80; |
kos_start.WinData.WindowColor = 0xFFFFFF; |
kos_start.WinData.Title = header; |
return true; |
} |
void KolibriOnPaint(void) |
{ |
DrawButton(2,0xB0B0B0, 10,10,50,20); |
DrawText(15, 15, 0, string); |
} |
bool KolibriOnClose(TThreadData th) |
{ |
return true; |
} |
int KolibriOnIdle(TThreadData th) |
{ |
return -1; |
} |
void KolibriOnSize(int window_rect[], TThreadData th) {} |
void KolibriOnKeyPress(TThreadData th) |
{ |
GetKey(); |
} |
void KolibriOnMouse(TThreadData th) {} |
Property changes: |
Added: svn:executable |
+* |
\ No newline at end of property |
/programs/bcc32/examples/window/window_cpp.bat |
---|
0,0 → 1,10 |
kos32-bcc -S -v- -R- -6 -a4 -O2 -Og -Oi -Ov -OS -k- -D__KOLIBRI__ -I..\..\..\bcc32\include window.cpp |
echo STACKSIZE equ 102400 \n HEAPSIZE equ 102400 \n include "..\..\..\proc32.inc" \ninclude "..\..\..\bcc32\include\kos_start.inc" \n include "..\..\..\bcc32\include\kos_func.inc" \n include "..\..\..\bcc32\include\kos_heap.inc" > kos_make.inc |
echo include "kos_make.inc" > f_window.asm |
t2fasm < window.asm >> f_window.asm |
fasm f_window.asm window.kex |
kpack window.kex |
del kos_make.inc |
pause |
Property changes: |
Added: svn:executable |
+* |
\ No newline at end of property |
/programs/bcc32/include/kolibri.h |
---|
37,6 → 37,7 |
// Note: pass only thread data of current thread as (thread_data) parameter to these functions. |
void Main(); // Main function is called at program startup. |
void DrawButton(long id, long color, long x, long y, long c_x, long c_y); // Draw Standard button |
void* ThreadMain(void *user = 0, void *stack_begin = 0); |
// Called at thread startup, (user) is placed in thread data as a user dword, |
//_ (stack_begin) is placed in thread data as a stack beginning. |
/programs/bcc32/include/kos_func.inc |
---|
485,6 → 485,20 |
ret |
endp |
proc @Kolibri@DrawButton$qllllll uses ebx esi |
mov eax,8 |
mov ebx,[esp+12+8] |
shl ebx,16 |
mov bx,[esp+20+8] |
mov ecx,[esp+16+8] |
shl ecx,16 |
mov cx,[esp+24+8] |
mov edx,[esp+4+8] |
mov esi,[esp+8+8] |
int 0x40 |
ret |
endp |
proc @Kolibri@GetTime$qpi |
mov eax,3 |
int 0x40 |