WindowStack.h
上传用户:duwei1288
上传日期:2009-12-27
资源大小:451k
文件大小:1k
源码类别:

BREW编程

开发平台:

Visual C++

  1. #ifndef _WINDOWSTACK_H
  2. #define _WINDOWSTACK_H
  3. #include "AeeStdLib.h"
  4. #include "IStack.h"
  5. #include "AEEAppGen.h"
  6. ////////////////////////////////////////////////////////////////////////
  7. typedef enum
  8. {
  9. WAPWINID_NULL,
  10. WAPWINID_MAINMENU,
  11. WAPWINID_INPUT,
  12. WAPWINID_BOOKMARK,
  13. WAPWINID_PUSH,
  14. WAPWINID_HISTORY
  15. }TWindowID;
  16. typedef boolean TWindowHandle(void* pWin,AEEEvent eCode, uint16 wParam, uint32 dwParam);
  17. typedef void*   TWindowCreate(IShell* pShell,void* pParam);
  18. typedef boolean TWindowRelease(IShell* pShell,void** pWin);
  19. typedef boolean TWindowRedraw(IShell* pShell,void* pWin);
  20. typedef struct IWinFunctionDef
  21. {
  22. TWindowID nWinID;
  23. TWindowCreate*  pCreate;
  24. TWindowRelease* pRelease;
  25. TWindowRedraw*  pRedraw;
  26. TWindowHandle*  pEventHdl;
  27. }IWinFunctionDef;
  28. ////////////////////////////////////////////////////////////////////////
  29. typedef struct TStackElement 
  30. {
  31.   void* m_pWin;
  32.   TWindowID nWinID;
  33. }TWinElement;
  34. typedef struct _IWindowStack
  35. {
  36. IStack* m_pStack;
  37. IShell* m_pShell;
  38. }IWindowStack;
  39. boolean IWINSTACK_CreateInstance();
  40. boolean IWINSTACK_Release();
  41. boolean IWINSTACK_HandleEvent(AEEEvent eCode, uint16 wParam, uint32 dwParam);
  42. boolean IWINSTACK_OpenWindow(TWindowID nWinID,void* pParam);
  43. boolean IWINSTACK_CloseWindow(boolean bRedraw);
  44. #endif