Subversion Repositories Kolibri OS

Rev

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

Rev 1324 Rev 1326
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: 1324 $
9
$Revision: 1326 $
10
 
10
 
11
 
11
 
Line 364... Line 364...
364
        ja .fail
364
        ja .fail
365
        jmp dword [f48call+ebx*4]
365
        jmp dword [f48call+ebx*4]
366
.00:
366
.00:
Line 367... Line 367...
367
 
367
 
368
; redraw display
368
; redraw display
369
     test ecx, ecx
-
 
370
     jnz  .01
369
     xor  eax,eax
371
     inc  ecx
370
     inc  ebx
372
     cmp  [windowtypechanged],dword ecx	;ebx=1
371
     cmp  [windowtypechanged],dword ebx	;ebx=1
373
     jne  .fail
372
     jne  .fail
374
     mov  [windowtypechanged],dword ebx ;eax=0
373
     mov  [windowtypechanged],dword eax ;eax=0
375
  .redraw_screen_direct:
374
  .redraw_screen_direct:
376
     xor  eax,eax
375
     xor  eax,eax
377
     mov  [dlx],dword eax
376
     mov  [dlx],dword eax
378
     mov  [dly],dword eax
377
     mov  [dly],dword eax
379
     mov  eax,[Screen_Max_X]
378
     mov  eax,[Screen_Max_X]
380
     mov  [dlxe],eax
379
     mov  [dlxe],eax
381
     mov  eax,[Screen_Max_Y]
380
     mov  eax,[Screen_Max_Y]
382
     mov  [dlye],eax
381
     mov  [dlye],eax
383
     mov  eax,window_data
-
 
384
;maybe use jmp?
-
 
385
;     call redrawscreen
382
     mov  eax,window_data
386
      jmp  redrawscreen
383
      jmp  redrawscreen
387
.fail:
384
.fail:
388
     ret
385
     ret
389
.01:
386
.01:
Line 398... Line 395...
398
 
395
 
399
.02:
396
.02:
400
; set common window colours
397
; set common window colours
401
     dec  ebx
398
     dec  ebx
402
     mov  [windowtypechanged],dword ebx	;eax=1
-
 
403
     mov  esi,[TASK_BASE]
-
 
404
     add  esi,TASKDATA.mem_start
-
 
405
     add  ecx,[esi]
399
     mov  [windowtypechanged],dword ebx	;eax=1
406
     mov  esi,ecx
400
     mov  esi,ecx
407
     and  edx,127
401
     and  edx,127
408
     mov  edi,common_colours
402
     mov  edi,common_colours
409
     mov  ecx,edx
403
     mov  ecx,edx
410
;     cld	not need because cld is set previous call
404
;     cld	not need because cld is set previous call
411
     rep  movsb
405
     rep  movsb
Line 412... Line 406...
412
     ret
406
     ret
413
 
407
 
414
.03:
-
 
415
; get common window colours
-
 
416
     mov  esi,[TASK_BASE]
-
 
417
     add  esi,TASKDATA.mem_start
408
.03:
418
     add  ecx,[esi]
409
; get common window colours
419
     mov  edi,ecx
410
     mov  edi,ecx
420
     and  edx,127
411
     and  edx,127
421
     mov  esi,common_colours
412
     mov  esi,common_colours
Line 440... Line 431...
440
	mov	[esp+20],eax
431
	mov	[esp+20],eax
441
	ret
432
	ret
Line 442... Line 433...
442
 
433
 
443
.06:
434
.06:
444
; set screen workarea
435
; set screen workarea
445
;	pushad
436
	mov	edi,dword[Screen_Max_X]
446
	movsx	eax,word[esp+16+2+12]	;ecx in the stack
437
	movsx	eax,word[esp+28+2]	;ecx in the stack
447
	movsx	ebx,word[esp+16+12]
438
	movsx	ebx,word[esp+28]
448
	cmp	eax,ebx
439
	cmp	eax,ebx
449
	jge	.lp1
440
	jge	.lp1
450
        or      eax,eax;[Screen_Max_X]
441
        or      eax,eax;[Screen_Max_X]
451
	jl	@f
442
	jl	@f
452
	mov	[screen_workarea.left],eax
443
	mov	[screen_workarea.left],eax
453
    @@: cmp     ebx,[Screen_Max_X]
444
    @@: cmp     ebx,edi	;[Screen_Max_X]
454
	jg	.lp1
445
	jg	.lp1
455
	mov	[screen_workarea.right],ebx
446
	mov	[screen_workarea.right],ebx
456
  .lp1: movsx	eax,word[esp+24+2]  ;edx in the stack
447
  .lp1: movsx	eax,word[esp+24+2]	;edx in the stack
457
	movsx	ebx,word[esp+24]
448
	movsx	ebx,word[esp+24]
458
	cmp	eax,ebx
449
	cmp	eax,ebx
459
	jge	.lp2
450
	jge	.lp2
460
	or	eax,eax;[0xFE04]
451
	or	eax,eax;[0xFE04]
461
	jl	@f
452
	jl	@f
462
	mov	[screen_workarea.top],eax
453
	mov	[screen_workarea.top],eax
463
    @@: cmp     ebx,[Screen_Max_Y]
454
    @@: cmp     ebx,edi	;[Screen_Max_Y]
464
	jg	.lp2
455
	jg	.lp2
465
	mov	[screen_workarea.bottom],ebx
456
	mov	[screen_workarea.bottom],ebx
466
  .lp2: call	repos_windows
457
  .lp2: call	repos_windows
467
	xor	eax, eax
458
	xor	eax, eax
468
	xor	ebx, ebx
459
	xor	ebx, ebx
469
        mov     ecx, [Screen_Max_X]
460
        mov     ecx, [Screen_Max_X]
470
        mov     edx, [Screen_Max_Y]
-
 
471
;    call    calculatescreen
461
        mov     edx, [Screen_Max_Y]
472
        jmp 	calculatescreen
-
 
473
;    jmp    redraw_screen_direct
-
 
474
;    .exit:
-
 
475
;	popad
-
 
Line 476... Line 462...
476
;	ret
462
        jmp 	calculatescreen
477
 
463
 
478
.07:
464
.07:
479
; get skin margins
465
; get skin margins