YSTest: DSMain.h 源文件

YSTest PreAlpha_b400_20130424 The YSLib Test Project

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

- 文件列表
- 文件成员

全部 类 命名空间 文件 函数 变量 类型定义 枚举 枚举值 友元 宏定义 组 页
DSMain.h
浏览该文件的文档.
1 ﻿/*
2 Copyright by FrankHB 2012 - 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 #ifndef INC_Helper_DSMain_h_
29 #define INC_Helper_DSMain_h_ 1
30
31 #include "Helper/GUIApplication.h"
32 #include "NPL/Configuration.h"
33
34 YSL_BEGIN
35
36 #ifndef SCREEN_WIDTH
37 # define SCREEN_WIDTH 256
38 #endif
39 #ifndef SCREEN_HEIGHT
40 # define SCREEN_HEIGHT 192
41 #endif
42
53 const SDst MainScreenWidth(SCREEN_WIDTH), MainScreenHeight(SCREEN_HEIGHT);
55
56
57 YSL_BEGIN_NAMESPACE(Devices)
58 class DSScreen;
59 YSL_END_NAMESPACE(Devices)
60
61
67 class YF_API DSApplication : public GUIApplication
68 {
69 private:
74 array<unique_ptr<Devices::DSScreen>, 2> scrs;
75
76 #if YCL_MINGW32
77
81 unique_ptr<Host::WindowThread> p_wnd_thrd;
82 #endif
83
84 public:
89 DSApplication();
90
95 ~DSApplication() override;
96
98 DefPred(const ynothrow, ScreenReady, bool(scrs[0]) && bool(scrs[1]))
99
100
105 Devices::DSScreen&
106 GetDSScreenUp() const ynothrow;
112 Devices::DSScreen&
113 GetDSScreenDown() const ynothrow;
119 Devices::Screen&
120 GetScreenUp() const ynothrow;
126 Devices::Screen&
127 GetScreenDown() const ynothrow;
128 };
129
130
135 YF_API bool
136 InitConsole(Devices::Screen&, Drawing::PixelType, Drawing::PixelType);
137
142 YF_API void
143 ShowFatalError(const char*);
144
146 #if YCL_DS
147 YSL_BEGIN_NAMESPACE(DS)
148
149 using namespace platform_ex;
150
151 YSL_END_NAMESPACE(DS)
152 #elif YCL_MINGW32
153
154 YSL_BEGIN_NAMESPACE(MinGW32)
155
156 using namespace platform_ex;
157
158 YF_API void
159 TestFramework(size_t);
160
161 YSL_END_NAMESPACE(MinGW32)
162 #endif
163
164 YSL_END
165
166 #endif
167