2004-01-10 02:14:13 +00:00
|
|
|
/*
|
|
|
|
* ReactOS Task Manager
|
|
|
|
*
|
|
|
|
* taskmgr.h
|
|
|
|
*
|
|
|
|
* Copyright (C) 1999 - 2001 Brian Palmer <brianp@reactos.org>
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library; if not, write to the Free Software
|
2009-10-27 10:34:16 +00:00
|
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
2004-01-10 02:14:13 +00:00
|
|
|
*/
|
|
|
|
|
2010-02-26 11:43:19 +00:00
|
|
|
#pragma once
|
2004-01-10 02:14:13 +00:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef _MSC_VER
|
|
|
|
/*MF
|
|
|
|
typedef struct _IO_COUNTERS {
|
|
|
|
ULONGLONG ReadOperationCount;
|
|
|
|
ULONGLONG WriteOperationCount;
|
|
|
|
ULONGLONG OtherOperationCount;
|
|
|
|
ULONGLONG ReadTransferCount;
|
|
|
|
ULONGLONG WriteTransferCount;
|
|
|
|
ULONGLONG OtherTransferCount;
|
|
|
|
} IO_COUNTERS, *PIO_COUNTERS;
|
|
|
|
*/
|
|
|
|
#endif /* _MSC_VER */
|
|
|
|
|
|
|
|
#include "resource.h"
|
|
|
|
|
|
|
|
#define RUN_APPS_PAGE
|
|
|
|
#define RUN_PROC_PAGE
|
|
|
|
#define RUN_PERF_PAGE
|
|
|
|
|
|
|
|
#define STATUS_WINDOW 2001
|
2019-01-13 17:57:50 +00:00
|
|
|
#define STATUS_SIZE1 85
|
|
|
|
#define STATUS_SIZE2 190
|
2009-07-11 15:59:46 +00:00
|
|
|
#define STATUS_SIZE3 400
|
2004-01-10 02:14:13 +00:00
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
/* Window size & position settings */
|
|
|
|
BOOL Maximized;
|
|
|
|
int Left;
|
|
|
|
int Top;
|
|
|
|
int Right;
|
|
|
|
int Bottom;
|
|
|
|
|
|
|
|
/* Tab settings */
|
|
|
|
int ActiveTabPage;
|
|
|
|
|
|
|
|
/* Options menu settings */
|
|
|
|
BOOL AlwaysOnTop;
|
|
|
|
BOOL MinimizeOnUse;
|
|
|
|
BOOL HideWhenMinimized;
|
|
|
|
BOOL Show16BitTasks;
|
|
|
|
|
|
|
|
/* Update speed settings */
|
|
|
|
/* How many half-seconds in between updates (i.e. 0 - Paused, 1 - High, 2 - Normal, 4 - Low) */
|
2008-02-15 19:22:55 +00:00
|
|
|
DWORD UpdateSpeed;
|
2004-01-10 02:14:13 +00:00
|
|
|
|
|
|
|
/* Applications page settings */
|
2008-02-15 19:22:55 +00:00
|
|
|
DWORD ViewMode;
|
2004-01-10 02:14:13 +00:00
|
|
|
|
|
|
|
/* Processes page settings */
|
|
|
|
BOOL ShowProcessesFromAllUsers; /* Server-only? */
|
2007-08-03 07:35:39 +00:00
|
|
|
BOOL Columns[COLUMN_NMAX];
|
|
|
|
int ColumnOrderArray[COLUMN_NMAX];
|
|
|
|
int ColumnSizeArray[COLUMN_NMAX];
|
|
|
|
int SortColumn;
|
2004-01-10 02:14:13 +00:00
|
|
|
BOOL SortAscending;
|
|
|
|
|
|
|
|
/* Performance page settings */
|
|
|
|
BOOL CPUHistory_OneGraphPerCPU;
|
|
|
|
BOOL ShowKernelTimes;
|
|
|
|
|
|
|
|
} TASKMANAGER_SETTINGS, *LPTASKMANAGER_SETTINGS;
|
|
|
|
|
|
|
|
/* Global Variables: */
|
|
|
|
extern HINSTANCE hInst; /* current instance */
|
|
|
|
extern HWND hMainWnd; /* Main Window */
|
|
|
|
extern HWND hStatusWnd; /* Status Bar Window */
|
|
|
|
extern HWND hTabWnd; /* Tab Control Window */
|
|
|
|
extern int nMinimumWidth; /* Minimum width of the dialog (OnSize()'s cx) */
|
|
|
|
extern int nMinimumHeight; /* Minimum height of the dialog (OnSize()'s cy) */
|
|
|
|
extern int nOldWidth; /* Holds the previous client area width */
|
|
|
|
extern int nOldHeight; /* Holds the previous client area height */
|
|
|
|
extern TASKMANAGER_SETTINGS TaskManagerSettings;
|
|
|
|
|
2016-11-05 14:55:55 +00:00
|
|
|
/* Forward declarations of functions included in this code module: */
|
2004-10-11 21:08:06 +00:00
|
|
|
INT_PTR CALLBACK TaskManagerWndProc(HWND, UINT, WPARAM, LPARAM);
|
2004-01-10 02:14:13 +00:00
|
|
|
BOOL OnCreate(HWND hWnd);
|
2007-01-08 02:40:38 +00:00
|
|
|
void OnSize(WPARAM nType, int cx, int cy);
|
|
|
|
void OnMove(WPARAM nType, int cx, int cy);
|
2004-01-10 02:14:13 +00:00
|
|
|
void FillSolidRect(HDC hDC, LPCRECT lpRect, COLORREF clr);
|
|
|
|
void FillSolidRect2(HDC hDC, int x, int y, int cx, int cy, COLORREF clr);
|
|
|
|
void Draw3dRect(HDC hDC, int x, int y, int cx, int cy, COLORREF clrTopLeft, COLORREF clrBottomRight);
|
|
|
|
void Draw3dRect2(HDC hDC, LPRECT lpRect, COLORREF clrTopLeft, COLORREF clrBottomRight);
|
|
|
|
void LoadSettings(void);
|
|
|
|
void SaveSettings(void);
|
2004-07-30 13:39:56 +00:00
|
|
|
void TaskManager_OnRestoreMainWindow(void);
|
2004-01-10 02:14:13 +00:00
|
|
|
void TaskManager_OnEnterMenuLoop(HWND hWnd);
|
|
|
|
void TaskManager_OnExitMenuLoop(HWND hWnd);
|
|
|
|
void TaskManager_OnMenuSelect(HWND hWnd, UINT nItemID, UINT nFlags, HMENU hSysMenu);
|
2008-02-15 19:22:55 +00:00
|
|
|
void TaskManager_OnViewUpdateSpeed(DWORD);
|
2004-01-10 02:14:13 +00:00
|
|
|
void TaskManager_OnTabWndSelChange(void);
|
2014-08-27 12:46:22 +00:00
|
|
|
VOID ShowWin32Error(DWORD dwError);
|
2004-01-10 02:14:13 +00:00
|
|
|
LPTSTR GetLastErrorText( LPTSTR lpszBuf, DWORD dwSize );
|
2010-08-08 03:41:33 +00:00
|
|
|
DWORD EndLocalThread(HANDLE *hThread, DWORD dwThread);
|
2004-01-10 02:14:13 +00:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
2008-01-08 22:52:56 +00:00
|
|
|
}
|
2004-01-10 02:14:13 +00:00
|
|
|
#endif
|