Subversion Repositories Kolibri OS

Rev

Rev 1385 | Rev 2559 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1385 Rev 2128
Line 10... Line 10...
10
  use32
10
  use32
11
  org	 0x0
11
  org	 0x0
12
	STACK_SIZE=1024
12
	STACK_SIZE=1024
13
	offset_y=22		; Correction for skin
13
	offset_y=22		; Correction for skin
14
	offset_x=5
14
	offset_x=5
15
  db	 'MENUET01'		 ; 8 byte id
15
  db	 'MENUET01'			; 8 byte id
16
  dd	 0x01			 ; header version
16
  dd	 0x01				; header version
17
  dd	 START			 ; start of code
17
  dd	 START				; start of code
18
  dd	 I_END			 ; size of image
18
  dd	 I_END				; size of image
19
  dd	 U_END+STACK_SIZE	 ; memory for app
19
  dd	 U_END+STACK_SIZE	; memory for app
20
  dd	 U_END+STACK_SIZE	 ; esp
20
  dd	 U_END+STACK_SIZE	; esp
21
  dd	 0x0 , 0x0		 ; I_Param , I_Icon
21
  dd	 0x0 , 0x0			; I_Param , I_Icon
Line 22... Line 22...
22
 
22
 
23
include 'lang.inc'
23
include 'lang.inc'
24
include '../../../macros.inc'
24
include '../../../macros.inc'
25
include '../../../develop/libraries/box_lib/trunk/box_lib.mac'
25
include '../../../develop/libraries/box_lib/trunk/box_lib.mac'
Line 38... Line 38...
38
    call calculate_window_pos
38
    call calculate_window_pos
Line 39... Line 39...
39
    
39
    
40
;main loop when process name isn't edited.    
40
;main loop when process name isn't edited.    
41
red:	
41
red:	
42
	mcall	48,3,sc,40
42
	mcall	48,3,sc,40
43
	edit_boxes_set_sys_color edit1,edit1_end,sc	;set color
43
	edit_boxes_set_sys_color edit1,edit1_end,sc		;set color
44
	check_boxes_set_sys_color check1,check1_end,sc	;set color
44
	check_boxes_set_sys_color check1,check1_end,sc	;set color
45
	xor	ebp,ebp
45
	xor	ebp,ebp
46
	inc	ebp
46
	inc	ebp
47
;    mov  ebp,1
47
;    mov  ebp,1
48
    call draw_window		; redraw all window
48
    call draw_window		; redraw all window
49
still:
49
still:
50
    mov  eax,23 		; wait here for event
-
 
51
    mov  ebx,100		; 1 sec.
-
 
Line 52... Line 50...
52
    mcall
50
    mcall 23,100		; wait here for event 1 sec.
53
 
51
 
54
    dec  eax		      ; redraw request ?
52
    dec  eax		      ; redraw request ?
55
    jz	 red
53
    jz	 red
Line 75... Line 73...
75
    call draw_window
73
    call draw_window
76
    jmp  still
74
    jmp  still
Line 77... Line 75...
77
 
75
 
78
 
-
 
79
  key:				; key
76
 
Line 80... Line 77...
80
    mov  eax,2			
77
  key:				; key
81
    mcall
78
    mcall 2
82
 
79
 
83
    cmp  ah,184 		; PageUp
80
    cmp  ah,184 		; PageUp
Line 191... Line 188...
191
    mcall
188
    mcall
Line 192... Line 189...
192
 
189
 
193
.nodelete:
190
.nodelete:
194
;create terminate process button
191
;create terminate process button
195
    mov   eax,8
192
    mov   eax,8
196
    mov   ebx,(15-offset_x)*65536+100-offset_y
193
    mov   ebx,(15-offset_x)*65536+121-offset_y
-
 
194
    mov   ecx,[curposy]
197
    mov   ecx,[curposy]
195
	;sub   ecx,1
198
    shl   ecx,16
196
    shl   ecx,16
199
    mov   cx,10
197
    mov   cx,10
200
    mov   edx,[index]
198
    mov   edx,[index]
201
    add   edx,11
199
    add   edx,11
