Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 2383 → Rev 2384

/kernel/trunk/gui/button.inc
14,21 → 14,16
 
button.MAX_BUTTONS = 4095
 
struc SYS_BUTTON
{
.pslot dw ?
.id_lo dw ?
.left dw ?
.width dw ?
.top dw ?
.height dw ?
.id_hi dw ?
struct 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
ends
 
align 4
;------------------------------------------------------------------------------
216,18 → 211,18
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
; 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
 
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]