SDL  2.0
SDL_vivantevideo.h
Go to the documentation of this file.
1 /*
2  Simple DirectMedia Layer
3  Copyright (C) 1997-2018 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 #ifndef SDL_vivantevideo_h_
23 #define SDL_vivantevideo_h_
24 
25 #include "../../SDL_internal.h"
26 #include "../SDL_sysvideo.h"
27 
28 #include "SDL_egl.h"
29 
30 #if SDL_VIDEO_DRIVER_VIVANTE_VDK
31 #include <gc_vdk.h>
32 #else
33 #include <EGL/egl.h>
34 #endif
35 
36 typedef struct SDL_VideoData
37 {
38 #if SDL_VIDEO_DRIVER_VIVANTE_VDK
39  vdkPrivate vdk_private;
40 #else
41  void *egl_handle; /* EGL shared library handle */
42  EGLNativeDisplayType (EGLAPIENTRY *fbGetDisplay)(void *context);
43  EGLNativeDisplayType (EGLAPIENTRY *fbGetDisplayByIndex)(int DisplayIndex);
44  void (EGLAPIENTRY *fbGetDisplayGeometry)(EGLNativeDisplayType Display, int *Width, int *Height);
45  void (EGLAPIENTRY *fbGetDisplayInfo)(EGLNativeDisplayType Display, int *Width, int *Height, unsigned long *Physical, int *Stride, int *BitsPerPixel);
46  void (EGLAPIENTRY *fbDestroyDisplay)(EGLNativeDisplayType Display);
47  EGLNativeWindowType (EGLAPIENTRY *fbCreateWindow)(EGLNativeDisplayType Display, int X, int Y, int Width, int Height);
48  void (EGLAPIENTRY *fbGetWindowGeometry)(EGLNativeWindowType Window, int *X, int *Y, int *Width, int *Height);
49  void (EGLAPIENTRY *fbGetWindowInfo)(EGLNativeWindowType Window, int *X, int *Y, int *Width, int *Height, int *BitsPerPixel, unsigned int *Offset);
50  void (EGLAPIENTRY *fbDestroyWindow)(EGLNativeWindowType Window);
51 #endif
53 
54 typedef struct SDL_DisplayData
55 {
58 
59 typedef struct SDL_WindowData
60 {
64 
65 /****************************************************************************/
66 /* SDL_VideoDevice functions declaration */
67 /****************************************************************************/
68 
69 /* Display and window functions */
81 
82 /* Window manager function */
84  struct SDL_SysWMinfo *info);
85 
86 /* Event functions */
88 
89 #endif /* SDL_vivantevideo_h_ */
90 
91 /* vi: set ts=4 sw=4 expandtab: */
VIVANTE_GetWindowWMInfo
SDL_bool VIVANTE_GetWindowWMInfo(_THIS, SDL_Window *window, struct SDL_SysWMinfo *info)
SDL_VideoData::Height
int int * Height
Definition: SDL_vivantevideo.h:44
VIVANTE_DestroyWindow
void VIVANTE_DestroyWindow(_THIS, SDL_Window *window)
mode
GLenum mode
Definition: SDL_opengl_glext.h:1122
SDL_SysWMinfo
Definition: SDL_syswm.h:195
SDL_WindowData
Definition: SDL_androidwindow.h:36
SDL_VideoData::void
void(EGLAPIENTRY *fbDestroyDisplay)(EGLNativeDisplayType Display)
VIVANTE_VideoQuit
void VIVANTE_VideoQuit(_THIS)
SDL_VideoData::Width
int * Width
Definition: SDL_vivantevideo.h:44
VIVANTE_SetWindowSize
void VIVANTE_SetWindowSize(_THIS, SDL_Window *window)
SDL_VideoData::X
int X
Definition: SDL_vivantevideo.h:47
egl.h
SDL_Window
The type used to identify a window.
Definition: SDL_sysvideo.h:74
SDL_DisplayMode
The structure that defines a display mode.
Definition: SDL_video.h:54
SDL_VideoData::BitsPerPixel
int int unsigned long int int * BitsPerPixel
Definition: SDL_vivantevideo.h:45
SDL_VideoData::Y
int int * Y
Definition: SDL_vivantevideo.h:48
VIVANTE_GetDisplayModes
void VIVANTE_GetDisplayModes(_THIS, SDL_VideoDisplay *display)
SDL_VideoData::void
void(EGLAPIENTRY *fbGetDisplayGeometry)(EGLNativeDisplayType Display
VIVANTE_SetWindowTitle
void VIVANTE_SetWindowTitle(_THIS, SDL_Window *window)
window
EGLSurface EGLNativeWindowType * window
Definition: eglext.h:1025
SDL_VideoData::EGLNativeWindowType
EGLNativeWindowType(EGLAPIENTRY *fbCreateWindow)(EGLNativeDisplayType Display
VIVANTE_VideoInit
int VIVANTE_VideoInit(_THIS)
SDL_VideoData::Y
int int Y
Definition: SDL_vivantevideo.h:47
VIVANTE_ShowWindow
void VIVANTE_ShowWindow(_THIS, SDL_Window *window)
_THIS
#define _THIS
Definition: SDL_alsa_audio.h:31
VIVANTE_HideWindow
void VIVANTE_HideWindow(_THIS, SDL_Window *window)
SDL_VideoData::Stride
int int unsigned long int * Stride
Definition: SDL_vivantevideo.h:45
SDL_VideoData::void
void(EGLAPIENTRY *fbGetWindowInfo)(EGLNativeWindowType Window
VIVANTE_SetWindowPosition
void VIVANTE_SetWindowPosition(_THIS, SDL_Window *window)
SDL_DisplayData
Definition: SDL_cocoamodes.h:27
SDL_VideoData::context
EGLContext context
Definition: SDL_waylandvideo.h:66
SDL_VideoData::EGLNativeDisplayType
EGLNativeDisplayType(EGLAPIENTRY *fbGetDisplayByIndex)(int DisplayIndex)
SDL_VideoData::EGLNativeDisplayType
EGLNativeDisplayType(EGLAPIENTRY *fbGetDisplay)(void *context)
SDL_VideoData::egl_handle
void * egl_handle
Definition: SDL_vivantevideo.h:41
SDL_VideoData::void
void(EGLAPIENTRY *fbDestroyWindow)(EGLNativeWindowType Window)
EGLNativeWindowType
HWND EGLNativeWindowType
Definition: eglplatform.h:78
SDL_VideoDisplay
Definition: SDL_sysvideo.h:126
EGLAPIENTRY
#define EGLAPIENTRY
Definition: eglplatform.h:54
VIVANTE_PumpEvents
void VIVANTE_PumpEvents(_THIS)
SDL_VideoData::void
void(EGLAPIENTRY *fbGetDisplayInfo)(EGLNativeDisplayType Display
VIVANTE_CreateWindow
int VIVANTE_CreateWindow(_THIS, SDL_Window *window)
SDL_bool
SDL_bool
Definition: SDL_stdinc.h:162
EGLNativeDisplayType
HDC EGLNativeDisplayType
Definition: eglplatform.h:76
EGLSurface
void * EGLSurface
Definition: egl.h:59
SDL_VideoData::Physical
int int unsigned long * Physical
Definition: SDL_vivantevideo.h:45
VIVANTE_SetDisplayMode
int VIVANTE_SetDisplayMode(_THIS, SDL_VideoDisplay *display, SDL_DisplayMode *mode)
SDL_VideoData::Offset
int int int int int unsigned int * Offset
Definition: SDL_vivantevideo.h:49
SDL_WindowData::egl_surface
EGLSurface egl_surface
Definition: SDL_androidwindow.h:37
SDL_DisplayData::native_display
EGLNativeDisplayType native_display
Definition: SDL_vivantevideo.h:56
SDL_egl.h
SDL_WindowData::native_window
EGLNativeWindowType native_window
Definition: SDL_vivantevideo.h:61
SDL_VideoData
Definition: SDL_androidvideo.h:36