Line 539... Line 537...
539
;ebp=0 - redraw only process information
537
;ebp=0 - redraw only process information
Line 540... Line 538...
540
 
538
 
541
    test ebp,ebp
539
    test ebp,ebp
Line 542... Line -...
542
    jz	 .show_process_info
-
 
543
    
-
 
544
    mov  eax,12 		   ; function 12:tell os about windowdraw
-
 
545
;    mov  ebx,1                     ; 1, start of draw
-
 
546
    xor  ebx,ebx
540
    jz	 .show_process_info
547
    inc  ebx
541
    
548
    mcall		       
542
    mcall 12, 1		       
549
 
543
 
550
				   ; DRAW WINDOW
544
	; DRAW WINDOW
551
    xor  eax,eax		   ; function 0 : define and draw window
545
    xor  eax,eax				; function 0 : define and draw window
552
    mov  ebx,[winxpos]		   ; [x start] *65536 + [x size]
546
    mov  ebx,[winxpos]			; [x start] *65536 + [x size]
553
    mov  ecx,[winypos]		   ; [y start] *65536 + [y size]
547
    mov  ecx,[winypos]			; [y start] *65536 + [y size]
554
    mov  edx,0x34ddffdd  ;ffffff   ; color of work area RRGGBB,8->color
548
    mov  edx,0x34ddffdd			; color of work area RRGGBB,8->color
Line 555... Line 549...
555
    mov  edi,title		  ; WINDOW CAPTION;
549
    mov  edi,title				; WINDOW CAPTION;
556
    mcall
550
    mcall
557
 
551
 
558
				   
552
				   
559
    add  eax,4			   ; function 4 : write text to window
553
    add  eax,4					; function 4 : write text to window
560
    mov  ebx,(22-offset_x)*65536+35-offset_y	       ; draw info text with function 4
554
    mov  ebx,(22-offset_x)*65536+35-offset_y
Line 641... Line 635...
641
    mcall
635
    mcall
Line 642... Line 636...
642
 
636
 
643
;print application name in text box
637
;print application name in text box
Line 644... Line -...
644
;    call print_text
-
 
645
 
-
 
646
    mov  eax,12 		   ; function 12:tell os about windowdraw
638
;    call print_text
Line 647... Line 639...
647
    mov  ebx,2			   ; 2, end of draw
639
 
648
    mcall
640
    mcall 12, 2
Line 706... Line 698...
706
	    db '/sys/end',0
698
	    db '/sys/end',0
Line 707... Line 699...
707
 
699
 
708
if lang eq de
700
if lang eq de
709
text:
701
text:
710
  db 'NAME/BEENDEN        PID     CPU-LAST   % '
702
  db 'NAME/BEENDEN        PID     CPU-LAST   % '
711
  db 'SPEICHER START/NUTZUNG  W-STACK  W-SIZE'
703
  db 'SPEICHER START/NUTZUNG  W-STACK   W-SIZE'
Line 712... Line 704...
712
text_len = $-text
704
text_len = $-text
713
 
705
 
714
tbts:	db  'SEITE ZURUECK       SEITE VOR                      REBOOT SYSTEM'
706
tbts:	db  'SEITE ZURUECK       SEITE VOR                      REBOOT SYSTEM'
Line 736... Line 728...
736
title  db   'Protsessid - Ctrl/Alt/Del'
728
title  db   'Protsessid - Ctrl/Alt/Del'
Line 737... Line 729...
737
 
729
 
738
else
730
else
739
text:
731
text:
740
  db 'NAME/TERMINATE      PID     CPU-USAGE  %   '
732
  db 'NAME/TERMINATE      PID     CPU-USAGE  %   '
741
  db 'MEMORY START/USAGE  W-STACK   W-SIZE'
733
  db 'MEMORY START/USAGE  W-STACK    W-SIZE'
Line 742... Line 734...
742
text_len = $-text
734
text_len = $-text
743
 
735
 
744
tbts:	db  'PREV PAGE       NEXT PAGE                         REBOOT SYSTEM'
736
tbts:	db  'PREV PAGE       NEXT PAGE                         REBOOT SYSTEM'