Subversion Repositories Kolibri OS

Rev

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

Rev 322 Rev 379
Line 58... Line 58...
58
        push    edx ecx ebx eax
58
        push    edx ecx ebx eax
Line 59... Line 59...
59
 
59
 
60
        mov     esi, 1
60
        mov     esi, 1
Line 61... Line 61...
61
        call    setscreen
61
        call    setscreen
62
 
62
 
63
        mov     ebp, [0x3004]        ; number of processes
63
        mov     ebp, [TASK_COUNT]        ; number of processes
64
        cmp     ebp, 1
64
        cmp     ebp, 1
65
        jbe     .finish
65
        jbe     .finish
66
        align 4
66
        align 4
67
      .new_wnd:
67
      .new_wnd:
Line 68... Line 68...
68
        movzx   edi, word [0xC400 + esi * 2]
68
        movzx   edi, word [0xC400 + esi * 2]
69
        shl     edi, 5
69
        shl     edi, 5
Line 70... Line 70...
70
 
70
 
71
        cmp     [0x3000+edi+TASKDATA.state], byte 9
71
        cmp     [CURRENT_TASK+edi+TASKDATA.state], byte 9
72
        je      .not_wnd
72
        je      .not_wnd
Line 373... Line 373...
373
   dspl1:
373
   dspl1:
Line 374... Line 374...
374
 
374
 
375
     cmp  eax,2       ; set common window colours
375
     cmp  eax,2       ; set common window colours
376
     jne  no_com_colours
376
     jne  no_com_colours
377
     mov  [windowtypechanged],dword 1
377
     mov  [windowtypechanged],dword 1
378
     mov  esi,[0x3010]
378
     mov  esi,[TASK_BASE]
379
     add  esi,TASKDATA.mem_start
379
     add  esi,TASKDATA.mem_start
380
     add  ebx,[esi]
380
     add  ebx,[esi]
381
     mov  esi,ebx
381
     mov  esi,ebx
382
     mov  edi,common_colours
382
     mov  edi,common_colours
Line 387... Line 387...
387
     ret
387
     ret
388
   no_com_colours:
388
   no_com_colours:
Line 389... Line 389...
389
 
389
 
390
     cmp  eax,3       ; get common window colours
390
     cmp  eax,3       ; get common window colours
391
     jne  no_get_com
391
     jne  no_get_com
392
     mov  esi,[0x3010]
392
     mov  esi,[TASK_BASE]
393
     add  esi,TASKDATA.mem_start
393
     add  esi,TASKDATA.mem_start
394
     add  ebx,[esi]
394
     add  ebx,[esi]
395
     mov  edi,ebx
395
     mov  edi,ebx
396
     mov  esi,common_colours
396
     mov  esi,common_colours
Line 466... Line 466...
466
   no_get_skinmargins:
466
   no_get_skinmargins:
Line 467... Line 467...
467
 
467
 
468
        cmp     eax,8       ; set window skin
468
        cmp     eax,8       ; set window skin
469
        jne     no_set_skin
469
        jne     no_set_skin
470
        mov     eax,ebx
470
        mov     eax,ebx
471
        mov     edi,[0x3010]
471
        mov     edi,[TASK_BASE]
472
        add     ebx,[edi+TASKDATA.mem_start]        ; abs start of info block
472
        add     ebx,[edi+TASKDATA.mem_start]        ; abs start of info block
473
        pushd   [ebx+0] [ebx+4] [ebx+8] [ebx+12]
473
        pushd   [ebx+0] [ebx+4] [ebx+8] [ebx+12]
474
        mov     dword[ebx+0],0        ; read
474
        mov     dword[ebx+0],0        ; read
475
        mov     dword[ebx+4],0        ; from the beginning
475
        mov     dword[ebx+4],0        ; from the beginning
Line 513... Line 513...
513
     popad
513
     popad
514
     ret
514
     ret
Line 515... Line 515...
515
 
515
 
516
 
516
 
517
repos_windows:
517
repos_windows:
518
        mov     ecx,[0x3004]
518
        mov     ecx,[TASK_COUNT]
519
        mov     edi,0x20*2
519
        mov     edi,0x20*2
520
    mov    byte[0x0000fff0],1
520
    mov    byte[0x0000fff0],1
521
        dec     ecx
521
        dec     ecx
Line 909... Line 909...
909
 
909
 
Line 910... Line 910...
910
        pushad
910
        pushad
911
 
911
 
912
     ; if type of current active window is 3,
912
     ; if type of current active window is 3,
913
     ; it must be redrawn
913
     ; it must be redrawn
914
        mov   eax, [0x3004]
914
        mov   eax, [TASK_COUNT]
915
        movzx eax, word [0xC400 + eax*2]
