YSTest: AndroidScreen.h 源文件

YSTest PreAlpha_b800_20170810 The YSLib Test Project

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

- 文件列表
- 文件成员

AndroidScreen.h
浏览该文件的文档.
1 /*
2 © 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
29 #ifndef Inc_Android_Helper_AndroidScreen_h_
30 #define Inc_Android_Helper_AndroidScreen_h_ 1
31
32 #include "Helper/YModules.h"
33 #include YFM_YSLib_Core_YDevice
34 #include YFM_Helper_ScreenBuffer
35 #if YCL_Android
36 # include <android/native_window.h>
37 #else
38 //# error "Currently only Android is supported."
39 #endif
40
41 namespace YSLib
42 {
43
44 #if YCL_Android
45
46 namespace Devices
47 {
48
53 class AndroidScreen : public Screen
54 {
55 private:
57 lref<::ANativeWindow> window_ref;
58
59 public:
74 AndroidScreen(::ANativeWindow&, const Drawing::Size& = {});
76 AndroidScreen(::ANativeWindow&, const Drawing::Size&,
77 const Drawing::Size&);
79
80 DefGetter(const ynothrow, ::ANativeWindow&, WindowRef, window_ref)
81
82 private:
88 void
89 SetNativeBufferSize(const Drawing::Size&);
90
91 public:
93 void
94 SetSize(const Drawing::Size&) override;
95
103 YB_NONNULL(1) void
104 Update(Drawing::ConstBitmapPtr) ynothrow override;
105 };
106
107 } // namespace Devices;
108
109 #endif
110
111 } // namespace YSLib;
112
113 #endif
114
YSLib
YSLib 命名空间。
Definition: AndroidHost.h:45
Drawing
YSLib::ynothrow
YB_PURE const _type size_t n ynothrow
Definition: YCoreUtilities.h:168
YModules.h
YSLib::YB_NONNULL
YF_API YB_NONNULL(1, 2) ValueNode LoadNPLA1File(const char *disp
载入 NPLA1 配置文件。
DefGetter
#define DefGetter(_q, _t, _n,...)
Definition: YBaseMacro.h:241
YSLib::Drawing::ConstBitmapPtr
const Pixel * ConstBitmapPtr
Definition: YGraphics.h:44