summary refs log tree commit diff stats
path: root/vendor/SDL2_Image/include/SDL_image.h
diff options
context:
space:
mode:
authorStar Rauchenberger <fefferburbia@gmail.com>2022-03-20 13:03:18 -0400
committerStar Rauchenberger <fefferburbia@gmail.com>2022-03-20 13:03:18 -0400
commit304bab2aced9cae51d2e4c09f3d9e06c66ff175d (patch)
tree8397f81b893feb1cf624eee49c4fb01297aa08ad /vendor/SDL2_Image/include/SDL_image.h
parentba350484072c78e5e1a765370c22dbd76474aa39 (diff)
downloadether-304bab2aced9cae51d2e4c09f3d9e06c66ff175d.tar.gz
ether-304bab2aced9cae51d2e4c09f3d9e06c66ff175d.tar.bz2
ether-304bab2aced9cae51d2e4c09f3d9e06c66ff175d.zip
we can build a window app!
build type must be set to Release or it's horribly slow, and fullscreen does not work
Diffstat (limited to 'vendor/SDL2_Image/include/SDL_image.h')
-rw-r--r--vendor/SDL2_Image/include/SDL_image.h161
1 files changed, 161 insertions, 0 deletions
diff --git a/vendor/SDL2_Image/include/SDL_image.h b/vendor/SDL2_Image/include/SDL_image.h new file mode 100644 index 0000000..6facc0d --- /dev/null +++ b/vendor/SDL2_Image/include/SDL_image.h
@@ -0,0 +1,161 @@
1/*
2 SDL_image: An example image loading library for use with SDL
3 Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
4
5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software.
8
9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions:
12
13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution.
20*/
21
22/* A simple library to load images of various formats as SDL surfaces */
23
24#ifndef SDL_IMAGE_H_
25#define SDL_IMAGE_H_
26
27#include "SDL.h"
28#include "SDL_version.h"
29#include "begin_code.h"
30
31/* Set up for C function definitions, even when using C++ */
32#ifdef __cplusplus
33extern "C" {
34#endif
35
36/* Printable format: "%d.%d.%d", MAJOR, MINOR, PATCHLEVEL
37*/
38#define SDL_IMAGE_MAJOR_VERSION 2
39#define SDL_IMAGE_MINOR_VERSION 0
40#define SDL_IMAGE_PATCHLEVEL 5
41
42/* This macro can be used to fill a version structure with the compile-time
43 * version of the SDL_image library.
44 */
45#define SDL_IMAGE_VERSION(X) \
46{ \
47 (X)->major = SDL_IMAGE_MAJOR_VERSION; \
48 (X)->minor = SDL_IMAGE_MINOR_VERSION; \
49 (X)->patch = SDL_IMAGE_PATCHLEVEL; \
50}
51
52/**
53 * This is the version number macro for the current SDL_image version.
54 */
55#define SDL_IMAGE_COMPILEDVERSION \
56 SDL_VERSIONNUM(SDL_IMAGE_MAJOR_VERSION, SDL_IMAGE_MINOR_VERSION, SDL_IMAGE_PATCHLEVEL)
57
58/**
59 * This macro will evaluate to true if compiled with SDL_image at least X.Y.Z.
60 */
61#define SDL_IMAGE_VERSION_ATLEAST(X, Y, Z) \
62 (SDL_IMAGE_COMPILEDVERSION >= SDL_VERSIONNUM(X, Y, Z))
63
64/* This function gets the version of the dynamically linked SDL_image library.
65 it should NOT be used to fill a version structure, instead you should
66 use the SDL_IMAGE_VERSION() macro.
67 */
68extern DECLSPEC const SDL_version * SDLCALL IMG_Linked_Version(void);
69
70typedef enum
71{
72 IMG_INIT_JPG = 0x00000001,
73 IMG_INIT_PNG = 0x00000002,
74 IMG_INIT_TIF = 0x00000004,
75 IMG_INIT_WEBP = 0x00000008
76} IMG_InitFlags;
77
78/* Loads dynamic libraries and prepares them for use. Flags should be
79 one or more flags from IMG_InitFlags OR'd together.
80 It returns the flags successfully initialized, or 0 on failure.
81 */
82extern DECLSPEC int SDLCALL IMG_Init(int flags);
83
84/* Unloads libraries loaded with IMG_Init */
85extern DECLSPEC void SDLCALL IMG_Quit(void);
86
87/* Load an image from an SDL data source.
88 The 'type' may be one of: "BMP", "GIF", "PNG", etc.
89
90 If the image format supports a transparent pixel, SDL will set the
91 colorkey for the surface. You can enable RLE acceleration on the
92 surface afterwards by calling:
93 SDL_SetColorKey(image, SDL_RLEACCEL, image->format->colorkey);
94 */
95extern DECLSPEC SDL_Surface * SDLCALL IMG_LoadTyped_RW(SDL_RWops *src, int freesrc, const char *type);
96/* Convenience functions */
97extern DECLSPEC SDL_Surface * SDLCALL IMG_Load(const char *file);
98extern DECLSPEC SDL_Surface * SDLCALL IMG_Load_RW(SDL_RWops *src, int freesrc);
99
100#if SDL_VERSION_ATLEAST(2,0,0)
101/* Load an image directly into a render texture.
102 */
103extern DECLSPEC SDL_Texture * SDLCALL IMG_LoadTexture(SDL_Renderer *renderer, const char *file);
104extern DECLSPEC SDL_Texture * SDLCALL IMG_LoadTexture_RW(SDL_Renderer *renderer, SDL_RWops *src, int freesrc);
105extern DECLSPEC SDL_Texture * SDLCALL IMG_LoadTextureTyped_RW(SDL_Renderer *renderer, SDL_RWops *src, int freesrc, const char *type);
106#endif /* SDL 2.0 */
107
108/* Functions to detect a file type, given a seekable source */
109extern DECLSPEC int SDLCALL IMG_isICO(SDL_RWops *src);
110extern DECLSPEC int SDLCALL IMG_isCUR(SDL_RWops *src);
111extern DECLSPEC int SDLCALL IMG_isBMP(SDL_RWops *src);
112extern DECLSPEC int SDLCALL IMG_isGIF(SDL_RWops *src);
113extern DECLSPEC int SDLCALL IMG_isJPG(SDL_RWops *src);
114extern DECLSPEC int SDLCALL IMG_isLBM(SDL_RWops *src);
115extern DECLSPEC int SDLCALL IMG_isPCX(SDL_RWops *src);
116extern DECLSPEC int SDLCALL IMG_isPNG(SDL_RWops *src);
117extern DECLSPEC int SDLCALL IMG_isPNM(SDL_RWops *src);
118extern DECLSPEC int SDLCALL IMG_isSVG(SDL_RWops *src);
119extern DECLSPEC int SDLCALL IMG_isTIF(SDL_RWops *src);
120extern DECLSPEC int SDLCALL IMG_isXCF(SDL_RWops *src);
121extern DECLSPEC int SDLCALL IMG_isXPM(SDL_RWops *src);
122extern DECLSPEC int SDLCALL IMG_isXV(SDL_RWops *src);
123extern DECLSPEC int SDLCALL IMG_isWEBP(SDL_RWops *src);
124
125/* Individual loading functions */
126extern DECLSPEC SDL_Surface * SDLCALL IMG_LoadICO_RW(SDL_RWops *src);
127extern DECLSPEC SDL_Surface * SDLCALL IMG_LoadCUR_RW(SDL_RWops *src);
128extern DECLSPEC SDL_Surface * SDLCALL IMG_LoadBMP_RW(SDL_RWops *src);
129extern DECLSPEC SDL_Surface * SDLCALL IMG_LoadGIF_RW(SDL_RWops *src);
130extern DECLSPEC SDL_Surface * SDLCALL IMG_LoadJPG_RW(SDL_RWops *src);
131extern DECLSPEC SDL_Surface * SDLCALL IMG_LoadLBM_RW(SDL_RWops *src);
132extern DECLSPEC SDL_Surface * SDLCALL IMG_LoadPCX_RW(SDL_RWops *src);
133extern DECLSPEC SDL_Surface * SDLCALL IMG_LoadPNG_RW(SDL_RWops *src);
134extern DECLSPEC SDL_Surface * SDLCALL IMG_LoadPNM_RW(SDL_RWops *src);
135extern DECLSPEC SDL_Surface * SDLCALL IMG_LoadSVG_RW(SDL_RWops *src);
136extern DECLSPEC SDL_Surface * SDLCALL IMG_LoadTGA_RW(SDL_RWops *src);
137extern DECLSPEC SDL_Surface * SDLCALL IMG_LoadTIF_RW(SDL_RWops *src);
138extern DECLSPEC SDL_Surface * SDLCALL IMG_LoadXCF_RW(SDL_RWops *src);
139extern DECLSPEC SDL_Surface * SDLCALL IMG_LoadXPM_RW(SDL_RWops *src);
140extern DECLSPEC SDL_Surface * SDLCALL IMG_LoadXV_RW(SDL_RWops *src);
141extern DECLSPEC SDL_Surface * SDLCALL IMG_LoadWEBP_RW(SDL_RWops *src);
142
143extern DECLSPEC SDL_Surface * SDLCALL IMG_ReadXPMFromArray(char **xpm);
144
145/* Individual saving functions */
146extern DECLSPEC int SDLCALL IMG_SavePNG(SDL_Surface *surface, const char *file);
147extern DECLSPEC int SDLCALL IMG_SavePNG_RW(SDL_Surface *surface, SDL_RWops *dst, int freedst);
148extern DECLSPEC int SDLCALL IMG_SaveJPG(SDL_Surface *surface, const char *file, int quality);
149extern DECLSPEC int SDLCALL IMG_SaveJPG_RW(SDL_Surface *surface, SDL_RWops *dst, int freedst, int quality);
150
151/* We'll use SDL for reporting errors */
152#define IMG_SetError SDL_SetError
153#define IMG_GetError SDL_GetError
154
155/* Ends C function definitions when using C++ */
156#ifdef __cplusplus
157}
158#endif
159#include "close_code.h"
160
161#endif /* SDL_IMAGE_H_ */