Subversion Repositories Kolibri OS

Rev

Rev 2654 | Rev 2727 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2654 Rev 2709
Line 67... Line 67...
67
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
67
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Line 68... Line 68...
68
 
68
 
69
include 'macros.inc'
69
include 'macros.inc'
Line 70... Line 70...
70
include 'struct.inc'
70
include 'struct.inc'
Line 71... Line 71...
71
 
71
 
Line 72... Line 72...
72
$Revision: 2654 $
72
$Revision: 2709 $
Line 4615... Line 4615...
4615
align 4
4615
align 4
4616
f66call:
4616
f66call:
4617
           dd sys_process_def.1   ; 1 = set keyboard mode
4617
           dd sys_process_def.1   ; 1 = set keyboard mode
4618
           dd sys_process_def.2   ; 2 = get keyboard mode
4618
           dd sys_process_def.2   ; 2 = get keyboard mode
4619
           dd sys_process_def.3   ; 3 = get keyboard ctrl, alt, shift
4619
           dd sys_process_def.3   ; 3 = get keyboard ctrl, alt, shift
4620
           dd sys_process_def.4
4620
           dd sys_process_def.4   ; 4 = set system-wide hotkey
4621
           dd sys_process_def.5
4621
           dd sys_process_def.5   ; 5 = delete installed hotkey
-
 
4622
           dd sys_process_def.6   ; 6 = disable input, work only hotkeys
-
 
4623
           dd sys_process_def.7   ; 7 = enable input, opposition to f.66.6
4622
endg
4624
endg
4623
 
-
 
4624
 
-
 
4625
 
-
 
-
 
4625
;-----------------------------------------------------------------------------
4626
 
4626
align 4
4627
sys_process_def:
4627
sys_process_def:
4628
        dec     ebx
4628
        dec     ebx
4629
        cmp     ebx, 5
4629
        cmp     ebx, 7
4630
        jae     .not_support    ;if >=6 then or eax,-1
4630
        jae     .not_support    ;if >=8 then or eax,-1
Line 4631... Line 4631...
4631
 
4631
 
4632
        mov     edi, [CURRENT_TASK]
4632
        mov     edi, [CURRENT_TASK]
Line 4633... Line 4633...
4633
        jmp     dword [f66call+ebx*4]
4633
        jmp     dword [f66call+ebx*4]
4634
 
4634
 
4635
.not_support:
4635
.not_support:
-
 
4636
        or      eax, -1
4636
        or      eax, -1
4637
        ret
4637
        ret
4638
;-----------------------------------------------------------------------------
4638
 
4639
align 4
4639
.1:
4640
.1:
Line 4640... Line 4641...
4640
        shl     edi, 8
4641
        shl     edi, 8
-
 
4642
        mov     [edi+SLOT_BASE + APPDATA.keyboard_mode], cl
4641
        mov     [edi+SLOT_BASE + APPDATA.keyboard_mode], cl
4643
 
4642
 
4644
        ret
4643
        ret
4645
;-----------------------------------------------------------------------------
4644
 
4646
align 4
4645
.2:                             ; 2 = get keyboard mode
4647
.2:                             ; 2 = get keyboard mode
4646
        shl     edi, 8
4648
        shl     edi, 8
4647
        movzx   eax, byte [SLOT_BASE+edi + APPDATA.keyboard_mode]
-
 
4648
        mov     [esp+32], eax
4649
        movzx   eax, byte [SLOT_BASE+edi + APPDATA.keyboard_mode]
4649
        ret
-
 
4650
;     xor   eax,eax
-
 
4651
;     movzx eax,byte [shift]
4650
        mov     [esp+32], eax
4652
;     movzx ebx,byte [ctrl]
-
 
4653
;     shl   ebx,2
-
 
4654
;     add   eax,ebx
-
 
4655
;     movzx ebx,byte [alt]
4651
        ret
4656
;     shl   ebx,3
-
 
