ReactOS  0.4.12-dev-14-gd0c8636
graph.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define BRIGHT_GREEN   RGB(0, 255, 0)
 
#define MEDIUM_GREEN   RGB(0, 190, 0)
 
#define DARK_GREEN   RGB(0, 130, 0)
 
#define RED   RGB(255, 0, 0)
 

Functions

INT_PTR CALLBACK Graph_WndProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
 

Variables

WNDPROC OldGraphWndProc
 

Macro Definition Documentation

◆ BRIGHT_GREEN

#define BRIGHT_GREEN   RGB(0, 255, 0)

Definition at line 30 of file graph.h.

Referenced by Graph_DrawCpuUsageGraph(), and Graph_DrawMemUsageGraph().

◆ DARK_GREEN

#define DARK_GREEN   RGB(0, 130, 0)

Definition at line 32 of file graph.h.

Referenced by Graph_DrawCpuUsageGraph(), and Graph_DrawMemUsageGraph().

◆ MEDIUM_GREEN

#define MEDIUM_GREEN   RGB(0, 190, 0)

Definition at line 31 of file graph.h.

Referenced by Graph_DrawCpuUsageGraph().

◆ RED

#define RED   RGB(255, 0, 0)

Definition at line 33 of file graph.h.

Referenced by Graph_DrawCpuUsageGraph().

Function Documentation

◆ Graph_WndProc()

INT_PTR CALLBACK Graph_WndProc ( HWND  hWnd,
UINT  message,
WPARAM  wParam,
LPARAM  lParam 
)

Definition at line 34 of file graph.c.

Referenced by PerformancePageWndProc().

