CrossFramework Library
|
00001 00006 #if defined(XBASE_INCLUDED_APPLICATION_HPP) 00007 #else 00008 #define XBASE_INCLUDED_APPLICATION_HPP 00009 00010 //------------------------------------------------------------ 00011 #include <XBase/AppEvent.hpp> 00012 #include <XBase/Enum.hpp> 00013 #include <XBase/NonCopyable.hpp> 00014 #include <XBase/OS.hpp> 00015 #include <XBase/Pointer.hpp> 00016 #include <XBase/SDKHeader.hpp> 00017 00018 #if defined(XBASE_OS_WINDOWS) 00019 #include <XBase/Application_Windows.hpp> 00020 #elif defined(XBASE_OS_MACOSX) 00021 #include <XBase/Application_MacOSX.hpp> 00022 #else 00023 #include <XBase/Application_Default.hpp> 00024 #endif 00025 00026 //------------------------------------------------------------ 00027 namespace XBase { 00028 class Argument; 00029 class Display; 00030 } 00031 00032 //------------------------------------------------------------ 00033 namespace XBase { 00035 00036 00042 class Application : public ::XBase::NonCopyable 00043 { 00044 public: 00046 static Application& Instance(); 00047 00048 // コンストラクタと 00049 Application( const Argument& ); 00050 ~Application(); 00051 00053 const Argument& argument()const; 00054 00061 void quit(); 00062 00064 00065 AppEvent receiveEvent(); 00066 AppEvent lastEvent()const; 00067 00068 00069 //============================================================ 00070 // 内部処理用関数。 00071 void registerDisplay_( Display& ); 00072 void unregisterDisplay_( Display& ); 00073 00074 private: 00075 const Argument& mArgument; 00076 Enum32< AppEvent > mLastEvent; 00077 Pointer< Display > mDisplayPtr; 00078 Application_EXT mEXT; 00079 //------------------------------------------------------------ 00080 AppEvent receiveEventCore(); 00081 }; 00083 } 00084 //------------------------------------------------------------ 00085 #endif 00086 // EOF