Subversion Repositories Kolibri OS

Rev

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

Rev 2549 Rev 4263
Line 23... Line 23...
23
N_KEYCOLOR equ 0x00677889 ; Normal button color
23
N_KEYCOLOR equ 0x00677889 ; Normal button color
24
C_KEYCOLOR equ 0x00344556 ; Control button color
24
C_KEYCOLOR equ 0x00344556 ; Control button color
25
L_KEYCOLOR equ 0x00258778 ; Lock button color
25
L_KEYCOLOR equ 0x00258778 ; Lock button color
26
TEXTCOLOR  equ 0x00FFFFFF ; Button caption color
26
TEXTCOLOR  equ 0x00FFFFFF ; Button caption color
Line -... Line 27...
-
 
27
 
-
 
28
ASCII_KEYMAP_SIZE equ 128
-
 
29
PROCINFO_SIZE equ 1024
Line 27... Line 30...
27
 
30
PROCINFO_BUFF equ ascii_keymap + ASCII_KEYMAP_SIZE
28
 
31
 
29
STARTAPP:
32
STARTAPP:
Line 162... Line 165...
162
 .draw_switch_button:
165
 .draw_switch_button:
163
  mov	eax, 6
166
  mov	eax, 6
164
  mul	byte [keyboard_mode]
167
  mul	byte [keyboard_mode]
165
  add	eax, SwitchText
168
  add	eax, SwitchText
166
  stdcall draw_button, 513,28,46,20,106,0x00700000,eax,6,TEXTCOLOR	 ; Scan/ASCII switch
169
  stdcall draw_button, 513,28,46,20,106,0x00700000,eax,6,TEXTCOLOR	 ; Scan/ASCII switch
-
 
170
  
-
 
171
  xor	al, al
-
 
172
  xchg	al, [red_type]
-
 
173
  test	al, 2
-
 
174
  jnz	.skip_end_draw_window ; if we draw switch button without redraw window then end_draw_window not need
-
 
175
  
167
@@:
176
@@:
168
 .draw_indicators_area:
177
 .draw_indicators_area:
169
  call lights_on
178
  call lights_on
Line 170... Line -...
170
 
-
 
171
  mov	byte [red_type], 0
179
 
-
 
180
  end_draw_window
-
 
181
  
172
  end_draw_window
182
.skip_end_draw_window:  
Line 173... Line 183...
173
ret
183
ret
174
 
184
 
175
get_zkey_window_slot_number:
185
get_zkey_window_slot_number:
Line 182... Line 192...
182
	mov	ebx, 39
192
	mov	ebx, 39
183
	int	0x40
193
	int	0x40
Line 184... Line 194...
184
 
194
 
185
still:
195
still:
-
 
196
	call	get_receiver_window_slot_number
-
 
197
	call	get_receiver_window_keyboard_mode ; return in ecx keyboard_mode for set_keyboard_mode
-
 
198
	call	set_keyboard_mode
-
 
199
; delete_switch_button 
-
 
200
	mov eax, 8 
186
	call	get_receiver_window_slot_number
201
	mov edx, 0x80700000
-
 
202
	int	0x40 
-
 
203
 mov	byte [red_type], 2
Line 187... Line 204...
187
 
204
	call	draw_window.draw_switch_button
188
 
205
 
Line 189... Line 206...
189
	mov	eax, 10 	      ; Wait for an event in the queue.
206
	mov	eax, 10 	      ; Wait for an event in the queue.
Line 367... Line 384...
367
	je	@f
384
	je	@f
368
	mov	[receiver_window], eax
385
	mov	[receiver_window], eax
369
      @@:
386
      @@:
370
  ret
387
  ret
Line -... Line 388...
-
 
388
 
-
 
389
get_receiver_window_keyboard_mode:
-
 
390
	mov	eax, 9
-
 
391
	mov	ebx, PROCINFO_BUFF
-
 
392
	mov	ecx, [receiver_window]
-
 
393
	int	0x40
-
 
394
	movzx	ecx, byte [ebx + 75]
-
 
395
	ret
371
 
396
 
372
;************************************
397
;************************************
373
;*  input: edx = code of the key    *
398
;*  input: edx = code of the key    *
Line 374... Line 399...
374
;************************************
399
;************************************