Subversion Repositories Kolibri OS

Rev

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

Rev 665 Rev 870
Line 13... Line 13...
13
  dd   0xA000	    ; reguired amount of memory - 10 Kb
13
  dd   0xA000	    ; reguired amount of memory - 10 Kb
14
  dd   0xA000	    ; esp
14
  dd   0xA000	    ; esp
15
  dd   0x0,0x0	    ; param, icon
15
  dd   0x0,0x0	    ; param, icon
Line 16... Line 16...
16
 
16
 
17
include 'lang.inc'
17
include 'lang.inc'
-
 
18
include 'macros.inc'
Line 18... Line 19...
18
include '..\..\..\macros.inc'
19
include 'moi.inc'   ;à áª« ¤ª¨ ª« ¢¨ âãàë
19
 
20
 
20
width		dd  305
21
width		dd  305
21
buttons 	dd    1  ;  0 no frames  ; 1 frames
22
buttons 	dd    1  ;  0 no frames  ; 1 frames
Line 30... Line 31...
30
soften_middle	dd    1  ;  0 no         ; 1 yes
31
soften_middle	dd    1  ;  0 no         ; 1 yes
31
icons		dd    1  ;  0 defaults   ; 1 activate
32
icons		dd    1  ;  0 defaults   ; 1 activate
Line 32... Line 33...
32
 
33
 
Line -... Line 34...
-
 
34
PANEL_HEIGHT = 18
33
PANEL_HEIGHT = 18
35
 
Line 34... Line 36...
34
 
36
 
35
handle_key:
37
handle_key:
Line 36... Line 38...
36
 
38
 
37
    mcall 18, 7
39
    mcall 18, 7
38
    mov  [active_process],eax
40
    mov  [active_process],eax
39
 
41
 
40
	mcall 2
42
	mcall 2
-
 
43
	cmp	al, 2
-
 
44
	jnz	begin_1.ret
-
 
45
	mov	ebx, exec_fileinfo
-
 
46
	shr	eax, 8
-
 
47
	cmp	al, 0
-
 
48
	je	prod
-
 
49
	mov	[key_r],al
-
 
50
	sub	[key_r],2
-
 
51
	cmp	al, 2
-
 
52
	jz	alter
-
 
53
	cmp	al, 3
-
 
54
	jz	alter
-
 
55
	cmp	al, 4
-
 
56
	jz	alter
-
 
57
	cmp	al, 5
-
 
58
	jz	alter
-
 
59
	cmp	al, 6
-
 
60
	jz	alter
-
 
61
	cmp	al, 7
41
	cmp	al, 2
62
	jz	alter
42
	jnz	begin_1.ret
63
	cmp	al, 8
43
	mov	ebx, exec_fileinfo
64
	jz	alter
44
	shr	eax, 8
65
prod:
45
	cmp	al, 15
66
	cmp	al, 15
Line 60... Line 81...
60
	jz	@f
81
	jz	@f
61
	test	ah, 0x30
82
	test	ah, 0x30
62
	jz	alt_tab_released
83
	jz	alt_tab_released
63
@@:
84
@@:
64
; this is hotkey Ctrl+Shift ;or LShift+RShift
85
; this is hotkey Ctrl+Shift ;or LShift+RShift
-
 
86
 
-
 
87
	 jmp	 karu
65
	mov	ebx, setup_exec
88
;        mov     ebx, setup_exec
66
;        test    ah, 001100b
89
;        test    ah, 001100b
67
;        jz      change_sys_lang
90
;        jz      change_sys_lang
68
change_key_lang:
91
change_key_lang:
69
	mov	dword [ebx+8], chlang
92
	mov	dword [ebx+8], chlang
70
	mcall	70
93
	mcall	70
Line 309... Line 332...
309
 
332
 
Line 310... Line 333...
310
;  .exit: mcall -1
333
;  .exit: mcall -1
311
 
334
 
