YSTest: HostWindow.h 源文件

YSTest PreAlpha_b500_20140530 The YSLib Test Project

- 首页
- 相关页面
- 模块
- 命名空间
- 类
- 文件

- 文件列表
- 文件成员

全部 类 命名空间 文件 函数 变量 类型定义 枚举 枚举值 友元 宏定义 组 页
HostWindow.h
浏览该文件的文档.
1 /*
2 © 2013-2014 FrankHB.
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 #ifndef INC_Helper_HostWindow_h_
29 #define INC_Helper_HostWindow_h_ 1
30
31 #include "YModules.h"
32 #include YFM_Helper_YGlobal
33 #if YCL_Win32
34 # include YFM_MinGW32_YCLib_Win32GUI
35 #elif YCL_Android
36 # include YFM_Android_YCLib_Android
37 #endif
38
39 namespace YSLib
40 {
41
42 #if YF_Hosted
43 namespace Host
44 {
45
47 using namespace platform_ex;
48
53 class YF_API Window : public platform_ex::HostWindow
54 {
55 private:
57 std::reference_wrapper<Environment> env;
58
59 public:
60 # if YCL_Win32
61
69 bool UseOpacity{false};
75 YSLib::Drawing::AlphaType Opacity{0xFF};
76 # endif
77
83 Window(NativeWindowHandle);
84 Window(NativeWindowHandle, Environment&);
86 ~Window() override;
87
88 DefGetter(const ynothrow, Environment&, Host, env)
94 virtual pair<YSLib::Drawing::Point, YSLib::Drawing::Point>
95 GetInputBounds() const ynothrow;
96
101 virtual PDefH(void, Refresh, )
102 ImplExpr(void())
103
109 void
110 UpdateFrom(YSLib::Drawing::BitmapPtr, ScreenRegionBuffer&);
111 };
112
113 } // namespace Host;
114 #endif
115
116 } // namespace YSLib;
117
118 #endif
119
YSLib::UI::Refresh
void Refresh(PaintEventArgs &&) override
刷新：按指定参数绘制界面并更新状态。
YF_API
#define YF_API
Definition: Platform.h:64
DefGetter
#define DefGetter(_q, _t, _n,...)
Definition: YBaseMacro.h:180
YSLib::UI::Styles::Window
窗口背景。
Definition: ystyle.h:182
YSLib::Drawing::Point
GBinaryGroup< SPos > Point
屏幕二维点（直角坐标表示）。
Definition: ygdibase.h:235
ImplExpr
#define ImplExpr(...)
Definition: YBaseMacro.h:93
platform_ex::Android::UpdateFrom
DefGetter(ynothrow, ScreenBuffer &, ScreenBufferRef,*this) using ScreenBuffer voi UpdateFrom)(YSLib::Drawing::BitmapPtr) ynothrow
Definition: Android.h:234
ynothrow
#define ynothrow
YSLib 无异常抛出保证：若支持 noexcept 关键字， 指定特定的 noexcept 异常规范。
Definition: ydef.h:514
platform_ex::NativeWindowHandle
::ANativeWindow * NativeWindowHandle
Definition: Android.h:50
YModules.h
platform::BitmapPtr
PixelType * BitmapPtr
Definition: Video.h:295
platform_ex::Android::ScreenRegionBuffer
ScreenRegionBuffer(const YSLib::Drawing::Size &, YSLib::SDst)
构造：使用指定的缓冲区大小和像素跨距。 像素跨距小于缓冲区大小。
platform::AlphaType
ystdex::octet AlphaType
Definition: Video.h:186