forked from KolibriOS/kolibrios
changes/improvements in maximize/minimize/rollup windows functionality
added functions: 48/5 - get screen workarea 48/6 - set screen workarea git-svn-id: svn://kolibrios.org@41 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
f4fbaa166e
commit
4442932712
@ -469,6 +469,8 @@ new_start_application_fl:
|
|||||||
mov [ecx+8],eax
|
mov [ecx+8],eax
|
||||||
mov eax,[0xfe04]
|
mov eax,[0xfe04]
|
||||||
mov [ecx+12],eax
|
mov [ecx+12],eax
|
||||||
|
;set window state to 'normal' (non-minimized/maximized/rolled-up) state
|
||||||
|
mov [ecx+WDATA.fl_wstate],WSTATE_NORMAL
|
||||||
;set cr3 register in TSS of application
|
;set cr3 register in TSS of application
|
||||||
mov ecx,[new_process_place]
|
mov ecx,[new_process_place]
|
||||||
shl ecx,8
|
shl ecx,8
|
||||||
|
@ -501,6 +501,10 @@ checkbuttons:
|
|||||||
|
|
||||||
movzx ebx,word [eax+0]
|
movzx ebx,word [eax+0]
|
||||||
shl ebx,5
|
shl ebx,5
|
||||||
|
|
||||||
|
test [ebx+window_data+WDATA.fl_wstate],WSTATE_MINIMIZED
|
||||||
|
jnz buttonnewcheck
|
||||||
|
|
||||||
; add ebx,window_data
|
; add ebx,window_data
|
||||||
; mov ecx,[window_data+ebx+8] ; window end X
|
; mov ecx,[window_data+ebx+8] ; window end X
|
||||||
movzx edx,word [eax+4] ; button start X
|
movzx edx,word [eax+4] ; button start X
|
||||||
|
@ -1,3 +1,29 @@
|
|||||||
|
get_titlebar_height: ; edi = window draw_data pointer
|
||||||
|
mov al,[edi+WDATA.fl_wstyle]
|
||||||
|
and al,0x0F
|
||||||
|
cmp al,0x03
|
||||||
|
jne @f
|
||||||
|
mov eax,[_skinh]
|
||||||
|
ret
|
||||||
|
@@: mov eax,21
|
||||||
|
ret
|
||||||
|
|
||||||
|
get_rolledup_height: ; edi = window draw_data pointer
|
||||||
|
mov al,[edi+WDATA.fl_wstyle]
|
||||||
|
and al,0x0F
|
||||||
|
cmp al,0x03
|
||||||
|
jne @f
|
||||||
|
mov eax,[_skinh]
|
||||||
|
add eax,3
|
||||||
|
ret
|
||||||
|
@@: or al,al
|
||||||
|
jnz @f
|
||||||
|
mov eax,21
|
||||||
|
ret
|
||||||
|
@@: mov eax,21+2
|
||||||
|
ret
|
||||||
|
|
||||||
|
|
||||||
setwindowdefaults:
|
setwindowdefaults:
|
||||||
pushad
|
pushad
|
||||||
|
|
||||||
@ -42,14 +68,14 @@ calculatescreen:
|
|||||||
movzx edi, word [0xC400 + esi * 2]
|
movzx edi, word [0xC400 + esi * 2]
|
||||||
shl edi, 5
|
shl edi, 5
|
||||||
add edi, window_data
|
add edi, window_data
|
||||||
mov eax, [edi+0]
|
test [edi+WDATA.fl_wstate],WSTATE_MINIMIZED
|
||||||
mov ebx, [edi+4]
|
jnz .not_wnd
|
||||||
mov ecx, [edi+8]
|
mov eax,[edi+WDATA.left]
|
||||||
test ecx, ecx
|
mov ebx,[edi+WDATA.top]
|
||||||
jz .not_wnd
|
mov ecx,[edi+WDATA.width]
|
||||||
add ecx, eax
|
add ecx,eax
|
||||||
mov edx, [edi+12]
|
mov edx,[edi+WDATA.height]
|
||||||
add edx, ebx
|
add edx,ebx
|
||||||
push esi
|
push esi
|
||||||
movzx esi, word [0xC400 + esi * 2]
|
movzx esi, word [0xC400 + esi * 2]
|
||||||
call setscreen
|
call setscreen
|
||||||
@ -234,6 +260,14 @@ display_settings:
|
|||||||
; eax = 4 ; get skin height
|
; eax = 4 ; get skin height
|
||||||
; input : nothing
|
; input : nothing
|
||||||
; output : eax = skin height in pixel
|
; output : eax = skin height in pixel
|
||||||
|
; eax = 5 ; get screen workarea
|
||||||
|
; input : nothing
|
||||||
|
; output : eax = [left]*65536+[right]
|
||||||
|
; ebx = [top]*65536+[bottom]
|
||||||
|
; eax = 6 ; set screen workarea
|
||||||
|
; input : ecx = [left]*65536+[right]
|
||||||
|
; edx = [top]*65536+[bottom]
|
||||||
|
; output : nothing
|
||||||
|
|
||||||
|
|
||||||
pushad
|
pushad
|
||||||
@ -245,6 +279,7 @@ display_settings:
|
|||||||
cmp [windowtypechanged],dword 1
|
cmp [windowtypechanged],dword 1
|
||||||
jne dspl00
|
jne dspl00
|
||||||
mov [windowtypechanged],dword 0
|
mov [windowtypechanged],dword 0
|
||||||
|
redraw_screen_direct:
|
||||||
mov [dlx],dword 0
|
mov [dlx],dword 0
|
||||||
mov [dly],dword 0
|
mov [dly],dword 0
|
||||||
mov eax,[0xfe00]
|
mov eax,[0xfe00]
|
||||||
@ -307,6 +342,67 @@ display_settings:
|
|||||||
ret
|
ret
|
||||||
no_skin_height:
|
no_skin_height:
|
||||||
|
|
||||||
|
cmp eax,5 ; get screen workarea
|
||||||
|
jne no_get_workarea
|
||||||
|
popad
|
||||||
|
mov eax,[screen_workarea.left-2]
|
||||||
|
mov ax,word[screen_workarea.right]
|
||||||
|
mov [esp+36],eax
|
||||||
|
mov eax,[screen_workarea.top-2]
|
||||||
|
mov ax,word[screen_workarea.bottom]
|
||||||
|
mov [esp+24],eax
|
||||||
|
ret
|
||||||
|
no_get_workarea:
|
||||||
|
|
||||||
|
cmp eax,6 ; set screen workarea
|
||||||
|
jne no_set_workarea
|
||||||
|
movzx eax,word[esp+16+2]
|
||||||
|
movzx ebx,word[esp+16]
|
||||||
|
cmp eax,[0xFE00]
|
||||||
|
jae .exit
|
||||||
|
cmp ebx,[0xFE00]
|
||||||
|
ja .exit
|
||||||
|
cmp eax,ebx
|
||||||
|
jae .exit
|
||||||
|
mov [screen_workarea.left],eax
|
||||||
|
mov [screen_workarea.right],ebx
|
||||||
|
movzx eax,word[esp+24+2]
|
||||||
|
movzx ebx,word[esp+24]
|
||||||
|
cmp eax,[0xFE04]
|
||||||
|
jae .exit
|
||||||
|
cmp ebx,[0xFE04]
|
||||||
|
ja .exit
|
||||||
|
cmp eax,ebx
|
||||||
|
jae .exit
|
||||||
|
mov [screen_workarea.top],eax
|
||||||
|
mov [screen_workarea.bottom],ebx
|
||||||
|
|
||||||
|
mov ecx,[0x3004]
|
||||||
|
mov esi,0x20*2
|
||||||
|
dec ecx
|
||||||
|
@@: test [esi+WDATA.fl_wstate],WSTATE_MAXIMIZED
|
||||||
|
jz .lp1
|
||||||
|
mov eax,[screen_workarea.left]
|
||||||
|
mov [esi+WDATA.left],eax
|
||||||
|
sub eax,[screen_workarea.right]
|
||||||
|
neg eax
|
||||||
|
mov [esi+WDATA.width],eax
|
||||||
|
mov eax,[screen_workarea.top]
|
||||||
|
mov [esi+WDATA.top],eax
|
||||||
|
test [esi+WDATA.fl_wstate],WSTATE_ROLLEDUP
|
||||||
|
jnz .lp1
|
||||||
|
sub eax,[screen_workarea.bottom]
|
||||||
|
neg eax
|
||||||
|
mov [esi+WDATA.height],eax
|
||||||
|
.lp1: add esi,0x20
|
||||||
|
loop @b
|
||||||
|
call calculatescreen
|
||||||
|
jmp redraw_screen_direct
|
||||||
|
.exit:
|
||||||
|
popad
|
||||||
|
ret
|
||||||
|
no_set_workarea:
|
||||||
|
|
||||||
popad
|
popad
|
||||||
ret
|
ret
|
||||||
|
|
||||||
@ -327,6 +423,9 @@ check_window_move_request:
|
|||||||
shl edi,5
|
shl edi,5
|
||||||
add edi,window_data
|
add edi,window_data
|
||||||
|
|
||||||
|
test [edi+WDATA.fl_wstate],WSTATE_MAXIMIZED
|
||||||
|
jnz window_move_return
|
||||||
|
|
||||||
push dword [edi+0] ; save old coordinates
|
push dword [edi+0] ; save old coordinates
|
||||||
push dword [edi+4]
|
push dword [edi+4]
|
||||||
push dword [edi+8]
|
push dword [edi+8]
|
||||||
@ -345,6 +444,10 @@ check_window_move_request:
|
|||||||
je no_y_reposition
|
je no_y_reposition
|
||||||
mov [edi+4],ebx
|
mov [edi+4],ebx
|
||||||
no_y_reposition:
|
no_y_reposition:
|
||||||
|
|
||||||
|
test [edi+WDATA.fl_wstate],WSTATE_ROLLEDUP
|
||||||
|
jnz no_y_resizing
|
||||||
|
|
||||||
cmp ecx,-1
|
cmp ecx,-1
|
||||||
je no_x_resizing
|
je no_x_resizing
|
||||||
mov [edi+8],ecx
|
mov [edi+8],ecx
|
||||||
@ -984,8 +1087,8 @@ checkwindows:
|
|||||||
movzx edi, word [0xC400 + esi * 2]
|
movzx edi, word [0xC400 + esi * 2]
|
||||||
shl edi, 5
|
shl edi, 5
|
||||||
add edi, window_data
|
add edi, window_data
|
||||||
cmp [edi+12],dword 0
|
test [edi+WDATA.fl_wstate],WSTATE_MINIMIZED
|
||||||
je .mouse_buttons_pressed
|
jnz .mouse_buttons_pressed
|
||||||
; jne .no_activate_request_2
|
; jne .no_activate_request_2
|
||||||
; .no_activate_request_1:
|
; .no_activate_request_1:
|
||||||
; cmp [window_minimize],1
|
; cmp [window_minimize],1
|
||||||
@ -1017,6 +1120,8 @@ checkwindows:
|
|||||||
mov ebx,edx
|
mov ebx,edx
|
||||||
cmp [window_minimize],1
|
cmp [window_minimize],1
|
||||||
jge .window_minimize_no_check_mouse
|
jge .window_minimize_no_check_mouse
|
||||||
|
test [edi+WDATA.fl_wstate],WSTATE_MINIMIZED
|
||||||
|
jnz cwloop
|
||||||
|
|
||||||
movzx eax, word [0xfb0a]
|
movzx eax, word [0xfb0a]
|
||||||
movzx ebx, word [0xfb0c]
|
movzx ebx, word [0xfb0c]
|
||||||
@ -1063,6 +1168,9 @@ checkwindows:
|
|||||||
ret
|
ret
|
||||||
.window_move_enabled_for_user:
|
.window_move_enabled_for_user:
|
||||||
|
|
||||||
|
test [edi+WDATA.fl_wstate],WSTATE_ROLLEDUP
|
||||||
|
jnz .no_resize_2
|
||||||
|
|
||||||
mov [do_resize_from_corner],byte 0 ; resize for skinned window
|
mov [do_resize_from_corner],byte 0 ; resize for skinned window
|
||||||
mov edx, [edi+0x10]
|
mov edx, [edi+0x10]
|
||||||
and edx, 0x0f000000
|
and edx, 0x0f000000
|
||||||
@ -1078,23 +1186,12 @@ checkwindows:
|
|||||||
jmp .continue
|
jmp .continue
|
||||||
.no_resize_2:
|
.no_resize_2:
|
||||||
|
|
||||||
;// mike.dld [
|
push eax
|
||||||
mov dl,[edi+0x10+3]
|
call get_titlebar_height
|
||||||
and dl,0x0F
|
add eax,[edi+4]
|
||||||
cmp dl,0x03
|
cmp ebx,eax
|
||||||
jne @f
|
pop eax
|
||||||
mov edx, [edi+4] ; check if touch on bar
|
jae .exit
|
||||||
add edx, [_skinh]
|
|
||||||
cmp ebx, edx
|
|
||||||
jae .exit
|
|
||||||
jmp .continue
|
|
||||||
@@:
|
|
||||||
;// mike.dld ]
|
|
||||||
|
|
||||||
mov edx, [edi+4] ; check if touch on bar
|
|
||||||
add edx, 21
|
|
||||||
cmp ebx, edx
|
|
||||||
jae .exit
|
|
||||||
|
|
||||||
.continue:
|
.continue:
|
||||||
|
|
||||||
@ -1111,9 +1208,6 @@ checkwindows:
|
|||||||
|
|
||||||
mov cl, [0xfb40] ; save for shade check
|
mov cl, [0xfb40] ; save for shade check
|
||||||
mov [do_resize], cl
|
mov [do_resize], cl
|
||||||
cmp [window_minimize],0
|
|
||||||
je no_emulation_righ_button
|
|
||||||
mov [do_resize], byte 2
|
|
||||||
no_emulation_righ_button:
|
no_emulation_righ_button:
|
||||||
mov ecx, [edi+0]
|
mov ecx, [edi+0]
|
||||||
mov edx, [edi+4]
|
mov edx, [edi+4]
|
||||||
@ -1157,7 +1251,10 @@ checkwindows:
|
|||||||
mov word [npye],ax
|
mov word [npye],ax
|
||||||
pop eax
|
pop eax
|
||||||
|
|
||||||
|
test [edi+WDATA.fl_wstate],WSTATE_MAXIMIZED
|
||||||
|
jnz @f
|
||||||
call drawwindowframes
|
call drawwindowframes
|
||||||
|
@@:
|
||||||
|
|
||||||
mov [reposition],0
|
mov [reposition],0
|
||||||
mov [0xfb44],byte 1 ; no reaction to mouse up/down
|
mov [0xfb44],byte 1 ; no reaction to mouse up/down
|
||||||
@ -1192,7 +1289,10 @@ checkwindows:
|
|||||||
push ax
|
push ax
|
||||||
push bx
|
push bx
|
||||||
|
|
||||||
|
test [edi+WDATA.fl_wstate],WSTATE_MAXIMIZED
|
||||||
|
jnz @f
|
||||||
call drawwindowframes
|
call drawwindowframes
|
||||||
|
@@:
|
||||||
|
|
||||||
mov ax,[0xfe00]
|
mov ax,[0xfe00]
|
||||||
mov bx,[0xfe04]
|
mov bx,[0xfe04]
|
||||||
@ -1245,13 +1345,15 @@ checkwindows:
|
|||||||
mov [npxe],eax
|
mov [npxe],eax
|
||||||
nnepx:
|
nnepx:
|
||||||
|
|
||||||
|
call get_titlebar_height
|
||||||
|
mov ebx,eax
|
||||||
movzx eax,word [0xfb0c]
|
movzx eax,word [0xfb0c]
|
||||||
cmp eax,[edi+4]
|
cmp eax,[edi+4]
|
||||||
jb nnepy
|
jb nnepy
|
||||||
sub eax,[edi+4]
|
sub eax,[edi+4]
|
||||||
cmp eax,23 ; [edx+0x90+12]
|
cmp eax,ebx ; [edx+0x90+12]
|
||||||
jge nnepy2
|
jge nnepy2
|
||||||
mov eax,23 ; [edx+0x90+12]
|
mov eax,ebx ; [edx+0x90+12]
|
||||||
nnepy2:
|
nnepy2:
|
||||||
mov [npye],eax
|
mov [npye],eax
|
||||||
nnepy:
|
nnepy:
|
||||||
@ -1263,7 +1365,10 @@ checkwindows:
|
|||||||
|
|
||||||
pop bx
|
pop bx
|
||||||
pop ax
|
pop ax
|
||||||
|
test [edi+WDATA.fl_wstate],WSTATE_MAXIMIZED
|
||||||
|
jnz @f
|
||||||
call drawwindowframes
|
call drawwindowframes
|
||||||
|
@@:
|
||||||
|
|
||||||
mov esi,[0xfb0a]
|
mov esi,[0xfb0a]
|
||||||
mov [0xf300],esi
|
mov [0xf300],esi
|
||||||
@ -1272,8 +1377,12 @@ checkwindows:
|
|||||||
cmp [0xfb40],byte 0
|
cmp [0xfb40],byte 0
|
||||||
jne newchm
|
jne newchm
|
||||||
; new position done
|
; new position done
|
||||||
call drawwindowframes
|
mov [0xfff5],byte 1
|
||||||
mov [0xfff5],byte 1
|
mov cl,0
|
||||||
|
test [edi+WDATA.fl_wstate],WSTATE_MAXIMIZED
|
||||||
|
jnz @f
|
||||||
|
mov cl,[reposition]
|
||||||
|
call drawwindowframes
|
||||||
|
|
||||||
mov eax,[npx]
|
mov eax,[npx]
|
||||||
mov [edi+0],eax
|
mov [edi+0],eax
|
||||||
@ -1284,6 +1393,8 @@ checkwindows:
|
|||||||
mov eax,[npye]
|
mov eax,[npye]
|
||||||
mov [edi+12],eax
|
mov [edi+12],eax
|
||||||
|
|
||||||
|
@@: mov [reposition],cl
|
||||||
|
|
||||||
cmp [reposition],1 ; save new X and Y start
|
cmp [reposition],1 ; save new X and Y start
|
||||||
jne no_xy_save
|
jne no_xy_save
|
||||||
; <IP 28.08.2004>
|
; <IP 28.08.2004>
|
||||||
@ -1310,67 +1421,40 @@ checkwindows:
|
|||||||
shl edx,8
|
shl edx,8
|
||||||
add edx,0x80000 ; process base at 0x80000+
|
add edx,0x80000 ; process base at 0x80000+
|
||||||
|
|
||||||
|
cmp [window_minimize],0
|
||||||
|
je no_wnd_minimize_restore
|
||||||
|
mov [reposition],1
|
||||||
|
wnd_minimize:
|
||||||
|
cmp [window_minimize],1
|
||||||
|
jne wnd_restore
|
||||||
|
or [edi+WDATA.fl_wstate],WSTATE_MINIMIZED
|
||||||
|
jmp no_wnd_minimize_restore
|
||||||
|
wnd_restore:
|
||||||
|
cmp [window_minimize],2
|
||||||
|
jne no_wnd_minimize_restore
|
||||||
|
and [edi+WDATA.fl_wstate],not WSTATE_MINIMIZED
|
||||||
|
no_wnd_minimize_restore:
|
||||||
|
|
||||||
|
|
||||||
cmp [do_resize],2 ; window shade ?
|
cmp [do_resize],2 ; window shade ?
|
||||||
jb no_window_shade
|
jne no_window_shade
|
||||||
mov [reposition],1
|
mov [reposition],1
|
||||||
|
|
||||||
cmp [window_minimize],1
|
test [edi+WDATA.fl_wstate],WSTATE_ROLLEDUP
|
||||||
jge for_window_minimize
|
jnz wnd_rolldown
|
||||||
cmp [edi+12],dword 23
|
wnd_rollup:
|
||||||
jle window_shade_up
|
or [edi+WDATA.fl_wstate],WSTATE_ROLLEDUP
|
||||||
jmp for_window_shade
|
call get_rolledup_height
|
||||||
for_window_minimize:
|
jmp @f
|
||||||
cmp [edi+12],dword 0
|
wnd_rolldown:
|
||||||
je window_shade_up
|
and [edi+WDATA.fl_wstate],not WSTATE_ROLLEDUP
|
||||||
for_window_shade:
|
mov eax,[edx+0x90+BOX.height]
|
||||||
cmp [window_minimize],0
|
test [edi+WDATA.fl_wstate],WSTATE_MAXIMIZED
|
||||||
je no_window_minimize
|
jz @f
|
||||||
cmp [window_minimize],2
|
mov eax,[screen_workarea.bottom]
|
||||||
je window_minimize_no_shade_full ;window_shade_up
|
sub eax,[screen_workarea.top]
|
||||||
mov [edi+8],dword 0 ;66
|
@@: mov [edi+WDATA.height],eax
|
||||||
mov [edi+12],dword 0 ;279 ; on
|
|
||||||
jmp no_window_shade
|
|
||||||
no_window_minimize:
|
|
||||||
mov [edi+12],dword 23 ; on
|
|
||||||
jmp no_window_shade
|
|
||||||
window_shade_up:
|
|
||||||
cmp [window_minimize],1
|
|
||||||
jge window_minimize_no_shade_full
|
|
||||||
mov eax,[edi+0]
|
|
||||||
add eax,[edi+4]
|
|
||||||
test eax, eax
|
|
||||||
je shade_full
|
|
||||||
push edi
|
|
||||||
lea esi, [edx + 0x90]
|
|
||||||
mov ecx,4
|
|
||||||
cld
|
|
||||||
rep movsd
|
|
||||||
pop edi
|
|
||||||
|
|
||||||
window_minimize_no_shade_full:
|
|
||||||
; mov eax,[edx+0x90] ; off
|
|
||||||
; mov [edi+0],eax
|
|
||||||
; mov eax,[edx+0x94] ; off
|
|
||||||
; mov [edi+4],eax
|
|
||||||
; mov eax,[edx+0x98] ; off
|
|
||||||
; mov [edi+8],eax
|
|
||||||
; mov eax,[edx+0x9C] ; off
|
|
||||||
; mov [edi+12],eax
|
|
||||||
|
|
||||||
push edi
|
|
||||||
lea esi, [edx + 0x90]
|
|
||||||
mov ecx,4
|
|
||||||
cld
|
|
||||||
rep movsd
|
|
||||||
pop edi
|
|
||||||
jmp no_window_shade
|
|
||||||
|
|
||||||
shade_full:
|
|
||||||
; mov eax,[0xfe00]
|
|
||||||
; mov [edi+8],eax
|
|
||||||
mov eax,[0xfe04]
|
|
||||||
sub eax,19
|
|
||||||
mov [edi+12],eax
|
|
||||||
no_window_shade:
|
no_window_shade:
|
||||||
|
|
||||||
cmp [do_resize],1 ; fullscreen/restore ?
|
cmp [do_resize],1 ; fullscreen/restore ?
|
||||||
@ -1378,27 +1462,37 @@ checkwindows:
|
|||||||
cmp [latest_window_touch_delta],dword 50
|
cmp [latest_window_touch_delta],dword 50
|
||||||
jg no_fullscreen_restore
|
jg no_fullscreen_restore
|
||||||
mov [reposition],1
|
mov [reposition],1
|
||||||
mov eax,[edi+12]
|
test [edi+WDATA.fl_wstate],WSTATE_MAXIMIZED
|
||||||
add eax,19
|
jnz restore_from_fullscreen
|
||||||
cmp eax,[0xfe04]
|
or [edi+WDATA.fl_wstate],WSTATE_MAXIMIZED
|
||||||
je restore_from_fullscreen
|
mov eax,[screen_workarea.left]
|
||||||
mov [edi+0],dword 0 ; set fullscreen
|
mov [edi+WDATA.left],eax
|
||||||
mov [edi+4],dword 0
|
sub eax,[screen_workarea.right]
|
||||||
mov eax,[0xfe00]
|
neg eax
|
||||||
mov [edi+8],eax
|
mov [edi+WDATA.width],eax
|
||||||
mov eax,[0xfe04]
|
mov eax,[screen_workarea.top]
|
||||||
sub eax,19
|
mov [edi+WDATA.top],eax
|
||||||
mov [edi+12],eax
|
test [edi+WDATA.fl_wstate],WSTATE_ROLLEDUP
|
||||||
|
jnz @f
|
||||||
|
sub eax,[screen_workarea.bottom]
|
||||||
|
neg eax
|
||||||
|
mov [edi+WDATA.height],eax
|
||||||
|
@@:
|
||||||
jmp no_fullscreen_restore
|
jmp no_fullscreen_restore
|
||||||
restore_from_fullscreen:
|
restore_from_fullscreen:
|
||||||
|
and [edi+WDATA.fl_wstate],not WSTATE_MAXIMIZED
|
||||||
|
push [edi+WDATA.height]
|
||||||
push edi ; restore
|
push edi ; restore
|
||||||
; mov esi,edx
|
|
||||||
; add esi,0x90
|
|
||||||
lea esi, [edx + 0x90]
|
lea esi, [edx + 0x90]
|
||||||
mov ecx,4
|
mov ecx,4
|
||||||
cld
|
cld
|
||||||
rep movsd
|
rep movsd
|
||||||
pop edi
|
pop edi
|
||||||
|
pop eax
|
||||||
|
test [edi+WDATA.fl_wstate],WSTATE_ROLLEDUP
|
||||||
|
jz @f
|
||||||
|
mov [edi+WDATA.height],eax
|
||||||
|
@@:
|
||||||
|
|
||||||
no_fullscreen_restore:
|
no_fullscreen_restore:
|
||||||
|
|
||||||
@ -1452,7 +1546,7 @@ checkwindows:
|
|||||||
|
|
||||||
popad
|
popad
|
||||||
|
|
||||||
mov [edi+31],byte 1 ; mark first as redraw
|
mov [edi+WDATA.fl_redraw],1
|
||||||
mov [0xfff5],byte 1 ; no mouse
|
mov [0xfff5],byte 1 ; no mouse
|
||||||
|
|
||||||
push eax ebx ecx edx
|
push eax ebx ecx edx
|
||||||
@ -1472,7 +1566,7 @@ checkwindows:
|
|||||||
waitre2:
|
waitre2:
|
||||||
mov [0xfff5],byte 1
|
mov [0xfff5],byte 1
|
||||||
call checkidle
|
call checkidle
|
||||||
cmp [edi+31],byte 0
|
cmp [edi+WDATA.fl_redraw],0
|
||||||
jz retwm
|
jz retwm
|
||||||
loop waitre2
|
loop waitre2
|
||||||
|
|
||||||
|
@ -60,20 +60,6 @@ twdw equ (0x3000-window_data)
|
|||||||
|
|
||||||
use16
|
use16
|
||||||
org 0x10000
|
org 0x10000
|
||||||
macro diff16 title,l2
|
|
||||||
{
|
|
||||||
local s,d,l1
|
|
||||||
s = l2
|
|
||||||
display title,': 0x'
|
|
||||||
repeat 8
|
|
||||||
d = 48 + s shr ((8-%) shl 2) and $0F
|
|
||||||
if d > 57
|
|
||||||
d = d + 65-57-1
|
|
||||||
end if
|
|
||||||
display d
|
|
||||||
end repeat
|
|
||||||
display 13,10
|
|
||||||
}
|
|
||||||
jmp start_of_code
|
jmp start_of_code
|
||||||
|
|
||||||
; mike.dld {
|
; mike.dld {
|
||||||
@ -227,7 +213,7 @@ boot_log:
|
|||||||
; begin ealex 04.08.05
|
; begin ealex 04.08.05
|
||||||
; in al,0x61
|
; in al,0x61
|
||||||
; and al,01111111b
|
; and al,01111111b
|
||||||
; out 0x61,al
|
; out 0x61,al
|
||||||
; end ealex 04.08.05
|
; end ealex 04.08.05
|
||||||
.bll1: in al,0x60 ; wait for ESC key press
|
.bll1: in al,0x60 ; wait for ESC key press
|
||||||
cmp al,129
|
cmp al,129
|
||||||
@ -275,7 +261,7 @@ B32:
|
|||||||
; xor eax,eax
|
; xor eax,eax
|
||||||
mov edi,0x80000
|
mov edi,0x80000
|
||||||
mov ecx,(0x90000-0x80000)/4
|
mov ecx,(0x90000-0x80000)/4
|
||||||
; cld
|
; cld
|
||||||
rep stosd
|
rep stosd
|
||||||
|
|
||||||
; CLEAR KERNEL UNDEFINED GLOBALS
|
; CLEAR KERNEL UNDEFINED GLOBALS
|
||||||
@ -304,9 +290,11 @@ B32:
|
|||||||
movzx eax,word [0x2f0000+0x900A] ; X max
|
movzx eax,word [0x2f0000+0x900A] ; X max
|
||||||
dec eax
|
dec eax
|
||||||
mov [0xfe00],eax
|
mov [0xfe00],eax
|
||||||
|
mov [screen_workarea.right],eax
|
||||||
movzx eax,word [0x2f0000+0x900C] ; Y max
|
movzx eax,word [0x2f0000+0x900C] ; Y max
|
||||||
dec eax
|
dec eax
|
||||||
mov [0xfe04],eax
|
mov [0xfe04],eax
|
||||||
|
mov [screen_workarea.bottom],eax
|
||||||
movzx eax,word [0x2f0000+0x9008] ; screen mode
|
movzx eax,word [0x2f0000+0x9008] ; screen mode
|
||||||
mov [0xFE0C],eax
|
mov [0xFE0C],eax
|
||||||
mov eax,[0x2f0000+0x9014] ; Vesa 1.2 bnk sw add
|
mov eax,[0x2f0000+0x9014] ; Vesa 1.2 bnk sw add
|
||||||
@ -404,25 +392,25 @@ B32:
|
|||||||
mov dword [0xFE84], 0xD80000 ; =0x100000*13.5
|
mov dword [0xFE84], 0xD80000 ; =0x100000*13.5
|
||||||
@@:
|
@@:
|
||||||
mov dword [0xFE8C], edi
|
mov dword [0xFE8C], edi
|
||||||
|
|
||||||
;!!!!!!!!!!!!!!!!!!!!!!!!!!
|
;!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||||
include 'detect/disks.inc'
|
include 'detect/disks.inc'
|
||||||
;!!!!!!!!!!!!!!!!!!!!!!!!!!
|
;!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||||
|
|
||||||
; CHECK EXTRA REGION
|
; CHECK EXTRA REGION
|
||||||
; ENABLE PAGING
|
; ENABLE PAGING
|
||||||
mov eax,cr0
|
mov eax,cr0
|
||||||
or eax,0x80000000
|
or eax,0x80000000
|
||||||
mov cr0,eax
|
mov cr0,eax
|
||||||
jmp $+2
|
jmp $+2
|
||||||
mov dword [0xfe80],0x800000
|
mov dword [0xfe80],0x800000
|
||||||
|
|
||||||
;Set base of graphic segment to linear address of LFB
|
;Set base of graphic segment to linear address of LFB
|
||||||
mov eax,[0xfe80] ; set for gs
|
mov eax,[0xfe80] ; set for gs
|
||||||
mov [graph_data_l+2],ax
|
mov [graph_data_l+2],ax
|
||||||
shr eax,16
|
shr eax,16
|
||||||
mov [graph_data_l+4],al
|
mov [graph_data_l+4],al
|
||||||
mov [graph_data_l+7],ah
|
mov [graph_data_l+7],ah
|
||||||
|
|
||||||
; READ RAMDISK IMAGE FROM HD
|
; READ RAMDISK IMAGE FROM HD
|
||||||
|
|
||||||
@ -476,7 +464,7 @@ include 'vmodeld.inc'
|
|||||||
mov edi, 1
|
mov edi, 1
|
||||||
mov eax, 0x00040000
|
mov eax, 0x00040000
|
||||||
call display_number
|
call display_number
|
||||||
|
|
||||||
; CHECK EXTENDED REGION
|
; CHECK EXTENDED REGION
|
||||||
; mov dword [0x80000000],0x12345678
|
; mov dword [0x80000000],0x12345678
|
||||||
; cmp dword [0x80000000],0x12345678
|
; cmp dword [0x80000000],0x12345678
|
||||||
@ -485,9 +473,9 @@ include 'vmodeld.inc'
|
|||||||
; call boot_log
|
; call boot_log
|
||||||
; jmp $
|
; jmp $
|
||||||
;extended_region_found:
|
;extended_region_found:
|
||||||
|
|
||||||
call MEM_Init
|
call MEM_Init
|
||||||
;add 0x800000-0xc00000 area
|
;add 0x800000-0xc00000 area
|
||||||
cmp word [0xfe0c],0x13
|
cmp word [0xfe0c],0x13
|
||||||
jle .less_memory
|
jle .less_memory
|
||||||
mov eax,0x80000000 ;linear address
|
mov eax,0x80000000 ;linear address
|
||||||
@ -498,7 +486,7 @@ include 'vmodeld.inc'
|
|||||||
mov eax,0x80180000 ;linear address
|
mov eax,0x80180000 ;linear address
|
||||||
mov ebx,0x280000 shr 12 ;size in pages (2.5Mb)
|
mov ebx,0x280000 shr 12 ;size in pages (2.5Mb)
|
||||||
mov ecx,0x980000 ;physical address
|
mov ecx,0x980000 ;physical address
|
||||||
.end_first_block:
|
.end_first_block:
|
||||||
call MEM_Add_Heap ;nobody can lock mutex yet
|
call MEM_Add_Heap ;nobody can lock mutex yet
|
||||||
|
|
||||||
call create_general_page_table
|
call create_general_page_table
|
||||||
@ -512,7 +500,7 @@ include 'vmodeld.inc'
|
|||||||
call MEM_Add_Heap
|
call MEM_Add_Heap
|
||||||
;init physical memory manager.
|
;init physical memory manager.
|
||||||
call Init_Physical_Memory_Manager
|
call Init_Physical_Memory_Manager
|
||||||
|
|
||||||
; REDIRECT ALL IRQ'S TO INT'S 0x20-0x2f
|
; REDIRECT ALL IRQ'S TO INT'S 0x20-0x2f
|
||||||
|
|
||||||
mov esi,boot_irqs
|
mov esi,boot_irqs
|
||||||
@ -582,12 +570,12 @@ include 'vmodeld.inc'
|
|||||||
; mov cr4,eax
|
; mov cr4,eax
|
||||||
; fail_fpu:
|
; fail_fpu:
|
||||||
|
|
||||||
;The CPU to this moment should be already in PM,
|
;The CPU to this moment should be already in PM,
|
||||||
;and bit MP of the register cr0 should be installed in 1.
|
;and bit MP of the register cr0 should be installed in 1.
|
||||||
finit ;reset of the FPU (finit, instead of fninit)
|
finit ;reset of the FPU (finit, instead of fninit)
|
||||||
fsetpm ;enable PM of the FPU
|
fsetpm ;enable PM of the FPU
|
||||||
finit ;reset the registers, contents which are still equal RM
|
finit ;reset the registers, contents which are still equal RM
|
||||||
;Now FPU too in PM
|
;Now FPU too in PM
|
||||||
; DETECT DEVICES
|
; DETECT DEVICES
|
||||||
|
|
||||||
mov esi,boot_devices
|
mov esi,boot_devices
|
||||||
@ -728,12 +716,12 @@ finit ;reset the registers, contents which are still equal RM
|
|||||||
cmp al,1
|
cmp al,1
|
||||||
jne no_load_vrr_m
|
jne no_load_vrr_m
|
||||||
mov eax,vrr_m
|
mov eax,vrr_m
|
||||||
xor ebx,ebx ; no parameters
|
xor ebx,ebx ; no parameters
|
||||||
xor edx,edx ; no flags
|
xor edx,edx ; no flags
|
||||||
call start_application_fl
|
call start_application_fl
|
||||||
cmp eax,2 ; if vrr_m app found (PID=2)
|
cmp eax,2 ; if vrr_m app found (PID=2)
|
||||||
je first_app_found
|
je first_app_found
|
||||||
|
|
||||||
no_load_vrr_m:
|
no_load_vrr_m:
|
||||||
mov eax,firstapp
|
mov eax,firstapp
|
||||||
xor ebx,ebx ; no parameters
|
xor ebx,ebx ; no parameters
|
||||||
@ -758,7 +746,7 @@ finit ;reset the registers, contents which are still equal RM
|
|||||||
; wait until 8042 is ready
|
; wait until 8042 is ready
|
||||||
; xor ecx,ecx
|
; xor ecx,ecx
|
||||||
; @@:
|
; @@:
|
||||||
; in al,64h
|
; in al,64h
|
||||||
; and al,00000010b
|
; and al,00000010b
|
||||||
; loopnz @b
|
; loopnz @b
|
||||||
call Wait8042BufferEmpty
|
call Wait8042BufferEmpty
|
||||||
@ -769,7 +757,7 @@ finit ;reset the registers, contents which are still equal RM
|
|||||||
; mov al, 111b
|
; mov al, 111b
|
||||||
; call kb_write
|
; call kb_write
|
||||||
; call kb_read
|
; call kb_read
|
||||||
|
|
||||||
mov al, 0xF3 ; set repeat rate & delay
|
mov al, 0xF3 ; set repeat rate & delay
|
||||||
call kb_write
|
call kb_write
|
||||||
call kb_read
|
call kb_read
|
||||||
@ -791,7 +779,7 @@ finit ;reset the registers, contents which are still equal RM
|
|||||||
|
|
||||||
mov esi,boot_allirqs
|
mov esi,boot_allirqs
|
||||||
call boot_log
|
call boot_log
|
||||||
|
|
||||||
cli ;guarantee forbidance of interrupts.
|
cli ;guarantee forbidance of interrupts.
|
||||||
mov al,0 ; unmask all irq's
|
mov al,0 ; unmask all irq's
|
||||||
out 0xA1,al
|
out 0xA1,al
|
||||||
@ -1181,7 +1169,7 @@ set_variables:
|
|||||||
shr ax,1
|
shr ax,1
|
||||||
mov [0xfb0a],eax
|
mov [0xfb0a],eax
|
||||||
pop eax
|
pop eax
|
||||||
|
|
||||||
mov byte [SB16_Status],0 ; Minazzi Paolo
|
mov byte [SB16_Status],0 ; Minazzi Paolo
|
||||||
mov [display_data-12],dword 1 ; tiled background
|
mov [display_data-12],dword 1 ; tiled background
|
||||||
mov [0xfe88],dword 0x2C0000 ; address of button list
|
mov [0xfe88],dword 0x2C0000 ; address of button list
|
||||||
@ -2064,7 +2052,7 @@ sys_end:
|
|||||||
mov eax,[0x3010]
|
mov eax,[0x3010]
|
||||||
add eax,0xa
|
add eax,0xa
|
||||||
mov [eax],byte 3 ; terminate this program
|
mov [eax],byte 3 ; terminate this program
|
||||||
|
|
||||||
waitterm: ; wait here for termination
|
waitterm: ; wait here for termination
|
||||||
mov eax,5
|
mov eax,5
|
||||||
call delay_hs
|
call delay_hs
|
||||||
@ -2075,7 +2063,7 @@ sys_system:
|
|||||||
cmp eax,1 ; BOOT
|
cmp eax,1 ; BOOT
|
||||||
jnz nosystemboot
|
jnz nosystemboot
|
||||||
mov [0x2f0000+0x9030],byte 0
|
mov [0x2f0000+0x9030],byte 0
|
||||||
for_shutdown_parameter:
|
for_shutdown_parameter:
|
||||||
mov eax,[0x3004]
|
mov eax,[0x3004]
|
||||||
add eax,2
|
add eax,2
|
||||||
mov [shutdown_processes],eax
|
mov [shutdown_processes],eax
|
||||||
@ -2098,7 +2086,7 @@ sys_system:
|
|||||||
shl ebx,5
|
shl ebx,5
|
||||||
mov edx,[ebx+0x3000+4]
|
mov edx,[ebx+0x3000+4]
|
||||||
add ebx,0x3000+0xa
|
add ebx,0x3000+0xa
|
||||||
|
|
||||||
;call MEM_Heap_Lock ;guarantee that process isn't working with heap
|
;call MEM_Heap_Lock ;guarantee that process isn't working with heap
|
||||||
mov [ebx],byte 3 ; clear possible i40's
|
mov [ebx],byte 3 ; clear possible i40's
|
||||||
;call MEM_Heap_UnLock
|
;call MEM_Heap_UnLock
|
||||||
@ -2138,7 +2126,7 @@ sys_system:
|
|||||||
mov [0xff01],edi ; activate
|
mov [0xff01],edi ; activate
|
||||||
xor eax, eax
|
xor eax, eax
|
||||||
ret
|
ret
|
||||||
|
|
||||||
nowindowactivate:
|
nowindowactivate:
|
||||||
|
|
||||||
cmp eax,4 ; GET IDLETIME
|
cmp eax,4 ; GET IDLETIME
|
||||||
@ -2161,7 +2149,7 @@ sys_system:
|
|||||||
jnz nogetactiveprocess
|
jnz nogetactiveprocess
|
||||||
mov eax,[active_process]
|
mov eax,[active_process]
|
||||||
ret
|
ret
|
||||||
nogetactiveprocess:
|
nogetactiveprocess:
|
||||||
cmp eax,8
|
cmp eax,8
|
||||||
jnz nosoundflag
|
jnz nosoundflag
|
||||||
cmp ebx,1
|
cmp ebx,1
|
||||||
@ -2173,7 +2161,7 @@ sys_system:
|
|||||||
jnz nosoundflag
|
jnz nosoundflag
|
||||||
inc byte [sound_flag] ; set sound_flag
|
inc byte [sound_flag] ; set sound_flag
|
||||||
and byte [sound_flag],1 ;
|
and byte [sound_flag],1 ;
|
||||||
ret
|
ret
|
||||||
nosoundflag:
|
nosoundflag:
|
||||||
cmp eax,9 ; system shutdown with param
|
cmp eax,9 ; system shutdown with param
|
||||||
jnz noshutdownsystem
|
jnz noshutdownsystem
|
||||||
@ -2238,14 +2226,14 @@ nogetkey:
|
|||||||
nogetkernel_id:
|
nogetkernel_id:
|
||||||
cmp eax,14 ; sys wait retrace
|
cmp eax,14 ; sys wait retrace
|
||||||
jnz nosys_wait_retrace
|
jnz nosys_wait_retrace
|
||||||
;wait retrace functions
|
;wait retrace functions
|
||||||
sys_wait_retrace:
|
sys_wait_retrace:
|
||||||
mov edx,0x3da
|
mov edx,0x3da
|
||||||
WaitRetrace_loop:
|
WaitRetrace_loop:
|
||||||
in al,dx
|
in al,dx
|
||||||
test al,1000b
|
test al,1000b
|
||||||
jz WaitRetrace_loop
|
jz WaitRetrace_loop
|
||||||
mov [esp+36],dword 0
|
mov [esp+36],dword 0
|
||||||
ret
|
ret
|
||||||
nosys_wait_retrace:
|
nosys_wait_retrace:
|
||||||
cmp eax,15 ; mouse centered
|
cmp eax,15 ; mouse centered
|
||||||
@ -2259,7 +2247,7 @@ no_mouse_centered:
|
|||||||
mov eax,[MEM_FreeSpace]
|
mov eax,[MEM_FreeSpace]
|
||||||
shl eax,2
|
shl eax,2
|
||||||
ret
|
ret
|
||||||
no_get_free_space:
|
no_get_free_space:
|
||||||
cmp eax,17
|
cmp eax,17
|
||||||
jnz no_get_all_space
|
jnz no_get_all_space
|
||||||
mov eax,[0xFE8C]
|
mov eax,[0xFE8C]
|
||||||
@ -2267,23 +2255,28 @@ no_get_free_space:
|
|||||||
; mov eax,[MEM_AllSpace]
|
; mov eax,[MEM_AllSpace]
|
||||||
; shl eax,2
|
; shl eax,2
|
||||||
ret
|
ret
|
||||||
no_get_all_space:
|
no_get_all_space:
|
||||||
|
|
||||||
ret
|
ret
|
||||||
|
uglobal
|
||||||
|
;// mike.dld, 2006-29-01 [
|
||||||
|
screen_workarea RECT
|
||||||
|
;// mike.dld, 2006-29-01 ]
|
||||||
window_minimize db 0
|
window_minimize db 0
|
||||||
sound_flag db 0
|
sound_flag db 0
|
||||||
last_key_press dd 0
|
last_key_press dd 0
|
||||||
keyboard_mode_sys db 0
|
keyboard_mode_sys db 0
|
||||||
|
endg
|
||||||
|
|
||||||
iglobal
|
iglobal
|
||||||
version_inf:
|
version_inf:
|
||||||
db 0,5,2,9 ; version 0.5.2.9
|
db 0,5,2,9 ; version 0.5.2.9
|
||||||
db UID_KOLIBRI
|
db UID_KOLIBRI
|
||||||
db 'Kolibri',0
|
db 'Kolibri',0
|
||||||
version_end:
|
version_end:
|
||||||
endg
|
endg
|
||||||
|
|
||||||
UID_NONE=0
|
UID_NONE=0
|
||||||
UID_MENUETOS=1 ;official
|
UID_MENUETOS=1 ;official
|
||||||
UID_KOLIBRI=2 ;russian
|
UID_KOLIBRI=2 ;russian
|
||||||
|
|
||||||
@ -2337,7 +2330,7 @@ sys_cachetodiskette:
|
|||||||
call save_image
|
call save_image
|
||||||
mov [esp+36],dword 0
|
mov [esp+36],dword 0
|
||||||
cmp [FDC_Status],0
|
cmp [FDC_Status],0
|
||||||
je yes_floppy_save
|
je yes_floppy_save
|
||||||
no_floppy_b_save:
|
no_floppy_b_save:
|
||||||
mov [esp+36],dword 1
|
mov [esp+36],dword 1
|
||||||
yes_floppy_save:
|
yes_floppy_save:
|
||||||
@ -2965,7 +2958,7 @@ type_background_1:
|
|||||||
mov [0xfff4],byte 0
|
mov [0xfff4],byte 0
|
||||||
temp_nobackgr:
|
temp_nobackgr:
|
||||||
ret
|
ret
|
||||||
|
|
||||||
uglobal
|
uglobal
|
||||||
window_move_pr dd 0x0
|
window_move_pr dd 0x0
|
||||||
window_move_eax dd 0x0
|
window_move_eax dd 0x0
|
||||||
@ -3112,7 +3105,7 @@ checkmisc:
|
|||||||
cmp [ctrl_alt_del], 1
|
cmp [ctrl_alt_del], 1
|
||||||
jne nocpustart
|
jne nocpustart
|
||||||
mov eax, cpustring
|
mov eax, cpustring
|
||||||
xor ebx,ebx ; no parameters
|
xor ebx,ebx ; no parameters
|
||||||
xor edx,edx ; no flags
|
xor edx,edx ; no flags
|
||||||
call start_application_fl
|
call start_application_fl
|
||||||
mov [ctrl_alt_del], 0
|
mov [ctrl_alt_del], 0
|
||||||
@ -4576,11 +4569,11 @@ syscall_startapp: ; StartApp
|
|||||||
add ebx,[edi]
|
add ebx,[edi]
|
||||||
noapppar:
|
noapppar:
|
||||||
; call start_application_fl
|
; call start_application_fl
|
||||||
xor edx,edx ; compatibility - flags=0
|
xor edx,edx ; compatibility - flags=0
|
||||||
call new_start_application_fl
|
call new_start_application_fl
|
||||||
mov [esp+36],eax
|
mov [esp+36],eax
|
||||||
ret
|
ret
|
||||||
|
|
||||||
|
|
||||||
align 4
|
align 4
|
||||||
|
|
||||||
@ -4612,7 +4605,7 @@ syscall_starthdapp: ; StartHdApp
|
|||||||
add eax,[edi]
|
add eax,[edi]
|
||||||
add ecx,[edi]
|
add ecx,[edi]
|
||||||
xor ebp,ebp
|
xor ebp,ebp
|
||||||
xor edx,edx ; compatibility - flags=0
|
xor edx,edx ; compatibility - flags=0
|
||||||
call start_application_hd
|
call start_application_hd
|
||||||
mov [esp+36],eax
|
mov [esp+36],eax
|
||||||
ret
|
ret
|
||||||
@ -4951,5 +4944,5 @@ IncludeIGlobals
|
|||||||
endofcode:
|
endofcode:
|
||||||
IncludeUGlobals
|
IncludeUGlobals
|
||||||
uglobals_size = $ - endofcode
|
uglobals_size = $ - endofcode
|
||||||
diff16 "end of kernel code",$
|
diff16 "end of kernel code",0,$
|
||||||
|
|
||||||
|
@ -29,6 +29,96 @@ macro struct_helper name
|
|||||||
|
|
||||||
ends fix } struct_helper name@struct
|
ends fix } struct_helper name@struct
|
||||||
|
|
||||||
|
;// mike.dld, 2006-29-01 [
|
||||||
|
|
||||||
|
; macros definition
|
||||||
|
macro diff16 title,l1,l2
|
||||||
|
{
|
||||||
|
local s,d
|
||||||
|
s = l2-l1
|
||||||
|
display title,': 0x'
|
||||||
|
repeat 8
|
||||||
|
d = 48 + s shr ((8-%) shl 2) and $0F
|
||||||
|
if d > 57
|
||||||
|
d = d + 65-57-1
|
||||||
|
end if
|
||||||
|
display d
|
||||||
|
end repeat
|
||||||
|
display 13,10
|
||||||
|
}
|
||||||
|
|
||||||
|
struc db [a] { common . db a
|
||||||
|
if ~used .
|
||||||
|
display 'not used db: ',`.,13,10
|
||||||
|
end if }
|
||||||
|
struc dw [a] { common . dw a
|
||||||
|
if ~used .
|
||||||
|
display 'not used dw: ',`.,13,10
|
||||||
|
end if }
|
||||||
|
struc dd [a] { common . dd a
|
||||||
|
if ~used .
|
||||||
|
display 'not used dd: ',`.,13,10
|
||||||
|
end if }
|
||||||
|
struc dp [a] { common . dp a
|
||||||
|
if ~used .
|
||||||
|
display 'not used dp: ',`.,13,10
|
||||||
|
end if }
|
||||||
|
struc dq [a] { common . dq a
|
||||||
|
if ~used .
|
||||||
|
display 'not used dq: ',`.,13,10
|
||||||
|
end if }
|
||||||
|
struc dt [a] { common . dt a
|
||||||
|
if ~used .
|
||||||
|
display 'not used dt: ',`.,13,10
|
||||||
|
end if }
|
||||||
|
|
||||||
|
; constants definition
|
||||||
|
WSTATE_NORMAL = 00000000b
|
||||||
|
WSTATE_MAXIMIZED = 00000001b
|
||||||
|
WSTATE_MINIMIZED = 00000010b
|
||||||
|
WSTATE_ROLLEDUP = 00000100b
|
||||||
|
|
||||||
|
; structures definition
|
||||||
|
struc WDATA {
|
||||||
|
.left dd ?
|
||||||
|
.top dd ?
|
||||||
|
.width dd ?
|
||||||
|
.height dd ?
|
||||||
|
.cl_workarea dd ?
|
||||||
|
.cl_titlebar dd ?
|
||||||
|
.cl_frames dd ?
|
||||||
|
.reserved db ?
|
||||||
|
.fl_wstate db ?
|
||||||
|
.fl_wdrawn db ?
|
||||||
|
.fl_redraw db ?
|
||||||
|
}
|
||||||
|
virtual at 0
|
||||||
|
WDATA WDATA
|
||||||
|
end virtual
|
||||||
|
label WDATA.fl_wstyle byte at 0x13 ; WDATA.cl_workarea+3
|
||||||
|
|
||||||
|
struc RECT {
|
||||||
|
.left dd ?
|
||||||
|
.top dd ?
|
||||||
|
.right dd ?
|
||||||
|
.bottom dd ?
|
||||||
|
}
|
||||||
|
virtual at 0
|
||||||
|
RECT RECT
|
||||||
|
end virtual
|
||||||
|
|
||||||
|
struc BOX {
|
||||||
|
.left dd ?
|
||||||
|
.top dd ?
|
||||||
|
.width dd ?
|
||||||
|
.height dd ?
|
||||||
|
}
|
||||||
|
virtual at 0
|
||||||
|
BOX BOX
|
||||||
|
end virtual
|
||||||
|
|
||||||
|
;// mike.dld, 2006-29-01 ]
|
||||||
|
|
||||||
|
|
||||||
; Core functions
|
; Core functions
|
||||||
include "core/sync.inc"
|
include "core/sync.inc"
|
||||||
|
@ -599,7 +599,9 @@ vesa20_drawbar:
|
|||||||
mov [drbar.color], edi
|
mov [drbar.color], edi
|
||||||
|
|
||||||
sub edx, ebx
|
sub edx, ebx
|
||||||
|
jle .exit ;// mike.dld, 2005-01-29
|
||||||
sub ecx, eax
|
sub ecx, eax
|
||||||
|
jle .exit ;// mike.dld, 2005-01-29
|
||||||
mov [drbar.bar_sy], edx
|
mov [drbar.bar_sy], edx
|
||||||
mov [drbar.bar_sx], ecx
|
mov [drbar.bar_sx], ecx
|
||||||
|
|
||||||
@ -616,6 +618,7 @@ vesa20_drawbar:
|
|||||||
mov ebx, [edi-twdw + 8] ; ebx = wnd_sx
|
mov ebx, [edi-twdw + 8] ; ebx = wnd_sx
|
||||||
sub ebx, [drbar.bar_cx]
|
sub ebx, [drbar.bar_cx]
|
||||||
ja @f
|
ja @f
|
||||||
|
.exit: ;// mike.dld, 2005-01-29
|
||||||
add esp, drbar.stack_data
|
add esp, drbar.stack_data
|
||||||
popad
|
popad
|
||||||
xor eax, eax
|
xor eax, eax
|
||||||
|
Loading…
Reference in New Issue
Block a user