Subversion Repositories Kolibri OS

Rev

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

Rev 8866 Rev 8869
Line 4... Line 4...
4
;; Copyright (C) MenuetOS 2000-2004 Ville Mikael Turjanmaa      ;;
4
;; Copyright (C) MenuetOS 2000-2004 Ville Mikael Turjanmaa      ;;
5
;; Distributed under terms of the GNU General Public License    ;;
5
;; Distributed under terms of the GNU General Public License    ;;
6
;;                                                              ;;
6
;;                                                              ;;
7
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
7
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Line 8... Line 8...
8
 
8
 
Line 9... Line 9...
9
$Revision: 8866 $
9
$Revision: 8869 $
10
 
10
 
11
;==============================================================================
11
;==============================================================================
Line 57... Line 57...
57
;--------------------------------------
57
;--------------------------------------
58
@@:
58
@@:
59
; type IV & V - skinned window (resizable & not)
59
; type IV & V - skinned window (resizable & not)
60
        mov     eax, [thread_count]
60
        mov     eax, [thread_count]
61
        movzx   eax, word[WIN_POS + eax * 2]
61
        movzx   eax, word[WIN_POS + eax * 2]
62
        cmp     eax, [CURRENT_TASK]
62
        cmp     eax, [current_slot_idx]
63
        setz    al
63
        setz    al
64
        movzx   eax, al
64
        movzx   eax, al
65
        push    eax
65
        push    eax
66
        call    drawwindow_IV
66
        call    drawwindow_IV
67
        jmp     window._.draw_window_caption.2
67
        jmp     window._.draw_window_caption.2
Line 310... Line 310...
310
;------------------------------------------------------------------------------
310
;------------------------------------------------------------------------------
311
syscall_move_window: ;///// system function 67 ////////////////////////////////
311
syscall_move_window: ;///// system function 67 ////////////////////////////////
312
;------------------------------------------------------------------------------
312
;------------------------------------------------------------------------------
313
;? 
313
;? 
314
;------------------------------------------------------------------------------
314
;------------------------------------------------------------------------------
315
        mov     edi, [CURRENT_TASK]
315
        mov     edi, [current_slot_idx]
316
        shl     edi, 5
316
        shl     edi, 5
317
        add     edi, window_data
317
        add     edi, window_data
Line 318... Line 318...
318
 
318
 
319
        test    [edi + WDATA.fl_wdrawn], 1
319
        test    [edi + WDATA.fl_wdrawn], 1
Line 365... Line 365...
365
.exit:
365
.exit:
366
        ret
366
        ret
367
;------------------------------------------------------------------------------
367
;------------------------------------------------------------------------------
368
syscall_window_settings: ;///// system function 71 ////////////////////////////
368
syscall_window_settings: ;///// system function 71 ////////////////////////////
369
;------------------------------------------------------------------------------
369
;------------------------------------------------------------------------------
370
        mov     edi, [CURRENT_TASK]
370
        mov     edi, [current_slot_idx]
371
        shl     edi, 5
371
        shl     edi, 5
372
        or      [edi + window_data + WDATA.fl_wstyle], WSTYLE_HASCAPTION
372
        or      [edi + window_data + WDATA.fl_wstyle], WSTYLE_HASCAPTION
373
        cmp     ebx, 2
373
        cmp     ebx, 2
374
        jz      @f
374
        jz      @f
375
        xor     edx, edx
375
        xor     edx, edx
Line 443... Line 443...
443
align 4
443
align 4
444
.next_window:
444
.next_window:
445
        movzx   edi, word[WIN_POS + esi * 2]
445
        movzx   edi, word[WIN_POS + esi * 2]
446
        shl     edi, 5                  ;size of TASKDATA and WDATA = 32 bytes
446
        shl     edi, 5                  ;size of TASKDATA and WDATA = 32 bytes
Line 447... Line 447...
447
 
447
 
448
        cmp     [CURRENT_TASK + edi + TASKDATA.state], TSTATE_FREE
448
        cmp     byte [TASK_TABLE + edi + TASKDATA.state], TSTATE_FREE
Line 449... Line 449...
449
        je      .skip_window
449
        je      .skip_window
450
 
450
 
451
        add     edi, window_data
451
        add     edi, window_data
Line 983... Line 983...
983
align 4
983
align 4
984
.loop:
984
.loop:
985
        movzx   edi, word[WIN_POS + eax * 2]
985
        movzx   edi, word[WIN_POS + eax * 2]
986
        shl     edi, 5
986
        shl     edi, 5
987
; it is a unused slot?
987
; it is a unused slot?
988
        cmp     dword [edi+CURRENT_TASK+TASKDATA.state], 9
988
        cmp     byte [edi+TASK_TABLE+TASKDATA.state], TSTATE_FREE
989
        je      @f
989
        je      @f
990
; it is a hidden thread?
990
; it is a hidden thread?
991
        lea     esi, [edi*8+SLOT_BASE+APPDATA.app_name]
991
        lea     esi, [edi*8+SLOT_BASE+APPDATA.app_name]
992
        cmp     [esi], byte '@'
992
        cmp     [esi], byte '@'
993
        je      @f
993
        je      @f
