ruby2d 0.9.0 → 0.9.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/assets/README.md +8 -8
- data/assets/Rakefile +85 -0
- data/assets/include/SDL2/SDL.h +1 -1
- data/assets/include/SDL2/SDL_assert.h +1 -1
- data/assets/include/SDL2/SDL_atomic.h +20 -2
- data/assets/include/SDL2/SDL_audio.h +47 -14
- data/assets/include/SDL2/SDL_bits.h +10 -1
- data/assets/include/SDL2/SDL_blendmode.h +7 -7
- data/assets/include/SDL2/SDL_clipboard.h +1 -1
- data/assets/include/SDL2/SDL_config.h +24 -390
- data/assets/include/SDL2/SDL_config_android.h +178 -0
- data/assets/include/SDL2/SDL_config_iphoneos.h +201 -0
- data/assets/include/SDL2/SDL_config_macosx.h +240 -0
- data/assets/include/SDL2/SDL_config_minimal.h +85 -0
- data/assets/include/SDL2/SDL_config_os2.h +170 -0
- data/assets/include/SDL2/SDL_config_pandora.h +133 -0
- data/assets/include/SDL2/SDL_config_psp.h +164 -0
- data/assets/include/SDL2/SDL_config_windows.h +257 -0
- data/assets/include/SDL2/SDL_config_winrt.h +240 -0
- data/assets/include/SDL2/SDL_config_wiz.h +146 -0
- data/assets/include/SDL2/SDL_copying.h +20 -0
- data/assets/include/SDL2/SDL_cpuinfo.h +90 -8
- data/assets/include/SDL2/SDL_egl.h +1 -1
- data/assets/include/SDL2/SDL_endian.h +1 -1
- data/assets/include/SDL2/SDL_error.h +1 -1
- data/assets/include/SDL2/SDL_events.h +4 -1
- data/assets/include/SDL2/SDL_filesystem.h +1 -1
- data/assets/include/SDL2/SDL_gamecontroller.h +1 -1
- data/assets/include/SDL2/SDL_gesture.h +1 -1
- data/assets/include/SDL2/SDL_haptic.h +1 -1
- data/assets/include/SDL2/SDL_hints.h +145 -14
- data/assets/include/SDL2/SDL_image.h +2 -2
- data/assets/include/SDL2/SDL_joystick.h +1 -1
- data/assets/include/SDL2/SDL_keyboard.h +1 -1
- data/assets/include/SDL2/SDL_keycode.h +1 -1
- data/assets/include/SDL2/SDL_loadso.h +1 -1
- data/assets/include/SDL2/SDL_log.h +1 -1
- data/assets/include/SDL2/SDL_main.h +28 -16
- data/assets/include/SDL2/SDL_messagebox.h +1 -1
- data/assets/include/SDL2/SDL_mouse.h +1 -1
- data/assets/include/SDL2/SDL_mutex.h +1 -1
- data/assets/include/SDL2/SDL_name.h +1 -1
- data/assets/include/SDL2/SDL_opengl.h +1 -1
- data/assets/include/SDL2/SDL_opengles.h +1 -1
- data/assets/include/SDL2/SDL_opengles2.h +1 -1
- data/assets/include/SDL2/SDL_pixels.h +3 -3
- data/assets/include/SDL2/SDL_platform.h +1 -1
- data/assets/include/SDL2/SDL_power.h +1 -1
- data/assets/include/SDL2/SDL_quit.h +1 -1
- data/assets/include/SDL2/SDL_rect.h +29 -3
- data/assets/include/SDL2/SDL_render.h +168 -1
- data/assets/include/SDL2/SDL_revision.h +2 -2
- data/assets/include/SDL2/SDL_rwops.h +50 -13
- data/assets/include/SDL2/SDL_scancode.h +2 -2
- data/assets/include/SDL2/SDL_sensor.h +4 -4
- data/assets/include/SDL2/SDL_shape.h +1 -1
- data/assets/include/SDL2/SDL_stdinc.h +1 -1
- data/assets/include/SDL2/SDL_surface.h +2 -1
- data/assets/include/SDL2/SDL_system.h +1 -1
- data/assets/include/SDL2/SDL_syswm.h +11 -8
- data/assets/include/SDL2/SDL_test.h +1 -1
- data/assets/include/SDL2/SDL_test_assert.h +1 -1
- data/assets/include/SDL2/SDL_test_common.h +22 -5
- data/assets/include/SDL2/SDL_test_compare.h +1 -1
- data/assets/include/SDL2/SDL_test_crc32.h +1 -1
- data/assets/include/SDL2/SDL_test_font.h +1 -1
- data/assets/include/SDL2/SDL_test_fuzzer.h +1 -1
- data/assets/include/SDL2/SDL_test_harness.h +1 -1
- data/assets/include/SDL2/SDL_test_images.h +1 -1
- data/assets/include/SDL2/SDL_test_log.h +1 -1
- data/assets/include/SDL2/SDL_test_md5.h +1 -1
- data/assets/include/SDL2/SDL_test_memory.h +3 -3
- data/assets/include/SDL2/SDL_test_random.h +1 -1
- data/assets/include/SDL2/SDL_thread.h +1 -1
- data/assets/include/SDL2/SDL_timer.h +1 -1
- data/assets/include/SDL2/SDL_touch.h +17 -1
- data/assets/include/SDL2/SDL_types.h +1 -1
- data/assets/include/SDL2/SDL_version.h +2 -2
- data/assets/include/SDL2/SDL_video.h +1 -1
- data/assets/include/SDL2/SDL_vulkan.h +3 -3
- data/assets/include/SDL2/begin_code.h +4 -1
- data/assets/include/SDL2/close_code.h +4 -1
- data/assets/macos/lib/libFLAC.a +0 -0
- data/assets/macos/lib/libSDL2.a +0 -0
- data/assets/macos/lib/libSDL2_image.a +0 -0
- data/assets/macos/lib/libSDL2_mixer.a +0 -0
- data/assets/macos/lib/libSDL2_ttf.a +0 -0
- data/assets/macos/lib/libfreetype.a +0 -0
- data/assets/macos/lib/libjpeg.a +0 -0
- data/assets/macos/lib/libmpg123.a +0 -0
- data/assets/macos/lib/libogg.a +0 -0
- data/assets/macos/lib/libpng16.a +0 -0
- data/assets/macos/lib/libtiff.a +0 -0
- data/assets/macos/lib/libwebp.a +0 -0
- data/assets/mingw/bin/SDL2.dll +0 -0
- data/assets/mingw/bin/SDL2_image.dll +0 -0
- data/assets/mingw/bin/libpng16-16.dll +0 -0
- data/assets/mingw/bin/libtiff-5.dll +0 -0
- data/assets/mingw/bin/libwebp-7.dll +0 -0
- data/assets/mingw/lib/libSDL2.a +0 -0
- data/assets/mingw/lib/libSDL2.dll.a +0 -0
- data/assets/mingw/lib/libSDL2_image.a +0 -0
- data/assets/mingw/lib/libSDL2_image.dll.a +0 -0
- data/assets/mingw/lib/libSDL2_test.a +0 -0
- data/assets/mingw/lib/libSDL2main.a +0 -0
- data/bin/ruby2d +2 -1
- data/ext/ruby2d/common.c +185 -0
- data/ext/ruby2d/controllers.c +110 -0
- data/ext/ruby2d/extconf.rb +97 -46
- data/ext/ruby2d/gl.c +430 -0
- data/ext/ruby2d/gl2.c +146 -0
- data/ext/ruby2d/gl3.c +348 -0
- data/ext/ruby2d/gles.c +308 -0
- data/ext/ruby2d/image.c +138 -0
- data/ext/ruby2d/input.c +48 -0
- data/ext/ruby2d/music.c +114 -0
- data/ext/ruby2d/ruby2d.c +125 -126
- data/{assets/include/simple2d.h → ext/ruby2d/ruby2d.h} +223 -201
- data/ext/ruby2d/shapes.c +154 -0
- data/ext/ruby2d/sound.c +93 -0
- data/ext/ruby2d/sprite.c +147 -0
- data/ext/ruby2d/text.c +129 -0
- data/ext/ruby2d/window.c +414 -0
- data/lib/ruby2d.rb +1 -1
- data/lib/ruby2d/cli/build.rb +3 -8
- data/lib/ruby2d/cli/colorize.rb +10 -0
- data/lib/ruby2d/version.rb +1 -1
- metadata +34 -10
- data/assets/macos/lib/libsimple2d.a +0 -0
- data/assets/mingw/lib/libsimple2d.a +0 -0
- data/lib/ruby2d/colorize.rb +0 -10
@@ -1,2 +1,2 @@
|
|
1
|
-
#define SDL_REVISION "hg-
|
2
|
-
#define SDL_REVISION_NUMBER
|
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-
|
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
|
-
*
|
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
|
-
*
|
187
|
+
* \return the final offset in the data stream, or -1 on error.
|
182
188
|
*/
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
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
|
-
*
|
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
|
-
|
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-
|
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
|
-
*
|
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-
|
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
|
30
|
-
#define
|
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 /*
|
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-
|
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-
|
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-
|
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-
|
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-
|
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
|
-
* \
|
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
|
-
|
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
|
-
|
264
|
-
|
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-
|
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-
|
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-
|
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
|
145
|
+
* \brief Logs command line usage info.
|
145
146
|
*
|
146
|
-
*
|
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
|
-
* \
|
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 *
|
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-
|
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-
|
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-
|
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-
|
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-
|
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-
|
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-
|
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-
|
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-
|
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-
|
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-
|
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-
|
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-
|
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
|
*/
|