Subversion Repositories Kolibri OS

Rev

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

Rev 2233 Rev 2244
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: 2233 $
9
$Revision: 2244 $
10
 
10
 
11
;==============================================================================
11
;==============================================================================
Line 1810... Line 1810...
1810
;------------------------------------------------------------------------------
1810
;------------------------------------------------------------------------------
1811
        push    eax ebx
1811
        push    eax ebx
Line 1812... Line 1812...
1812
 
1812
 
1813
        ; 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
1814
        mov     ebx, [TASK_COUNT]
1817
	
1815
        movzx   ebx, word[WIN_POS + ebx * 2]
1818
        movzx   ebx, word[WIN_POS + ebx * 2]
1816
        shl     ebx, 5
1819
        shl     ebx, 5
1817
        add     eax, window_data
1820
        add     eax, window_data
1818
        mov     al, [window_data + ebx + WDATA.fl_wstyle]
1821
        mov     al, [window_data + ebx + WDATA.fl_wstyle]
Line 1836... Line 1839...
1836
 
1839
 
1837
  .next_stack_window:
1840
  .next_stack_window:
1838
        cmp     eax, [TASK_COUNT]
1841
        cmp     eax, [TASK_COUNT]
1839
        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
1840
        inc     eax
1850
	
1841
        cmp     [WIN_STACK + eax * 2], bx
1851
        cmp     [WIN_STACK + eax * 2], bx
1842
        jbe     .next_stack_window
1852
        jbe     .next_stack_window
1843
        dec     word[WIN_STACK + eax * 2]
1853
        dec     word[WIN_STACK + eax * 2]
Line 1868... Line 1878...
1868
        mov     word[MOUSE_SCROLL_V], 0
1878
        mov     word[MOUSE_SCROLL_V], 0
Line 1869... Line 1879...
1869
 
1879
 
1870
        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
1871
        ret
1928
	ret
1872
 
1929
;------------------------------------------------------------------------------	
1873
align 4
1930
align 4
1874
;------------------------------------------------------------------------------
1931
;------------------------------------------------------------------------------
1875
window._.check_window_draw: ;//////////////////////////////////////////////////
1932
window._.check_window_draw: ;//////////////////////////////////////////////////