ruby2d 0.9.3 → 0.9.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (119) hide show
  1. checksums.yaml +4 -4
  2. data/assets/README.md +7 -9
  3. data/assets/Rakefile +85 -0
  4. data/assets/include/SDL2/SDL.h +1 -1
  5. data/assets/include/SDL2/SDL_assert.h +1 -1
  6. data/assets/include/SDL2/SDL_atomic.h +20 -2
  7. data/assets/include/SDL2/SDL_audio.h +47 -14
  8. data/assets/include/SDL2/SDL_bits.h +10 -1
  9. data/assets/include/SDL2/SDL_blendmode.h +7 -7
  10. data/assets/include/SDL2/SDL_clipboard.h +1 -1
  11. data/assets/include/SDL2/SDL_config.h +24 -390
  12. data/assets/include/SDL2/SDL_config_android.h +178 -0
  13. data/assets/include/SDL2/SDL_config_iphoneos.h +201 -0
  14. data/assets/include/SDL2/SDL_config_macosx.h +240 -0
  15. data/assets/include/SDL2/SDL_config_minimal.h +85 -0
  16. data/assets/include/SDL2/SDL_config_os2.h +170 -0
  17. data/assets/include/SDL2/SDL_config_pandora.h +133 -0
  18. data/assets/include/SDL2/SDL_config_psp.h +164 -0
  19. data/assets/include/SDL2/SDL_config_windows.h +257 -0
  20. data/assets/include/SDL2/SDL_config_winrt.h +240 -0
  21. data/assets/include/SDL2/SDL_config_wiz.h +146 -0
  22. data/assets/include/SDL2/SDL_copying.h +20 -0
  23. data/assets/include/SDL2/SDL_cpuinfo.h +90 -8
  24. data/assets/include/SDL2/SDL_egl.h +1 -1
  25. data/assets/include/SDL2/SDL_endian.h +1 -1
  26. data/assets/include/SDL2/SDL_error.h +1 -1
  27. data/assets/include/SDL2/SDL_events.h +4 -1
  28. data/assets/include/SDL2/SDL_filesystem.h +1 -1
  29. data/assets/include/SDL2/SDL_gamecontroller.h +1 -1
  30. data/assets/include/SDL2/SDL_gesture.h +1 -1
  31. data/assets/include/SDL2/SDL_haptic.h +1 -1
  32. data/assets/include/SDL2/SDL_hints.h +145 -14
  33. data/assets/include/SDL2/SDL_image.h +2 -2
  34. data/assets/include/SDL2/SDL_joystick.h +1 -1
  35. data/assets/include/SDL2/SDL_keyboard.h +1 -1
  36. data/assets/include/SDL2/SDL_keycode.h +1 -1
  37. data/assets/include/SDL2/SDL_loadso.h +1 -1
  38. data/assets/include/SDL2/SDL_log.h +1 -1
  39. data/assets/include/SDL2/SDL_main.h +28 -16
  40. data/assets/include/SDL2/SDL_messagebox.h +1 -1
  41. data/assets/include/SDL2/SDL_mouse.h +1 -1
  42. data/assets/include/SDL2/SDL_mutex.h +1 -1
  43. data/assets/include/SDL2/SDL_name.h +1 -1
  44. data/assets/include/SDL2/SDL_opengl.h +1 -1
  45. data/assets/include/SDL2/SDL_opengles.h +1 -1
  46. data/assets/include/SDL2/SDL_opengles2.h +1 -1
  47. data/assets/include/SDL2/SDL_pixels.h +3 -3
  48. data/assets/include/SDL2/SDL_platform.h +1 -1
  49. data/assets/include/SDL2/SDL_power.h +1 -1
  50. data/assets/include/SDL2/SDL_quit.h +1 -1
  51. data/assets/include/SDL2/SDL_rect.h +29 -3
  52. data/assets/include/SDL2/SDL_render.h +168 -1
  53. data/assets/include/SDL2/SDL_revision.h +2 -2
  54. data/assets/include/SDL2/SDL_rwops.h +50 -13
  55. data/assets/include/SDL2/SDL_scancode.h +2 -2
  56. data/assets/include/SDL2/SDL_sensor.h +4 -4
  57. data/assets/include/SDL2/SDL_shape.h +1 -1
  58. data/assets/include/SDL2/SDL_stdinc.h +1 -1
  59. data/assets/include/SDL2/SDL_surface.h +2 -1
  60. data/assets/include/SDL2/SDL_system.h +1 -1
  61. data/assets/include/SDL2/SDL_syswm.h +11 -8
  62. data/assets/include/SDL2/SDL_test.h +1 -1
  63. data/assets/include/SDL2/SDL_test_assert.h +1 -1
  64. data/assets/include/SDL2/SDL_test_common.h +22 -5
  65. data/assets/include/SDL2/SDL_test_compare.h +1 -1
  66. data/assets/include/SDL2/SDL_test_crc32.h +1 -1
  67. data/assets/include/SDL2/SDL_test_font.h +1 -1
  68. data/assets/include/SDL2/SDL_test_fuzzer.h +1 -1
  69. data/assets/include/SDL2/SDL_test_harness.h +1 -1
  70. data/assets/include/SDL2/SDL_test_images.h +1 -1
  71. data/assets/include/SDL2/SDL_test_log.h +1 -1
  72. data/assets/include/SDL2/SDL_test_md5.h +1 -1
  73. data/assets/include/SDL2/SDL_test_memory.h +3 -3
  74. data/assets/include/SDL2/SDL_test_random.h +1 -1
  75. data/assets/include/SDL2/SDL_thread.h +1 -1
  76. data/assets/include/SDL2/SDL_timer.h +1 -1
  77. data/assets/include/SDL2/SDL_touch.h +17 -1
  78. data/assets/include/SDL2/SDL_types.h +1 -1
  79. data/assets/include/SDL2/SDL_version.h +2 -2
  80. data/assets/include/SDL2/SDL_video.h +1 -1
  81. data/assets/include/SDL2/SDL_vulkan.h +3 -3
  82. data/assets/include/SDL2/begin_code.h +4 -1
  83. data/assets/include/SDL2/close_code.h +4 -1
  84. data/assets/include/simple2d.h +22 -0
  85. data/assets/linux/simple2d/Makefile +11 -8
  86. data/assets/linux/simple2d/bin/simple2d.sh +13 -7
  87. data/assets/linux/simple2d/include/simple2d.h +22 -0
  88. data/assets/linux/simple2d/src/gl.c +17 -13
  89. data/assets/linux/simple2d/src/gl3.c +105 -32
  90. data/assets/linux/simple2d/src/sound.c +37 -0
  91. data/assets/linux/simple2d/src/window.c +11 -0
  92. data/assets/macos/lib/libFLAC.a +0 -0
  93. data/assets/macos/lib/libSDL2.a +0 -0
  94. data/assets/macos/lib/libSDL2_image.a +0 -0
  95. data/assets/macos/lib/libSDL2_mixer.a +0 -0
  96. data/assets/macos/lib/libSDL2_ttf.a +0 -0
  97. data/assets/macos/lib/libfreetype.a +0 -0
  98. data/assets/macos/lib/libjpeg.a +0 -0
  99. data/assets/macos/lib/libmpg123.a +0 -0
  100. data/assets/macos/lib/libogg.a +0 -0
  101. data/assets/macos/lib/libpng16.a +0 -0
  102. data/assets/macos/lib/libsimple2d.a +0 -0
  103. data/assets/macos/lib/libtiff.a +0 -0
  104. data/assets/macos/lib/libwebp.a +0 -0
  105. data/assets/mingw/bin/SDL2.dll +0 -0
  106. data/assets/mingw/bin/SDL2_image.dll +0 -0
  107. data/assets/mingw/bin/libpng16-16.dll +0 -0
  108. data/assets/mingw/bin/libtiff-5.dll +0 -0
  109. data/assets/mingw/bin/libwebp-7.dll +0 -0
  110. data/assets/mingw/lib/libSDL2.a +0 -0
  111. data/assets/mingw/lib/libSDL2.dll.a +0 -0
  112. data/assets/mingw/lib/libSDL2_image.a +0 -0
  113. data/assets/mingw/lib/libSDL2_image.dll.a +0 -0
  114. data/assets/mingw/lib/libSDL2_test.a +0 -0
  115. data/assets/mingw/lib/libSDL2main.a +0 -0
  116. data/assets/mingw/lib/libsimple2d.a +0 -0
  117. data/ext/ruby2d/extconf.rb +1 -1
  118. data/lib/ruby2d/version.rb +1 -1
  119. metadata +14 -2
