forked from KolibriOS/kolibrios
6cdf720037
1) Transfer of parameters to functions of library is copied on the convention stdcall. 2) Now functions link on names. 3)Now, if to guide the mouse on a component and to press the left button of the mouse all messages from the mouse are sent only to this component.If to release(let off) the left button of the mouse messages from the mouse again become accessible to all components. 4) In library new functions are added. int Version (void) - to receive the version of library. The version comes back in a format: year + month + day. The current library has version 71014. void RemoveComponent (void *Control, int new_x, int new_y) - moves a component to new coordinates. void ResizeComponent (void *Control, int new_sizex, int new_sizey) - changes the size of a component. Examples of use of these functions look in example Bookmark. 5) The example of work with libGUI in programming language C is added. This example is a part of the interface written by me for my scientific program. git-svn-id: svn://kolibrios.org@648 a494cfbc-eb01-0410-851d-a64ba20cac60
131 lines
1.9 KiB
PHP
131 lines
1.9 KiB
PHP
macro debug_print str
|
|
{
|
|
local ..string, ..label
|
|
|
|
jmp ..label
|
|
..string db str,0
|
|
..label:
|
|
|
|
pushf
|
|
pushad
|
|
mov edx,..string
|
|
call debug_outstr
|
|
popad
|
|
popf
|
|
}
|
|
|
|
dps fix debug_print
|
|
|
|
macro debug_print_dec arg
|
|
{
|
|
pushf
|
|
pushad
|
|
if ~arg eq eax
|
|
mov eax,arg
|
|
end if
|
|
call debug_outdec
|
|
popad
|
|
popf
|
|
}
|
|
|
|
dpd fix debug_print_dec
|
|
|
|
;---------------------------------
|
|
debug_outdec: ;(eax - num, edi-str)
|
|
push 10 ;2
|
|
pop ecx ;1
|
|
push -'0' ;2
|
|
.l0:
|
|
xor edx,edx ;2
|
|
div ecx ;2
|
|
push edx ;1
|
|
test eax,eax ;2
|
|
jnz .l0 ;2
|
|
.l1:
|
|
pop eax ;1
|
|
add al,'0' ;2
|
|
call debug_outchar ; stosb
|
|
jnz .l1 ;2
|
|
ret ;1
|
|
;---------------------------------
|
|
|
|
debug_outchar: ; al - char
|
|
pushf
|
|
pushad
|
|
mov cl,al
|
|
mov eax,63
|
|
mov ebx,1
|
|
int 0x40
|
|
popad
|
|
popf
|
|
ret
|
|
|
|
debug_outstr:
|
|
mov eax,63
|
|
mov ebx,1
|
|
@@:
|
|
mov cl,[edx]
|
|
test cl,cl
|
|
jz @f
|
|
int 40h
|
|
inc edx
|
|
jmp @b
|
|
@@:
|
|
ret
|
|
|
|
|
|
macro newline
|
|
{
|
|
dps <13,10>
|
|
}
|
|
|
|
macro print message
|
|
{
|
|
dps message
|
|
newline
|
|
}
|
|
|
|
macro pregs
|
|
{
|
|
dps "EAX: "
|
|
dpd eax
|
|
dps " EBX: "
|
|
dpd ebx
|
|
newline
|
|
dps "ECX: "
|
|
dpd ecx
|
|
dps " EDX: "
|
|
dpd edx
|
|
newline
|
|
}
|
|
|
|
macro debug_print_hex arg
|
|
{
|
|
pushf
|
|
pushad
|
|
if ~arg eq eax
|
|
mov eax, arg
|
|
end if
|
|
call debug_outhex
|
|
popad
|
|
popf
|
|
}
|
|
dph fix debug_print_hex
|
|
|
|
debug_outhex:
|
|
; eax - number
|
|
mov edx, 8
|
|
.new_char:
|
|
rol eax, 4
|
|
movzx ecx, al
|
|
and cl, 0x0f
|
|
mov cl, [__hexdigits + ecx]
|
|
pushad
|
|
mcall 63, 1
|
|
popad
|
|
dec edx
|
|
jnz .new_char
|
|
ret
|
|
|
|
__hexdigits:
|
|
db '0123456789ABCDEF' |