src/video/pandora/SDL_pandora.h
author Sam Lantinga
Sat, 02 Jan 2016 10:10:34 -0800
changeset 9998 f67cf37e9cd4
parent 9619 b94b6d0bff0f
child 10207 e66f6ab2b059
permissions -rw-r--r--
Updated copyright to 2016
slouken@3161
     1
/*
slouken@5535
     2
  Simple DirectMedia Layer
slouken@9998
     3
  Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
slouken@3161
     4
slouken@5535
     5
  This software is provided 'as-is', without any express or implied
slouken@5535
     6
  warranty.  In no event will the authors be held liable for any damages
slouken@5535
     7
  arising from the use of this software.
slouken@3161
     8
slouken@5535
     9
  Permission is granted to anyone to use this software for any purpose,
slouken@5535
    10
  including commercial applications, and to alter it and redistribute it
slouken@5535
    11
  freely, subject to the following restrictions:
slouken@3161
    12
slouken@5535
    13
  1. The origin of this software must not be misrepresented; you must not
slouken@5535
    14
     claim that you wrote the original software. If you use this software
slouken@5535
    15
     in a product, an acknowledgment in the product documentation would be
slouken@5535
    16
     appreciated but is not required.
slouken@5535
    17
  2. Altered source versions must be plainly marked as such, and must not be
slouken@5535
    18
     misrepresented as being the original software.
slouken@5535
    19
  3. This notice may not be removed or altered from any source distribution.
slouken@3161
    20
*/
slouken@3161
    21
slouken@3161
    22
#ifndef __SDL_PANDORA_H__
slouken@3161
    23
#define __SDL_PANDORA_H__
slouken@3161
    24
slouken@3161
    25
#include <GLES/egl.h>
slouken@3161
    26
icculus@8093
    27
#include "../../SDL_internal.h"
slouken@3161
    28
#include "../SDL_sysvideo.h"
slouken@3161
    29
slouken@3161
    30
typedef struct SDL_VideoData
slouken@3161
    31
{
slouken@3161
    32
    SDL_bool egl_initialized;   /* OpenGL ES device initialization status */
slouken@3161
    33
    EGLDisplay egl_display;     /* OpenGL ES display connection           */
slouken@3161
    34
    uint32_t egl_refcount;      /* OpenGL ES reference count              */
slouken@3161
    35
    uint32_t swapinterval;      /* OpenGL ES default swap interval        */
slouken@3161
    36
slouken@3161
    37
} SDL_VideoData;
slouken@3161
    38
slouken@3161
    39
slouken@3161
    40
typedef struct SDL_DisplayData
slouken@3161
    41
{
slouken@3161
    42
slouken@3161
    43
} SDL_DisplayData;
slouken@3161
    44
slouken@3161
    45
slouken@3161
    46
typedef struct SDL_WindowData
slouken@3161
    47
{
slouken@3161
    48
    SDL_bool uses_gles;         /* if true window must support OpenGL ES */
slouken@3161
    49
slouken@3161
    50
    EGLConfig gles_configs[32];
slouken@3161
    51
    EGLint gles_config;         /* OpenGL ES configuration index      */
slouken@3161
    52
    EGLContext gles_context;    /* OpenGL ES context                  */
slouken@3161
    53
    EGLint gles_attributes[256];        /* OpenGL ES attributes for context   */
slouken@3161
    54
    EGLSurface gles_surface;    /* OpenGL ES target rendering surface */
slouken@3161
    55
slouken@3161
    56
} SDL_WindowData;
slouken@3161
    57
slouken@3161
    58
slouken@3161
    59
/****************************************************************************/
slouken@3161
    60
/* SDL_VideoDevice functions declaration                                    */
slouken@3161
    61
/****************************************************************************/
slouken@3161
    62
slouken@3161
    63
/* Display and window functions */
slouken@3161
    64
int PND_videoinit(_THIS);
slouken@3161
    65
void PND_videoquit(_THIS);
slouken@4471
    66
void PND_getdisplaymodes(_THIS, SDL_VideoDisplay * display);
slouken@4471
    67
int PND_setdisplaymode(_THIS, SDL_VideoDisplay * display, SDL_DisplayMode * mode);
slouken@3161
    68
int PND_createwindow(_THIS, SDL_Window * window);
slouken@3161
    69
int PND_createwindowfrom(_THIS, SDL_Window * window, const void *data);
slouken@3161
    70
void PND_setwindowtitle(_THIS, SDL_Window * window);
slouken@3161
    71
void PND_setwindowicon(_THIS, SDL_Window * window, SDL_Surface * icon);
slouken@3161
    72
void PND_setwindowposition(_THIS, SDL_Window * window);
slouken@3161
    73
void PND_setwindowsize(_THIS, SDL_Window * window);
slouken@3161
    74
void PND_showwindow(_THIS, SDL_Window * window);
slouken@3161
    75
void PND_hidewindow(_THIS, SDL_Window * window);
slouken@3161
    76
void PND_raisewindow(_THIS, SDL_Window * window);
slouken@3161
    77
void PND_maximizewindow(_THIS, SDL_Window * window);
slouken@3161
    78
void PND_minimizewindow(_THIS, SDL_Window * window);
slouken@3161
    79
void PND_restorewindow(_THIS, SDL_Window * window);
slouken@3161
    80
void PND_setwindowgrab(_THIS, SDL_Window * window);
slouken@3161
    81
void PND_destroywindow(_THIS, SDL_Window * window);
slouken@3161
    82
slouken@3161
    83
/* Window manager function */
slouken@3161
    84
SDL_bool PND_getwindowwminfo(_THIS, SDL_Window * window,
slouken@3161
    85
                             struct SDL_SysWMinfo *info);
slouken@3161
    86
slouken@3161
    87
/* OpenGL/OpenGL ES functions */
slouken@3161
    88
int PND_gl_loadlibrary(_THIS, const char *path);
slouken@3161
    89
void *PND_gl_getprocaddres(_THIS, const char *proc);
slouken@3161
    90
void PND_gl_unloadlibrary(_THIS);
slouken@3161
    91
SDL_GLContext PND_gl_createcontext(_THIS, SDL_Window * window);
slouken@3161
    92
int PND_gl_makecurrent(_THIS, SDL_Window * window, SDL_GLContext context);
slouken@3161
    93
int PND_gl_setswapinterval(_THIS, int interval);
slouken@3161
    94
int PND_gl_getswapinterval(_THIS);
slouken@3161
    95
void PND_gl_swapwindow(_THIS, SDL_Window * window);
slouken@3161
    96
void PND_gl_deletecontext(_THIS, SDL_GLContext context);
slouken@3161
    97
slouken@3161
    98
slouken@3161
    99
#endif /* __SDL_PANDORA_H__ */
slouken@3161
   100
slouken@3161
   101
/* vi: set ts=4 sw=4 expandtab: */