YSTest: Platform.h 源文件

YSTest PreAlpha_b500_20140530 The YSLib Test Project

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

- 文件列表
- 文件成员

全部 类 命名空间 文件 函数 变量 类型定义 枚举 枚举值 友元 宏定义 组 页
Platform.h
浏览该文件的文档.
1 /*
2 © 2009-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
46 #ifndef YCL_INC_Platform_h_
47 #define YCL_INC_Platform_h_ 1
48
55 #if defined(YF_DLL) && defined(YF_BUILD_DLL)
56 # error "DLL could not be built and used at the same time."
57 #endif
58
59 #ifdef YF_DLL
60 # define YF_API __declspec(dllimport)
61 #elif defined(YF_BUILD_DLL)
62 # define YF_API __declspec(dllexport)
63 #else
64 # define YF_API
65 #endif
66
92 #define YF_Platform_DS 0x4001
93
95 #define YF_Platform_Win32 0x4101
96
100 #define YF_Platform_MinGW32 0x4102
101
107 #define YF_Platform_Android_ARM 0x4201
108
113 #ifdef __MINGW32__
114 //#ifdef _WIN32
115 # define YF_Platform YF_Platform_MinGW32
116 #elif defined(_WIN32)
117 # define YF_Platform YF_Platform_Win32
118 #elif defined(__ANDROID__)
119 // FIXME: Architecture detection.
120 # define YF_Platform YF_Platform_Android_ARM
121 #elif !defined(YF_Platform)
122 //当前默认以 DS 作为目标平台。
123 # define YF_Platform YF_Platform_DS
124 #endif
125
126
127
128 /*
129 \def YCL_Device_Cursor_FixedKey
130 \brief 1 表示保证指针输入设备的对应数据结构只保存一个按键状态。
131 \note 接收指针设备输入时不需要区分多个按键状态，可用于输入处理优化。
132 \since build 436
133 */
134
135
136 #if YF_Platform == YF_Platform_DS
137 # define YCL_DS 1
138 # define YF_Hosted 0
139 # define YF_Multithread 0
140 # define YCL_API_FILESYSTEM_POSIX
141 # define YCL_API_USE_UNISTD
142 # define YCL_API_USE_SYS_DIR
143 # define YCL_Device_Cursor_FixedKey 1
144 #elif YF_Platform == YF_Platform_MinGW32
145 # define YCL_MinGW32 1
146 # define YCL_Win32 1
147 # define YF_Hosted 1
148 #elif YF_Platform == YF_Platform_Win32
149 # define YCL_Win32 1
150 # define YF_Hosted 1
151 #elif YF_Platform == YF_Platform_Android_ARM
152 # define YCL_Android 1
153 # define YF_Hosted 1
154 # define YCL_API_FILESYSTEM_POSIX
155 #else
156 # error "Unsupported platform found."
157 #endif
158
159 #if YCL_Win32 || YCL_Android
160 # ifdef _MT
161 # define YF_Multithread 1
162 # else
163 # define YF_Multithread 0
164 # endif
165 #endif
166
167 #endif
168