2025-06-02 10:12:55 -07:00
|
|
|
/* Copyright (C) 2025 Wildfire Games.
|
2009-04-18 10:00:33 -07:00
|
|
|
*
|
2010-02-08 08:23:39 -08:00
|
|
|
* Permission is hereby granted, free of charge, to any person obtaining
|
|
|
|
|
* a copy of this software and associated documentation files (the
|
|
|
|
|
* "Software"), to deal in the Software without restriction, including
|
|
|
|
|
* without limitation the rights to use, copy, modify, merge, publish,
|
|
|
|
|
* distribute, sublicense, and/or sell copies of the Software, and to
|
|
|
|
|
* permit persons to whom the Software is furnished to do so, subject to
|
|
|
|
|
* the following conditions:
|
2016-11-23 03:18:37 -08:00
|
|
|
*
|
2010-02-08 08:23:39 -08:00
|
|
|
* The above copyright notice and this permission notice shall be included
|
|
|
|
|
* in all copies or substantial portions of the Software.
|
2016-11-23 03:18:37 -08:00
|
|
|
*
|
2010-02-08 08:23:39 -08:00
|
|
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
|
|
|
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
|
|
|
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|
|
|
|
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
|
|
|
|
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
|
|
|
|
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
|
|
|
|
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
2009-04-18 10:00:33 -07:00
|
|
|
*/
|
|
|
|
|
|
2009-04-18 10:51:05 -07:00
|
|
|
/*
|
|
|
|
|
* SDL header; uses emulator on Windows, otherwise libsdl.
|
2006-04-11 16:59:08 -07:00
|
|
|
*/
|
|
|
|
|
|
2007-05-07 09:33:24 -07:00
|
|
|
#ifndef INCLUDED_SDL
|
|
|
|
|
#define INCLUDED_SDL
|
2005-06-20 08:14:36 -07:00
|
|
|
|
2021-12-22 03:02:13 -08:00
|
|
|
#include "lib/config2.h"
|
2012-01-12 15:32:27 -08:00
|
|
|
#include "lib/external_libraries/libsdl_fwd.h"
|
2005-10-23 17:06:08 -07:00
|
|
|
|
2025-08-09 12:17:38 -07:00
|
|
|
# include <SDL.h>
|
|
|
|
|
# include <SDL_thread.h>
|
2007-12-29 08:45:22 -08:00
|
|
|
|
2015-12-14 02:52:21 -08:00
|
|
|
#if !SDL_VERSION_ATLEAST(2,0,2)
|
|
|
|
|
#error You are using an old libsdl release. At least libsdl2 >= 2.0.2 is required.
|
2015-04-27 00:56:34 -07:00
|
|
|
#endif
|
|
|
|
|
|
2007-12-29 08:45:22 -08:00
|
|
|
// if the compiler doesn't support inlining, this header will pull
|
|
|
|
|
// in static bswap routines. doesn't matter - modern compilers
|
|
|
|
|
// will strip them if unused, and this is more convenient than
|
|
|
|
|
// another header that toggles between wsdl and SDL_endian.h.
|
2025-08-09 12:17:38 -07:00
|
|
|
# include <SDL_endian.h>
|
2007-12-29 08:45:22 -08:00
|
|
|
|
2006-08-26 14:52:18 -07:00
|
|
|
// complete definition of our forward-declared SDL_Event (see sdl_fwd.h)
|
|
|
|
|
struct SDL_Event_
|
|
|
|
|
{
|
|
|
|
|
SDL_Event ev;
|
|
|
|
|
};
|
|
|
|
|
|
2020-01-18 08:45:50 -08:00
|
|
|
// Returns a windowing subsystem used for the window.
|
|
|
|
|
const char* GetSDLSubsystem(SDL_Window* window);
|
|
|
|
|
|
2021-12-21 14:03:31 -08:00
|
|
|
#if defined(SDL_VIDEO_DRIVER_X11) && !CONFIG2_GLES
|
|
|
|
|
void* GetX11Display(SDL_Window* window);
|
|
|
|
|
#endif
|
|
|
|
|
|
2022-06-09 14:09:32 -07:00
|
|
|
#if defined(SDL_VIDEO_DRIVER_WAYLAND) && !CONFIG2_GLES
|
|
|
|
|
void* GetWaylandDisplay(SDL_Window* window);
|
|
|
|
|
#endif
|
|
|
|
|
|
2007-05-07 09:33:24 -07:00
|
|
|
#endif // INCLUDED_SDL
|