home *** CD-ROM | disk | FTP | other *** search
-
- #ifndef _NPWINDOW_H_
- #define _NPWINDOW_H_
-
- #include "..\inc\npapi.h"
- #include <afxcmn.h>
-
- #define ID_TREE 200
- #define NUM 5
-
- //#define ID_UPDATE_CHART 1000
-
- // vmstat structure
-
- typedef struct
- {
- // Threads
-
- int r;
- int b;
- int w;
-
- // Memory
-
- int avm;
- int fre;
-
- // Pages
-
- int re;
- int at;
- int pi;
- int po;
- int fr;
- int de;
- int sr;
- int d0;
- int s1;
- int s2;
- int s3;
-
- // Faults
-
- int interrupts;
- int syscalls;
- int contextswitch;
-
- // CPU
-
- int user;
- int system;
- int idle;
-
- } VMSTAT;
-
-
-
- class CPluginWindow;
- class CCpuMon;
-
- //
- // CPluginWindow:
- //
- class CPluginWindow : public CFrameWnd
- {
-
- #define NUM 5
-
- protected:
- CCpuMon* pCpuMon;
- HTREEITEM hTreeCtrl[NUM];
- HTREEITEM hTreeCurrent;
-
- private:
- VMSTAT vmstat;
- char FileLine[1024];
-
- public:
-
- // CButton* cbUpdate;
- CTreeCtrl m_Tree;
- void InitTree();
-
- CPluginWindow (CCpuMon *pCpuMon);
- ~CPluginWindow();
-
- void InitWindow (void);
- void CleanupWindow (void);
- // BOOL UpdateChart (FILE* fp);
- // void DrawRects (CDC* dc);
-
- //{{AFX_MSG( CMainWindow )
- afx_msg void OnPaint();
- //}}AFX_MSG
-
- DECLARE_MESSAGE_MAP()
- };
-
-
- #endif /* _NPWINDOW_H_ */
-
-