312
 
335
 
313
START:
336
START:
314
	mov	eax, 51
337
;       mov     eax, 51
315
	mov	ebx, 1
338
;       mov     ebx, 1
316
	mov	ecx, detect_start
339
;       mov     ecx, detect_start
317
	mov	edx, detect_stack
340
;       mov     edx, detect_stack
318
	int	0x40
341
;       int     0x40
-
 
342
	mcall 66,4,0,2		; LShift+RShift
-
 
343
	mcall 66, , ,11h	; Ctrl+Shift
319
	mcall 66,4,0,2		; LShift+RShift
344
	mcall 66,,88,110h	; Alt+Ctrl+F12
320
	mcall 66, , ,11h	; Ctrl+Shift
345
	mcall 66,,91,0h 	; LWin
321
	mcall 66,,88,110h	; Alt+Ctrl+F12
346
	mcall 66,,92,0h 	; RWin
322
	mcall 66,,91,100h	; Alt+LWin
347
	mcall 66,,91,100h	; Alt+LWin
323
	mcall 66,,92		; Alt+RWin
348
	mcall 66,,92		; Alt+RWin
324
	mcall 66,,62		; Alt+F4
349
	mcall 66,,62		; Alt+F4
-
 
350
	mcall 66,,71		; Alt+Home
-
 
351
	mcall 66,,72		; Alt+Up
-
 
352
	mcall 66,,15		; Alt+Tab
-
 
353
	mcall 66,,2		; Alt+1
-
 
354
	mcall 66,,3		; Alt+2
-
 
355
	mcall 66,,4		; Alt+3
-
 
356
	mcall 66,,5		; Alt+4
325
	mcall 66,,71		; Alt+Home
357
	mcall 66,,6		; Alt+5
-
 
358
	mcall 66,,7		; Alt+6
326
	mcall 66,,72		; Alt+Up
359
	mcall 66,,8		; Alt+7
327
	mcall 66,,15		; Alt+Tab
360
	mcall 66,,,101h 	; Alt+Shift+Tab
328
	mcall 66,,,101h 	; Alt+Shift+Tab
361
 
329
    mcall 18, 8, 1
362
    mcall 18, 8, 1
330
    test eax, eax
363
    test eax, eax
Line 355... Line 388...
355
    jne  new_number
388
    jne  new_number
Line 356... Line 389...
356
 
389
 
357
	mcall	14
390
	mcall	14
Line -... Line 391...
-
 
391
	mov	[screen_size],eax
358
	mov	[screen_size],eax
392
 
-
 
393
	;mcall  48,5            ; barsuk {
359
 
394
	mov	eax, 14
-
 
395
	int	0x40
-
 
396
	mov	ecx,eax
-
 
397
;eax = [xsize]*65536 + [ysize], £¤¥
360
	mcall	48,5
398
	shr	ecx, 16
-
 
399
	and	eax, 0xFFFF
-
 
400
	lea	edx,[eax-PANEL_HEIGHT-1]
361
	mov	ecx,eax
401
				; barsuk }
Line 362... Line 402...
362
	lea	edx,[ebx-PANEL_HEIGHT-1]
402
 
363
	mcall	48,6
403
	mcall	48,6
364
 
404
 
Line 382... Line 422...
382
    call draw_running_applications
422
    call draw_running_applications
Line 383... Line 423...
383
 
423
 
384
    mov  eax, 23
424
    mov  eax, 23
385
    mov  ebx, 30
425
    mov  ebx, 30
-
 
426
    int  0x40
-
 
427
    call    load_ini
Line 386... Line 428...
386
    int  0x40
428
    call    fir_lng
387
 
429
 
388
still:
430
still:
389
;     mcall  13,<390,70>,<3,11>,0xffffff
431
;     mcall  13,<390,70>,<3,11>,0xffffff
Line 390... Line 432...
390
;     mov    ecx,[button_presssed_alt]
432
;     mov    ecx,[button_presssed_alt]
391
;     mcall  47,0x80100,ecx ,400 shl 16+5,0
433
;     mcall  47,0x80100,ecx ,400 shl 16+5,0
Line -... Line 434...
-
 
