src/video/psp/SDL_pspvideo.h
author Sam Lantinga <slouken@libsdl.org>
Fri, 09 Dec 2016 01:47:43 -0800
changeset 10690 23a825f341e6
parent 9998 f67cf37e9cd4
child 10737 3406a0f8b041
permissions -rw-r--r--
Fixed bug 3513 - SDL_GL_SwapWindow does not return error status

Return an error code from SDL_GL_SwapWindow(), like the other SDL APIs.
kimonline@7009
     1
/*
kimonline@7009
     2
  Simple DirectMedia Layer
slouken@9998
     3
  Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
kimonline@7009
     4
kimonline@7009
     5
  This software is provided 'as-is', without any express or implied
kimonline@7009
     6
  warranty.  In no event will the authors be held liable for any damages
kimonline@7009
     7
  arising from the use of this software.
kimonline@7009
     8
kimonline@7009
     9
  Permission is granted to anyone to use this software for any purpose,
kimonline@7009
    10
  including commercial applications, and to alter it and redistribute it
kimonline@7009
    11
  freely, subject to the following restrictions:
kimonline@7009
    12
kimonline@7009
    13
  1. The origin of this software must not be misrepresented; you must not
kimonline@7009
    14
     claim that you wrote the original software. If you use this software
kimonline@7009
    15
     in a product, an acknowledgment in the product documentation would be
kimonline@7009
    16
     appreciated but is not required.
kimonline@7009
    17
  2. Altered source versions must be plainly marked as such, and must not be
kimonline@7009
    18
     misrepresented as being the original software.
kimonline@7009
    19
  3. This notice may not be removed or altered from any source distribution.
kimonline@7009
    20
*/
kimonline@7009
    21
philipp@9325
    22
#ifndef _SDL_pspvideo_h
philipp@9325
    23
#define _SDL_pspvideo_h
kimonline@7009
    24
kimonline@7009
    25
#include <GLES/egl.h>
kimonline@7009
    26
icculus@8093
    27
#include "../../SDL_internal.h"
kimonline@7009
    28
#include "../SDL_sysvideo.h"
kimonline@7009
    29
kimonline@7009
    30
typedef struct SDL_VideoData
kimonline@7009
    31
{
kimonline@7009
    32
    SDL_bool egl_initialized;   /* OpenGL ES device initialization status */
kimonline@7009
    33
    uint32_t egl_refcount;      /* OpenGL ES reference count              */
slouken@7191
    34
kimonline@7009
    35
kimonline@7009
    36
kimonline@7009
    37
} SDL_VideoData;
kimonline@7009
    38
kimonline@7009
    39
kimonline@7009
    40
typedef struct SDL_DisplayData
kimonline@7009
    41
{
kimonline@7009
    42
kimonline@7009
    43
} SDL_DisplayData;
kimonline@7009
    44
kimonline@7009
    45
kimonline@7009
    46
typedef struct SDL_WindowData
kimonline@7009
    47
{
kimonline@7009
    48
    SDL_bool uses_gles;         /* if true window must support OpenGL ES */
slouken@7191
    49
kimonline@7009
    50
} SDL_WindowData;
kimonline@7009
    51
kimonline@7009
    52
kimonline@7009
    53
kimonline@7009
    54
kimonline@7009
    55
/****************************************************************************/
kimonline@7009
    56
/* SDL_VideoDevice functions declaration                                    */
kimonline@7009
    57
/****************************************************************************/
kimonline@7009
    58
kimonline@7009
    59
/* Display and window functions */
kimonline@7009
    60
int PSP_VideoInit(_THIS);
kimonline@7009
    61
void PSP_VideoQuit(_THIS);
kimonline@7009
    62
void PSP_GetDisplayModes(_THIS, SDL_VideoDisplay * display);
kimonline@7009
    63
int PSP_SetDisplayMode(_THIS, SDL_VideoDisplay * display, SDL_DisplayMode * mode);
kimonline@7009
    64
int PSP_CreateWindow(_THIS, SDL_Window * window);
kimonline@7009
    65
int PSP_CreateWindowFrom(_THIS, SDL_Window * window, const void *data);
kimonline@7009
    66
void PSP_SetWindowTitle(_THIS, SDL_Window * window);
kimonline@7009
    67
void PSP_SetWindowIcon(_THIS, SDL_Window * window, SDL_Surface * icon);
kimonline@7009
    68
void PSP_SetWindowPosition(_THIS, SDL_Window * window);
kimonline@7009
    69
void PSP_SetWindowSize(_THIS, SDL_Window * window);
kimonline@7009
    70
void PSP_ShowWindow(_THIS, SDL_Window * window);
kimonline@7009
    71
void PSP_HideWindow(_THIS, SDL_Window * window);
kimonline@7009
    72
void PSP_RaiseWindow(_THIS, SDL_Window * window);
kimonline@7009
    73
void PSP_MaximizeWindow(_THIS, SDL_Window * window);
kimonline@7009
    74
void PSP_MinimizeWindow(_THIS, SDL_Window * window);
kimonline@7009
    75
void PSP_RestoreWindow(_THIS, SDL_Window * window);
kimonline@7009
    76
void PSP_SetWindowGrab(_THIS, SDL_Window * window, SDL_bool grabbed);
kimonline@7009
    77
void PSP_DestroyWindow(_THIS, SDL_Window * window);
kimonline@7009
    78
kimonline@7009
    79
/* Window manager function */
kimonline@7009
    80
SDL_bool PSP_GetWindowWMInfo(_THIS, SDL_Window * window,
kimonline@7009
    81
                             struct SDL_SysWMinfo *info);
kimonline@7009
    82
kimonline@7009
    83
/* OpenGL/OpenGL ES functions */
kimonline@7009
    84
int PSP_GL_LoadLibrary(_THIS, const char *path);
kimonline@7009
    85
void *PSP_GL_GetProcAddress(_THIS, const char *proc);
kimonline@7009
    86
void PSP_GL_UnloadLibrary(_THIS);
kimonline@7009
    87
SDL_GLContext PSP_GL_CreateContext(_THIS, SDL_Window * window);
kimonline@7009
    88
int PSP_GL_MakeCurrent(_THIS, SDL_Window * window, SDL_GLContext context);
kimonline@7009
    89
int PSP_GL_SetSwapInterval(_THIS, int interval);
kimonline@7009
    90
int PSP_GL_GetSwapInterval(_THIS);
slouken@10690
    91
int PSP_GL_SwapWindow(_THIS, SDL_Window * window);
kimonline@7009
    92
void PSP_GL_DeleteContext(_THIS, SDL_GLContext context);
kimonline@7009
    93
gabomdq@7678
    94
/* PSP on screen keyboard */
philipp@7135
    95
SDL_bool PSP_HasScreenKeyboardSupport(_THIS);
philipp@7135
    96
void PSP_ShowScreenKeyboard(_THIS, SDL_Window *window);
philipp@7135
    97
void PSP_HideScreenKeyboard(_THIS, SDL_Window *window);
philipp@7135
    98
SDL_bool PSP_IsScreenKeyboardShown(_THIS, SDL_Window *window);
slouken@7191
    99
philipp@9325
   100
#endif /* _SDL_pspvideo_h */
kimonline@7009
   101
kimonline@7009
   102
/* vi: set ts=4 sw=4 expandtab: */