Adapted more structures to use new struct.inc

git-svn-id: svn://kolibrios.org@2384 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
hidnplayr
2012-02-23 18:52:13 +00:00
parent 7ff1f2a29d
commit e7bade16fe
15 changed files with 466 additions and 637 deletions

View File

@@ -14,21 +14,16 @@ $Revision$
button.MAX_BUTTONS = 4095
struc SYS_BUTTON
{
.pslot dw ?
.id_lo dw ?
.left dw ?
.width dw ?
.top dw ?
.height dw ?
.id_hi dw ?
dw ?
.sizeof:
}
virtual at 0
SYS_BUTTON SYS_BUTTON
end virtual
struct SYS_BUTTON
pslot dw ?
id_lo dw ?
left dw ?
width dw ?
top dw ?
height dw ?
id_hi dw ?
dw ?
ends
align 4
;------------------------------------------------------------------------------
@@ -216,18 +211,18 @@ syscall_button.remove_button:
mov edi, [BTN_ADDR]
mov ebx, [edi]
inc ebx
imul esi, ebx, SYS_BUTTON.sizeof
imul esi, ebx, sizeof.SYS_BUTTON
add esi, edi
xor ecx, ecx
add ecx, -SYS_BUTTON.sizeof
add esi, SYS_BUTTON.sizeof
add ecx, -sizeof.SYS_BUTTON
add esi, sizeof.SYS_BUTTON
.next_button:
dec ebx
jz .exit
add ecx, SYS_BUTTON.sizeof
add esi, -SYS_BUTTON.sizeof
add ecx, sizeof.SYS_BUTTON
add esi, -sizeof.SYS_BUTTON
; does it belong to our process?
mov ax, [CURRENT_TASK]
@@ -244,10 +239,10 @@ syscall_button.remove_button:
; okay, undefine it
push ebx
mov ebx, esi
lea eax, [esi + SYS_BUTTON.sizeof]
lea eax, [esi + sizeof.SYS_BUTTON]
call memmove
dec dword[edi]
add ecx, -SYS_BUTTON.sizeof
add ecx, -sizeof.SYS_BUTTON
pop ebx
jmp .next_button
@@ -334,16 +329,16 @@ button._.find_button: ;////////////////////////////////////////////////////////
mov edi, [BTN_ADDR]
mov ecx, [edi]
imul esi, ecx, SYS_BUTTON.sizeof
imul esi, ecx, sizeof.SYS_BUTTON
add esi, edi
inc ecx
add esi, SYS_BUTTON.sizeof
add esi, sizeof.SYS_BUTTON
.next_button:
dec ecx
jz .not_found
add esi, -SYS_BUTTON.sizeof
add esi, -sizeof.SYS_BUTTON
; does it belong to our process?
cmp dx, [esi + SYS_BUTTON.pslot]