From 2c7ef5e739fef45e129fe7b3a034d3d14f627c17 Mon Sep 17 00:00:00 2001 From: barsuk Date: Tue, 30 Sep 2008 18:03:55 +0000 Subject: [PATCH] Decreased number of repaints of window git-svn-id: svn://kolibrios.org@870 a494cfbc-eb01-0410-851d-a64ba20cac60 --- programs/system/panel/trunk/@PANEL | Bin 0 -> 4017 bytes programs/system/panel/trunk/@PANEL.ASM | 253 +++++++++++---- programs/system/panel/trunk/CHAR.MT | Bin 0 -> 2304 bytes programs/system/panel/trunk/CHAR2.MT | Bin 0 -> 2560 bytes programs/system/panel/trunk/KEYMAP.KEY | Bin 0 -> 2688 bytes programs/system/panel/trunk/LANG.INI | 28 ++ programs/system/panel/trunk/MOI.INC | 379 +++++++++++++++++++++++ programs/system/panel/trunk/ctx_menu.asm | 6 +- programs/system/panel/trunk/detect.asm | 98 ------ programs/system/panel/trunk/readme.txt | 9 + 10 files changed, 619 insertions(+), 154 deletions(-) create mode 100644 programs/system/panel/trunk/@PANEL create mode 100644 programs/system/panel/trunk/CHAR.MT create mode 100644 programs/system/panel/trunk/CHAR2.MT create mode 100644 programs/system/panel/trunk/KEYMAP.KEY create mode 100644 programs/system/panel/trunk/LANG.INI create mode 100644 programs/system/panel/trunk/MOI.INC delete mode 100644 programs/system/panel/trunk/detect.asm create mode 100644 programs/system/panel/trunk/readme.txt diff --git a/programs/system/panel/trunk/@PANEL b/programs/system/panel/trunk/@PANEL new file mode 100644 index 0000000000000000000000000000000000000000..9a63feb30550609ad61a589dd29978a2df53a887 GIT binary patch literal 4017 zcmV;i4^Hq)P(w@oH~;{F00001Mv*2LLXK;4&&M|C83rczv+*}{?NW2PFM(4l?Zi?p zrRPRSj|PfLSpA{w0P_1jasixQ-O;MJSd^H1qs1{c~Yu6b)hnnx5>n)OSI)c z)*MJ>gfSBVUQy8nW0GIcipV;#DTG`TiwP2mRbKat9{Um$QjOx?Wi*n@t%47;iO#r5Gbl9zxB*j7*>Gj*L607NI z<0a}f_H?hOd1%^&bWXB}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(e#L< zqxPhMmiN=Q@mUg;GmY8kluLl;G00000aP8Hf literal 0 HcmV?d00001 diff --git a/programs/system/panel/trunk/@PANEL.ASM b/programs/system/panel/trunk/@PANEL.ASM index 9e97756982..acd90b937f 100644 --- a/programs/system/panel/trunk/@PANEL.ASM +++ b/programs/system/panel/trunk/@PANEL.ASM @@ -15,7 +15,8 @@ use32 dd 0x0,0x0 ; param, icon include 'lang.inc' -include '..\..\..\macros.inc' +include 'macros.inc' +include 'moi.inc' ;а бЄ« ¤ЄЁ Є« ўЁ вгал width dd 305 buttons dd 1 ; 0 no frames ; 1 frames @@ -32,6 +33,7 @@ icons dd 1 ; 0 defaults ; 1 activate PANEL_HEIGHT = 18 + handle_key: mcall 18, 7 @@ -42,6 +44,25 @@ handle_key: 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 +prod: cmp al, 15 jz alt_tab_pressed cmp al, 88 @@ -62,7 +83,9 @@ handle_key: jz alt_tab_released @@: ; this is hotkey Ctrl+Shift ;or LShift+RShift - mov ebx, setup_exec + + jmp karu +; mov ebx, setup_exec ; test ah, 001100b ; jz change_sys_lang change_key_lang: @@ -111,7 +134,7 @@ begin_1: ; and ebx,0x0000FFFF ; cmp ebx,'EL' ; je no_kill -; kill_app: +; kill_app: ; pop ecx ; mcall 18, 2 ; jmp if_kill @@ -119,7 +142,7 @@ begin_1: ; pop eax ; if_kill: ; ;// }SPraid.simba - mcall 72,1,3,1 + mcall 72,1,3,1 jmp begin_1.ret @@ -311,21 +334,31 @@ calendarmusic: db 0x85,0x37,0x85,0x48,0 START: - mov eax, 51 - mov ebx, 1 - mov ecx, detect_start - mov edx, detect_stack - int 0x40 +; mov eax, 51 +; mov ebx, 1 +; mov ecx, detect_start +; mov edx, detect_stack +; int 0x40 mcall 66,4,0,2 ; LShift+RShift mcall 66, , ,11h ; Ctrl+Shift 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,,92 ; Alt+RWin mcall 66,,62 ; Alt+F4 mcall 66,,71 ; Alt+Home mcall 66,,72 ; Alt+Up 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 18, 8, 1 test eax, eax jne @f @@ -357,20 +390,27 @@ START: mcall 14 mov [screen_size],eax - mcall 48,5 + ;mcall 48,5 ; barsuk { + mov eax, 14 + int 0x40 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 ; // Alver 26.08.2007 // { - mov eax, 9 ; info of process - mov ebx, process_info_buffer - mov ecx, -1 + mov eax, 9 ; info of process + mov ebx, process_info_buffer + mov ecx, -1 mcall - mov ecx, dword [process_info_buffer+30] + mov ecx, dword [process_info_buffer+30] mcall 18,21 - mov [this_slot], eax - mov [max_slot], 255 + mov [this_slot], eax + mov [max_slot], 255 ; } \\ Alver \\ call set_variables @@ -384,6 +424,8 @@ start_after_minimize: mov eax, 23 mov ebx, 30 int 0x40 + call load_ini + call fir_lng still: ; mcall 13,<390,70>,<3,11>,0xffffff @@ -393,6 +435,40 @@ still: call draw_info 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 ebx, 20 int 0x40 @@ -402,10 +478,18 @@ still: cmp eax,3 ; button ? jz button call handle_key + + cmp dword [active_window_changed], 0 + jnz red_active + jmp still + red_active: ; barsuk + red: ; redraw window + mov dword [active_window_changed], 0 + mcall 14 movzx ecx,ax mov edx,eax @@ -421,6 +505,7 @@ still: mcall 67,0,,,PANEL_HEIGHT .lp1: + call draw_window call draw_info jmp still @@ -429,6 +514,9 @@ still: mov eax,17 int 0x40 + cmp al, 0 ; barsuk + jnz right_mouse + cmp ah,50 jb no_activate cmp ah,70 @@ -446,6 +534,51 @@ still: ; je still mcall 55,eax, , ,activatemusic 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: @@ -457,11 +590,11 @@ still: ; // Alver 26.08.2007 // { cmp ah, 103 - je clean_desktop ; minimize all windows + je clean_desktop ; minimize all windows cmp ah, 104 - je restore_desktop ; restore minimized windows + je restore_desktop ; restore minimized windows 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 \\ cmp ah,byte 1 ; start/terminate menu @@ -543,7 +676,7 @@ still: cmp [page_list], 99 jnc @f ; cmp [page_list],15 - ; je @f + ; je @f ; } \\ Alver \\ inc [page_list] jmp red @@ -583,8 +716,8 @@ swap_minimized_desktop: jmp min_swap_desktop clean_desktop: xor esi,esi - min_swap_desktop: ; input esi 0 - min, <>0 swap - mov ecx, 2 ; Ќ з «м­л© ­®¬Ґа б«®в  Їа®жҐбб  + min_swap_desktop: ; input esi 0 - min, <>0 swap + mov ecx, 2 ; Ќ з «м­л© ­®¬Ґа б«®в  Їа®жҐбб  mov ebx, process_info_buffer .loop1: @@ -593,7 +726,7 @@ clean_desktop: mcall 9 mov [max_slot], eax mov dx, word [process_info_buffer+50] - cmp dx, 9 ; Џа®ўҐаЄ  бў®Ў®¤Ґ­ «Ё ¤ ­­л© б«®в + cmp dx, 9 ; Џа®ўҐаЄ  бў®Ў®¤Ґ­ «Ё ¤ ­­л© б«®в jz .loop1xx mov edx, dword [ebx+10] cmp dl, '@' @@ -614,9 +747,9 @@ clean_desktop: or esi, esi jz @f movzx eax, byte [process_info_buffer+70] - and eax, 2 ; mask minimize + and eax, 2 ; mask minimize jz @f - mov ecx, 2 ; restore + mov ecx, 2 ; restore @@: mcall 18, 22 popad @@ -684,6 +817,13 @@ need_window_tab: redraw_window_tabs: xor edi, edi mov [contrast], 0 + + push ebp ; barsuk { + mov eax, 18 + mov ebx, 7 + int 0x40 + mov ebp, eax ; barsuk } + .loop: mov ecx, [app_list+edi*4] cmp ecx, -1 @@ -697,11 +837,13 @@ redraw_window_tabs: mov eax, 13 imul ebx, edi, 6*10*10000h ; // 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 ; } // Alver // mov ecx, 3*10000h + 14 - xor edx, edx + +; xor edx, edx + mov edx, 0x383838 ; barsuk int 0x40 sub ebx, 10000h + 53 mov ecx, 4*10000h + 12 @@ -716,20 +858,12 @@ redraw_window_tabs: mov ecx, 5*10000h + 10 int 0x40 - mov edx, 0x88FF - xor [contrast], 1 - jz @f - mov dh, 0x55 + mov edx, [wcolor] ; barsuk + cmp ebp, [esp] ; [esp]=saved ecx=active slot number + jnz @f + mov edx, [system_colours.work_button] @@: 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 mov ecx, 4*10000h + 12 int 0x40 @@ -741,15 +875,17 @@ redraw_window_tabs: mov eax, 4 sub ebx, 51*10000h - 6 - mov ecx, 0xffffff ;[wcolor] + mov ecx, [system_colours.work_button_text] ;0xffffff mov edx, 0x8000+10 mov esi, 11 int 0x40 +.nodraw: inc edi cmp edi, [max_applications] jb .loop .done: + pop ebp ret calculate_applications: @@ -792,6 +928,8 @@ calculate_applications: cmp eax,ecx jge cnewpr + mov [app_tab_count], edi ; barsuk + ret @@ -810,7 +948,7 @@ draw_application_buttons: ; // Alver 25.08.2007 // { ; cmp eax,639 ; jne now1 - ; mov [max_applications],7 ;6 + ; mov [max_applications],7 ;6 ; now1: ; cmp eax,799 ; jne now2 @@ -832,7 +970,7 @@ draw_application_buttons: ._01: mov bl, 60 div bl - xor ah, ah ; eax - Є®«ЁзҐбвў® 㬥й оиЁебп ЇЁЄв®ў + xor ah, ah ; eax - Є®«ЁзҐбвў® 㬥й оиЁебп ЇЁЄв®ў mov [max_applications], eax mov edi,1 ; } \\ Alver \\ @@ -1244,7 +1382,7 @@ draw_window: mov ecx,0*65536+0 mov edx,[wcolor] add edx,0x161616 - newline: + newline_: ; debug.inc has macros with the same name sub edx,0x040404 mov eax,38 cmp [soften_up],1 @@ -1269,7 +1407,7 @@ draw_window: add ecx,1*65536+1 cmp cx,5 - jb newline + jb newline_ cmp [soften_middle],1 jne no_sm @@ -1435,7 +1573,8 @@ draw_menuet_icon: mov eax,13 mov ebx,12 shl 16+44 ;51 mov ecx,1 shl 16+17 - xor edx,edx +; xor edx,edx + mov edx, 0x383838 int 0x40 ; mov ebx,63 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 inc edx ;button 21 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 int 0x40 @@ -1936,7 +2075,7 @@ dalshe: ; } \\ Alver \\ shl ebx,16 mov bx,8 - mov esi,5 ;4 + mov esi,5 ;4 int 0x40 add ebx,1 shl 16 int 0x40 @@ -2127,7 +2266,7 @@ no_bug: popad ret -include 'detect.asm' +;;;include 'detect.asm' include 'ctx_menu.asm' ; DATA @@ -2156,11 +2295,11 @@ m_icon: lsz m_text,\ ru, "Њ…Ќћ",\ en, "MENU",\ - et, "MENЬЬ" + et, "MEN--" mi_text db 'WAVETETRBGRDGPL ' -flag_text db 'EnFiGeRuFrEt' +flag_text db 'EnFiGeRuFrEtUa' type_lang db 0 ;music_type db 1 @@ -2264,9 +2403,9 @@ screen_size: .height dw ? .width dw ? -this_slot dd 0 ; Slot of this process +this_slot dd 0 ; Slot of this process max_slot dd 255 -system_colours rd 10 +system_colours system_colors ; rd 10 app_list rd 50 alt_tab_list rd 256*2 alt_tab_list_size dd ? @@ -2282,4 +2421,10 @@ ctx_menu_stack: panel_x_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: \ No newline at end of file diff --git a/programs/system/panel/trunk/CHAR.MT b/programs/system/panel/trunk/CHAR.MT new file mode 100644 index 0000000000000000000000000000000000000000..3af633c3b23bbd096dca807497ca96b32c276da5 GIT binary patch literal 2304 zcmd5-&6?UU43v!_iAxj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~$j64J4@pj_yhu|%JOK-R{~Fw| zya(=bLhfqxAzEG)cO~VJ*K3sIA7EVe`T_y8Z{mPSYA3kaGK@ zE?~d`Ap;DE&WDi~7%!=lheqauOfewzP4iJufKLX5^MQ335YC5@0pWb$vL1Clj0_0p zgMIq6zXe)hDpcncB^7=k+83riE);b_nRnSux4KFb`!8uc$0+45YZ^{7xCNE}-p5aW C`t_Xv literal 0 HcmV?d00001 diff --git a/programs/system/panel/trunk/KEYMAP.KEY b/programs/system/panel/trunk/KEYMAP.KEY new file mode 100644 index 0000000000000000000000000000000000000000..030abd91a74082f9bc3262dd841fd7ab140d5948 GIT binary patch literal 2688 zcmXq$HZ(FeF*P%{ur$!M<=`wVPc15`EX~X>h>qp0ODs-FOV7y4&aqZcV2G)zNG?mt z%hl1-XD~5UaDeLrny_Wl4zmsBn=Q6(+`e<0qmzxxe>ZmzPcLsDUqAnVz@Xre(6I1` z$S6lAXBSr#88c}`2W1u2I5jN|&3J7N&cJZjppeK=Pyc}GTHZRxU>BfjpfOfTbqqC8 z5zb*we!ez#_Jr)WBieq30S0DB;jbNy9R3IDki!4aK|=<0c=+oQ@;^!8ucX|ss-~}@ zX=@*g9R4SO_QS*f)Ja1IEok^#Tg4Nye`tokJuLjIK|K4=d{UPt-Z}NX0}hA#mg{dc2h(Dgud>Uwz(g4W9Cnv z*wZm-PUAcsLiP`(^sjbSNnJztT>Rw=n!xZ+tb&#QaVorZg|PBJcM=1GRyjER>sVVU z63YLils}02M;2KAJ4V6E|EW`W>jGirzptt&!?bX4`nT897bRpr@!@YKEmNml9bGdc zCe9(Yc3}Oly#=}a|ML~8{QvgEkimv#<^K|B`JaGX{@=NZRQ_K(V#r`O+{=Ho@&_3H gPcmWU&*uc)e{?Q?zVOyf@r0E>pXzk~4#)Bb09YH9ApigX literal 0 HcmV?d00001 diff --git a/programs/system/panel/trunk/LANG.INI b/programs/system/panel/trunk/LANG.INI new file mode 100644 index 0000000000..fdffa8f4e8 --- /dev/null +++ b/programs/system/panel/trunk/LANG.INI @@ -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 \ No newline at end of file diff --git a/programs/system/panel/trunk/MOI.INC b/programs/system/panel/trunk/MOI.INC new file mode 100644 index 0000000000..eda4f445a3 --- /dev/null +++ b/programs/system/panel/trunk/MOI.INC @@ -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 \ No newline at end of file diff --git a/programs/system/panel/trunk/ctx_menu.asm b/programs/system/panel/trunk/ctx_menu.asm index 17e80e9397..4cee5d21fe 100644 --- a/programs/system/panel/trunk/ctx_menu.asm +++ b/programs/system/panel/trunk/ctx_menu.asm @@ -1,4 +1,4 @@ - context_menu_start: +context_menu_start: mov eax, 40 mov ebx, 00100111b @@ -50,6 +50,7 @@ ctx_menu_button: mov eax, 17 int 0x40 + cmp ah, 1 ; // Alver 26.08.2007 // { ; jne ctx_menu_still @@ -104,6 +105,7 @@ jmp ctx_menu_still ctx_menu_exit: + xor eax, eax dec eax ; mov eax, -1 int 0x40 @@ -198,4 +200,4 @@ ctx_menu_PID rd 1 ctx_menu_title: db 'KolibriOS' -ctx_menu_title_end: \ No newline at end of file +ctx_menu_title_end: diff --git a/programs/system/panel/trunk/detect.asm b/programs/system/panel/trunk/detect.asm deleted file mode 100644 index 28bb8246db..0000000000 --- a/programs/system/panel/trunk/detect.asm +++ /dev/null @@ -1,98 +0,0 @@ -; Detecting mouse right-clicks. - -detect_start: - - mov eax, 40 - mov ebx, 00100000b - int 0x40 - - detect_still: - ;mov eax, 10 ; ђ Ў®в Ґв ­Ґ ᮢᥬ Є®а४⭮, Ї®зҐ¬г е§. - 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 ; ЌҐв - ? ‚®§ўа й Ґ¬бп ў Ј« ў­л© жЁЄ« Ї®в®Є  - - 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 diff --git a/programs/system/panel/trunk/readme.txt b/programs/system/panel/trunk/readme.txt new file mode 100644 index 0000000000..22fcf28629 --- /dev/null +++ b/programs/system/panel/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 кинуть в образ, вместе с панелью... настройки применяются +после перезагрузки...:) \ No newline at end of file