@@ -1,2 +1,2 @@
1
- #define SDL_REVISION "hg-12373:8feb5da6f2fb"
2
- #define SDL_REVISION_NUMBER 12373
1
+ #define SDL_REVISION "hg-12952:bc90ce38f1e2"
2
+ #define SDL_REVISION_NUMBER 12952
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  Simple DirectMedia Layer
3
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
3
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
4
4
 
5
5
  This software is provided 'as-is', without any express or implied
6
6
  warranty. In no event will the authors be held liable for any damages
@@ -176,19 +176,48 @@ extern DECLSPEC void SDLCALL SDL_FreeRW(SDL_RWops * area);
176
176
  #define RW_SEEK_END 2 /**< Seek relative to the end of data */
177
177
 
178
178
  /**
179
- * \name Read/write macros
179
+ * Return the size of the file in this rwops, or -1 if unknown
180
+ */
181
+ extern DECLSPEC Sint64 SDLCALL SDL_RWsize(SDL_RWops *context);
182
+
183
+ /**
184
+ * Seek to \c offset relative to \c whence, one of stdio's whence values:
185
+ * RW_SEEK_SET, RW_SEEK_CUR, RW_SEEK_END
180
186
  *
181
- * Macros to easily read and write from an SDL_RWops structure.
187
+ * \return the final offset in the data stream, or -1 on error.
182
188
  */
