mirror of
https://github.com/KolibriOS/kolibrios.git
synced 2024-11-23 17:29:37 +03:00
Add button to example and includes (BCC)
git-svn-id: svn://kolibrios.org@8153 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
10c141ffd3
commit
9c0ca4f346
@ -14,6 +14,6 @@ INCLUDE:=$(SVN_BCC32)/include
|
||||
KOS32_BCC:=/home/autobuild/borlandcpp/bin
|
||||
|
||||
# Filename without .cpp
|
||||
FILENAME:=hello
|
||||
FILENAME:=window
|
||||
|
||||
include $(SVN_BCC32)/Makefile_app
|
||||
|
@ -5,7 +5,7 @@
|
||||
using namespace Kolibri;
|
||||
|
||||
const char header[] = "Title";
|
||||
const char string[] = "Text";
|
||||
const char string[] = "Exit";
|
||||
|
||||
bool KolibriOnStart(TStartData &kos_start, TThreadData th)
|
||||
{
|
||||
@ -20,7 +20,8 @@ bool KolibriOnStart(TStartData &kos_start, TThreadData th)
|
||||
|
||||
void KolibriOnPaint(void)
|
||||
{
|
||||
DrawText(10, 10, 0, string);
|
||||
DrawButton(2,0xB0B0B0, 10,10,50,20);
|
||||
DrawText(15, 15, 0, string);
|
||||
}
|
||||
bool KolibriOnClose(TThreadData th)
|
||||
{
|
@ -1,10 +1,10 @@
|
||||
kos32-bcc -S -v- -R- -6 -a4 -O2 -Og -Oi -Ov -OS -k- -D__KOLIBRI__ -I..\..\..\bcc32\include hello.cpp
|
||||
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_hello.asm
|
||||
t2fasm < hello.asm >> f_hello.asm
|
||||
fasm f_hello.asm hello.kex
|
||||
kpack hello.kex
|
||||
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
|
@ -37,6 +37,7 @@ namespace Kolibri // All kolibri functions, types and data are nested in the (
|
||||
// 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.
|
||||
|
@ -485,6 +485,20 @@ proc @Kolibri@GetPackedTime$qv
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user