Decreased number of repaints of window

git-svn-id: svn://kolibrios.org@870 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
barsuk 2008-09-30 18:03:55 +00:00
parent 637784b2c1
commit 2c7ef5e739
10 changed files with 619 additions and 154 deletions

Binary file not shown.

View File

@ -15,7 +15,8 @@ use32
dd 0x0,0x0 ; param, icon dd 0x0,0x0 ; param, icon
include 'lang.inc' include 'lang.inc'
include '..\..\..\macros.inc' include 'macros.inc'
include 'moi.inc' ;à áª« ¤ª¨ ª« ¢¨ âãàë
width dd 305 width dd 305
buttons dd 1 ; 0 no frames ; 1 frames buttons dd 1 ; 0 no frames ; 1 frames
@ -32,6 +33,7 @@ icons dd 1 ; 0 defaults ; 1 activate
PANEL_HEIGHT = 18 PANEL_HEIGHT = 18
handle_key: handle_key:
mcall 18, 7 mcall 18, 7
@ -42,6 +44,25 @@ handle_key:
jnz begin_1.ret jnz begin_1.ret
mov ebx, exec_fileinfo mov ebx, exec_fileinfo
shr eax, 8 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
prod:
cmp al, 15 cmp al, 15
jz alt_tab_pressed jz alt_tab_pressed
cmp al, 88 cmp al, 88
@ -62,7 +83,9 @@ handle_key:
jz alt_tab_released jz alt_tab_released
@@: @@:
; this is hotkey Ctrl+Shift ;or LShift+RShift ; this is hotkey Ctrl+Shift ;or LShift+RShift
mov ebx, setup_exec
jmp karu
; mov ebx, setup_exec
; test ah, 001100b ; test ah, 001100b
; jz change_sys_lang ; jz change_sys_lang
change_key_lang: change_key_lang:
@ -111,7 +134,7 @@ begin_1:
; and ebx,0x0000FFFF ; and ebx,0x0000FFFF
; cmp ebx,'EL' ; cmp ebx,'EL'
; je no_kill ; je no_kill
; kill_app: ; kill_app:
; pop ecx ; pop ecx
; mcall 18, 2 ; mcall 18, 2
; jmp if_kill ; jmp if_kill
@ -119,7 +142,7 @@ begin_1:
; pop eax ; pop eax
; if_kill: ; if_kill:
; ;// }SPraid.simba ; ;// }SPraid.simba
mcall 72,1,3,1 mcall 72,1,3,1
jmp begin_1.ret jmp begin_1.ret
@ -311,21 +334,31 @@ calendarmusic: db 0x85,0x37,0x85,0x48,0
START: START:
mov eax, 51 ; mov eax, 51
mov ebx, 1 ; mov ebx, 1
mov ecx, detect_start ; mov ecx, detect_start
mov edx, detect_stack ; mov edx, detect_stack
int 0x40 ; int 0x40
mcall 66,4,0,2 ; LShift+RShift mcall 66,4,0,2 ; LShift+RShift
mcall 66, , ,11h ; Ctrl+Shift mcall 66, , ,11h ; Ctrl+Shift
mcall 66,,88,110h ; Alt+Ctrl+F12 mcall 66,,88,110h ; Alt+Ctrl+F12
mcall 66,,91,0h ; LWin
mcall 66,,92,0h ; RWin
mcall 66,,91,100h ; Alt+LWin mcall 66,,91,100h ; Alt+LWin
mcall 66,,92 ; Alt+RWin mcall 66,,92 ; Alt+RWin
mcall 66,,62 ; Alt+F4 mcall 66,,62 ; Alt+F4
mcall 66,,71 ; Alt+Home mcall 66,,71 ; Alt+Home
mcall 66,,72 ; Alt+Up mcall 66,,72 ; Alt+Up
mcall 66,,15 ; Alt+Tab mcall 66,,15 ; Alt+Tab
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,,,101h ; Alt+Shift+Tab mcall 66,,,101h ; Alt+Shift+Tab
mcall 18, 8, 1 mcall 18, 8, 1
test eax, eax test eax, eax
jne @f jne @f
@ -357,20 +390,27 @@ START:
mcall 14 mcall 14
mov [screen_size],eax mov [screen_size],eax
mcall 48,5 ;mcall 48,5 ; barsuk {
mov eax, 14
int 0x40
mov ecx,eax mov ecx,eax
lea edx,[ebx-PANEL_HEIGHT-1] ;eax = [xsize]*65536 + [ysize], £¤¥
shr ecx, 16
and eax, 0xFFFF
lea edx,[eax-PANEL_HEIGHT-1]
; barsuk }
mcall 48,6 mcall 48,6
; // Alver 26.08.2007 // { ; // Alver 26.08.2007 // {
mov eax, 9 ; info of process mov eax, 9 ; info of process
mov ebx, process_info_buffer mov ebx, process_info_buffer
mov ecx, -1 mov ecx, -1
mcall mcall
mov ecx, dword [process_info_buffer+30] mov ecx, dword [process_info_buffer+30]
mcall 18,21 mcall 18,21
mov [this_slot], eax mov [this_slot], eax
mov [max_slot], 255 mov [max_slot], 255
; } \\ Alver \\ ; } \\ Alver \\
call set_variables call set_variables
@ -384,6 +424,8 @@ start_after_minimize:
mov eax, 23 mov eax, 23
mov ebx, 30 mov ebx, 30
int 0x40 int 0x40
call load_ini
call fir_lng
still: still:
; mcall 13,<390,70>,<3,11>,0xffffff ; mcall 13,<390,70>,<3,11>,0xffffff
@ -393,6 +435,40 @@ still:
call draw_info call draw_info
call draw_running_applications call draw_running_applications
mov eax, 18 ; check if active window changed
mov ebx, 7 ; barsuk
int 0x40
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
mov eax, 9
mov ebx, process_info_buffer
int 0x40
call need_window_tab
jnz .need_repaint
mov eax, 9
mov ebx, process_info_buffer
mov ecx, [prev_active_window]
int 0x40
call need_window_tab
jz @f
.need_repaint:
mov dword [active_window_changed], 1
@@:
mov eax, 23 mov eax, 23
mov ebx, 20 mov ebx, 20
int 0x40 int 0x40
@ -402,10 +478,18 @@ still:
cmp eax,3 ; button ? cmp eax,3 ; button ?
jz button jz button
call handle_key call handle_key
cmp dword [active_window_changed], 0
jnz red_active
jmp still jmp still
red_active: ; barsuk
red: ; redraw window red: ; redraw window
mov dword [active_window_changed], 0
mcall 14 mcall 14
movzx ecx,ax movzx ecx,ax
mov edx,eax mov edx,eax
@ -421,6 +505,7 @@ still:
mcall 67,0,,,PANEL_HEIGHT mcall 67,0,,,PANEL_HEIGHT
.lp1: .lp1:
call draw_window call draw_window
call draw_info call draw_info
jmp still jmp still
@ -429,6 +514,9 @@ still:
mov eax,17 mov eax,17
int 0x40 int 0x40
cmp al, 0 ; barsuk
jnz right_mouse
cmp ah,50 cmp ah,50
jb no_activate jb no_activate
cmp ah,70 cmp ah,70
@ -446,6 +534,51 @@ still:
; je still ; je still
mcall 55,eax, , ,activatemusic mcall 55,eax, , ,activatemusic
jmp still jmp still
right_mouse: ; barsuk
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
mov eax, 37
mov ebx, 0
int 0x40
mov ebx, eax
shr eax, 16
mov [x_coord], ax
and ebx, 0xFFFF
mov [y_coord], bx
mov eax, 9
mov ecx,[app_list+ecx] ; ecx->selected app.slot
mov [n_slot], ecx
mov ebx, procinfo_for_detect
int 0x40
; cmp dword [procinfo_for_detect+process_information.slot_state],9
; jz still
mov eax, 51
mov ebx, 1
mov ecx, context_menu_start
mov edx, ctx_menu_stack
int 0x40
mov [ctx_menu_PID], eax
jmp still
no_activate: no_activate:
@ -457,11 +590,11 @@ still:
; // Alver 26.08.2007 // { ; // Alver 26.08.2007 // {
cmp ah, 103 cmp ah, 103
je clean_desktop ; minimize all windows je clean_desktop ; minimize all windows
cmp ah, 104 cmp ah, 104
je restore_desktop ; restore minimized windows je restore_desktop ; restore minimized windows
cmp ah, 105 cmp ah, 105
je swap_minimized_desktop ; minimize normal windows, and restore minimized windows je swap_minimized_desktop ; minimize normal windows, and restore minimized windows
; } \\ Alver \\ ; } \\ Alver \\
cmp ah,byte 1 ; start/terminate menu cmp ah,byte 1 ; start/terminate menu
@ -543,7 +676,7 @@ still:
cmp [page_list], 99 cmp [page_list], 99
jnc @f jnc @f
; cmp [page_list],15 ; cmp [page_list],15
; je @f ; je @f
; } \\ Alver \\ ; } \\ Alver \\
inc [page_list] inc [page_list]
jmp red jmp red
@ -583,8 +716,8 @@ swap_minimized_desktop:
jmp min_swap_desktop jmp min_swap_desktop
clean_desktop: clean_desktop:
xor esi,esi xor esi,esi
min_swap_desktop: ; input esi 0 - min, <>0 swap min_swap_desktop: ; input esi 0 - min, <>0 swap
mov ecx, 2 ; <20> ç «ì­ë© ­®¬¥à á«®â  ¯à®æ¥áá  mov ecx, 2 ; <20> ç «ì­ë© ­®¬¥à á«®â  ¯à®æ¥áá 
mov ebx, process_info_buffer mov ebx, process_info_buffer
.loop1: .loop1:
@ -593,7 +726,7 @@ clean_desktop:
mcall 9 mcall 9
mov [max_slot], eax mov [max_slot], eax
mov dx, word [process_info_buffer+50] mov dx, word [process_info_buffer+50]
cmp dx, 9 ; <20>஢¥àª  ᢮¡®¤¥­ «¨ ¤ ­­ë© á«®â cmp dx, 9 ; <20>஢¥àª  ᢮¡®¤¥­ «¨ ¤ ­­ë© á«®â
jz .loop1xx jz .loop1xx
mov edx, dword [ebx+10] mov edx, dword [ebx+10]
cmp dl, '@' cmp dl, '@'
@ -614,9 +747,9 @@ clean_desktop:
or esi, esi or esi, esi
jz @f jz @f
movzx eax, byte [process_info_buffer+70] movzx eax, byte [process_info_buffer+70]
and eax, 2 ; mask minimize and eax, 2 ; mask minimize
jz @f jz @f
mov ecx, 2 ; restore mov ecx, 2 ; restore
@@: @@:
mcall 18, 22 mcall 18, 22
popad popad
@ -684,6 +817,13 @@ need_window_tab:
redraw_window_tabs: redraw_window_tabs:
xor edi, edi xor edi, edi
mov [contrast], 0 mov [contrast], 0
push ebp ; barsuk {
mov eax, 18
mov ebx, 7
int 0x40
mov ebp, eax ; barsuk }
.loop: .loop:
mov ecx, [app_list+edi*4] mov ecx, [app_list+edi*4]
cmp ecx, -1 cmp ecx, -1
@ -697,11 +837,13 @@ redraw_window_tabs:
mov eax, 13 mov eax, 13
imul ebx, edi, 6*10*10000h imul ebx, edi, 6*10*10000h
; // Alver 26.08.2007 // { ; // Alver 26.08.2007 // {
; add ebx, 6*10*10000h + 7*10000h + 54 ; add ebx, 6*10*10000h + 7*10000h + 54
add ebx, 12*10*10000h + 7*10000h + 54 add ebx, 12*10*10000h + 7*10000h + 54
; } // Alver // ; } // Alver //
mov ecx, 3*10000h + 14 mov ecx, 3*10000h + 14
xor edx, edx
; xor edx, edx
mov edx, 0x383838 ; barsuk
int 0x40 int 0x40
sub ebx, 10000h + 53 sub ebx, 10000h + 53
mov ecx, 4*10000h + 12 mov ecx, 4*10000h + 12
@ -716,20 +858,12 @@ redraw_window_tabs:
mov ecx, 5*10000h + 10 mov ecx, 5*10000h + 10
int 0x40 int 0x40
mov edx, 0x88FF mov edx, [wcolor] ; barsuk
xor [contrast], 1 cmp ebp, [esp] ; [esp]=saved ecx=active slot number
jz @f jnz @f
mov dh, 0x55 mov edx, [system_colours.work_button]
@@: @@:
pop ecx pop ecx
mov esi, [current_alt_tab_app]
cmp esi, -1
jz @f
cmp ecx, [alt_tab_list+esi*8]
jnz @f
; xor edx, 0xFFFFFF
mov edx, 0xFF8000
@@:
sub ebx, 55*10000h - 53 sub ebx, 55*10000h - 53
mov ecx, 4*10000h + 12 mov ecx, 4*10000h + 12
int 0x40 int 0x40
@ -741,15 +875,17 @@ redraw_window_tabs:
mov eax, 4 mov eax, 4
sub ebx, 51*10000h - 6 sub ebx, 51*10000h - 6
mov ecx, 0xffffff ;[wcolor] mov ecx, [system_colours.work_button_text] ;0xffffff
mov edx, 0x8000+10 mov edx, 0x8000+10
mov esi, 11 mov esi, 11
int 0x40 int 0x40
.nodraw:
inc edi inc edi
cmp edi, [max_applications] cmp edi, [max_applications]
jb .loop jb .loop
.done: .done:
pop ebp
ret ret
calculate_applications: calculate_applications:
@ -792,6 +928,8 @@ calculate_applications:
cmp eax,ecx cmp eax,ecx
jge cnewpr jge cnewpr
mov [app_tab_count], edi ; barsuk
ret ret
@ -810,7 +948,7 @@ draw_application_buttons:
; // Alver 25.08.2007 // { ; // Alver 25.08.2007 // {
; cmp eax,639 ; cmp eax,639
; jne now1 ; jne now1
; mov [max_applications],7 ;6 ; mov [max_applications],7 ;6
; now1: ; now1:
; cmp eax,799 ; cmp eax,799
; jne now2 ; jne now2
@ -832,7 +970,7 @@ draw_application_buttons:
._01: ._01:
mov bl, 60 mov bl, 60
div bl div bl
xor ah, ah ; eax - ª®«¨ç¥á⢮ 㬥é îè¨åáï ¯¨ªâ®¢ xor ah, ah ; eax - ª®«¨ç¥á⢮ 㬥é îè¨åáï ¯¨ªâ®¢
mov [max_applications], eax mov [max_applications], eax
mov edi,1 mov edi,1
; } \\ Alver \\ ; } \\ Alver \\
@ -1244,7 +1382,7 @@ draw_window:
mov ecx,0*65536+0 mov ecx,0*65536+0
mov edx,[wcolor] mov edx,[wcolor]
add edx,0x161616 add edx,0x161616
newline: newline_: ; debug.inc has macros with the same name
sub edx,0x040404 sub edx,0x040404
mov eax,38 mov eax,38
cmp [soften_up],1 cmp [soften_up],1
@ -1269,7 +1407,7 @@ draw_window:
add ecx,1*65536+1 add ecx,1*65536+1
cmp cx,5 cmp cx,5
jb newline jb newline_
cmp [soften_middle],1 cmp [soften_middle],1
jne no_sm jne no_sm
@ -1435,7 +1573,8 @@ draw_menuet_icon:
mov eax,13 mov eax,13
mov ebx,12 shl 16+44 ;51 mov ebx,12 shl 16+44 ;51
mov ecx,1 shl 16+17 mov ecx,1 shl 16+17
xor edx,edx ; xor edx,edx
mov edx, 0x383838
int 0x40 int 0x40
; mov ebx,63 shl 16+1 ; mov ebx,63 shl 16+1
mov ebx,56 shl 16+1 mov ebx,56 shl 16+1
@ -1793,7 +1932,7 @@ draw_info: ; draw cpu usage, time, date
mov ecx,6 shl 16+10 mov ecx,6 shl 16+10
inc edx ;button 21 inc edx ;button 21
int 0x40 int 0x40
sub ebx,24 shl 16 ; << Alver 25.08.2007 >> 18 shl 16 sub ebx,24 shl 16 ; << Alver 25.08.2007 >> 18 shl 16
inc edx ;button 22 inc edx ;button 22
int 0x40 int 0x40
@ -1936,7 +2075,7 @@ dalshe:
; } \\ Alver \\ ; } \\ Alver \\
shl ebx,16 shl ebx,16
mov bx,8 mov bx,8
mov esi,5 ;4 mov esi,5 ;4
int 0x40 int 0x40
add ebx,1 shl 16 add ebx,1 shl 16
int 0x40 int 0x40
@ -2127,7 +2266,7 @@ no_bug:
popad popad
ret ret
include 'detect.asm' ;;;include 'detect.asm'
include 'ctx_menu.asm' include 'ctx_menu.asm'
; DATA ; DATA
@ -2156,11 +2295,11 @@ m_icon:
lsz m_text,\ lsz m_text,\
ru, "Œ…<C592>ž",\ ru, "Œ…<C592>ž",\
en, "MENU",\ en, "MENU",\
et, "MENÜÜ" et, "MEN--"
mi_text db 'WAVETETRBGRDGPL ' mi_text db 'WAVETETRBGRDGPL '
flag_text db 'EnFiGeRuFrEt' flag_text db 'EnFiGeRuFrEtUa'
type_lang db 0 type_lang db 0
;music_type db 1 ;music_type db 1
@ -2264,9 +2403,9 @@ screen_size:
.height dw ? .height dw ?
.width dw ? .width dw ?
this_slot dd 0 ; Slot of this process this_slot dd 0 ; Slot of this process
max_slot dd 255 max_slot dd 255
system_colours rd 10 system_colours system_colors ; rd 10
app_list rd 50 app_list rd 50
alt_tab_list rd 256*2 alt_tab_list rd 256*2
alt_tab_list_size dd ? alt_tab_list_size dd ?
@ -2282,4 +2421,10 @@ ctx_menu_stack:
panel_x_pos rd 1 panel_x_pos rd 1
panel_y_pos rd 1 panel_y_pos rd 1
image:
last_active_window dd 0
prev_active_window dd 0
active_window_changed dd 0
app_tab_count dd 0
image:

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,28 @@
[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 = 0
altkey9 = 0
altkey0 = 0
[langs]
1 = En
2 = Fi
3 = Ge
4 = Ru
5 = Fr
6 = Et
7 = Ua

View File

@ -0,0 +1,379 @@
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
fir_lng:
mov al,[firini]
sub al,1
mov dx,384
mul dx
mov [point],eax
mcall 70,get_key
mov eax,21
mov ebx,2
mov ecx,1
mov edx,en_keymap
mcall
mov eax,21
inc ecx
mov edx,en_keymap_shift
mcall
mov eax,21
inc ecx
mov edx,en_keymap_alt
mcall
mov eax,21
mov ecx,9
movzx edx,[firini]
mcall
ret
karu:
add [key_r2],1
cmp [key_r2],3
jb .altes
mov [key_r2],0
.altes:
cmp [key_r2],0
je .klt_1
cmp [key_r2],1
je .klt_2
cmp [key_r2],2
je .klt_3
jmp still
.klt_1:
mov al,[lngcrc1]
sub al,1
mov [key_r],al
jmp alted
.klt_2:
mov al,[lngcrc2]
sub al,1
mov [key_r],al
jmp alted
.klt_3:
mov al,[lngcrc3]
sub al,1
mov [key_r],al
jmp alted
ret
alter:
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
.alt_1:
mov al,[altlng1]
cmp al,0
je .exit
sub al,1
mov [key_r],al
jmp alted
.alt_2:
mov al,[altlng2]
cmp al,0
je .exit
sub al,1
mov [key_r],al
jmp alted
.alt_3:
mov al,[altlng3]
cmp al,0
je .exit
sub al,1
mov [key_r],al
jmp alted
.alt_4:
mov al,[altlng4]
cmp al,0
je .exit
sub al,1
mov [key_r],al
jmp alted
.alt_5:
mov al,[altlng5]
cmp al,0
je .exit
sub al,1
mov [key_r],al
jmp alted
.alt_6:
mov al,[altlng6]
cmp al,0
je .exit
sub al,1
mov [key_r],al
jmp alted
.alt_7:
mov al,[altlng7]
cmp al,0
je .exit
sub al,1
mov [key_r],al
jmp alted
.exit:
ret
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
alt_1:
mov [point],0
mcall 70,get_key
mov eax,21 ; english 0
mov ebx,2
mov ecx,1
mov edx,en_keymap
mcall
mov eax,21
inc ecx
mov edx,en_keymap_shift
mcall
mov eax,21
mov ecx,9
mov edx,1
mcall
ret
alt_2:
mov [point],384
mcall 70,get_key
mov eax,21 ; russian
mov ebx,2
mov ecx,1
mov edx,en_keymap
mcall
mov eax,21
inc ecx
mov edx,en_keymap_shift
mcall
mov eax,21
mov ecx,9
mov edx,2
mcall
ret
alt_3:
mov [point],768
mcall 70,get_key
mov eax,21 ; german
mov ebx,2
mov ecx,1
mov edx,en_keymap
mcall
mov eax,21
inc ecx
mov edx,en_keymap_shift
mcall
mov eax,21
mov ecx,9
mov edx,3
mcall
ret
alt_4:
mov [point],1152
mcall 70,get_key
mov eax,21 ;french
mov ebx,2
mov ecx,1
mov edx,en_keymap
mcall
mov eax,21
inc ecx
mov edx,en_keymap_shift
mcall
mov eax,21
inc ecx
mov edx,en_keymap_alt
mcall
mov eax,21
mov ecx,9
mov edx,4
mcall
ret
alt_5:
mov [point],1536
mcall 70,get_key
mov eax,21 ; finnish
mov ebx,2
mov ecx,1
mov edx,en_keymap
mcall
mov eax,21
inc ecx
mov edx,en_keymap_shift
mcall
mov eax,21
mov ecx,9
mov edx,5
mcall
ret
alt_6:
mov [point],1920
mcall 70,get_key
mov eax,21 ; estonian
mov ebx,2
mov ecx,1
mov edx,en_keymap
mcall
mov eax,21
inc ecx
mov edx,en_keymap_shift
mcall
mov eax,21
mov ecx,9
mov edx,6
mcall
ret
alt_7:
mov [point],2304
mcall 70,get_key
mov eax,21 ; Ukrainian
mov ebx,2
mov ecx,1
mov edx,en_keymap
mcall
mov eax,21
inc ecx
mov edx,en_keymap_shift
mcall
mov eax,21
mov ecx,9
mov edx,7
mcall
ret
en_keymap:
rb 128
en_keymap_shift:
rb 128
en_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
get_key:
dd 0
point dd 0
dd 0
dd 384
dd en_keymap
db 0
dd key_file
get_ini:
dd 0
point2 dd 0
dd 0
dd 1
dd inicont
db 0
dd ini_file
key_file: db '/rd/1/keymap.key',0
ini_file: db '/rd/1/lang.ini',0

View File

@ -1,4 +1,4 @@
context_menu_start: context_menu_start:
mov eax, 40 mov eax, 40
mov ebx, 00100111b mov ebx, 00100111b
@ -50,6 +50,7 @@
ctx_menu_button: ctx_menu_button:
mov eax, 17 mov eax, 17
int 0x40 int 0x40
cmp ah, 1 cmp ah, 1
; // Alver 26.08.2007 // { ; // Alver 26.08.2007 // {
; jne ctx_menu_still ; jne ctx_menu_still
@ -104,6 +105,7 @@
jmp ctx_menu_still jmp ctx_menu_still
ctx_menu_exit: ctx_menu_exit:
xor eax, eax xor eax, eax
dec eax ; mov eax, -1 dec eax ; mov eax, -1
int 0x40 int 0x40
@ -198,4 +200,4 @@ ctx_menu_PID rd 1
ctx_menu_title: ctx_menu_title:
db 'KolibriOS' db 'KolibriOS'
ctx_menu_title_end: ctx_menu_title_end:

View File

@ -1,98 +0,0 @@
; Detecting mouse right-clicks.
detect_start:
mov eax, 40
mov ebx, 00100000b
int 0x40
detect_still:
;mov eax, 10 ; <20> ¡®â ¥â ­¥ ᮢᥬ ª®à४⭮, ¯®ç¥¬ã å§.
mov eax, 23
mov ebx, 4
int 0x40
;cmp eax, 6
;jne detect_still
mov eax, 37
mov ebx, 2 ; Ž¯à è¨¢ ¥¬ ª­®¯ª¨ ¬ëè¨
int 0x40
test eax, ebx ; test eax, 00000010b ˆ­â¥à¥áã¥â ⮫쪮 ¯à ¢ ï ª­®¯ª 
jz detect_still ; <20>¥â - ? ‚®§¢à é ¥¬áï ¢ £« ¢­ë© 横« ¯®â®ª 
mouse_btn_up:
mov eax, 37
mov ebx, 2
int 0x40
test eax, ebx
jnz mouse_btn_up
mov eax, 37
xor ebx, ebx ; mov ebx, 0
int 0x40
mov ecx, [panel_y_pos]
shr ecx, 16
inc ecx
cmp ax, cx
jb detect_still
add ecx, 15
cmp ax, cx
ja detect_still
shr eax, 16
xor edx, edx ; mov edx, 1
inc edx
detect_button:
mov ebx, edx
imul ebx, 6 * 10
; // Alver 26.08.2007 // {
; add ebx, 4
add ebx, 64
; } \\ Alver \\
cmp eax, ebx
jb detect_still
add ebx, 60 - 1
cmp eax, ebx
ja @f
shl edx, 2
mov ecx, [app_list + edx - 4]
cmp ecx, -1
jz detect_still
mov [x_coord], ax
mov eax, 37
xor ebx, ebx ; mov ebx, 0
int 0x40
mov [y_coord], ax
mov [n_slot], ecx
mov eax, 9
mov ebx, procinfo_for_detect
int 0x40
mov eax, 51
mov ebx, 1
mov ecx, context_menu_start
mov edx, ctx_menu_stack
int 0x40
mov [ctx_menu_PID], eax
jmp detect_still
@@:
cmp edx, [max_applications]
jae detect_still
inc edx
jmp detect_button

View File

@ -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 кинуть в образ, вместе с панелью... настройки применяются
после перезагрузки...:)