Subversion Repositories Kolibri OS

Rev

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

Rev 437 Rev 443
Line 40... Line 40...
40
        mcall 2
40
        mcall 2
41
        cmp     al, 2
41
        cmp     al, 2
42
        jnz     begin_1.ret
42
        jnz     begin_1.ret
43
        mov     ebx, exec_fileinfo
43
        mov     ebx, exec_fileinfo
44
        shr     eax, 8
44
        shr     eax, 8
-
 
45
        cmp     al, 15
-
 
46
        jz      alt_tab_pressed
45
        cmp     al, 88
47
        cmp     al, 88
46
        jz      start_end_application
48
        jz      start_end_application
47
        cmp     al, 91
49
        cmp     al, 91
48
        jz      start_menu_application
50
        jz      start_menu_application
49
        cmp     al, 92
51
        cmp     al, 92
Line 52... Line 54...
52
        jz      kill_active_application
54
        jz      kill_active_application
53
        cmp     al, 71
55
        cmp     al, 71
54
        jz      page_list_next
56
        jz      page_list_next
55
        cmp     al, 72
57
        cmp     al, 72
56
        jz      page_list_prev
58
        jz      page_list_prev
-
 
59
        cmp     [current_alt_tab_app], -1
-
 
60
        jz      @f
-
 
61
        test    ah, 0x30
-
 
62
        jz      alt_tab_released
-
 
63
@@:
57
; this is hotkey Ctrl+Shift ;or LShift+RShift
64
; this is hotkey Ctrl+Shift ;or LShift+RShift
58
        mov     ebx, setup_exec
65
        mov     ebx, setup_exec
59
;        test    ah, 001100b
66
;        test    ah, 001100b
60
;        jz      change_sys_lang
67
;        jz      change_sys_lang
61
change_key_lang:
68
change_key_lang:
Line 114... Line 121...
114
    dec  [page_list]
121
    dec  [page_list]
115
    mov  [draw_window_1],1
122
    mov  [draw_window_1],1
116
  @@:
123
  @@:
117
    jmp  begin_1.ret
124
    jmp  begin_1.ret
Line -... Line 125...
-
 
125
 
-
 
126
alt_tab_pressed:
-
 
127
; handle Alt+Tab and Alt+Shift+Tab
-
 
128
        mov     ebp, eax
-
 
129
        cmp     [current_alt_tab_app], -1
-
 
130
        jnz     has_alt_tab_app
-
 
131
; § ¯®«­ï¥¬ â ¡«¨æ㠯ਫ®¦¥­¨©, ¯®¤«¥¦ é¨å ¯¥à¥ª«î祭¨î
-
 
132
        xor     edx, edx
-
 
133
        mov     ebx, 0x8000
-
 
134
        mov     ecx, 1
-
 
135
        mov     eax, 9
-
 
136
.fill:
-
 
137
        inc     ecx
-
 
138
        int     0x40
-
 
139
        call    need_window_tab
-
 
140
        jz      @f
-
 
141
        cmp     edx, 256
-
 
142
        jz      @f
-
 
143
        mov     [alt_tab_list+edx*8], ecx
-
 
144
        movzx   esi, word [ebx+4]
-
 
145
        mov     [alt_tab_list+edx*8+4], esi
-
 
146
        inc     edx
-
 
147
@@:
-
 
148
        cmp     ecx, eax
-
 
149
        mov     eax, 9
-
 
150
        jb      .fill
-
 
151
        mov     [alt_tab_list_size], edx
-
 
152
        cmp     edx, 2
-
 
153
        jb      begin_1.ret
-
 
154
        mcall   66,4,0,0        ; «®¢¨¬ ¬®¬¥­â ®â¯ã᪠­¨ï ¢á¥å ã¯à ¢«ïîé¨å ª« ¢¨è
-
 
155
        test    eax, eax
-
 
156
        jnz     begin_1.ret
-
 
157
        xor     edx, edx
-
 
158
        mov     eax, [alt_tab_list+4]
-
 
159
        xor     ecx, ecx
-
 
160
        inc     ecx
-
 
161
.findmax:
-
 
