From 47fe4cff9cc55781842c5926e8f0318242210661 Mon Sep 17 00:00:00 2001 From: Alver Date: Wed, 22 Aug 2007 22:34:57 +0000 Subject: [PATCH] git-svn-id: svn://kolibrios.org@608 a494cfbc-eb01-0410-851d-a64ba20cac60 --- kernel/trunk/docs/sysfuncr.txt | 31 ++++++++++++++++++++++++ kernel/trunk/docs/sysfuncs.txt | 29 +++++++++++++++++++++++ kernel/trunk/kernel.asm | 43 ++++++++++++++++++++++++++++++++++ 3 files changed, 103 insertions(+) diff --git a/kernel/trunk/docs/sysfuncr.txt b/kernel/trunk/docs/sysfuncr.txt index 05cc696bfe..422fae4191 100644 --- a/kernel/trunk/docs/sysfuncr.txt +++ b/kernel/trunk/docs/sysfuncr.txt @@ -1021,6 +1021,37 @@ dd 533 * +32: dword: размер наибольшего выделенного блока в куче ядра (зарезервировано) +====================================================================== +====================== Функция 18, подфункция 21 ===================== +==== Получить номера слота процесса/потока по его идентификатору ===== +====================================================================== +Параметры: + * eax = 18 - номер функции + * ebx = 21 - номер подфункции + * ecx = PID/TID (идентификатор процесса/потока) +Возвращаемое значение: + * eax = номер слота потока если он существует или 0, если PID/TID + ложный. + +====================================================================== +====================== Функция 18, подфункция 22 ===================== +=========== Минимизация/восстановление окна процесса/потока ========== +====================================================================== +Параметры: + * eax = 18 - номер функции + * ebx = 22 - номер подфункции + * ecx = Тип операции + 0 - минимизация окна (сворачивание на панель) по номеру + слота потока + 1 - минимизация окна по идентификатору PID/TID + 2 - Восстановление минимизированного окна по слоту потока + 3 - Восстановление минимизированного окна по идентификатору + PID/TID + * edx = Параметр операции (Номер слота или PID/TID) +Возвращаемое значение: + * eax = 0 - успешное завершение + eax = -1 - ошибка + ====================================================================== ==================== Функция 20 - интерфейс MIDI. ==================== ====================================================================== diff --git a/kernel/trunk/docs/sysfuncs.txt b/kernel/trunk/docs/sysfuncs.txt index a13543eac9..ffeaca2a1f 100644 --- a/kernel/trunk/docs/sysfuncs.txt +++ b/kernel/trunk/docs/sysfuncs.txt @@ -1018,6 +1018,35 @@ Returned value: * +32: dword: size of maximum allocated block in kernel heap (reserved) +====================================================================== +====================== Function 18, subfunction 21 ===================== +=== Get number of the slot of process/thread at his identificator ==== +====================================================================== +Parameters: + * eax = 18 - function number + * ebx = 21 - subfunction number + * ecx = PID/TID (process/thread identificator) +Returned value: + * eax = number of the slot of process/thread, if it really present + or 0, if PID/TID is false + +====================================================================== +==================== Function 18, subfunction 22 ===================== +============= Minimize/restore window of process/thread ============== +====================================================================== +Parameters: + * eax = 18 - function number + * ebx = 22 - subfunction number + * ecx = Operation type + 0 - minimize (roll to panel) at number on slot thread + 1 - minimize window at PID/TID identificator + 2 - restore minimized window at slot number of thread + 3 - restore minimized window at PID/TID identificator + * edx = Operation argument (Number of slot or a PID/TID) +Returned value: + * eax = 0 - successfully ending + eax = -1 - error + ====================================================================== ==================== Function 20 - MIDI interface. =================== ====================================================================== diff --git a/kernel/trunk/kernel.asm b/kernel/trunk/kernel.asm index a7db996940..2d67800659 100644 --- a/kernel/trunk/kernel.asm +++ b/kernel/trunk/kernel.asm @@ -2045,6 +2045,8 @@ sys_system_table: ; instead of slot dd sysfn_mouse_acceleration; 19 = set/get mouse acceleration dd sysfn_meminfo ; 20 = get extended memory info + dd sysfn_pid_to_slot ; 21 = get slot number for pid + dd sysfn_min_rest_window ; 22 = minimize and restore any window sysfn_num = ($ - sys_system_table)/4 endg @@ -2288,6 +2290,47 @@ sysfn_getallmem: mov [esp+36],eax ret +; // Alver, 2007-22-08 // { +sysfn_pid_to_slot: + mov eax, ebx + call pid_to_slot + mov [esp+36], eax + ret + +sysfn_min_rest_window: + pushad + mov eax, ecx ; ebx - operating + shr ebx, 1 + jnc @f + call pid_to_slot +@@: + or eax, eax ; eax - number of slot + jz .error + cmp eax, 255 ; varify maximal slot number + ja .error + xor ecx, ecx + mov cx, [WIN_STACK + eax*2] ; ecx - window number + mov eax, ecx + shr ebx, 1 + jc .restore + ; .minimize: + call minimize_window + jmp .exit +.restore: + call restore_minimized_window +.exit: + popad + xor eax, eax + mov [esp+36], eax + ret +.error: + popad + xor eax, eax + dec eax + mov [esp+36], eax + ret +; } \\ Alver, 2007-22-08 \\ + uglobal ;// mike.dld, 2006-29-01 [ screen_workarea RECT