Visual C++ backend for rbuild (for now just a hacked mingw backend) and related compi...
[reactos.git] / base / applications / taskmgr / taskmgr.h
1 /*
2 * ReactOS Task Manager
3 *
4 * taskmgr.h
5 *
6 * Copyright (C) 1999 - 2001 Brian Palmer <brianp@reactos.org>
7 *
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.
12 *
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.
17 *
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
21 */
22
23 #ifndef __TASKMGR_H__
24 #define __TASKMGR_H__
25
26 #ifdef __cplusplus
27 extern "C" {
28 #endif
29
30 #ifdef _MSC_VER
31 /*MF
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;
40 */
41 #endif /* _MSC_VER */
42
43 #include "resource.h"
44
45 #define RUN_APPS_PAGE
46 #define RUN_PROC_PAGE
47 #define RUN_PERF_PAGE
48
49 #define STATUS_WINDOW 2001
50
51 typedef struct
52 {
53 /* Window size & position settings */
54 BOOL Maximized;
55 int Left;
56 int Top;
57 int Right;
58 int Bottom;
59
60 /* Tab settings */
61 int ActiveTabPage;
62
63 /* Options menu settings */
64 BOOL AlwaysOnTop;
65 BOOL MinimizeOnUse;
66 BOOL HideWhenMinimized;
67 BOOL Show16BitTasks;
68
69 /* Update speed settings */
70 /* How many half-seconds in between updates (i.e. 0 - Paused, 1 - High, 2 - Normal, 4 - Low) */
71 DWORD UpdateSpeed;
72
73 /* Applications page settings */
74 DWORD ViewMode;
75
76 /* Processes page settings */
77 BOOL ShowProcessesFromAllUsers; /* Server-only? */
78 BOOL Columns[COLUMN_NMAX];
79 int ColumnOrderArray[COLUMN_NMAX];
80 int ColumnSizeArray[COLUMN_NMAX];
81 int SortColumn;
82 BOOL SortAscending;
83
84 /* Performance page settings */
85 BOOL CPUHistory_OneGraphPerCPU;
86 BOOL ShowKernelTimes;
87
88 } TASKMANAGER_SETTINGS, *LPTASKMANAGER_SETTINGS;
89
90 /* Global Variables: */
91 extern HINSTANCE hInst; /* current instance */
92 extern HWND hMainWnd; /* Main Window */
93 extern HWND hStatusWnd; /* Status Bar Window */
94 extern HWND hTabWnd; /* Tab Control Window */
95 extern int nMinimumWidth; /* Minimum width of the dialog (OnSize()'s cx) */
96 extern int nMinimumHeight; /* Minimum height of the dialog (OnSize()'s cy) */
97 extern int nOldWidth; /* Holds the previous client area width */
98 extern int nOldHeight; /* Holds the previous client area height */
99 extern TASKMANAGER_SETTINGS TaskManagerSettings;
100
101 /* Foward declarations of functions included in this code module: */
102 INT_PTR CALLBACK TaskManagerWndProc(HWND, UINT, WPARAM, LPARAM);
103 BOOL OnCreate(HWND hWnd);
104 void OnSize(WPARAM nType, int cx, int cy);
105 void OnMove(WPARAM nType, int cx, int cy);
106 void FillSolidRect(HDC hDC, LPCRECT lpRect, COLORREF clr);
107 void FillSolidRect2(HDC hDC, int x, int y, int cx, int cy, COLORREF clr);
108 void Draw3dRect(HDC hDC, int x, int y, int cx, int cy, COLORREF clrTopLeft, COLORREF clrBottomRight);
109 void Draw3dRect2(HDC hDC, LPRECT lpRect, COLORREF clrTopLeft, COLORREF clrBottomRight);
110 void LoadSettings(void);
111 void SaveSettings(void);
112 void TaskManager_OnRestoreMainWindow(void);
113 void TaskManager_OnEnterMenuLoop(HWND hWnd);
114 void TaskManager_OnExitMenuLoop(HWND hWnd);
115 void TaskManager_OnMenuSelect(HWND hWnd, UINT nItemID, UINT nFlags, HMENU hSysMenu);
116 void TaskManager_OnViewUpdateSpeed(DWORD);
117 void TaskManager_OnViewRefresh(void);
118 void TaskManager_OnTabWndSelChange(void);
119 LPTSTR GetLastErrorText( LPTSTR lpszBuf, DWORD dwSize );
120
121 #ifdef __cplusplus
122 }
123 #endif
124
125 #endif /* __TASKMGR_H__ */