162
        cmp     [alt_tab_list+ecx*8+4], eax
-
 
163
        jb      @f
-
 
164
        mov     edx, ecx
-
 
165
        mov     eax, [alt_tab_list+ecx*8+4]
-
 
166
@@:
-
 
167
        inc     ecx
-
 
168
        cmp     ecx, [alt_tab_list_size]
-
 
169
        jb      .findmax
-
 
170
        mov     [current_alt_tab_app], edx
-
 
171
has_alt_tab_app:
-
 
172
        mov     eax, [current_alt_tab_app]
-
 
173
        mov     edx, [alt_tab_list+eax*8+4]     ; slot
-
 
174
        xor     ecx, ecx
-
 
175
        or      eax, -1
-
 
176
        test    ebp, 300h
-
 
177
        jz      .notshift
-
 
178
        or      esi, -1
-
 
179
.loop1:
-
 
180
        cmp     [alt_tab_list+ecx*8+4], edx
-
 
181
        jbe     @f
-
 
182
        cmp     [alt_tab_list+ecx*8+4], esi
-
 
183
        jae     @f
-
 
184
        mov     eax, ecx
-
 
185
        mov     esi, [alt_tab_list+ecx*8+4]
-
 
186
@@:
-
 
187
        inc     ecx
-
 
188
        cmp     ecx, [alt_tab_list_size]
-
 
189
        jb      .loop1
-
 
190
        cmp     eax, -1
-
 
191
        jnz     .found
-
 
192
        xor     edx, edx
-
 
193
        xor     ecx, ecx
-
 
194
        jmp     .loop1
-
 
195
.notshift:
-
 
196
        xor     esi, esi
-
 
197
.loop2:
-
 
198
        cmp     [alt_tab_list+ecx*8+4], edx
-
 
199
        jae     @f
-
 
200
        cmp     [alt_tab_list+ecx*8+4], esi
-
 
201
        jbe     @f
-
 
202
        mov     eax, ecx
-
 
203
        mov     esi, [alt_tab_list+ecx*8+4]
-
 
204
@@:
-
 
205
        inc     ecx
-
 
206
        cmp     ecx, [alt_tab_list_size]
-
 
207
        jb      .loop2
-
 
208
        cmp     eax, -1
-
 
209
        jnz     .found
-
 
210
        or      edx, -1
-
 
211
        xor     ecx, ecx
-
 
212
        jmp     .loop2
-
 
213
.found:
-
 
214
        mov     [current_alt_tab_app], eax
-
 
215
        push    eax
-
 
216
        xor     edx, edx
-
 
217
        div     [max_applications]
-
 
218
        mov     [page_list], eax
-
 
219
        mov     [draw_window_1], 1
-
 
220
        mov     edi, app_list
-
 
221
        push    edi
-
 
222
        mov     ecx, 20
-
 
223
        or      eax, -1
-
 
224
        rep     stosd
-
 
225
        pop     edi
-
 
226
        pop     ecx
-
 
227
        sub     ecx, edx
-
 
228
@@:
-
 
229
        cmp     ecx, [alt_tab_list_size]
-
 
230
        jae     redraw_window_tabs
-
 
231
        mov     eax, [alt_tab_list+ecx*8]
-
 
232
        stosd
-
 
233
        inc     ecx
-
 
234
        jmp     @b
-
 
235
 
-
 
236
alt_tab_released:
-
 
237
        mcall   66,5,0,0        ; 㦥 ¯®©¬ «¨, 墠â¨â :)
-
 
238
        or      eax, -1
-
 
239
        xchg    eax, [current_alt_tab_app]
-
 
240
        mov     ecx, [alt_tab_list+eax*8]
-
 
241
        mov     eax, 18
-
 
242
        mov     ebx, 3
-
 
243
        int     0x40
-
 
244
        jmp     redraw_window_tabs
118
 
245
 
Line 119... Line 246...
119
active_process  dd 0
246
active_process  dd 0
120
 
247
 
121
calendar_music:
248
calendar_music:
Line 166... Line 293...
166
        mcall 66,,91,100h       ; Alt+LWin
