2006-01-03 10:43:31 +01:00
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
|
|
|
; ;
|
2012-04-17 01:46:54 +02:00
|
|
|
|
; TASK PANEL for KolibriOS - Compile with fasm ;
|
2006-01-03 10:43:31 +01:00
|
|
|
|
; ;
|
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
2012-04-17 01:46:54 +02:00
|
|
|
|
;------------------------------------------------------------------------------
|
2012-04-26 16:33:09 +02:00
|
|
|
|
; version: 2.23
|
|
|
|
|
; last update: 26/04/2012
|
|
|
|
|
; changed by: Marat Zakiyanov aka Mario79, aka Mario
|
|
|
|
|
; changes: Using new f18.23 - minimize all windows
|
|
|
|
|
;------------------------------------------------------------------------------
|
2012-04-20 18:27:21 +02:00
|
|
|
|
; version: 2.22
|
|
|
|
|
; last update: 20/04/2012
|
|
|
|
|
; changed by: Marat Zakiyanov aka Mario79, aka Mario
|
|
|
|
|
; changes: Activation mechanism when trying to run an existing appl.
|
|
|
|
|
; Forced redrawing the background after the clean desktop (Win+D)
|
|
|
|
|
;------------------------------------------------------------------------------
|
2012-04-18 23:39:37 +02:00
|
|
|
|
; version: 2.2
|
|
|
|
|
; last update: 19/04/2012
|
|
|
|
|
; changed by: Marat Zakiyanov aka Mario79, aka Mario
|
|
|
|
|
; changes: Support PrintScreen for SCRSHOOT.
|
|
|
|
|
; Path to run applications from the INI file.
|
|
|
|
|
; Algorithm anti-duplication of applications for run with hotkey.
|
|
|
|
|
; Added color selection for the Alt+Tab.
|
|
|
|
|
; Alt+Ctrl+ArrowLeft - Page list next
|
|
|
|
|
; Alt+Ctrl+ArrowRight - Page list previous
|
|
|
|
|
;------------------------------------------------------------------------------
|
2012-04-18 00:58:52 +02:00
|
|
|
|
; version: 2.1
|
|
|
|
|
; last update: 18/04/2012
|
|
|
|
|
; changed by: Marat Zakiyanov aka Mario79, aka Mario
|
|
|
|
|
; changes: Added color selection for the text.
|
|
|
|
|
; Show "change page list" only if the applications
|
|
|
|
|
; does not fit in the panel.
|
|
|
|
|
; Display file names up to 11 char previously displ. only 8 char.
|
|
|
|
|
;------------------------------------------------------------------------------
|
2012-04-17 01:46:54 +02:00
|
|
|
|
; version: 2.0
|
|
|
|
|
; last update: 17/04/2012
|
|
|
|
|
; changed by: Marat Zakiyanov aka Mario79, aka Mario
|
|
|
|
|
; changes: New logic of switching windows (turnoff/restore)
|
|
|
|
|
; New logic of button "clear desktop".
|
|
|
|
|
; Win+D (restore/clear desktop), Win+R (start RUN application).
|
|
|
|
|
; Using the library LibINI to set the parameters.
|
|
|
|
|
; New style of panel. Start application Menu with boot options.
|
|
|
|
|
; two versions of the location of the panel -
|
|
|
|
|
; the bottom of the desktop and on top of the desktop.
|
|
|
|
|
;------------------------------------------------------------------------------
|
2012-03-31 18:34:52 +02:00
|
|
|
|
; last update: 31/03/2012
|
|
|
|
|
; changed by: Marat Zakiyanov aka Mario79, aka Mario
|
|
|
|
|
; changes: The program uses only 20 Kb memory is now.
|
|
|
|
|
; Code optimizing and refactoring.
|
|
|
|
|
;------------------------------------------------------------------------------
|
|
|
|
|
use32
|
|
|
|
|
org 0x0
|
|
|
|
|
db 'MENUET01' ; 8 byte id
|
|
|
|
|
dd 0x01 ; header version
|
|
|
|
|
dd START ; program start
|
2012-04-17 01:46:54 +02:00
|
|
|
|
dd IM_END ; program image size
|
|
|
|
|
dd I_END ; reguired amount of memory - 10 Kb
|
|
|
|
|
dd stack_top ; esp
|
2012-03-31 18:34:52 +02:00
|
|
|
|
dd 0x0 ; boot parameters
|
2012-04-17 01:46:54 +02:00
|
|
|
|
dd path ; application pach
|
|
|
|
|
;------------------------------------------------------------------------------
|
2006-01-03 10:43:31 +01:00
|
|
|
|
include 'lang.inc'
|
2012-04-17 01:46:54 +02:00
|
|
|
|
include '../../../macros.inc'
|
|
|
|
|
include '../../../proc32.inc'
|
2012-11-09 10:19:16 +01:00
|
|
|
|
;include '../../../debug.inc'
|
2012-03-31 18:34:52 +02:00
|
|
|
|
include 'MOI.INC' ;<3B><>᪫<EFBFBD><E1AAAB><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2012-04-17 01:46:54 +02:00
|
|
|
|
include '../../../develop/libraries/box_lib/load_lib.mac'
|
|
|
|
|
@use_library ;use load lib macros
|
|
|
|
|
;------------------------------------------------------------------------------
|
|
|
|
|
caps_lock_check fix 1
|
|
|
|
|
;------------------------------------------------------------------------------
|
2010-03-21 22:47:17 +01:00
|
|
|
|
time_bgr_color = 0x66cc
|
2012-04-17 01:46:54 +02:00
|
|
|
|
;PANEL_HEIGHT = 18
|
|
|
|
|
ML_SIZE = 10
|
|
|
|
|
MR_SIZE = 10
|
|
|
|
|
MENU_SIZE = 50
|
|
|
|
|
CLD_SIZE = 20
|
2012-04-18 00:58:52 +02:00
|
|
|
|
TAB_SIZE = 75 ;60
|
2012-04-17 01:46:54 +02:00
|
|
|
|
TRAY_SIZE = 140
|
|
|
|
|
|
|
|
|
|
CLOCK_SIZE = 40
|
|
|
|
|
CPU_USAGE_SIZE = 10
|
|
|
|
|
CHLANG_SIZE = 20
|
|
|
|
|
PAGE_LIST_SIZE = 36
|
|
|
|
|
;------------------------------------------------------------------------------
|
2012-03-31 18:34:52 +02:00
|
|
|
|
align 4
|
2006-06-30 14:34:18 +02:00
|
|
|
|
handle_key:
|
2012-04-17 01:46:54 +02:00
|
|
|
|
mcall 18,7
|
2012-03-31 18:34:52 +02:00
|
|
|
|
mov [active_process],eax
|
2006-01-03 10:43:31 +01:00
|
|
|
|
|
2012-03-31 18:34:52 +02:00
|
|
|
|
mcall 2
|
2012-04-17 01:46:54 +02:00
|
|
|
|
|
|
|
|
|
; dps "panel key: "
|
|
|
|
|
; dph eax
|
|
|
|
|
; newline
|
|
|
|
|
|
2007-08-02 21:03:24 +02:00
|
|
|
|
cmp al, 2
|
|
|
|
|
jnz begin_1.ret
|
2012-03-31 18:34:52 +02:00
|
|
|
|
|
2007-08-02 21:03:24 +02:00
|
|
|
|
mov ebx, exec_fileinfo
|
|
|
|
|
shr eax, 8
|
2008-09-30 20:03:55 +02:00
|
|
|
|
cmp al, 0
|
|
|
|
|
je prod
|
2012-03-31 18:34:52 +02:00
|
|
|
|
|
2008-09-30 20:03:55 +02:00
|
|
|
|
mov [key_r],al
|
|
|
|
|
sub [key_r],2
|
|
|
|
|
cmp al, 2
|
|
|
|
|
jz alter
|
2012-03-31 18:34:52 +02:00
|
|
|
|
|
2008-09-30 20:03:55 +02:00
|
|
|
|
cmp al, 3
|
|
|
|
|
jz alter
|
2012-03-31 18:34:52 +02:00
|
|
|
|
|
2008-09-30 20:03:55 +02:00
|
|
|
|
cmp al, 4
|
|
|
|
|
jz alter
|
2012-03-31 18:34:52 +02:00
|
|
|
|
|
2008-09-30 20:03:55 +02:00
|
|
|
|
cmp al, 5
|
|
|
|
|
jz alter
|
2012-03-31 18:34:52 +02:00
|
|
|
|
|
2008-09-30 20:03:55 +02:00
|
|
|
|
cmp al, 6
|
|
|
|
|
jz alter
|
2012-03-31 18:34:52 +02:00
|
|
|
|
|
2008-09-30 20:03:55 +02:00
|
|
|
|
cmp al, 7
|
|
|
|
|
jz alter
|
2012-03-31 18:34:52 +02:00
|
|
|
|
|
2008-09-30 20:03:55 +02:00
|
|
|
|
cmp al, 8
|
|
|
|
|
jz alter
|
2012-03-31 18:34:52 +02:00
|
|
|
|
;--------------------------------------
|
2012-04-17 01:46:54 +02:00
|
|
|
|
;align 4
|
|
|
|
|
;prod:
|
2012-03-31 18:34:52 +02:00
|
|
|
|
if caps_lock_check
|
2012-04-17 01:46:54 +02:00
|
|
|
|
cmp al,58 ;CAPS LOCK DOWN
|
2012-03-31 18:34:52 +02:00
|
|
|
|
jne @f
|
|
|
|
|
|
|
|
|
|
pusha
|
|
|
|
|
mcall 26,2,9
|
|
|
|
|
mov ebx,eax
|
|
|
|
|
mov eax,2
|
2012-04-17 01:46:54 +02:00
|
|
|
|
; call draw_window ;;;???
|
|
|
|
|
mov [draw_flag_certainly],1
|
|
|
|
|
call draw_flag ; language
|
2012-03-31 18:34:52 +02:00
|
|
|
|
popa
|
|
|
|
|
ret
|
|
|
|
|
@@:
|
|
|
|
|
end if
|
2012-04-17 01:46:54 +02:00
|
|
|
|
cmp al, 15 ; Alt+Tab DOWN
|
2007-08-02 21:03:24 +02:00
|
|
|
|
jz alt_tab_pressed
|
2012-03-31 18:34:52 +02:00
|
|
|
|
|
2012-04-17 01:46:54 +02:00
|
|
|
|
cmp al, 88 ; Ctrl+Alt+F12
|
2007-08-02 21:03:24 +02:00
|
|
|
|
jz start_end_application
|
2012-03-31 18:34:52 +02:00
|
|
|
|
|
2012-04-17 01:46:54 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
cmp al, 91 ; RWin DOWN
|
|
|
|
|
jz set_win_key_flag
|
2012-03-31 18:34:52 +02:00
|
|
|
|
|
2012-04-17 01:46:54 +02:00
|
|
|
|
cmp al, 92 ; LWin DOWN
|
|
|
|
|
jz set_win_key_flag
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
cmp al, 219 ; RWin UP
|
|
|
|
|
jz cut_win_key_flag ;start_menu_application
|
|
|
|
|
|
|
|
|
|
cmp al, 220 ; LWin UP
|
|
|
|
|
jz cut_win_key_flag ;start_menu_application
|
|
|
|
|
|
2012-03-31 18:34:52 +02:00
|
|
|
|
|
2012-04-17 01:46:54 +02:00
|
|
|
|
cmp al, 62 ; Alt+F4
|
2007-08-02 21:03:24 +02:00
|
|
|
|
jz kill_active_application
|
2012-03-31 18:34:52 +02:00
|
|
|
|
|
2012-04-18 23:39:37 +02:00
|
|
|
|
cmp al, 205
|
|
|
|
|
jz page_list_next
|
2012-03-31 18:34:52 +02:00
|
|
|
|
|
2012-04-18 23:39:37 +02:00
|
|
|
|
cmp al, 203
|
|
|
|
|
jz page_list_prev
|
2012-03-31 18:34:52 +02:00
|
|
|
|
|
2012-04-17 01:46:54 +02:00
|
|
|
|
cmp al, 69 ; Alt+Shift+NumLock
|
2010-02-20 23:24:12 +01:00
|
|
|
|
jz start_mousemul_application
|
2012-04-17 01:46:54 +02:00
|
|
|
|
|
|
|
|
|
cmp al, 19 ; Win+R
|
|
|
|
|
jz start_run_application
|
|
|
|
|
|
|
|
|
|
cmp al, 32 ; Win+D
|
|
|
|
|
jz minimize_all_windows
|
2012-04-18 23:39:37 +02:00
|
|
|
|
|
|
|
|
|
cmp al, 55 ; PrintScreen DOWN
|
|
|
|
|
jz start_PrintScreen_application
|
2012-04-17 01:46:54 +02:00
|
|
|
|
;--------------------------------------
|
|
|
|
|
align 4
|
|
|
|
|
prod:
|
|
|
|
|
; cmp eax,0x20000
|
|
|
|
|
; je start_menu_application
|
|
|
|
|
|
|
|
|
|
; cmp eax,0x40000
|
|
|
|
|
; je start_menu_application
|
2011-05-02 08:19:00 +02:00
|
|
|
|
|
2007-08-02 21:03:24 +02:00
|
|
|
|
cmp [current_alt_tab_app], -1
|
|
|
|
|
jz @f
|
2012-03-31 18:34:52 +02:00
|
|
|
|
|
2012-04-17 01:46:54 +02:00
|
|
|
|
test ah, 0x30 ; Alt+Tab UP
|
2007-08-02 21:03:24 +02:00
|
|
|
|
jz alt_tab_released
|
2012-03-31 18:34:52 +02:00
|
|
|
|
;--------------------------------------
|
|
|
|
|
align 4
|
2007-03-30 15:19:32 +02:00
|
|
|
|
@@:
|
2007-01-31 16:36:12 +01:00
|
|
|
|
; this is hotkey Ctrl+Shift ;or LShift+RShift
|
2012-03-31 18:34:52 +02:00
|
|
|
|
jmp karu
|
|
|
|
|
; mov ebx, setup_exec
|
|
|
|
|
; test ah, 001100b
|
|
|
|
|
; jz change_sys_lang
|
2012-04-17 01:46:54 +02:00
|
|
|
|
;------------------------------------------------------------------------------
|
|
|
|
|
align 4
|
|
|
|
|
set_win_key_flag:
|
|
|
|
|
mov [win_key_flag],1
|
|
|
|
|
ret
|
|
|
|
|
;------------------------------------------------------------------------------
|
|
|
|
|
align 4
|
|
|
|
|
cut_win_key_flag:
|
|
|
|
|
xor eax,eax
|
|
|
|
|
mov [win_key_flag],al
|
|
|
|
|
xchg [start_menu_flag],al
|
|
|
|
|
test al,al
|
|
|
|
|
jz start_menu_application
|
|
|
|
|
ret
|
|
|
|
|
;------------------------------------------------------------------------------
|
2012-03-31 18:34:52 +02:00
|
|
|
|
align 4
|
2007-01-31 16:36:12 +01:00
|
|
|
|
change_key_lang:
|
2007-08-02 21:03:24 +02:00
|
|
|
|
mov dword [ebx+8], chlang
|
|
|
|
|
mcall 70
|
2012-03-31 18:34:52 +02:00
|
|
|
|
;--------------------------------------
|
|
|
|
|
align 4
|
2006-01-03 10:43:31 +01:00
|
|
|
|
begin_1:
|
2012-03-31 18:34:52 +02:00
|
|
|
|
mov ecx,[active_process]
|
|
|
|
|
mcall 18, 3
|
|
|
|
|
mcall 5, 25
|
|
|
|
|
;--------------------------------------
|
|
|
|
|
align 4
|
2006-06-30 14:34:18 +02:00
|
|
|
|
.ret:
|
2007-08-02 21:03:24 +02:00
|
|
|
|
ret
|
2012-04-17 01:46:54 +02:00
|
|
|
|
;------------------------------------------------------------------------------
|
2012-03-31 18:34:52 +02:00
|
|
|
|
;align 4
|
2007-01-31 16:36:12 +01:00
|
|
|
|
;change_sys_lang:
|
2012-03-31 18:34:52 +02:00
|
|
|
|
; mov dword [ebx+8], syslang
|
2007-01-31 16:36:12 +01:00
|
|
|
|
; mcall 70
|
|
|
|
|
; jmp begin_1
|
2012-04-17 01:46:54 +02:00
|
|
|
|
;------------------------------------------------------------------------------
|
2012-03-31 18:34:52 +02:00
|
|
|
|
align 4
|
|
|
|
|
start_end_application:
|
2012-04-18 23:39:37 +02:00
|
|
|
|
mov esi,end_name
|
|
|
|
|
call algorithm_anti_duplication
|
|
|
|
|
test eax,eax
|
|
|
|
|
jz @f
|
2012-04-20 18:27:21 +02:00
|
|
|
|
|
|
|
|
|
mcall 18,3,edi
|
2012-04-18 23:39:37 +02:00
|
|
|
|
ret
|
|
|
|
|
;--------------------------------------
|
|
|
|
|
align 4
|
|
|
|
|
@@:
|
|
|
|
|
mov ebx, exec_fileinfo
|
2012-03-31 18:34:52 +02:00
|
|
|
|
mov dword [ebx+21],end_name
|
2007-08-02 21:03:24 +02:00
|
|
|
|
mcall 70
|
2010-02-20 23:24:12 +01:00
|
|
|
|
ret
|
2012-04-17 01:46:54 +02:00
|
|
|
|
;------------------------------------------------------------------------------
|
2012-03-31 18:34:52 +02:00
|
|
|
|
align 4
|
|
|
|
|
start_mousemul_application:
|
2012-04-18 23:39:37 +02:00
|
|
|
|
mov esi,mousemul_name
|
|
|
|
|
call algorithm_anti_duplication
|
|
|
|
|
test eax,eax
|
|
|
|
|
jz @f
|
|
|
|
|
ret
|
|
|
|
|
;--------------------------------------
|
|
|
|
|
align 4
|
|
|
|
|
@@:
|
|
|
|
|
mov ebx, exec_fileinfo
|
2012-03-31 18:34:52 +02:00
|
|
|
|
mov dword [ebx+21],mousemul_name
|
2010-02-20 23:24:12 +01:00
|
|
|
|
mcall 70
|
|
|
|
|
ret
|
2012-04-17 01:46:54 +02:00
|
|
|
|
;------------------------------------------------------------------------------
|
2012-03-31 18:34:52 +02:00
|
|
|
|
align 4
|
|
|
|
|
kill_active_application:
|
|
|
|
|
mcall 72,1,3,1
|
|
|
|
|
jmp begin_1.ret
|
2012-04-17 01:46:54 +02:00
|
|
|
|
;------------------------------------------------------------------------------
|
|
|
|
|
|
2012-03-31 18:34:52 +02:00
|
|
|
|
align 4
|
|
|
|
|
start_menu_application:
|
2012-04-17 01:46:54 +02:00
|
|
|
|
call menu_handler
|
|
|
|
|
jmp begin_1.ret
|
|
|
|
|
;------------------------------------------------------------------------------
|
|
|
|
|
align 4
|
|
|
|
|
start_run_application:
|
|
|
|
|
cmp [win_key_flag],1
|
|
|
|
|
je @f
|
|
|
|
|
ret
|
2012-04-18 00:58:52 +02:00
|
|
|
|
;--------------------------------------
|
|
|
|
|
align 4
|
2012-04-17 01:46:54 +02:00
|
|
|
|
@@:
|
|
|
|
|
mov [start_menu_flag],1
|
2012-04-18 23:39:37 +02:00
|
|
|
|
|
|
|
|
|
mov esi,run_name
|
|
|
|
|
call algorithm_anti_duplication
|
|
|
|
|
test eax,eax
|
|
|
|
|
jz @f
|
2012-04-20 18:27:21 +02:00
|
|
|
|
|
|
|
|
|
mcall 18,3,edi
|
2012-04-18 23:39:37 +02:00
|
|
|
|
ret
|
|
|
|
|
;--------------------------------------
|
|
|
|
|
align 4
|
|
|
|
|
@@:
|
|
|
|
|
mov ebx, exec_fileinfo
|
2012-04-17 01:46:54 +02:00
|
|
|
|
mov dword [ebx+21], run_name
|
2007-08-02 21:03:24 +02:00
|
|
|
|
mcall 70
|
2012-03-31 18:34:52 +02:00
|
|
|
|
jmp begin_1.ret
|
2012-04-17 01:46:54 +02:00
|
|
|
|
;------------------------------------------------------------------------------
|
|
|
|
|
align 4
|
2012-04-18 23:39:37 +02:00
|
|
|
|
start_PrintScreen_application:
|
|
|
|
|
mov esi,printscreen_name
|
|
|
|
|
call algorithm_anti_duplication
|
|
|
|
|
test eax,eax
|
|
|
|
|
jz @f
|
2012-04-20 18:27:21 +02:00
|
|
|
|
mcall 18,3,edi
|
2012-04-18 23:39:37 +02:00
|
|
|
|
ret
|
|
|
|
|
;--------------------------------------
|
|
|
|
|
align 4
|
|
|
|
|
@@:
|
|
|
|
|
mov ebx, exec_fileinfo
|
|
|
|
|
mov dword [ebx+21],printscreen_name
|
|
|
|
|
mov [ebx+8],dword bootparam_printscreen
|
|
|
|
|
mcall 70
|
|
|
|
|
jmp begin_1.ret
|
|
|
|
|
;------------------------------------------------------------------------------
|
|
|
|
|
align 4
|
2012-04-17 01:46:54 +02:00
|
|
|
|
minimize_all_windows:
|
|
|
|
|
cmp [win_key_flag],1
|
|
|
|
|
je @f
|
|
|
|
|
ret
|
2012-04-18 00:58:52 +02:00
|
|
|
|
;--------------------------------------
|
|
|
|
|
align 4
|
2012-04-17 01:46:54 +02:00
|
|
|
|
@@:
|
|
|
|
|
mov [start_menu_flag],1
|
|
|
|
|
call clean_desktop
|
|
|
|
|
ret
|
|
|
|
|
;------------------------------------------------------------------------------
|
2012-04-18 23:39:37 +02:00
|
|
|
|
align 4
|
|
|
|
|
algorithm_anti_duplication:
|
|
|
|
|
cld
|
|
|
|
|
;--------------------------------------
|
|
|
|
|
align 4
|
|
|
|
|
@@:
|
|
|
|
|
lodsb
|
|
|
|
|
test al,al
|
|
|
|
|
jnz @r
|
|
|
|
|
;--------------------------------------
|
|
|
|
|
align 4
|
|
|
|
|
@@:
|
|
|
|
|
std
|
|
|
|
|
lodsb
|
|
|
|
|
cmp al,'/'
|
|
|
|
|
jnz @r
|
|
|
|
|
add esi,2
|
|
|
|
|
mov edx,esi
|
|
|
|
|
|
|
|
|
|
mov edi,1
|
|
|
|
|
;--------------------------------------
|
|
|
|
|
align 4
|
|
|
|
|
@@:
|
|
|
|
|
inc edi
|
|
|
|
|
mov ecx,edi
|
|
|
|
|
mcall 9,procinfo_window_tabs
|
|
|
|
|
|
|
|
|
|
cmp edi,eax
|
|
|
|
|
jg .apply_changes
|
|
|
|
|
|
|
|
|
|
; mov eax,[ebx+10]
|
|
|
|
|
; and eax,not 20202020h
|
|
|
|
|
; cmp eax,'SCRS'
|
|
|
|
|
; jz @f
|
|
|
|
|
|
|
|
|
|
; mov eax,[ebx+14]
|
|
|
|
|
; and eax,not 20202020h
|
|
|
|
|
; cmp eax,'HOOT'
|
|
|
|
|
; jne @r
|
|
|
|
|
mov esi,edx
|
|
|
|
|
mov ecx,11
|
|
|
|
|
add ebx,9
|
|
|
|
|
cld
|
|
|
|
|
;--------------------------------------
|
|
|
|
|
align 4
|
|
|
|
|
.loop:
|
|
|
|
|
lodsb
|
|
|
|
|
inc ebx
|
|
|
|
|
cmp al,[ebx]
|
|
|
|
|
jne @r
|
|
|
|
|
|
|
|
|
|
loop .loop
|
|
|
|
|
|
|
|
|
|
mov eax,1
|
|
|
|
|
ret
|
|
|
|
|
;--------------------------------------
|
|
|
|
|
align 4
|
|
|
|
|
.apply_changes:
|
|
|
|
|
xor eax,eax
|
|
|
|
|
ret
|
2012-04-17 01:46:54 +02:00
|
|
|
|
;------------------------------------------------------------------------------
|
2012-04-18 23:39:37 +02:00
|
|
|
|
align 4
|
|
|
|
|
page_list_next:
|
|
|
|
|
cmp [page_list],50
|
|
|
|
|
je @f
|
|
|
|
|
|
|
|
|
|
xor eax,eax
|
|
|
|
|
cmp [page_list_enable],eax
|
|
|
|
|
je @f
|
|
|
|
|
|
|
|
|
|
inc [page_list]
|
|
|
|
|
mov [redraw_window_flag],1
|
|
|
|
|
;--------------------------------------
|
|
|
|
|
align 4
|
|
|
|
|
@@:
|
|
|
|
|
jmp begin_1.ret
|
|
|
|
|
;------------------------------------------------------------------------------
|
|
|
|
|
align 4
|
|
|
|
|
page_list_prev:
|
|
|
|
|
xor eax,eax
|
|
|
|
|
cmp [page_list],eax
|
|
|
|
|
je @f
|
|
|
|
|
|
|
|
|
|
cmp [page_list_enable],eax
|
|
|
|
|
je @f
|
|
|
|
|
|
|
|
|
|
dec [page_list]
|
|
|
|
|
mov [redraw_window_flag],1
|
|
|
|
|
;--------------------------------------
|
|
|
|
|
align 4
|
|
|
|
|
@@:
|
|
|
|
|
jmp begin_1.ret
|
2012-04-17 01:46:54 +02:00
|
|
|
|
;------------------------------------------------------------------------------
|
2012-03-31 18:34:52 +02:00
|
|
|
|
align 4
|
2007-03-30 15:19:32 +02:00
|
|
|
|
alt_tab_pressed:
|
|
|
|
|
; handle Alt+Tab and Alt+Shift+Tab
|
2007-08-02 21:03:24 +02:00
|
|
|
|
mov ebp, eax
|
|
|
|
|
cmp [current_alt_tab_app], -1
|
|
|
|
|
jnz has_alt_tab_app
|
2007-03-30 15:19:32 +02:00
|
|
|
|
; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>塞 ⠡<><E2A0A1><EFBFBD><EFBFBD> <20>ਫ<EFBFBD><E0A8AB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>४<EFBFBD><E0A5AA>祭<EFBFBD><E7A5AD>
|
2007-08-02 21:03:24 +02:00
|
|
|
|
xor edx, edx
|
2012-04-17 01:46:54 +02:00
|
|
|
|
mov ebx, procinfo_window_tabs
|
2007-08-02 21:03:24 +02:00
|
|
|
|
mov ecx, 1
|
2012-04-18 00:58:52 +02:00
|
|
|
|
;--------------------------------------
|
|
|
|
|
align 4
|
2007-03-30 15:19:32 +02:00
|
|
|
|
.fill:
|
2007-08-02 21:03:24 +02:00
|
|
|
|
inc ecx
|
2012-03-31 18:34:52 +02:00
|
|
|
|
mcall 9
|
2007-08-02 21:03:24 +02:00
|
|
|
|
call need_window_tab
|
|
|
|
|
jz @f
|
2012-03-31 18:34:52 +02:00
|
|
|
|
|
2007-08-02 21:03:24 +02:00
|
|
|
|
cmp edx, 256
|
|
|
|
|
jz @f
|
2012-03-31 18:34:52 +02:00
|
|
|
|
|
2007-08-02 21:03:24 +02:00
|
|
|
|
mov [alt_tab_list+edx*8], ecx
|
|
|
|
|
movzx esi, word [ebx+4]
|
|
|
|
|
mov [alt_tab_list+edx*8+4], esi
|
|
|
|
|
inc edx
|
2012-03-31 18:34:52 +02:00
|
|
|
|
;--------------------------------------
|
|
|
|
|
align 4
|
2007-03-30 15:19:32 +02:00
|
|
|
|
@@:
|
2012-03-31 18:34:52 +02:00
|
|
|
|
cmp ecx,eax
|
2007-08-02 21:03:24 +02:00
|
|
|
|
jb .fill
|
2012-03-31 18:34:52 +02:00
|
|
|
|
|
2007-08-02 21:03:24 +02:00
|
|
|
|
mov [alt_tab_list_size], edx
|
|
|
|
|
test edx, edx
|
|
|
|
|
jz begin_1.ret
|
2012-03-31 18:34:52 +02:00
|
|
|
|
|
2007-08-02 21:03:24 +02:00
|
|
|
|
mcall 66,4,0,0 ; <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>᪠<EFBFBD><E1AAA0><EFBFBD> <20><><EFBFBD><EFBFBD> <20><>ࠢ<EFBFBD><E0A0A2><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
test eax, eax
|
|
|
|
|
jnz begin_1.ret
|
2012-03-31 18:34:52 +02:00
|
|
|
|
|
2007-08-02 21:03:24 +02:00
|
|
|
|
xor edx, edx
|
|
|
|
|
mov eax, [alt_tab_list+4]
|
|
|
|
|
xor ecx, ecx
|
|
|
|
|
inc ecx
|
2012-03-31 18:34:52 +02:00
|
|
|
|
;--------------------------------------
|
|
|
|
|
align 4
|
2007-03-30 15:19:32 +02:00
|
|
|
|
.findmax:
|
2007-08-02 21:03:24 +02:00
|
|
|
|
cmp [alt_tab_list+ecx*8+4], eax
|
|
|
|
|
jb @f
|
2012-03-31 18:34:52 +02:00
|
|
|
|
|
2007-08-02 21:03:24 +02:00
|
|
|
|
mov edx, ecx
|
|
|
|
|
mov eax, [alt_tab_list+ecx*8+4]
|
2012-03-31 18:34:52 +02:00
|
|
|
|
;--------------------------------------
|
|
|
|
|
align 4
|
2007-03-30 15:19:32 +02:00
|
|
|
|
@@:
|
2007-08-02 21:03:24 +02:00
|
|
|
|
inc ecx
|
|
|
|
|
cmp ecx, [alt_tab_list_size]
|
|
|
|
|
jb .findmax
|
2012-03-31 18:34:52 +02:00
|
|
|
|
|
2007-08-02 21:03:24 +02:00
|
|
|
|
mov [current_alt_tab_app], edx
|
2012-03-31 18:34:52 +02:00
|
|
|
|
;--------------------------------------
|
|
|
|
|
align 4
|
2007-03-30 15:19:32 +02:00
|
|
|
|
has_alt_tab_app:
|
2007-08-02 21:03:24 +02:00
|
|
|
|
mov eax, [current_alt_tab_app]
|
|
|
|
|
mov edx, [alt_tab_list+eax*8+4] ; slot
|
|
|
|
|
xor ecx, ecx
|
|
|
|
|
or eax, -1
|
|
|
|
|
test ebp, 300h
|
|
|
|
|
jz .notshift
|
2012-03-31 18:34:52 +02:00
|
|
|
|
|
2007-08-02 21:03:24 +02:00
|
|
|
|
or esi, -1
|
2012-03-31 18:34:52 +02:00
|
|
|
|
;--------------------------------------
|
|
|
|
|
align 4
|
2007-03-30 15:19:32 +02:00
|
|
|
|
.loop1:
|
2007-08-02 21:03:24 +02:00
|
|
|
|
cmp [alt_tab_list+ecx*8+4], edx
|
|
|
|
|
jbe @f
|
2012-03-31 18:34:52 +02:00
|
|
|
|
|
2007-08-02 21:03:24 +02:00
|
|
|
|
cmp [alt_tab_list+ecx*8+4], esi
|
|
|
|
|
jae @f
|
2012-03-31 18:34:52 +02:00
|
|
|
|
|
2007-08-02 21:03:24 +02:00
|
|
|
|
mov eax, ecx
|
|
|
|
|
mov esi, [alt_tab_list+ecx*8+4]
|
2012-03-31 18:34:52 +02:00
|
|
|
|
;--------------------------------------
|
|
|
|
|
align 4
|
2007-03-30 15:19:32 +02:00
|
|
|
|
@@:
|
2007-08-02 21:03:24 +02:00
|
|
|
|
inc ecx
|
|
|
|
|
cmp ecx, [alt_tab_list_size]
|
|
|
|
|
jb .loop1
|
2012-03-31 18:34:52 +02:00
|
|
|
|
|
2007-08-02 21:03:24 +02:00
|
|
|
|
cmp eax, -1
|
|
|
|
|
jnz .found
|
2012-03-31 18:34:52 +02:00
|
|
|
|
|
2007-08-02 21:03:24 +02:00
|
|
|
|
xor edx, edx
|
|
|
|
|
xor ecx, ecx
|
|
|
|
|
jmp .loop1
|
2012-03-31 18:34:52 +02:00
|
|
|
|
;--------------------------------------
|
|
|
|
|
align 4
|
2007-03-30 15:19:32 +02:00
|
|
|
|
.notshift:
|
2007-08-02 21:03:24 +02:00
|
|
|
|
xor esi, esi
|
2012-03-31 18:34:52 +02:00
|
|
|
|
;--------------------------------------
|
|
|
|
|
align 4
|
2007-03-30 15:19:32 +02:00
|
|
|
|
.loop2:
|
2007-08-02 21:03:24 +02:00
|
|
|
|
cmp [alt_tab_list+ecx*8+4], edx
|
|
|
|
|
jae @f
|
2012-03-31 18:34:52 +02:00
|
|
|
|
|
2007-08-02 21:03:24 +02:00
|
|
|
|
cmp [alt_tab_list+ecx*8+4], esi
|
|
|
|
|
jbe @f
|
2012-03-31 18:34:52 +02:00
|
|
|
|
|
2007-08-02 21:03:24 +02:00
|
|
|
|
mov eax, ecx
|
|
|
|
|
mov esi, [alt_tab_list+ecx*8+4]
|
2012-03-31 18:34:52 +02:00
|
|
|
|
;--------------------------------------
|
|
|
|
|
align 4
|
2007-03-30 15:19:32 +02:00
|
|
|
|
@@:
|
2007-08-02 21:03:24 +02:00
|
|
|
|
inc ecx
|
|
|
|
|
cmp ecx, [alt_tab_list_size]
|
|
|
|
|
jb .loop2
|
2012-03-31 18:34:52 +02:00
|
|
|
|
|
2007-08-02 21:03:24 +02:00
|
|
|
|
cmp eax, -1
|
|
|
|
|
jnz .found
|
2012-03-31 18:34:52 +02:00
|
|
|
|
|
2007-08-02 21:03:24 +02:00
|
|
|
|
or edx, -1
|
|
|
|
|
xor ecx, ecx
|
|
|
|
|
jmp .loop2
|
2012-03-31 18:34:52 +02:00
|
|
|
|
;--------------------------------------
|
|
|
|
|
align 4
|
2007-03-30 15:19:32 +02:00
|
|
|
|
.found:
|
2007-08-02 21:03:24 +02:00
|
|
|
|
mov [current_alt_tab_app], eax
|
|
|
|
|
push eax
|
|
|
|
|
xor edx, edx
|
|
|
|
|
div [max_applications]
|
|
|
|
|
mov [page_list], eax
|
|
|
|
|
mov edi, app_list
|
|
|
|
|
push edi
|
|
|
|
|
mov ecx, 20
|
|
|
|
|
or eax, -1
|
|
|
|
|
rep stosd
|
|
|
|
|
pop edi
|
|
|
|
|
pop ecx
|
|
|
|
|
sub ecx, edx
|
2012-03-31 18:34:52 +02:00
|
|
|
|
;--------------------------------------
|
|
|
|
|
align 4
|
2007-03-30 15:19:32 +02:00
|
|
|
|
@@:
|
2007-08-02 21:03:24 +02:00
|
|
|
|
cmp ecx, [alt_tab_list_size]
|
|
|
|
|
jae redraw_window_tabs
|
2012-03-31 18:34:52 +02:00
|
|
|
|
|
2007-08-02 21:03:24 +02:00
|
|
|
|
mov eax, [alt_tab_list+ecx*8]
|
|
|
|
|
stosd
|
|
|
|
|
inc ecx
|
|
|
|
|
jmp @b
|
2012-03-31 18:34:52 +02:00
|
|
|
|
;--------------------------------------
|
|
|
|
|
align 4
|
2007-03-30 15:19:32 +02:00
|
|
|
|
alt_tab_released:
|
2007-08-02 21:03:24 +02:00
|
|
|
|
mcall 66,5,0,0 ; 㦥 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, 墠<><E5A2A0><EFBFBD> :)
|
2012-04-17 01:46:54 +02:00
|
|
|
|
|
2007-08-02 21:03:24 +02:00
|
|
|
|
or eax, -1
|
|
|
|
|
xchg eax, [current_alt_tab_app]
|
|
|
|
|
mov ecx, [alt_tab_list+eax*8]
|
2012-03-31 18:34:52 +02:00
|
|
|
|
mcall 18,3
|
2012-04-17 01:46:54 +02:00
|
|
|
|
|
2007-08-02 21:03:24 +02:00
|
|
|
|
jmp redraw_window_tabs
|
2012-04-17 01:46:54 +02:00
|
|
|
|
;------------------------------------------------------------------------------
|
2012-03-31 18:34:52 +02:00
|
|
|
|
align 4
|
2007-08-02 21:03:24 +02:00
|
|
|
|
active_process dd 0
|
2006-01-03 10:43:31 +01:00
|
|
|
|
|
2012-04-17 01:46:54 +02:00
|
|
|
|
exit:
|
|
|
|
|
mcall -1
|
|
|
|
|
;------------------------------------------------------------------------------
|
|
|
|
|
START:
|
|
|
|
|
mcall 68,11
|
|
|
|
|
mcall 66,1,1
|
|
|
|
|
|
|
|
|
|
mcall 9,process_info_buffer,-1
|
|
|
|
|
mov ecx,[ebx+30] ; PID
|
|
|
|
|
mcall 18,21
|
|
|
|
|
mov [my_active_slot],eax ; WINDOW SLOT
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
load_libraries l_libs_start,end_l_libs
|
|
|
|
|
|
|
|
|
|
test eax,eax
|
|
|
|
|
jnz exit
|
2006-01-03 10:43:31 +01:00
|
|
|
|
|
2012-04-17 01:46:54 +02:00
|
|
|
|
call Get_ini
|
2006-01-03 10:43:31 +01:00
|
|
|
|
|
2012-04-17 01:46:54 +02:00
|
|
|
|
mcall 48,1,[button_style]
|
|
|
|
|
|
2012-03-31 18:34:52 +02:00
|
|
|
|
mcall 66,4,0,2 ; LShift+RShift
|
|
|
|
|
mcall 66,,,11h ; Ctrl+Shift
|
|
|
|
|
mcall 66,,88,110h ; Alt+Ctrl+F12
|
2012-04-18 23:39:37 +02:00
|
|
|
|
; mcall 66,,75 ; Alt+Ctrl+ArrowLeft DOWN
|
|
|
|
|
mcall 66,,203 ; Alt+Ctrl+ArrowLeft UP
|
|
|
|
|
; mcall 66,,77 ; Alt+Ctrl+ArrowRight DOWN
|
|
|
|
|
mcall 66,,205 ; Alt+Ctrl+ArrowRight UP
|
|
|
|
|
|
2012-04-17 01:46:54 +02:00
|
|
|
|
mcall 66,,91,0h ; RWin DOWN
|
|
|
|
|
mcall 66,,92 ; LWin DOWN
|
|
|
|
|
mcall 66,,219 ; RWin UP
|
|
|
|
|
mcall 66,,220 ; LWin UP
|
|
|
|
|
|
|
|
|
|
; mcall 66,,147,0h ; Win+R UP
|
|
|
|
|
mcall 66,,19,0h ; Win+R DOWN
|
|
|
|
|
|
|
|
|
|
; mcall 66,,23,0h ; Win+I DOWN
|
|
|
|
|
|
|
|
|
|
mcall 66,,32,0h ; Win+D DOWN
|
|
|
|
|
; mcall 66,,160,0h ; Win+D UP
|
|
|
|
|
|
2012-04-18 23:39:37 +02:00
|
|
|
|
mcall 66,,55,0h ; PrintScreen DOWN
|
|
|
|
|
; mcall 66,,183,0h ; PrintScreen UP
|
|
|
|
|
|
2012-04-17 01:46:54 +02:00
|
|
|
|
|
2012-03-31 18:34:52 +02:00
|
|
|
|
; mcall 66,,91,100h ; Alt+LWin
|
|
|
|
|
; mcall 66,,92 ; Alt+RWin
|
|
|
|
|
mcall 66,,62,100h ; Alt+F4
|
|
|
|
|
; mcall 66,,71 ; Alt+Home
|
|
|
|
|
; mcall 66,,72 ; Alt+Up
|
|
|
|
|
mcall 66,,2 ; Alt+1
|
|
|
|
|
mcall 66,,3 ; Alt+2
|
|
|
|
|
mcall 66,,4 ; Alt+3
|
|
|
|
|
mcall 66,,5 ; Alt+4
|
|
|
|
|
mcall 66,,6 ; Alt+5
|
|
|
|
|
mcall 66,,7 ; Alt+6
|
|
|
|
|
mcall 66,,8 ; Alt+7
|
2012-04-18 23:39:37 +02:00
|
|
|
|
mcall 66,,15 ; Alt+Tab DOWN
|
|
|
|
|
mcall 66,,15,101h ; Alt+Shift+Tab DOWN
|
2012-03-31 18:34:52 +02:00
|
|
|
|
mcall 66,,69 ; Alt+Shift+NumLock
|
|
|
|
|
|
|
|
|
|
if caps_lock_check
|
|
|
|
|
xor edx,edx
|
|
|
|
|
mcall 66,4,58
|
|
|
|
|
end if
|
2007-08-02 21:03:24 +02:00
|
|
|
|
mcall 14
|
|
|
|
|
mov [screen_size],eax
|
2006-03-04 12:44:33 +01:00
|
|
|
|
|
2012-04-17 01:46:54 +02:00
|
|
|
|
|
2007-08-02 21:03:24 +02:00
|
|
|
|
mov ecx,eax
|
2008-09-30 20:03:55 +02:00
|
|
|
|
;eax = [xsize]*65536 + [ysize], <20><><EFBFBD>
|
2012-03-31 18:34:52 +02:00
|
|
|
|
shr ecx,16
|
|
|
|
|
and eax,0xFFFF
|
2012-04-17 01:46:54 +02:00
|
|
|
|
|
|
|
|
|
cmp [place_attachment],1
|
|
|
|
|
je @f
|
|
|
|
|
ror eax,16
|
|
|
|
|
add eax,[height]
|
|
|
|
|
rol eax,16
|
|
|
|
|
mov edx,eax
|
|
|
|
|
jmp .selected
|
|
|
|
|
;--------------------------------------
|
|
|
|
|
align 4
|
|
|
|
|
@@:
|
|
|
|
|
sub eax,[height]
|
|
|
|
|
lea edx,[eax-1]
|
|
|
|
|
;--------------------------------------
|
|
|
|
|
align 4
|
|
|
|
|
.selected:
|
2007-08-02 21:03:24 +02:00
|
|
|
|
mcall 48,6
|
2006-01-03 10:43:31 +01:00
|
|
|
|
|
2012-03-31 18:34:52 +02:00
|
|
|
|
mcall 9,process_info_buffer,-1
|
|
|
|
|
mov ecx,[process_info_buffer+30]
|
|
|
|
|
mcall 18,21
|
|
|
|
|
mov [this_slot],eax
|
|
|
|
|
mov [max_slot],255
|
|
|
|
|
;--------------------------------------
|
|
|
|
|
align 4
|
2006-01-03 10:43:31 +01:00
|
|
|
|
start_after_minimize:
|
2012-03-31 18:34:52 +02:00
|
|
|
|
call draw_window
|
2012-04-17 01:46:54 +02:00
|
|
|
|
; call draw_tray
|
2012-03-31 18:34:52 +02:00
|
|
|
|
call draw_running_applications
|
|
|
|
|
|
|
|
|
|
mcall 23,30
|
|
|
|
|
call load_ini
|
|
|
|
|
call fir_lng
|
|
|
|
|
;------------------------------------------------------------------------------
|
|
|
|
|
align 4
|
2006-01-03 10:43:31 +01:00
|
|
|
|
still:
|
2012-04-17 01:46:54 +02:00
|
|
|
|
; call draw_tray
|
|
|
|
|
call draw_time
|
|
|
|
|
call draw_cpu_usage
|
2012-03-31 18:34:52 +02:00
|
|
|
|
call draw_running_applications
|
2006-01-03 10:43:31 +01:00
|
|
|
|
|
2012-03-31 18:34:52 +02:00
|
|
|
|
mcall 18,7 ; check if active window changed
|
2008-09-30 20:03:55 +02:00
|
|
|
|
cmp eax, [last_active_window]
|
|
|
|
|
jz @f
|
|
|
|
|
; need_window_tab:
|
|
|
|
|
; in: ebx->process info
|
|
|
|
|
; out: ZF set <=> do not draw
|
2012-03-31 18:34:52 +02:00
|
|
|
|
mov ebx,[last_active_window]
|
2008-09-30 20:03:55 +02:00
|
|
|
|
mov [prev_active_window], ebx
|
|
|
|
|
mov [last_active_window], eax
|
|
|
|
|
|
|
|
|
|
mov ecx, eax
|
2012-03-31 18:34:52 +02:00
|
|
|
|
mcall 9,process_info_buffer
|
2008-09-30 20:03:55 +02:00
|
|
|
|
|
|
|
|
|
call need_window_tab
|
|
|
|
|
jnz .need_repaint
|
|
|
|
|
|
2012-03-31 18:34:52 +02:00
|
|
|
|
mcall 9,process_info_buffer,[prev_active_window]
|
2008-09-30 20:03:55 +02:00
|
|
|
|
call need_window_tab
|
|
|
|
|
jz @f
|
2012-03-31 18:34:52 +02:00
|
|
|
|
;--------------------------------------
|
|
|
|
|
align 4
|
2008-09-30 20:03:55 +02:00
|
|
|
|
.need_repaint:
|
|
|
|
|
mov dword [active_window_changed], 1
|
2012-03-31 18:34:52 +02:00
|
|
|
|
;--------------------------------------
|
|
|
|
|
align 4
|
2008-09-30 20:03:55 +02:00
|
|
|
|
@@:
|
2012-03-31 18:34:52 +02:00
|
|
|
|
mcall 23,20
|
2012-04-17 01:46:54 +02:00
|
|
|
|
|
|
|
|
|
push eax
|
|
|
|
|
mcall 18,7
|
|
|
|
|
cmp [my_active_slot],eax
|
|
|
|
|
je @f
|
2012-04-18 23:39:37 +02:00
|
|
|
|
|
2012-04-17 01:46:54 +02:00
|
|
|
|
mov [current_active_slot],eax
|
2012-04-18 23:39:37 +02:00
|
|
|
|
;--------------------------------------
|
|
|
|
|
align 4
|
2012-04-17 01:46:54 +02:00
|
|
|
|
@@:
|
|
|
|
|
pop eax
|
|
|
|
|
|
2012-03-31 18:34:52 +02:00
|
|
|
|
cmp eax,1 ; redraw ?
|
|
|
|
|
jz red
|
2008-09-30 20:03:55 +02:00
|
|
|
|
|
2012-04-18 00:58:52 +02:00
|
|
|
|
push eax
|
|
|
|
|
mov eax,[redraw_window_flag]
|
|
|
|
|
test eax,eax
|
|
|
|
|
jz @f
|
2012-04-18 23:39:37 +02:00
|
|
|
|
|
2012-04-18 00:58:52 +02:00
|
|
|
|
call draw_window
|
2012-04-18 23:39:37 +02:00
|
|
|
|
;--------------------------------------
|
|
|
|
|
align 4
|
2012-04-18 00:58:52 +02:00
|
|
|
|
@@:
|
|
|
|
|
pop eax
|
|
|
|
|
|
2012-04-17 01:46:54 +02:00
|
|
|
|
cmp eax,2
|
|
|
|
|
jnz @f
|
|
|
|
|
call handle_key
|
|
|
|
|
jmp .key
|
2012-04-18 23:39:37 +02:00
|
|
|
|
;--------------------------------------
|
|
|
|
|
align 4
|
2012-04-17 01:46:54 +02:00
|
|
|
|
@@:
|
2012-03-31 18:34:52 +02:00
|
|
|
|
cmp eax,3 ; button ?
|
|
|
|
|
jz button
|
2006-01-03 10:43:31 +01:00
|
|
|
|
|
2012-04-17 01:46:54 +02:00
|
|
|
|
; call handle_key
|
2012-04-18 23:39:37 +02:00
|
|
|
|
;--------------------------------------
|
|
|
|
|
align 4
|
2012-04-17 01:46:54 +02:00
|
|
|
|
.key:
|
2012-03-31 18:34:52 +02:00
|
|
|
|
cmp dword [active_window_changed], 0
|
|
|
|
|
jnz red_active
|
2008-09-30 20:03:55 +02:00
|
|
|
|
|
2012-04-17 01:46:54 +02:00
|
|
|
|
call draw_flag ; language
|
2007-08-02 21:03:24 +02:00
|
|
|
|
jmp still
|
2012-04-17 01:46:54 +02:00
|
|
|
|
;------------------------------------------------------------------------------
|
2012-03-31 18:34:52 +02:00
|
|
|
|
align 4
|
|
|
|
|
red_active:
|
|
|
|
|
red:
|
2008-09-30 20:03:55 +02:00
|
|
|
|
mov dword [active_window_changed], 0
|
|
|
|
|
|
2007-08-02 21:03:24 +02:00
|
|
|
|
mcall 14
|
|
|
|
|
movzx ecx,ax
|
|
|
|
|
mov edx,eax
|
|
|
|
|
shr edx,16
|
|
|
|
|
cmp [screen_size.height],ax
|
|
|
|
|
jne @f
|
2012-03-31 18:34:52 +02:00
|
|
|
|
|
2007-08-02 21:03:24 +02:00
|
|
|
|
rol eax,16
|
|
|
|
|
cmp [screen_size.width],ax
|
|
|
|
|
je .lp1
|
2012-04-18 23:39:37 +02:00
|
|
|
|
|
2007-08-02 21:03:24 +02:00
|
|
|
|
rol eax,16
|
2012-04-18 23:39:37 +02:00
|
|
|
|
;--------------------------------------
|
|
|
|
|
align 4
|
2012-03-31 18:34:52 +02:00
|
|
|
|
@@:
|
|
|
|
|
mov [screen_size],eax
|
2012-04-17 01:46:54 +02:00
|
|
|
|
sub ecx,[height]
|
|
|
|
|
mcall 67,0,,,[height]
|
2012-03-31 18:34:52 +02:00
|
|
|
|
;--------------------------------------
|
|
|
|
|
align 4
|
|
|
|
|
.lp1:
|
|
|
|
|
call draw_window
|
2012-04-17 01:46:54 +02:00
|
|
|
|
; call draw_tray
|
2012-03-31 18:34:52 +02:00
|
|
|
|
jmp still
|
2012-04-17 01:46:54 +02:00
|
|
|
|
;------------------------------------------------------------------------------
|
2012-03-31 18:34:52 +02:00
|
|
|
|
align 4
|
|
|
|
|
button:
|
|
|
|
|
mcall 17
|
|
|
|
|
test eax,0xfffffe00 ; is it close button? (signal from @panel)
|
|
|
|
|
jz still ; if so - wait for another event, because @panel shouldn't be closed
|
2006-03-04 12:44:33 +01:00
|
|
|
|
|
2012-03-31 18:34:52 +02:00
|
|
|
|
cmp al, 0
|
|
|
|
|
jnz right_mouse
|
2008-09-30 20:03:55 +02:00
|
|
|
|
|
2012-03-31 18:34:52 +02:00
|
|
|
|
cmp ah,50
|
|
|
|
|
jb no_activate
|
|
|
|
|
cmp ah,70
|
|
|
|
|
jg no_activate
|
2008-09-30 20:03:55 +02:00
|
|
|
|
|
2012-03-31 18:34:52 +02:00
|
|
|
|
movzx ecx,byte ah
|
|
|
|
|
sub ecx,52
|
|
|
|
|
shl ecx,2
|
2008-09-30 20:03:55 +02:00
|
|
|
|
|
2012-03-31 18:34:52 +02:00
|
|
|
|
mov ecx,[app_list+ecx]
|
2012-04-17 01:46:54 +02:00
|
|
|
|
|
|
|
|
|
mcall 9,process_info_buffer
|
2008-09-30 20:03:55 +02:00
|
|
|
|
|
2012-04-17 01:46:54 +02:00
|
|
|
|
test [ebx+70],dword 10b ; window is minimized to panel
|
|
|
|
|
jnz @f
|
|
|
|
|
|
|
|
|
|
cmp ecx,[current_active_slot]
|
|
|
|
|
je .turn_off
|
2012-04-18 23:39:37 +02:00
|
|
|
|
;--------------------------------------
|
|
|
|
|
align 4
|
2012-04-17 01:46:54 +02:00
|
|
|
|
@@:
|
|
|
|
|
mcall 18,3,
|
|
|
|
|
jmp .task_switching
|
|
|
|
|
;--------------------------------------
|
|
|
|
|
align 4
|
|
|
|
|
.turn_off:
|
|
|
|
|
mov edx,ecx
|
|
|
|
|
mcall 18,22,0
|
2012-04-18 23:39:37 +02:00
|
|
|
|
;--------------------------------------
|
|
|
|
|
align 4
|
2012-04-17 01:46:54 +02:00
|
|
|
|
.task_switching:
|
|
|
|
|
mcall 68,1
|
|
|
|
|
jmp still
|
|
|
|
|
;------------------------------------------------------------------------------
|
2012-03-31 18:34:52 +02:00
|
|
|
|
align 4
|
|
|
|
|
right_mouse:
|
|
|
|
|
cmp ah,50
|
|
|
|
|
jb still
|
|
|
|
|
|
|
|
|
|
cmp ah,70
|
|
|
|
|
jg still
|
|
|
|
|
|
|
|
|
|
movzx ecx,byte ah
|
|
|
|
|
sub ecx,52
|
2006-01-03 10:43:31 +01:00
|
|
|
|
|
2012-03-31 18:34:52 +02:00
|
|
|
|
cmp ecx, [app_tab_count]
|
|
|
|
|
jge still
|
2006-01-03 10:43:31 +01:00
|
|
|
|
|
2012-03-31 18:34:52 +02:00
|
|
|
|
shl ecx,2
|
|
|
|
|
mcall 37,0
|
|
|
|
|
mov ebx, eax
|
|
|
|
|
shr eax, 16
|
|
|
|
|
mov [x_coord], ax
|
|
|
|
|
and ebx, 0xFFFF
|
|
|
|
|
mov [y_coord], bx
|
2006-01-03 10:43:31 +01:00
|
|
|
|
|
2012-03-31 18:34:52 +02:00
|
|
|
|
mov ecx,[app_list+ecx] ; ecx->selected app.slot
|
|
|
|
|
mov [n_slot], ecx
|
|
|
|
|
mcall 9,procinfo_for_detect
|
2006-01-03 10:43:31 +01:00
|
|
|
|
|
2012-03-31 18:34:52 +02:00
|
|
|
|
mcall 51,1,context_menu_start,ctx_menu_stack
|
|
|
|
|
|
|
|
|
|
mov [ctx_menu_PID], eax
|
|
|
|
|
jmp still
|
2012-04-17 01:46:54 +02:00
|
|
|
|
;------------------------------------------------------------------------------
|
2012-03-31 18:34:52 +02:00
|
|
|
|
align 4
|
|
|
|
|
no_activate:
|
|
|
|
|
cmp ah,101 ; minimize to left
|
|
|
|
|
je left_button
|
2007-09-20 18:35:52 +02:00
|
|
|
|
|
2012-03-31 18:34:52 +02:00
|
|
|
|
cmp ah,102 ; minimize to right
|
|
|
|
|
je right_button
|
2006-01-03 10:43:31 +01:00
|
|
|
|
|
2012-03-31 18:34:52 +02:00
|
|
|
|
cmp ah, 103
|
2012-04-17 01:46:54 +02:00
|
|
|
|
je clean_desktop_1 ; minimize all windows
|
2012-03-31 18:34:52 +02:00
|
|
|
|
|
2012-04-17 01:46:54 +02:00
|
|
|
|
; cmp ah, 104
|
|
|
|
|
; je restore_desktop ; restore minimized windows
|
2012-03-31 18:34:52 +02:00
|
|
|
|
|
2012-04-17 01:46:54 +02:00
|
|
|
|
; cmp ah, 105
|
|
|
|
|
; je swap_minimized_desktop ; minimize normal windows, and restore minimized windows
|
2012-03-31 18:34:52 +02:00
|
|
|
|
|
|
|
|
|
cmp ah,byte 1 ; start/terminate menu
|
|
|
|
|
jnz noselect
|
|
|
|
|
|
|
|
|
|
call menu_handler
|
|
|
|
|
|
2012-04-17 01:46:54 +02:00
|
|
|
|
jmp still
|
|
|
|
|
;--------------------------------------
|
|
|
|
|
align 4
|
|
|
|
|
clean_desktop_1:
|
|
|
|
|
call clean_desktop
|
2012-03-31 18:34:52 +02:00
|
|
|
|
jmp still
|
|
|
|
|
;--------------------------------------
|
|
|
|
|
align 4
|
|
|
|
|
noselect:
|
2007-08-02 21:03:24 +02:00
|
|
|
|
mov ebx, exec_fileinfo
|
2012-03-31 18:34:52 +02:00
|
|
|
|
cmp ah,byte 2 ; start calendar
|
|
|
|
|
jnz noid15 ;noclock
|
|
|
|
|
|
2012-04-18 23:39:37 +02:00
|
|
|
|
mov esi,calendar_name
|
|
|
|
|
call algorithm_anti_duplication
|
|
|
|
|
test eax,eax
|
2012-04-20 18:27:21 +02:00
|
|
|
|
jz @f
|
2012-04-18 23:39:37 +02:00
|
|
|
|
|
2012-04-20 18:27:21 +02:00
|
|
|
|
mcall 18,3,edi
|
|
|
|
|
jmp still
|
|
|
|
|
;--------------------------------------
|
|
|
|
|
align 4
|
|
|
|
|
@@:
|
2012-04-18 23:39:37 +02:00
|
|
|
|
mov ebx, exec_fileinfo
|
2007-08-02 21:03:24 +02:00
|
|
|
|
mov dword [ebx+21], calendar_name
|
2012-03-31 18:34:52 +02:00
|
|
|
|
mcall 70
|
|
|
|
|
jmp still
|
|
|
|
|
;--------------------------------------
|
|
|
|
|
align 4
|
|
|
|
|
noid15:
|
|
|
|
|
cmp ah,16
|
|
|
|
|
jne noid16
|
|
|
|
|
|
2012-04-17 01:46:54 +02:00
|
|
|
|
; mov ebx, setup_exec
|
|
|
|
|
; mov dword [ebx+8], chlang
|
|
|
|
|
; mcall 70
|
|
|
|
|
call karu
|
|
|
|
|
call draw_flag ; language
|
2012-03-31 18:34:52 +02:00
|
|
|
|
jmp still
|
|
|
|
|
;--------------------------------------
|
|
|
|
|
align 4
|
|
|
|
|
noid16:
|
|
|
|
|
; cmp ah,17
|
|
|
|
|
; jne noid17
|
2007-01-31 16:36:12 +01:00
|
|
|
|
;
|
2012-03-31 18:34:52 +02:00
|
|
|
|
; mov ebx, setup_exec
|
|
|
|
|
; mov dword [ebx+8], syslang
|
|
|
|
|
; mcall 70
|
|
|
|
|
; jmp still
|
|
|
|
|
;--------------------------------------
|
|
|
|
|
;align 4
|
2007-01-31 16:36:12 +01:00
|
|
|
|
; noid17:
|
2012-03-31 18:34:52 +02:00
|
|
|
|
cmp ah,18
|
|
|
|
|
jne noid18
|
|
|
|
|
|
2012-04-18 23:39:37 +02:00
|
|
|
|
mov esi,sysmeter_name
|
|
|
|
|
call algorithm_anti_duplication
|
|
|
|
|
test eax,eax
|
2012-04-20 18:27:21 +02:00
|
|
|
|
jz @f
|
2012-04-18 23:39:37 +02:00
|
|
|
|
|
2012-04-20 18:27:21 +02:00
|
|
|
|
mcall 18,3,edi
|
|
|
|
|
jmp still
|
|
|
|
|
;--------------------------------------
|
|
|
|
|
align 4
|
|
|
|
|
@@:
|
2012-04-18 23:39:37 +02:00
|
|
|
|
mov ebx, exec_fileinfo
|
2007-08-02 21:03:24 +02:00
|
|
|
|
mov dword [ebx+21], sysmeter_name
|
2012-03-31 18:34:52 +02:00
|
|
|
|
mcall 70
|
|
|
|
|
jmp still
|
|
|
|
|
;--------------------------------------
|
|
|
|
|
align 4
|
|
|
|
|
noid18:
|
2012-04-17 01:46:54 +02:00
|
|
|
|
; cmp ah,19 ; speaker
|
|
|
|
|
; jne noid19
|
2012-03-31 18:34:52 +02:00
|
|
|
|
|
2012-04-17 01:46:54 +02:00
|
|
|
|
; mcall 18,8,2
|
|
|
|
|
; mcall 15,3
|
|
|
|
|
; jmp red
|
2012-03-31 18:34:52 +02:00
|
|
|
|
;--------------------------------------
|
2012-04-17 01:46:54 +02:00
|
|
|
|
;align 4
|
|
|
|
|
;noid19:
|
|
|
|
|
; cmp ah,20 ; start system setup
|
|
|
|
|
; jnz noid20
|
|
|
|
|
;
|
|
|
|
|
; mov ebx, setup_exec
|
|
|
|
|
; and dword [ebx+8], 0
|
|
|
|
|
; mcall 70
|
|
|
|
|
; jmp still
|
2012-03-31 18:34:52 +02:00
|
|
|
|
;--------------------------------------
|
2012-04-17 01:46:54 +02:00
|
|
|
|
;align 4
|
|
|
|
|
;noid20:
|
2012-03-31 18:34:52 +02:00
|
|
|
|
cmp ah,21
|
|
|
|
|
jnz noid21
|
|
|
|
|
|
2012-04-18 23:39:37 +02:00
|
|
|
|
cmp [page_list],50
|
2012-03-31 18:34:52 +02:00
|
|
|
|
jnc still
|
|
|
|
|
inc [page_list]
|
|
|
|
|
jmp red
|
|
|
|
|
;--------------------------------------
|
|
|
|
|
align 4
|
|
|
|
|
noid21:
|
|
|
|
|
cmp ah,22
|
|
|
|
|
jnz still
|
|
|
|
|
|
|
|
|
|
cmp [page_list],0
|
|
|
|
|
je still
|
|
|
|
|
|
|
|
|
|
dec [page_list]
|
|
|
|
|
jmp red
|
2012-04-17 01:46:54 +02:00
|
|
|
|
;------------------------------------------------------------------------------
|
2012-03-31 18:34:52 +02:00
|
|
|
|
align 4
|
2007-09-20 18:35:52 +02:00
|
|
|
|
restore_desktop:
|
2012-03-31 18:34:52 +02:00
|
|
|
|
mcall 9,process_info_buffer,-1
|
|
|
|
|
mov [max_slot], eax
|
|
|
|
|
mov ecx, 2
|
|
|
|
|
mov edx, 2
|
|
|
|
|
;--------------------------------------
|
|
|
|
|
align 4
|
2007-09-20 18:35:52 +02:00
|
|
|
|
@@:
|
2012-03-31 18:34:52 +02:00
|
|
|
|
mcall 18, 22
|
|
|
|
|
inc edx
|
|
|
|
|
cmp edx, [max_slot]
|
|
|
|
|
jbe @b
|
2012-04-17 01:46:54 +02:00
|
|
|
|
ret
|
|
|
|
|
;------------------------------------------------------------------------------
|
2012-03-31 18:34:52 +02:00
|
|
|
|
align 4
|
2007-09-20 18:35:52 +02:00
|
|
|
|
clean_desktop:
|
2012-04-26 16:33:09 +02:00
|
|
|
|
mcall 18,23
|
|
|
|
|
test eax,eax
|
2012-04-17 01:46:54 +02:00
|
|
|
|
jnz @f
|
|
|
|
|
call restore_desktop
|
2012-04-18 23:39:37 +02:00
|
|
|
|
;--------------------------------------
|
|
|
|
|
align 4
|
2012-04-17 01:46:54 +02:00
|
|
|
|
@@:
|
2012-03-31 18:34:52 +02:00
|
|
|
|
ret
|
2012-04-17 01:46:54 +02:00
|
|
|
|
;------------------------------------------------------------------------------
|
2012-03-31 18:34:52 +02:00
|
|
|
|
align 4
|
2012-04-17 01:46:54 +02:00
|
|
|
|
conversion_HEX_to_ASCII:
|
|
|
|
|
ror eax,12
|
|
|
|
|
mov ecx,4
|
2012-03-31 18:34:52 +02:00
|
|
|
|
;--------------------------------------
|
|
|
|
|
align 4
|
2012-04-17 01:46:54 +02:00
|
|
|
|
.loop:
|
|
|
|
|
mov bl,al
|
|
|
|
|
rol eax,4
|
|
|
|
|
and bl,0xf
|
|
|
|
|
cmp bl,0xA ; check for ABCDEF
|
|
|
|
|
jae @f
|
2012-03-31 18:34:52 +02:00
|
|
|
|
|
2012-04-17 01:46:54 +02:00
|
|
|
|
add bl,0x30 ; 0-9
|
|
|
|
|
jmp .store
|
2012-03-31 18:34:52 +02:00
|
|
|
|
;--------------------------------------
|
|
|
|
|
align 4
|
2007-03-30 15:19:32 +02:00
|
|
|
|
@@:
|
2012-04-17 01:46:54 +02:00
|
|
|
|
add bl,0x57 ; A-F
|
2012-03-31 18:34:52 +02:00
|
|
|
|
;--------------------------------------
|
|
|
|
|
align 4
|
2012-04-17 01:46:54 +02:00
|
|
|
|
.store:
|
|
|
|
|
; dps "param_store: "
|
|
|
|
|
mov [edi],bl
|
|
|
|
|
inc edi
|
|
|
|
|
dec ecx
|
|
|
|
|
jnz .loop
|
2007-08-02 21:03:24 +02:00
|
|
|
|
ret
|
2012-04-17 01:46:54 +02:00
|
|
|
|
;------------------------------------------------------------------------------
|
2012-03-31 18:34:52 +02:00
|
|
|
|
align 4
|
2012-04-17 01:46:54 +02:00
|
|
|
|
menu_handler:
|
|
|
|
|
mov edi,bootparam
|
|
|
|
|
|
|
|
|
|
mov eax,[menu_button_x.start]
|
|
|
|
|
call conversion_HEX_to_ASCII
|
2008-09-30 20:03:55 +02:00
|
|
|
|
|
2012-04-17 01:46:54 +02:00
|
|
|
|
mov eax,[menu_button_x.size]
|
|
|
|
|
call conversion_HEX_to_ASCII
|
|
|
|
|
|
|
|
|
|
mov eax,[menu_button_y.start]
|
|
|
|
|
call conversion_HEX_to_ASCII
|
|
|
|
|
|
|
|
|
|
mov eax,[menu_button_y.size]
|
|
|
|
|
call conversion_HEX_to_ASCII
|
|
|
|
|
|
|
|
|
|
mov eax,[height]
|
|
|
|
|
call conversion_HEX_to_ASCII
|
|
|
|
|
|
|
|
|
|
mov eax,[place_attachment]
|
|
|
|
|
call conversion_HEX_to_ASCII
|
|
|
|
|
|
|
|
|
|
xor eax,eax ; terminator for boot parameters string
|
|
|
|
|
stosd
|
|
|
|
|
|
|
|
|
|
mov ebx, exec_fileinfo
|
|
|
|
|
mov [ebx+21],dword menu_name
|
|
|
|
|
mov [ebx+8],dword bootparam
|
|
|
|
|
mcall 70
|
|
|
|
|
mov [ebx+8],dword 0
|
|
|
|
|
ret
|
|
|
|
|
;------------------------------------------------------------------------------
|
2012-03-31 18:34:52 +02:00
|
|
|
|
align 4
|
2012-04-17 01:46:54 +02:00
|
|
|
|
draw_small_right:
|
|
|
|
|
pusha
|
|
|
|
|
mcall 12,1
|
2012-03-31 18:34:52 +02:00
|
|
|
|
|
2012-04-17 01:46:54 +02:00
|
|
|
|
xor eax,eax
|
|
|
|
|
mov edx,[wcolor]
|
|
|
|
|
mov esi,edx
|
|
|
|
|
mov edi,edx
|
|
|
|
|
or edx, 0x01000000
|
|
|
|
|
mcall
|
2012-03-31 18:34:52 +02:00
|
|
|
|
|
2012-04-17 01:46:54 +02:00
|
|
|
|
xor ecx,ecx
|
|
|
|
|
mov cx,[height]
|
2012-05-20 21:39:15 +02:00
|
|
|
|
mcall 8,<0,10>,,1,[wcolor]
|
2012-03-31 18:34:52 +02:00
|
|
|
|
|
2012-04-17 01:46:54 +02:00
|
|
|
|
mov ebx,2*65536 ;+6
|
|
|
|
|
mov bx,[height]
|
|
|
|
|
shr bx,1
|
|
|
|
|
sub bx,3
|
2012-04-18 00:58:52 +02:00
|
|
|
|
; mov ecx,[wcolor]
|
|
|
|
|
; add ecx,0x303030
|
|
|
|
|
mov edx,[wcolor]
|
|
|
|
|
mov eax,COLOR_CHANGE_MAGNITUDE_2
|
|
|
|
|
call add_color_change_magnitude
|
|
|
|
|
mov ecx,edx
|
2012-04-17 01:46:54 +02:00
|
|
|
|
mcall 4,,,hidetext,1
|
2012-03-31 18:34:52 +02:00
|
|
|
|
|
|
|
|
|
mcall 12,2
|
|
|
|
|
popa
|
|
|
|
|
ret
|
2012-04-17 01:46:54 +02:00
|
|
|
|
;------------------------------------------------------------------------------
|
2012-03-31 18:34:52 +02:00
|
|
|
|
align 4
|
2006-01-03 10:43:31 +01:00
|
|
|
|
draw_small_left:
|
2012-03-31 18:34:52 +02:00
|
|
|
|
pusha
|
|
|
|
|
mcall 12,1
|
|
|
|
|
|
|
|
|
|
xor eax,eax
|
|
|
|
|
mov edx,[wcolor]
|
|
|
|
|
mov esi,edx
|
|
|
|
|
mov edi,edx
|
|
|
|
|
or edx, 0x01000000
|
|
|
|
|
mcall
|
|
|
|
|
|
|
|
|
|
xor ecx,ecx
|
2012-04-17 01:46:54 +02:00
|
|
|
|
mov cx,[height]
|
2012-03-31 18:34:52 +02:00
|
|
|
|
mcall 8,<0,9>,,1,[wcolor]
|
|
|
|
|
|
2012-04-17 01:46:54 +02:00
|
|
|
|
mov ebx,3*65536 ;+6
|
|
|
|
|
mov bx,[height]
|
|
|
|
|
shr bx,1
|
|
|
|
|
sub bx,3
|
2012-04-18 00:58:52 +02:00
|
|
|
|
; mov ecx,[wcolor]
|
|
|
|
|
; add ecx,0x303030
|
|
|
|
|
mov edx,[wcolor]
|
|
|
|
|
mov eax,COLOR_CHANGE_MAGNITUDE_2
|
|
|
|
|
call add_color_change_magnitude
|
|
|
|
|
mov ecx,edx
|
2012-03-31 18:34:52 +02:00
|
|
|
|
mcall 4,,,hidetext+1,1
|
|
|
|
|
|
|
|
|
|
mcall 12,2
|
|
|
|
|
popa
|
|
|
|
|
ret
|
2012-04-17 01:46:54 +02:00
|
|
|
|
;------------------------------------------------------------------------------
|
2012-03-31 18:34:52 +02:00
|
|
|
|
align 4
|
2006-01-03 10:43:31 +01:00
|
|
|
|
right_button:
|
2012-03-31 18:34:52 +02:00
|
|
|
|
mov [small_draw],dword draw_small_right
|
2006-01-03 10:43:31 +01:00
|
|
|
|
|
2012-03-31 18:34:52 +02:00
|
|
|
|
mcall 14
|
2006-01-03 10:43:31 +01:00
|
|
|
|
|
2012-03-31 18:34:52 +02:00
|
|
|
|
shr eax, 16
|
|
|
|
|
mov ebx, eax
|
|
|
|
|
mov ecx, -1
|
|
|
|
|
mov edx, 9
|
|
|
|
|
sub ebx, edx
|
|
|
|
|
mov esi, -1
|
|
|
|
|
mcall 67
|
|
|
|
|
|
|
|
|
|
call draw_small_right
|
|
|
|
|
jmp small_wait
|
2012-04-17 01:46:54 +02:00
|
|
|
|
;------------------------------------------------------------------------------
|
2012-03-31 18:34:52 +02:00
|
|
|
|
align 4
|
2006-01-03 10:43:31 +01:00
|
|
|
|
left_button:
|
2012-03-31 18:34:52 +02:00
|
|
|
|
mov [small_draw],dword draw_small_left
|
|
|
|
|
|
|
|
|
|
xor ebx,ebx
|
|
|
|
|
mcall 67,,-1,9,-1
|
|
|
|
|
|
|
|
|
|
call draw_small_left
|
|
|
|
|
;--------------------------------------
|
|
|
|
|
align 4
|
|
|
|
|
small_wait:
|
|
|
|
|
mcall 10
|
|
|
|
|
cmp eax,1
|
|
|
|
|
jne no_win
|
|
|
|
|
|
|
|
|
|
call [small_draw]
|
|
|
|
|
jmp small_wait
|
|
|
|
|
;--------------------------------------
|
|
|
|
|
align 4
|
|
|
|
|
no_win:
|
|
|
|
|
cmp eax,2
|
|
|
|
|
jne no_key
|
2006-01-03 10:43:31 +01:00
|
|
|
|
|
2012-03-31 18:34:52 +02:00
|
|
|
|
call handle_key
|
|
|
|
|
jmp small_wait
|
|
|
|
|
;--------------------------------------
|
|
|
|
|
align 4
|
2006-06-30 14:34:18 +02:00
|
|
|
|
no_key:
|
2012-03-31 18:34:52 +02:00
|
|
|
|
mcall 17
|
|
|
|
|
cmp ah,1
|
|
|
|
|
jne no_full
|
2006-01-03 10:43:31 +01:00
|
|
|
|
|
2012-03-31 18:34:52 +02:00
|
|
|
|
mcall 14 ; get screen max x & max y
|
2006-01-03 10:43:31 +01:00
|
|
|
|
|
2012-03-31 18:34:52 +02:00
|
|
|
|
mov edx, eax
|
|
|
|
|
shr edx, 16
|
|
|
|
|
xor ebx, ebx
|
|
|
|
|
mcall 67,,-1,,-1 ; x0 y0 xs ys
|
2006-01-03 10:43:31 +01:00
|
|
|
|
|
2012-03-31 18:34:52 +02:00
|
|
|
|
jmp still
|
|
|
|
|
;--------------------------------------
|
|
|
|
|
align 4
|
|
|
|
|
no_full:
|
|
|
|
|
call menu_handler
|
|
|
|
|
jmp small_wait
|
2012-04-17 01:46:54 +02:00
|
|
|
|
;------------------------------------------------------------------------------
|
|
|
|
|
include 'libini.inc'
|
|
|
|
|
;------------------------------------------------------------------------------
|
2012-11-09 11:42:30 +01:00
|
|
|
|
include '../../../dll.inc'
|
2012-04-17 01:46:54 +02:00
|
|
|
|
;------------------------------------------------------------------------------
|
|
|
|
|
include 'drawappl.inc'
|
|
|
|
|
;------------------------------------------------------------------------------
|
|
|
|
|
include 'drawbutt.inc'
|
|
|
|
|
;------------------------------------------------------------------------------
|
|
|
|
|
include 'drawwind.inc'
|
|
|
|
|
;------------------------------------------------------------------------------
|
|
|
|
|
include 'drawtray.inc'
|
|
|
|
|
;------------------------------------------------------------------------------
|
2007-08-02 21:03:24 +02:00
|
|
|
|
include 'ctx_menu.asm'
|
2012-04-17 01:46:54 +02:00
|
|
|
|
;------------------------------------------------------------------------------
|
|
|
|
|
include 'i_data.inc'
|
|
|
|
|
;------------------------------------------------------------------------------
|
2012-03-31 18:34:52 +02:00
|
|
|
|
IM_END:
|
|
|
|
|
;------------------------------------------------------------------------------
|
2012-04-17 01:46:54 +02:00
|
|
|
|
include 'u_data.inc'
|
|
|
|
|
;------------------------------------------------------------------------------
|
|
|
|
|
I_END:
|
|
|
|
|
;------------------------------------------------------------------------------
|