434
 
-
 
435
    call draw_info
-
 
436
    call draw_running_applications
-
 
437
 
-
 
438
	mov	eax, 18 			; check if active window changed
-
 
439
	mov	ebx, 7				; barsuk
-
 
440
	int	0x40
-
 
441
	cmp	eax, [last_active_window]
-
 
442
	jz	@f
-
 
443
 
-
 
444
; need_window_tab:
-
 
445
; in: ebx->process info
-
 
446
; out: ZF set <=> do not draw
-
 
447
 
-
 
448
	mov	ebx, [last_active_window]
-
 
449
	mov	[prev_active_window], ebx
-
 
450
	mov	[last_active_window], eax
-
 
451
 
-
 
452
	mov	ecx, eax
-
 
453
	mov	eax, 9
-
 
454
	mov	ebx, process_info_buffer
-
 
455
	int	0x40
-
 
456
 
-
 
457
	call	need_window_tab
-
 
458
	jnz	.need_repaint
-
 
459
 
-
 
460
	mov	eax, 9
-
 
461
	mov	ebx, process_info_buffer
-
 
462
	mov	ecx, [prev_active_window]
-
 
463
	int	0x40
-
 
464
	call	need_window_tab
-
 
465
	jz	@f
-
 
466
 
-
 
467
.need_repaint:
392
 
468
	mov	dword [active_window_changed], 1
393
    call draw_info
469
 
394
    call draw_running_applications
470
@@:
Line 395... Line 471...
395
 
471
 
396
    mov  eax, 23
472
    mov  eax, 23
397
    mov  ebx, 20
473
    mov  ebx, 20
398
    int  0x40
474
    int  0x40
399
 
475
 
-
 
476
    cmp  eax,1		; redraw ?
-
 
477
    jz	 red
-
 
478
    cmp  eax,3		; button ?
-
 
479
    jz	 button
400
    cmp  eax,1		; redraw ?
480
	call	handle_key
Line -... Line 481...
-
 
481
 
-
 
482
	cmp  dword [active_window_changed], 0
401
    jz	 red
483
	jnz   red_active
Line -... Line 484...
-
 
484
 
-
 
485
	jmp	still
402
    cmp  eax,3		; button ?
486
 
403
    jz	 button
487
  red_active:		; barsuk
404
	call	handle_key
488
 
405
	jmp	still
489
  red:			 ; redraw window
406
 
490
 
Line 419... Line 503...
419
    @@: mov	[screen_size],eax
503
    @@: mov	[screen_size],eax
420
	sub	ecx,PANEL_HEIGHT
504
	sub	ecx,PANEL_HEIGHT
421
	mcall	67,0,,,PANEL_HEIGHT
505
	mcall	67,0,,,PANEL_HEIGHT
Line 422... Line 506...
422
 
506
 
-
 
507
  .lp1:
423
  .lp1:
508
 
424
    call draw_window
509
    call draw_window
425
    call draw_info
510
    call draw_info
Line 426... Line 511...
426
    jmp  still
511
    jmp  still
427
 
512
 
428
  button:		 ; button
513
  button:		 ; button
Line -... Line 514...
-
 
514
    mov  eax,17
-
 
515
    int  0x40
-
 
516
 
429
    mov  eax,17
517
    cmp  al, 0			; barsuk
430
    int  0x40
518
    jnz  right_mouse
431
 
519
 
432
    cmp  ah,50
520
    cmp  ah,50
Line 444... Line 532...
444
    int  0x40
532
    int  0x40
445
;    cmp  [music_type],0
533
;    cmp  [music_type],0
446
;    je   still
534
;    je   still
447
    mcall 55,eax, , ,activatemusic