183
- /* @{ */
184
- #define SDL_RWsize(ctx) (ctx)->size(ctx)
185
- #define SDL_RWseek(ctx, offset, whence) (ctx)->seek(ctx, offset, whence)
186
- #define SDL_RWtell(ctx) (ctx)->seek(ctx, 0, RW_SEEK_CUR)
187
- #define SDL_RWread(ctx, ptr, size, n) (ctx)->read(ctx, ptr, size, n)
188
- #define SDL_RWwrite(ctx, ptr, size, n) (ctx)->write(ctx, ptr, size, n)
189
- #define SDL_RWclose(ctx) (ctx)->close(ctx)
190
- /* @} *//* Read/write macros */
189
+ extern DECLSPEC Sint64 SDLCALL SDL_RWseek(SDL_RWops *context,
190
+ Sint64 offset, int whence);
191
+
192
+ /**
193
+ * Return the current offset in the data stream, or -1 on error.
194
+ */
195
+ extern DECLSPEC Sint64 SDLCALL SDL_RWtell(SDL_RWops *context);
191
196
 
197
+ /**
198
+ * Read up to \c maxnum objects each of size \c size from the data
199
+ * stream to the area pointed at by \c ptr.
200
+ *
201
+ * \return the number of objects read, or 0 at error or end of file.
202
+ */
203
+ extern DECLSPEC size_t SDLCALL SDL_RWread(SDL_RWops *context,
204
+ void *ptr, size_t size, size_t maxnum);
205
+
206
+ /**
207
+ * Write exactly \c num objects each of size \c size from the area
208
+ * pointed at by \c ptr to data stream.
209
+ *
210
+ * \return the number of objects written, or 0 at error or end of file.
211
+ */
212
+ extern DECLSPEC size_t SDLCALL SDL_RWwrite(SDL_RWops *context,
213
+ const void *ptr, size_t size, size_t num);
214
+
215
+ /**
216
+ * Close and free an allocated SDL_RWops structure.
217
+ *
218
+ * \return 0 if successful or -1 on write error when flushing data.
219
+ */
220
+ extern DECLSPEC int SDLCALL SDL_RWclose(SDL_RWops *context);
192
221
 