35 {
36  HDC hdc;
37  PAINTSTRUCT ps;
38  LONG WindowId;
39 
40  switch (message)
41  {
42  case WM_ERASEBKGND:
43  return TRUE;
44 
45  /*
46  * Filter out mouse & keyboard messages
47  */
48  /* case WM_APPCOMMAND: */
49  case WM_CAPTURECHANGED:
50  case WM_LBUTTONDBLCLK:
51  case WM_LBUTTONDOWN:
52  case WM_LBUTTONUP:
53  case WM_MBUTTONDBLCLK:
54  case WM_MBUTTONDOWN:
55  case WM_MBUTTONUP:
56  case WM_MOUSEACTIVATE:
57  case WM_MOUSEHOVER:
58  case WM_MOUSELEAVE:
59  case WM_MOUSEMOVE:
60  /* case WM_MOUSEWHEEL: */
61  case WM_NCHITTEST:
62  case WM_NCLBUTTONDBLCLK:
63  case WM_NCLBUTTONDOWN:
64  case WM_NCLBUTTONUP:
65  case WM_NCMBUTTONDBLCLK:
66  case WM_NCMBUTTONDOWN:
67  case WM_NCMBUTTONUP:
68  /* case WM_NCMOUSEHOVER: */
69  /* case WM_NCMOUSELEAVE: */
70  case WM_NCMOUSEMOVE:
71  case WM_NCRBUTTONDBLCLK:
72  case WM_NCRBUTTONDOWN:
73  case WM_NCRBUTTONUP:
74  /* case WM_NCXBUTTONDBLCLK: */
75  /* case WM_NCXBUTTONDOWN: */
76  /* case WM_NCXBUTTONUP: */
77  case WM_RBUTTONDBLCLK:
78  case WM_RBUTTONDOWN:
79  case WM_RBUTTONUP:
80  /* case WM_XBUTTONDBLCLK: */
81  /* case WM_XBUTTONDOWN: */
82  /* case WM_XBUTTONUP: */
83  case WM_ACTIVATE:
84  case WM_CHAR:
85  case WM_DEADCHAR:
86  case WM_GETHOTKEY:
87  case WM_HOTKEY:
88  case WM_KEYDOWN:
89  case WM_KEYUP:
90  case WM_KILLFOCUS:
91  case WM_SETFOCUS:
92  case WM_SETHOTKEY:
93  case WM_SYSCHAR:
94  case WM_SYSDEADCHAR:
95  case WM_SYSKEYDOWN:
96  case WM_SYSKEYUP:
97 
98  case WM_NCCALCSIZE:
99  return 0;
100 
101  case WM_PAINT:
102 
103  hdc = BeginPaint(hWnd, &ps);
104 
105  WindowId = GetWindowLongPtrW(hWnd, GWLP_ID);
106 
107  switch (WindowId)
108  {
109  case IDC_CPU_USAGE_GRAPH:
110  Graph_DrawCpuUsageGraph(hdc, hWnd);
111  break;
112  case IDC_MEM_USAGE_GRAPH:
113  Graph_DrawMemUsageGraph(hdc, hWnd);
114  break;
117  break;
118  }
119 
120  EndPaint(hWnd, &ps);
121 
122  return 0;
123 
124  }
125 
126  /*
127  * We pass on all non-handled messages
128  */
130 }
#define WM_MBUTTONUP
Definition: winuser.h:1759
#define WM_NCLBUTTONDOWN
Definition: winuser.h:1674
#define HDC
Definition: msvc.h:22
#define WM_SETHOTKEY
Definition: winuser.h:1634
Definition: tftpd.h:59
#define TRUE
Definition: types.h:120
#define WM_NCMBUTTONDBLCLK
Definition: winuser.h:1682
#define WM_CHAR
Definition: winuser.h:1693
#define WM_LBUTTONDOWN
Definition: winuser.h:1752
void Graph_DrawMemUsageGraph(HDC hDC, HWND hWnd)
Definition: graph.c:303
#define WM_GETHOTKEY
Definition: winuser.h:1635
#define WM_HOTKEY
Definition: winuser.h:1840
#define WM_NCCALCSIZE
Definition: winuser.h:1667
WNDPROC OldGraphWndProc
Definition: graph.c:27
#define WM_MOUSEHOVER
Definition: commctrl.h:4934
#define WM_CAPTURECHANGED
Definition: winuser.h:1784
#define WM_NCRBUTTONDOWN
Definition: winuser.h:1677
#define WM_NCHITTEST
Definition: winuser.h:1668
#define GetWindowLongPtrW
Definition: winuser.h:4698
BOOL WINAPI EndPaint(_In_ HWND, _In_ const PAINTSTRUCT *)
WPARAM wParam
Definition: combotst.c:138
void Graph_DrawMemUsageHistoryGraph(HDC hDC, HWND hWnd)
Definition: graph.c:410
#define WM_NCRBUTTONDBLCLK
Definition: winuser.h:1679
long LONG
Definition: pedump.c:60
#define WM_NCRBUTTONUP
Definition: winuser.h:1678
HDC WINAPI BeginPaint(_In_ HWND, _Out_ LPPAINTSTRUCT)
#define WM_MOUSELEAVE
Definition: commctrl.h:4935
#define WM_SYSCHAR
Definition: winuser.h:1697
HDC hdc
Definition: msvc.h:53
#define WM_KEYDOWN
Definition: winuser.h:1691
#define WM_MOUSEACTIVATE
Definition: winuser.h:1619
#define WM_RBUTTONDOWN
Definition: winuser.h:1755
#define WM_DEADCHAR
Definition: winuser.h:1694
#define WM_KILLFOCUS
Definition: winuser.h:1596
#define WM_KEYUP
Definition: winuser.h:1692
#define WM_RBUTTONUP
Definition: winuser.h:1756
#define WM_PAINT
Definition: winuser.h:1602
#define WM_NCMBUTTONUP
Definition: winuser.h:1681
#define WM_LBUTTONDBLCLK
Definition: winuser.h:1754
#define WM_MBUTTONDBLCLK
Definition: winuser.h:1760
#define WM_NCMBUTTONDOWN
Definition: winuser.h:1680
#define WM_ACTIVATE
Definition: winuser.h:1594
#define WM_SYSDEADCHAR
Definition: winuser.h:1698
#define WM_SYSKEYUP
Definition: winuser.h:1696
#define IDC_CPU_USAGE_GRAPH
Definition: resource.h:114
#define WM_LBUTTONUP
Definition: winuser.h:1753
#define WM_MBUTTONDOWN
Definition: winuser.h:1758
#define WM_MOUSEMOVE
Definition: winuser.h:1751
void Graph_DrawCpuUsageGraph(HDC hDC, HWND hWnd)
Definition: graph.c:132
#define IDC_MEM_USAGE_GRAPH
Definition: resource.h:118
#define WM_RBUTTONDBLCLK
Definition: winuser.h:1757
#define WM_SYSKEYDOWN
Definition: winuser.h:1695
LRESULT WINAPI CallWindowProcW(_In_ WNDPROC, _In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define WM_NCLBUTTONUP
Definition: winuser.h:1675
#define IDC_MEM_USAGE_HISTORY_GRAPH
Definition: resource.h:120
#define WM_ERASEBKGND
Definition: winuser.h:1607
#define WM_SETFOCUS
Definition: winuser.h:1595
LPARAM lParam
Definition: combotst.c:139
#define GWLP_ID
Definition: winuser.h:854
#define WM_NCMOUSEMOVE
Definition: winuser.h:1673
#define WM_NCLBUTTONDBLCLK
Definition: winuser.h:1676

Variable Documentation

◆ OldGraphWndProc

WNDPROC OldGraphWndProc

Definition at line 27 of file graph.c.

Referenced by Graph_WndProc(), and PerformancePageWndProc().