535
    mcall 55,eax, , ,activatemusic
448
    jmp  still
536
    jmp  still
-
 
537
 
-
 
538
right_mouse:			; barsuk
-
 
539
 
-
 
540
    cmp  ah,50
-
 
541
    jb	 still
-
 
542
    cmp  ah,70
-
 
543
    jg	 still
-
 
544
 
-
 
545
    movzx ecx,byte ah
-
 
546
    sub  ecx,52
-
 
547
 
-
 
548
    cmp  ecx, [app_tab_count]
-
 
549
    jge  still
-
 
550
 
-
 
551
    shl  ecx,2
-
 
552
 
-
 
553
    mov  eax, 37
-
 
554
    mov  ebx, 0
-
 
555
    int  0x40
-
 
556
    mov  ebx, eax
-
 
557
    shr  eax, 16
-
 
558
    mov  [x_coord], ax
-
 
559
    and  ebx, 0xFFFF
-
 
560
    mov  [y_coord], bx
-
 
561
 
-
 
562
    mov  eax, 9
-
 
563
    mov  ecx,[app_list+ecx]	; ecx->selected app.slot
-
 
564
    mov  [n_slot], ecx
-
 
565
    mov  ebx, procinfo_for_detect
-
 
566
    int  0x40
-
 
567
 
-
 
568
;    cmp  dword [procinfo_for_detect+process_information.slot_state],9
-
 
569
;    jz   still
-
 
570
 
-
 
571
	mov	eax, 51
-
 
572
	mov	ebx, 1
-
 
573
	mov	ecx, context_menu_start
-
 
574
	mov	edx, ctx_menu_stack
-
 
575
	int	0x40
-
 
576
 
-
 
577
	mov	[ctx_menu_PID], eax
-
 
578
 
-
 
579
    jmp  still
-
 
580
 
-
 
581
 
449
  no_activate:
582
  no_activate:
Line 450... Line 583...
450
 
583
 
451
 
584
 
Line 682... Line 815...
682
	ret
815
	ret
Line 683... Line 816...
683
 
816
 
684
redraw_window_tabs:
817
redraw_window_tabs:
685
	xor	edi, edi
818
	xor	edi, edi
-
 
819
	mov	[contrast], 0
-
 
820
 
-
 
821
	push	ebp			; barsuk {
-
 
822
	mov	eax, 18
-
 
823
	mov	ebx, 7
-
 
824
	int	0x40
-
 
825
	mov	ebp, eax		; barsuk }
686
	mov	[contrast], 0
826
 
687
.loop:
827
.loop:
688
	mov	ecx, [app_list+edi*4]
828
	mov	ecx, [app_list+edi*4]
689
	cmp	ecx, -1
829
	cmp	ecx, -1
Line 699... Line 839...
699
; // Alver 26.08.2007 // {
839
; // Alver 26.08.2007 // {
700
;	add	ebx, 6*10*10000h + 7*10000h + 54
840
;       add     ebx, 6*10*10000h + 7*10000h + 54
701
	add	ebx, 12*10*10000h + 7*10000h + 54
841
	add	ebx, 12*10*10000h + 7*10000h + 54
702
; } // Alver //
842
; } // Alver //
703
	mov	ecx, 3*10000h + 14
843
	mov	ecx, 3*10000h + 14
-
 
844
 
704
	xor	edx, edx
845
;       xor     edx, edx
-
 
846
	mov	edx, 0x383838		; barsuk
705
	int	0x40
847
	int	0x40
706
	sub	ebx, 10000h + 53
848
	sub	ebx, 10000h + 53
707
	mov	ecx, 4*10000h + 12
849
	mov	ecx, 4*10000h + 12
708
	int	0x40
850
	int	0x40
709
	sub	ebx, 10000h
851
	sub	ebx, 10000h
Line 714... Line 856...
714
	int	0x40
856
	int	0x40
