Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 379 → Rev 380

/kernel/trunk/gui/button.inc
167,10 → 167,10
mov edi,[CURRENT_TASK]
shl edi,8
rol eax,16
add ax,word[edi+0x80000+APPDATA.wnd_clientbox.left]
add ax,word[edi+SLOT_BASE+APPDATA.wnd_clientbox.left]
rol eax,16
rol ebx,16
add bx,word[edi+0x80000+APPDATA.wnd_clientbox.top]
add bx,word[edi+SLOT_BASE+APPDATA.wnd_clientbox.top]
rol ebx,16
pop edi
.forced:
503,7 → 503,7
; check that button is at top of windowing stack
 
movzx ebx,word [eax]
movzx ecx,word [0xC000 + ebx * 2]
movzx ecx,word [WIN_STACK + ebx * 2]
cmp ecx,[TASK_COUNT]
jne buttonnewcheck
 
/kernel/trunk/gui/event.inc
116,7 → 116,7
@@:
mov ecx, [CURRENT_TASK]
shl ecx,8
add ecx, PROC_BASE+APP_OBJ_OFFSET
add ecx, SLOT_BASE+APP_OBJ_OFFSET
 
pushfd
cli
173,7 → 173,7
jz .fail
 
shl eax, 8
cmp [PROC_BASE+eax+APPDATA.ev_count], 32
cmp [SLOT_BASE+eax+APPDATA.ev_count], 32
ja .fail
 
mov [slot], eax
189,7 → 189,7
rep movsd
 
mov ecx, [slot]
add ecx, PROC_BASE+APP_EV_OFFSET
add ecx, SLOT_BASE+APP_EV_OFFSET
 
mov [eax+APPOBJ.magic], 'EVNT'
mov [eax+APPOBJ.destroy], destroy_event
219,10 → 219,10
.wait:
mov edx,[CURRENT_TASK]
shl edx,8
; cmp [PROC_BASE+edx+APPDATA.ev_count], 0
; cmp [SLOT_BASE+edx+APPDATA.ev_count], 0
; je .switch
 
add edx, PROC_BASE+APP_EV_OFFSET
add edx, SLOT_BASE+APP_EV_OFFSET
 
mov eax, [edx+APPOBJ.fd]
cmp eax, edx
302,7 → 302,7
 
mov edx,[CURRENT_TASK]
shl edx,8
add edx, PROC_BASE
add edx, SLOT_BASE
 
pushfd
cli ;remove event from events
387,7 → 387,7
jz .done
@@:
shl eax, 8
add eax, PROC_BASE+APP_EV_OFFSET
add eax, SLOT_BASE+APP_EV_OFFSET
 
pushfd
cli
431,7 → 431,7
jz .fail
 