293
        mcall 66,,91,100h       ; Alt+LWin
167
        mcall 66,,92            ; Alt+RWin
294
        mcall 66,,92            ; Alt+RWin
168
        mcall 66,,62            ; Alt+F4
295
        mcall 66,,62            ; Alt+F4
169
        mcall 66,,71            ; Alt+Home
296
        mcall 66,,71            ; Alt+Home
170
        mcall 66,,72            ; Alt+Up
297
        mcall 66,,72            ; Alt+Up
-
 
298
        mcall 66,,15            ; Alt+Tab
-
 
299
        mcall 66,,,101h         ; Alt+Shift+Tab
171
    mcall 18, 8, 1
300
    mcall 18, 8, 1
172
    test eax, eax
301
    test eax, eax
173
    jne  @f
302
    jne  @f
174
    mcall 18, 8, 2
303
    mcall 18, 8, 2
175
  @@:
304
  @@:
Line 404... Line 533...
404
    call draw_window
533
    call draw_window
405
;  no_application_decrease:
534
;  no_application_decrease:
Line 406... Line 535...
406
 
535
 
Line 407... Line -...
407
    mov  [running_applications],edi
-
 
408
 
-
 
409
    mov  edi,0
-
 
410
    mov  ecx,2
536
    mov  [running_applications],edi
411
    mov  [contrast],0
-
 
-
 
537
 
412
    mov  eax,[max_applications]
538
        call    redraw_window_tabs
413
    mul  [page_list]
539
 
414
    test eax,eax
540
  dr_ret:
-
 
541
 
415
    je    @f
542
    popa
416
    inc  eax
-
 
Line -... Line 543...
-
 
543
 
-
 
544
    ret
-
 
545
 
-
 
546
need_window_tab:
-
 
547
; in: ebx->process info
-
 
548
; out: ZF set <=> do not draw
-
 
549
        cmp     byte [ebx+10], '@'
-
 
550
        jz      .nodraw
-
 
551
; \begin{diamond}[29.03.2007]
-
 
552
; do not draw undefined (zero-sized) windows
-
 
553
        cmp     dword [ebx+42], 0
-
 
554
        jnz     @f
-
 
555
        cmp     dword [ebx+46], 0
-
 
556
        jz      .nodraw
-
 
557
@@:
-
 
558
; \end{diamond}[29.03.2007]
-
 
559
        cmp     dword [ebx+10], 'ICON'
-
 
560
        jnz     @f
-
 
561
        cmp     [ebx+42], dword 51
-
 
562
        jnz     @f
-
 
563
        cmp     [ebx+46], dword 51
-
 
564
        jz      .nodraw
-
 
565
@@:
Line -... Line 566...
-
 
566
        cmp     [ebx+10], dword '    '
-
 
567
.nodraw:
-
 
568
        ret
417
  @@:
569
 
-
 
570
redraw_window_tabs:
-
 
571
        xor     edi, edi
-
 
572
        mov     [contrast], 0
Line -... Line 573...
-
 
573
.loop:
418
    mov  [draw_start_position],eax
574
        mov     ecx, [app_list+edi*4]
419
 
575
        cmp     ecx, -1
420
 
576
        jz      .done
Line 421... Line -...
421
  newpr:
-
 
422
 
-
 
423
    mov  eax,9
-
 
424
    mov  ebx,0x8000
-
 
425
    int  0x40
-
 
426
 
-
 
427
    push eax
-
 
428
    push ecx
-
 
429
 
-
 
430
    cmp  eax,ecx
-
 
431
    jb   norpl2
-
 
432
 
-
 
433
    cmp  byte [0x8000+10], '@'
-
 
434
    je   norpl
-
 
435
    cmp  [0x8000+10],dword 'ICON'
-
 
436
    jne  .noicon
-
 
437
    cmp  dword[0x8000+42],51
-
 
438
    jne  .noicon
-
 
439
    cmp  dword[0x8000+46],51
-
 
440
    je   norpl
-
 
441
  .noicon:
577
 
442
    cmp  [0x8000+10],dword '    '
-
 
443
    je   norpl
-
 
444
    dec  [draw_start_position]