193
222
  /**
194
223
  * Load all the data from an SDL data stream.
@@ -209,9 +238,17 @@ extern DECLSPEC void *SDLCALL SDL_LoadFile_RW(SDL_RWops * src, size_t *datasize,
209
238
  /**
210
239
  * Load an entire file.
211
240
  *
212
- * Convenience macro.
241
+ * The data is allocated with a zero byte at the end (null terminated)
242
+ *
243
+ * If \c datasize is not NULL, it is filled with the size of the data read.
244
+ *
245
+ * If \c freesrc is non-zero, the stream will be closed after being read.
246
+ *
247
+ * The data should be freed with SDL_free().
248
+ *
249
+ * \return the data, or NULL if there was an error.
213
250
  */
214
- #define SDL_LoadFile(file, datasize) SDL_LoadFile_RW(SDL_RWFromFile(file, "rb"), datasize, 1)
251
+ extern DECLSPEC void *SDLCALL SDL_LoadFile(const char *file, size_t *datasize);
215
252
 
216
253
  /**
217
254
  * \name Read endian functions
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  Simple DirectMedia Layer
3
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
3
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
4
4
 
5
5
  This software is provided 'as-is', without any express or implied
6
6
  warranty. In no event will the authors be held liable for any damages
@@ -38,7 +38,7 @@
38
38
  * SDL_Event structure.
39
39
  *
40
40
  * The values in this enumeration are based on the USB usage page standard:
41
- * http://www.usb.org/developers/hidpage/Hut1_12v2.pdf
41
+ * https://www.usb.org/sites/default/files/documents/hut1_12v2.pdf
42
42
  */
43
43
  typedef enum
