Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 5865 → Rev 5864

/kernel/trunk/kernel.asm
2403,7 → 2403,7
.nowindowactivate:
ret
;------------------------------------------------------------------------------
align 4
align 4 ;Fantomer
sysfn_zmodif:
;18,25,1 - get z_modif
;18,25,2 - set z_modif
2413,38 → 2413,41
;1: eax = z_modif
;2: eax=0(fail),1(success) for set z_modif
 
xor eax, eax
 
cmp edx, -1
jne @f
mov edx, [CURRENT_TASK]
@@:
cmp edx, [TASK_COUNT]
ja .fail
ja .exit
cmp edx, 1
je .fail
je .exit
 
mov eax, edx
 
shl edx, 5
 
cmp [edx + CURRENT_TASK + TASKDATA.state], 9
je .fail
je .exit
 
cmp ecx, 1
jnz .set_zmod
 
mov al, [edx + window_data + WDATA.z_modif]
 
jmp .exit
 
align 4
.set_zmod:
cmp ecx, 2
jnz .fail
jnz .exit
 
mov ebx, esi
mov esi, eax
mov eax, esi
mov esi, edx
 
cmp bl, ZPOS_ALWAYS_TOP
jg .fail
cmp al, ZPOS_ALWAYS_TOP
ja .exit
 
mov [edx + window_data + WDATA.z_modif], bl
mov [edx + window_data + WDATA.z_modif], al
 
mov eax, [edx + window_data + WDATA.box.left]
mov ebx, [edx + window_data + WDATA.box.top]
2452,18 → 2455,10
mov edx, [edx + window_data + WDATA.box.height]
add ecx, eax
add edx, ebx
call window._.set_screen
call window._.set_top_wnd
call window._.redraw_top_wnd
 
shl esi, 5
mov [esi + window_data + WDATA.fl_redraw], 1
 
 
mov eax, 1
jmp .exit
.fail:
xor eax, eax
align 4
.exit:
mov [esp+32], eax
ret
/kernel/trunk/docs/sysfuncr.txt
1190,10 → 1190,10
* eax = 1 - успех
 
Константы положения окна относительно других окон:
ZPOS_DESKTOP = -2 - на самом заднем плане
ZPOS_ALWAYS_BACK = -1 - позади всех окон
ZPOS_NORMAL = 0 - обычное
ZPOS_ALWAYS_TOP = 1 - поверх всех окон
ZPOS_ALWAYS_BACK = 1 - позади всех окон
ZPOS_DESKTOP = 2 - на самом заднем плане
ZPOS_ALWAYS_TOP = 3 - поверх всех окон
 
======================================================================
==================== Функция 20 - интерфейс MIDI. ====================
/kernel/trunk/docs/sysfuncs.txt
1189,10 → 1189,10
* eax = 1 - success
 
Constant position of the window relative to other windows:
ZPOS_DESKTOP = -2 - on the background
ZPOS_ALWAYS_BACK = -1 - behind all the windows
ZPOS_NORMAL = 0 - normal
ZPOS_ALWAYS_TOP = 1 - on top of all windows
ZPOS_ALWAYS_BACK = 1 - behind all the windows
ZPOS_DESKTOP = 2 - on the background
ZPOS_ALWAYS_TOP = 3 - on top of all windows
 
======================================================================
==================== Function 20 - MIDI interface. ===================
/kernel/trunk/gui/window.inc
439,7 → 439,12
pop ecx eax
ret
;------------------------------------------------------------------------------
 
iglobal
win_zmodi db ZPOS_DESKTOP,\
ZPOS_ALWAYS_BACK,\
ZPOS_NORMAL,\
ZPOS_ALWAYS_TOP
endg
align 4
;------------------------------------------------------------------------------
calculatescreen: ;/////////////////////////////////////////////////////////////
469,7 → 474,7
 
push edx ecx ebx eax
 
mov dword[esp+10h], ZPOS_DESKTOP
mov dword[esp+14], 0
;--------------------------------------
align 4
.layout:
488,7 → 493,8
test [edi + WDATA.fl_wstate], WSTATE_MINIMIZED
jnz .skip_window
 
mov eax, [esp+10h]
mov eax, [esp+14]
mov al, [eax+win_zmodi]
cmp [edi + WDATA.z_modif], al
jne .skip_window
 
