Subversion Repositories Kolibri OS

Rev

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

Rev 2219 Rev 2268
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: 2219 $
9
$Revision: 2268 $
10
 
10
 
11
;==============================================================================
11
;==============================================================================
Line 1161... Line 1161...
1161
;> eax = old (original) window box
1161
;> eax = old (original) window box
1162
;> ebx = new (final) window box
1162
;> ebx = new (final) window box
1163
;> esi = process slot
1163
;> esi = process slot
1164
;------------------------------------------------------------------------------
1164
;------------------------------------------------------------------------------
1165
        mov     edi, ebx
1165
        mov     edi, ebx
1166
        call    window._.draw_negative_box
1166
        call    window._.end_moving__box
Line 1167... Line 1167...
1167
 
1167
 
1168
        mov     edi, esi
1168
        mov     edi, esi
1169
        shl     edi, 5
1169
        shl     edi, 5
Line 1304... Line 1304...
1304
	add	edi, WDATA.box
1304
	add	edi, WDATA.box
1305
end if
1305
end if
1306
	mov	ecx, 4
1306
	mov	ecx, 4
1307
	repz	cmpsd
1307
	repz	cmpsd
1308
	pop	edi
1308
	pop	edi
1309
	jnz	@f
-
 
1310
	
-
 
1311
	mov	edi,eax
-
 
1312
        mov     eax, [edi + BOX.left - 2]
-
 
1313
        mov     ax, word[edi + BOX.left]
-
 
1314
        add     ax, word[edi + BOX.width]
-
 
1315
        mov     ebx, [edi + BOX.top - 2]
-
 
1316
        mov     bx, word[edi + BOX.top]
-
 
1317
        add     bx, word[edi + BOX.height]
-
 
1318
        xor     esi,esi
-
 
1319
        call    draw_rectangle.forced
-
 
1320
	jmp	.exit
1309
	jz	.exit
1321
@@:
1310
@@:
Line 1322... Line 1311...
1322
 
1311
 
Line 1323... Line 1312...
1323
        add     esp, -BOX.sizeof
1312
        add     esp, -BOX.sizeof
Line 1821... Line 1810...
1821
;------------------------------------------------------------------------------
1810
;------------------------------------------------------------------------------
1822
        push    eax ebx
1811
        push    eax ebx
Line 1823... Line 1812...
1823
 
1812
 
1824
        ; if type of current active window is 3 or 4, it must be redrawn
1813
        ; if type of current active window is 3 or 4, it must be redrawn
-
 
1814
        mov     ebx, [TASK_COUNT]
-
 
1815
	
-
 
1816
;	DEBUGF	1, "K : TASK_COUNT (0x%x)\n", ebx
1825
        mov     ebx, [TASK_COUNT]
1817
	
1826
        movzx   ebx, word[WIN_POS + ebx * 2]
1818
        movzx   ebx, word[WIN_POS + ebx * 2]
1827
        shl     ebx, 5
1819
        shl     ebx, 5
1828
        add     eax, window_data
1820
        add     eax, window_data
1829
        mov     al, [window_data + ebx + WDATA.fl_wstyle]
1821
        mov     al, [window_data + ebx + WDATA.fl_wstyle]
Line 1847... Line 1839...
1847
 
1839
 
1848
  .next_stack_window:
1840
  .next_stack_window:
1849
        cmp     eax, [TASK_COUNT]
1841
        cmp     eax, [TASK_COUNT]
1850
        jae     .move_self_up
1842
        jae     .move_self_up
-
 
1843
        inc     eax
-
 
1844
	
-
 
1845
;	push	ebx
-
 
1846
;	xor	ebx,ebx
-
 
1847
;	mov	bx,[WIN_STACK + eax * 2]
-
 
1848
;	DEBUGF	1, "K : DEC WIN_STACK (0x%x)\n",ebx
-
 
1849
;	pop	ebx
1851
        inc     eax
1850
	
1852
        cmp     [WIN_STACK + eax * 2], bx
1851
        cmp     [WIN_STACK + eax * 2], bx
1853
        jbe     .next_stack_window
1852
        jbe     .next_stack_window
1854
        dec     word[WIN_STACK + eax * 2]
1853
        dec     word[WIN_STACK + eax * 2]
Line 1879... Line 1878...
1879
        mov     word[MOUSE_SCROLL_V], 0
1878
        mov     word[MOUSE_SCROLL_V], 0
Line 1880... Line 1879...
1880
 
1879
 
1881
        pop     ebx eax
1880
        pop     ebx eax
Line -... Line 1881...
-
 
1881
        ret
-
 
1882
 
-
 
1883
;------------------------------------------------------------------------------
-
 