-
 
445
    cmp  [draw_start_position],0
578
        push    ecx
446
    jg    norpl
579
        mov     eax, 9
447
    mov  eax,13
580
        mov     ebx, 0x8000
448
    mov  ebx,edi
581
        int     0x40
449
    inc  ebx
-
 
450
    shl  ebx,16
582
 
451
    imul ebx,6*10
-
 
452
    add  ebx,17 shl 16+54
583
        mov     eax, 13
453
    mov  ecx,3 shl 16+14
-
 
454
    xor  edx,edx
584
        imul    ebx, edi, 6*10*10000h
455
    sub  ebx,10 shl 16
585
        add     ebx, 6*10*10000h + 7*10000h + 54
456
    int  0x40
-
 
457
 
586
        mov     ecx, 3*10000h + 14
458
    sub  ebx,1 shl 16
587
        xor     edx, edx
459
    mov  bx,1
588
        int     0x40
460
    mov  ecx,4 shl 16+12
-
 
461
    int  0x40
589
        sub     ebx, 10000h + 53
462
 
590
        mov     ecx, 4*10000h + 12
463
    sub  ebx,1 shl 16
591
        int     0x40
464
    mov  ecx,5 shl 16+10
-
 
465
    int  0x40
592
        sub     ebx, 10000h
466
 
593
        mov     ecx, 5*10000h + 10
467
    add  ebx,56 shl 16
594
        int     0x40
Line 468... Line 595...
468
    mov  ecx,4 shl 16+12
595
        add     ebx, 56*10000h
469
    int  0x40
596
        mov     ecx, 4*10000h + 12
470
 
597
        int     0x40
471
    add  ebx,1 shl 16
598
        add     ebx, 10000h
-
 
599
        mov     ecx, 5*10000h + 10
472
    mov  ecx,5 shl 16+10
600
        int     0x40
473
    int  0x40
601
 
474
 
602
        mov     edx, 0x88FF
475
    inc  [contrast]
603
        xor     [contrast], 1
-
 
604
        jz      @f
476
    and  [contrast],1
605
        mov     dh, 0x55
477
    cmp  [contrast],1
606
@@:
478
    je   contrast1
607
        pop     ecx
-
 
608
        mov     esi, [current_alt_tab_app]
479
    mov  edx,0x88ff
609
        cmp     esi, -1
480
    jmp  contrast2
610
        jz      @f
481
contrast1:
611
        cmp     ecx, [alt_tab_list+esi*8]
482
    mov  edx,0x55ff
-
 
483
contrast2:
612
        jnz     @f
484
    sub  ebx,55 shl 16
-
 
485
    mov  bx,54
613
;        xor     edx, 0xFFFFFF
486
    mov  ecx,4 shl 16+12
614
        mov     edx, 0xFF8000
487
;    mov  edx,0x66ff
-
 
488
    int  0x40
615
@@:
489
 
616
        sub     ebx, 55*10000h - 53
Line 490... Line 617...
490
    sub  ebx,1 shl 16
617
        mov     ecx, 4*10000h + 12
491
    mov  bx,1
-
 
492
    mov  ecx,5 shl 16+10
-
 
493
    int  0x40
-
 
494
 
618
        int     0x40
495
    add  ebx,55 shl 16
-
 
496
    int  0x40
619
        sub     ebx, 10000h + 53
497
 
-
 
498
    mov  eax,4
620
        mov     ecx, 5*10000h + 10
499
    mov  ebx,edi
621
        int     0x40
500
    inc  ebx
-
 
501
    shl  ebx,16
622
        add     ebx, 55*10000h
Line 502... Line -...
502
    imul ebx,6*10  ;13
-
 
503
    add  ebx,20*65536+7
-
 
504
    mov  ecx,0xffffff  ;[wcolor]
623
        int     0x40
505
;    add  ecx,0x303030
-
 
506
    mov  edx,0x8000+10
-
 
507
    mov  esi,11
-
 
508
    sub  ebx,10 shl 16
-
 
509
    int  0x40
-
 
510
 
-
 
511
  norpl2:
-
 
512
 
-
 