4657
;     add   eax,ebx
4652
;-----------------------------------------------------------------------------
4658
.3:                             ;3 = get keyboard ctrl, alt, shift
-
 
4659
 ;// mike.dld [
4653
align 4
4660
        mov     eax, [kb_state]
4654
.3:                             ;3 = get keyboard ctrl, alt, shift
-
 
4655
        mov     eax, [kb_state]
4661
 ;// mike.dld ]
4656
        mov     [esp+32], eax
4662
        mov     [esp+32], eax
4657
        ret
4663
        ret
4658
;-----------------------------------------------------------------------------
4664
 
4659
align 4
4665
.4:
4660
.4:
4666
        mov     eax, hotkey_list
4661
        mov     eax, hotkey_list
Line 4684... Line 4679...
4684
        jecxz   @f
4679
        jecxz   @f
4685
        mov     [edx+12], eax
4680
        mov     [edx+12], eax
4686
@@:
4681
@@:
4687
        and     dword [esp+32], 0
4682
        and     dword [esp+32], 0
4688
        ret
4683
        ret
-
 
4684
;-----------------------------------------------------------------------------
4689
 
4685
align 4
4690
.5:
4686
.5:
4691
        movzx   ebx, cl
4687
        movzx   ebx, cl
4692
        lea     ebx, [hotkey_scancodes+ebx*4]
4688
        lea     ebx, [hotkey_scancodes+ebx*4]
4693
        mov     eax, [ebx]
4689
        mov     eax, [ebx]
4694
.scan:
4690
.scan:
Line 4718... Line 4714...
4718
        mov     [eax+8], edx
4714
        mov     [eax+8], edx
4719
        mov     [eax+12], edx
4715
        mov     [eax+12], edx
4720
        mov     [eax], edx
4716
        mov     [eax], edx
4721
        mov     [esp+32], edx
4717
        mov     [esp+32], edx
4722
        ret
4718
        ret
-
 
4719
;-----------------------------------------------------------------------------
-
 
4720
align 4
-
 
4721
.6:
-
 
4722
        pushfd
-
 
4723
        cli
-
 
4724
        mov     eax, [PID_lock_input]
-
 
4725
        test    eax, eax
-
 
4726
        jnz     @f
-
 
4727
; get current PID
-
 
4728
        mov     eax, [CURRENT_TASK]
-
 
4729
        shl     eax, 5
-
 
4730
        mov     eax, [eax+CURRENT_TASK+TASKDATA.pid]
-
 
4731
; set current PID for lock input
-
 
4732
        mov     [PID_lock_input], eax
-
 
4733
@@:
-
 
4734
        popfd
-
 
4735
        ret
-
 
4736
;-----------------------------------------------------------------------------
-
 
4737
align 4
-
 
4738
.7:
-
 
4739
        mov     eax, [PID_lock_input]
-
 
4740
        test    eax, eax
-
 
4741
        jz      @f
-
 
4742
; get current PID
-
 
4743
        mov     ebx, [CURRENT_TASK]
-
 
4744
        shl     ebx, 5
-
 
4745
        mov     ebx, [ebx+CURRENT_TASK+TASKDATA.pid]
-
 
4746
; compare current lock input with current PID
-
 
4747
        cmp     ebx, eax
-
 
4748
        jne     @f
Line -... Line 4749...
-
 
4749
 
-
 
4750
        xor     eax, eax
4723
 
4751
        mov     [PID_lock_input], eax
-
 
4752
@@:
-
 
4753
        ret
-
 
4754
;-----------------------------------------------------------------------------
-
 
4755
uglobal
-
 
4756
  PID_lock_input dd 0x0
4724
 
4757
endg
4725
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
4758
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
4726
;; 61 sys function.                                                ;;
4759
;; 61 sys function.                                                ;;
4727
;; in eax=61,ebx in [1..3]                                         ;;
4760
;; in eax=61,ebx in [1..3]                                         ;;
4728
;; out eax                                                         ;;
4761
;; out eax                                                         ;;