Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 32 → Rev 33

/kernel/trunk/gui/button.inc
532,7 → 532,6
 
call checkidle
 
call check_mouse_data
call [draw_pointer]
 
pushad
553,7 → 552,6
afterbuttonid:
 
pusha
mov eax,[buttonid]
; mouse x >= button x ?
movzx ebx,word [eax+0]
shl ebx,5
600,5 → 598,5
pop ebx
popa
ret
 
;..................................... end 2/2 : modified by vhanla ................................
 
/kernel/trunk/gui/skincode.inc
170,28 → 170,76
mov edi, eax
mov esi, 0x90000
call bmp2raw
mov eax, [0x90000+bmp_header.height]
mov [_skinh], eax
popad
 
ret
 
; mov eax, [0x90000+bmp_header.height]
; imul eax, [0x90000+bmp_header.width]
; imul eax, 3
; add eax, raw_data ; now eax points to the last line of image
load_default_skin_1:
pushad
mov eax, _fileleft_1
call load_bmp_file
mov eax, [0x90000+bmp_header.width]
mov [_skinleftw], eax
mov [_skinleft_1], 0
mov edi, raw_data+1000h
mov [_refleft_1], edi
mov esi, 0x90000
call bmp2raw
mov eax, [_bmp_bpl]
imul eax, [0x90000+bmp_header.height]
push eax
 
; mov ecx, [eax]
; mov [_coloroutborder], ecx
; mov [_colorborder], ecx
; sub eax, 2*3
; mov ecx, [eax]
; mov [_colorframe], ecx
mov eax, _filebase_1
call load_bmp_file
mov eax, [0x90000+bmp_header.width]
mov [_skinbasew], eax
mov eax, [_skinleftw]
mov [_skinbase], eax
pop eax
add eax, [_refleft_1]
; align to 32-byte boundary
test eax, 11111b
jz @f
shr eax, 5
inc eax
shl eax, 5
@@:
; save base address
mov [_refbase_1], eax
; convert
mov edi, eax
mov esi, 0x90000
call bmp2raw
mov eax, [_bmp_bpl]
imul eax, [0x90000+bmp_header.height]
push eax
 
 
mov eax, _fileoper_1
call load_bmp_file
mov eax, [0x90000+bmp_header.width]
mov [_skinoperw], eax
neg eax
mov [_skinoper], eax
pop eax
add eax, [_refbase_1]
; align to 32-byte boundary
test eax, 11111b
jz @f
shr eax, 5
inc eax
shl eax, 5
@@:
mov [_refoper_1], eax
mov edi, eax
mov esi, 0x90000
call bmp2raw
mov eax, [0x90000+bmp_header.height]
mov [_skinh], eax
popad
ret
 
 
 
drawwindow_IV:
 
pusha
241,7 → 289,15
mov ecx,[_skinleftw]
shl ecx,16
add ecx,[_skinh]
 
cmp [aw_yes],1
; cmp [esp+32+4+2], word 1
jne @f
mov ebx,[_refleft]
jmp no_aw_3
@@:
mov ebx,[_refleft_1]
no_aw_3:
call sys_putimage
 
mov esi,[esp]
256,7 → 312,14
 
inc eax
 
cmp [aw_yes],1
; cmp [esp+32+4+2], word 1
jne @f
mov ebx,[_refbase]
jmp no_aw_2
@@:
mov ebx,[_refbase_1]
no_aw_2:
mov ecx,[_skinbasew]
shl ecx,16
add ecx,[_skinh]
281,7 → 344,14
sub edx,[_skinoperw]
inc edx
shl edx,16
cmp [aw_yes],1
; cmp [esp+32+4+2], word 1
jne @f
mov ebx,[_refoper]
jmp no_aw_1
@@:
mov ebx,[_refoper_1]
no_aw_1:
mov ecx,[_skinoperw]
shl ecx,16
add ecx,[_skinh]
383,6 → 453,7
 
add esp,4
popa
 
ret
 
 
/kernel/trunk/gui/skindata.inc
32,6 → 32,9
_fileleft db 'LEFT.BMP '
_filebase db 'BASE.BMP '
_fileoper db 'OPER.BMP '
_fileleft_1 db 'LEFT_1.BMP '
_filebase_1 db 'BASE_1.BMP '
_fileoper_1 db 'OPER_1.BMP '
endg
 
uglobal
39,6 → 42,10
_refbase dd 0
_refleft dd 0
_skinleft dd 0
_skinwinw dd 0
; _skinwinw dd 0
_refoper_1 dd 0
_refbase_1 dd 0
_refleft_1 dd 0
_skinleft_1 dd 0
endg
 
/kernel/trunk/gui/window.inc
401,7 → 401,6
 
mov ecx,10 ; wait 1/10 second
wmrl3:
call check_mouse_data
call [draw_pointer]
mov eax,1
call delay_hs
722,7 → 721,6
; esi = abs mem position in stack 0xC400+
 
pushad
 
push esi
movzx eax, word [esi] ; ax <- process no
movzx eax, word [0xC000+eax*2] ; ax <- position in window stack
749,7 → 747,22
mov [0xC000+eax*2], bx ; this is the last (and the upper)
 
;* start code - get active process (4) - Mario79
cli
cmp [active_process_flag],1
jne @f
mov [active_process_flag],0
jmp end_save_active_process
@@:
call save_active_process_stack
end_save_active_process:
mov [active_process],eax
push eax
mov eax,[active_process]
shl eax,5
add eax,0x3000
mov [eax-twdw+31],byte 1
pop eax
sti
;* end code - get active process (4) - Mario79
 
; update on screen -window stack
763,10 → 776,8
mov [ebx*2 + 0xC400], si
jmp waloop2
wacont2:
 
mov [0xf400], byte 0 ; empty keyboard buffer
mov [0xf500], byte 0 ; empty button buffer
 
popad
ret
 
902,8 → 913,8
.waitflagdown:
dec ecx
jz .nowait
mov eax, 2
call delay_hs
; mov eax, 2
; call delay_hs
cmp [edi+31], byte 0 ; wait flag to drop
jnz .waitflagdown
.nowait:
950,8 → 961,8
call waredraw
 
;* start code - get active process (2) - Mario79
mov eax,[0xff01]
mov [active_process],eax
; mov eax,[0xff01]
; mov [active_process],eax
;* end code - get active process (2) - Mario79
 
mov [0xff01],dword 0 ; activated
1163,7 → 1174,6
 
mov [0xfff4],byte 0
 
call check_mouse_data
call [draw_pointer]
 
pushad
1460,7 → 1470,6
 
mov ecx,100 ; wait to avoid mouse residuals
waitre2:
call check_mouse_data
mov [0xfff5],byte 1
call checkidle
cmp [edi+31],byte 0