xref: /reactos/base/applications/taskmgr/column.h (revision 1734f297)
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_COMMANDLINE          25
51 #define COLUMN_NMAX                 26
52 
53 /*
54  * temporary fix:
55  * Some macro IDS_* have different name from IDC_*
56  * It would be better to unify thone name one day
57  */
58 #define IDS_TAB_CPUUSAGE            IDS_TAB_CPU
59 #define IDS_TAB_MEMORYUSAGE         IDS_TAB_MEMUSAGE
60 #define IDS_TAB_PEAKMEMORYUSAGE     IDS_TAB_PEAKMEMUSAGE
61 #define IDS_TAB_MEMORYUSAGEDELTA    IDS_TAB_MEMDELTA
62 #define IDS_TAB_PAGEFAULTS          IDS_TAB_PAGEFAULT
63 #define IDS_TAB_PAGEFAULTSDELTA     IDS_TAB_PFDELTA
64 #define IDS_TAB_VIRTUALMEMORYSIZE   IDS_TAB_VMSIZE
65 #define IDS_TAB_NONPAGEDPOOL        IDS_TAB_NPPOOL
66 #define IDS_TAB_BASEPRIORITY        IDS_TAB_BASEPRI
67 #define IDS_TAB_HANDLECOUNT         IDS_TAB_HANDLES
68 #define IDS_TAB_THREADCOUNT         IDS_TAB_THREADS
69 #define IDS_TAB_USEROBJECTS         IDS_TAB_USERPBJECTS
70 #define IDS_TAB_IOWRITEBYTES        IDS_TAB_IOWRITESBYTES
71 
72 typedef struct {
73     DWORD   dwIdsName;
74     DWORD   dwIdcCtrl;
75     int     size;
76     BOOL    bDefaults;
77 } PresetColumnEntry;
78 
79 
80 extern    UINT    ColumnDataHints[COLUMN_NMAX];
81 extern const PresetColumnEntry ColumnPresets[COLUMN_NMAX];
82 
83 #define Column_ImageName            Columns[COLUMN_IMAGENAME]
84 #define Column_PID                  Columns[COLUMN_PID]
85 #define Column_CPUUsage             Columns[COLUMN_CPUUSAGE]
86 #define Column_CPUTime              Columns[COLUMN_CPUTIME]
87 #define Column_MemoryUsage          Columns[COLUMN_MEMORYUSAGE]
88 #define Column_MemoryUsageDelta     Columns[COLUMN_MEMORYUSAGEDELTA]
89 #define Column_PeakMemoryUsage      Columns[COLUMN_PEAKMEMORYUSAGE]
90 #define Column_PageFaults           Columns[COLUMN_PAGEFAULTS]
91 #define Column_USERObjects          Columns[COLUMN_USEROBJECTS]
92 #define Column_IOReads              Columns[COLUMN_IOREADS]
93 #define Column_IOReadBytes          Columns[COLUMN_IOREADBYTES]
94 #define Column_SessionID            Columns[COLUMN_SESSIONID]
95 #define Column_UserName             Columns[COLUMN_USERNAME]
96 #define Column_PageFaultsDelta      Columns[COLUMN_PAGEFAULTSDELTA]
97 #define Column_VirtualMemorySize    Columns[COLUMN_VIRTUALMEMORYSIZE]
98 #define Column_PagedPool            Columns[COLUMN_PAGEDPOOL]
99 #define Column_NonPagedPool         Columns[COLUMN_NONPAGEDPOOL]
100 #define Column_BasePriority         Columns[COLUMN_BASEPRIORITY]
101 #define Column_HandleCount          Columns[COLUMN_HANDLECOUNT]
102 #define Column_ThreadCount          Columns[COLUMN_THREADCOUNT]
103 #define Column_GDIObjects           Columns[COLUMN_GDIOBJECTS]
104 #define Column_IOWrites             Columns[COLUMN_IOWRITES]
105 #define Column_IOWriteBytes         Columns[COLUMN_IOWRITEBYTES]
106 #define Column_IOOther              Columns[COLUMN_IOOTHER]
107 #define Column_IOOtherBytes         Columns[COLUMN_IOOTHERBYTES]
108 #define Column_CommandLine          Columns[COLUMN_COMMANDLINE]
109 
110 void ProcessPage_OnViewSelectColumns(void);
111 void AddColumns(void);
112 void SaveColumnSettings(void);
113 void UpdateColumnDataHints(void);
114