6 * Copyright (C) 1999 - 2001 Brian Palmer <brianp@reactos.org>
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public
10 * License as published by the Free Software Foundation; either
11 * version 2.1 of the License, or (at your option) any later version.
13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Lesser General Public License for more details.
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with this library; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
32 typedef struct _IO_COUNTERS {
33 ULONGLONG ReadOperationCount;
34 ULONGLONG WriteOperationCount;
35 ULONGLONG OtherOperationCount;
36 ULONGLONG ReadTransferCount;
37 ULONGLONG WriteTransferCount;
38 ULONGLONG OtherTransferCount;
39 } IO_COUNTERS, *PIO_COUNTERS;
49 #define STATUS_WINDOW 2001
53 /* Window size & position settings */
63 /* Options menu settings */
66 BOOL HideWhenMinimized
;
69 /* Update speed settings */
70 /* How many half-seconds in between updates (i.e. 0 - Paused, 1 - High, 2 - Normal, 4 - Low) */
73 /* Applications page settings */
78 /* Processes page settings */
79 BOOL ShowProcessesFromAllUsers
; /* Server-only? */
80 BOOL Column_ImageName
;
84 BOOL Column_MemoryUsage
;
85 BOOL Column_MemoryUsageDelta
;
86 BOOL Column_PeakMemoryUsage
;
87 BOOL Column_PageFaults
;
88 BOOL Column_USERObjects
;
90 BOOL Column_IOReadBytes
;
91 BOOL Column_SessionID
; /* Server-only? */
92 BOOL Column_UserName
; /* Server-only? */
93 BOOL Column_PageFaultsDelta
;
94 BOOL Column_VirtualMemorySize
;
95 BOOL Column_PagedPool
;
96 BOOL Column_NonPagedPool
;
97 BOOL Column_BasePriority
;
98 BOOL Column_HandleCount
;
99 BOOL Column_ThreadCount
;
100 BOOL Column_GDIObjects
;
101 BOOL Column_IOWrites
;
102 BOOL Column_IOWriteBytes
;
104 BOOL Column_IOOtherBytes
;
105 int ColumnOrderArray
[25];
106 int ColumnSizeArray
[25];
110 /* Performance page settings */
111 BOOL CPUHistory_OneGraphPerCPU
;
112 BOOL ShowKernelTimes
;
114 } TASKMANAGER_SETTINGS
, *LPTASKMANAGER_SETTINGS
;
116 /* Global Variables: */
117 extern HINSTANCE hInst
; /* current instance */
118 extern HWND hMainWnd
; /* Main Window */
119 extern HWND hStatusWnd
; /* Status Bar Window */
120 extern HWND hTabWnd
; /* Tab Control Window */
121 extern int nMinimumWidth
; /* Minimum width of the dialog (OnSize()'s cx) */
122 extern int nMinimumHeight
; /* Minimum height of the dialog (OnSize()'s cy) */
123 extern int nOldWidth
; /* Holds the previous client area width */
124 extern int nOldHeight
; /* Holds the previous client area height */
125 extern TASKMANAGER_SETTINGS TaskManagerSettings
;
127 /* Foward declarations of functions included in this code module: */
128 INT_PTR CALLBACK
TaskManagerWndProc(HWND
, UINT
, WPARAM
, LPARAM
);
129 BOOL
OnCreate(HWND hWnd
);
130 void OnSize(UINT nType
, int cx
, int cy
);
131 void OnMove(UINT nType
, int cx
, int cy
);
132 void FillSolidRect(HDC hDC
, LPCRECT lpRect
, COLORREF clr
);
133 void FillSolidRect2(HDC hDC
, int x
, int y
, int cx
, int cy
, COLORREF clr
);
134 void Draw3dRect(HDC hDC
, int x
, int y
, int cx
, int cy
, COLORREF clrTopLeft
, COLORREF clrBottomRight
);
135 void Draw3dRect2(HDC hDC
, LPRECT lpRect
, COLORREF clrTopLeft
, COLORREF clrBottomRight
);
136 void LoadSettings(void);
137 void SaveSettings(void);
138 void TaskManager_OnRestoreMainWindow(void);
139 void TaskManager_OnEnterMenuLoop(HWND hWnd
);
140 void TaskManager_OnExitMenuLoop(HWND hWnd
);
141 void TaskManager_OnMenuSelect(HWND hWnd
, UINT nItemID
, UINT nFlags
, HMENU hSysMenu
);
142 void TaskManager_OnViewUpdateSpeedHigh(void);
143 void TaskManager_OnViewUpdateSpeedNormal(void);
144 void TaskManager_OnViewUpdateSpeedLow(void);
145 void TaskManager_OnViewUpdateSpeedPaused(void);
146 void TaskManager_OnViewRefresh(void);
147 void TaskManager_OnTabWndSelChange(void);
148 LPTSTR
GetLastErrorText( LPTSTR lpszBuf
, DWORD dwSize
);
154 #endif /* __TASKMGR_H__ */