Name | Date | Size | #Lines | LOC | ||
---|---|---|---|---|---|---|
.. | 29-Oct-2021 | - | ||||
acinclude/ | 29-Oct-2021 | - | ||||
build-scripts/ | 29-Oct-2021 | - | ||||
docs/ | 29-Oct-2021 | - | ||||
include/ | 29-Oct-2021 | - | ||||
src/ | 29-Oct-2021 | - | ||||
test/ | 29-Oct-2021 | - | ||||
BUGS.txt | A D | 29-Oct-2021 | 463 | 17 | 8 | |
CMakeLists.txt | A D | 29-Oct-2021 | 78.1 KiB | 2,307 | 2,093 | |
COPYING.txt | A D | 29-Oct-2021 | 930 | 21 | 15 | |
CREDITS.txt | A D | 29-Oct-2021 | 1.9 KiB | 54 | 29 | |
INSTALL.txt | A D | 29-Oct-2021 | 1.1 KiB | 41 | 27 | |
Makefile | A D | 29-Oct-2021 | 43 KiB | 658 | 497 | |
README-SDL.txt | A D | 29-Oct-2021 | 433 | 14 | 8 | |
README.md | A D | 29-Oct-2021 | 9.8 KiB | 304 | 264 | |
README.txt | A D | 29-Oct-2021 | 648 | 22 | 14 | |
SDL2.spec | A D | 29-Oct-2021 | 3 KiB | 120 | 95 | |
SDL2.spec.in | A D | 29-Oct-2021 | 3 KiB | 120 | 95 | |
SDL2Config.cmake | A D | 29-Oct-2021 | 55 | 2 | 1 | |
TODO.txt | A D | 29-Oct-2021 | 468 | 11 | 8 | |
autogen.sh | A D | 29-Oct-2021 | 562 | 24 | 16 | |
config.status | A D | 29-Oct-2021 | 82.5 KiB | 2,535 | 2,031 | |
configure | A D | 29-Oct-2021 | 834.9 KiB | 28,533 | 22,411 | |
libtool | A D | 29-Oct-2021 | 295.8 KiB | 10,386 | 7,535 | |
package.yaml | A D | 29-Oct-2021 | 10.9 KiB | |||
sdl2-config | A D | 29-Oct-2021 | 1.2 KiB | 61 | 51 | |
sdl2-config-version.cmake | A D | 29-Oct-2021 | 278 | 12 | 9 | |
sdl2-config-version.cmake.in | A D | 29-Oct-2021 | 285 | 12 | 9 | |
sdl2-config.cmake | A D | 29-Oct-2021 | 1.9 KiB | 40 | 34 | |
sdl2-config.cmake.in | A D | 29-Oct-2021 | 1.8 KiB | 40 | 34 | |
sdl2-config.in | A D | 29-Oct-2021 | 1.4 KiB | 61 | 54 | |
sdl2.m4 | A D | 29-Oct-2021 | 7.9 KiB | 235 | 214 | |
sdl2.pc | A D | 29-Oct-2021 | 546 | 16 | 13 | |
sdl2.pc.in | A D | 29-Oct-2021 | 497 | 15 | 12 |
README-SDL.txt
1 2Please distribute this file with the SDL runtime environment: 3 4The Simple DirectMedia Layer (SDL for short) is a cross-platform library 5designed to make it easy to write multi-media software, such as games 6and emulators. 7 8The Simple DirectMedia Layer library source code is available from: 9https://www.libsdl.org/ 10 11This library is distributed under the terms of the zlib license: 12http://www.zlib.net/zlib_license.html 13 14
README.md
1@page SDL2 SDL2 2 3**[更正文档](https://gitee.com/alios-things/SDL2/edit/master/README.md)**      **[贡献说明](https://help.aliyun.com/document_detail/302301.html)** 4 5# 概述 6Simple DirectMedia Layer是一个跨平台开发库,旨在通过OpenGL和Direct3D提供对音频,键盘,鼠标,操纵杆和图形硬件的低级访问。视频播放软件,仿真器和受欢迎的游戏(包括Valve屡获殊荣的目录和许多Humble Bundle游戏)都使用它。 7 8SDL正式支持Windows,Mac OS X,Linux,iOS和Android。在源代码中可以找到对其他平台的支持。 9 10SDL用C编写,可与C ++一起使用,并且有绑定可用于其他几种语言,包括C#和Python。 11 12## 版权信息 13> zlib license 14 15## 目录结构 16```tree 17├── acinclude 18│ ├── ac_check_define.m4 19│ ├── alsa.m4 20│ ├── ax_check_compiler_flags.m4 21│ ├── ax_gcc_archflag.m4 22│ ├── ax_gcc_x86_cpuid.m4 23│ ├── esd.m4 24│ ├── libtool.m4 25│ ├── lt~obsolete.m4 26│ ├── ltoptions.m4 27│ ├── ltsugar.m4 28│ ├── ltversion.m4 29│ └── pkg_config.m4 30├── autogen.sh 31├── BUGS.txt 32├── build-scripts 33│ ├── androidbuildlibs.sh 34│ ├── androidbuild.sh 35│ ├── checker-buildbot.sh 36│ ├── config.guess 37│ ├── config.sub 38│ ├── config.sub.patch 39│ ├── emscripten-buildbot.sh 40│ ├── gcc-fat.sh 41│ ├── g++-fat.sh 42│ ├── install-sh 43│ ├── iosbuild.sh 44│ ├── ltmain.sh 45│ ├── mkinstalldirs 46│ ├── nacl-buildbot.sh 47│ ├── naclbuild.sh 48│ ├── os2-buildbot.sh 49│ ├── raspberrypi-buildbot.sh 50│ ├── showrev.sh 51│ ├── strip_fPIC.sh 52│ ├── update-copyright.sh 53│ ├── updaterev.sh 54│ ├── windows-buildbot-zipper.bat 55│ ├── winrtbuild.bat 56│ └── winrtbuild.ps1 57├── CMakeLists.txt 58├── Config.in 59├── config.status 60├── configure 61├── COPYING.txt 62├── CREDITS.txt 63├── docs 64│ ├── doxyfile 65│ ├── README-android.md 66│ ├── README-cmake.md 67│ ├── README-directfb.md 68│ ├── README-dynapi.md 69│ ├── README-emscripten.md 70│ ├── README-gesture.md 71│ ├── README-hg.md 72│ ├── README-ios.md 73│ ├── README-linux.md 74│ ├── README-macosx.md 75│ ├── README.md 76│ ├── README-nacl.md 77│ ├── README-pandora.md 78│ ├── README-platforms.md 79│ ├── README-porting.md 80│ ├── README-psp.md 81│ ├── README-raspberrypi.md 82│ ├── README-touch.md 83│ ├── README-wince.md 84│ ├── README-windows.md 85│ └── README-winrt.md 86├── include 87│ ├── begin_code.h 88│ ├── close_code.h 89│ ├── SDL_assert.h 90│ ├── SDL_atomic.h 91│ ├── SDL_audio.h 92│ ├── SDL_bits.h 93│ ├── SDL_blendmode.h 94│ ├── SDL_clipboard.h 95│ ├── SDL_config_android.h 96│ ├── SDL_config.h 97│ ├── SDL_config.h.cmake 98│ ├── SDL_config.h.in 99│ ├── SDL_config_iphoneos.h 100│ ├── SDL_config_macosx.h 101│ ├── SDL_config_minimal.h 102│ ├── SDL_config_os2.h 103│ ├── SDL_config_pandora.h 104│ ├── SDL_config_psp.h 105│ ├── SDL_config_windows.h 106│ ├── SDL_config_winrt.h 107│ ├── SDL_config_wiz.h 108│ ├── SDL_copying.h 109│ ├── SDL_cpuinfo.h 110│ ├── SDL_egl.h 111│ ├── SDL_endian.h 112│ ├── SDL_error.h 113│ ├── SDL_events.h 114│ ├── SDL_filesystem.h 115│ ├── SDL_gamecontroller.h 116│ ├── SDL_gesture.h 117│ ├── SDL.h 118│ ├── SDL_haptic.h 119│ ├── SDL_hints.h 120│ ├── SDL_joystick.h 121│ ├── SDL_keyboard.h 122│ ├── SDL_keycode.h 123│ ├── SDL_loadso.h 124│ ├── SDL_locale.h 125│ ├── SDL_log.h 126│ ├── SDL_main.h 127│ ├── SDL_messagebox.h 128│ ├── SDL_metal.h 129│ ├── SDL_mouse.h 130│ ├── SDL_mutex.h 131│ ├── SDL_name.h 132│ ├── SDL_opengles2_gl2ext.h 133│ ├── SDL_opengles2_gl2.h 134│ ├── SDL_opengles2_gl2platform.h 135│ ├── SDL_opengles2.h 136│ ├── SDL_opengles2_khrplatform.h 137│ ├── SDL_opengles.h 138│ ├── SDL_opengl_glext.h 139│ ├── SDL_opengl.h 140│ ├── SDL_pixels.h 141│ ├── SDL_platform.h 142│ ├── SDL_power.h 143│ ├── SDL_quit.h 144│ ├── SDL_rect.h 145│ ├── SDL_render.h 146│ ├── SDL_revision.h 147│ ├── SDL_rwops.h 148│ ├── SDL_scancode.h 149│ ├── SDL_sensor.h 150│ ├── SDL_shape.h 151│ ├── SDL_stdinc.h 152│ ├── SDL_surface.h 153│ ├── SDL_system.h 154│ ├── SDL_syswm.h 155│ ├── SDL_test_assert.h 156│ ├── SDL_test_common.h 157│ ├── SDL_test_compare.h 158│ ├── SDL_test_crc32.h 159│ ├── SDL_test_font.h 160│ ├── SDL_test_fuzzer.h 161│ ├── SDL_test.h 162│ ├── SDL_test_harness.h 163│ ├── SDL_test_images.h 164│ ├── SDL_test_log.h 165│ ├── SDL_test_md5.h 166│ ├── SDL_test_memory.h 167│ ├── SDL_test_random.h 168│ ├── SDL_thread.h 169│ ├── SDL_timer.h 170│ ├── SDL_touch.h 171│ ├── SDL_ttf.h 172│ ├── SDL_types.h 173│ ├── SDL_version.h 174│ ├── SDL_video.h 175│ └── SDL_vulkan.h 176├── src 177│ ├── atomic 178│ ├── audio 179│ ├── core 180│ ├── cpuinfo 181│ ├── dynapi 182│ ├── events 183│ ├── file 184│ ├── filesystem 185│ ├── gfx 186│ ├── haptic 187│ ├── hidapi 188│ ├── image 189│ ├── joystick 190│ ├── libm 191│ ├── loadso 192│ ├── locale 193│ ├── main 194│ ├── power 195│ ├── render 196│ ├── SDL_assert.c 197│ ├── SDL_assert_c.h 198│ ├── SDL.c 199│ ├── SDL_dataqueue.c 200│ ├── SDL_dataqueue.h 201│ ├── SDL_error.c 202│ ├── SDL_error_c.h 203│ ├── SDL_hints.c 204│ ├── SDL_hints_c.h 205│ ├── SDL_internal.h 206│ ├── SDL_log.c 207│ ├── sensor 208│ ├── stdlib 209│ ├── test 210│ ├── thread 211│ ├── timer 212│ ├── ttf 213│ └── video 214├── test 215``` 216>具体可参考http://wiki.libsdl.org/ 了解SDL的具体内容 217 218## 依赖组件 219 220* freetype 221* udisplay 222 223# 常用配置 224```yaml 225def_config: # 组件的可配置项 226 __ALIOS__: 1 227 LOAD_JPG: 1 228 LOAD_BMP: 1 229 LOAD_PNG: 1 230 __native_client__: 1 231 AOS_COMP_SDL2: 1 232 AOS_COMP_UDISPLAY: 1 233``` 234> 默认打开支持jpg/bmp/png图像绘制,以及使用udisplay组件进行framebuffer显示 235 236# API说明 237SDL2提供了丰富的API接口,支持audio/video/input等设备操作接口,请参考: 238http://wiki.libsdl.org/CategoryAPI 239 240# 使用示例 241 242组件使用示例相关的代码下载、编译和固件烧录均依赖AliOS Things配套的开发工具,所以首先需要参考[《AliOS Things集成开发环境使用说明之搭建开发环境》](https://help.aliyun.com/document_detail/302378.html),下载安装。 243待开发环境搭建完成后,可以按照以下步骤进行示例的测试。 244 245## 步骤1 创建或打开工程 246 247**打开已有工程** 248 249如果用于测试的案例工程已存在,可参考[《AliOS Things集成开发环境使用说明之打开工程》](https://help.aliyun.com/document_detail/302381.html)打开已有工程。 250 251**创建新的工程** 252 253组件的示例代码可以通过编译链接到AliOS Things的任意案例(solution)来运行,这里选择helloworld_demo案例。helloworld_demo案例相关的源代码下载可参考[《AliOS Things集成开发环境使用说明之创建工程》](https://help.aliyun.com/document_detail/302379.html)。 254 255## 步骤2 添加组件 256 257案例下载完成后,需要在helloworld_demo组件的package.yaml中添加对组件的依赖: 258 259```yaml 260 261depends: 262 - SDL2: master # helloworld_demo组件中引入SDL2组件 263 - ili9341: master # helloworld_demo 中引入ili9341屏幕驱动 264 265def_config: 266 CLI_IOBOX_ENABLE: 1 # 可选:使能文件系统测试命令,例如ls, ll, mkdir, touch, echo等 267 268``` 269 270## 步骤3 下载组件 271 272在已安装了 的开发环境工具栏中,选择Terminal -> New Terminal启动终端,并且默认工作路径为当前工程的workspace,此时在终端命令行中输入: 273 274```shell 275 276aos install SDL2 277 278``` 279 280上述命令执行成功后,组件源码则被下载到了./components/SDL2路径中。 281 282## 步骤4 添加示例 283请参考[ugraphics](https://gitee.com/alios-things/ugraphics)组件的测试示例。 284 285## 步骤5 编译固件 286 287在示例代码已经添加至组件的配置文件,并且helloworld_demo已添加了对该组件的依赖后,就可以编译helloworld_demo案例来生成固件了,具体编译方法可参考[《AliOS Things集成开发环境使用说明之编译固件》](https://help.aliyun.com/document_detail/302384.html)。 288 289## 步骤6 烧录固件 290 291上述步骤执行后,可参考[《AliOS Things集成开发环境使用说明之烧录固件》](https://help.aliyun.com/document_detail/302383.html)来烧录固件。 292 293## 步骤7 打开串口 294 295固件烧录完成后,可以通过串口查看示例的运行结果,打开串口的具体方法可参考[《AliOS Things集成开发环境使用说明之查看日志》](https://help.aliyun.com/document_detail/302382.html)。 296 297当串口终端打开成功后,可在串口中输入help来查看已添加的测试命令。 298 299## 步骤8 测试示例 300在AliOS Things中ugraphics组件对SDL2中部分图像、字体相关接口进行了封装,请参考请参考[ugraphics](https://gitee.com/alios-things/ugraphics)组件的测试示例。 301 302# FAQ 303NA 304
README.txt
1 2 Simple DirectMedia Layer 3 4 (SDL) 5 6 Version 2.0 7 8--- 9https://www.libsdl.org/ 10 11Simple DirectMedia Layer is a cross-platform development library designed 12to provide low level access to audio, keyboard, mouse, joystick, and graphics 13hardware via OpenGL and Direct3D. It is used by video playback software, 14emulators, and popular games including Valve's award winning catalog 15and many Humble Bundle games. 16 17More extensive documentation is available in the docs directory, starting 18with README.md 19 20Enjoy! 21 Sam Lantinga (slouken@libsdl.org) 22