1884
window._.window_deactivate: ;////////////////////////////////////////////////////
-
 
1885
;------------------------------------------------------------------------------
-
 
1886
;? Deactivate window
-
 
1887
;------------------------------------------------------------------------------
-
 
1888
;> esi = pointer to WIN_POS+ window data
-
 
1889
;------------------------------------------------------------------------------
-
 
1890
	push	eax ebx
-
 
1891
;------------------------------------------------------------------------------
-
 
1892
.move_others_up:
-
 
1893
	; ax <- process no
-
 
1894
	movzx	ebx, word[esi]
-
 
1895
	; ax <- position in window stack
-
 
1896
	movzx	ebx, word[WIN_STACK + ebx * 2]
-
 
1897
	; up others
-
 
1898
	xor	eax, eax
-
 
1899
.next_stack_window:
-
 
1900
	cmp	eax, [TASK_COUNT]
-
 
1901
	jae	.move_self_down
-
 
1902
	inc	eax
-
 
1903
	cmp	[WIN_STACK + eax * 2], bx
-
 
1904
	jae	.next_stack_window
-
 
1905
	inc	word[WIN_STACK + eax * 2]
-
 
1906
	jmp	.next_stack_window
-
 
1907
;----------------------------------------------
-
 
1908
.move_self_down:
-
 
1909
	movzx	ebx, word[esi]
-
 
1910
	; this is the last (and the low)
-
 
1911
	mov	[WIN_STACK + ebx * 2], word 1
-
 
1912
	; update on screen - window stack
-
 
1913
	xor	eax, eax
-
 
1914
.next_window_pos:
-
 
1915
	cmp	eax, [TASK_COUNT]
-
 
1916
	jae	.reset_vars
-
 
1917
	inc	eax
-
 
1918
	movzx	ebx, word[WIN_STACK + eax * 2]
-
 
1919
	mov	[WIN_POS + ebx * 2], ax
-
 
1920
	jmp	.next_window_pos
-
 
1921
;-----------------------------------------------
-
 
1922
.reset_vars:
-
 
1923
	mov	byte[KEY_COUNT], 0
-
 
1924
	mov	byte[BTN_COUNT], 0
-
 
1925
	mov	word[MOUSE_SCROLL_H], 0
-
 
1926
	mov	word[MOUSE_SCROLL_V], 0
-
 
1927
	pop	ebx eax
1882
        ret
1928
	ret
1883
 
1929
;------------------------------------------------------------------------------	
1884
align 4
1930
align 4
1885
;------------------------------------------------------------------------------
1931
;------------------------------------------------------------------------------
1886
window._.check_window_draw: ;//////////////////////////////////////////////////
1932
window._.check_window_draw: ;//////////////////////////////////////////////////
Line 2082... Line 2128...
2082
;? Draw negative box
2128
;? Draw negative box
2083
;------------------------------------------------------------------------------
2129
;------------------------------------------------------------------------------
2084
;> edi = pointer to BOX struct
2130
;> edi = pointer to BOX struct
2085
;------------------------------------------------------------------------------
2131
;------------------------------------------------------------------------------
2086
        push    eax ebx esi
2132
        push    eax ebx esi
-
 
2133
        mov     esi, 0x01000000
-
 
2134
.1:
2087
        mov     eax, [edi + BOX.left - 2]
2135
        mov     eax, [edi + BOX.left - 2]
2088
        mov     ax, word[edi + BOX.left]
2136
        mov     ax, word[edi + BOX.left]
2089
        add     ax, word[edi + BOX.width]
2137
        add     ax, word[edi + BOX.width]
2090
        mov     ebx, [edi + BOX.top - 2]
2138
        mov     ebx, [edi + BOX.top - 2]
2091
        mov     bx, word[edi + BOX.top]
2139
        mov     bx, word[edi + BOX.top]
2092
        add     bx, word[edi + BOX.height]
2140
        add     bx, word[edi + BOX.height]
2093
        mov     esi, 0x01000000
-
 
2094
        call    draw_rectangle.forced
2141
        call    draw_rectangle.forced
2095
        pop     esi ebx eax
2142
        pop     esi ebx eax
2096
        ret
2143
        ret
-
 
2144
;------------------------------------------------------------------------------
-
 
2145
window._.end_moving__box: ;//////////////////////////////////////////////////
-
 
2146
;------------------------------------------------------------------------------
-
 
2147
;? Draw positive box
-
 
2148
;------------------------------------------------------------------------------
-
 
2149
;> edi = pointer to BOX struct
-
 
2150
;------------------------------------------------------------------------------
-
 
2151
        push    eax ebx esi
-
 
2152
	xor	esi,esi
-
 
2153
	jmp	window._.draw_negative_box.1
2097
2154