513
    inc  edi
624
 
514
 
625
        mov     eax, 4
515
  norpl:
-
 
516
 
-
 
517
    pop  ecx
-
 
518
    pop  eax
626
        sub     ebx, 51*10000h - 6
519
 
-
 
520
    inc  ecx
-
 
521
 
-
 
522
    cmp  edi,[max_applications]
627
        mov     ecx, 0xffffff   ;[wcolor]
Line 523... Line -...
523
    jb   newpr
-
 
524
 
628
        mov     edx, 0x8000+10
Line 525... Line 629...
525
  nompr:
629
        mov     esi, 11
526
 
630
        int     0x40
527
  dr_ret:
631
 
Line 541... Line 645...
541
  @@:
645
  @@:
542
    mov  [draw_start_position],eax
646
    mov  [draw_start_position],eax
Line 543... Line 647...
543
 
647
 
544
    mov  edi,app_list
648
    mov  edi,app_list
545
    mov  ecx,20
649
    mov  ecx,20
546
    mov  eax,0xff
650
    mov  eax,-1
547
    cld
651
    cld
Line 548... Line 652...
548
    rep  stosd
652
    rep  stosd
549
 
653
 
Line 554... Line 658...
554
 
658
 
555
    mov  eax,9
659
    mov  eax,9
556
    mov  ebx,0x8000
660
    mov  ebx,0x8000
Line 557... Line -...
557
    int  0x40
-
 
558
 
-
 
559
    cmp  byte [0x8000+10], '@'
-
 
560
    je   cnorpl
-
 
561
; \begin{diamond}[29.03.2007]
-
 
562
; do not draw undefined (zero-sized) windows
-
 
563
        cmp     dword [0x8000+42], 0
661
    int  0x40
564
        jnz     @f
662
 
565
        cmp     dword [0x8000+46], 0
-
 
566
        jz      cnorpl
-
 
567
@@:
-
 
568
; \end{diamond}[29.03.2007]
-
 
569
    cmp  [0x8000+10],dword 'ICON'
-
 
570
    jne  .noicon
-
 
571
    cmp  dword[0x8000+42],51
-
 
572
    jne  .noicon
-
 
573
    cmp  dword[0x8000+46],51
-
 
574
    je   cnorpl
-
 
575
  .noicon:
-
 
576
    cmp  [0x8000+11],dword 'CON '
-
 
577
    je   cnorpl
-
 
578
;    cmp  [0x8000+11],dword 'ENU '
-
 
579
;    je   cnorpl
-
 
580
;    cmp  [0x8000+12],dword 'NEL '
-
 
581
;    je   cnorpl
-
 
582
    cmp  [0x8000+10],dword '    '
-
 
583
    je   cnorpl
663
        call    need_window_tab
584
    dec  [draw_start_position]
664
        jz      cnorpl
Line 585... Line 665...
585
    cmp  [draw_start_position],0
665
        sub     [draw_start_position], 1
Line 586... Line 666...
586
    jg     cnorpl
666
        jg      cnorpl
Line 1918... Line 1998...
1918
contrast  db 0
1998
contrast  db 0
Line 1919... Line 1999...
1919
 
1999
 
1920
running_applications  dd  0x100
2000
running_applications  dd  0x100
Line -... Line 2001...
-
 
2001
max_applications      dd  11
-
 
2002
 
1921
max_applications      dd  11
2003
current_alt_tab_app     dd      -1
1922
 
2004
 
1923
page_list  dd 0
2005
page_list  dd 0
Line 1924... Line 2006...
1924
draw_start_position dd 0
2006
draw_start_position dd 0
Line 1998... Line 2080...
1998
  .width  dw ?
2080
  .width  dw ?
Line 1999... Line 2081...
1999
 
2081
 
2000
area9 rb 100
2082
area9 rb 100
2001
system_colours rd 10
2083
system_colours rd 10
-
 
2084
app_list rd 50
-
 
2085
alt_tab_list    rd      256*2
2002
app_list rd 50
2086
alt_tab_list_size dd    ?
2003
tictable:
2087
tictable:
2004
  rd 256
2088
  rd 256