542,9 → 548,9
dec ebp
jnz .next_window
;---------------------------------------------
inc dword[esp+10h]
cmp dword[esp+10h], ZPOS_ALWAYS_TOP
jle .layout
inc dword[esp+14]
cmp dword[esp+14], ZPOS_ALWAYS_TOP
jbe .layout
;---------------------------------------------
mov esi, [TASK_COUNT]
movzx edi, word[WIN_POS + esi * 2]
1006,7 → 1012,7
movzx esi, word[WIN_POS + edi * 2]
call window._.set_screen
 
call window._.set_top_wnd
call window._.set_top_wnd ;Fantomer
 
inc [_display.mask_seqno]
popad
2426,25 → 2432,9
;------------------------------------------------------------------------------
align 4
;------------------------------------------------------------------------------
window._.redraw_top_wnd: ;////////////////////////////////////////////////////////
;------------------------------------------------------------------------------
;? redraw all windows one above the window
;------------------------------------------------------------------------------
;> eax = left
;> ebx = top
;> ecx = right
;> edx = bottom
;> esi = process number
;! corrupted edi
;------------------------------------------------------------------------------
push 0
jmp window._.set_top_wnd.go
 
align 4
;------------------------------------------------------------------------------
window._.set_top_wnd: ;////////////////////////////////////////////////////////
;------------------------------------------------------------------------------
;? call set_screen for all windows one above the window
;? updates all windows one above the window
;------------------------------------------------------------------------------
;> eax = left
;> ebx = top
2453,9 → 2443,13
;> esi = process number
;! corrupted edi
;------------------------------------------------------------------------------
movzx edi, word[WIN_POS + esi * 2]
shl edi, 5
cmp [edi + window_data + WDATA.z_modif], ZPOS_ALWAYS_TOP
jne @f
ret
@@:
 
push 1
.go:
push esi
pushfd
cli
2465,16 → 2459,12
cmp ebp, 1
jbe .exit
 
shl esi, 5
cmp [esi + window_data + WDATA.z_modif], ZPOS_ALWAYS_TOP
je .exit
 
push eax ;for num layout
push edx ecx ebx eax
 
movsx eax, byte [esi + window_data + WDATA.z_modif]
movzx eax, byte [edi + window_data + WDATA.z_modif]
inc eax
mov dword[esp+10h], eax
mov dword[esp+14], eax
;--------------------------------------
align 4
.layout:
2493,7 → 2483,8
test [edi + WDATA.fl_wstate], WSTATE_MINIMIZED
jnz .skip_window
 
mov eax, [esp+10h]
mov eax, [esp+14]
mov al, [eax+win_zmodi]
cmp [edi + WDATA.z_modif], al
jne .skip_window
 
2536,17 → 2527,12
;--------------------------------------
align 4
@@:
cmp dword[esp+32], 0
je .set_fl_redraw
 
push esi
movzx esi, word[WIN_POS + esi * 2]
call window._.set_screen
pop esi
jmp @f
.set_fl_redraw:
 
mov [edi + WDATA.fl_redraw], 1 ;set redraw flag
@@:
;--------------------------------------
align 4
.skip_window:
2554,9 → 2540,9
dec ebp
jnz .next_window
;--------------------------------------
inc dword[esp+10h]
cmp byte[esp+10h], ZPOS_ALWAYS_TOP
jle .layout
inc dword[esp+14]
cmp dword[esp+14], ZPOS_ALWAYS_TOP
jbe .layout
;-------------------------------------
 
pop eax ebx ecx edx
2569,7 → 2555,6
popfd
pop esi
 
add esp, 4 ;dword for 0/1 - set_screen/fl_redraw
ret
 
 
/kernel/trunk/kernel32.inc
76,10 → 76,10
TSTATE_WAITING = 5
TSTATE_FREE = 9
 
ZPOS_DESKTOP = -2
ZPOS_ALWAYS_BACK = -1
ZPOS_NORMAL = 0
ZPOS_ALWAYS_TOP = 1 ;ZPOS_ALWAYS_TOP is always last and has max number!
ZPOS_ALWAYS_BACK = 1
ZPOS_DESKTOP = 2
ZPOS_ALWAYS_TOP = 3 ;ZPOS_ALWAYS_TOP is always last and has max number!
; structures definition
struct WDATA
box BOX