shl eax, 8
add eax, PROC_BASE+APP_EV_OFFSET
add eax, SLOT_BASE+APP_EV_OFFSET
mov edx, [.event]
pushfd
cli ;remove event from events
526,7 → 526,7
test [edi+TASKDATA.event_mask],dword 2
jz no_eventoccur2
mov ecx, [CURRENT_TASK]
movzx edx,word [0xC000+ecx*2]
movzx edx,word [WIN_STACK+ecx*2]
mov eax, [TASK_COUNT]
cmp eax,edx
jne no_eventoccur2x
552,7 → 552,7
cmp [0xf500],byte 0
je no_eventoccur3
mov ecx, [CURRENT_TASK]
movzx edx, word [0xC000+ecx*2]
movzx edx, word [WIN_STACK+ecx*2]
mov eax, [TASK_COUNT]
cmp eax,edx
jnz no_eventoccur3
577,9 → 577,9
jz no_mouse_event
mov eax,[CURRENT_TASK]
shl eax,8
test [eax+0x80000+APPDATA.event_mask],dword 00100000b
test [eax+SLOT_BASE+APPDATA.event_mask],dword 00100000b
jz no_mouse_event
and [eax+0x80000+APPDATA.event_mask],dword 0xffffffff-00100000b
and [eax+SLOT_BASE+APPDATA.event_mask],dword 0xffffffff-00100000b
popad
mov eax,6
ret
601,9 → 601,9
jz no_ipc
mov eax,[CURRENT_TASK]
shl eax,8
test [eax+0x80000+APPDATA.event_mask],dword 01000000b
test [eax+SLOT_BASE+APPDATA.event_mask],dword 01000000b
jz no_ipc
and [eax+0x80000+APPDATA.event_mask],dword 0xffffffff-01000000b
and [eax+SLOT_BASE+APPDATA.event_mask],dword 0xffffffff-01000000b
popad
mov eax,7
ret
615,9 → 615,9
jz no_stack_event
mov eax,[CURRENT_TASK]
shl eax,8
test [eax+0x80000+APPDATA.event_mask],dword 10000000b
test [eax+SLOT_BASE+APPDATA.event_mask],dword 10000000b
jz no_stack_event
and [eax+0x80000+APPDATA.event_mask],dword 0xffffffff-10000000b
and [eax+SLOT_BASE+APPDATA.event_mask],dword 0xffffffff-10000000b
popad
mov eax,8
ret
627,9 → 627,9
jz .test_IRQ
mov eax, [CURRENT_TASK]
shl eax, 8
test byte [eax+0x80000+APPDATA.event_mask+1], byte 1
test byte [eax+SLOT_BASE+APPDATA.event_mask+1], byte 1
jz .test_IRQ
and byte [eax+0x80000+APPDATA.event_mask+1], not 1
and byte [eax+SLOT_BASE+APPDATA.event_mask+1], not 1
popad
mov eax, 9
ret
637,7 → 637,7
;.test_ext:
; mov eax, [CURRENT_TASK]
; shl eax, 8
; test dword [eax+0x80000+APPDATA.event_mask], EVENT_EXTENDED
; test dword [eax+SLOT_BASE+APPDATA.event_mask], EVENT_EXTENDED
; jz .test_IRQ
; popad
; mov eax, 10
/kernel/trunk/gui/mouse.inc
1,9 → 1,7
;mouseunder:
; times 16*24 dd 0
label mouseunder dword at 0x6900
 
iglobal
 
align 4
mousepointer:
db 0x00,0x00,0x00,0x74,0x74,0x74,0x6e,0x6e,0x6e,0x6f
db 0x6f,0x6f,0x71,0x71,0x71,0x75,0x75,0x75,0x79,0x79
/kernel/trunk/gui/window.inc
28,13 → 28,13
pushad
 
xor eax,eax
mov ecx,0xc000
mov ecx,WIN_STACK
@@:
inc eax
add ecx,2
mov [ecx+0x000],ax ; process no
mov [ecx+0x400],ax ; positions in stack
cmp ecx,0xc400-2 ; the more high, the more surface
cmp ecx,WIN_POS-2 ; the more high, the more surface
jnz @b
 
popad
65,7 → 65,7
jbe .finish
align 4
.new_wnd:
movzx edi, word [0xC400 + esi * 2]
movzx edi, word [WIN_POS + esi * 2]
shl edi, 5
 
cmp [CURRENT_TASK+edi+TASKDATA.state], byte 9
108,7 → 108,7
@@:
 
push esi
movzx esi, word [0xC400 + esi * 2]
movzx esi, word [WIN_POS + esi * 2]
call setscreen
pop esi
 
156,9 → 156,9
jz .ret
@@:
; \end{diamond}[29.08.2006]
mov edi, esi ;;;word [esi*2+0xc400]
mov edi, esi ;;;word [esi*2+WIN_POS]
shl edi, 8
add edi, 0x80000 ; address of random shaped window area
add edi, SLOT_BASE ; address of random shaped window area
cmp [edi+APPDATA.wnd_shape], dword 0
jne .free_form
 
912,7 → 912,7
; if type of current active window is 3,
; it must be redrawn
mov eax, [TASK_COUNT]
movzx eax, word [0xC400 + eax*2]
movzx eax, word [WIN_POS + eax*2]
shl eax, 5
add eax, window_data
mov ebx, [eax + WDATA.cl_workarea]
924,7 → 924,7
 
push esi
movzx eax, word [esi] ; ax <- process no
movzx eax, word [0xC000+eax*2] ; ax <- position in window stack
movzx eax, word [WIN_STACK+eax*2] ; ax <- position in window stack
 
xor esi, esi ; drop others
waloop:
931,7 → 931,7
cmp esi, dword [TASK_COUNT]
jae wacont
inc esi
lea edi, [0xC000 + esi*2]
lea edi, [WIN_STACK + esi*2]
mov bx, [edi] ; position of the current process
cmp bx, ax
jbe @f
945,7 → 945,7
 
