9aeb3ec4cfda7a85ddbb261f11d346000de25b39
[reactos.git] / reactos / base / applications / taskmgr / column.h
1 /*
2 * ReactOS Task Manager
3 *
4 * column.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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21 */
22
23 #pragma once
24
25 #define COLUMN_IMAGENAME 0
26 #define COLUMN_PID 1
27 #define COLUMN_USERNAME 2
28 #define COLUMN_SESSIONID 3
29 #define COLUMN_CPUUSAGE 4
30 #define COLUMN_CPUTIME 5
31 #define COLUMN_MEMORYUSAGE 6
32 #define COLUMN_PEAKMEMORYUSAGE 7
33 #define COLUMN_MEMORYUSAGEDELTA 8
34 #define COLUMN_PAGEFAULTS 9
35 #define COLUMN_PAGEFAULTSDELTA 10
36 #define COLUMN_VIRTUALMEMORYSIZE 11
37 #define COLUMN_PAGEDPOOL 12
38 #define COLUMN_NONPAGEDPOOL 13
39 #define COLUMN_BASEPRIORITY 14
40 #define COLUMN_HANDLECOUNT 15
41 #define COLUMN_THREADCOUNT 16
42 #define COLUMN_USEROBJECTS 17
43 #define COLUMN_GDIOBJECTS 18
44 #define COLUMN_IOREADS 19
45 #define COLUMN_IOWRITES 20
46 #define COLUMN_IOOTHER 21
47 #define COLUMN_IOREADBYTES 22
48 #define COLUMN_IOWRITEBYTES 23
49 #define COLUMN_IOOTHERBYTES 24
50 #define COLUMN_NMAX 25
51
52 /*
53 * temporary fix:
54 * Some macro IDS_* have different name from IDC_*
55 * It would be better to unify thone name one day
56 */
57 #define IDS_TAB_CPUUSAGE IDS_TAB_CPU
58 #define IDS_TAB_MEMORYUSAGE IDS_TAB_MEMUSAGE
59 #define IDS_TAB_PEAKMEMORYUSAGE IDS_TAB_PEAKMEMUSAGE
60 #define IDS_TAB_MEMORYUSAGEDELTA IDS_TAB_MEMDELTA
61 #define IDS_TAB_PAGEFAULTS IDS_TAB_PAGEFAULT
62 #define IDS_TAB_PAGEFAULTSDELTA IDS_TAB_PFDELTA
63 #define IDS_TAB_VIRTUALMEMORYSIZE IDS_TAB_VMSIZE
64 #define IDS_TAB_NONPAGEDPOOL IDS_TAB_NPPOOL
65 #define IDS_TAB_BASEPRIORITY IDS_TAB_BASEPRI
66 #define IDS_TAB_HANDLECOUNT IDS_TAB_HANDLES
67 #define IDS_TAB_THREADCOUNT IDS_TAB_THREADS
68 #define IDS_TAB_USEROBJECTS IDS_TAB_USERPBJECTS
69 #define IDS_TAB_IOWRITEBYTES IDS_TAB_IOWRITESBYTES
70
71 typedef struct {
72 DWORD dwIdsName;
73 DWORD dwIdcCtrl;
74 int size;
75 BOOL bDefaults;
76 } PresetColumnEntry;
77
78
79 extern UINT ColumnDataHints[COLUMN_NMAX];
80 extern const PresetColumnEntry ColumnPresets[COLUMN_NMAX];
81
82 #define Column_ImageName Columns[COLUMN_IMAGENAME]
83 #define Column_PID Columns[COLUMN_PID]
84 #define Column_CPUUsage Columns[COLUMN_CPUUSAGE]
85 #define Column_CPUTime Columns[COLUMN_CPUTIME]
86 #define Column_MemoryUsage Columns[COLUMN_MEMORYUSAGE]
87 #define Column_MemoryUsageDelta Columns[COLUMN_MEMORYUSAGEDELTA]
88 #define Column_PeakMemoryUsage Columns[COLUMN_PEAKMEMORYUSAGE]
89 #define Column_PageFaults Columns[COLUMN_PAGEFAULTS]
90 #define Column_USERObjects Columns[COLUMN_USEROBJECTS]
91 #define Column_IOReads Columns[COLUMN_IOREADS]
92 #define Column_IOReadBytes Columns[COLUMN_IOREADBYTES]
93 #define Column_SessionID Columns[COLUMN_SESSIONID]
94 #define Column_UserName Columns[COLUMN_USERNAME]
95 #define Column_PageFaultsDelta Columns[COLUMN_PAGEFAULTSDELTA]
96 #define Column_VirtualMemorySize Columns[COLUMN_VIRTUALMEMORYSIZE]
97 #define Column_PagedPool Columns[COLUMN_PAGEDPOOL]
98 #define Column_NonPagedPool Columns[COLUMN_NONPAGEDPOOL]
99 #define Column_BasePriority Columns[COLUMN_BASEPRIORITY]
100 #define Column_HandleCount Columns[COLUMN_HANDLECOUNT]
101 #define Column_ThreadCount Columns[COLUMN_THREADCOUNT]
102 #define Column_GDIObjects Columns[COLUMN_GDIOBJECTS]
103 #define Column_IOWrites Columns[COLUMN_IOWRITES]
104 #define Column_IOWriteBytes Columns[COLUMN_IOWRITEBYTES]
105 #define Column_IOOther Columns[COLUMN_IOOTHER]
106 #define Column_IOOtherBytes Columns[COLUMN_IOOTHERBYTES]
107
108 void ProcessPage_OnViewSelectColumns(void);
109 void AddColumns(void);
110 void SaveColumnSettings(void);
111 void UpdateColumnDataHints(void);