Line 1550... Line 1550...
1550
;------------------------------------------------------------------------------
1550
;------------------------------------------------------------------------------
1551
;? 
1551
;? 
1552
;------------------------------------------------------------------------------
1552
;------------------------------------------------------------------------------
1553
;< edx = pointer to WDATA struct
1553
;< edx = pointer to WDATA struct
1554
;------------------------------------------------------------------------------
1554
;------------------------------------------------------------------------------
1555
        mov     eax, [CURRENT_TASK]
1555
        mov     eax, [current_slot_idx]
1556
        shl     eax, 5
1556
        shl     eax, 5
1557
        add     eax, window_data
1557
        add     eax, window_data
1558
; save window colors
1558
; save window colors
1559
        mov     [eax + WDATA.cl_workarea], edx
1559
        mov     [eax + WDATA.cl_workarea], edx
1560
        mov     [eax + WDATA.cl_titlebar], esi
1560
        mov     [eax + WDATA.cl_titlebar], esi
Line 1609... Line 1609...
1609
        movsd
1609
        movsd
1610
        movsd
1610
        movsd
Line 1611... Line 1611...
1611
 
1611
 
Line 1612... Line 1612...
1612
        pop     edi ecx
1612
        pop     edi ecx
1613
 
1613
 
1614
        mov     esi, [CURRENT_TASK]
1614
        mov     esi, [current_slot_idx]
1615
        movzx   esi, word[WIN_STACK + esi * 2]
1615
        movzx   esi, word[WIN_STACK + esi * 2]
Line 1616... Line 1616...
1616
        lea     esi, [WIN_POS + esi * 2]
1616
        lea     esi, [WIN_POS + esi * 2]
Line 2123... Line 2123...
2123
 
2123
 
2124
        cmp     esi, eax
2124
        cmp     esi, eax
Line 2125... Line 2125...
2125
        ja      .exit.no_redraw
2125
        ja      .exit.no_redraw
2126
 
2126
 
2127
        movzx   edx, word[esi]
2127
        movzx   edx, word[esi]
2128
        shl     edx, 5
2128
        shl     edx, 5 ; size of TASKDATA and WDATA is 32 bytes
Line 2129... Line 2129...
2129
        cmp     [CURRENT_TASK + edx + TASKDATA.state], TSTATE_FREE
2129
        cmp     byte [TASK_TABLE + edx + TASKDATA.state], TSTATE_FREE
2130
        je      .next_window
2130
        je      .next_window
2131
 
2131
 
Line 2172... Line 2172...
2172
;? 
2172
;? 
2173
;------------------------------------------------------------------------------
2173
;------------------------------------------------------------------------------
2174
        xor     eax, eax
2174
        xor     eax, eax
2175
        mov     edx, [thread_count]
2175
        mov     edx, [thread_count]
2176
        movzx   edx, word[WIN_POS + edx * 2]
2176
        movzx   edx, word[WIN_POS + edx * 2]
2177
        cmp     edx, [CURRENT_TASK]
2177
        cmp     edx, [current_slot_idx]
2178
        jne     @f
2178
        jne     @f
2179
        inc     eax
2179
        inc     eax
2180
;--------------------------------------
2180
;--------------------------------------
2181
align 4
2181
align 4
2182
@@:
2182
@@:
2183
        mov     edx, [CURRENT_TASK]
2183
        mov     edx, [current_slot_idx]
2184
        shl     edx, 5
2184
        shl     edx, 5
2185
        add     edx, window_data
2185
        add     edx, window_data
2186
        movzx   ebx, [edx + WDATA.fl_wstyle]
2186
        movzx   ebx, [edx + WDATA.fl_wstyle]
2187
        and     bl, 0x0F
2187
        and     bl, 0x0F
2188
        cmp     bl, 3
2188
        cmp     bl, 3
Line 2214... Line 2214...
2214
 
2214
 
2215
        call    drawwindow_I_caption
2215
        call    drawwindow_I_caption
2216
;--------------------------------------
2216
;--------------------------------------
2217
align 4
2217
align 4
2218
.2:
2218
.2:
2219
        mov     edi, [CURRENT_TASK]
2219
        mov     edi, [current_slot_idx]
2220
        shl     edi, 5
2220
        shl     edi, 5
2221
        test    [edi + window_data + WDATA.fl_wstyle], WSTYLE_HASCAPTION
2221
        test    [edi + window_data + WDATA.fl_wstyle], WSTYLE_HASCAPTION
2222
        jz      .exit
2222
        jz      .exit
2223
        mov     edx, [edi * 8 + SLOT_BASE + APPDATA.wnd_caption]
2223
        mov     edx, [edi * 8 + SLOT_BASE + APPDATA.wnd_caption]
Line 2400... Line 2400...
2400
align 4
2400
align 4
2401
.next_window:
2401
.next_window:
2402
        movzx   edi, word[WIN_POS + esi * 2]
2402
        movzx   edi, word[WIN_POS + esi * 2]
2403
        shl     edi, 5                  ;size of TASKDATA and WDATA = 32 bytes
2403
        shl     edi, 5                  ;size of TASKDATA and WDATA = 32 bytes
Line 2404... Line 2404...
2404
 
2404
 
2405
        cmp     [CURRENT_TASK + edi + TASKDATA.state], TSTATE_FREE
2405
        cmp     byte [TASK_TABLE + edi + TASKDATA.state], TSTATE_FREE
Line 2406... Line 2406...
2406
        je      .skip_window
2406
        je      .skip_window
2407
 
2407
 
2408
        add     edi, window_data
2408
        add     edi, window_data