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 {
62  EGLSurface egl_surface;
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: */
void VIVANTE_SetWindowTitle(_THIS, SDL_Window *window)
void VIVANTE_SetWindowPosition(_THIS, SDL_Window *window)
int int * Height
int VIVANTE_VideoInit(_THIS)
void * EGLSurface
Definition: egl.h:59
HWND EGLNativeWindowType
Definition: eglplatform.h:78
struct wl_display * display
HDC EGLNativeDisplayType
Definition: eglplatform.h:76
void VIVANTE_ShowWindow(_THIS, SDL_Window *window)
void VIVANTE_PumpEvents(_THIS)
The structure that defines a display mode.
Definition: SDL_video.h:53
int VIVANTE_CreateWindow(_THIS, SDL_Window *window)
int int unsigned long int * Stride
EGLNativeDisplayType(EGLAPIENTRY *fbGetDisplay)(void *context)
#define EGLAPIENTRY
Definition: eglplatform.h:54
#define _THIS
int int unsigned long int int * BitsPerPixel
int VIVANTE_SetDisplayMode(_THIS, SDL_VideoDisplay *display, SDL_DisplayMode *mode)
EGLNativeWindowType(EGLAPIENTRY *fbCreateWindow)(EGLNativeDisplayType Display
GLenum mode
SDL_bool VIVANTE_GetWindowWMInfo(_THIS, SDL_Window *window, struct SDL_SysWMinfo *info)
int int int int int unsigned int * Offset
SDL_bool
Definition: SDL_stdinc.h:139
void(EGLAPIENTRY *fbGetDisplayGeometry)(EGLNativeDisplayType Display
int int unsigned long * Physical
EGLNativeWindowType native_window
EGLSurface EGLNativeWindowType * window
Definition: eglext.h:1025
void VIVANTE_SetWindowSize(_THIS, SDL_Window *window)
void VIVANTE_DestroyWindow(_THIS, SDL_Window *window)
The type used to identify a window.
Definition: SDL_sysvideo.h:73
void VIVANTE_VideoQuit(_THIS)
EGLContext context
EGLNativeDisplayType native_display
void VIVANTE_GetDisplayModes(_THIS, SDL_VideoDisplay *display)
void VIVANTE_HideWindow(_THIS, SDL_Window *window)