915
        movzx eax, word [0xC400 + eax*2]
916
        shl   eax, 5
916
        shl   eax, 5
917
        add   eax, window_data
917
        add   eax, window_data
Line 926... Line 926...
926
      movzx   eax, word [esi] ; ax <- process no
926
      movzx   eax, word [esi] ; ax <- process no
927
      movzx   eax, word [0xC000+eax*2] ; ax <- position in window stack
927
      movzx   eax, word [0xC000+eax*2] ; ax <- position in window stack
Line 928... Line 928...
928
 
928
 
929
        xor   esi, esi        ; drop others
929
        xor   esi, esi        ; drop others
930
      waloop:
930
      waloop:
931
        cmp   esi, dword [0x3004]
931
        cmp   esi, dword [TASK_COUNT]
932
        jae   wacont
932
        jae   wacont
933
        inc   esi
933
        inc   esi
934
        lea   edi, [0xC000 + esi*2]
934
        lea   edi, [0xC000 + esi*2]
935
        mov   bx, [edi] ; position of the current process
935
        mov   bx, [edi] ; position of the current process
Line 942... Line 942...
942
      wacont:
942
      wacont:
943
                            ; set to no 1
943
                            ; set to no 1
944
        pop   esi           ;   esi = pointer at 0xC400
944
        pop   esi           ;   esi = pointer at 0xC400
Line 945... Line 945...
945
 
945
 
946
      movzx   eax, word [esi]
946
      movzx   eax, word [esi]
947
        mov   bx, [0x3004]  ; number of processes
947
        mov   bx, [TASK_COUNT]  ; number of processes
Line 948... Line 948...
948
        mov   [0xC000+eax*2], bx     ; this is the last (and the upper)
948
        mov   [0xC000+eax*2], bx     ; this is the last (and the upper)
949
 
949
 
950
        ; update on screen -window stack
950
        ; update on screen -window stack
951
        xor   esi, esi
951
        xor   esi, esi
952
      waloop2:
952
      waloop2:
953
        mov   edi, [0x3004]
953
        mov   edi, [TASK_COUNT]
954
        cmp   esi, edi
954
        cmp   esi, edi
955
        jae   wacont2
955
        jae   wacont2
956
        inc   esi
956
        inc   esi
Line 990... Line 990...
990
 
990
 
991
        pop   esi
991
        pop   esi
992
        add   esi, 2
992
        add   esi, 2
Line 993... Line 993...
993
        push  esi
993
        push  esi
994
 
994
 
Line 995... Line 995...
995
        mov   eax, [0x3004]
995
        mov   eax, [TASK_COUNT]
996
        lea   eax, word [0xC400 + eax * 2] ; number of the upper window
996
        lea   eax, word [0xC400 + eax * 2] ; number of the upper window
Line 997... Line 997...
997
 
997
 
998
        cmp   esi, eax
998
        cmp   esi, eax
999
        ja    .all_wnds_to_top
999
        ja    .all_wnds_to_top
1000
 
1000
 
Line 1001... Line 1001...
1001
        movzx eax, word [esi]
1001
        movzx eax, word [esi]
Line 1002... Line 1002...
1002
        shl   eax, 5
1002
        shl   eax, 5
Line 1056... Line 1056...
1056
        mov   [0xfb44], byte 1     ; do draw mouse
1056
        mov   [0xfb44], byte 1     ; do draw mouse
1057
        call  windowactivate
1057
        call  windowactivate
Line 1058... Line 1058...
1058
 
1058
 
1059
        ; update screen info
1059
        ; update screen info
1060
        pushad
1060
        pushad
1061
        mov   edi, [0x3004] ; the last process (number)
1061
        mov   edi, [TASK_COUNT] ; the last process (number)
1062
        movzx esi, word [0xC400 + edi * 2]
1062
        movzx esi, word [0xC400 + edi * 2]
1063
        shl   esi, 5
1063
        shl   esi, 5
Line 1064... Line 1064...
1064
        add   esi, window_data
1064
        add   esi, window_data
Line 1070... Line 1070...
1070
    mov   edx, [esi + WDATA.box.height] ; sy
1070
    mov   edx, [esi + WDATA.box.height] ; sy
Line 1071... Line 1071...
1071
 
1071
 
1072
        add   ecx, eax       ; ecx = x_end
1072
        add   ecx, eax       ; ecx = x_end
Line 1073... Line 1073...
1073
        add   edx, ebx       ; edx = y_end
1073
        add   edx, ebx       ; edx = y_end
1074
 
1074
 
1075
        mov   edi, [0x3004]
1075
        mov   edi, [TASK_COUNT]
1076
        movzx esi, word [0xC400 + edi * 2]
