/programs/system/panel/trunk/build_ru.bat |
---|
File deleted |
\ No newline at end of file |
/programs/system/panel/trunk/readme.txt |
---|
File deleted |
\ No newline at end of file |
/programs/system/panel/trunk/panel.ini |
---|
File deleted |
/programs/system/panel/trunk/KEYMAP.KEY |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Deleted: svn:mime-type |
-application/octet-stream |
\ No newline at end of property |
/programs/system/panel/trunk/makefile |
---|
File deleted |
/programs/system/panel/trunk/libini.inc |
---|
File deleted |
\ No newline at end of file |
/programs/system/panel/trunk/PANEL.ASM |
---|
File deleted |
/programs/system/panel/trunk/drawappl.inc |
---|
File deleted |
/programs/system/panel/trunk/build_en.bat |
---|
File deleted |
\ No newline at end of file |
/programs/system/panel/trunk/drawwind.inc |
---|
File deleted |
/programs/system/panel/trunk/Tupfile.lua |
---|
File deleted |
/programs/system/panel/trunk/i_data.inc |
---|
File deleted |
/programs/system/panel/trunk/MOI.INC |
---|
File deleted |
\ No newline at end of file |
/programs/system/panel/trunk/build_et.bat |
---|
File deleted |
\ No newline at end of file |
/programs/system/panel/trunk/LANG.INI |
---|
File deleted |
/programs/system/panel/trunk/ctx_menu.asm |
---|
File deleted |
\ No newline at end of file |
/programs/system/panel/trunk/drawbutt.inc |
---|
File deleted |
/programs/system/panel/trunk/u_data.inc |
---|
File deleted |
/programs/system/panel/trunk/drawtray.inc |
---|
File deleted |
/programs/system/menu/trunk/menu.asm |
---|
346,7 → 346,7 |
button: ; BUTTON HANDLER |
mcall 17 ; get id |
; dunkaist[ |
test eax,0xfffffe00 ; is it system close button? (close signal from @panel) |
test eax,0xfffffe00 ; is it system close button? (close signal from @taskbar) |
setz byte[close_now] ; set (or not set) close_recursive flag |
jz close ; if so,close all menus |
; dunkaist] |
/programs/system/taskbar/trunk/TASKBAR.ASM |
---|
0,0 → 1,1285 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
; ; |
; TASK PANEL for KolibriOS - Compile with fasm ; |
; ; |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;------------------------------------------------------------------------------ |
; version: 2.25 |
; last update: 14/07/2013 |
; changed by: Marat Zakiyanov aka Mario79, aka Mario |
; changes: Reinstall screen work area after change screen resolution |
;------------------------------------------------------------------------------ |
; version: 2.24 |
; last update: 16/06/2013 |
; changed by: hidnplayr |
; changes: Changed keymap hotkeys to only use left alt |
; (Right alt has special function on some keyboards) |
;------------------------------------------------------------------------------ |
; version: 2.23 |
; last update: 26/04/2012 |
; changed by: Marat Zakiyanov aka Mario79, aka Mario |
; changes: Using new f18.23 - minimize all windows |
;------------------------------------------------------------------------------ |
; 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) |
;------------------------------------------------------------------------------ |
; 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 |
;------------------------------------------------------------------------------ |
; 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. |
;------------------------------------------------------------------------------ |
; 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. |
;------------------------------------------------------------------------------ |
; 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. |
;------------------------------------------------------------------------------ |
format binary as "" |
use32 |
org 0x0 |
db 'MENUET01' ; 8 byte id |
dd 0x01 ; header version |
dd START ; program start |
dd IM_END ; program image size |
dd I_END ; reguired amount of memory - 10 Kb |
dd stack_top ; esp |
dd 0x0 ; boot parameters |
dd path ; application pach |
;------------------------------------------------------------------------------ |
include 'lang.inc' |
include '../../../macros.inc' |
include '../../../proc32.inc' |
;include '../../../debug.inc' |
include 'MOI.INC' ;à ᪫ ¤ª¨ ª« ¢¨ âãàë |
include '../../../develop/libraries/box_lib/load_lib.mac' |
@use_library ;use load lib macros |
;------------------------------------------------------------------------------ |
caps_lock_check fix 1 |
;------------------------------------------------------------------------------ |
time_bgr_color = 0x66cc |
;PANEL_HEIGHT = 18 |
ML_SIZE = 10 |
MR_SIZE = 10 |
if lang eq et |
MENU_SIZE = 60 |
else |
MENU_SIZE = 50 |
end if |
CLD_SIZE = 20 |
TAB_SIZE = 75 ;60 |
TRAY_SIZE = 140 |
CLOCK_SIZE = 40 |
CPU_USAGE_SIZE = 10 |
CHLANG_SIZE = 20 |
PAGE_LIST_SIZE = 36 |
;------------------------------------------------------------------------------ |
align 4 |
handle_key: |
mcall 18,7 |
mov [active_process],eax |
mcall 2 |
; dps "panel key: " |
; dph eax |
; newline |
cmp al, 2 |
jnz begin_1.ret |
mov ebx, exec_fileinfo |
shr eax, 8 |
cmp al, 0 |
je prod |
mov [key_r],al |
sub [key_r],2 |
cmp al, 2 |
jz alter |
cmp al, 3 |
jz alter |
cmp al, 4 |
jz alter |
cmp al, 5 |
jz alter |
cmp al, 6 |
jz alter |
cmp al, 7 |
jz alter |
cmp al, 8 |
jz alter |
;-------------------------------------- |
;align 4 |
;prod: |
if caps_lock_check |
cmp al,58 ;CAPS LOCK DOWN |
jne @f |
pusha |
mcall 26,2,9 |
mov ebx,eax |
mov eax,2 |
; call draw_window ;;;??? |
mov [draw_flag_certainly],1 |
call draw_flag ; language |
popa |
ret |
@@: |
end if |
cmp al, 15 ; Alt+Tab DOWN |
jz alt_tab_pressed |
cmp al, 88 ; Ctrl+Alt+F12 |
jz start_end_application |
cmp al, 91 ; RWin DOWN |
jz set_win_key_flag |
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 |
cmp al, 62 ; Alt+F4 |
jz kill_active_application |
cmp al, 205 |
jz page_list_next |
cmp al, 203 |
jz page_list_prev |
cmp al, 69 ; Alt+Shift+NumLock |
jz start_mousemul_application |
cmp al, 19 ; Win+R |
jz start_run_application |
cmp al, 32 ; Win+D |
jz minimize_all_windows |
cmp al, 55 ; PrintScreen DOWN |
jz start_PrintScreen_application |
;-------------------------------------- |
align 4 |
prod: |
; cmp eax,0x20000 |
; je start_menu_application |
; cmp eax,0x40000 |
; je start_menu_application |
cmp [current_alt_tab_app], -1 |
jz @f |
test ah, 0x30 ; Alt+Tab UP |
jz alt_tab_released |
;-------------------------------------- |
align 4 |
@@: |
; this is hotkey Ctrl+Shift ;or LShift+RShift |
jmp karu |
; mov ebx, setup_exec |
; test ah, 001100b |
; jz change_sys_lang |
;------------------------------------------------------------------------------ |
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 |
;------------------------------------------------------------------------------ |
align 4 |
change_key_lang: |
mov dword [ebx+8], chlang |
mcall 70 |
;-------------------------------------- |
align 4 |
begin_1: |
mov ecx,[active_process] |
mcall 18, 3 |
mcall 5, 25 |
;-------------------------------------- |
align 4 |
.ret: |
ret |
;------------------------------------------------------------------------------ |
;align 4 |
;change_sys_lang: |
; mov dword [ebx+8], syslang |
; mcall 70 |
; jmp begin_1 |
;------------------------------------------------------------------------------ |
align 4 |
start_end_application: |
mov esi,end_name |
call algorithm_anti_duplication |
test eax,eax |
jz @f |
mcall 18,3,edi |
ret |
;-------------------------------------- |
align 4 |
@@: |
mov ebx, exec_fileinfo |
mov dword [ebx+21],end_name |
mcall 70 |
ret |
;------------------------------------------------------------------------------ |
align 4 |
start_mousemul_application: |
mov esi,mousemul_name |
call algorithm_anti_duplication |
test eax,eax |
jz @f |
ret |
;-------------------------------------- |
align 4 |
@@: |
mov ebx, exec_fileinfo |
mov dword [ebx+21],mousemul_name |
mcall 70 |
ret |
;------------------------------------------------------------------------------ |
align 4 |
kill_active_application: |
mcall 72,1,3,1 |
jmp begin_1.ret |
;------------------------------------------------------------------------------ |
align 4 |
start_menu_application: |
call menu_handler |
jmp begin_1.ret |
;------------------------------------------------------------------------------ |
align 4 |
start_run_application: |
cmp [win_key_flag],1 |
je @f |
ret |
;-------------------------------------- |
align 4 |
@@: |
mov [start_menu_flag],1 |
mov esi,run_name |
call algorithm_anti_duplication |
test eax,eax |
jz @f |
mcall 18,3,edi |
ret |
;-------------------------------------- |
align 4 |
@@: |
mov ebx, exec_fileinfo |
mov dword [ebx+21], run_name |
mcall 70 |
jmp begin_1.ret |
;------------------------------------------------------------------------------ |
align 4 |
start_PrintScreen_application: |
mov esi,printscreen_name |
call algorithm_anti_duplication |
test eax,eax |
jz @f |
mcall 18,3,edi |
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 |
minimize_all_windows: |
cmp [win_key_flag],1 |
je @f |
ret |
;-------------------------------------- |
align 4 |
@@: |
mov [start_menu_flag],1 |
call clean_desktop |
ret |
;------------------------------------------------------------------------------ |
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 |
;------------------------------------------------------------------------------ |
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 |
;------------------------------------------------------------------------------ |
align 4 |
alt_tab_pressed: |
; handle Alt+Tab and Alt+Shift+Tab |
mov ebp, eax |
cmp [current_alt_tab_app], -1 |
jnz has_alt_tab_app |
; § ¯®«ï¥¬ â ¡«¨æ㠯ਫ®¦¥¨©, ¯®¤«¥¦ é¨å ¯¥à¥ª«î票î |
xor edx, edx |
mov ebx, procinfo_window_tabs |
mov ecx, 1 |
;-------------------------------------- |
align 4 |
.fill: |
inc ecx |
mcall 9 |
call need_window_tab |
jz @f |
cmp edx, 256 |
jz @f |
mov [alt_tab_list+edx*8], ecx |
movzx esi, word [ebx+4] |
mov [alt_tab_list+edx*8+4], esi |
inc edx |
;-------------------------------------- |
align 4 |
@@: |
cmp ecx,eax |
jb .fill |
mov [alt_tab_list_size], edx |
test edx, edx |
jz begin_1.ret |
mcall 66,4,0,0 ; «®¢¨¬ ¬®¬¥â ®â¯ã᪠¨ï ¢á¥å ã¯à ¢«ïîé¨å ª« ¢¨è |
test eax, eax |
jnz begin_1.ret |
xor edx, edx |
mov eax, [alt_tab_list+4] |
xor ecx, ecx |
inc ecx |
;-------------------------------------- |
align 4 |
.findmax: |
cmp [alt_tab_list+ecx*8+4], eax |
jb @f |
mov edx, ecx |
mov eax, [alt_tab_list+ecx*8+4] |
;-------------------------------------- |
align 4 |
@@: |
inc ecx |
cmp ecx, [alt_tab_list_size] |
jb .findmax |
mov [current_alt_tab_app], edx |
;-------------------------------------- |
align 4 |
has_alt_tab_app: |
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 |
or esi, -1 |
;-------------------------------------- |
align 4 |
.loop1: |
cmp [alt_tab_list+ecx*8+4], edx |
jbe @f |
cmp [alt_tab_list+ecx*8+4], esi |
jae @f |
mov eax, ecx |
mov esi, [alt_tab_list+ecx*8+4] |
;-------------------------------------- |
align 4 |
@@: |
inc ecx |
cmp ecx, [alt_tab_list_size] |
jb .loop1 |
cmp eax, -1 |
jnz .found |
xor edx, edx |
xor ecx, ecx |
jmp .loop1 |
;-------------------------------------- |
align 4 |
.notshift: |
xor esi, esi |
;-------------------------------------- |
align 4 |
.loop2: |
cmp [alt_tab_list+ecx*8+4], edx |
jae @f |
cmp [alt_tab_list+ecx*8+4], esi |
jbe @f |
mov eax, ecx |
mov esi, [alt_tab_list+ecx*8+4] |
;-------------------------------------- |
align 4 |
@@: |
inc ecx |
cmp ecx, [alt_tab_list_size] |
jb .loop2 |
cmp eax, -1 |
jnz .found |
or edx, -1 |
xor ecx, ecx |
jmp .loop2 |
;-------------------------------------- |
align 4 |
.found: |
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 |
;-------------------------------------- |
align 4 |
@@: |
cmp ecx, [alt_tab_list_size] |
jae redraw_window_tabs |
mov eax, [alt_tab_list+ecx*8] |
stosd |
inc ecx |
jmp @b |
;-------------------------------------- |
align 4 |
alt_tab_released: |
mcall 66,5,0,0 ; 㦥 ¯®©¬ «¨, å¢ â¨â :) |
or eax, -1 |
xchg eax, [current_alt_tab_app] |
mov ecx, [alt_tab_list+eax*8] |
mcall 18,3 |
jmp redraw_window_tabs |
;------------------------------------------------------------------------------ |
align 4 |
active_process dd 0 |
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 |
call Get_ini |
mcall 48,1,[button_style] |
mcall 66,4,0,2 ; LShift+RShift |
mcall 66,,,11h ; Ctrl+Shift |
mcall 66,,88,110h ; Alt+Ctrl+F12 |
; 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 |
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 |
mcall 66,,55,10h ; Ctrl+PrintScreen DOWN |
; mcall 66,,183,10h ; Ctrl+PrintScreen UP |
; mcall 66,,91,100h ; Alt+LWin |
; mcall 66,,92 ; Alt+RWin |
mcall 66,,62,300h ; 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 |
mcall 66,,15 ; Alt+Tab DOWN |
mcall 66,,15,301h ; Alt+Shift+Tab DOWN |
mcall 66,,69 ; Alt+Shift+NumLock |
if caps_lock_check |
xor edx,edx |
mcall 66,4,58 |
end if |
mcall 14 |
mov [screen_size],eax |
call set_work_ares_pf_screen |
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 |
start_after_minimize: |
call draw_window |
; call draw_tray |
call draw_running_applications |
mcall 23,30 |
call load_ini |
call fir_lng |
;------------------------------------------------------------------------------ |
align 4 |
still: |
; call draw_tray |
call draw_time |
call draw_cpu_usage |
call draw_running_applications |
mcall 18,7 ; check if active window changed |
cmp eax, [last_active_window] |
jz @f |
; need_window_tab: |
; in: ebx->process info |
; out: ZF set <=> do not draw |
mov ebx,[last_active_window] |
mov [prev_active_window], ebx |
mov [last_active_window], eax |
mov ecx, eax |
mcall 9,process_info_buffer |
call need_window_tab |
jnz .need_repaint |
mcall 9,process_info_buffer,[prev_active_window] |
call need_window_tab |
jz @f |
;-------------------------------------- |
align 4 |
.need_repaint: |
mov dword [active_window_changed], 1 |
;-------------------------------------- |
align 4 |
@@: |
mcall 23,20 |
push eax |
mcall 18,7 |
cmp [my_active_slot],eax |
je @f |
mov [current_active_slot],eax |
;-------------------------------------- |
align 4 |
@@: |
pop eax |
cmp eax,1 ; redraw ? |
jz red |
push eax |
mov eax,[redraw_window_flag] |
test eax,eax |
jz @f |
call draw_window |
;-------------------------------------- |
align 4 |
@@: |
pop eax |
cmp eax,2 |
jnz @f |
call handle_key |
jmp .key |
;-------------------------------------- |
align 4 |
@@: |
cmp eax,3 ; button ? |
jz button |
; call handle_key |
;-------------------------------------- |
align 4 |
.key: |
cmp dword [active_window_changed], 0 |
jnz red_active |
call draw_flag ; language |
jmp still |
;------------------------------------------------------------------------------ |
align 4 |
set_work_ares_pf_screen: |
;eax = [xsize]*65536 + [ysize] |
mov ecx,eax |
shr ecx,16 |
and eax,0xFFFF |
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] |
mov edx, eax |
;-------------------------------------- |
align 4 |
.selected: |
mcall 48,6 |
ret |
;------------------------------------------------------------------------------ |
align 4 |
red_active: |
red: |
mov dword [active_window_changed], 0 |
mcall 14 |
movzx ecx,ax |
mov edx,eax |
shr edx,16 |
cmp [screen_size.height],ax |
jne @f |
rol eax,16 |
cmp [screen_size.width],ax |
je .lp1 |
rol eax,16 |
;-------------------------------------- |
align 4 |
@@: |
mov [screen_size],eax |
push ecx edx |
call set_work_ares_pf_screen |
pop edx ecx |
sub ecx,[height] |
mcall 67,0,,,[height] |
;-------------------------------------- |
align 4 |
.lp1: |
call draw_window |
; call draw_tray |
jmp still |
;------------------------------------------------------------------------------ |
align 4 |
button: |
mcall 17 |
test eax,0xfffffe00 ; is it close button? (signal from @taskbar) |
jz still ; if so - wait for another event, because @taskbar shouldn't be closed |
cmp al, 0 |
jnz right_mouse |
cmp ah,50 |
jb no_activate |
cmp ah,70 |
jg no_activate |
movzx ecx,byte ah |
sub ecx,52 |
shl ecx,2 |
mov ecx,[app_list+ecx] |
mcall 9,process_info_buffer |
test [ebx+70],dword 10b ; window is minimized to panel |
jnz @f |
cmp ecx,[current_active_slot] |
je .turn_off |
;-------------------------------------- |
align 4 |
@@: |
mcall 18,3, |
jmp .task_switching |
;-------------------------------------- |
align 4 |
.turn_off: |
mov edx,ecx |
mcall 18,22,0 |
;-------------------------------------- |
align 4 |
.task_switching: |
mcall 68,1 |
jmp still |
;------------------------------------------------------------------------------ |
align 4 |
right_mouse: |
cmp ah,50 |
jb still |
cmp ah,70 |
jg still |
movzx ecx,byte ah |
sub ecx,52 |
cmp ecx, [app_tab_count] |
jge still |
shl ecx,2 |
mcall 37,0 |
mov ebx, eax |
shr eax, 16 |
mov [x_coord], ax |
and ebx, 0xFFFF |
mov [y_coord], bx |
mov ecx,[app_list+ecx] ; ecx->selected app.slot |
mov [n_slot], ecx |
mcall 9,procinfo_for_detect |
mcall 51,1,context_menu_start,ctx_menu_stack |
mov [ctx_menu_PID], eax |
jmp still |
;------------------------------------------------------------------------------ |
align 4 |
no_activate: |
cmp ah,101 ; minimize to left |
je left_button |
cmp ah,102 ; minimize to right |
je right_button |
cmp ah, 103 |
je clean_desktop_1 ; minimize all windows |
; cmp ah, 104 |
; je restore_desktop ; restore minimized windows |
; cmp ah, 105 |
; je swap_minimized_desktop ; minimize normal windows, and restore minimized windows |
cmp ah,byte 1 ; start/terminate menu |
jnz noselect |
call menu_handler |
jmp still |
;-------------------------------------- |
align 4 |
clean_desktop_1: |
call clean_desktop |
jmp still |
;-------------------------------------- |
align 4 |
noselect: |
mov ebx, exec_fileinfo |
cmp ah,byte 2 ; start calendar |
jnz noid15 ;noclock |
mov esi,calendar_name |
call algorithm_anti_duplication |
test eax,eax |
jz @f |
mcall 18,2,edi |
jmp still |
;-------------------------------------- |
align 4 |
@@: |
mov ebx, exec_fileinfo |
mov dword [ebx+21], calendar_name |
mcall 70 |
jmp still |
;-------------------------------------- |
align 4 |
noid15: |
cmp ah,16 |
jne noid16 |
; mov ebx, setup_exec |
; mov dword [ebx+8], chlang |
; mcall 70 |
call karu |
call draw_flag ; language |
jmp still |
;-------------------------------------- |
align 4 |
noid16: |
; cmp ah,17 |
; jne noid17 |
; |
; mov ebx, setup_exec |
; mov dword [ebx+8], syslang |
; mcall 70 |
; jmp still |
;-------------------------------------- |
;align 4 |
; noid17: |
cmp ah,18 |
jne noid18 |
mov esi,sysmeter_name |
call algorithm_anti_duplication |
test eax,eax |
jz @f |
mcall 18,2,edi |
jmp still |
;-------------------------------------- |
align 4 |
@@: |
mov ebx, exec_fileinfo |
mov dword [ebx+21], sysmeter_name |
mcall 70 |
jmp still |
;-------------------------------------- |
align 4 |
noid18: |
; cmp ah,19 ; speaker |
; jne noid19 |
; mcall 18,8,2 |
; mcall 15,3 |
; jmp red |
;-------------------------------------- |
;align 4 |
;noid19: |
; cmp ah,20 ; start system setup |
; jnz noid20 |
; |
; mov ebx, setup_exec |
; and dword [ebx+8], 0 |
; mcall 70 |
; jmp still |
;-------------------------------------- |
;align 4 |
;noid20: |
cmp ah,21 |
jnz noid21 |
cmp [page_list],50 |
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 |
;------------------------------------------------------------------------------ |
align 4 |
restore_desktop: |
mcall 9,process_info_buffer,-1 |
mov [max_slot], eax |
mov ecx, 2 |
mov edx, 2 |
;-------------------------------------- |
align 4 |
@@: |
mcall 18, 22 |
inc edx |
cmp edx, [max_slot] |
jbe @b |
ret |
;------------------------------------------------------------------------------ |
align 4 |
clean_desktop: |
mcall 18,23 |
test eax,eax |
jnz @f |
call restore_desktop |
;-------------------------------------- |
align 4 |
@@: |
ret |
;------------------------------------------------------------------------------ |
align 4 |
conversion_HEX_to_ASCII: |
ror eax,12 |
mov ecx,4 |
;-------------------------------------- |
align 4 |
.loop: |
mov bl,al |
rol eax,4 |
and bl,0xf |
cmp bl,0xA ; check for ABCDEF |
jae @f |
add bl,0x30 ; 0-9 |
jmp .store |
;-------------------------------------- |
align 4 |
@@: |
add bl,0x57 ; A-F |
;-------------------------------------- |
align 4 |
.store: |
; dps "param_store: " |
mov [edi],bl |
inc edi |
dec ecx |
jnz .loop |
ret |
;------------------------------------------------------------------------------ |
align 4 |
menu_handler: |
mov edi,bootparam |
mov eax,[menu_button_x.start] |
call conversion_HEX_to_ASCII |
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 |
;------------------------------------------------------------------------------ |
align 4 |
draw_small_right: |
pusha |
mcall 12,1 |
xor eax,eax |
mov edx,[wcolor] |
mov esi,edx |
mov edi,edx |
or edx, 0x01000000 |
mcall |
xor ecx,ecx |
mov cx,[height] |
mcall 8,<0,10>,,1,[wcolor] |
mov ebx,2*65536 ;+6 |
mov bx,[height] |
shr bx,1 |
sub bx,3 |
; mov ecx,[wcolor] |
; add ecx,0x303030 |
mov edx,[wcolor] |
mov eax,COLOR_CHANGE_MAGNITUDE_2 |
call add_color_change_magnitude |
mov ecx,edx |
mcall 4,,,hidetext,1 |
mcall 12,2 |
popa |
ret |
;------------------------------------------------------------------------------ |
align 4 |
draw_small_left: |
pusha |
mcall 12,1 |
xor eax,eax |
mov edx,[wcolor] |
mov esi,edx |
mov edi,edx |
or edx, 0x01000000 |
mcall |
xor ecx,ecx |
mov cx,[height] |
mcall 8,<0,9>,,1,[wcolor] |
mov ebx,3*65536 ;+6 |
mov bx,[height] |
shr bx,1 |
sub bx,3 |
; mov ecx,[wcolor] |
; add ecx,0x303030 |
mov edx,[wcolor] |
mov eax,COLOR_CHANGE_MAGNITUDE_2 |
call add_color_change_magnitude |
mov ecx,edx |
mcall 4,,,hidetext+1,1 |
mcall 12,2 |
popa |
ret |
;------------------------------------------------------------------------------ |
align 4 |
right_button: |
mov [small_draw],dword draw_small_right |
mcall 14 |
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 |
;------------------------------------------------------------------------------ |
align 4 |
left_button: |
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 |
call handle_key |
jmp small_wait |
;-------------------------------------- |
align 4 |
no_key: |
mcall 17 |
cmp ah,1 |
jne no_full |
mcall 14 ; get screen max x & max y |
mov edx, eax |
shr edx, 16 |
xor ebx, ebx |
mcall 67,,-1,,-1 ; x0 y0 xs ys |
jmp still |
;-------------------------------------- |
align 4 |
no_full: |
call menu_handler |
jmp small_wait |
;------------------------------------------------------------------------------ |
include 'libini.inc' |
;------------------------------------------------------------------------------ |
include '../../../dll.inc' |
;------------------------------------------------------------------------------ |
include 'drawappl.inc' |
;------------------------------------------------------------------------------ |
include 'drawbutt.inc' |
;------------------------------------------------------------------------------ |
include 'drawwind.inc' |
;------------------------------------------------------------------------------ |
include 'drawtray.inc' |
;------------------------------------------------------------------------------ |
include 'ctx_menu.asm' |
;------------------------------------------------------------------------------ |
include 'i_data.inc' |
;------------------------------------------------------------------------------ |
IM_END: |
;------------------------------------------------------------------------------ |
include 'u_data.inc' |
;------------------------------------------------------------------------------ |
I_END: |
;------------------------------------------------------------------------------ |
/programs/system/taskbar/trunk/Tupfile.lua |
---|
0,0 → 1,3 |
if tup.getconfig("NO_FASM") ~= "" then return end |
tup.rule("echo lang fix " .. ((tup.getconfig("LANG") == "") and "en" or tup.getconfig("LANG")) .. " > lang.inc", {"lang.inc"}) |
tup.rule({"TASKBAR.ASM", extra_inputs = {"lang.inc"}}, "fasm %f %o " .. tup.getconfig("KPACK_CMD"), "TASKBAR") |
/programs/system/taskbar/trunk/build_en.bat |
---|
0,0 → 1,6 |
@erase lang.inc |
@echo lang fix en >lang.inc |
@fasm -m 16384 taskbar.asm panel |
@erase lang.inc |
@kpack panel |
@pause |
/programs/system/taskbar/trunk/build_et.bat |
---|
0,0 → 1,6 |
@erase lang.inc |
@echo lang fix et >lang.inc |
@fasm -m 16384 taskbar.asm panel |
@erase lang.inc |
@kpack panel |
@pause |
/programs/system/taskbar/trunk/build_ru.bat |
---|
0,0 → 1,6 |
@erase lang.inc |
@echo lang fix ru >lang.inc |
@fasm -m 16384 taskbar.asm panel |
@erase lang.inc |
@kpack panel |
@pause |
/programs/system/taskbar/trunk/libini.inc |
---|
0,0 → 1,230 |
;----------------------------------------------------------------------------- |
Get_ini: |
stdcall dll.Init,[lib_init] |
mov ebx,ini_file_name |
mov esi,path |
mov edi,library_path |
call copy_file_path |
;------------------------------------------------------------------------------ |
; Get taskbar variables |
;------------------------------------------------------------------------------ |
invoke ini_get_int,library_path,aVariables,aPanelHeight,20 |
cmp eax,100 |
ja @f |
cmp eax,10 |
ja .height |
@@: |
mov eax,20 |
.height: |
mov [height],eax |
;-------------------------------------- |
invoke ini_get_int,library_path,aVariables,aPanelWidth,0 |
cmp eax,200 |
ja @f |
mov eax,0 |
@@: |
mov [width],eax |
;-------------------------------------- |
invoke ini_get_int,library_path,aVariables,aSoftenHeight,3 |
cmp eax,10 |
ja @f |
cmp eax,1 |
ja .soften_height |
@@: |
mov eax,3 |
.soften_height: |
mov [soften_height],eax |
;-------------------------------------- |
invoke ini_get_int,library_path,aVariables,aButtonTopOffset,3 |
cmp eax,10 |
ja @f |
cmp eax,1 |
ja .button_top_offset |
@@: |
mov eax,3 |
.button_top_offset: |
mov [button_top_offset],eax |
;-------------------------------------- |
invoke ini_get_int,library_path,aVariables,aButtonBottomOffset,3 |
cmp eax,10 |
ja @f |
cmp eax,1 |
ja .button_bottom_offset |
@@: |
mov eax,3 |
.button_bottom_offset: |
mov [button_bottom_offset],eax |
;------------------------------------------------------------------------------ |
; Get taskbar flags |
;------------------------------------------------------------------------------ |
invoke ini_get_int,library_path,aFlags,aSoftenUp,1 |
cmp eax,2 |
jb @f |
mov eax,1 |
@@: |
mov [soften_up],eax |
;-------------------------------------- |
invoke ini_get_int,library_path,aFlags,aSoftenDown,1 |
cmp eax,2 |
jb @f |
mov eax,1 |
@@: |
mov [soften_down],eax |
;-------------------------------------- |
invoke ini_get_int,library_path,aFlags,aMinimizeLeftButton,1 |
cmp eax,2 |
jb @f |
mov eax,1 |
@@: |
mov [minimize_left],eax |
;-------------------------------------- |
invoke ini_get_int,library_path,aFlags,aMinimizeRightButton,1 |
cmp eax,2 |
jb @f |
mov eax,1 |
@@: |
mov [minimize_right],eax |
;-------------------------------------- |
invoke ini_get_int,library_path,aFlags,aMenuButton,1 |
cmp eax,2 |
jb @f |
mov eax,1 |
@@: |
mov [menu_enable],eax |
;-------------------------------------- |
invoke ini_get_int,library_path,aFlags,aRunApplButtons,1 |
cmp eax,2 |
jb @f |
mov eax,1 |
@@: |
mov [run_appl],eax |
;-------------------------------------- |
invoke ini_get_int,library_path,aFlags,aCleanDesktopButton,1 |
cmp eax,2 |
jb @f |
mov eax,1 |
@@: |
mov [clean_desktop_enable],eax |
;-------------------------------------- |
invoke ini_get_int,library_path,aFlags,aClock,1 |
cmp eax,2 |
jb @f |
mov eax,1 |
@@: |
mov [clock_enable],eax |
;-------------------------------------- |
invoke ini_get_int,library_path,aFlags,aCpuUsage,1 |
cmp eax,2 |
jb @f |
mov eax,1 |
@@: |
mov [cpu_usage_enable],eax |
;-------------------------------------- |
invoke ini_get_int,library_path,aFlags,aChangeLang,1 |
cmp eax,2 |
jb @f |
mov eax,1 |
@@: |
mov [chlang_enable],eax |
;-------------------------------------- |
invoke ini_get_int,library_path,aFlags,aAttachment,1 |
cmp eax,2 |
jb @f |
mov eax,1 |
@@: |
mov [place_attachment],eax |
;-------------------------------------- |
invoke ini_get_int,library_path,aFlags,aButtonsStyle,1 |
cmp eax,2 |
jb @f |
mov eax,1 |
@@: |
mov [button_style],eax |
;-------------------------------------- |
invoke ini_get_color,library_path,aColors,aMenuButton,0x44aa44 |
mov [MenuButton_color],eax |
;-------------------------------------- |
invoke ini_get_color,library_path,aColors,aCleanDesktopButton,0x66cc |
mov [CleanDesktopButton_color],eax |
;-------------------------------------- |
invoke ini_get_color,library_path,aColors,aClock,0x66cc |
mov [Clock_color],eax |
;-------------------------------------- |
invoke ini_get_color,library_path,aColors,aCpuUsage,0x44aa44 |
mov [CpuUsage_color],eax |
;-------------------------------------- |
invoke ini_get_color,library_path,aColors,aCpuUsageBckgr,0xdd2222 |
mov [CpuUsageBckgr_color],eax |
;-------------------------------------- |
invoke ini_get_color,library_path,aColors,aChangeLang,0x66cc |
mov [ChangeLang_color],eax |
;-------------------------------------- |
invoke ini_get_color,library_path,aColors,aPageList,0xffffff |
mov [PageList_color],eax |
;-------------------------------------- |
invoke ini_get_color,library_path,aColors,aPanelText,0xffffff |
mov [PanelText_color],eax |
;-------------------------------------- |
invoke ini_get_color,library_path,aColors,aAltTab,0xff8000 |
mov [AltTab_color],eax |
;-------------------------------------- |
invoke ini_get_str,library_path,aApplicationsPaths,aEnd,end_name,63,Path_def_val |
;-------------------------------------- |
invoke ini_get_str,library_path,aApplicationsPaths,aMenu,menu_name,63,Path_def_val |
;-------------------------------------- |
invoke ini_get_str,library_path,aApplicationsPaths,aRun,run_name,63,Path_def_val |
;-------------------------------------- |
invoke ini_get_str,library_path,aApplicationsPaths,aPrnScr,printscreen_name,63,Path_def_val |
;-------------------------------------- |
invoke ini_get_str,library_path,aApplicationsPaths,aClock,calendar_name,63,Path_def_val |
;-------------------------------------- |
invoke ini_get_str,library_path,aApplicationsPaths,aCpuUsage,sysmeter_name,63,Path_def_val |
;-------------------------------------- |
invoke ini_get_str,library_path,aApplicationsPaths,aMouseEmul,mousemul_name,63,Path_def_val |
ret |
;----------------------------------------------------------------------------- |
copy_file_path: |
xor eax,eax |
@@: |
cld |
lodsb |
stosb |
test eax,eax |
jnz @b |
mov esi,edi |
dec esi |
@@: |
std |
lodsb |
cmp al,'/' |
jnz @b |
mov edi,esi |
add edi,2 |
mov esi,ebx |
@@: |
cld |
lodsb |
stosb |
test eax,eax |
jnz @b |
ret |
;----------------------------------------------------------------------------- |
/programs/system/taskbar/trunk/taskbar.ini |
---|
0,0 → 1,40 |
[Variables] |
PanelHeight=24 |
PanelWidth=0 |
SoftenHeight=5 |
ButtonTopOffset=4 |
ButtonBottOffset=2 |
[Flags] |
SoftenUp=1 |
SoftenDown=0 |
MinLeftButton=1 |
MinRightButton=1 |
MenuButton=1 |
RunApplButtons=1 |
ClnDesktButton=1 |
Clock=1 |
CpuUsage=1 |
ChangeLang=1 |
Attachment=1 |
ButtonsStyle=1 |
[Colors] |
MenuButton=0,100,0 |
ClnDesktButton=0,128,255 |
Clock=0,128,255 |
CpuUsage=0,100,0 |
CpuUsageBckgr=255,0,0 |
ChangeLang=0,128,255 |
PageList=255,255,255 |
Text=255,255,255 |
AltTab=255,128,0 |
[ApplicationsPaths] |
End=/sys/END |
Menu=/sys/@MENU |
Run=/sys/RUN |
PrnScr=/sys/SCRSHOOT |
Clock=/sys/CALENDAR |
CpuUsage=/sys/GMON |
MouseEmul=/sys/MOUSEMUL |
/programs/system/taskbar/trunk/makefile |
---|
0,0 → 1,29 |
#!gmake |
# Macro |
FASM=/opt/bin/fasm |
KPACK=/opt/bin/kpack |
LANG=lang.inc |
FILE=PANEL |
SOURCE=${FILE}.ASM |
OUT=${FILE}.bin |
en: |
echo "lang fix en" > ${LANG} |
${FASM} ${SOURCE} ${OUT} |
${KPACK} ${OUT} |
et: |
echo "lang fix et" > ${LANG} |
${FASM} ${SOURCE} ${OUT} |
${KPACK} ${OUT} |
ru: |
echo "lang fix ru" > ${LANG} |
${FASM} ${SOURCE} ${OUT} |
${KPACK} ${OUT} |
it: |
echo "lang fix it" > ${LANG} |
${FASM} ${SOURCE} ${OUT} |
${KPACK} ${OUT} |
clean: |
rm -f ${LANG} ${OUT} |
/programs/system/taskbar/trunk/MOI.INC |
---|
0,0 → 1,437 |
;------------------------------------------------------------------------------ |
align 4 |
load_ini: |
mov [point2],16h |
mcall 70,get_ini |
mov al,[inicont] |
sub al,30h |
mov [firini],al |
mov [point2],32h |
mcall 70,get_ini |
mov al,[inicont] |
sub al,30h |
mov [lngcrc1],al |
mov [point2],42h |
mcall 70,get_ini |
mov al,[inicont] |
sub al,30h |
mov [lngcrc2],al |
mov [point2],52h |
mcall 70,get_ini |
mov al,[inicont] |
sub al,30h |
mov [lngcrc3],al |
mov [point2],06eh |
mcall 70,get_ini |
mov al,[inicont] |
sub al,30h |
mov [altlng1],al |
mov [point2],07eh |
mcall 70,get_ini |
mov al,[inicont] |
sub al,30h |
mov [altlng2],al |
mov [point2],08eh |
mcall 70,get_ini |
mov al,[inicont] |
sub al,30h |
mov [altlng3],al |
mov [point2],09eh |
mcall 70,get_ini |
mov al,[inicont] |
sub al,30h |
mov [altlng4],al |
mov [point2],0aeh |
mcall 70,get_ini |
mov al,[inicont] |
sub al,30h |
mov [altlng5],al |
mov [point2],0beh |
mcall 70,get_ini |
mov al,[inicont] |
sub al,30h |
mov [altlng6],al |
mov [point2],0ceh |
mcall 70,get_ini |
mov al,[inicont] |
sub al,30h |
mov [altlng7],al |
mov [point2],0deh |
mcall 70,get_ini |
mov al,[inicont] |
sub al,30h |
mov [altlng8],al |
mov [point2],0eeh |
mcall 70,get_ini |
mov al,[inicont] |
sub al,30h |
mov [altlng9],al |
mov [point2],0feh |
mcall 70,get_ini |
mov al,[inicont] |
sub al,30h |
mov [altlng0],al |
ret |
;------------------------------------------------------------------------------ |
align 4 |
fir_lng: |
mov al,[firini] |
sub al,1 |
mov dx,384 |
mul dx |
mov [point],eax |
mcall 70,get_key |
mcall 21,2,1,current_keymap |
inc ecx |
mcall 21,,,current_keymap_shift |
inc ecx |
mcall 21,,,current_keymap_alt |
movzx edx,[firini] |
mcall 21,,9 |
ret |
;------------------------------------------------------------------------------ |
align 4 |
karu: |
mov [draw_flag_certainly],1 |
add [key_r2],1 |
cmp [key_r2],3 |
jb .altes |
mov [key_r2],0 |
;-------------------------------------- |
align 4 |
.altes: |
cmp [key_r2],0 |
je .klt_1 |
cmp [key_r2],1 |
je .klt_2 |
cmp [key_r2],2 |
je .klt_3 |
jmp still |
;-------------------------------------- |
align 4 |
.klt_1: |
mov al,[lngcrc1] |
sub al,1 |
mov [key_r],al |
jmp alted |
;-------------------------------------- |
align 4 |
.klt_2: |
mov al,[lngcrc2] |
sub al,1 |
mov [key_r],al |
jmp alted |
;-------------------------------------- |
align 4 |
.klt_3: |
mov al,[lngcrc3] |
sub al,1 |
mov [key_r],al |
jmp alted |
;------------------------------------------------------------------------------ |
align 4 |
alter: |
mov [draw_flag_certainly],1 |
cmp [key_r],0 |
je .alt_1 |
cmp [key_r],1 |
je .alt_2 |
cmp [key_r],2 |
je .alt_3 |
cmp [key_r],3 |
je .alt_4 |
cmp [key_r],4 |
je .alt_5 |
cmp [key_r],5 |
je .alt_6 |
cmp [key_r],6 |
je .alt_7 |
;-------------------------------------- |
align 4 |
.alt_1: |
mov al,[altlng1] |
cmp al,0 |
je .exit |
sub al,1 |
mov [key_r],al |
jmp alted |
;-------------------------------------- |
align 4 |
.alt_2: |
mov al,[altlng2] |
cmp al,0 |
je .exit |
sub al,1 |
mov [key_r],al |
jmp alted |
;-------------------------------------- |
align 4 |
.alt_3: |
mov al,[altlng3] |
cmp al,0 |
je .exit |
sub al,1 |
mov [key_r],al |
jmp alted |
;-------------------------------------- |
align 4 |
.alt_4: |
mov al,[altlng4] |
cmp al,0 |
je .exit |
sub al,1 |
mov [key_r],al |
jmp alted |
;-------------------------------------- |
align 4 |
.alt_5: |
mov al,[altlng5] |
cmp al,0 |
je .exit |
sub al,1 |
mov [key_r],al |
jmp alted |
;-------------------------------------- |
align 4 |
.alt_6: |
mov al,[altlng6] |
cmp al,0 |
je .exit |
sub al,1 |
mov [key_r],al |
jmp alted |
;-------------------------------------- |
align 4 |
.alt_7: |
mov al,[altlng7] |
cmp al,0 |
je .exit |
sub al,1 |
mov [key_r],al |
jmp alted |
;-------------------------------------- |
align 4 |
.exit: |
ret |
;------------------------------------------------------------------------------ |
align 4 |
alted: |
cmp [key_r],0 |
je alt_1 |
cmp [key_r],1 |
je alt_2 |
cmp [key_r],2 |
je alt_3 |
cmp [key_r],3 |
je alt_4 |
cmp [key_r],4 |
je alt_5 |
cmp [key_r],5 |
je alt_6 |
cmp [key_r],6 |
je alt_7 |
ret |
;------------------------------------------------------------------------------ |
align 4 |
alt_1: |
mov [point],0 ; english |
mcall 70,get_key |
mcall 21,2,1,current_keymap |
inc ecx |
mcall 21,,,current_keymap_shift |
mcall 21,,9,1 ; 1 - english |
ret |
;------------------------------------------------------------------------------ |
align 4 |
alt_2: |
mov [point],384 ;1536 ; finnish |
mcall 70,get_key |
mcall 21,2,1,current_keymap |
inc ecx |
mcall 21,,,current_keymap_shift |
mcall 21,,9,2 ; 2 - finnish |
ret |
;------------------------------------------------------------------------------ |
align 4 |
alt_3: |
mov [point],768 ; german |
mcall 70,get_key |
mcall 21,2,1,current_keymap |
inc ecx |
mcall 21,,,current_keymap_shift |
mcall 21,,9,3 ; 3 - german |
ret |
;------------------------------------------------------------------------------ |
align 4 |
alt_4: |
mov [point],1152 ;384 ; russian |
mcall 70,get_key |
mcall 21,2,1,current_keymap |
inc ecx |
mcall 21,,,current_keymap_shift |
mcall 21,,9,4 ; 4 - russian |
ret |
;------------------------------------------------------------------------------ |
align 4 |
alt_5: |
mov [point],1536 ;1152 ;french |
mcall 70,get_key |
mcall 21,2,1,current_keymap |
inc ecx |
mcall 21,,,current_keymap_shift |
inc ecx |
mcall 21,,,current_keymap_alt |
mcall 21,,9,5 ; 5 - french |
ret |
;------------------------------------------------------------------------------ |
align 4 |
alt_6: |
mov [point],1920 ; estonian |
mcall 70,get_key |
mcall 21,2,1,current_keymap |
inc ecx |
mcall 21,,,current_keymap_shift |
mcall 21,,9,6 ; 6 - estonian |
ret |
;------------------------------------------------------------------------------ |
align 4 |
alt_7: |
mov [point],2304 ; ukrainian |
mcall 70,get_key |
mcall 21,2,1,current_keymap |
inc ecx |
mcall 21,,,current_keymap_shift |
mcall 21,,9,7 ; 7 - ukrainian |
ret |
;------------------------------------------------------------------------------ |
align 4 |
current_keymap: |
rb 128 |
;------------------------------------------------------------------------------ |
align 4 |
current_keymap_shift: |
rb 128 |
;------------------------------------------------------------------------------ |
align 4 |
current_keymap_alt: |
rb 128 |
;------------------------------------------------------------------------------ |
key_r db 0 |
key_r2 db 0 |
key_r3 db 0 |
inicont db 0 |
firini db 0 |
lngcrc1 db 0 |
lngcrc2 db 0 |
lngcrc3 db 0 |
altlng1 db 0 |
altlng2 db 0 |
altlng3 db 0 |
altlng4 db 0 |
altlng5 db 0 |
altlng6 db 0 |
altlng7 db 0 |
altlng8 db 0 |
altlng9 db 0 |
altlng0 db 0 |
;------------------------------------------------------------------------------ |
align 4 |
get_key: dd 0 |
point dd 0 |
dd 0 |
dd 384 |
dd current_keymap |
db 0 |
dd key_file |
;------------------------------------------------------------------------------ |
align 4 |
get_ini: dd 0 |
point2 dd 0 |
dd 0 |
dd 1 |
dd inicont |
db 0 |
dd ini_file |
;------------------------------------------------------------------------------ |
key_file: db '/rd/1/settings/keymap.key',0 |
ini_file: db '/rd/1/settings/lang.ini',0 |
/programs/system/taskbar/trunk/i_data.inc |
---|
0,0 → 1,235 |
;------------------------------------------------------------------------------ |
align 4 |
; DATA |
stripe: |
dd -0x010101 |
dd -0x010101 |
dd -0x020202 |
dd -0x010101 |
dd -0x000000 |
dd 0x000000 |
dd 0x010101 |
dd 0x020202 |
dd 0x010101 |
dd 0x010101 |
m_icon: |
dd 0x0 |
dd 0x808080 |
dd 0x000000 |
dd 0x000000 |
dd 0xffffff |
lsz m_text,\ |
ru, "¥î",\ |
en, "Menu",\ |
et, "MENÜÜ",\ |
sp, "Menu" |
mi_text db 'WAVETETRBGRDGPL ' |
flag_text db 'EnFiGeRuFrEtUa' |
type_lang db 0 |
;sound_flag db 0 |
;button_frames dd 0x0 |
;checks dd -1 |
hidetext db 0x11,0x10,0x1e |
turn_text db '><' |
gpl db 'GPL' |
chlang db 'LANG',0 |
;syslang db 'SLAN',0 |
contrast db 0 |
running_applications dd 0x100 |
max_applications dd 11 |
current_alt_tab_app dd -1 |
page_list dd 0 |
draw_start_position dd 0 |
;b_size_y: dd 0x0 |
ysi dd 0 |
small_draw dd 0x0 |
ptime dd 0x0 |
max_x dd 0x0 |
text db '0123456789' |
page_a1 db '< >' |
page_clean_but db 25,24,18 |
;bte dd 0x0 ;ccddee |
wcolor dd 0x506070 |
sec db ': ' |
;pros db ' ' |
; db ' ' |
screenxy dd 0x0 |
stcount dd 0x0 |
setup_exec: |
dd 7 |
dd 0 |
.cmdline dd 0 |
dd 0 |
dd 0 |
db '/sys/' |
file_sys db 'SETUP',0 |
exec_fileinfo: |
dd 7 |
dd 0 |
dd 0 |
dd 0 |
dd 0 |
db 0 |
.name dd 0 |
bootparam_printscreen db 'DIRECT',0 |
Path_def_val db 'NONE',0 |
this_slot dd 0 ; Slot of this process |
max_slot dd 255 |
;-------------------------------------- |
menu_button_x: |
.start dd 1234 ;0xffff |
.size dd 0x999 |
;-------------------------------------- |
menu_button_y: |
.start dd 0xaa |
.size dd 0xc |
;-------------------------------------- |
;------------------------------------------------------------------------------ |
; INI variables |
width: dd 0 ;305 |
height: dd 30 ;18 |
soften_height: dd 5 |
button_top_offset: dd 0 |
button_bottom_offset: dd 0 |
;------------------------------------------------------------------------------ |
; INI flags |
;buttons dd 1 ; 0 no frames ; 1 frames |
soften_up: dd 1 ; 0 no ; 1 yes |
soften_down: dd 0 ; 0 no ; 1 yes |
minimize_left: dd 0 |
minimize_right: dd 1 |
;icons_position dd 95 ; not used! |
menu_enable: dd 1 |
;tray_enable: dd 0 ; draw cpu usage, time, date |
;graph_text dd 1 ; not used! |
;soften_middle dd 1 ; not used! ; 0 no ; 1 yes |
run_appl: dd 1 ; 0 defaults ; 1 activate |
clean_desktop_enable: dd 1 |
clock_enable: dd 1 |
cpu_usage_enable: dd 1 |
chlang_enable: dd 1 |
place_attachment dd 1 |
button_style dd 1 |
;------------------------------------------------------------------------------ |
page_list_enable: dd 0 |
redraw_window_flag dd 0 |
;------------------------------------------------------------------------------ |
; INI colors |
MenuButton_color dd 0x44aa44 ; Green |
CleanDesktopButton_color dd 0x66cc ; Blue |
Clock_color dd 0x66cc ; Blue |
CpuUsage_color dd 0x44aa44 ; Green |
CpuUsageBckgr_color dd 0xdd2222 ; Red |
ChangeLang_color dd 0x66cc ; Blue |
PageList_color dd 0xffffff ; White |
PanelText_color dd 0xffffff ; White |
AltTab_color dd 0xff8000 ; Orange |
;------------------------------------------------------------------------------ |
aVariables db 'Variables',0 |
aPanelHeight db 'PanelHeight',0 |
aPanelWidth db 'PanelWidth',0 |
aSoftenHeight db 'SoftenHeight',0 |
aButtonTopOffset db 'ButtonTopOffset',0 |
aButtonBottomOffset db 'ButtonBottOffset',0 |
;------------------------------------------------------------------------------ |
aFlags db 'Flags',0 |
aSoftenUp db 'SoftenUp',0 |
aSoftenDown db 'SoftenDown',0 |
aMinimizeLeftButton db 'MinLeftButton',0 |
aMinimizeRightButton db 'MinRightButton',0 |
aMenuButton db 'MenuButton',0 |
aRunApplButtons db 'RunApplButtons',0 |
aCleanDesktopButton db 'ClnDesktButton',0 |
aClock db 'Clock',0 |
aCpuUsage db 'CpuUsage',0 |
aChangeLang db 'ChangeLang',0 |
aPageList db 'PageList',0 |
aAttachment db 'Attachment',0 |
aButtonsStyle db 'ButtonsStyle',0 |
;------------------------------------------------------------------------------ |
aColors db 'Colors',0 |
aCpuUsageBckgr db 'CpuUsageBckgr',0 |
aPanelText db 'Text',0 |
aAltTab db 'AltTab',0 |
;------------------------------------------------------------------------------ |
aApplicationsPaths db 'ApplicationsPaths',0 |
aEnd db 'End',0 |
aMenu db 'Menu',0 |
aRun db 'Run',0 |
aPrnScr db 'PrnScr',0 |
aMouseEmul db 'MouseEmul',0 |
;------------------------------------------------------------------------------ |
plugins_directory db 0 |
ini_file_name db 'settings/panel.ini',0 |
system_dir_Libini db '/sys/lib/libini.obj',0 |
err_message_found_lib2 db 'libini.obj - Not found!',0 |
err_message_import2 db 'libini.obj - Wrong import!',0 |
head_f_i: |
head_f_l db 'Errors of PLugins:',0 |
;------------------------------------------------------------------------------ |
l_libs_start: |
library02 l_libs system_dir_Libini+9, path, library_path, system_dir_Libini, \ |
err_message_found_lib2, head_f_l, Libini_import, err_message_import2, head_f_i, plugins_directory |
end_l_libs: |
;------------------------------------------------------------------------------ |
align 4 |
Libini_import: |
lib_init dd aLib_init |
version_lib_ini dd aVersion_lib_ini |
ini_enum_sections dd aIni_enum_sections |
ini_enum_keys dd aIni_enum_keys |
ini_get_str dd aIni_get_str |
ini_get_int dd aIni_get_int |
ini_get_color dd aIni_get_color |
ini_set_str dd aIni_set_str |
ini_set_int dd aIni_set_int |
ini_set_color dd aIni_set_color |
dd 0 |
dd 0 |
aLib_init db 'lib_init',0 |
aVersion_lib_ini db 'version',0 |
aIni_enum_sections db 'ini_enum_sections',0 |
aIni_enum_keys db 'ini_enum_keys',0 |
aIni_get_str db 'ini_get_str',0 |
aIni_get_int db 'ini_get_int',0 |
aIni_get_color db 'ini_get_color',0 |
aIni_set_str db 'ini_set_str',0 |
aIni_set_int db 'ini_set_int',0 |
aIni_set_color db 'ini_set_color',0 |
;------------------------------------------------------------------------------ |
/programs/system/taskbar/trunk/drawwind.inc |
---|
0,0 → 1,465 |
;------------------------------------------------------------------------------ |
; *************************************************** |
; ********* WINDOW DEFINITIONS AND DRAW ************* |
; *************************************************** |
align 4 |
draw_window: |
pusha |
mov [running_applications],-1 |
mcall 12,1 |
mcall 48,3,system_colours,10*4 |
mov eax, [system_colours+4*6] |
; sub eax, 0x101010 |
; mov [wcolor], eax |
mov edx,[system_colours+4*6] |
mov eax,COLOR_CHANGE_MAGNITUDE |
call subtract_color_change_magnitude |
mov [wcolor], edx |
mcall 14 ; get screen max x & max y |
cmp [width],dword 0 |
je no_def_width |
and eax,0xffff |
mov ebx,[width] |
shl ebx,16 |
add eax,ebx |
;-------------------------------------- |
align 4 |
no_def_width: |
mov ebx,eax |
mov [screenxy],ebx |
shr ebx,16 |
mov ecx,eax |
cmp [place_attachment],1 |
je @f |
xor ecx,ecx |
mov cx,[height] |
dec cx |
jmp .attachment_selected |
;-------------------------------------- |
align 4 |
@@: |
sub ecx,[height] |
inc ecx |
shl ecx,16 |
mov cx,[height] |
dec cx |
;-------------------------------------- |
align 4 |
.attachment_selected: |
xor eax,eax ; DEFINE AND DRAW WINDOW |
mov edx, [wcolor] |
or edx, 0x01000000 ; do not draw the window |
mov esi, [wcolor] |
or esi, 0x01000000 ; unmovable window |
mov edi, [wcolor] |
mov [panel_x_pos], ebx |
mov [panel_y_pos], ecx ; Ïîêà ÷òî òàê. |
mcall |
movzx eax,word [screenxy+2] |
mov [max_x],eax |
call fill_window |
call minimize_left_button |
call minimize_right_button |
call draw_menu_and_clean_desktop |
mov [ptime],0 |
call draw_tray |
call draw_application_buttons |
mov [redraw_window_flag],0 |
mcall 12,2 |
popa |
ret |
;------------------------------------------------------------------------------ |
align 4 |
fill_window: |
movzx ebx,word [screenxy+2] |
xor ecx,ecx |
mov edx,[wcolor] |
; add edx,0x161616 |
mov eax,COLOR_CHANGE_MAGNITUDE_0 |
imul eax,dword [soften_height] |
call subtract_color_change_magnitude |
cmp [soften_up],dword 0 |
je no_su |
;-------------------------------------- |
align 4 |
@@: ; debug.inc has macros with the same name |
; sub edx,0x040404 |
mov eax,COLOR_CHANGE_MAGNITUDE_0 |
call add_color_change_magnitude |
; draw soften_up - the width of 5 pixels |
and edx,0x00FFFFFF |
mcall 38 |
add ecx,1*65536+1 |
cmp cx,[soften_height] ;5 |
jb @r |
;-------------------------------------- |
align 4 |
no_su: |
cmp [soften_down],dword 0 |
je no_sd |
; draw soften_down - the width of 5 pixels |
pusha |
mov esi,[soften_height] |
mov ecx,[height] |
dec ecx |
shl ecx,16 |
add ecx,[height] |
dec ecx |
mov edx,[wcolor] |
mov eax,COLOR_CHANGE_MAGNITUDE_0 |
imul eax,dword [soften_height] |
call subtract_color_change_magnitude |
;-------------------------------------- |
align 4 |
@@: |
mov eax,COLOR_CHANGE_MAGNITUDE_0 |
call add_color_change_magnitude |
and edx,0x00FFFFFF |
mcall 38 |
sub ecx,1*65536+1 |
dec esi |
jnz @r |
popa |
;-------------------------------------- |
align 4 |
no_sd: |
movzx ebx,word [screenxy+2] |
xor ecx,ecx |
cmp [soften_up],dword 0 |
je @f |
add ecx,[soften_height] |
rol ecx,16 |
add ecx,[soften_height] |
;-------------------------------------- |
align 4 |
@@: |
; mov esi,stripe |
mov edx,[wcolor] |
;-------------------------------------- |
align 4 |
newline3: |
and edx,0x00FFFFFF |
mov eax,[height] |
cmp [soften_up],dword 0 |
je @f |
sub eax,[soften_height] |
;-------------------------------------- |
align 4 |
@@: |
cmp [soften_down],dword 0 |
je @f |
sub eax,[soften_height] |
;-------------------------------------- |
align 4 |
@@: |
mov cx,ax |
inc ebx |
mcall 13 |
ret |
;------------------------------------------------------------------------------ |
align 4 |
minimize_left_button: |
cmp [minimize_left],dword 0 |
je .exit |
mov ecx,1 *65536 |
add ecx,[height] |
dec ecx |
mov edx,101 |
; add edx,[button_frames] |
or edx,0x40000000 |
mcall 8,<0,9>,,,[wcolor] ; ABS LEFT |
mov ebx,2*65536 ;+6 |
mov bx,[height] |
shr bx,1 |
sub bx,3 |
; mov ecx,[wcolor] |
; add ecx,0x303030 |
mov edx,[wcolor] |
mov eax,COLOR_CHANGE_MAGNITUDE_2 |
call add_color_change_magnitude |
mov ecx,edx |
mcall 4,,,hidetext,1 ; HIDE TEXT |
;-------------------------------------- |
align 4 |
.exit: |
ret |
;------------------------------------------------------------------------------ |
align 4 |
minimize_right_button: |
cmp [minimize_right],dword 0 |
je .exit |
mov eax,[max_x] |
sub eax,77 |
shl eax,16 |
mov ebx,eax |
add ebx,67 |
mov ecx,1 *65536 |
add ecx,[height] |
dec ecx |
add ebx,68*65536 |
mov bx,10 ;9 |
mov edx,102 |
; add edx,[button_frames] |
or edx,0x40000000 |
mcall 8,,,,[wcolor] ; ABS RIGHT |
mov ebx,[max_x] |
sub ebx,6 |
shl ebx,16 |
mov bx,[height] |
shr bx,1 |
sub bx,3 |
; mov ecx,[wcolor] |
; add ecx,0x303030 |
mov edx,[wcolor] |
mov eax,COLOR_CHANGE_MAGNITUDE_2 |
call add_color_change_magnitude |
mov ecx,edx |
mov esi,1 |
mcall 4,,,hidetext+1 |
;-------------------------------------- |
align 4 |
.exit: |
ret |
;------------------------------------------------------------------------------ |
align 4 |
draw_menu_and_clean_desktop: |
pusha |
; check draw for menu |
cmp [menu_enable],dword 0 |
je no_menu |
; calculate and draw menu |
mov ebx, (0 shl 16) + MENU_SIZE-3 |
; check for left minimize button enabled |
cmp [minimize_left],dword 0 |
je @f |
add ebx, ML_SIZE shl 16 |
;-------------------------------------- |
align 4 |
@@: |
; call calculate_button_y_coordinate_and_size |
mov ecx, [height] |
mov edx, 0x60d1ff01 |
; mov edx, 0xd1ff01 |
; add edx, [button_frames] |
mcall 8,,,,[wcolor] ; MENU BUTTON |
mov eax,ebx |
shr eax,16 |
mov [menu_button_x.start],eax |
mov eax,ebx |
and eax,0xffff |
mov [menu_button_x.size],eax |
mov eax,ecx |
shr eax,16 |
mov [menu_button_y.start],eax |
mov eax,ecx |
and eax,0xffff |
mov [menu_button_y.size],eax |
call calculate_button_y_coordinate_and_size |
mov edx,[MenuButton_color] ;0x44aa44 |
mov esi,[wcolor] |
add ebx,3 shl 16 - 5 |
call draw_appl_button |
add ebx, 6*65536 |
mov bx,[height] |
shr bx,1 |
sub bx,3 |
mov ecx,[PanelText_color] |
or ecx,0x10000000 |
if lang eq et |
mcall 4,,,m_text,5 |
else |
mcall 4,,,m_text,4 |
end if |
;-------------------------------------- |
align 4 |
no_menu: |
; check draw for clean desktop button |
cmp [clean_desktop_enable],dword 0 |
je .exit |
; calculate and draw clean desktop button |
mov ebx, (0 shl 16) + CLD_SIZE-5 |
; check for left minimize button enabled |
cmp [minimize_left],dword 0 |
je @f |
add ebx, ML_SIZE shl 16 |
;-------------------------------------- |
align 4 |
@@: |
; check for menu button enabled |
cmp [menu_enable],dword 0 |
je @f |
add ebx, MENU_SIZE shl 16 |
;-------------------------------------- |
align 4 |
@@: |
; Inserted code for drawing buttons 103, 104, 105 (Clean, Restore, Exchange windows) |
mov esi, dword [system_colours+24] ; drawing buttons |
and esi, 0x00ffffff |
mov edx, 0x60000000 + 103 |
; call calculate_button_y_coordinate_and_size |
mov ecx, [height] |
mcall 8 ;,,<3,13> |
call calculate_button_y_coordinate_and_size |
mov edx,[CleanDesktopButton_color] ;time_bgr_color |
mov esi,[wcolor] |
call draw_appl_button |
; mov ecx, dword [system_colours+28] |
; and ecx, 0x00ffffff |
mov ecx,[PanelText_color] |
add ebx,5 shl 16 |
; mov bx,6 |
mov bx,[height] |
shr bx,1 |
sub bx,2 |
mcall 4,,,page_clean_but,1 |
sub bx,2 |
mcall ,,,page_clean_but+1 |
;-------------------------------------- |
align 4 |
.exit: |
popa |
ret |
;------------------------------------------------------------------------------ |
align 4 |
draw_application_buttons: |
pusha |
cmp [run_appl],dword 0 ; do not draw application buttons |
je .exit |
call calculate_offset_X |
; mcall 14 |
mov eax,[screenxy] |
shr eax,16 |
sub eax,[offset_X] |
; check for left minimize button enabled |
cmp [minimize_right],dword 0 |
je @f |
sub eax, MR_SIZE |
;-------------------------------------- |
align 4 |
@@: |
cmp [clock_enable],dword 0 |
je @f |
sub eax,CLOCK_SIZE |
;-------------------------------------- |
align 4 |
@@: |
cmp [cpu_usage_enable],dword 0 |
je @f |
sub eax,CPU_USAGE_SIZE |
;-------------------------------------- |
align 4 |
@@: |
cmp [chlang_enable],dword 0 |
je @f |
sub eax,CHLANG_SIZE |
;-------------------------------------- |
align 4 |
@@: |
cmp [page_list_enable],dword 0 |
je @f |
sub eax,PAGE_LIST_SIZE |
;-------------------------------------- |
align 4 |
@@: |
mov ebx, TAB_SIZE |
xor edx,edx |
div ebx |
mov [max_applications], eax |
xor edi,edi |
;-------------------------------------- |
align 4 |
.nb: |
mov ebx,edi |
imul ebx,TAB_SIZE |
add ebx,[offset_X] |
shl ebx,16 |
mov bx, TAB_SIZE-1 |
mov edx,edi |
add edx,52 |
or edx,0x60000000 |
; mov ecx, 1*65536 |
; add ecx, [height] |
; sub ecx,3 |
mov ecx, [height] |
mcall 8,,,,[wcolor] |
inc edi |
cmp edi,[max_applications] |
jb .nb |
;-------------------------------------- |
align 4 |
.exit: |
popa |
ret |
;------------------------------------------------------------------------------ |
align 4 |
calculate_offset_X: |
push eax |
xor eax,eax |
; check for left minimize button enabled |
cmp [minimize_left],dword 0 |
je @f |
add eax, ML_SIZE |
;-------------------------------------- |
align 4 |
@@: |
; check for menu button enabled |
cmp [menu_enable],dword 0 |
je @f |
add eax, MENU_SIZE |
;-------------------------------------- |
align 4 |
@@: |
; check for clean desktop button enabled |
cmp [clean_desktop_enable],dword 0 |
je @f |
add eax, CLD_SIZE |
;-------------------------------------- |
align 4 |
@@: |
mov [offset_X],eax |
pop eax |
ret |
;------------------------------------------------------------------------------ |
/programs/system/taskbar/trunk/drawtray.inc |
---|
0,0 → 1,444 |
;------------------------------------------------------------------------------ |
align 4 |
draw_tray: ; draw cpu usage, time, date etc. |
pusha |
call draw_tray_buttons |
call draw_time_skin |
call draw_time |
mov [draw_flag_certainly],1 |
call draw_flag ; language |
call draw_list_button |
popa |
ret |
;------------------------------------------------------------------------------ |
draw_tray_buttons: |
mov [offset_x_tray],0 |
cmp [minimize_right],dword 0 |
je @f |
add [offset_x_tray],MR_SIZE |
;-------------------------------------- |
align 4 |
@@: |
; mov ecx,3 shl 16 |
; add ecx,[height] |
; sub cx,6 |
mov ecx,[height] |
mov esi,[wcolor] |
mov eax,8 |
;-------------------------------------- |
cmp [clock_enable],dword 0 |
je @f |
add [offset_x_tray],CLOCK_SIZE |
mov ebx,[max_x] |
sub ebx,[offset_x_tray] |
shl ebx,16 |
add ebx,CLOCK_SIZE+1 |
mcall ,,,0x60000000+2 ; time/date button |
sub ebx,3 |
mov [pos_x_clock],ebx |
;-------------------------------------- |
align 4 |
@@: |
cmp [cpu_usage_enable],dword 0 |
je @f |
add [offset_x_tray],CPU_USAGE_SIZE |
mov ebx,[max_x] |
sub ebx,[offset_x_tray] |
shl ebx,16 |
add ebx,CPU_USAGE_SIZE+1 |
mcall ,,,0x60000000+18 ;button 18 - sysmeter_name (GMON) |
sub ebx,3 |
mov [pos_x_cpu_usage],ebx |
;-------------------------------------- |
align 4 |
@@: |
cmp [chlang_enable],dword 0 |
je @f |
add [offset_x_tray],CHLANG_SIZE |
mov ebx,[max_x] |
sub ebx,[offset_x_tray] |
shl ebx,16 |
add ebx,CHLANG_SIZE+1 |
mcall ,,,0x60000000+16 ;button 16 - chang language |
sub ebx,3 |
mov [pos_x_cpu_chlang],ebx |
;-------------------------------------- |
align 4 |
@@: |
cmp [page_list_enable],dword 0 |
je @f |
add [offset_x_tray],PAGE_LIST_SIZE |
mov ebx,[max_x] |
sub ebx,[offset_x_tray] |
shl ebx,16 |
add ebx,10 |
mov [pos_x_page_list],ebx |
mcall ,,,0x60000000+22 ;button 22 - page list decrease |
add ebx,24 shl 16 |
mcall ,,,0x60000000+21 ;button 21 - page list decrease |
;-------------------------------------- |
align 4 |
@@: |
ret |
;------------------------------------------------------------------------------ |
align 4 |
draw_time_skin: |
cmp [clock_enable],dword 0 |
je .exit |
mov ebx,[pos_x_clock] |
call calculate_button_y_coordinate_and_size |
mov edx,[Clock_color] ;time_bgr_color |
mov esi,[wcolor] |
call draw_appl_button |
;-------------------------------------- |
align 4 |
.exit: |
ret |
;------------------------------------------------------------------------------ |
align 4 |
draw_time: |
cmp [clock_enable],dword 0 |
je .exit |
mcall 3 |
cmp eax,[ptime] |
jz .exit |
mov [ptime],eax |
;-------------------------------------- |
; draw hours and minutes |
movzx ebx,al |
shr eax,8 |
movzx ecx,al |
shr eax,8 |
movzx edx,al |
; ebx ecx edx h m s |
push ebx |
push ecx |
mov ebx,[pos_x_clock] |
call calculate_button_y_coordinate_and_size |
movzx eax,cx |
shr eax,1 |
sub eax,4 |
shr ecx,16 |
add eax,ecx |
mov bx,ax |
add ebx,18 shl 16 |
; mov ecx,[bte] |
mov ecx,[PanelText_color] |
or ecx,0x40000000 |
mov edx,[esp] ; __:_X |
and edx,15 |
add ebx,10*65536 |
add edx,text |
mcall 4,,,,1,[Clock_color] ;time_bgr_color |
pop edx ; __:X_ |
shr edx,4 |
and edx,15 |
sub ebx,6*65536 |
add edx,text |
mcall |
mov edx,[esp] ; _X:__ |
and edx,15 |
sub ebx,11*65536 |
add edx,text |
mcall |
pop edx ; X_:__ |
shr edx,4 |
and edx,15 |
sub ebx,6*65536 |
add edx,text |
mcall |
;-------------------------------------- |
; draw seconds |
mov ebx,[pos_x_clock] |
call calculate_button_y_coordinate_and_size |
movzx eax,cx |
shr eax,1 |
sub eax,4 |
shr ecx,16 |
add eax,ecx |
mov bx,ax |
add ebx,17 shl 16 |
mcall 3 |
mov ecx,eax |
shr ecx,16 |
and ecx,1 |
; mov edx,[bte] |
mov edx,[PanelText_color] |
sub edx,[Clock_color] ;time_bgr_color;[wcolor] |
imul ecx,edx |
add ecx,[Clock_color] ;time_bgr_color;[wcolor] |
mcall 4,,,sec,1 |
call draw_cpu_usage |
;-------------------------------------- |
align 4 |
.exit: |
ret |
;------------------------------------------------------------------------------ |
align 4 |
draw_list_button: |
cmp [page_list_enable],dword 0 |
je .exit |
; draw page list button "skin" |
mov ebx,[pos_x_page_list] |
mov bx,10 |
call calculate_button_y_coordinate_and_size |
; mov ecx,3 shl 16 |
; add ecx,[height] |
; sub cx,6 |
xor edx,edx |
; mcall 13 |
mov edx,[PageList_color] ;0xffffff |
mov esi,[wcolor] |
call draw_appl_button |
add ebx,24 shl 16 ; 18 shl 16 |
; mcall |
mov edx,[PageList_color] ;0xffffff |
mov esi,[wcolor] |
call draw_appl_button |
; sub ebx,23 shl 16 ; 19 shl 16 |
; sub bx,2 |
; add ecx,1 shl 16 |
; sub ecx,2 |
; mcall ,,,0xffffff |
; add ebx,24 shl 16 |
; mcall |
;-------------------------------------- |
; draw page list button text <> |
mov ebx,[pos_x_page_list] |
add ebx,2 shl 16 |
; mov eax,[height] |
; shr eax,1 |
; sub eax,4 |
; mov bx,ax |
call calculate_button_y_coordinate_and_size |
movzx eax,cx |
shr eax,1 |
sub eax,4 |
shr ecx,16 |
add eax,ecx |
mov bx,ax |
xor ecx,ecx |
mcall 4,,,page_a1,5 |
add ebx,1 shl 16 |
mcall |
;-------------------------------------- |
; draw page list number |
mov edx,ebx |
add edx,9 shl 16 |
mcall 47,0x20000,[page_list],,[system_colours.work_button_text] |
;-------------------------------------- |
align 4 |
.exit: |
ret |
;------------------------------------------------------------------------------ |
align 4 |
draw_cpu_usage: |
cmp [cpu_usage_enable],dword 0 |
je .exit |
pushad |
mov eax,[height] |
sub eax,[button_top_offset] |
sub eax,[button_bottom_offset] |
sub eax,2 |
mov [ysi],eax ;12 |
mcall 18,5 ; TSC / SEC |
shr eax,20 |
push eax |
mcall 18,4 ; IDLE / SEC |
shr eax,20 |
xor edx,edx |
imul eax,[ysi] |
cdq |
pop ebx |
inc ebx |
div ebx |
cmp eax,[ysi] |
jng .no_bug |
mov eax,[ysi] |
;-------------------------------------- |
align 4 |
.no_bug: |
push eax |
mov ebx,[pos_x_cpu_usage] |
mov ecx,[button_top_offset] |
shl ecx,16 |
add ecx,[ysi] |
add ecx,2 |
mov edx,[CpuUsageBckgr_color] ;0xdd2222 |
mov esi,[wcolor] |
call draw_appl_button |
pop eax |
; mov ecx,4 shl 16 |
mov ecx,[button_top_offset] |
inc ecx |
shl ecx,16 |
add ecx,eax |
add ebx,1 shl 16 |
sub ebx,2 |
mcall 13,,,[CpuUsage_color] ;0x44aa44 |
popad |
;-------------------------------------- |
align 4 |
.exit: |
ret |
;------------------------------------------------------------------------------ |
align 4 |
; eax = number (1 or 2) |
; ebx = language id |
draw_flag: |
cmp [chlang_enable],dword 0 |
je .exit |
cmp [draw_flag_certainly],0 |
je .exit |
pusha |
;-------------------------------------- |
; get and draw keyboard layout |
mcall 26,2,9 |
mov ebx,eax |
; mov eax,2 |
mov [type_lang],al |
; eax = 2 BIG |
; eax = 1 small |
mov edx,ebx |
pushad |
mov ebx,[pos_x_cpu_chlang] |
call calculate_button_y_coordinate_and_size |
; cmp [type_lang],1 |
; je .label_1 |
mov edx,[ChangeLang_color] ;time_bgr_color ;0xff ;[wcolor] |
; jmp .label_2 |
;-------------------------------------- |
;align 4 |
;.label_1: |
; mov edx,0x7700 |
;-------------------------------------- |
;align 4 |
;.label_2: |
mov esi,[wcolor] |
call draw_appl_button |
popad |
mov ebx,[pos_x_cpu_chlang] |
mov ax,bx |
shr eax,1 |
shl eax,16 |
add ebx,eax |
sub ebx,6 shl 16 |
call calculate_button_y_coordinate_and_size |
movzx eax,cx |
shr eax,1 |
sub eax,4 |
shr ecx,16 |
add eax,ecx |
mov bx,ax |
; mov ecx,[bte] ; color |
mov ecx,[PanelText_color] |
if caps_lock_check |
; make flag_text 'enfigerufretua' or 'ENFIGERUFRETUA' depending on CapsLock state. |
call flag_text_setup |
end if |
dec edx |
shl edx,1 |
add edx,flag_text |
mcall 4,,,,2 |
popa |
mov [draw_flag_certainly],0 |
;-------------------------------------- |
align 4 |
.exit: |
ret |
;------------------------------------------------------------------------------ |
align 4 |
if caps_lock_check |
flag_text_setup: |
pusha |
mcall 66,3 |
mov edi, flag_text |
mov esi, flag_text_caps_off |
test eax, 0x40 |
jz @f |
add esi, 14 |
;-------------------------------------- |
align 4 |
@@: |
mov ecx, 14 |
rep movsb |
popa |
ret |
;flag_text_caps_off db 'enfigerufretua' |
flag_text_caps_off: |
db 'EnFiGeRuFrEtUa' |
db 'ENFIGERUFRETUA' |
end if |
;------------------------------------------------------------------------------ |
/programs/system/taskbar/trunk/ctx_menu.asm |
---|
0,0 → 1,162 |
;------------------------------------------------------------------------------ |
align 4 |
context_menu_start: |
mcall 40,00100111b |
mov ecx, [ctx_menu_PID] |
mcall 18,21 |
mov ecx, eax |
mcall 18,3 |
call draw_ctx_menu |
;------------------------------------------------------------------------------ |
align 4 |
ctx_menu_still: |
mcall 10 |
cmp eax, 2 |
jz ctx_menu_key |
cmp eax, 3 |
jz ctx_menu_button |
cmp eax, 6 |
jz ctx_menu_mouse |
call draw_ctx_menu |
jmp ctx_menu_still |
;------------------------------------------------------------------------------ |
align 4 |
ctx_menu_mouse: |
mcall 37,2 |
xchg eax,ecx ; ᫨ ¥ ®¤ ¨§ ª®¯®ª ¥ ¦ â ¢®§¢à é ¥¬áï |
; ¢ £« ¢ë© 横« ¯®â®ª |
jecxz ctx_menu_still |
mcall 37,1 |
cmp ax, 0 ; ã⠯஢¥à塞 ¯à®¨§®èñ«-«¨ ª«¨ª § ¯à¥¤¥« ¬¨ ®ª ª®â¥ªá⮣® |
jb ctx_menu_exit ; ¬¥î, ¥á«¨ § ¯à¥¤¥« ¬¨ â® § ªàë¢ ¥¬ ª®â¥ªá⮥ ¬¥î |
cmp ax, 60 ; 41 |
ja ctx_menu_exit |
shr eax, 16 |
cmp ax, 0 |
jb ctx_menu_exit |
cmp ax, 133 |
ja ctx_menu_exit |
jmp ctx_menu_still |
;------------------------------------------------------------------------------ |
align 4 |
ctx_menu_key: |
mcall 2 |
;-------------------------------------- |
align 4 |
ctx_menu_button: |
mcall 17 |
cmp ah, 1 |
jne @f |
; mov eax, 18 |
; mov ebx, 2 |
; mov ecx, [n_slot] |
; jmp .lllxxx |
mcall 18,3,[n_slot] |
mcall 72,1,3,1 |
mcall 68,1 |
jmp ctx_menu_exit |
;-------------------------------------- |
align 4 |
@@: |
cmp ah, 2 |
jne ctx_menu_still |
mov eax, 18 |
mov ebx, 22 |
mov edx, [n_slot] |
xor ecx, ecx |
test [procinfo_for_detect+70],byte 2 |
setnz cl |
add cl, cl |
;-------------------------------------- |
align 4 |
.lllxxx: |
mcall |
jmp ctx_menu_exit |
;-------------------------------------- |
align 4 |
ctx_menu_exit: |
or eax,-1 |
mcall |
;------------------------------------------------------------------------------ |
align 4 |
;func draw_ctx_menu |
draw_ctx_menu: |
mcall 12, 1 |
xor eax, eax |
movzx ebx, [x_coord] |
shl ebx, 16 |
add ebx, 133 |
movzx ecx, [y_coord] |
sub ecx, 60 ; 41 |
shl ecx, 16 |
add ecx, 60 ; 41 |
mov esi, [system_colours + 4] ; sc.grab |
or esi, 0x81000000 |
mcall ,,,[system_colours + 20],,[system_colours] |
mcall 8,<0,133>,<22,17>,0x40000001 |
inc edx |
mcall ,,<40,17> |
mov ecx, [system_colours + 16] ; sc.grab_text |
or ecx, 0x10000000 |
mcall 4,<36,7>,,ctx_menu_title,ctx_menu_title_end - ctx_menu_title |
add ebx, 1 * 65536 |
mcall |
mcall ,<4,28>,0x80000000,ctx_menu_text |
mov edx, ctx_menu_text2 |
test byte [procinfo_for_detect+70], 2 |
jz @f |
mov edx, ctx_menu_text3 |
;-------------------------------------- |
align 4 |
@@: |
add bx, 18 |
mcall |
mcall 12,2 |
ret |
;endf |
;------------------------------------------------------------------------------ |
align 4 |
x_coord rw 1 |
y_coord rw 1 |
n_slot rd 1 |
ctx_menu_PID rd 1 |
;------------------------------------------------------------------------------ |
lsz ctx_menu_text,\ |
ru, <"X ªàëâì Alt + F4",0>,\ |
en, <"X Close Alt + F4",0>,\ |
et, <"X Sulge Alt + F4",0>,\ |
;------------------------------------------------------------------------------ |
lsz ctx_menu_text2,\ |
ru, <25," ¢¥àãâì ",0>,\ |
en, <25," Minimize ",0>,\ |
et, <25," Minimeeri ",0>,\ |
;------------------------------------------------------------------------------ |
lsz ctx_menu_text3,\ |
ru, <24," ®ááâ ®¢¨âì ",0>,\ |
en, <24," Restore ",0>,\ |
et, <24," Taasta ",0> |
;------------------------------------------------------------------------------ |
ctx_menu_title: |
db 'KolibriOS' |
ctx_menu_title_end: |
;------------------------------------------------------------------------------ |
/programs/system/taskbar/trunk/LANG.INI |
---|
0,0 → 1,29 |
[start] |
startlng = 4 |
[comkey] |
ccomkey1 = 1 |
ccomkey2 = 4 |
ccomkey3 = 7 |
[altkey] |
altkey1 = 1 |
altkey2 = 4 |
altkey3 = 7 |
altkey4 = 3 |
altkey5 = 5 |
altkey6 = 6 |
altkey7 = 2 |
altkey8 = 8 |
altkey9 = 0 |
altkey0 = 0 |
[langs] |
1 = En |
2 = Fi |
3 = Ge |
4 = Ru |
5 = Fr |
6 = Et |
7 = Ua |
8 = It |
/programs/system/taskbar/trunk/u_data.inc |
---|
0,0 → 1,109 |
;------------------------------------------------------------------------------ |
align 4 |
last_active_window rd 1 |
prev_active_window rd 1 |
active_window_changed rd 1 |
app_tab_count rd 1 |
alt_tab_list_size rd 1 |
panel_x_pos rd 1 |
panel_y_pos rd 1 |
offset_X rd 1 |
offset_x_tray rd 1 |
pos_x_clock rd 1 |
pos_x_cpu_usage rd 1 |
pos_x_cpu_chlang rd 1 |
pos_x_page_list rd 1 |
active_slot_number rd 1 |
my_active_slot rd 1 |
current_active_slot rd 1 |
screen_size: |
.height rw 1 |
.width rw 1 |
draw_flag_certainly rb 1 |
start_menu_flag rb 1 |
win_key_flag rb 1 |
;------------------------------------------------------------------------------ |
align 4 |
system_colours system_colors ; rd 10 |
;------------------------------------------------------------------------------ |
align 4 |
app_list rd 50 |
;------------------------------------------------------------------------------ |
align 4 |
alt_tab_list rd 256*2 |
;------------------------------------------------------------------------------ |
align 4 |
path: |
rb 1024 |
;----------------------------------------------------------------------------- |
align 4 |
library_path: |
process_info_buffer: |
rb 1024 |
;------------------------------------------------------------------------------ |
align 4 |
procinfo_for_detect: |
rb 1024 |
;------------------------------------------------------------------------------ |
align 4 |
procinfo_window_tabs: |
rb 1024 |
;----------------------------------------------------------------------------- |
align 4 |
bootparam: |
rb 256 |
;------------------------------------------------------------------------------ |
align 4 |
tictable: |
rd 256 |
;------------------------------------------------------------------------------ |
align 4 |
end_name: |
rb 64 |
;------------------------------------------------------------------------------ |
align 4 |
menu_name: |
rb 64 |
;------------------------------------------------------------------------------ |
align 4 |
run_name: |
rb 64 |
;------------------------------------------------------------------------------ |
align 4 |
printscreen_name: |
rb 64 |
;------------------------------------------------------------------------------ |
align 4 |
calendar_name: |
rb 64 |
;------------------------------------------------------------------------------ |
align 4 |
sysmeter_name: |
rb 64 |
;------------------------------------------------------------------------------ |
align 4 |
mousemul_name: |
rb 64 |
;------------------------------------------------------------------------------ |
align 4 |
rb 256 |
detect_stack: |
;------------------------------------------------------------------------------ |
align 4 |
rb 256 |
ctx_menu_stack: |
;------------------------------------------------------------------------------ |
align 4 |
rb 1024 |
stack_top: |
;------------------------------------------------------------------------------ |
/programs/system/taskbar/trunk/drawappl.inc |
---|
0,0 → 1,229 |
;------------------------------------------------------------------------------ |
align 4 |
draw_running_applications: |
pusha |
cmp [run_appl],dword 0 |
je .exit |
call calculate_applications |
cmp edi,[running_applications] |
jne .noret |
popa |
ret |
;-------------------------------------- |
align 4 |
.noret: |
call draw_window |
mov [running_applications],edi |
call redraw_window_tabs |
;-------------------------------------- |
align 4 |
.exit: |
popa |
ret |
;------------------------------------------------------------------------------ |
align 4 |
need_window_tab: |
; in: ebx->process info |
; out: ZF set <=> do not draw |
cmp byte [ebx+10], '@' |
jz .nodraw |
; do not draw undefined (zero-sized) windows |
cmp dword [ebx+42], 0 |
jnz @f |
cmp dword [ebx+46], 0 |
jz .nodraw |
;-------------------------------------- |
align 4 |
@@: |
; do not draw OpenDialog windows |
push edi |
mov edi, dword [ebx+10] |
or edi, 0x20202020 |
cmp edi, 'open' |
jne @f |
mov edi, dword [ebx+14] |
or edi, 0x20202020 |
cmp dword [ebx+14], 'dial' |
jne @f |
pop edi |
jmp .nodraw |
;-------------------------------------- |
align 4 |
@@: |
pop edi |
cmp dword [ebx+10], 'ICON' |
jnz @f |
cmp [ebx+42], dword 51 |
jnz @f |
cmp [ebx+46], dword 51 |
jz .nodraw |
;-------------------------------------- |
align 4 |
@@: |
cmp [ebx+10], dword ' ' |
;-------------------------------------- |
align 4 |
.nodraw: |
ret |
;------------------------------------------------------------------------------ |
align 4 |
calculate_applications: |
mov eax,[max_applications] |
mul [page_list] |
test eax,eax |
je @f |
inc eax |
;-------------------------------------- |
align 4 |
@@: |
mov [draw_start_position],eax |
mov edi,app_list |
mov ecx,20 ; show max 20 application ???!!! |
mov eax,-1 |
cld |
rep stosd |
mov edi,0 |
mov ecx,2 |
;-------------------------------------- |
align 4 |
cnewpr: |
mcall 9,procinfo_window_tabs |
call need_window_tab |
jz cnorpl |
sub [draw_start_position], 1 |
jg cnorpl |
mov [app_list+edi*4],ecx |
inc edi |
;-------------------------------------- |
align 4 |
cnorpl: |
inc ecx |
cmp eax,ecx |
jge cnewpr |
mov [app_tab_count], edi |
ret |
;------------------------------------------------------------------------------ |
align 4 |
redraw_window_tabs: |
xor edi, edi |
mov [contrast], 0 |
push ebp |
mcall 18,7 |
mov ebp,eax |
call calculate_offset_X |
;-------------------------------------- |
align 4 |
.loop: |
mov ecx,[app_list+edi*4] |
cmp ecx,-1 |
jz .done |
mov [active_slot_number],ecx |
mcall 9,procinfo_window_tabs |
imul ebx, edi, TAB_SIZE |
add ebx,[offset_X] |
add ebx,2 |
shl ebx,16 |
add ebx,TAB_SIZE-2 ;54 |
push edi |
mov edx,[system_colours.work_button] |
xor edi,edi |
cmp ebp,[active_slot_number] ;ecx ; ecx=active slot number |
jnz @f |
mov edx,[wcolor] |
inc edi |
;-------------------------------------- |
align 4 |
@@: |
mov esi,[current_alt_tab_app] |
cmp esi,-1 |
jz @f |
cmp ecx,[alt_tab_list+esi*8] |
jnz @f |
mov edx,[AltTab_color] ;0xFF8000 ; current select for ALT+Tab |
;-------------------------------------- |
align 4 |
@@: |
call calculate_button_y_coordinate_and_size |
mov esi,[wcolor] |
call draw_appl_button |
pop edi |
;------------------------------------------------------------------------------ |
add ebx,4 shl 16 |
mov bx,cx ;[height] |
shr bx,1 |
sub bx,4 |
shr ecx,16 |
add bx,cx |
mov edx, procinfo_window_tabs+10 |
mcall 4,,[system_colours.work_button_text],,11 |
;-------------------------------------- |
align 4 |
.nodraw: |
inc edi |
cmp edi, [max_applications] |
jb .loop |
mov ecx,[app_list+edi*4] |
cmp ecx,-1 |
jz .done |
xor eax,eax |
cmp [page_list],eax |
jne @f |
inc eax |
cmp [page_list_enable],eax |
je @f |
mov [page_list_enable],eax |
mov [redraw_window_flag],eax |
;-------------------------------------- |
align 4 |
@@: |
pop ebp |
ret |
;-------------------------------------- |
align 4 |
.done: |
xor eax,eax |
cmp [page_list],eax |
jne @f |
cmp [page_list_enable],eax |
je @f |
mov [page_list_enable],eax |
inc eax |
mov [redraw_window_flag],eax |
;-------------------------------------- |
align 4 |
@@: |
pop ebp |
ret |
;------------------------------------------------------------------------------ |
/programs/system/taskbar/trunk/drawbutt.inc |
---|
0,0 → 1,200 |
;------------------------------------------------------------------------------ |
align 4 |
draw_appl_button: |
; in: |
; ebx = [x]*65536 + [size x] |
; ecx = [y]*65536 + [size y] |
; edx = internal color 0xRRGGBB |
; esi = external color 0xRRGGBB |
; edi = 0 up or 1 down |
COLOR_CHANGE_MAGNITUDE_0 = 0x080808 |
COLOR_CHANGE_MAGNITUDE = 0x101010 |
COLOR_CHANGE_MAGNITUDE_1 = 0x202020 |
COLOR_CHANGE_MAGNITUDE_2 = 0x404040 |
pusha |
add ebx,2 shl 16 |
sub bx,4 |
add ecx,2 shl 16 |
sub cx,4 |
mcall 13 |
;------------------------------------------------------------------------------ |
; mov edx,esi |
test edi,edi |
jnz @f |
mov eax,COLOR_CHANGE_MAGNITUDE |
call add_color_change_magnitude |
jmp .1 |
;-------------------------------------- |
align 4 |
@@: |
mov eax,COLOR_CHANGE_MAGNITUDE |
call subtract_color_change_magnitude |
;-------------------------------------- |
align 4 |
.1: |
call draw_four_extreme_lines |
;------------------------------------------------------------------------------ |
mov edx,esi |
mov eax,COLOR_CHANGE_MAGNITUDE_2 |
call subtract_color_change_magnitude |
sub ecx,1 shl 16 |
add ecx,2 |
sub ebx,1 shl 16 |
add ebx,2 |
call draw_four_extreme_lines |
;------------------------------------------------------------------------------ |
popa |
ret |
;------------------------------------------------------------------------------ |
align 4 |
draw_four_extreme_lines: |
; top left point |
push ebx ecx |
shr ebx,16 |
shr ecx,16 |
mcall 1 |
pop ecx ebx |
; bottom right point |
push ebx ecx |
movzx eax,bx |
shr ebx,16 |
add ebx,eax |
dec ebx |
movzx eax,cx |
shr ecx,16 |
add ecx,eax |
dec ecx |
mcall 1 |
pop ecx ebx |
;-------------------------------------- |
; bottom left point |
push ebx ecx |
shr ebx,16 |
movzx eax,cx |
shr ecx,16 |
add ecx,eax |
dec ecx |
mcall 1 |
pop ecx ebx |
;-------------------------------------- |
; top right point |
push ebx ecx |
movzx eax,bx |
shr ebx,16 |
add ebx,eax |
dec ebx |
shr ecx,16 |
mcall 1 |
pop ecx ebx |
;-------------------------------------- |
; top line |
push ecx |
sub ecx,1 shl 16 |
mov cx,1 |
mcall 13 |
pop ecx |
; bottom line |
push ecx |
mov ax,cx |
shl eax,16 |
add ecx,eax |
mov cx,1 |
mcall 13 |
pop ecx |
; left line |
push ebx |
sub ebx,1 shl 16 |
mov bx,1 |
mcall 13 |
pop ebx |
; right line |
push ebx |
mov ax,bx |
shl eax,16 |
add ebx,eax |
mov bx,1 |
mcall 13 |
pop ebx |
ret |
;------------------------------------------------------------------------------ |
align 4 |
subtract_color_change_magnitude: |
; in: |
; edx = original color |
; eax = magnitude |
; out: |
; edx = processed color |
sub dl,al |
jae @f |
xor dl,dl |
;-------------------------------------- |
align 4 |
@@: |
ror edx,8 |
ror eax,8 |
sub dl,al |
jae @f |
xor dl,dl |
;-------------------------------------- |
align 4 |
@@: |
ror edx,8 |
ror eax,8 |
sub dl,al |
jae @f |
xor dl,dl |
;-------------------------------------- |
align 4 |
@@: |
rol edx,16 |
ret |
;------------------------------------------------------------------------------ |
align 4 |
add_color_change_magnitude: |
; in: |
; edx = original color |
; eax = magnitude |
; out: |
; edx = processed color |
add dl,al |
jae @f |
mov dl,0xff |
;-------------------------------------- |
align 4 |
@@: |
ror edx,8 |
ror eax,8 |
add dl,al |
jae @f |
mov dl,0xff |
;-------------------------------------- |
align 4 |
@@: |
ror edx,8 |
ror eax,8 |
add dl,al |
jae @f |
mov dl,0xff |
;-------------------------------------- |
align 4 |
@@: |
rol edx,16 |
ret |
;------------------------------------------------------------------------------ |
align 4 |
calculate_button_y_coordinate_and_size: |
mov ecx,[button_top_offset] |
shl ecx,16 |
add ecx,[height] |
sub ecx,[button_top_offset] |
sub ecx,[button_bottom_offset] |
ret |
;------------------------------------------------------------------------------ |
/programs/system/taskbar/trunk/KEYMAP.KEY |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/programs/system/taskbar/trunk/readme.txt |
---|
0,0 → 1,9 |
Òåïåðü ïàíåëü ÷èòàåò íàñòðîéêè ïåðåêëþ÷àòåëÿ ðàñêëàäîê ñ âíåøíåãî ôàéëà lang.ini, |
à ñàìè ðàñêëàäêè ñ ôàéëà keymap.key |
keymap.key ïðåäñòàâëÿåò ñîáîé ôàéë ñ áëîêîâ äàííûõ ïî 384 áàéòà, 128 áàéò ïðîñòàÿ |
ðàñêëàäêà, ïîòîì 128 áàéò ñ shift,è 128 ñ alt |
â lang.ini ÿçûêè îáîçíà÷åíû öèôðàìè, ñîãëàñíî ñïèñêà. ìîæíî çàäàòü íà÷àëüíûé ÿçûê, |
àçûêè ïåðåêëþ÷àþùèåñÿ ïî ctrl+shift, (èõ 3 øòóêè) è ÿçûêè, ðàáîòàþùèå ñ alt+öèôðà |
(7 øòóê, ïîêà âñå ðàñêëàäêè, ÷òî åñòü â íàëè÷èè) ïîäïðàâèë ðàñêëàäêó ôðàíöóçñêîãî. |
lang.ini, è keymap.key êèíóòü â îáðàç, âìåñòå ñ ïàíåëüþ... íàñòðîéêè ïðèìåíÿþòñÿ |
ïîñëå ïåðåçàãðóçêè...:) |