715
	add	ebx, 10000h
857
	add	ebx, 10000h
716
	mov	ecx, 5*10000h + 10
858
	mov	ecx, 5*10000h + 10
717
	int	0x40
859
	int	0x40
Line 718... Line -...
718
 
-
 
719
	mov	edx, 0x88FF
-
 
720
	xor	[contrast], 1
-
 
721
	jz	@f
-
 
722
	mov	dh, 0x55
-
 
723
@@:
-
 
724
	pop	ecx
860
 
725
	mov	esi, [current_alt_tab_app]
-
 
726
	cmp	esi, -1
-
 
727
	jz	@f
861
	mov	edx, [wcolor]	; barsuk
728
	cmp	ecx, [alt_tab_list+esi*8]
862
	cmp	ebp, [esp]	; [esp]=saved ecx=active slot number
729
	jnz	@f
-
 
730
;        xor     edx, 0xFFFFFF
863
	jnz	@f
731
	mov	edx, 0xFF8000
864
	mov	edx, [system_colours.work_button]
-
 
865
@@:
732
@@:
866
	pop	ecx
733
	sub	ebx, 55*10000h - 53
867
	sub	ebx, 55*10000h - 53
734
	mov	ecx, 4*10000h + 12
868
	mov	ecx, 4*10000h + 12
735
	int	0x40
869
	int	0x40
736
	sub	ebx, 10000h + 53
870
	sub	ebx, 10000h + 53
Line 739... Line 873...
739
	add	ebx, 55*10000h
873
	add	ebx, 55*10000h
740
	int	0x40
874
	int	0x40
Line 741... Line 875...
741
 
875
 
742
	mov	eax, 4
876
	mov	eax, 4
743
	sub	ebx, 51*10000h - 6
877
	sub	ebx, 51*10000h - 6
744
	mov	ecx, 0xffffff	;[wcolor]
878
	mov	ecx, [system_colours.work_button_text]	;0xffffff
745
	mov	edx, 0x8000+10
879
	mov	edx, 0x8000+10
746
	mov	esi, 11
880
	mov	esi, 11
Line -... Line 881...
-
 
881
	int	0x40
747
	int	0x40
882
 
748
 
883
.nodraw:
749
	inc	edi
884
	inc	edi
750
	cmp	edi, [max_applications]
885
	cmp	edi, [max_applications]
-
 
886
	jb	.loop
751
	jb	.loop
887
.done:
Line 752... Line 888...
752
.done:
888
	pop	ebp
Line 753... Line 889...
753
	ret
889
	ret
Line 790... Line 926...
790
    inc  ecx
926
    inc  ecx
Line 791... Line 927...
791
 
927
 
792
    cmp  eax,ecx
928
    cmp  eax,ecx
Line -... Line 929...
-
 
929
    jge  cnewpr
-
 
930
 
793
    jge  cnewpr
931
    mov  [app_tab_count], edi	; barsuk
Line 794... Line 932...
794
 
932
 
Line 1242... Line 1380...
1242
 
1380
 
1243
    movzx ebx,word [screenxy+2]
1381
    movzx ebx,word [screenxy+2]
1244
    mov  ecx,0*65536+0
1382
    mov  ecx,0*65536+0
1245
    mov  edx,[wcolor]
1383
    mov  edx,[wcolor]
1246
    add  edx,0x161616
1384
    add  edx,0x161616
1247
  newline:
1385
  newline_:			; debug.inc has macros with the same name
1248
    sub  edx,0x040404
1386
    sub  edx,0x040404
1249
    mov  eax,38
1387
    mov  eax,38
1250
    cmp  [soften_up],1
1388
    cmp  [soften_up],1
1251
    jne  no_su
1389
    jne  no_su
Line 1267... Line 1405...
1267
  no_sd:
1405
  no_sd:
1268
    popa
1406
    popa
Line 1269... Line 1407...
1269
 
1407
 
