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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
31 typedef struct _IO_COUNTERS {
32 ULONGLONG ReadOperationCount;
33 ULONGLONG WriteOperationCount;
34 ULONGLONG OtherOperationCount;
35 ULONGLONG ReadTransferCount;
36 ULONGLONG WriteTransferCount;
37 ULONGLONG OtherTransferCount;
38 } IO_COUNTERS, *PIO_COUNTERS;
48 #define STATUS_WINDOW 2001
49 #define STATUS_SIZE1 80
50 #define STATUS_SIZE2 210
51 #define STATUS_SIZE3 400
55 /* Window size & position settings */
65 /* Options menu settings */
68 BOOL HideWhenMinimized
;
71 /* Update speed settings */
72 /* How many half-seconds in between updates (i.e. 0 - Paused, 1 - High, 2 - Normal, 4 - Low) */
75 /* Applications page settings */
78 /* Processes page settings */
79 BOOL ShowProcessesFromAllUsers
; /* Server-only? */
80 BOOL Columns
[COLUMN_NMAX
];
81 int ColumnOrderArray
[COLUMN_NMAX
];
82 int ColumnSizeArray
[COLUMN_NMAX
];
86 /* Performance page settings */
87 BOOL CPUHistory_OneGraphPerCPU
;
90 } TASKMANAGER_SETTINGS
, *LPTASKMANAGER_SETTINGS
;
92 /* Global Variables: */
93 extern HINSTANCE hInst
; /* current instance */
94 extern HWND hMainWnd
; /* Main Window */
95 extern HWND hStatusWnd
; /* Status Bar Window */
96 extern HWND hTabWnd
; /* Tab Control Window */
97 extern int nMinimumWidth
; /* Minimum width of the dialog (OnSize()'s cx) */
98 extern int nMinimumHeight
; /* Minimum height of the dialog (OnSize()'s cy) */
99 extern int nOldWidth
; /* Holds the previous client area width */
100 extern int nOldHeight
; /* Holds the previous client area height */
101 extern TASKMANAGER_SETTINGS TaskManagerSettings
;
103 /* Foward declarations of functions included in this code module: */
104 INT_PTR CALLBACK
TaskManagerWndProc(HWND
, UINT
, WPARAM
, LPARAM
);
105 BOOL
OnCreate(HWND hWnd
);
106 void OnSize(WPARAM nType
, int cx
, int cy
);
107 void OnMove(WPARAM nType
, int cx
, int cy
);
108 void FillSolidRect(HDC hDC
, LPCRECT lpRect
, COLORREF clr
);
109 void FillSolidRect2(HDC hDC
, int x
, int y
, int cx
, int cy
, COLORREF clr
);
110 void Draw3dRect(HDC hDC
, int x
, int y
, int cx
, int cy
, COLORREF clrTopLeft
, COLORREF clrBottomRight
);
111 void Draw3dRect2(HDC hDC
, LPRECT lpRect
, COLORREF clrTopLeft
, COLORREF clrBottomRight
);
112 void LoadSettings(void);
113 void SaveSettings(void);
114 void TaskManager_OnRestoreMainWindow(void);
115 void TaskManager_OnEnterMenuLoop(HWND hWnd
);
116 void TaskManager_OnExitMenuLoop(HWND hWnd
);
117 void TaskManager_OnMenuSelect(HWND hWnd
, UINT nItemID
, UINT nFlags
, HMENU hSysMenu
);
118 void TaskManager_OnViewUpdateSpeed(DWORD
);
119 void TaskManager_OnTabWndSelChange(void);
120 LPTSTR
GetLastErrorText( LPTSTR lpszBuf
, DWORD dwSize
);
121 DWORD
EndLocalThread(HANDLE
*hThread
, DWORD dwThread
);