OSDN Git Service

Windows APIを実装部に隠蔽してみた。まだ不完全だが。
[wintimer/wintimer.git] / wintimer / sf_windows.cpp
index fae9aed..c4915af 100644 (file)
@@ -17,7 +17,7 @@ EXTERN_C IMAGE_DOS_HEADER __ImageBase;
 
 namespace sf 
 {
-  LRESULT base_window::window_proc(HWND hwnd,boost::uint32_t message, WPARAM wParam, LPARAM lParam)
+  LRESULT base_win32_window::window_proc(HWND hwnd,boost::uint32_t message, WPARAM wParam, LPARAM lParam)
   {
 
     LRESULT 結果 = 0;
@@ -88,7 +88,7 @@ namespace sf
     return ::DefWindowProcW(hwnd,message,wParam,lParam);
   };
   
-  void base_window::register_class (
+  void base_win32_window::register_class (
     wchar_t * menu_name,
     boost::uint32_t        style ,
     boost::int32_t     cbClsExtra,
@@ -102,12 +102,12 @@ namespace sf
   }
 
   /** デフォルト設定 */
-  void base_window::register_class()
+  void base_win32_window::register_class()
   {
     wnd_class_.reset(new sf::window_class_ex(0,name_,HINST_THISCOMPONENT,thunk_proc_));
   }
 
-  void base_window::create_window()
+  void base_win32_window::create_window()
   {
     // Create the application window.
     //
@@ -133,10 +133,7 @@ namespace sf
       );
   }
 
-
-
-
-  void base_window::show(boost::uint32_t show_flag) 
+  void base_win32_window::show(boost::uint32_t show_flag) 
   {
     //HRESULT hr = S_OK;
     //BOOL enable;
@@ -154,31 +151,23 @@ namespace sf
     //}
     ::ShowWindow(hwnd_,show_flag);
   }
-  void base_window::update() {::UpdateWindow(hwnd_);}
 
-  base_window::~base_window()
+  void base_win32_window::update() {::UpdateWindow(hwnd_);}
+
+  base_win32_window::~base_win32_window()
   {
 
   }
 
-
-  base_window::base_window(const std::wstring& title,const std::wstring& name,bool fit_to_display,float width,float height)
-    : title_(title),name_(name),fit_to_display_(fit_to_display),
-    width_(width),height_(height),thunk_(this,base_window::WndProc),hwnd_(0)
+  base_win32_window::base_win32_window(const std::wstring& title,const std::wstring& name,bool fit_to_display,float width,float height)
+    : title_(title),name_(name),fit_to_display_(fit_to_display),width_(width),height_(height),thunk_(this,base_win32_window::WndProc),hwnd_(0)
   {
     thunk_proc_ = (WNDPROC)thunk_.getCode();
     //create_device_independent_resources();
   }
 
-
-
-  base_window::operator HWND()
-  {
-    return hwnd_;
-  };
-
-  //ID2D1FactoryPtr base_window::factory() { return impl_->factory();};
-  //ID2D1HwndRenderTargetPtr base_window::render_target() { return impl_->render_target();};
-  //IDWriteFactoryPtr base_window::write_factory() {return impl_->write_factory();};
+  //ID2D1FactoryPtr base_win32_window::factory() { return impl_->factory();};
+  //ID2D1HwndRenderTargetPtr base_win32_window::render_target() { return impl_->render_target();};
+  //IDWriteFactoryPtr base_win32_window::write_factory() {return impl_->write_factory();};
 }