1076
        movzx esi, word [0xC400 + edi * 2]
Line 1077... Line 1077...
1077
        call  setscreen
1077
        call  setscreen
Line 1135... Line 1135...
1135
        add   edi, window_data
1135
        add   edi, window_data
1136
        test  [edi+WDATA.fl_wstate], WSTATE_MINIMIZED
1136
        test  [edi+WDATA.fl_wstate], WSTATE_MINIMIZED
1137
        jz    .skip_redrawings
1137
        jz    .skip_redrawings
1138
        mov   [edi+WDATA.fl_redraw], 1
1138
        mov   [edi+WDATA.fl_redraw], 1
1139
        and   [edi+WDATA.fl_wstate], not WSTATE_MINIMIZED
1139
        and   [edi+WDATA.fl_wstate], not WSTATE_MINIMIZED
1140
        cmp   eax, [0x3004] ; the uppermost window
1140
        cmp   eax, [TASK_COUNT] ; the uppermost window
1141
        jnz   .no_uppermost
1141
        jnz   .no_uppermost
1142
        mov   eax, [edi+WDATA.box.left]
1142
        mov   eax, [edi+WDATA.box.left]
1143
        mov   ebx, [edi+WDATA.box.top]
1143
        mov   ebx, [edi+WDATA.box.top]
1144
        mov   ecx, eax
1144
        mov   ecx, eax
1145
        mov   edx, ebx
1145
        mov   edx, ebx
Line 1172... Line 1172...
1172
checkwindows:
1172
checkwindows:
1173
        pushad
1173
        pushad
Line 1174... Line 1174...
1174
 
1174
 
1175
        cmp   [window_minimize], 0
1175
        cmp   [window_minimize], 0
1176
        je    .no_minimizing
1176
        je    .no_minimizing
1177
        mov   eax, [0x3004]       ; the uppermost window
1177
        mov   eax, [TASK_COUNT]       ; the uppermost window
1178
        mov   bl, 0
1178
        mov   bl, 0
1179
        xchg  [window_minimize], bl
1179
        xchg  [window_minimize], bl
1180
        cmp   bl, 1
1180
        cmp   bl, 1
1181
        jne   .restore
1181
        jne   .restore
Line 1190... Line 1190...
1190
        jne   .mouse_buttons_pressed
1190
        jne   .mouse_buttons_pressed
1191
        popad
1191
        popad
1192
        ret
1192
        ret
1193
    .mouse_buttons_pressed:
1193
    .mouse_buttons_pressed:
Line 1194... Line 1194...
1194
 
1194
 
1195
        mov   esi,[0x3004]
1195
        mov   esi,[TASK_COUNT]
Line 1196... Line 1196...
1196
        inc   esi
1196
        inc   esi
1197
 
1197
 
1198
      cwloop:
1198
      cwloop:
Line 1226... Line 1226...
1226
        cmp   ebx, edx
1226
        cmp   ebx, edx
1227
        jae   cwloop
1227
        jae   cwloop
Line 1228... Line 1228...
1228
 
1228
 
1229
        pushad
1229
        pushad
1230
        mov   eax, esi
1230
        mov   eax, esi
1231
        mov   ebx, [0x3004]
1231
        mov   ebx, [TASK_COUNT]
1232
        cmp   eax, ebx      ; is this window active?
1232
        cmp   eax, ebx      ; is this window active?
Line 1233... Line 1233...
1233
        jz    .move_resize_window
1233
        jz    .move_resize_window
1234
 
1234
 
Line 1749... Line 1749...
1749
;  eax = 1    shape area scale
1749
;  eax = 1    shape area scale
1750
;      ebx    2^ebx scale
1750
;      ebx    2^ebx scale
Line 1751... Line 1751...
1751
 
1751
 
1752
     test eax, eax
1752
     test eax, eax
1753
     jne  rsw_no_address
1753
     jne  rsw_no_address
1754
     mov  eax,[0x3000]
1754
     mov  eax,[CURRENT_TASK]
Line 1755... Line 1755...
1755
     shl  eax,8
1755
     shl  eax,8
1756
 
1756
 
Line 1757... Line 1757...
1757
     mov  [eax+0x80000+APPDATA.wnd_shape],ebx
1757
     mov  [eax+0x80000+APPDATA.wnd_shape],ebx
1758
   rsw_no_address:
1758
   rsw_no_address:
1759
 
1759
 
1760
     cmp  eax,1
1760
     cmp  eax,1
1761
     jne  rsw_no_scale
1761
     jne  rsw_no_scale
1762
     mov  eax,[0x3000]
1762
     mov  eax,[CURRENT_TASK]
Line 1763... Line 1763...
1763
     shl  eax,8
1763
     shl  eax,8