movzx eax, word [esi]
mov bx, [TASK_COUNT] ; number of processes
mov [0xC000+eax*2], bx ; this is the last (and the upper)
mov [WIN_STACK+eax*2], bx ; this is the last (and the upper)
 
; update on screen -window stack
xor esi, esi
954,8 → 954,8
cmp esi, edi
jae wacont2
inc esi
movzx ebx, word [esi*2 + 0xC000]
mov [ebx*2 + 0xC400], si
movzx ebx, word [esi*2 + WIN_STACK]
mov [ebx*2 + WIN_POS], si
jmp waloop2
wacont2:
mov [0xf400], byte 0 ; empty keyboard buffer
981,8 → 981,8
 
; esi = process number
 
movzx eax, word [0xC000 + esi * 2] ; get value of the curr process
lea esi, [0xC400 + eax * 2] ; get address of this process at 0xC400
movzx eax, word [WIN_STACK + esi * 2] ; get value of the curr process
lea esi, [WIN_POS + eax * 2] ; get address of this process at 0xC400
 
push esi
 
993,7 → 993,7
push esi
 
mov eax, [TASK_COUNT]
lea eax, word [0xC400 + eax * 2] ; number of the upper window
lea eax, word [WIN_POS + eax * 2] ; number of the upper window
 
cmp esi, eax
ja .all_wnds_to_top
1059,7 → 1059,7
; update screen info
pushad
mov edi, [TASK_COUNT] ; the last process (number)
movzx esi, word [0xC400 + edi * 2]
movzx esi, word [WIN_POS + edi * 2]
shl esi, 5
add esi, window_data
 
1073,7 → 1073,7
add edx, ebx ; edx = y_end
 
mov edi, [TASK_COUNT]
movzx esi, word [0xC400 + edi * 2]
movzx esi, word [WIN_POS + edi * 2]
call setscreen
popad
 
1096,7 → 1096,7
; eax = window number on screen
; corrupts registers and [dl*]
minimize_window:
movzx eax, word [0xC400+eax*2]
movzx eax, word [WIN_POS+eax*2]
shl eax, 5
add eax, window_data
test [eax+WDATA.fl_wstate], WSTATE_MINIMIZED
1129,7 → 1129,7
restore_minimized_window:
pushfd
cli
movzx esi, word [0xC400+eax*2]
movzx esi, word [WIN_POS+eax*2]
mov edi, esi
shl edi, 5
add edi, window_data
1200,7 → 1200,7
jb .exit
 
dec esi
movzx edi, word [0xC400 + esi * 2] ; ebx
movzx edi, word [WIN_POS + esi * 2] ; ebx
shl edi, 5
add edi, window_data
; mov edi, ebx
1234,7 → 1234,7
 
; eax = position in windowing stack
; redraw must ?
lea esi, [0xC400 + esi * 2]
lea esi, [WIN_POS + esi * 2]
call waredraw
add esp, 32
 
1413,7 → 1413,7
;shr edx,5
;shl edx,8
;add edx,0x80000 ; process base at 0x80000+
lea edx, [0x80000 + edx*8]
lea edx, [SLOT_BASE + edx*8]
 
movzx eax,word [0xfb0a]
cmp eax,[edi + WDATA.box.left]
1485,7 → 1485,7
@@: sub edi,window_data
shr edi,5
shl edi,8
add edi,0x80000+APPDATA.saved_box
add edi,SLOT_BASE+APPDATA.saved_box
cld
rep movsd
pop ecx edi esi
1499,7 → 1499,7
sub edx,window_data
shr edx,5
shl edx,8
add edx,0x80000 ; process base at 0x80000+
add edx,SLOT_BASE ; process base at 0x80000+
 
cmp [do_resize],2 ; window shade ?
jne no_window_shade
1754,7 → 1754,7
mov eax,[CURRENT_TASK]
shl eax,8
 
mov [eax+0x80000+APPDATA.wnd_shape],ebx
mov [eax+SLOT_BASE+APPDATA.wnd_shape],ebx
rsw_no_address:
 
cmp eax,1
1761,7 → 1761,7
jne rsw_no_scale
mov eax,[CURRENT_TASK]
shl eax,8
mov byte [eax+0x80000+APPDATA.wnd_shape_scale], bl
mov byte [eax+SLOT_BASE+APPDATA.wnd_shape_scale], bl
rsw_no_scale:
 
ret