Subversion Repositories Kolibri OS

Rev

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

Rev 1995 Rev 2057
Line 63... Line 63...
63
	dec	eax			; button in buffer ?
63
	dec	eax			; button in buffer ?
64
	jz	button
64
	jz	button
65
	jmp	still
65
	jmp	still
66
;-----------------------------------------------------------------------------
66
;-----------------------------------------------------------------------------
67
red:					; redraw
67
red:					; redraw
68
	mcall	9, Proc_Info, -1	; window redraw requested so get new window coordinates and size
68
	call	get_window_param
69
	mov	eax, [Proc_Info.box.left]; store the window coordinates into the Form Structure
69
	mov	eax, [Proc_Info.box.left]; store the window coordinates into the Form Structure
70
	mov	[Form + 2], ax		; x start position
70
	mov	[Form + 2], ax		; x start position
71
	mov	eax, [Proc_Info.box.top];
71
	mov	eax, [Proc_Info.box.top];
72
	mov	[Form + 6], ax		; ystart position
72
	mov	[Form + 6], ax		; ystart position
73
	mov	eax, [Proc_Info.box.width]	;
73
	mov	eax, [Proc_Info.box.width]	;
Line 166... Line 166...
166
	mov	[store_text_area_end],edi
166
	mov	[store_text_area_end],edi
Line 167... Line 167...
167
	
167
	
168
	xor	edi,edi
168
	xor	edi,edi
169
	ret
169
	ret
-
 
170
;-----------------------------------------------------------------------------		
-
 
171
get_window_param:
-
 
172
	mcall	9, Proc_Info, -1	; window redraw requested so get 
-
 
173
					; new window coordinates and size
-
 
174
	ret
170
;-----------------------------------------------------------------------------	
175
;-----------------------------------------------------------------------------	
171
draw_window:
176
draw_window:
Line 172... Line 177...
172
	call	prepare_text_area
177
	call	prepare_text_area
173
	
178
	
174
	mov	byte [total], 0
179
	mov	byte [total], 0
175
	mcall	12, 1			; start of draw
180
	mcall	12, 1			; start of draw
-
 
181
	; DRAW WINDOW
-
 
182
	mcall	0,dword [Form],dword [Form + 4],0x13ffffff,0x805080d0,title
-
 
183
	
-
 
184
	call	get_window_param
-
 
185
	
-
 
186
	mov	eax,[Proc_Info+70] ;status of window
-
 
187
	test	eax,100b
176
	; DRAW WINDOW
188
	jne	.end
177
	mcall	0,dword [Form],dword [Form + 4],0x13ffffff,0x805080d0,title
189
	
178
	mcall	8,<450,100>,<25,25>,2,0xC0C0C0
190
	mcall	8,<450,100>,<25,25>,2,0xC0C0C0
179
	shr	ecx,16
191
	shr	ecx,16
180
	mov	bx,cx
192
	mov	bx,cx
Line 188... Line 200...
188
	shl	ebx, 16 		;
200
	shl	ebx, 16 		;
189
	mov	bx, word [Form] ; get width of window
201
	mov	bx, word [Form] ; get width of window
190
	sub	bx, 32			; bar is 32 pixels shorter then window width
202
	sub	bx, 32			; bar is 32 pixels shorter then window width
191
	mov	ecx, 119 * 65536 + 10	; set Ystart(109) and Height(10) of bar   109
203
	mov	ecx, 119 * 65536 + 10	; set Ystart(109) and Height(10) of bar   109
192
	mov	edx, 0xC0C0C0		; set color of bar
204
	mov	edx, 0xC0C0C0		; set color of bar
193
again:	;begin draw bar loop
205
.again:	;begin draw bar loop
194
	mcall				; draw bar to window area
206
	mcall				; draw bar to window area
195
	shr	ecx, 16 		; move the Ystart position to working area
207
	shr	ecx, 16 		; move the Ystart position to working area
196
	add	ecx, 34 		; add 34 pixels to Y Start (moves bar down)
208
	add	ecx, 34 		; add 34 pixels to Y Start (moves bar down)
197
	cmp	cx, word [Form + 4]	; is the Ystart position outside of window area
209
	cmp	cx, word [Form + 4]	; is the Ystart position outside of window area
198
	jae	nomo			; if so stop drawing bars
210
	jae	.nomo			; if so stop drawing bars
199
	sub	ecx, 14 		; if not, we only need 20 pixels between bar tops
211
	sub	ecx, 14 		; if not, we only need 20 pixels between bar tops
200
	shl	ecx, 16 		; set that values as Ystart
212
	shl	ecx, 16 		; set that values as Ystart
201
	add	ecx, 10 		; Bar Height is always 10 pixels
213
	add	ecx, 10 		; Bar Height is always 10 pixels
202
	jmp	again			; draw another bar
214
	jmp	.again			; draw another bar
203
;-----------------------------------------------------------------------------
215
;-----------------------------------------------------------------------------
204
nomo:					;done drawing bars here
216
.nomo:					;done drawing bars here
205
	; start PCI stuff
217
	; start PCI stuff
206
	call	Get_PCI_Info		; get pci version and last bus, scan for and draw each pci device
218
	call	Get_PCI_Info		; get pci version and last bus, scan for and draw each pci device
Line 207... Line 219...
207
 
219
 
208
	; Window inteface
220
	; Window inteface
Line 250... Line 262...
250
	and	ah, 0x7f
262
	and	ah, 0x7f
251
	inc	ah
263
	inc	ah
252
	jo	@f	
264
	jo	@f	
253
	call	Try_MMIO
265
	call	Try_MMIO
254
@@:
266
@@:
-
 
267
.end:
255
	mcall	12, 2			; end of draw
268
	mcall	12, 2			; end of draw
256
	ret
269
	ret
257
;-----------------------------------------------------------------------------
270
;-----------------------------------------------------------------------------
258
store_data:
271
store_data:
259
	mov	eax,[store_text_area_start]
272
	mov	eax,[store_text_area_start]