//------------------------------------------------------------------------------ /** ÇϳªÀÇ Å°·Î ¿©·¯°³ÀÇ ÀÛ¾÷À» ÇÒ¶§ »ç¿ë @author -±èÁö¿Ï @since -2005.11.03 @remarks -ƯÁ¤ Ű¿¡ ´ëÇØ¼­ ¿©·¯°¡Áö µ¿ÀÛÀ» ÇØ¾ß ÇÒ°æ¿ì eDoType¸¦ Ãß°¡ ÇÑ´Ù. */ #ifndef _KEY_QUEUE_MANAGER_H #define _KEY_QUEUE_MANAGER_H #pragma once #include "nArray.h" typedef void (*fn_CallBack)(DWORD,DWORD); struct keyMsg { fn_CallBack DoSomething; BYTE bPriority; //¿ì¼± ¼øÀ§ ÇöÀç ¾È¾²ÀÓ DWORD dwType; //¸Þ¼¼Áö ŸÀÔ DWORD wParam; DWORD lParam; }; class nBucket; class KeyQueueManager { public: KeyQueueManager(); ~KeyQueueManager(); void Init(); void Reset(); void Release(); void Update(); void KeyQueueAction(); BOOL PushBack(keyMsg & msg); BOOL PushFront(keyMsg & msg); BOOL DeleteMsg(DWORD dwType); void SetKey(BYTE key); void SetDefaultFun(fn_CallBack func); int Size(); BOOL PushKeyMsg( eDoType DoType, fn_CallBack DoSomething, DWORD wParam = 0, DWORD lParam = 0 ); protected: nArray m_MsgArray; fn_CallBack m_defulatFunction; BYTE m_key; }; inline int KeyQueueManager::Size() { return m_MsgArray.Size(); } //------------------------------------------------------------------------------ /** */ inline KeyQueueManager::KeyQueueManager() { m_defulatFunction=NULL; } //------------------------------------------------------------------------------ /** */ inline KeyQueueManager::~KeyQueueManager() { } //------------------------------------------------------------------------------ /** ÀÎDzÀ» Àâ¾Æ³¾ Ű */ inline void KeyQueueManager::SetKey(BYTE key) { m_key=key; } //------------------------------------------------------------------------------ /** Ű´Â ´­¸®°í ³ëµå°¡ ¾Æ¹«°Íµµ ¾øÀ»¶§ ÇÒ°Í */ inline void KeyQueueManager::SetDefaultFun(fn_CallBack func) { m_defulatFunction=func; } #endif