1270
    add  ecx,1*65536+1
1408
    add  ecx,1*65536+1
1271
    cmp  cx,5
1409
    cmp  cx,5
Line 1272... Line 1410...
1272
    jb	 newline
1410
    jb	 newline_
1273
 
1411
 
Line 1274... Line 1412...
1274
    cmp   [soften_middle],1
1412
    cmp   [soften_middle],1
Line 1433... Line 1571...
1433
 
1571
 
1434
    push ebx
1572
    push ebx
1435
    mov  eax,13
1573
    mov  eax,13
1436
    mov  ebx,12 shl 16+44  ;51
1574
    mov  ebx,12 shl 16+44  ;51
1437
    mov  ecx,1 shl 16+17
1575
    mov  ecx,1 shl 16+17
-
 
1576
;    xor  edx,edx
1438
    xor  edx,edx
1577
    mov edx, 0x383838
1439
    int  0x40
1578
    int  0x40
1440
;    mov  ebx,63 shl 16+1
1579
;    mov  ebx,63 shl 16+1
1441
    mov  ebx,56 shl 16+1
1580
    mov  ebx,56 shl 16+1
1442
    mov  ecx,2 shl 16+15
1581
    mov  ecx,2 shl 16+15
Line 2125... Line 2264...
2125
    int  0x40
2264
    int  0x40
Line 2126... Line 2265...
2126
 
2265
 
2127
    popad
2266
    popad
Line 2128... Line 2267...
2128
    ret
2267
    ret
2129
 
2268
 
Line 2130... Line 2269...
2130
include 'detect.asm'
2269
;;;include 'detect.asm'
Line 2131... Line 2270...
2131
include 'ctx_menu.asm'
2270
include 'ctx_menu.asm'
Line 2154... Line 2293...
2154
 
2293
 
2155
 
2294
 
2156
lsz m_text,\
2295
lsz m_text,\
2157
  ru, "Œ…ž",\
2296
  ru, "Œ…ž",\
Line 2158... Line 2297...
2158
  en, "MENU",\
2297
  en, "MENU",\
Line 2159... Line 2298...
2159
  et, "MENÜÜ"
2298
  et, "MEN--"
Line 2160... Line 2299...
2160
 
2299
 
2161
mi_text   db   'WAVETETRBGRDGPL '
2300
mi_text   db   'WAVETETRBGRDGPL '
2162
 
2301
 
2163
flag_text db 'EnFiGeRuFrEt'
2302
flag_text db 'EnFiGeRuFrEtUa'
Line 2264... Line 2403...
2264
  .height dw ?
2403
  .height dw ?
2265
  .width  dw ?
2404
  .width  dw ?
Line 2266... Line 2405...
2266
 
2405
 
2267
this_slot      dd 0           ; Slot of this process
2406
this_slot      dd 0	      ; Slot of this process
2268
max_slot       dd 255
2407
max_slot       dd 255
2269
system_colours rd 10
2408
system_colours	system_colors ; rd 10
2270
app_list rd 50
2409
app_list rd 50
2271
alt_tab_list	rd	256*2
2410
alt_tab_list	rd	256*2
2272
alt_tab_list_size dd	?
2411
alt_tab_list_size dd	?
2273
process_info_buffer  rb 1024
2412
process_info_buffer  rb 1024
Line 2280... Line 2419...
2280
	rb	256
2419
	rb	256
2281
ctx_menu_stack:
2420
ctx_menu_stack:
Line 2282... Line 2421...
2282
 
2421
 
2283
panel_x_pos	rd	1
2422
panel_x_pos	rd	1
-
 
2423
panel_y_pos	rd	1
-
 
2424
 
-
 
2425
last_active_window	dd	0
-
 
2426
prev_active_window	dd	0
-
 
2427
active_window_changed	dd	0
-
 
2428
app_tab_count		dd	0
2284
panel_y_pos	rd	1
2429