44
44
  {
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  Simple DirectMedia Layer
3
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
3
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
4
4
 
5
5
  This software is provided 'as-is', without any express or implied
6
6
  warranty. In no event will the authors be held liable for any damages
@@ -26,8 +26,8 @@
26
26
  *
27
27
  */
28
28
 
29
- #ifndef _SDL_sensor_h
30
- #define _SDL_sensor_h
29
+ #ifndef SDL_sensor_h_
30
+ #define SDL_sensor_h_
31
31
 
32
32
  #include "SDL_stdinc.h"
33
33
  #include "SDL_error.h"
@@ -246,6 +246,6 @@ extern DECLSPEC void SDLCALL SDL_SensorUpdate(void);
246
246
  #endif
247
247
  #include "close_code.h"
248
248
 
249
- #endif /* _SDL_sensor_h */
249
+ #endif /* SDL_sensor_h_ */
250
250
 
251
251
  /* vi: set ts=4 sw=4 expandtab: */
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  Simple DirectMedia Layer
3
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
3
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
4
4
 
5
5
  This software is provided 'as-is', without any express or implied
6
6
  warranty. In no event will the authors be held liable for any damages
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  Simple DirectMedia Layer
3
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
3
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
4
4
 
5
5
  This software is provided 'as-is', without any express or implied
6
6
  warranty. In no event will the authors be held liable for any damages
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  Simple DirectMedia Layer
3
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
3
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
4
4
 
5
5
  This software is provided 'as-is', without any express or implied
6
6
  warranty. In no event will the authors be held liable for any damages
@@ -53,6 +53,7 @@ extern "C" {
53
53
  #define SDL_PREALLOC 0x00000001 /**< Surface uses preallocated memory */
54
54
  #define SDL_RLEACCEL 0x00000002 /**< Surface is RLE encoded */
55
55
  #define SDL_DONTFREE 0x00000004 /**< Surface is referenced internally */
56
+ #define SDL_SIMD_ALIGNED 0x00000008 /**< Surface uses aligned memory */
56
57
  /* @} *//* Surface flags */
57
58
 
58
59
  /**
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  Simple DirectMedia Layer
3
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
3
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
4
4
 
5
5
  This software is provided 'as-is', without any express or implied
6
6
  warranty. In no event will the authors be held liable for any damages
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  Simple DirectMedia Layer
3
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
3
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
4
4
 
5
5
  This software is provided 'as-is', without any express or implied
6
6
  warranty. In no event will the authors be held liable for any damages
@@ -34,16 +34,16 @@
34
34
  #include "SDL_version.h"
35
35
 
36
36
  /**
37
- * \file SDL_syswm.h
37
+ * \brief SDL_syswm.h
38
38
  *
39
39
  * Your application has access to a special type of event ::SDL_SYSWMEVENT,
40
40
  * which contains window-manager specific information and arrives whenever
41
41
  * an unhandled window event occurs. This event is ignored by default, but
42
42
  * you can enable it with SDL_EventState().
43
43
  */
44
- #ifdef SDL_PROTOTYPES_ONLY
45
44
  struct SDL_SysWMinfo;
46
- #else
45
+
46
+ #if !defined(SDL_PROTOTYPES_ONLY)
47
47
 
48
48
  #if defined(SDL_VIDEO_DRIVER_WINDOWS)
49
49
  #ifndef WIN32_LEAN_AND_MEAN
@@ -103,6 +103,8 @@ typedef void *EGLSurface;
103
103
  #if defined(SDL_VIDEO_DRIVER_VIVANTE)
104
104
  #include "SDL_egl.h"
105
105
  #endif
106
+ #endif /* SDL_PROTOTYPES_ONLY */
107
+
106
108
 
107
109
  #include "begin_code.h"
108
110
  /* Set up for C function definitions, even when using C++ */
@@ -110,6 +112,7 @@ typedef void *EGLSurface;
110
112
  extern "C" {
111
113
  #endif
112
114
 
115
+ #if !defined(SDL_PROTOTYPES_ONLY)
113
116
  /**
114
117
  * These are the various supported windowing subsystems
115
118
  */
@@ -122,7 +125,7 @@ typedef enum
122
125
  SDL_SYSWM_COCOA,
123
126
  SDL_SYSWM_UIKIT,
124
127
  SDL_SYSWM_WAYLAND,
125
- SDL_SYSWM_MIR,
128
+ SDL_SYSWM_MIR, /* no longer available, left for API/ABI compatibility. Remove in 2.1! */
126
129
  SDL_SYSWM_WINRT,
127
130
  SDL_SYSWM_ANDROID,
128
131
  SDL_SYSWM_VIVANTE,
@@ -257,11 +260,11 @@ struct SDL_SysWMinfo
257
260
  struct wl_shell_surface *shell_surface; /**< Wayland shell_surface (window manager handle) */
258
261
  } wl;
259
262
  #endif
260
- #if defined(SDL_VIDEO_DRIVER_MIR)
263
+ #if defined(SDL_VIDEO_DRIVER_MIR) /* no longer available, left for API/ABI compatibility. Remove in 2.1! */
261
264
  struct
262
265
  {
263
- struct MirConnection *connection; /**< Mir display server connection */
264
- struct MirSurface *surface; /**< Mir surface */
266
+ void *connection; /**< Mir display server connection */
267
+ void *surface; /**< Mir surface */
265
268
  } mir;
266
269
  #endif
267
270
 
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  Simple DirectMedia Layer
3
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
3
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
4
4
 
5
5
  This software is provided 'as-is', without any express or implied
6
6
  warranty. In no event will the authors be held liable for any damages
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  Simple DirectMedia Layer
3
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
3
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
4
4
 
5
5
  This software is provided 'as-is', without any express or implied
6
6
  warranty. In no event will the authors be held liable for any damages
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  Simple DirectMedia Layer
3
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
3
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
4
4
 
5
5
  This software is provided 'as-is', without any express or implied
6
6
  warranty. In no event will the authors be held liable for any damages
@@ -140,14 +140,20 @@ SDLTest_CommonState *SDLTest_CommonCreateState(char **argv, Uint32 flags);
140
140
  */
141
141
  int SDLTest_CommonArg(SDLTest_CommonState * state, int index);
142
142
 
143
+
143
144
  /**
144
- * \brief Returns common usage information
145
+ * \brief Logs command line usage info.
145
146
  *
146
- * \param state The common state describing the test window to create.
147
+ * This logs the appropriate command line options for the subsystems in use
148
+ * plus other common options, and then any application-specific options.
149
+ * This uses the SDL_Log() function and splits up output to be friendly to
150
+ * 80-character-wide terminals.
147
151
  *
148
- * \returns String with usage information
152
+ * \param state The common state describing the test window for the app.
153
+ * \param argv0 argv[0], as passed to main/SDL_main.
154
+ * \param options an array of strings for application specific options. The last element of the array should be NULL.
149
155
  */
150
- const char *SDLTest_CommonUsage(SDLTest_CommonState * state);
156
+ void SDLTest_CommonLogUsage(SDLTest_CommonState * state, const char *argv0, const char **options);
151
157
 
152
158
  /**
153
159
  * \brief Open test window.
@@ -158,6 +164,17 @@ const char *SDLTest_CommonUsage(SDLTest_CommonState * state);
158
164
  */
159
165
  SDL_bool SDLTest_CommonInit(SDLTest_CommonState * state);
160
166
 
167
+ /**
168
+ * \brief Easy argument handling when test app doesn't need any custom args.
169
+ *
170
+ * \param state The common state describing the test window to create.
171
+ * \param argc argc, as supplied to SDL_main
172
+ * \param argv argv, as supplied to SDL_main
173
+ *
174
+ * \returns False if app should quit, true otherwise.
175
+ */
176
+ SDL_bool SDLTest_CommonDefaultArgs(SDLTest_CommonState * state, const int argc, char **argv);
177
+
161
178
  /**
162
179
  * \brief Common event handler for test windows.
163
180
  *
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  Simple DirectMedia Layer
3
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
3
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
4
4
 
5
5
  This software is provided 'as-is', without any express or implied
6
6
  warranty. In no event will the authors be held liable for any damages
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  Simple DirectMedia Layer
3
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
3
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
4
4
 
5
5
  This software is provided 'as-is', without any express or implied
6
6
  warranty. In no event will the authors be held liable for any damages
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  Simple DirectMedia Layer
3
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
3
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
4
4
 
5
5
  This software is provided 'as-is', without any express or implied
6
6
  warranty. In no event will the authors be held liable for any damages
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  Simple DirectMedia Layer
3
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
3
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
4
4
 
5
5
  This software is provided 'as-is', without any express or implied
6
6
  warranty. In no event will the authors be held liable for any damages
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  Simple DirectMedia Layer
3
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
3
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
4
4
 
5
5
  This software is provided 'as-is', without any express or implied
6
6
  warranty. In no event will the authors be held liable for any damages
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  Simple DirectMedia Layer
3
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
3
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
4
4
 
5
5
  This software is provided 'as-is', without any express or implied
6
6
  warranty. In no event will the authors be held liable for any damages
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  Simple DirectMedia Layer
3
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
3
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
4
4
 
5
5
  This software is provided 'as-is', without any express or implied
6
6
  warranty. In no event will the authors be held liable for any damages
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  Simple DirectMedia Layer
3
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
3
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
4
4
 
5
5
  This software is provided 'as-is', without any express or implied
6
6
  warranty. In no event will the authors be held liable for any damages
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  Simple DirectMedia Layer
3
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
3
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
4
4
 
5
5
  This software is provided 'as-is', without any express or implied
6
6
  warranty. In no event will the authors be held liable for any damages
@@ -42,14 +42,14 @@ extern "C" {
42
42
  *
43
43
  * \note This should be called before any other SDL functions for complete tracking coverage
44
44
  */
45
- int SDLTest_TrackAllocations();
45
+ int SDLTest_TrackAllocations(void);
46
46
 
47
47
  /**
48
48
  * \brief Print a log of any outstanding allocations
49
49
  *
50
50
  * \note This can be called after SDL_Quit()
51
51
  */
52
- void SDLTest_LogAllocations();
52
+ void SDLTest_LogAllocations(void);
53
53
 
54
54
 
55
55
  /* Ends C function definitions when using C++ */
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  Simple DirectMedia Layer
3
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
3
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
4
4
 
5
5
  This software is provided 'as-is', without any express or implied
6
6
  warranty. In no event will the authors be held liable for any damages
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  Simple DirectMedia Layer
3
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
3
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
4
4
 
5
5
  This software is provided 'as-is', without any express or implied
6
6
  warranty. In no event will the authors be held liable for any damages
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  Simple DirectMedia Layer
3
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
3
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
4
4
 
5
5
  This software is provided 'as-is', without any express or implied
6
6
  warranty. In no event will the authors be held liable for any damages
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  Simple DirectMedia Layer
3
- Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
3
+ Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
4
4
 
5
5
  This software is provided 'as-is', without any express or implied
6
6
  warranty. In no event will the authors be held liable for any damages
@@ -41,6 +41,14 @@ extern "C" {
41
41
  typedef Sint64 SDL_TouchID;
42
42
  typedef Sint64 SDL_FingerID;
43
43
 
44
+ typedef enum
45
+ {
46
+ SDL_TOUCH_DEVICE_INVALID = -1,
47
+ SDL_TOUCH_DEVICE_DIRECT, /* touch screen with window-relative coordinates */
48
+ SDL_TOUCH_DEVICE_INDIRECT_ABSOLUTE, /* trackpad with absolute device coordinates */
49
+ SDL_TOUCH_DEVICE_INDIRECT_RELATIVE /* trackpad with screen cursor-relative coordinates */
50
+ } SDL_TouchDeviceType;
51
+
44
52
  typedef struct SDL_Finger
45
53
  {
46
54
  SDL_FingerID id;
@@ -52,6 +60,9 @@ typedef struct SDL_Finger
52
60
  /* Used as the device ID for mouse events simulated with touch input */
53
61
  #define SDL_TOUCH_MOUSEID ((Uint32)-1)
54
62
 
63
+ /* Used as the SDL_TouchID for touch events simulated with mouse input */
64
+ #define SDL_MOUSE_TOUCHID ((Sint64)-1)
65
+
55
66
 
56
67
  /* Function prototypes */
57
68
 
@@ -65,6 +76,11 @@ extern DECLSPEC int SDLCALL SDL_GetNumTouchDevices(void);
65
76
  */
66
77
  extern DECLSPEC SDL_TouchID SDLCALL SDL_GetTouchDevice(int index);
67
78
 
79
+ /**
80
+ * \brief Get the type of the given touch device.
81
+ */
82
+ extern DECLSPEC SDL_TouchDeviceType SDLCALL SDL_GetTouchDeviceType(SDL_TouchID touchID);
83
+
68
84
  /**
69
85
  * \brief Get the number of active fingers for a given touch device.
70
86
  */