diff options
Diffstat (limited to 'contrib/SDL-3.2.8/src/video/vivante/SDL_vivantevideo.h')
| -rw-r--r-- | contrib/SDL-3.2.8/src/video/vivante/SDL_vivantevideo.h | 86 |
1 files changed, 86 insertions, 0 deletions
diff --git a/contrib/SDL-3.2.8/src/video/vivante/SDL_vivantevideo.h b/contrib/SDL-3.2.8/src/video/vivante/SDL_vivantevideo.h new file mode 100644 index 0000000..44399d9 --- /dev/null +++ b/contrib/SDL-3.2.8/src/video/vivante/SDL_vivantevideo.h | |||
| @@ -0,0 +1,86 @@ | |||
| 1 | /* | ||
| 2 | Simple DirectMedia Layer | ||
| 3 | Copyright (C) 1997-2025 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 | #include "SDL_internal.h" | ||
| 22 | |||
| 23 | #ifndef SDL_vivantevideo_h_ | ||
| 24 | #define SDL_vivantevideo_h_ | ||
| 25 | |||
| 26 | #include "../SDL_sysvideo.h" | ||
| 27 | |||
| 28 | // Set up definitions for Vivante EGL | ||
| 29 | #include <SDL3/SDL_egl.h> | ||
| 30 | |||
| 31 | #ifdef SDL_VIDEO_DRIVER_VIVANTE_VDK | ||
| 32 | #include <gc_vdk.h> | ||
| 33 | #else | ||
| 34 | #include <EGL/egl.h> | ||
| 35 | #endif | ||
| 36 | |||
| 37 | struct SDL_VideoData | ||
| 38 | { | ||
| 39 | #ifdef SDL_VIDEO_DRIVER_VIVANTE_VDK | ||
| 40 | vdkPrivate vdk_private; | ||
| 41 | #else | ||
| 42 | SDL_SharedObject *egl_handle; // EGL shared library handle | ||
| 43 | EGLNativeDisplayType(EGLAPIENTRY *fbGetDisplay)(void *context); | ||
| 44 | EGLNativeDisplayType(EGLAPIENTRY *fbGetDisplayByIndex)(int DisplayIndex); | ||
| 45 | void(EGLAPIENTRY *fbGetDisplayGeometry)(EGLNativeDisplayType Display, int *Width, int *Height); | ||
| 46 | void(EGLAPIENTRY *fbGetDisplayInfo)(EGLNativeDisplayType Display, int *Width, int *Height, unsigned long *Physical, int *Stride, int *bits_per_pixel); | ||
| 47 | void(EGLAPIENTRY *fbDestroyDisplay)(EGLNativeDisplayType Display); | ||
| 48 | EGLNativeWindowType(EGLAPIENTRY *fbCreateWindow)(EGLNativeDisplayType Display, int X, int Y, int Width, int Height); | ||
| 49 | void(EGLAPIENTRY *fbGetWindowGeometry)(EGLNativeWindowType Window, int *X, int *Y, int *Width, int *Height); | ||
| 50 | void(EGLAPIENTRY *fbGetWindowInfo)(EGLNativeWindowType Window, int *X, int *Y, int *Width, int *Height, int *bits_per_pixel, unsigned int *Offset); | ||
| 51 | void(EGLAPIENTRY *fbDestroyWindow)(EGLNativeWindowType Window); | ||
| 52 | #endif | ||
| 53 | }; | ||
| 54 | |||
| 55 | struct SDL_DisplayData | ||
| 56 | { | ||
| 57 | EGLNativeDisplayType native_display; | ||
| 58 | }; | ||
| 59 | |||
| 60 | struct SDL_WindowData | ||
| 61 | { | ||
| 62 | EGLNativeWindowType native_window; | ||
| 63 | EGLSurface egl_surface; | ||
| 64 | }; | ||
| 65 | |||
| 66 | /****************************************************************************/ | ||
| 67 | // SDL_VideoDevice functions declaration | ||
| 68 | /****************************************************************************/ | ||
| 69 | |||
| 70 | // Display and window functions | ||
| 71 | bool VIVANTE_VideoInit(SDL_VideoDevice *_this); | ||
| 72 | void VIVANTE_VideoQuit(SDL_VideoDevice *_this); | ||
| 73 | bool VIVANTE_GetDisplayModes(SDL_VideoDevice *_this, SDL_VideoDisplay *display); | ||
| 74 | bool VIVANTE_SetDisplayMode(SDL_VideoDevice *_this, SDL_VideoDisplay *display, SDL_DisplayMode *mode); | ||
| 75 | bool VIVANTE_CreateWindow(SDL_VideoDevice *_this, SDL_Window *window, SDL_PropertiesID create_props); | ||
| 76 | void VIVANTE_SetWindowTitle(SDL_VideoDevice *_this, SDL_Window *window); | ||
| 77 | bool VIVANTE_SetWindowPosition(SDL_VideoDevice *_this, SDL_Window *window); | ||
| 78 | void VIVANTE_SetWindowSize(SDL_VideoDevice *_this, SDL_Window *window); | ||
| 79 | void VIVANTE_ShowWindow(SDL_VideoDevice *_this, SDL_Window *window); | ||
| 80 | void VIVANTE_HideWindow(SDL_VideoDevice *_this, SDL_Window *window); | ||
| 81 | void VIVANTE_DestroyWindow(SDL_VideoDevice *_this, SDL_Window *window); | ||
| 82 | |||
| 83 | // Event functions | ||
| 84 | void VIVANTE_PumpEvents(SDL_VideoDevice *_this); | ||
| 85 | |||
| 86 | #endif // SDL_vivantevideo_h_ | ||
