gosu 1.5.0 → 2.0.0.pre6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/dependencies/SDL/include/SDL.h +233 -0
- data/dependencies/SDL/include/SDL_assert.h +320 -0
- data/dependencies/SDL/include/SDL_atomic.h +414 -0
- data/dependencies/SDL/include/SDL_audio.h +1500 -0
- data/dependencies/SDL/include/{SDL3/SDL_bits.h → SDL_bits.h} +27 -47
- data/dependencies/SDL/include/{SDL3/SDL_blendmode.h → SDL_blendmode.h} +55 -59
- data/dependencies/SDL/include/SDL_clipboard.h +141 -0
- data/dependencies/SDL/include/SDL_config.h +331 -0
- data/dependencies/SDL/include/SDL_cpuinfo.h +594 -0
- data/dependencies/SDL/include/{SDL3/SDL_egl.h → SDL_egl.h} +8 -11
- data/dependencies/SDL/include/SDL_endian.h +348 -0
- data/dependencies/SDL/include/SDL_error.h +163 -0
- data/dependencies/SDL/include/SDL_events.h +1166 -0
- data/dependencies/SDL/include/SDL_filesystem.h +149 -0
- data/dependencies/SDL/include/SDL_gamecontroller.h +1074 -0
- data/dependencies/SDL/include/SDL_gesture.h +117 -0
- data/dependencies/SDL/include/SDL_guid.h +100 -0
- data/dependencies/SDL/include/SDL_haptic.h +1341 -0
- data/dependencies/SDL/include/SDL_hidapi.h +451 -0
- data/dependencies/SDL/include/SDL_hints.h +2613 -0
- data/dependencies/SDL/include/SDL_joystick.h +1069 -0
- data/dependencies/SDL/include/SDL_keyboard.h +353 -0
- data/dependencies/SDL/include/SDL_keycode.h +358 -0
- data/dependencies/SDL/include/SDL_loadso.h +115 -0
- data/dependencies/SDL/include/{SDL3/SDL_locale.h → SDL_locale.h} +24 -40
- data/dependencies/SDL/include/SDL_log.h +404 -0
- data/dependencies/SDL/include/SDL_main.h +282 -0
- data/dependencies/SDL/include/{SDL3/SDL_messagebox.h → SDL_messagebox.h} +48 -85
- data/dependencies/SDL/include/{SDL3/SDL_metal.h → SDL_metal.h} +29 -29
- data/dependencies/SDL/include/{SDL3/SDL_misc.h → SDL_misc.h} +12 -13
- data/dependencies/SDL/include/SDL_mouse.h +464 -0
- data/dependencies/SDL/include/SDL_mutex.h +545 -0
- data/dependencies/SDL/include/SDL_name.h +33 -0
- data/dependencies/SDL/include/{SDL3/SDL_opengl.h → SDL_opengl.h} +252 -1221
- data/dependencies/SDL/include/{SDL3/SDL_opengles.h → SDL_opengles.h} +7 -6
- data/dependencies/SDL/include/{SDL3/SDL_opengles2.h → SDL_opengles2.h} +11 -10
- data/dependencies/SDL/include/SDL_pixels.h +644 -0
- data/dependencies/SDL/include/SDL_platform.h +261 -0
- data/dependencies/SDL/include/{SDL3/SDL_power.h → SDL_power.h} +19 -40
- data/dependencies/SDL/include/SDL_quit.h +58 -0
- data/dependencies/SDL/include/SDL_rect.h +376 -0
- data/dependencies/SDL/include/SDL_render.h +1924 -0
- data/dependencies/SDL/include/SDL_revision.h +7 -0
- data/dependencies/SDL/include/SDL_rwops.h +841 -0
- data/dependencies/SDL/include/{SDL3/SDL_scancode.h → SDL_scancode.h} +68 -60
- data/dependencies/SDL/include/SDL_sensor.h +322 -0
- data/dependencies/SDL/include/SDL_shape.h +155 -0
- data/dependencies/SDL/include/SDL_stdinc.h +838 -0
- data/dependencies/SDL/include/SDL_surface.h +997 -0
- data/dependencies/SDL/include/SDL_system.h +623 -0
- data/dependencies/SDL/include/SDL_syswm.h +386 -0
- data/dependencies/SDL/include/{SDL3/SDL_test.h → SDL_test.h} +22 -16
- data/dependencies/SDL/include/{SDL3/SDL_test_assert.h → SDL_test_assert.h} +34 -27
- data/dependencies/SDL/include/{SDL3/SDL_test_common.h → SDL_test_common.h} +52 -109
- data/dependencies/SDL/include/{SDL3/SDL_test_compare.h → SDL_test_compare.h} +14 -22
- data/dependencies/SDL/include/{SDL3/SDL_test_crc32.h → SDL_test_crc32.h} +30 -27
- data/dependencies/SDL/include/{SDL3/SDL_test_font.h → SDL_test_font.h} +49 -50
- data/dependencies/SDL/include/{SDL3/SDL_test_fuzzer.h → SDL_test_fuzzer.h} +79 -64
- data/dependencies/SDL/include/{SDL3/SDL_test_harness.h → SDL_test_harness.h} +30 -47
- data/dependencies/SDL/include/SDL_test_images.h +78 -0
- data/dependencies/SDL/include/{SDL3/SDL_platform.h → SDL_test_log.h} +26 -25
- data/dependencies/SDL/include/{SDL3/SDL_test_md5.h → SDL_test_md5.h} +28 -21
- data/dependencies/SDL/include/{SDL3/SDL_test_memory.h → SDL_test_memory.h} +16 -19
- data/dependencies/SDL/include/SDL_test_random.h +115 -0
- data/dependencies/SDL/include/SDL_thread.h +464 -0
- data/dependencies/SDL/include/SDL_timer.h +222 -0
- data/dependencies/SDL/include/SDL_touch.h +150 -0
- data/dependencies/SDL/include/{SDL3/SDL_copying.h → SDL_types.h} +9 -2
- data/dependencies/SDL/include/SDL_version.h +204 -0
- data/dependencies/SDL/include/SDL_video.h +2178 -0
- data/dependencies/SDL/include/SDL_vulkan.h +215 -0
- data/dependencies/SDL/include/begin_code.h +187 -0
- data/dependencies/SDL/include/{SDL3/SDL_close_code.h → close_code.h} +6 -7
- data/dependencies/SDL/lib/x64/libSDL2.dll.a +0 -0
- data/dependencies/SDL/lib/x86/libSDL2.dll.a +0 -0
- data/dependencies/SDL_sound/SDL_sound.c +215 -136
- data/dependencies/SDL_sound/SDL_sound.h +725 -0
- data/dependencies/SDL_sound/SDL_sound_aiff.c +54 -55
- data/dependencies/SDL_sound/SDL_sound_au.c +32 -32
- data/dependencies/SDL_sound/SDL_sound_coreaudio.c +41 -24
- data/dependencies/SDL_sound/SDL_sound_flac.c +12 -32
- data/dependencies/SDL_sound/SDL_sound_internal.h +48 -33
- data/dependencies/SDL_sound/SDL_sound_modplug.c +29 -21
- data/dependencies/SDL_sound/SDL_sound_mp3.c +13 -35
- data/dependencies/SDL_sound/SDL_sound_raw.c +15 -14
- data/dependencies/SDL_sound/SDL_sound_shn.c +82 -82
- data/dependencies/SDL_sound/SDL_sound_voc.c +30 -30
- data/dependencies/SDL_sound/SDL_sound_vorbis.c +25 -34
- data/dependencies/SDL_sound/SDL_sound_wav.c +82 -86
- data/dependencies/SDL_sound/dr_flac.h +1281 -1845
- data/dependencies/SDL_sound/dr_mp3.h +617 -1035
- data/dependencies/SDL_sound/libmodplug/fastmix.c +1 -1
- data/dependencies/SDL_sound/libmodplug/libmodplug.h +4 -5
- data/dependencies/SDL_sound/libmodplug/load_ams.c +3 -6
- data/dependencies/SDL_sound/libmodplug/load_dsm.c +1 -2
- data/dependencies/SDL_sound/libmodplug/load_mt2.c +2 -2
- data/dependencies/SDL_sound/libmodplug/modplug.h +1 -2
- data/dependencies/SDL_sound/libmodplug/snd_fx.c +3 -3
- data/dependencies/SDL_sound/libmodplug/sndfile.c +0 -3
- data/dependencies/SDL_sound/libmodplug/sndmix.c +3 -7
- data/dependencies/SDL_sound/stb_vorbis.h +343 -397
- data/dependencies/mojoAL/AL/alc.h +2 -2
- data/dependencies/mojoAL/mojoal.c +1878 -2113
- data/dependencies/stb/stb_image.h +1381 -1192
- data/dependencies/stb/stb_image_write.h +129 -329
- data/dependencies/stb/stb_truetype.h +60 -304
- data/dependencies/utf8proc/utf8proc.c +75 -133
- data/dependencies/utf8proc/utf8proc.h +50 -131
- data/dependencies/utf8proc/utf8proc_data.h +15658 -16213
- data/ext/gosu-ffi/extconf.rb +28 -11
- data/ext/gosu-ffi/gosu-ffi.def +0 -3
- data/ffi/Gosu.cpp +29 -52
- data/ffi/Gosu.h +4 -4
- data/ffi/Gosu_Color.cpp +36 -80
- data/ffi/Gosu_FFI_internal.h +13 -12
- data/ffi/Gosu_Font.cpp +11 -16
- data/ffi/Gosu_Font.h +4 -4
- data/ffi/Gosu_Image.cpp +36 -69
- data/ffi/Gosu_Image.h +5 -16
- data/include/Gosu/Bitmap.hpp +1 -1
- data/include/Gosu/Color.hpp +4 -5
- data/include/Gosu/Graphics.hpp +0 -2
- data/include/Gosu/Image.hpp +1 -1
- data/include/Gosu/Math.hpp +5 -5
- data/include/Gosu/Utility.hpp +1 -27
- data/include/Gosu/Version.hpp +2 -2
- data/lib/SDL2.dll +0 -0
- data/lib/gosu/channel.rb +0 -1
- data/lib/gosu/color.rb +13 -36
- data/lib/gosu/compat.rb +14 -106
- data/lib/gosu/constants.rb +24 -24
- data/lib/gosu/ffi.rb +13 -24
- data/lib/gosu/font.rb +13 -19
- data/lib/gosu/gosu.rb +61 -101
- data/lib/gosu/image.rb +34 -72
- data/lib/gosu/sample.rb +0 -1
- data/lib/gosu/song.rb +0 -1
- data/lib/gosu/text_input.rb +1 -15
- data/lib/gosu/window.rb +10 -31
- data/lib64/SDL2.dll +0 -0
- data/rdoc/gosu.rb +0 -2
- data/src/Audio.cpp +16 -22
- data/src/AudioFileSDLSound.cpp +5 -5
- data/src/BinPacker.cpp +4 -5
- data/src/Bitmap.cpp +9 -16
- data/src/Buffer.cpp +14 -5
- data/src/ClipRectStack.hpp +83 -17
- data/src/Directories.cpp +1 -1
- data/src/DrawOp.hpp +17 -14
- data/src/DrawOpQueue.hpp +31 -25
- data/src/Font.cpp +1 -1
- data/src/GosuGLView.cpp +7 -1
- data/src/Graphics.cpp +25 -32
- data/src/GraphicsImpl.hpp +24 -0
- data/src/Image.cpp +2 -2
- data/src/Input.cpp +70 -66
- data/src/Macro.cpp +26 -43
- data/src/Macro.hpp +16 -22
- data/src/Math.cpp +7 -20
- data/src/OffScreenTarget.cpp +10 -3
- data/src/OpenGLContext.cpp +8 -7
- data/src/OpenGLContext.hpp +2 -2
- data/src/RenderState.hpp +54 -30
- data/src/Resolution.cpp +38 -48
- data/src/TexChunk.cpp +2 -2
- data/src/TextInput.cpp +9 -9
- data/src/Texture.cpp +1 -1
- data/src/TiledDrawable.cpp +7 -6
- data/src/TrueTypeFontUnix.cpp +9 -12
- data/src/Utility.cpp +26 -39
- data/src/UtilityWin.cpp +2 -6
- data/src/Window.cpp +34 -54
- metadata +93 -99
- data/dependencies/SDL/include/SDL3/SDL.h +0 -91
- data/dependencies/SDL/include/SDL3/SDL_assert.h +0 -710
- data/dependencies/SDL/include/SDL3/SDL_asyncio.h +0 -550
- data/dependencies/SDL/include/SDL3/SDL_atomic.h +0 -692
- data/dependencies/SDL/include/SDL3/SDL_audio.h +0 -2382
- data/dependencies/SDL/include/SDL3/SDL_begin_code.h +0 -553
- data/dependencies/SDL/include/SDL3/SDL_camera.h +0 -535
- data/dependencies/SDL/include/SDL3/SDL_clipboard.h +0 -331
- data/dependencies/SDL/include/SDL3/SDL_cpuinfo.h +0 -374
- data/dependencies/SDL/include/SDL3/SDL_dialog.h +0 -343
- data/dependencies/SDL/include/SDL3/SDL_dlopennote.h +0 -234
- data/dependencies/SDL/include/SDL3/SDL_endian.h +0 -645
- data/dependencies/SDL/include/SDL3/SDL_error.h +0 -226
- data/dependencies/SDL/include/SDL3/SDL_events.h +0 -1651
- data/dependencies/SDL/include/SDL3/SDL_filesystem.h +0 -537
- data/dependencies/SDL/include/SDL3/SDL_gamepad.h +0 -1657
- data/dependencies/SDL/include/SDL3/SDL_gpu.h +0 -4637
- data/dependencies/SDL/include/SDL3/SDL_guid.h +0 -106
- data/dependencies/SDL/include/SDL3/SDL_haptic.h +0 -1461
- data/dependencies/SDL/include/SDL3/SDL_hidapi.h +0 -571
- data/dependencies/SDL/include/SDL3/SDL_hints.h +0 -5041
- data/dependencies/SDL/include/SDL3/SDL_init.h +0 -508
- data/dependencies/SDL/include/SDL3/SDL_intrin.h +0 -410
- data/dependencies/SDL/include/SDL3/SDL_iostream.h +0 -1379
- data/dependencies/SDL/include/SDL3/SDL_joystick.h +0 -1385
- data/dependencies/SDL/include/SDL3/SDL_keyboard.h +0 -615
- data/dependencies/SDL/include/SDL3/SDL_keycode.h +0 -348
- data/dependencies/SDL/include/SDL3/SDL_loadso.h +0 -145
- data/dependencies/SDL/include/SDL3/SDL_log.h +0 -541
- data/dependencies/SDL/include/SDL3/SDL_main.h +0 -704
- data/dependencies/SDL/include/SDL3/SDL_main_impl.h +0 -149
- data/dependencies/SDL/include/SDL3/SDL_mouse.h +0 -813
- data/dependencies/SDL/include/SDL3/SDL_mutex.h +0 -1117
- data/dependencies/SDL/include/SDL3/SDL_oldnames.h +0 -1339
- data/dependencies/SDL/include/SDL3/SDL_pen.h +0 -198
- data/dependencies/SDL/include/SDL3/SDL_pixels.h +0 -1441
- data/dependencies/SDL/include/SDL3/SDL_platform_defines.h +0 -497
- data/dependencies/SDL/include/SDL3/SDL_process.h +0 -441
- data/dependencies/SDL/include/SDL3/SDL_properties.h +0 -572
- data/dependencies/SDL/include/SDL3/SDL_rect.h +0 -528
- data/dependencies/SDL/include/SDL3/SDL_render.h +0 -3034
- data/dependencies/SDL/include/SDL3/SDL_revision.h +0 -56
- data/dependencies/SDL/include/SDL3/SDL_sensor.h +0 -321
- data/dependencies/SDL/include/SDL3/SDL_stdinc.h +0 -6186
- data/dependencies/SDL/include/SDL3/SDL_storage.h +0 -686
- data/dependencies/SDL/include/SDL3/SDL_surface.h +0 -1769
- data/dependencies/SDL/include/SDL3/SDL_system.h +0 -840
- data/dependencies/SDL/include/SDL3/SDL_test_log.h +0 -83
- data/dependencies/SDL/include/SDL3/SDL_thread.h +0 -602
- data/dependencies/SDL/include/SDL3/SDL_time.h +0 -249
- data/dependencies/SDL/include/SDL3/SDL_timer.h +0 -454
- data/dependencies/SDL/include/SDL3/SDL_touch.h +0 -184
- data/dependencies/SDL/include/SDL3/SDL_tray.h +0 -544
- data/dependencies/SDL/include/SDL3/SDL_version.h +0 -198
- data/dependencies/SDL/include/SDL3/SDL_video.h +0 -3497
- data/dependencies/SDL/include/SDL3/SDL_vulkan.h +0 -287
- data/dependencies/SDL/lib/x64/libSDL3.dll.a +0 -0
- data/dependencies/SDL/lib/x86/libSDL3.dll.a +0 -0
- data/dependencies/SDL_sound/SDL3_sound/SDL_sound.h +0 -755
- data/lib/SDL3.dll +0 -0
- data/lib64/SDL3.dll +0 -0
- data/src/ClipRectStack.cpp +0 -38
- /data/dependencies/SDL/include/{SDL3/SDL_opengl_glext.h → SDL_opengl_glext.h} +0 -0
- /data/dependencies/SDL/include/{SDL3/SDL_opengles2_gl2.h → SDL_opengles2_gl2.h} +0 -0
- /data/dependencies/SDL/include/{SDL3/SDL_opengles2_gl2ext.h → SDL_opengles2_gl2ext.h} +0 -0
- /data/dependencies/SDL/include/{SDL3/SDL_opengles2_gl2platform.h → SDL_opengles2_gl2platform.h} +0 -0
- /data/dependencies/SDL/include/{SDL3/SDL_opengles2_khrplatform.h → SDL_opengles2_khrplatform.h} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*
|
|
2
2
|
Simple DirectMedia Layer
|
|
3
|
-
Copyright (C) 1997-
|
|
3
|
+
Copyright (C) 1997-2023 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
|
|
@@ -19,20 +19,18 @@
|
|
|
19
19
|
3. This notice may not be removed or altered from any source distribution.
|
|
20
20
|
*/
|
|
21
21
|
|
|
22
|
-
|
|
23
|
-
*
|
|
22
|
+
/**
|
|
23
|
+
* \file SDL_test_font.h
|
|
24
|
+
*
|
|
25
|
+
* Include file for SDL test framework.
|
|
24
26
|
*
|
|
25
|
-
* This code is a part of the
|
|
27
|
+
* This code is a part of the SDL2_test library, not the main SDL library.
|
|
26
28
|
*/
|
|
27
29
|
|
|
28
30
|
#ifndef SDL_test_font_h_
|
|
29
31
|
#define SDL_test_font_h_
|
|
30
32
|
|
|
31
|
-
#include
|
|
32
|
-
#include <SDL3/SDL_rect.h>
|
|
33
|
-
#include <SDL3/SDL_render.h>
|
|
34
|
-
|
|
35
|
-
#include <SDL3/SDL_begin_code.h>
|
|
33
|
+
#include "begin_code.h"
|
|
36
34
|
/* Set up for C function definitions, even when using C++ */
|
|
37
35
|
#ifdef __cplusplus
|
|
38
36
|
extern "C" {
|
|
@@ -40,24 +38,23 @@ extern "C" {
|
|
|
40
38
|
|
|
41
39
|
/* Function prototypes */
|
|
42
40
|
|
|
43
|
-
|
|
44
|
-
|
|
41
|
+
#define FONT_CHARACTER_SIZE 8
|
|
45
42
|
#define FONT_LINE_HEIGHT (FONT_CHARACTER_SIZE + 2)
|
|
46
43
|
|
|
47
|
-
|
|
48
|
-
* Draw a string in the currently set font.
|
|
44
|
+
/**
|
|
45
|
+
* \brief Draw a string in the currently set font.
|
|
49
46
|
*
|
|
50
47
|
* \param renderer The renderer to draw on.
|
|
51
48
|
* \param x The X coordinate of the upper left corner of the character.
|
|
52
49
|
* \param y The Y coordinate of the upper left corner of the character.
|
|
53
50
|
* \param c The character to draw.
|
|
54
51
|
*
|
|
55
|
-
* \returns
|
|
52
|
+
* \returns 0 on success, -1 on failure.
|
|
56
53
|
*/
|
|
57
|
-
|
|
54
|
+
int SDLTest_DrawCharacter(SDL_Renderer *renderer, int x, int y, Uint32 c);
|
|
58
55
|
|
|
59
|
-
|
|
60
|
-
* Draw a UTF-8 string in the currently set font.
|
|
56
|
+
/**
|
|
57
|
+
* \brief Draw a UTF-8 string in the currently set font.
|
|
61
58
|
*
|
|
62
59
|
* The font currently only supports characters in the Basic Latin and Latin-1 Supplement sets.
|
|
63
60
|
*
|
|
@@ -66,23 +63,23 @@ bool SDLCALL SDLTest_DrawCharacter(SDL_Renderer *renderer, float x, float y, Uin
|
|
|
66
63
|
* \param y The Y coordinate of the upper left corner of the string.
|
|
67
64
|
* \param s The string to draw.
|
|
68
65
|
*
|
|
69
|
-
* \returns
|
|
66
|
+
* \returns 0 on success, -1 on failure.
|
|
70
67
|
*/
|
|
71
|
-
|
|
68
|
+
int SDLTest_DrawString(SDL_Renderer *renderer, int x, int y, const char *s);
|
|
72
69
|
|
|
73
|
-
|
|
74
|
-
* Data used for multi-line text output
|
|
70
|
+
/**
|
|
71
|
+
* \brief Data used for multi-line text output
|
|
75
72
|
*/
|
|
76
73
|
typedef struct SDLTest_TextWindow
|
|
77
74
|
{
|
|
78
|
-
|
|
75
|
+
SDL_Rect rect;
|
|
79
76
|
int current;
|
|
80
77
|
int numlines;
|
|
81
78
|
char **lines;
|
|
82
79
|
} SDLTest_TextWindow;
|
|
83
80
|
|
|
84
|
-
|
|
85
|
-
* Create a multi-line text output window
|
|
81
|
+
/**
|
|
82
|
+
* \brief Create a multi-line text output window
|
|
86
83
|
*
|
|
87
84
|
* \param x The X coordinate of the upper left corner of the window.
|
|
88
85
|
* \param y The Y coordinate of the upper left corner of the window.
|
|
@@ -91,24 +88,24 @@ typedef struct SDLTest_TextWindow
|
|
|
91
88
|
*
|
|
92
89
|
* \returns the new window, or NULL on failure.
|
|
93
90
|
*
|
|
94
|
-
* \since This function is available since SDL
|
|
91
|
+
* \since This function is available since SDL 2.24.0
|
|
95
92
|
*/
|
|
96
|
-
SDLTest_TextWindow *
|
|
93
|
+
SDLTest_TextWindow *SDLTest_TextWindowCreate(int x, int y, int w, int h);
|
|
97
94
|
|
|
98
|
-
|
|
99
|
-
* Display a multi-line text output window
|
|
95
|
+
/**
|
|
96
|
+
* \brief Display a multi-line text output window
|
|
100
97
|
*
|
|
101
98
|
* This function should be called every frame to display the text
|
|
102
99
|
*
|
|
103
100
|
* \param textwin The text output window
|
|
104
101
|
* \param renderer The renderer to use for display
|
|
105
102
|
*
|
|
106
|
-
* \since This function is available since SDL
|
|
103
|
+
* \since This function is available since SDL 2.24.0
|
|
107
104
|
*/
|
|
108
|
-
void
|
|
105
|
+
void SDLTest_TextWindowDisplay(SDLTest_TextWindow *textwin, SDL_Renderer *renderer);
|
|
109
106
|
|
|
110
|
-
|
|
111
|
-
* Add text to a multi-line text output window
|
|
107
|
+
/**
|
|
108
|
+
* \brief Add text to a multi-line text output window
|
|
112
109
|
*
|
|
113
110
|
* Adds UTF-8 text to the end of the current text. The newline character starts a
|
|
114
111
|
* new line of text. The backspace character deletes the last character or, if the
|
|
@@ -118,12 +115,12 @@ void SDLCALL SDLTest_TextWindowDisplay(SDLTest_TextWindow *textwin, SDL_Renderer
|
|
|
118
115
|
* \param fmt A printf() style format string
|
|
119
116
|
* \param ... additional parameters matching % tokens in the `fmt` string, if any
|
|
120
117
|
*
|
|
121
|
-
* \since This function is available since SDL
|
|
118
|
+
* \since This function is available since SDL 2.24.0
|
|
122
119
|
*/
|
|
123
|
-
void
|
|
120
|
+
void SDLTest_TextWindowAddText(SDLTest_TextWindow *textwin, SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(2);
|
|
124
121
|
|
|
125
|
-
|
|
126
|
-
* Add text to a multi-line text output window
|
|
122
|
+
/**
|
|
123
|
+
* \brief Add text to a multi-line text output window
|
|
127
124
|
*
|
|
128
125
|
* Adds UTF-8 text to the end of the current text. The newline character starts a
|
|
129
126
|
* new line of text. The backspace character deletes the last character or, if the
|
|
@@ -133,37 +130,39 @@ void SDLCALL SDLTest_TextWindowAddText(SDLTest_TextWindow *textwin, SDL_PRINTF_F
|
|
|
133
130
|
* \param text The text to add to the window
|
|
134
131
|
* \param len The length, in bytes, of the text to add to the window
|
|
135
132
|
*
|
|
136
|
-
* \since This function is available since SDL
|
|
133
|
+
* \since This function is available since SDL 2.24.0
|
|
137
134
|
*/
|
|
138
|
-
void
|
|
135
|
+
void SDLTest_TextWindowAddTextWithLength(SDLTest_TextWindow *textwin, const char *text, size_t len);
|
|
139
136
|
|
|
140
|
-
|
|
141
|
-
* Clear the text in a multi-line text output window
|
|
137
|
+
/**
|
|
138
|
+
* \brief Clear the text in a multi-line text output window
|
|
142
139
|
*
|
|
143
140
|
* \param textwin The text output window
|
|
144
141
|
*
|
|
145
|
-
* \since This function is available since SDL
|
|
142
|
+
* \since This function is available since SDL 2.24.0
|
|
146
143
|
*/
|
|
147
|
-
void
|
|
144
|
+
void SDLTest_TextWindowClear(SDLTest_TextWindow *textwin);
|
|
148
145
|
|
|
149
|
-
|
|
150
|
-
* Free the storage associated with a multi-line text output window
|
|
146
|
+
/**
|
|
147
|
+
* \brief Free the storage associated with a multi-line text output window
|
|
151
148
|
*
|
|
152
149
|
* \param textwin The text output window
|
|
153
150
|
*
|
|
154
|
-
* \since This function is available since SDL
|
|
151
|
+
* \since This function is available since SDL 2.24.0
|
|
155
152
|
*/
|
|
156
|
-
void
|
|
153
|
+
void SDLTest_TextWindowDestroy(SDLTest_TextWindow *textwin);
|
|
157
154
|
|
|
158
|
-
|
|
159
|
-
* Cleanup textures used by font drawing functions.
|
|
155
|
+
/**
|
|
156
|
+
* \brief Cleanup textures used by font drawing functions.
|
|
160
157
|
*/
|
|
161
|
-
void
|
|
158
|
+
void SDLTest_CleanupTextDrawing(void);
|
|
162
159
|
|
|
163
160
|
/* Ends C function definitions when using C++ */
|
|
164
161
|
#ifdef __cplusplus
|
|
165
162
|
}
|
|
166
163
|
#endif
|
|
167
|
-
#include
|
|
164
|
+
#include "close_code.h"
|
|
168
165
|
|
|
169
166
|
#endif /* SDL_test_font_h_ */
|
|
167
|
+
|
|
168
|
+
/* 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-2023 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
|
|
@@ -20,9 +20,11 @@
|
|
|
20
20
|
*/
|
|
21
21
|
|
|
22
22
|
/**
|
|
23
|
-
*
|
|
23
|
+
* \file SDL_test_fuzzer.h
|
|
24
24
|
*
|
|
25
|
-
*
|
|
25
|
+
* Include file for SDL test framework.
|
|
26
|
+
*
|
|
27
|
+
* This code is a part of the SDL2_test library, not the main SDL library.
|
|
26
28
|
*/
|
|
27
29
|
|
|
28
30
|
/*
|
|
@@ -34,19 +36,20 @@
|
|
|
34
36
|
#ifndef SDL_test_fuzzer_h_
|
|
35
37
|
#define SDL_test_fuzzer_h_
|
|
36
38
|
|
|
37
|
-
#include
|
|
38
|
-
|
|
39
|
-
#include <SDL3/SDL_begin_code.h>
|
|
39
|
+
#include "begin_code.h"
|
|
40
40
|
/* Set up for C function definitions, even when using C++ */
|
|
41
41
|
#ifdef __cplusplus
|
|
42
42
|
extern "C" {
|
|
43
43
|
#endif
|
|
44
44
|
|
|
45
|
+
|
|
45
46
|
/*
|
|
46
47
|
Based on GSOC code by Markus Kauppila <markus.kauppila@gmail.com>
|
|
47
48
|
*/
|
|
48
49
|
|
|
50
|
+
|
|
49
51
|
/**
|
|
52
|
+
* \file
|
|
50
53
|
* Note: The fuzzer implementation uses a static instance of random context
|
|
51
54
|
* internally which makes it thread-UNsafe.
|
|
52
55
|
*/
|
|
@@ -57,49 +60,53 @@ extern "C" {
|
|
|
57
60
|
* \param execKey Execution "Key" that initializes the random number generator uniquely for the test.
|
|
58
61
|
*
|
|
59
62
|
*/
|
|
60
|
-
void
|
|
63
|
+
void SDLTest_FuzzerInit(Uint64 execKey);
|
|
64
|
+
|
|
61
65
|
|
|
62
66
|
/**
|
|
63
67
|
* Returns a random Uint8
|
|
64
68
|
*
|
|
65
69
|
* \returns a generated integer
|
|
66
70
|
*/
|
|
67
|
-
Uint8
|
|
71
|
+
Uint8 SDLTest_RandomUint8(void);
|
|
68
72
|
|
|
69
73
|
/**
|
|
70
74
|
* Returns a random Sint8
|
|
71
75
|
*
|
|
72
76
|
* \returns a generated signed integer
|
|
73
77
|
*/
|
|
74
|
-
Sint8
|
|
78
|
+
Sint8 SDLTest_RandomSint8(void);
|
|
79
|
+
|
|
75
80
|
|
|
76
81
|
/**
|
|
77
82
|
* Returns a random Uint16
|
|
78
83
|
*
|
|
79
84
|
* \returns a generated integer
|
|
80
85
|
*/
|
|
81
|
-
Uint16
|
|
86
|
+
Uint16 SDLTest_RandomUint16(void);
|
|
82
87
|
|
|
83
88
|
/**
|
|
84
89
|
* Returns a random Sint16
|
|
85
90
|
*
|
|
86
91
|
* \returns a generated signed integer
|
|
87
92
|
*/
|
|
88
|
-
Sint16
|
|
93
|
+
Sint16 SDLTest_RandomSint16(void);
|
|
94
|
+
|
|
89
95
|
|
|
90
96
|
/**
|
|
91
97
|
* Returns a random integer
|
|
92
98
|
*
|
|
93
99
|
* \returns a generated integer
|
|
94
100
|
*/
|
|
95
|
-
Sint32
|
|
101
|
+
Sint32 SDLTest_RandomSint32(void);
|
|
102
|
+
|
|
96
103
|
|
|
97
104
|
/**
|
|
98
105
|
* Returns a random positive integer
|
|
99
106
|
*
|
|
100
107
|
* \returns a generated integer
|
|
101
108
|
*/
|
|
102
|
-
Uint32
|
|
109
|
+
Uint32 SDLTest_RandomUint32(void);
|
|
103
110
|
|
|
104
111
|
/**
|
|
105
112
|
* Returns random Uint64.
|
|
@@ -108,34 +115,35 @@ Uint32 SDLCALL SDLTest_RandomUint32(void);
|
|
|
108
115
|
*/
|
|
109
116
|
Uint64 SDLTest_RandomUint64(void);
|
|
110
117
|
|
|
118
|
+
|
|
111
119
|
/**
|
|
112
120
|
* Returns random Sint64.
|
|
113
121
|
*
|
|
114
122
|
* \returns a generated signed integer
|
|
115
123
|
*/
|
|
116
|
-
Sint64
|
|
124
|
+
Sint64 SDLTest_RandomSint64(void);
|
|
117
125
|
|
|
118
126
|
/**
|
|
119
127
|
* \returns a random float in range [0.0 - 1.0]
|
|
120
128
|
*/
|
|
121
|
-
float
|
|
129
|
+
float SDLTest_RandomUnitFloat(void);
|
|
122
130
|
|
|
123
131
|
/**
|
|
124
132
|
* \returns a random double in range [0.0 - 1.0]
|
|
125
133
|
*/
|
|
126
|
-
double
|
|
134
|
+
double SDLTest_RandomUnitDouble(void);
|
|
127
135
|
|
|
128
136
|
/**
|
|
129
137
|
* \returns a random float.
|
|
130
138
|
*
|
|
131
139
|
*/
|
|
132
|
-
float
|
|
140
|
+
float SDLTest_RandomFloat(void);
|
|
133
141
|
|
|
134
142
|
/**
|
|
135
143
|
* \returns a random double.
|
|
136
144
|
*
|
|
137
145
|
*/
|
|
138
|
-
double
|
|
146
|
+
double SDLTest_RandomDouble(void);
|
|
139
147
|
|
|
140
148
|
/**
|
|
141
149
|
* Returns a random boundary value for Uint8 within the given boundaries.
|
|
@@ -145,10 +153,10 @@ double SDLCALL SDLTest_RandomDouble(void);
|
|
|
145
153
|
* If boundary1 > boundary2, the values are swapped
|
|
146
154
|
*
|
|
147
155
|
* Usage examples:
|
|
148
|
-
* RandomUint8BoundaryValue(10, 20,
|
|
149
|
-
* RandomUint8BoundaryValue(1, 20,
|
|
150
|
-
* RandomUint8BoundaryValue(0, 99,
|
|
151
|
-
* RandomUint8BoundaryValue(0, 255,
|
|
156
|
+
* RandomUint8BoundaryValue(10, 20, SDL_TRUE) returns 10, 11, 19 or 20
|
|
157
|
+
* RandomUint8BoundaryValue(1, 20, SDL_FALSE) returns 0 or 21
|
|
158
|
+
* RandomUint8BoundaryValue(0, 99, SDL_FALSE) returns 100
|
|
159
|
+
* RandomUint8BoundaryValue(0, 255, SDL_FALSE) returns 0 (error set)
|
|
152
160
|
*
|
|
153
161
|
* \param boundary1 Lower boundary limit
|
|
154
162
|
* \param boundary2 Upper boundary limit
|
|
@@ -156,7 +164,7 @@ double SDLCALL SDLTest_RandomDouble(void);
|
|
|
156
164
|
*
|
|
157
165
|
* \returns a random boundary value for the given range and domain or 0 with error set
|
|
158
166
|
*/
|
|
159
|
-
Uint8
|
|
167
|
+
Uint8 SDLTest_RandomUint8BoundaryValue(Uint8 boundary1, Uint8 boundary2, SDL_bool validDomain);
|
|
160
168
|
|
|
161
169
|
/**
|
|
162
170
|
* Returns a random boundary value for Uint16 within the given boundaries.
|
|
@@ -166,10 +174,10 @@ Uint8 SDLCALL SDLTest_RandomUint8BoundaryValue(Uint8 boundary1, Uint8 boundary2,
|
|
|
166
174
|
* If boundary1 > boundary2, the values are swapped
|
|
167
175
|
*
|
|
168
176
|
* Usage examples:
|
|
169
|
-
* RandomUint16BoundaryValue(10, 20,
|
|
170
|
-
* RandomUint16BoundaryValue(1, 20,
|
|
171
|
-
* RandomUint16BoundaryValue(0, 99,
|
|
172
|
-
* RandomUint16BoundaryValue(0, 0xFFFF,
|
|
177
|
+
* RandomUint16BoundaryValue(10, 20, SDL_TRUE) returns 10, 11, 19 or 20
|
|
178
|
+
* RandomUint16BoundaryValue(1, 20, SDL_FALSE) returns 0 or 21
|
|
179
|
+
* RandomUint16BoundaryValue(0, 99, SDL_FALSE) returns 100
|
|
180
|
+
* RandomUint16BoundaryValue(0, 0xFFFF, SDL_FALSE) returns 0 (error set)
|
|
173
181
|
*
|
|
174
182
|
* \param boundary1 Lower boundary limit
|
|
175
183
|
* \param boundary2 Upper boundary limit
|
|
@@ -177,7 +185,7 @@ Uint8 SDLCALL SDLTest_RandomUint8BoundaryValue(Uint8 boundary1, Uint8 boundary2,
|
|
|
177
185
|
*
|
|
178
186
|
* \returns a random boundary value for the given range and domain or 0 with error set
|
|
179
187
|
*/
|
|
180
|
-
Uint16
|
|
188
|
+
Uint16 SDLTest_RandomUint16BoundaryValue(Uint16 boundary1, Uint16 boundary2, SDL_bool validDomain);
|
|
181
189
|
|
|
182
190
|
/**
|
|
183
191
|
* Returns a random boundary value for Uint32 within the given boundaries.
|
|
@@ -187,10 +195,10 @@ Uint16 SDLCALL SDLTest_RandomUint16BoundaryValue(Uint16 boundary1, Uint16 bounda
|
|
|
187
195
|
* If boundary1 > boundary2, the values are swapped
|
|
188
196
|
*
|
|
189
197
|
* Usage examples:
|
|
190
|
-
* RandomUint32BoundaryValue(10, 20,
|
|
191
|
-
* RandomUint32BoundaryValue(1, 20,
|
|
192
|
-
* RandomUint32BoundaryValue(0, 99,
|
|
193
|
-
* RandomUint32BoundaryValue(0, 0xFFFFFFFF,
|
|
198
|
+
* RandomUint32BoundaryValue(10, 20, SDL_TRUE) returns 10, 11, 19 or 20
|
|
199
|
+
* RandomUint32BoundaryValue(1, 20, SDL_FALSE) returns 0 or 21
|
|
200
|
+
* RandomUint32BoundaryValue(0, 99, SDL_FALSE) returns 100
|
|
201
|
+
* RandomUint32BoundaryValue(0, 0xFFFFFFFF, SDL_FALSE) returns 0 (with error set)
|
|
194
202
|
*
|
|
195
203
|
* \param boundary1 Lower boundary limit
|
|
196
204
|
* \param boundary2 Upper boundary limit
|
|
@@ -198,7 +206,7 @@ Uint16 SDLCALL SDLTest_RandomUint16BoundaryValue(Uint16 boundary1, Uint16 bounda
|
|
|
198
206
|
*
|
|
199
207
|
* \returns a random boundary value for the given range and domain or 0 with error set
|
|
200
208
|
*/
|
|
201
|
-
Uint32
|
|
209
|
+
Uint32 SDLTest_RandomUint32BoundaryValue(Uint32 boundary1, Uint32 boundary2, SDL_bool validDomain);
|
|
202
210
|
|
|
203
211
|
/**
|
|
204
212
|
* Returns a random boundary value for Uint64 within the given boundaries.
|
|
@@ -208,10 +216,10 @@ Uint32 SDLCALL SDLTest_RandomUint32BoundaryValue(Uint32 boundary1, Uint32 bounda
|
|
|
208
216
|
* If boundary1 > boundary2, the values are swapped
|
|
209
217
|
*
|
|
210
218
|
* Usage examples:
|
|
211
|
-
* RandomUint64BoundaryValue(10, 20,
|
|
212
|
-
* RandomUint64BoundaryValue(1, 20,
|
|
213
|
-
* RandomUint64BoundaryValue(0, 99,
|
|
214
|
-
* RandomUint64BoundaryValue(0, 0xFFFFFFFFFFFFFFFF,
|
|
219
|
+
* RandomUint64BoundaryValue(10, 20, SDL_TRUE) returns 10, 11, 19 or 20
|
|
220
|
+
* RandomUint64BoundaryValue(1, 20, SDL_FALSE) returns 0 or 21
|
|
221
|
+
* RandomUint64BoundaryValue(0, 99, SDL_FALSE) returns 100
|
|
222
|
+
* RandomUint64BoundaryValue(0, 0xFFFFFFFFFFFFFFFF, SDL_FALSE) returns 0 (with error set)
|
|
215
223
|
*
|
|
216
224
|
* \param boundary1 Lower boundary limit
|
|
217
225
|
* \param boundary2 Upper boundary limit
|
|
@@ -219,7 +227,7 @@ Uint32 SDLCALL SDLTest_RandomUint32BoundaryValue(Uint32 boundary1, Uint32 bounda
|
|
|
219
227
|
*
|
|
220
228
|
* \returns a random boundary value for the given range and domain or 0 with error set
|
|
221
229
|
*/
|
|
222
|
-
Uint64
|
|
230
|
+
Uint64 SDLTest_RandomUint64BoundaryValue(Uint64 boundary1, Uint64 boundary2, SDL_bool validDomain);
|
|
223
231
|
|
|
224
232
|
/**
|
|
225
233
|
* Returns a random boundary value for Sint8 within the given boundaries.
|
|
@@ -229,10 +237,10 @@ Uint64 SDLCALL SDLTest_RandomUint64BoundaryValue(Uint64 boundary1, Uint64 bounda
|
|
|
229
237
|
* If boundary1 > boundary2, the values are swapped
|
|
230
238
|
*
|
|
231
239
|
* Usage examples:
|
|
232
|
-
* RandomSint8BoundaryValue(-10, 20,
|
|
233
|
-
* RandomSint8BoundaryValue(-100, -10,
|
|
234
|
-
* RandomSint8BoundaryValue(SINT8_MIN, 99,
|
|
235
|
-
* RandomSint8BoundaryValue(SINT8_MIN, SINT8_MAX,
|
|
240
|
+
* RandomSint8BoundaryValue(-10, 20, SDL_TRUE) returns -11, -10, 19 or 20
|
|
241
|
+
* RandomSint8BoundaryValue(-100, -10, SDL_FALSE) returns -101 or -9
|
|
242
|
+
* RandomSint8BoundaryValue(SINT8_MIN, 99, SDL_FALSE) returns 100
|
|
243
|
+
* RandomSint8BoundaryValue(SINT8_MIN, SINT8_MAX, SDL_FALSE) returns SINT8_MIN (== error value) with error set
|
|
236
244
|
*
|
|
237
245
|
* \param boundary1 Lower boundary limit
|
|
238
246
|
* \param boundary2 Upper boundary limit
|
|
@@ -240,7 +248,8 @@ Uint64 SDLCALL SDLTest_RandomUint64BoundaryValue(Uint64 boundary1, Uint64 bounda
|
|
|
240
248
|
*
|
|
241
249
|
* \returns a random boundary value for the given range and domain or SINT8_MIN with error set
|
|
242
250
|
*/
|
|
243
|
-
Sint8
|
|
251
|
+
Sint8 SDLTest_RandomSint8BoundaryValue(Sint8 boundary1, Sint8 boundary2, SDL_bool validDomain);
|
|
252
|
+
|
|
244
253
|
|
|
245
254
|
/**
|
|
246
255
|
* Returns a random boundary value for Sint16 within the given boundaries.
|
|
@@ -250,10 +259,10 @@ Sint8 SDLCALL SDLTest_RandomSint8BoundaryValue(Sint8 boundary1, Sint8 boundary2,
|
|
|
250
259
|
* If boundary1 > boundary2, the values are swapped
|
|
251
260
|
*
|
|
252
261
|
* Usage examples:
|
|
253
|
-
* RandomSint16BoundaryValue(-10, 20,
|
|
254
|
-
* RandomSint16BoundaryValue(-100, -10,
|
|
255
|
-
* RandomSint16BoundaryValue(SINT16_MIN, 99,
|
|
256
|
-
* RandomSint16BoundaryValue(SINT16_MIN, SINT16_MAX,
|
|
262
|
+
* RandomSint16BoundaryValue(-10, 20, SDL_TRUE) returns -11, -10, 19 or 20
|
|
263
|
+
* RandomSint16BoundaryValue(-100, -10, SDL_FALSE) returns -101 or -9
|
|
264
|
+
* RandomSint16BoundaryValue(SINT16_MIN, 99, SDL_FALSE) returns 100
|
|
265
|
+
* RandomSint16BoundaryValue(SINT16_MIN, SINT16_MAX, SDL_FALSE) returns SINT16_MIN (== error value) with error set
|
|
257
266
|
*
|
|
258
267
|
* \param boundary1 Lower boundary limit
|
|
259
268
|
* \param boundary2 Upper boundary limit
|
|
@@ -261,7 +270,7 @@ Sint8 SDLCALL SDLTest_RandomSint8BoundaryValue(Sint8 boundary1, Sint8 boundary2,
|
|
|
261
270
|
*
|
|
262
271
|
* \returns a random boundary value for the given range and domain or SINT16_MIN with error set
|
|
263
272
|
*/
|
|
264
|
-
Sint16
|
|
273
|
+
Sint16 SDLTest_RandomSint16BoundaryValue(Sint16 boundary1, Sint16 boundary2, SDL_bool validDomain);
|
|
265
274
|
|
|
266
275
|
/**
|
|
267
276
|
* Returns a random boundary value for Sint32 within the given boundaries.
|
|
@@ -271,10 +280,10 @@ Sint16 SDLCALL SDLTest_RandomSint16BoundaryValue(Sint16 boundary1, Sint16 bounda
|
|
|
271
280
|
* If boundary1 > boundary2, the values are swapped
|
|
272
281
|
*
|
|
273
282
|
* Usage examples:
|
|
274
|
-
* RandomSint32BoundaryValue(-10, 20,
|
|
275
|
-
* RandomSint32BoundaryValue(-100, -10,
|
|
276
|
-
* RandomSint32BoundaryValue(SINT32_MIN, 99,
|
|
277
|
-
* RandomSint32BoundaryValue(SINT32_MIN, SINT32_MAX,
|
|
283
|
+
* RandomSint32BoundaryValue(-10, 20, SDL_TRUE) returns -11, -10, 19 or 20
|
|
284
|
+
* RandomSint32BoundaryValue(-100, -10, SDL_FALSE) returns -101 or -9
|
|
285
|
+
* RandomSint32BoundaryValue(SINT32_MIN, 99, SDL_FALSE) returns 100
|
|
286
|
+
* RandomSint32BoundaryValue(SINT32_MIN, SINT32_MAX, SDL_FALSE) returns SINT32_MIN (== error value)
|
|
278
287
|
*
|
|
279
288
|
* \param boundary1 Lower boundary limit
|
|
280
289
|
* \param boundary2 Upper boundary limit
|
|
@@ -282,7 +291,7 @@ Sint16 SDLCALL SDLTest_RandomSint16BoundaryValue(Sint16 boundary1, Sint16 bounda
|
|
|
282
291
|
*
|
|
283
292
|
* \returns a random boundary value for the given range and domain or SINT32_MIN with error set
|
|
284
293
|
*/
|
|
285
|
-
Sint32
|
|
294
|
+
Sint32 SDLTest_RandomSint32BoundaryValue(Sint32 boundary1, Sint32 boundary2, SDL_bool validDomain);
|
|
286
295
|
|
|
287
296
|
/**
|
|
288
297
|
* Returns a random boundary value for Sint64 within the given boundaries.
|
|
@@ -292,10 +301,10 @@ Sint32 SDLCALL SDLTest_RandomSint32BoundaryValue(Sint32 boundary1, Sint32 bounda
|
|
|
292
301
|
* If boundary1 > boundary2, the values are swapped
|
|
293
302
|
*
|
|
294
303
|
* Usage examples:
|
|
295
|
-
* RandomSint64BoundaryValue(-10, 20,
|
|
296
|
-
* RandomSint64BoundaryValue(-100, -10,
|
|
297
|
-
* RandomSint64BoundaryValue(SINT64_MIN, 99,
|
|
298
|
-
* RandomSint64BoundaryValue(SINT64_MIN, SINT64_MAX,
|
|
304
|
+
* RandomSint64BoundaryValue(-10, 20, SDL_TRUE) returns -11, -10, 19 or 20
|
|
305
|
+
* RandomSint64BoundaryValue(-100, -10, SDL_FALSE) returns -101 or -9
|
|
306
|
+
* RandomSint64BoundaryValue(SINT64_MIN, 99, SDL_FALSE) returns 100
|
|
307
|
+
* RandomSint64BoundaryValue(SINT64_MIN, SINT64_MAX, SDL_FALSE) returns SINT64_MIN (== error value) and error set
|
|
299
308
|
*
|
|
300
309
|
* \param boundary1 Lower boundary limit
|
|
301
310
|
* \param boundary2 Upper boundary limit
|
|
@@ -303,7 +312,8 @@ Sint32 SDLCALL SDLTest_RandomSint32BoundaryValue(Sint32 boundary1, Sint32 bounda
|
|
|
303
312
|
*
|
|
304
313
|
* \returns a random boundary value for the given range and domain or SINT64_MIN with error set
|
|
305
314
|
*/
|
|
306
|
-
Sint64
|
|
315
|
+
Sint64 SDLTest_RandomSint64BoundaryValue(Sint64 boundary1, Sint64 boundary2, SDL_bool validDomain);
|
|
316
|
+
|
|
307
317
|
|
|
308
318
|
/**
|
|
309
319
|
* Returns integer in range [min, max] (inclusive).
|
|
@@ -316,7 +326,8 @@ Sint64 SDLCALL SDLTest_RandomSint64BoundaryValue(Sint64 boundary1, Sint64 bounda
|
|
|
316
326
|
*
|
|
317
327
|
* \returns a generated random integer in range
|
|
318
328
|
*/
|
|
319
|
-
Sint32
|
|
329
|
+
Sint32 SDLTest_RandomIntegerInRange(Sint32 min, Sint32 max);
|
|
330
|
+
|
|
320
331
|
|
|
321
332
|
/**
|
|
322
333
|
* Generates random null-terminated string. The minimum length for
|
|
@@ -327,7 +338,8 @@ Sint32 SDLCALL SDLTest_RandomIntegerInRange(Sint32 min, Sint32 max);
|
|
|
327
338
|
*
|
|
328
339
|
* \returns a newly allocated random string; or NULL if length was invalid or string could not be allocated.
|
|
329
340
|
*/
|
|
330
|
-
char *
|
|
341
|
+
char * SDLTest_RandomAsciiString(void);
|
|
342
|
+
|
|
331
343
|
|
|
332
344
|
/**
|
|
333
345
|
* Generates random null-terminated string. The maximum length for
|
|
@@ -340,7 +352,8 @@ char * SDLCALL SDLTest_RandomAsciiString(void);
|
|
|
340
352
|
*
|
|
341
353
|
* \returns a newly allocated random string; or NULL if maxLength was invalid or string could not be allocated.
|
|
342
354
|
*/
|
|
343
|
-
char *
|
|
355
|
+
char * SDLTest_RandomAsciiStringWithMaximumLength(int maxLength);
|
|
356
|
+
|
|
344
357
|
|
|
345
358
|
/**
|
|
346
359
|
* Generates random null-terminated string. The length for
|
|
@@ -353,19 +366,21 @@ char * SDLCALL SDLTest_RandomAsciiStringWithMaximumLength(int maxLength);
|
|
|
353
366
|
*
|
|
354
367
|
* \returns a newly allocated random string; or NULL if size was invalid or string could not be allocated.
|
|
355
368
|
*/
|
|
356
|
-
char *
|
|
369
|
+
char * SDLTest_RandomAsciiStringOfSize(int size);
|
|
357
370
|
|
|
358
371
|
/**
|
|
359
372
|
* Get the invocation count for the fuzzer since last ...FuzzerInit.
|
|
360
373
|
*
|
|
361
374
|
* \returns the invocation count.
|
|
362
375
|
*/
|
|
363
|
-
int
|
|
376
|
+
int SDLTest_GetFuzzerInvocationCount(void);
|
|
364
377
|
|
|
365
378
|
/* Ends C function definitions when using C++ */
|
|
366
379
|
#ifdef __cplusplus
|
|
367
380
|
}
|
|
368
381
|
#endif
|
|
369
|
-
#include
|
|
382
|
+
#include "close_code.h"
|
|
370
383
|
|
|
371
384
|
#endif /* SDL_test_fuzzer_h_ */
|
|
385
|
+
|
|
386
|
+
/* vi: set ts=4 sw=4 expandtab: */
|