src/video/pandora/SDL_pandora.h
changeset 3161 494559cc723b
child 3697 f7b03b6838cb
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/src/video/pandora/SDL_pandora.h	Sun May 31 11:53:12 2009 +0000
     1.3 @@ -0,0 +1,110 @@
     1.4 +/*
     1.5 +    SDL - Simple DirectMedia Layer
     1.6 +    Copyright (C) 1997-2009 Sam Lantinga
     1.7 +
     1.8 +    This library is free software; you can redistribute it and/or
     1.9 +    modify it under the terms of the GNU Lesser General Public
    1.10 +    License as published by the Free Software Foundation; either
    1.11 +    version 2.1 of the License, or (at your option) any later version.
    1.12 +
    1.13 +    This library is distributed in the hope that it will be useful,
    1.14 +    but WITHOUT ANY WARRANTY; without even the implied warranty of
    1.15 +    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    1.16 +    Lesser General Public License for more details.
    1.17 +
    1.18 +    You should have received a copy of the GNU Lesser General Public
    1.19 +    License along with this library; if not, write to the Free Software
    1.20 +    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
    1.21 +
    1.22 +    Sam Lantinga
    1.23 +    slouken@libsdl.org
    1.24 +
    1.25 +    Open Pandora SDL driver
    1.26 +    Copyright (C) 2009 David Carré
    1.27 +    (cpasjuste@gmail.com)
    1.28 +*/
    1.29 +
    1.30 +#ifndef __SDL_PANDORA_H__
    1.31 +#define __SDL_PANDORA_H__
    1.32 +
    1.33 +#include <GLES/egl.h>
    1.34 +
    1.35 +#include "SDL_config.h"
    1.36 +#include "../SDL_sysvideo.h"
    1.37 +
    1.38 +typedef struct SDL_VideoData
    1.39 +{
    1.40 +    SDL_bool egl_initialized;   /* OpenGL ES device initialization status */
    1.41 +    EGLDisplay egl_display;     /* OpenGL ES display connection           */
    1.42 +    uint32_t egl_refcount;      /* OpenGL ES reference count              */
    1.43 +    uint32_t swapinterval;      /* OpenGL ES default swap interval        */
    1.44 +
    1.45 +} SDL_VideoData;
    1.46 +
    1.47 +
    1.48 +typedef struct SDL_DisplayData
    1.49 +{
    1.50 +
    1.51 +} SDL_DisplayData;
    1.52 +
    1.53 +
    1.54 +typedef struct SDL_WindowData
    1.55 +{
    1.56 +    SDL_bool uses_gles;         /* if true window must support OpenGL ES */
    1.57 +
    1.58 +    EGLConfig gles_configs[32];
    1.59 +    EGLint gles_config;         /* OpenGL ES configuration index      */
    1.60 +    EGLContext gles_context;    /* OpenGL ES context                  */
    1.61 +    EGLint gles_attributes[256];        /* OpenGL ES attributes for context   */
    1.62 +    EGLSurface gles_surface;    /* OpenGL ES target rendering surface */
    1.63 +
    1.64 +} SDL_WindowData;
    1.65 +
    1.66 +
    1.67 +/****************************************************************************/
    1.68 +/* SDL_VideoDevice functions declaration                                    */
    1.69 +/****************************************************************************/
    1.70 +
    1.71 +/* Display and window functions */
    1.72 +int PND_videoinit(_THIS);
    1.73 +void PND_videoquit(_THIS);
    1.74 +void PND_getdisplaymodes(_THIS);
    1.75 +int PND_setdisplaymode(_THIS, SDL_DisplayMode * mode);
    1.76 +int PND_setdisplaypalette(_THIS, SDL_Palette * palette);
    1.77 +int PND_getdisplaypalette(_THIS, SDL_Palette * palette);
    1.78 +int PND_setdisplaygammaramp(_THIS, Uint16 * ramp);
    1.79 +int PND_getdisplaygammaramp(_THIS, Uint16 * ramp);
    1.80 +int PND_createwindow(_THIS, SDL_Window * window);
    1.81 +int PND_createwindowfrom(_THIS, SDL_Window * window, const void *data);
    1.82 +void PND_setwindowtitle(_THIS, SDL_Window * window);
    1.83 +void PND_setwindowicon(_THIS, SDL_Window * window, SDL_Surface * icon);
    1.84 +void PND_setwindowposition(_THIS, SDL_Window * window);
    1.85 +void PND_setwindowsize(_THIS, SDL_Window * window);
    1.86 +void PND_showwindow(_THIS, SDL_Window * window);
    1.87 +void PND_hidewindow(_THIS, SDL_Window * window);
    1.88 +void PND_raisewindow(_THIS, SDL_Window * window);
    1.89 +void PND_maximizewindow(_THIS, SDL_Window * window);
    1.90 +void PND_minimizewindow(_THIS, SDL_Window * window);
    1.91 +void PND_restorewindow(_THIS, SDL_Window * window);
    1.92 +void PND_setwindowgrab(_THIS, SDL_Window * window);
    1.93 +void PND_destroywindow(_THIS, SDL_Window * window);
    1.94 +
    1.95 +/* Window manager function */
    1.96 +SDL_bool PND_getwindowwminfo(_THIS, SDL_Window * window,
    1.97 +                             struct SDL_SysWMinfo *info);
    1.98 +
    1.99 +/* OpenGL/OpenGL ES functions */
   1.100 +int PND_gl_loadlibrary(_THIS, const char *path);
   1.101 +void *PND_gl_getprocaddres(_THIS, const char *proc);
   1.102 +void PND_gl_unloadlibrary(_THIS);
   1.103 +SDL_GLContext PND_gl_createcontext(_THIS, SDL_Window * window);
   1.104 +int PND_gl_makecurrent(_THIS, SDL_Window * window, SDL_GLContext context);
   1.105 +int PND_gl_setswapinterval(_THIS, int interval);
   1.106 +int PND_gl_getswapinterval(_THIS);
   1.107 +void PND_gl_swapwindow(_THIS, SDL_Window * window);
   1.108 +void PND_gl_deletecontext(_THIS, SDL_GLContext context);
   1.109 +
   1.110 +
   1.111 +#endif /* __SDL_PANDORA_H__ */
   1.112 +
   1.113 +/* vi: set ts=4 sw=4 expandtab: */