YSTest  PreAlpha_b400_20130424
The YSLib Test Project
 全部  命名空间 文件 函数 变量 类型定义 枚举 枚举值 友元 宏定义  
DSWindow.cpp
浏览该文件的文档.
1 /*
2  Copyright by FrankHB 2013.
3 
4  This file is part of the YSLib project, and may only be used,
5  modified, and distributed under the terms of the YSLib project
6  license, LICENSE.TXT. By continuing to use, modify, or distribute
7  this file you indicate that you have read the license and
8  understand and accept it fully.
9 */
10 
28 #include "DSWindow.h"
29 #include "DSScreen.h" // for GSurface;
30 
32 
33 #if YCL_HOSTED
34 using Devices::DSScreen;
35 using Drawing::Point;
36 
38 
39 DSWindow::DSWindow(NativeWindowHandle h, DSScreen& s_up, DSScreen& s_dn,
40  Environment& e)
41  : Window(h, e), scr_up(s_up), scr_dn(s_dn)
42 {}
43 
44 pair<Point, Point>
45 DSWindow::GetInputBounds() const ynothrow
46 {
47  return {Point(0, MainScreenHeight),
49 }
50 
51 void
52 DSWindow::OnDestroy()
53 {
54  Window::OnDestroy(),
56  // NOTE: Try to make sure all shells are released before destructing the
57  // instance of %DSApplication.
58 }
59 
60 void
61 DSWindow::OnPaint()
62 {
63  GSurface<WindowRegionDeviceContext> sf(GetNativeHandle());
64 
65  scr_up.UpdateToSurface(sf),
66  scr_dn.UpdateToSurface(sf);
67 }
68 
70 #endif
71 
72 YSL_END
73