www.pudn.com > WinGOS.rar > WinHAL.h
#ifndef _GOS_WINHAL_H_
#define _GOS_WINHAL_H_
enum _tagHAL
{
halCreate,
halMouseEvent,
halKeyEvent,
halSetWallpaper,
};
extern "C" LRESULT HalMain(UINT message, WPARAM wParam, LPARAM lParam);
#ifndef _STDAFX_H_
#ifdef _DEBUG
#define ASSERT(f) if(!(f)){_asm int 3}
extern void TRACE(LPCTSTR pszFormat,...);
#else
#define ASSERT(f)
#define TRACE(x)
#endif
#define IsInterruptable() 1
#define IsInterruptMode() 0
#define EnableInterrupt() g_pKernel->UnlockSwitch()
#define DisableInterrupt() g_pKernel->LockSwitch()
#define SwitchToThread() g_pHAL->SwitchThread()
extern "C" LONG __stdcall GetTickCount();
class CThread;
class CHAL : public CMsgObject
{
public:
virtual LRESULT MsgProc(UINT message, WPARAM wParam, LPARAM lParam);
public:
static void CreateThread(CThread* pThread,PVOID pParam);
static void ExitThread(CThread* pThread);
static void SwitchThread(CThread* pFromThread,CThread* pToThread);
static BOOL SwitchThread(void);
static void OnSwitchThread(BOOL bIdle);
public:
static DWORD SimSWI(PVOID pParam);
static DWORD RunGOS(PVOID pParam);
static DWORD CHAL::RunThread(PVOID pParam);
};
extern CHAL* g_pHAL;
class CDesktop;extern CDesktop* g_pDesktop;
#endif // _STDAFX_H_
#endif //_GOS_WINHAL_H_