F18.23 - minimize all windows

git-svn-id: svn://kolibrios.org@2648 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Marat Zakiyanov (Mario79) 2012-04-26 14:21:46 +00:00
parent 1b604d2521
commit 0d4cc5f003
4 changed files with 84 additions and 8 deletions

View File

@ -1108,6 +1108,18 @@ dd 1675
* ‚®ááâ ­®¢«¥­¨¥ ®ª­  á ®¤­®¢à¥¬¥­­®©  ªâ¨¢¨§ æ¨¥© ®áãé¥á⢫ï¥âáï * ‚®ááâ ­®¢«¥­¨¥ ®ª­  á ®¤­®¢à¥¬¥­­®©  ªâ¨¢¨§ æ¨¥© ®áãé¥á⢫ï¥âáï
¯®¤ä㭪樨 3 (¯à¨­¨¬ î饩 ­®¬¥à á«®â ). ¯®¤ä㭪樨 3 (¯à¨­¨¬ î饩 ­®¬¥à á«®â ).
======================================================================
======= ”γ­<CEB3>ζ¨ο 18, ―®¤δγ­<CEB3>ζ¨ο 23 - ¬¨­¨¬¨§¨ΰ®Ά βμ Άα¥ ®<>­ . =========
======================================================================
<EFBFBD> ΰ ¬¥βΰλ:
* eax = 18 - ­®¬¥ΰ δγ­<CEB3>樨
* ebx = 23 - ­®¬¥ΰ ―®¤δγ­<CEB3>樨
‚®§Άΰ ι ¥¬®¥ §­ η¥­¨¥:
* eax = 0 - Άα¥ ®<>­  ΅λ«¨ ¬¨­¨¬¨§¨ΰ®Ά ­λ ¤® Άλ§®Ά  δγ­<CEB3>樨
* eax = N - <20>®«¨η¥αβΆ® ®<>®­ αΆ¥ΰ­γβλε δγ­<CEB3>樥©
‡ ¬¥η ­¨ο:
* <20><>­  α―¥ζ. ―®β®<CEB2>®Ά (¨¬ο ­ η¨­ ¥βαο α ᨬΆ®«  @) ­¥ αΆ®ΰ η¨Ά ξβαο.
====================================================================== ======================================================================
==================== ”ã­ªæ¨ï 20 - ¨­â¥à䥩á MIDI. ==================== ==================== ”ã­ªæ¨ï 20 - ¨­â¥à䥩á MIDI. ====================
====================================================================== ======================================================================

View File

@ -1108,6 +1108,18 @@ Remarks:
* One can restore and activate window simultaneously with * One can restore and activate window simultaneously with
subfunction 3 (which requires slot number). subfunction 3 (which requires slot number).
======================================================================
======== Function 18, subfunction 23 - minimize all windows. ==========
======================================================================
Parameters:
* eax = 18 - function number
* ebx = 23 - subfunction number
Returned value:
* eax = 0 - all windows have been minimized before a function call
* eax = N - number of windows minimized from function
Remarks:
* Window of special thread (name begin to symbol @) is not minimize.
====================================================================== ======================================================================
==================== Function 20 - MIDI interface. =================== ==================== Function 20 - MIDI interface. ===================
====================================================================== ======================================================================

View File

@ -1026,6 +1026,55 @@ align 4
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
align 4 align 4
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
minimize_all_window:
push ebx ecx edx esi edi
pushfd
cli
xor edx, edx
mov eax, 2 ; we do not minimize the kernel thread N1
mov ebx, [TASK_COUNT]
;--------------------------------------
align 4
.loop:
movzx edi, word[WIN_POS + eax * 2]
shl edi, 5
; it is a unused slot?
cmp dword [edi+CURRENT_TASK+TASKDATA.state], 9
je @f
; it is a hidden thread?
lea esi, [edi*8+SLOT_BASE+APPDATA.app_name]
cmp [esi], byte '@'
je @f
; is it already minimized?
test [edi + window_data+WDATA.fl_wstate], WSTATE_MINIMIZED
jnz @f
; no it's not, let's do that
or [edi + window_data+WDATA.fl_wstate], WSTATE_MINIMIZED
inc edx
;--------------------------------------
align 4
@@:
inc eax
cmp eax, ebx
jbe .loop
; If nothing has changed
test edx, edx
jz @f
push edx
call syscall_display_settings._.calculate_whole_screen
call syscall_display_settings._.redraw_whole_screen
pop edx
;--------------------------------------
align 4
@@:
mov eax, edx
popfd
pop edi esi edx ecx ebx
ret
;------------------------------------------------------------------------------
align 4
;------------------------------------------------------------------------------
minimize_window: ;///////////////////////////////////////////////////////////// minimize_window: ;/////////////////////////////////////////////////////////////
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
;> eax = window number on screen ;> eax = window number on screen

View File

@ -2054,6 +2054,7 @@ sys_system_table:
dd sysfn_meminfo ; 20 = get extended memory info dd sysfn_meminfo ; 20 = get extended memory info
dd sysfn_pid_to_slot ; 21 = get slot number for pid dd sysfn_pid_to_slot ; 21 = get slot number for pid
dd sysfn_min_rest_window ; 22 = minimize and restore any window dd sysfn_min_rest_window ; 22 = minimize and restore any window
dd sysfn_min_windows ; 23 = minimize all windows
sysfn_num = ($ - sys_system_table)/4 sysfn_num = ($ - sys_system_table)/4
endg endg
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
@ -2359,20 +2360,19 @@ sysfn_getfreemem:
shl eax, 2 shl eax, 2
mov [esp+32], eax mov [esp+32], eax
ret ret
;------------------------------------------------------------------------------
sysfn_getallmem: sysfn_getallmem:
mov eax, [MEM_AMOUNT] mov eax, [MEM_AMOUNT]
shr eax, 10 shr eax, 10
mov [esp+32], eax mov [esp+32], eax
ret ret
;------------------------------------------------------------------------------
; // Alver, 2007-22-08 // {
sysfn_pid_to_slot: sysfn_pid_to_slot:
mov eax, ecx mov eax, ecx
call pid_to_slot call pid_to_slot
mov [esp+32], eax mov [esp+32], eax
ret ret
;------------------------------------------------------------------------------
sysfn_min_rest_window: sysfn_min_rest_window:
pushad pushad
mov eax, edx ; ebx - operating mov eax, edx ; ebx - operating
@ -2403,12 +2403,15 @@ sysfn_min_rest_window:
dec eax dec eax
mov [esp+32], eax mov [esp+32], eax
ret ret
; } \\ Alver, 2007-22-08 \\ ;------------------------------------------------------------------------------
sysfn_min_windows:
call minimize_all_window
mov [esp+32], eax
call change_task
ret
;------------------------------------------------------------------------------
uglobal uglobal
;// mike.dld, 2006-29-01 [
screen_workarea RECT screen_workarea RECT
;// mike.dld, 2006-29-01 ]
window_minimize db 0 window_minimize db 0
sound_flag db 0 sound_flag db 0
endg endg