2 Copyright 2010-2017, The AROS Development Team. All rights reserved.
6 #ifndef _SYSMON_INTERN_H
7 #define _SYSMON_INTERN_H
9 #include <proto/exec.h>
10 #include <proto/intuition.h>
11 #include <libraries/mui.h>
15 /* uncomment to change the default processorgrp options */
16 //#define PROCDISPLAY_USEGAUGE
17 //#define PROCDISPLAY_SINGLEGRAPH
25 #define SYSMON_TABCOUNT 3
34 CONST_STRPTR tabs
[SYSMON_TABCOUNT
+ 1];
36 struct Hook pageactivehook
;
37 struct Hook tasklistrefreshhook
;
38 STRPTR tasklistinfobuf
;
43 struct MUI_CustomClass
*cpuusageclass
;
44 Object
*cpuusagegroup
,
46 BOOL cpuusagesinglemode
;
47 struct Hook cpuusagecmhooks
[3];
49 Object
**cpufreqlabels
;
50 Object
**cpufreqvalues
;
52 Object
*memorysize
[5];
53 Object
*memoryfree
[5];
56 STRPTR msg_refresh_speed
;
60 STRPTR msg_taskreadywait
;
65 BOOL (*Init
)(struct SysMonData
*);
66 VOID (*DeInit
)(struct SysMonData
*);
69 extern struct SysMonModule memorymodule
;
70 extern struct SysMonModule videomodule
;
71 extern struct SysMonModule processormodule
;
72 extern struct SysMonModule timermodule
;
73 extern struct SysMonModule tasksmodule
;
75 VOID
UpdateMemoryInformation(struct SysMonData
*);
76 VOID
UpdateMemoryStaticInformation(struct SysMonData
*);
78 VOID
UpdateVideoInformation(struct SysMonData
*);
79 VOID
UpdateVideoStaticInformation(struct SysMonData
*);
81 ULONG
GetProcessorCount();
82 VOID
UpdateProcessorInformation(struct SysMonData
*);
83 VOID
UpdateProcessorStaticInformation(struct SysMonData
*);
84 Object
*ProcessorGroupObject(struct SysMonData
*, IPTR
);
86 VOID
UpdateTasksInformation(struct SysMonData
*);
87 VOID
UpdateTasksStaticInformation(struct SysMonData
*);
91 AROS_UFP3(struct TaskInfo
*, TasksListConstructFunction
,
92 AROS_UFPA(struct Hook
*, h
, A0
),
93 AROS_UFPA(APTR
, pool
, A2
),
94 AROS_UFPA(struct Task
*, curTask
, A1
));
96 AROS_UFP3(VOID
, TasksListDestructFunction
,
97 AROS_UFPA(struct Hook
*, h
, A0
),
98 AROS_UFPA(APTR
, pool
, A2
),
99 AROS_UFPA(struct TaskInfo
*, obj
, A1
));
101 AROS_UFP3(APTR
, TasksListDisplayFunction
,
102 AROS_UFPA(struct Hook
*, h
, A0
),
103 AROS_UFPA(STRPTR
*, strings
, A2
),
104 AROS_UFPA(struct TaskInfo
*, obj
, A1
));
106 AROS_UFP3(VOID
, TaskSelectedFunction
,
107 AROS_UFPA(struct Hook
*, h
, A0
),
108 AROS_UFPA(Object
*, object
, A2
),
109 AROS_UFPA(APTR
, msg
, A1
));
111 AROS_UFP3(LONG
, TaskCompareFunction
,
112 AROS_UFPA(struct Hook
*, h
, A0
),
113 AROS_UFPA(struct TaskInfo
*, ti2
, A2
),
114 AROS_UFPA(struct TaskInfo
*, ti1
, A1
));
116 AROS_UFP3(VOID
, processorgaugehookfunc
,
117 AROS_UFPA(struct Hook
*, h
, A0
),
118 AROS_UFPA(Object
*, object
, A2
),
119 AROS_UFPA(APTR
, msg
, A1
));
121 AROS_UFP3(VOID
, processorgraphhookfunc
,
122 AROS_UFPA(struct Hook
*, h
, A0
),
123 AROS_UFPA(Object
*, object
, A2
),
124 AROS_UFPA(APTR
, msg
, A1
));
126 AROS_UFP3(VOID
, processorgraphpercpuhookfunc
,
127 AROS_UFPA(struct Hook
*, h
, A0
),
128 AROS_UFPA(Object
*, object
, A2
),
129 AROS_UFPA(APTR
, msg
, A1
));
131 ULONG
GetSIG_TIMER();
132 VOID
SignalMeAfter(ULONG msecs
);