misc/winutils/include/SDL_video.h
author alfadur
Mon, 10 Sep 2018 23:31:44 +0300
changeset 13807 24fe56d3c6a2
parent 10017 de822cd3df3a
permissions -rw-r--r--
improve error handling for TLS handshake
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
6560
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
     1
/*
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
     2
    SDL - Simple DirectMedia Layer
7809
7d4fb2f35f4f update SDL headers for winutils
koda
parents: 6560
diff changeset
     3
    Copyright (C) 1997-2012 Sam Lantinga
6560
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
     4
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
     5
    This library is free software; you can redistribute it and/or
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
     6
    modify it under the terms of the GNU Lesser General Public
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
     7
    License as published by the Free Software Foundation; either
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
     8
    version 2.1 of the License, or (at your option) any later version.
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
     9
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    10
    This library is distributed in the hope that it will be useful,
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    11
    but WITHOUT ANY WARRANTY; without even the implied warranty of
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    12
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    13
    Lesser General Public License for more details.
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    14
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    15
    You should have received a copy of the GNU Lesser General Public
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    16
    License along with this library; if not, write to the Free Software
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    17
    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    18
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    19
    Sam Lantinga
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    20
    slouken@libsdl.org
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    21
*/
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    22
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    23
/** @file SDL_video.h
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    24
 *  Header file for access to the SDL raw framebuffer window
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    25
 */
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    26
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    27
#ifndef _SDL_video_h
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    28
#define _SDL_video_h
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    29
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    30
#include "SDL_stdinc.h"
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    31
#include "SDL_error.h"
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    32
#include "SDL_rwops.h"
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    33
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    34
#include "begin_code.h"
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    35
/* Set up for C function definitions, even when using C++ */
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    36
#ifdef __cplusplus
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    37
extern "C" {
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    38
#endif
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    39
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    40
/** @name Transparency definitions
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    41
 *  These define alpha as the opacity of a surface
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    42
 */
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    43
/*@{*/
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    44
#define SDL_ALPHA_OPAQUE 255
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    45
#define SDL_ALPHA_TRANSPARENT 0
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    46
/*@}*/
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    47
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    48
/** @name Useful data types */
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    49
/*@{*/
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    50
typedef struct SDL_Rect {
10017
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
    51
    Sint16 x, y;
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
    52
    Uint16 w, h;
6560
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    53
} SDL_Rect;
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    54
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    55
typedef struct SDL_Color {
10017
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
    56
    Uint8 r;
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
    57
    Uint8 g;
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
    58
    Uint8 b;
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
    59
    Uint8 unused;
6560
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    60
} SDL_Color;
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    61
#define SDL_Colour SDL_Color
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    62
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    63
typedef struct SDL_Palette {
10017
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
    64
    int       ncolors;
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
    65
    SDL_Color *colors;
6560
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    66
} SDL_Palette;
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    67
/*@}*/
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    68
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    69
/** Everything in the pixel format structure is read-only */
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    70
typedef struct SDL_PixelFormat {
10017
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
    71
    SDL_Palette *palette;
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
    72
    Uint8  BitsPerPixel;
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
    73
    Uint8  BytesPerPixel;
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
    74
    Uint8  Rloss;
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
    75
    Uint8  Gloss;
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
    76
    Uint8  Bloss;
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
    77
    Uint8  Aloss;
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
    78
    Uint8  Rshift;
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
    79
    Uint8  Gshift;
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
    80
    Uint8  Bshift;
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
    81
    Uint8  Ashift;
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
    82
    Uint32 Rmask;
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
    83
    Uint32 Gmask;
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
    84
    Uint32 Bmask;
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
    85
    Uint32 Amask;
6560
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    86
10017
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
    87
    /** RGB color key information */
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
    88
    Uint32 colorkey;
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
    89
    /** Alpha value information (per-surface alpha) */
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
    90
    Uint8  alpha;
6560
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    91
} SDL_PixelFormat;
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    92
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    93
/** This structure should be treated as read-only, except for 'pixels',
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    94
 *  which, if not NULL, contains the raw pixel data for the surface.
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    95
 */
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
    96
typedef struct SDL_Surface {
10017
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
    97
    Uint32 flags;               /**< Read-only */
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
    98
    SDL_PixelFormat *format;        /**< Read-only */
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
    99
    int w, h;               /**< Read-only */
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
   100
    Uint16 pitch;               /**< Read-only */
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
   101
    void *pixels;               /**< Read-write */
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
   102
    int offset;             /**< Private */
6560
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   103
10017
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
   104
    /** Hardware-specific surface info */
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
   105
    struct private_hwdata *hwdata;
6560
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   106
10017
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
   107
    /** clipping information */
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
   108
    SDL_Rect clip_rect;         /**< Read-only */
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
   109
    Uint32 unused1;             /**< for binary compatibility */
6560
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   110
10017
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
   111
    /** Allow recursive locks */
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
   112
    Uint32 locked;              /**< Private */
6560
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   113
10017
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
   114
    /** info for fast blit mapping to other surfaces */
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
   115
    struct SDL_BlitMap *map;        /**< Private */
6560
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   116
10017
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
   117
    /** format version, bumped at every change to invalidate blit maps */
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
   118
    unsigned int format_version;        /**< Private */
6560
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   119
10017
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
   120
    /** Reference count -- used when freeing surface */
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
   121
    int refcount;               /**< Read-mostly */
6560
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   122
} SDL_Surface;
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   123
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   124
/** @name SDL_Surface Flags
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   125
 *  These are the currently supported flags for the SDL_surface
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   126
 */
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   127
/*@{*/
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   128
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   129
/** Available for SDL_CreateRGBSurface() or SDL_SetVideoMode() */
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   130
/*@{*/
10017
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
   131
#define SDL_SWSURFACE   0x00000000  /**< Surface is in system memory */
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
   132
#define SDL_HWSURFACE   0x00000001  /**< Surface is in video memory */
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
   133
#define SDL_ASYNCBLIT   0x00000004  /**< Use asynchronous blits if possible */
6560
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   134
/*@}*/
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   135
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   136
/** Available for SDL_SetVideoMode() */
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   137
/*@{*/
10017
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
   138
#define SDL_ANYFORMAT   0x10000000  /**< Allow any video depth/pixel-format */
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
   139
#define SDL_HWPALETTE   0x20000000  /**< Surface has exclusive palette */
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
   140
#define SDL_DOUBLEBUF   0x40000000  /**< Set up double-buffered video mode */
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
   141
#define SDL_FULLSCREEN  0x80000000  /**< Surface is a full screen display */
6560
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   142
#define SDL_OPENGL      0x00000002      /**< Create an OpenGL rendering context */
10017
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
   143
#define SDL_OPENGLBLIT  0x0000000A  /**< Create an OpenGL rendering context and use it for blitting */
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
   144
#define SDL_RESIZABLE   0x00000010  /**< This video mode may be resized */
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
   145
#define SDL_NOFRAME 0x00000020  /**< No window caption or edge frame */
6560
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   146
/*@}*/
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   147
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   148
/** Used internally (read-only) */
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   149
/*@{*/
10017
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
   150
#define SDL_HWACCEL 0x00000100  /**< Blit uses hardware acceleration */
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
   151
#define SDL_SRCCOLORKEY 0x00001000  /**< Blit uses a source color key */
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
   152
#define SDL_RLEACCELOK  0x00002000  /**< Private flag */
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
   153
#define SDL_RLEACCEL    0x00004000  /**< Surface is RLE encoded */
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
   154
#define SDL_SRCALPHA    0x00010000  /**< Blit uses source alpha blending */
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
   155
#define SDL_PREALLOC    0x01000000  /**< Surface uses preallocated memory */
6560
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   156
/*@}*/
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   157
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   158
/*@}*/
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   159
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   160
/** Evaluates to true if the surface needs to be locked before access */
10017
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
   161
#define SDL_MUSTLOCK(surface)   \
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
   162
  (surface->offset ||       \
6560
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   163
  ((surface->flags & (SDL_HWSURFACE|SDL_ASYNCBLIT|SDL_RLEACCEL)) != 0))
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   164
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   165
/** typedef for private surface blitting functions */
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   166
typedef int (*SDL_blit)(struct SDL_Surface *src, SDL_Rect *srcrect,
10017
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
   167
            struct SDL_Surface *dst, SDL_Rect *dstrect);
6560
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   168
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   169
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   170
/** Useful for determining the video hardware capabilities */
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   171
typedef struct SDL_VideoInfo {
10017
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
   172
    Uint32 hw_available :1; /**< Flag: Can you create hardware surfaces? */
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
   173
    Uint32 wm_available :1; /**< Flag: Can you talk to a window manager? */
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
   174
    Uint32 UnusedBits1  :6;
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
   175
    Uint32 UnusedBits2  :1;
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
   176
    Uint32 blit_hw      :1; /**< Flag: Accelerated blits HW --> HW */
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
   177
    Uint32 blit_hw_CC   :1; /**< Flag: Accelerated blits with Colorkey */
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
   178
    Uint32 blit_hw_A    :1; /**< Flag: Accelerated blits with Alpha */
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
   179
    Uint32 blit_sw      :1; /**< Flag: Accelerated blits SW --> HW */
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
   180
    Uint32 blit_sw_CC   :1; /**< Flag: Accelerated blits with Colorkey */
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
   181
    Uint32 blit_sw_A    :1; /**< Flag: Accelerated blits with Alpha */
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
   182
    Uint32 blit_fill    :1; /**< Flag: Accelerated color fill */
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
   183
    Uint32 UnusedBits3  :16;
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
   184
    Uint32 video_mem;   /**< The total amount of video memory (in K) */
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
   185
    SDL_PixelFormat *vfmt;  /**< Value: The format of the video surface */
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
   186
    int    current_w;   /**< Value: The current video mode width */
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
   187
    int    current_h;   /**< Value: The current video mode height */
6560
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   188
} SDL_VideoInfo;
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   189
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   190
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   191
/** @name Overlay Formats
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   192
 *  The most common video overlay formats.
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   193
 *  For an explanation of these pixel formats, see:
10017
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
   194
 *  http://www.webartz.com/fourcc/indexyuv.htm
6560
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   195
 *
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   196
 *  For information on the relationship between color spaces, see:
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   197
 *  http://www.neuro.sfc.keio.ac.jp/~aly/polygon/info/color-space-faq.html
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   198
 */
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   199
/*@{*/
10017
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
   200
#define SDL_YV12_OVERLAY  0x32315659    /**< Planar mode: Y + V + U  (3 planes) */
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
   201
#define SDL_IYUV_OVERLAY  0x56555949    /**< Planar mode: Y + U + V  (3 planes) */
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
   202
#define SDL_YUY2_OVERLAY  0x32595559    /**< Packed mode: Y0+U0+Y1+V0 (1 plane) */
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
   203
#define SDL_UYVY_OVERLAY  0x59565955    /**< Packed mode: U0+Y0+V0+Y1 (1 plane) */
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
   204
#define SDL_YVYU_OVERLAY  0x55595659    /**< Packed mode: Y0+V0+Y1+U0 (1 plane) */
6560
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   205
/*@}*/
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   206
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   207
/** The YUV hardware video overlay */
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   208
typedef struct SDL_Overlay {
10017
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
   209
    Uint32 format;              /**< Read-only */
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
   210
    int w, h;               /**< Read-only */
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
   211
    int planes;             /**< Read-only */
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
   212
    Uint16 *pitches;            /**< Read-only */
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
   213
    Uint8 **pixels;             /**< Read-write */
6560
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   214
10017
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
   215
    /** @name Hardware-specific surface info */
6560
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   216
        /*@{*/
10017
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
   217
    struct private_yuvhwfuncs *hwfuncs;
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
   218
    struct private_yuvhwdata *hwdata;
6560
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   219
        /*@{*/
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   220
10017
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
   221
    /** @name Special flags */
6560
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   222
        /*@{*/
10017
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
   223
    Uint32 hw_overlay :1;   /**< Flag: This overlay hardware accelerated? */
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
   224
    Uint32 UnusedBits :31;
6560
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   225
        /*@}*/
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   226
} SDL_Overlay;
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   227
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   228
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   229
/** Public enumeration for setting the OpenGL window attributes. */
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   230
typedef enum {
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   231
    SDL_GL_RED_SIZE,
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   232
    SDL_GL_GREEN_SIZE,
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   233
    SDL_GL_BLUE_SIZE,
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   234
    SDL_GL_ALPHA_SIZE,
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   235
    SDL_GL_BUFFER_SIZE,
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   236
    SDL_GL_DOUBLEBUFFER,
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   237
    SDL_GL_DEPTH_SIZE,
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   238
    SDL_GL_STENCIL_SIZE,
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   239
    SDL_GL_ACCUM_RED_SIZE,
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   240
    SDL_GL_ACCUM_GREEN_SIZE,
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   241
    SDL_GL_ACCUM_BLUE_SIZE,
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   242
    SDL_GL_ACCUM_ALPHA_SIZE,
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   243
    SDL_GL_STEREO,
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   244
    SDL_GL_MULTISAMPLEBUFFERS,
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   245
    SDL_GL_MULTISAMPLESAMPLES,
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   246
    SDL_GL_ACCELERATED_VISUAL,
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   247
    SDL_GL_SWAP_CONTROL
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   248
} SDL_GLattr;
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   249
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   250
/** @name flags for SDL_SetPalette() */
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   251
/*@{*/
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   252
#define SDL_LOGPAL 0x01
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   253
#define SDL_PHYSPAL 0x02
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   254
/*@}*/
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   255
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   256
/* Function prototypes */
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   257
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   258
/**
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   259
 * @name Video Init and Quit
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   260
 * These functions are used internally, and should not be used unless you
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   261
 * have a specific need to specify the video driver you want to use.
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   262
 * You should normally use SDL_Init() or SDL_InitSubSystem().
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   263
 */
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   264
/*@{*/
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   265
/**
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   266
 * Initializes the video subsystem. Sets up a connection
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   267
 * to the window manager, etc, and determines the current video mode and
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   268
 * pixel format, but does not initialize a window or graphics mode.
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   269
 * Note that event handling is activated by this routine.
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   270
 *
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   271
 * If you use both sound and video in your application, you need to call
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   272
 * SDL_Init() before opening the sound device, otherwise under Win32 DirectX,
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   273
 * you won't be able to set full-screen display modes.
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   274
 */
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   275
extern DECLSPEC int SDLCALL SDL_VideoInit(const char *driver_name, Uint32 flags);
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   276
extern DECLSPEC void SDLCALL SDL_VideoQuit(void);
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   277
/*@}*/
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   278
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   279
/**
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   280
 * This function fills the given character buffer with the name of the
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   281
 * video driver, and returns a pointer to it if the video driver has
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   282
 * been initialized.  It returns NULL if no driver has been initialized.
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   283
 */
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   284
extern DECLSPEC char * SDLCALL SDL_VideoDriverName(char *namebuf, int maxlen);
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   285
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   286
/**
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   287
 * This function returns a pointer to the current display surface.
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   288
 * If SDL is doing format conversion on the display surface, this
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   289
 * function returns the publicly visible surface, not the real video
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   290
 * surface.
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   291
 */
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   292
extern DECLSPEC SDL_Surface * SDLCALL SDL_GetVideoSurface(void);
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   293
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   294
/**
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   295
 * This function returns a read-only pointer to information about the
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   296
 * video hardware.  If this is called before SDL_SetVideoMode(), the 'vfmt'
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   297
 * member of the returned structure will contain the pixel format of the
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   298
 * "best" video mode.
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   299
 */
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   300
extern DECLSPEC const SDL_VideoInfo * SDLCALL SDL_GetVideoInfo(void);
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   301
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   302
/**
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   303
 * Check to see if a particular video mode is supported.
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   304
 * It returns 0 if the requested mode is not supported under any bit depth,
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   305
 * or returns the bits-per-pixel of the closest available mode with the
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   306
 * given width and height.  If this bits-per-pixel is different from the
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   307
 * one used when setting the video mode, SDL_SetVideoMode() will succeed,
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   308
 * but will emulate the requested bits-per-pixel with a shadow surface.
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   309
 *
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   310
 * The arguments to SDL_VideoModeOK() are the same ones you would pass to
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   311
 * SDL_SetVideoMode()
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   312
 */
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   313
extern DECLSPEC int SDLCALL SDL_VideoModeOK(int width, int height, int bpp, Uint32 flags);
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   314
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   315
/**
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   316
 * Return a pointer to an array of available screen dimensions for the
10017
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
   317
 * given format and video flags, sorted largest to smallest.  Returns
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
   318
 * NULL if there are no dimensions available for a particular format,
6560
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   319
 * or (SDL_Rect **)-1 if any dimension is okay for the given format.
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   320
 *
10017
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
   321
 * If 'format' is NULL, the mode list will be for the format given
6560
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   322
 * by SDL_GetVideoInfo()->vfmt
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   323
 */
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   324
extern DECLSPEC SDL_Rect ** SDLCALL SDL_ListModes(SDL_PixelFormat *format, Uint32 flags);
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   325
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   326
/**
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   327
 * Set up a video mode with the specified width, height and bits-per-pixel.
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   328
 *
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   329
 * If 'bpp' is 0, it is treated as the current display bits per pixel.
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   330
 *
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   331
 * If SDL_ANYFORMAT is set in 'flags', the SDL library will try to set the
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   332
 * requested bits-per-pixel, but will return whatever video pixel format is
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   333
 * available.  The default is to emulate the requested pixel format if it
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   334
 * is not natively available.
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   335
 *
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   336
 * If SDL_HWSURFACE is set in 'flags', the video surface will be placed in
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   337
 * video memory, if possible, and you may have to call SDL_LockSurface()
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   338
 * in order to access the raw framebuffer.  Otherwise, the video surface
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   339
 * will be created in system memory.
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   340
 *
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   341
 * If SDL_ASYNCBLIT is set in 'flags', SDL will try to perform rectangle
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   342
 * updates asynchronously, but you must always lock before accessing pixels.
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   343
 * SDL will wait for updates to complete before returning from the lock.
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   344
 *
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   345
 * If SDL_HWPALETTE is set in 'flags', the SDL library will guarantee
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   346
 * that the colors set by SDL_SetColors() will be the colors you get.
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   347
 * Otherwise, in 8-bit mode, SDL_SetColors() may not be able to set all
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   348
 * of the colors exactly the way they are requested, and you should look
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   349
 * at the video surface structure to determine the actual palette.
10017
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
   350
 * If SDL cannot guarantee that the colors you request can be set,
6560
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   351
 * i.e. if the colormap is shared, then the video surface may be created
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   352
 * under emulation in system memory, overriding the SDL_HWSURFACE flag.
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   353
 *
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   354
 * If SDL_FULLSCREEN is set in 'flags', the SDL library will try to set
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   355
 * a fullscreen video mode.  The default is to create a windowed mode
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   356
 * if the current graphics system has a window manager.
10017
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
   357
 * If the SDL library is able to set a fullscreen video mode, this flag
6560
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   358
 * will be set in the surface that is returned.
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   359
 *
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   360
 * If SDL_DOUBLEBUF is set in 'flags', the SDL library will try to set up
10017
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
   361
 * two surfaces in video memory and swap between them when you call
6560
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   362
 * SDL_Flip().  This is usually slower than the normal single-buffering
10017
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
   363
 * scheme, but prevents "tearing" artifacts caused by modifying video
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
   364
 * memory while the monitor is refreshing.  It should only be used by
6560
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   365
 * applications that redraw the entire screen on every update.
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   366
 *
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   367
 * If SDL_RESIZABLE is set in 'flags', the SDL library will allow the
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   368
 * window manager, if any, to resize the window at runtime.  When this
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   369
 * occurs, SDL will send a SDL_VIDEORESIZE event to you application,
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   370
 * and you must respond to the event by re-calling SDL_SetVideoMode()
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   371
 * with the requested size (or another size that suits the application).
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   372
 *
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   373
 * If SDL_NOFRAME is set in 'flags', the SDL library will create a window
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   374
 * without any title bar or frame decoration.  Fullscreen video modes have
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   375
 * this flag set automatically.
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   376
 *
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   377
 * This function returns the video framebuffer surface, or NULL if it fails.
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   378
 *
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   379
 * If you rely on functionality provided by certain video flags, check the
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   380
 * flags of the returned surface to make sure that functionality is available.
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   381
 * SDL will fall back to reduced functionality if the exact flags you wanted
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   382
 * are not available.
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   383
 */
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   384
extern DECLSPEC SDL_Surface * SDLCALL SDL_SetVideoMode
10017
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
   385
            (int width, int height, int bpp, Uint32 flags);
6560
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   386
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   387
/** @name SDL_Update Functions
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   388
 * These functions should not be called while 'screen' is locked.
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   389
 */
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   390
/*@{*/
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   391
/**
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   392
 * Makes sure the given list of rectangles is updated on the given screen.
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   393
 */
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   394
extern DECLSPEC void SDLCALL SDL_UpdateRects
10017
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
   395
        (SDL_Surface *screen, int numrects, SDL_Rect *rects);
6560
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   396
/**
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   397
 * If 'x', 'y', 'w' and 'h' are all 0, SDL_UpdateRect will update the entire
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   398
 * screen.
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   399
 */
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   400
extern DECLSPEC void SDLCALL SDL_UpdateRect
10017
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
   401
        (SDL_Surface *screen, Sint32 x, Sint32 y, Uint32 w, Uint32 h);
6560
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   402
/*@}*/
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   403
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   404
/**
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   405
 * On hardware that supports double-buffering, this function sets up a flip
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   406
 * and returns.  The hardware will wait for vertical retrace, and then swap
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   407
 * video buffers before the next video surface blit or lock will return.
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   408
 * On hardware that doesn not support double-buffering, this is equivalent
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   409
 * to calling SDL_UpdateRect(screen, 0, 0, 0, 0);
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   410
 * The SDL_DOUBLEBUF flag must have been passed to SDL_SetVideoMode() when
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   411
 * setting the video mode for this function to perform hardware flipping.
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   412
 * This function returns 0 if successful, or -1 if there was an error.
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   413
 */
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   414
extern DECLSPEC int SDLCALL SDL_Flip(SDL_Surface *screen);
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   415
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   416
/**
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   417
 * Set the gamma correction for each of the color channels.
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   418
 * The gamma values range (approximately) between 0.1 and 10.0
10017
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
   419
 *
6560
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   420
 * If this function isn't supported directly by the hardware, it will
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   421
 * be emulated using gamma ramps, if available.  If successful, this
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   422
 * function returns 0, otherwise it returns -1.
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   423
 */
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   424
extern DECLSPEC int SDLCALL SDL_SetGamma(float red, float green, float blue);
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   425
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   426
/**
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   427
 * Set the gamma translation table for the red, green, and blue channels
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   428
 * of the video hardware.  Each table is an array of 256 16-bit quantities,
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   429
 * representing a mapping between the input and output for that channel.
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   430
 * The input is the index into the array, and the output is the 16-bit
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   431
 * gamma value at that index, scaled to the output color precision.
10017
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
   432
 *
6560
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   433
 * You may pass NULL for any of the channels to leave it unchanged.
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   434
 * If the call succeeds, it will return 0.  If the display driver or
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   435
 * hardware does not support gamma translation, or otherwise fails,
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   436
 * this function will return -1.
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   437
 */
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   438
extern DECLSPEC int SDLCALL SDL_SetGammaRamp(const Uint16 *red, const Uint16 *green, const Uint16 *blue);
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   439
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   440
/**
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   441
 * Retrieve the current values of the gamma translation tables.
10017
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
   442
 *
6560
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   443
 * You must pass in valid pointers to arrays of 256 16-bit quantities.
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   444
 * Any of the pointers may be NULL to ignore that channel.
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   445
 * If the call succeeds, it will return 0.  If the display driver or
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   446
 * hardware does not support gamma translation, or otherwise fails,
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   447
 * this function will return -1.
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   448
 */
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   449
extern DECLSPEC int SDLCALL SDL_GetGammaRamp(Uint16 *red, Uint16 *green, Uint16 *blue);
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   450
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   451
/**
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   452
 * Sets a portion of the colormap for the given 8-bit surface.  If 'surface'
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   453
 * is not a palettized surface, this function does nothing, returning 0.
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   454
 * If all of the colors were set as passed to SDL_SetColors(), it will
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   455
 * return 1.  If not all the color entries were set exactly as given,
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   456
 * it will return 0, and you should look at the surface palette to
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   457
 * determine the actual color palette.
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   458
 *
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   459
 * When 'surface' is the surface associated with the current display, the
10017
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
   460
 * display colormap will be updated with the requested colors.  If
6560
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   461
 * SDL_HWPALETTE was set in SDL_SetVideoMode() flags, SDL_SetColors()
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   462
 * will always return 1, and the palette is guaranteed to be set the way
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   463
 * you desire, even if the window colormap has to be warped or run under
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   464
 * emulation.
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   465
 */
10017
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
   466
extern DECLSPEC int SDLCALL SDL_SetColors(SDL_Surface *surface,
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
   467
            SDL_Color *colors, int firstcolor, int ncolors);
6560
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   468
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   469
/**
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   470
 * Sets a portion of the colormap for a given 8-bit surface.
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   471
 * 'flags' is one or both of:
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   472
 * SDL_LOGPAL  -- set logical palette, which controls how blits are mapped
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   473
 *                to/from the surface,
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   474
 * SDL_PHYSPAL -- set physical palette, which controls how pixels look on
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   475
 *                the screen
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   476
 * Only screens have physical palettes. Separate change of physical/logical
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   477
 * palettes is only possible if the screen has SDL_HWPALETTE set.
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   478
 *
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   479
 * The return value is 1 if all colours could be set as requested, and 0
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   480
 * otherwise.
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   481
 *
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   482
 * SDL_SetColors() is equivalent to calling this function with
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   483
 *     flags = (SDL_LOGPAL|SDL_PHYSPAL).
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   484
 */
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   485
extern DECLSPEC int SDLCALL SDL_SetPalette(SDL_Surface *surface, int flags,
10017
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
   486
                   SDL_Color *colors, int firstcolor,
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
   487
                   int ncolors);
6560
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   488
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   489
/**
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   490
 * Maps an RGB triple to an opaque pixel value for a given pixel format
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   491
 */
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   492
extern DECLSPEC Uint32 SDLCALL SDL_MapRGB
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   493
(const SDL_PixelFormat * const format,
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   494
 const Uint8 r, const Uint8 g, const Uint8 b);
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   495
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   496
/**
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   497
 * Maps an RGBA quadruple to a pixel value for a given pixel format
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   498
 */
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   499
extern DECLSPEC Uint32 SDLCALL SDL_MapRGBA
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   500
(const SDL_PixelFormat * const format,
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   501
 const Uint8 r, const Uint8 g, const Uint8 b, const Uint8 a);
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   502
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   503
/**
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   504
 * Maps a pixel value into the RGB components for a given pixel format
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   505
 */
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   506
extern DECLSPEC void SDLCALL SDL_GetRGB(Uint32 pixel,
10017
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
   507
                const SDL_PixelFormat * const fmt,
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
   508
                Uint8 *r, Uint8 *g, Uint8 *b);
6560
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   509
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   510
/**
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   511
 * Maps a pixel value into the RGBA components for a given pixel format
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   512
 */
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   513
extern DECLSPEC void SDLCALL SDL_GetRGBA(Uint32 pixel,
10017
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
   514
                const SDL_PixelFormat * const fmt,
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
   515
                Uint8 *r, Uint8 *g, Uint8 *b, Uint8 *a);
6560
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   516
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   517
/** @sa SDL_CreateRGBSurface */
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   518
#define SDL_AllocSurface    SDL_CreateRGBSurface
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   519
/**
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   520
 * Allocate and free an RGB surface (must be called after SDL_SetVideoMode)
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   521
 * If the depth is 4 or 8 bits, an empty palette is allocated for the surface.
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   522
 * If the depth is greater than 8 bits, the pixel format is set using the
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   523
 * flags '[RGB]mask'.
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   524
 * If the function runs out of memory, it will return NULL.
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   525
 *
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   526
 * The 'flags' tell what kind of surface to create.
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   527
 * SDL_SWSURFACE means that the surface should be created in system memory.
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   528
 * SDL_HWSURFACE means that the surface should be created in video memory,
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   529
 * with the same format as the display surface.  This is useful for surfaces
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   530
 * that will not change much, to take advantage of hardware acceleration
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   531
 * when being blitted to the display surface.
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   532
 * SDL_ASYNCBLIT means that SDL will try to perform asynchronous blits with
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   533
 * this surface, but you must always lock it before accessing the pixels.
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   534
 * SDL will wait for current blits to finish before returning from the lock.
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   535
 * SDL_SRCCOLORKEY indicates that the surface will be used for colorkey blits.
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   536
 * If the hardware supports acceleration of colorkey blits between
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   537
 * two surfaces in video memory, SDL will try to place the surface in
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   538
 * video memory. If this isn't possible or if there is no hardware
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   539
 * acceleration available, the surface will be placed in system memory.
10017
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
   540
 * SDL_SRCALPHA means that the surface will be used for alpha blits and
6560
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   541
 * if the hardware supports hardware acceleration of alpha blits between
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   542
 * two surfaces in video memory, to place the surface in video memory
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   543
 * if possible, otherwise it will be placed in system memory.
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   544
 * If the surface is created in video memory, blits will be _much_ faster,
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   545
 * but the surface format must be identical to the video surface format,
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   546
 * and the only way to access the pixels member of the surface is to use
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   547
 * the SDL_LockSurface() and SDL_UnlockSurface() calls.
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   548
 * If the requested surface actually resides in video memory, SDL_HWSURFACE
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   549
 * will be set in the flags member of the returned surface.  If for some
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   550
 * reason the surface could not be placed in video memory, it will not have
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   551
 * the SDL_HWSURFACE flag set, and will be created in system memory instead.
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   552
 */
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   553
extern DECLSPEC SDL_Surface * SDLCALL SDL_CreateRGBSurface
10017
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
   554
            (Uint32 flags, int width, int height, int depth,
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
   555
            Uint32 Rmask, Uint32 Gmask, Uint32 Bmask, Uint32 Amask);
6560
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   556
/** @sa SDL_CreateRGBSurface */
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   557
extern DECLSPEC SDL_Surface * SDLCALL SDL_CreateRGBSurfaceFrom(void *pixels,
10017
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
   558
            int width, int height, int depth, int pitch,
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
   559
            Uint32 Rmask, Uint32 Gmask, Uint32 Bmask, Uint32 Amask);
6560
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   560
extern DECLSPEC void SDLCALL SDL_FreeSurface(SDL_Surface *surface);
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   561
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   562
/**
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   563
 * SDL_LockSurface() sets up a surface for directly accessing the pixels.
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   564
 * Between calls to SDL_LockSurface()/SDL_UnlockSurface(), you can write
10017
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
   565
 * to and read from 'surface->pixels', using the pixel format stored in
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
   566
 * 'surface->format'.  Once you are done accessing the surface, you should
6560
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   567
 * use SDL_UnlockSurface() to release it.
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   568
 *
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   569
 * Not all surfaces require locking.  If SDL_MUSTLOCK(surface) evaluates
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   570
 * to 0, then you can read and write to the surface at any time, and the
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   571
 * pixel format of the surface will not change.  In particular, if the
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   572
 * SDL_HWSURFACE flag is not given when calling SDL_SetVideoMode(), you
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   573
 * will not need to lock the display surface before accessing it.
10017
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
   574
 *
6560
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   575
 * No operating system or library calls should be made between lock/unlock
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   576
 * pairs, as critical system locks may be held during this time.
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   577
 *
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   578
 * SDL_LockSurface() returns 0, or -1 if the surface couldn't be locked.
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   579
 */
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   580
extern DECLSPEC int SDLCALL SDL_LockSurface(SDL_Surface *surface);
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   581
extern DECLSPEC void SDLCALL SDL_UnlockSurface(SDL_Surface *surface);
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   582
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   583
/**
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   584
 * Load a surface from a seekable SDL data source (memory or file.)
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   585
 * If 'freesrc' is non-zero, the source will be closed after being read.
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   586
 * Returns the new surface, or NULL if there was an error.
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   587
 * The new surface should be freed with SDL_FreeSurface().
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   588
 */
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   589
extern DECLSPEC SDL_Surface * SDLCALL SDL_LoadBMP_RW(SDL_RWops *src, int freesrc);
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   590
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   591
/** Convenience macro -- load a surface from a file */
10017
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
   592
#define SDL_LoadBMP(file)   SDL_LoadBMP_RW(SDL_RWFromFile(file, "rb"), 1)
6560
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   593
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   594
/**
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   595
 * Save a surface to a seekable SDL data source (memory or file.)
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   596
 * If 'freedst' is non-zero, the source will be closed after being written.
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   597
 * Returns 0 if successful or -1 if there was an error.
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   598
 */
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   599
extern DECLSPEC int SDLCALL SDL_SaveBMP_RW
10017
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
   600
        (SDL_Surface *surface, SDL_RWops *dst, int freedst);
6560
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   601
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   602
/** Convenience macro -- save a surface to a file */
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   603
#define SDL_SaveBMP(surface, file) \
10017
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
   604
        SDL_SaveBMP_RW(surface, SDL_RWFromFile(file, "wb"), 1)
6560
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   605
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   606
/**
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   607
 * Sets the color key (transparent pixel) in a blittable surface.
10017
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
   608
 * If 'flag' is SDL_SRCCOLORKEY (optionally OR'd with SDL_RLEACCEL),
6560
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   609
 * 'key' will be the transparent pixel in the source image of a blit.
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   610
 * SDL_RLEACCEL requests RLE acceleration for the surface if present,
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   611
 * and removes RLE acceleration if absent.
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   612
 * If 'flag' is 0, this function clears any current color key.
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   613
 * This function returns 0, or -1 if there was an error.
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   614
 */
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   615
extern DECLSPEC int SDLCALL SDL_SetColorKey
10017
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
   616
            (SDL_Surface *surface, Uint32 flag, Uint32 key);
6560
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   617
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   618
/**
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   619
 * This function sets the alpha value for the entire surface, as opposed to
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   620
 * using the alpha component of each pixel. This value measures the range
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   621
 * of transparency of the surface, 0 being completely transparent to 255
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   622
 * being completely opaque. An 'alpha' value of 255 causes blits to be
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   623
 * opaque, the source pixels copied to the destination (the default). Note
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   624
 * that per-surface alpha can be combined with colorkey transparency.
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   625
 *
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   626
 * If 'flag' is 0, alpha blending is disabled for the surface.
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   627
 * If 'flag' is SDL_SRCALPHA, alpha blending is enabled for the surface.
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   628
 * OR:ing the flag with SDL_RLEACCEL requests RLE acceleration for the
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   629
 * surface; if SDL_RLEACCEL is not specified, the RLE accel will be removed.
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   630
 *
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   631
 * The 'alpha' parameter is ignored for surfaces that have an alpha channel.
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   632
 */
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   633
extern DECLSPEC int SDLCALL SDL_SetAlpha(SDL_Surface *surface, Uint32 flag, Uint8 alpha);
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   634
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   635
/**
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   636
 * Sets the clipping rectangle for the destination surface in a blit.
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   637
 *
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   638
 * If the clip rectangle is NULL, clipping will be disabled.
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   639
 * If the clip rectangle doesn't intersect the surface, the function will
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   640
 * return SDL_FALSE and blits will be completely clipped.  Otherwise the
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   641
 * function returns SDL_TRUE and blits to the surface will be clipped to
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   642
 * the intersection of the surface area and the clipping rectangle.
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   643
 *
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   644
 * Note that blits are automatically clipped to the edges of the source
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   645
 * and destination surfaces.
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   646
 */
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   647
extern DECLSPEC SDL_bool SDLCALL SDL_SetClipRect(SDL_Surface *surface, const SDL_Rect *rect);
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   648
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   649
/**
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   650
 * Gets the clipping rectangle for the destination surface in a blit.
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   651
 * 'rect' must be a pointer to a valid rectangle which will be filled
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   652
 * with the correct values.
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   653
 */
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   654
extern DECLSPEC void SDLCALL SDL_GetClipRect(SDL_Surface *surface, SDL_Rect *rect);
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   655
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   656
/**
10017
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
   657
 * Creates a new surface of the specified format, and then copies and maps
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
   658
 * the given surface to it so the blit of the converted surface will be as
6560
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   659
 * fast as possible.  If this function fails, it returns NULL.
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   660
 *
10017
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
   661
 * The 'flags' parameter is passed to SDL_CreateRGBSurface() and has those
6560
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   662
 * semantics.  You can also pass SDL_RLEACCEL in the flags parameter and
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   663
 * SDL will try to RLE accelerate colorkey and alpha blits in the resulting
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   664
 * surface.
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   665
 *
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   666
 * This function is used internally by SDL_DisplayFormat().
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   667
 */
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   668
extern DECLSPEC SDL_Surface * SDLCALL SDL_ConvertSurface
10017
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
   669
            (SDL_Surface *src, SDL_PixelFormat *fmt, Uint32 flags);
6560
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   670
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   671
/**
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   672
 * This performs a fast blit from the source surface to the destination
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   673
 * surface.  It assumes that the source and destination rectangles are
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   674
 * the same size.  If either 'srcrect' or 'dstrect' are NULL, the entire
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   675
 * surface (src or dst) is copied.  The final blit rectangles are saved
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   676
 * in 'srcrect' and 'dstrect' after all clipping is performed.
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   677
 * If the blit is successful, it returns 0, otherwise it returns -1.
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   678
 *
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   679
 * The blit function should not be called on a locked surface.
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   680
 *
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   681
 * The blit semantics for surfaces with and without alpha and colorkey
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   682
 * are defined as follows:
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   683
 *
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   684
 * RGBA->RGB:
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   685
 *     SDL_SRCALPHA set:
10017
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
   686
 *  alpha-blend (using alpha-channel).
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
   687
 *  SDL_SRCCOLORKEY ignored.
6560
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   688
 *     SDL_SRCALPHA not set:
10017
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
   689
 *  copy RGB.
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
   690
 *  if SDL_SRCCOLORKEY set, only copy the pixels matching the
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
   691
 *  RGB values of the source colour key, ignoring alpha in the
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
   692
 *  comparison.
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
   693
 *
6560
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   694
 * RGB->RGBA:
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   695
 *     SDL_SRCALPHA set:
10017
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
   696
 *  alpha-blend (using the source per-surface alpha value);
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
   697
 *  set destination alpha to opaque.
6560
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   698
 *     SDL_SRCALPHA not set:
10017
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
   699
 *  copy RGB, set destination alpha to source per-surface alpha value.
6560
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   700
 *     both:
10017
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
   701
 *  if SDL_SRCCOLORKEY set, only copy the pixels matching the
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
   702
 *  source colour key.
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
   703
 *
6560
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   704
 * RGBA->RGBA:
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   705
 *     SDL_SRCALPHA set:
10017
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
   706
 *  alpha-blend (using the source alpha channel) the RGB values;
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
   707
 *  leave destination alpha untouched. [Note: is this correct?]
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
   708
 *  SDL_SRCCOLORKEY ignored.
6560
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   709
 *     SDL_SRCALPHA not set:
10017
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
   710
 *  copy all of RGBA to the destination.
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
   711
 *  if SDL_SRCCOLORKEY set, only copy the pixels matching the
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
   712
 *  RGB values of the source colour key, ignoring alpha in the
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
   713
 *  comparison.
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
   714
 *
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
   715
 * RGB->RGB:
6560
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   716
 *     SDL_SRCALPHA set:
10017
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
   717
 *  alpha-blend (using the source per-surface alpha value).
6560
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   718
 *     SDL_SRCALPHA not set:
10017
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
   719
 *  copy RGB.
6560
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   720
 *     both:
10017
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
   721
 *  if SDL_SRCCOLORKEY set, only copy the pixels matching the
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
   722
 *  source colour key.
6560
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   723
 *
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   724
 * If either of the surfaces were in video memory, and the blit returns -2,
10017
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
   725
 * the video memory was lost, so it should be reloaded with artwork and
6560
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   726
 * re-blitted:
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   727
 * @code
10017
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
   728
 *  while ( SDL_BlitSurface(image, imgrect, screen, dstrect) == -2 ) {
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
   729
 *      while ( SDL_LockSurface(image) < 0 )
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
   730
 *          Sleep(10);
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
   731
 *      -- Write image pixels to image->pixels --
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
   732
 *      SDL_UnlockSurface(image);
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
   733
 *  }
6560
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   734
 * @endcode
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   735
 *
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   736
 * This happens under DirectX 5.0 when the system switches away from your
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   737
 * fullscreen application.  The lock will also fail until you have access
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   738
 * to the video memory again.
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   739
 *
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   740
 * You should call SDL_BlitSurface() unless you know exactly how SDL
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   741
 * blitting works internally and how to use the other blit functions.
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   742
 */
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   743
#define SDL_BlitSurface SDL_UpperBlit
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   744
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   745
/** This is the public blit function, SDL_BlitSurface(), and it performs
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   746
 *  rectangle validation and clipping before passing it to SDL_LowerBlit()
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   747
 */
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   748
extern DECLSPEC int SDLCALL SDL_UpperBlit
10017
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
   749
            (SDL_Surface *src, SDL_Rect *srcrect,
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
   750
             SDL_Surface *dst, SDL_Rect *dstrect);
6560
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   751
/** This is a semi-private blit function and it performs low-level surface
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   752
 *  blitting only.
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   753
 */
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   754
extern DECLSPEC int SDLCALL SDL_LowerBlit
10017
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
   755
            (SDL_Surface *src, SDL_Rect *srcrect,
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
   756
             SDL_Surface *dst, SDL_Rect *dstrect);
6560
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   757
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   758
/**
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   759
 * This function performs a fast fill of the given rectangle with 'color'
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   760
 * The given rectangle is clipped to the destination surface clip area
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   761
 * and the final fill rectangle is saved in the passed in pointer.
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   762
 * If 'dstrect' is NULL, the whole surface will be filled with 'color'
10017
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
   763
 * The color should be a pixel of the format used by the surface, and
6560
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   764
 * can be generated by the SDL_MapRGB() function.
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   765
 * This function returns 0 on success, or -1 on error.
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   766
 */
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   767
extern DECLSPEC int SDLCALL SDL_FillRect
10017
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
   768
        (SDL_Surface *dst, SDL_Rect *dstrect, Uint32 color);
6560
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   769
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   770
/**
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   771
 * This function takes a surface and copies it to a new surface of the
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   772
 * pixel format and colors of the video framebuffer, suitable for fast
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   773
 * blitting onto the display surface.  It calls SDL_ConvertSurface()
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   774
 *
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   775
 * If you want to take advantage of hardware colorkey or alpha blit
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   776
 * acceleration, you should set the colorkey and alpha value before
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   777
 * calling this function.
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   778
 *
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   779
 * If the conversion fails or runs out of memory, it returns NULL
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   780
 */
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   781
extern DECLSPEC SDL_Surface * SDLCALL SDL_DisplayFormat(SDL_Surface *surface);
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   782
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   783
/**
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   784
 * This function takes a surface and copies it to a new surface of the
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   785
 * pixel format and colors of the video framebuffer (if possible),
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   786
 * suitable for fast alpha blitting onto the display surface.
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   787
 * The new surface will always have an alpha channel.
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   788
 *
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   789
 * If you want to take advantage of hardware colorkey or alpha blit
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   790
 * acceleration, you should set the colorkey and alpha value before
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   791
 * calling this function.
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   792
 *
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   793
 * If the conversion fails or runs out of memory, it returns NULL
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   794
 */
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   795
extern DECLSPEC SDL_Surface * SDLCALL SDL_DisplayFormatAlpha(SDL_Surface *surface);
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   796
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   797
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   798
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   799
/** @name YUV video surface overlay functions                                */ /*@{*/
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   800
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   801
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   802
/** This function creates a video output overlay
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   803
 *  Calling the returned surface an overlay is something of a misnomer because
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   804
 *  the contents of the display surface underneath the area where the overlay
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   805
 *  is shown is undefined - it may be overwritten with the converted YUV data.
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   806
 */
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   807
extern DECLSPEC SDL_Overlay * SDLCALL SDL_CreateYUVOverlay(int width, int height,
10017
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
   808
                Uint32 format, SDL_Surface *display);
6560
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   809
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   810
/** Lock an overlay for direct access, and unlock it when you are done */
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   811
extern DECLSPEC int SDLCALL SDL_LockYUVOverlay(SDL_Overlay *overlay);
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   812
extern DECLSPEC void SDLCALL SDL_UnlockYUVOverlay(SDL_Overlay *overlay);
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   813
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   814
/** Blit a video overlay to the display surface.
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   815
 *  The contents of the video surface underneath the blit destination are
10017
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
   816
 *  not defined.
6560
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   817
 *  The width and height of the destination rectangle may be different from
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   818
 *  that of the overlay, but currently only 2x scaling is supported.
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   819
 */
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   820
extern DECLSPEC int SDLCALL SDL_DisplayYUVOverlay(SDL_Overlay *overlay, SDL_Rect *dstrect);
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   821
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   822
/** Free a video overlay */
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   823
extern DECLSPEC void SDLCALL SDL_FreeYUVOverlay(SDL_Overlay *overlay);
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   824
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   825
/*@}*/
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   826
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   827
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   828
/** @name OpenGL support functions.                                          */ /*@{*/
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   829
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   830
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   831
/**
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   832
 * Dynamically load an OpenGL library, or the default one if path is NULL
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   833
 *
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   834
 * If you do this, you need to retrieve all of the GL functions used in
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   835
 * your program from the dynamic library using SDL_GL_GetProcAddress().
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   836
 */
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   837
extern DECLSPEC int SDLCALL SDL_GL_LoadLibrary(const char *path);
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   838
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   839
/**
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   840
 * Get the address of a GL function
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   841
 */
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   842
extern DECLSPEC void * SDLCALL SDL_GL_GetProcAddress(const char* proc);
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   843
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   844
/**
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   845
 * Set an attribute of the OpenGL subsystem before intialization.
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   846
 */
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   847
extern DECLSPEC int SDLCALL SDL_GL_SetAttribute(SDL_GLattr attr, int value);
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   848
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   849
/**
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   850
 * Get an attribute of the OpenGL subsystem from the windowing
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   851
 * interface, such as glX. This is of course different from getting
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   852
 * the values from SDL's internal OpenGL subsystem, which only
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   853
 * stores the values you request before initialization.
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   854
 *
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   855
 * Developers should track the values they pass into SDL_GL_SetAttribute
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   856
 * themselves if they want to retrieve these values.
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   857
 */
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   858
extern DECLSPEC int SDLCALL SDL_GL_GetAttribute(SDL_GLattr attr, int* value);
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   859
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   860
/**
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   861
 * Swap the OpenGL buffers, if double-buffering is supported.
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   862
 */
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   863
extern DECLSPEC void SDLCALL SDL_GL_SwapBuffers(void);
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   864
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   865
/** @name OpenGL Internal Functions
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   866
 * Internal functions that should not be called unless you have read
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   867
 * and understood the source code for these functions.
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   868
 */
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   869
/*@{*/
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   870
extern DECLSPEC void SDLCALL SDL_GL_UpdateRects(int numrects, SDL_Rect* rects);
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   871
extern DECLSPEC void SDLCALL SDL_GL_Lock(void);
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   872
extern DECLSPEC void SDLCALL SDL_GL_Unlock(void);
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   873
/*@}*/
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   874
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   875
/*@}*/
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   876
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   877
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   878
/** @name Window Manager Functions                                           */
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   879
/** These functions allow interaction with the window manager, if any.       */ /*@{*/
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   880
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   881
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   882
/**
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   883
 * Sets the title and icon text of the display window (UTF-8 encoded)
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   884
 */
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   885
extern DECLSPEC void SDLCALL SDL_WM_SetCaption(const char *title, const char *icon);
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   886
/**
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   887
 * Gets the title and icon text of the display window (UTF-8 encoded)
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   888
 */
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   889
extern DECLSPEC void SDLCALL SDL_WM_GetCaption(char **title, char **icon);
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   890
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   891
/**
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   892
 * Sets the icon for the display window.
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   893
 * This function must be called before the first call to SDL_SetVideoMode().
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   894
 * It takes an icon surface, and a mask in MSB format.
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   895
 * If 'mask' is NULL, the entire icon surface will be used as the icon.
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   896
 */
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   897
extern DECLSPEC void SDLCALL SDL_WM_SetIcon(SDL_Surface *icon, Uint8 *mask);
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   898
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   899
/**
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   900
 * This function iconifies the window, and returns 1 if it succeeded.
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   901
 * If the function succeeds, it generates an SDL_APPACTIVE loss event.
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   902
 * This function is a noop and returns 0 in non-windowed environments.
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   903
 */
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   904
extern DECLSPEC int SDLCALL SDL_WM_IconifyWindow(void);
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   905
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   906
/**
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   907
 * Toggle fullscreen mode without changing the contents of the screen.
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   908
 * If the display surface does not require locking before accessing
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   909
 * the pixel information, then the memory pointers will not change.
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   910
 *
10017
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
   911
 * If this function was able to toggle fullscreen mode (change from
6560
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   912
 * running in a window to fullscreen, or vice-versa), it will return 1.
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   913
 * If it is not implemented, or fails, it returns 0.
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   914
 *
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   915
 * The next call to SDL_SetVideoMode() will set the mode fullscreen
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   916
 * attribute based on the flags parameter - if SDL_FULLSCREEN is not
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   917
 * set, then the display will be windowed by default where supported.
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   918
 *
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   919
 * This is currently only implemented in the X11 video driver.
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   920
 */
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   921
extern DECLSPEC int SDLCALL SDL_WM_ToggleFullScreen(SDL_Surface *surface);
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   922
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   923
typedef enum {
10017
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
   924
    SDL_GRAB_QUERY = -1,
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
   925
    SDL_GRAB_OFF = 0,
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
   926
    SDL_GRAB_ON = 1,
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
   927
    SDL_GRAB_FULLSCREEN /**< Used internally */
6560
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   928
} SDL_GrabMode;
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   929
/**
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   930
 * This function allows you to set and query the input grab state of
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   931
 * the application.  It returns the new input grab state.
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   932
 *
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   933
 * Grabbing means that the mouse is confined to the application window,
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   934
 * and nearly all keyboard input is passed directly to the application,
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   935
 * and not interpreted by a window manager, if any.
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   936
 */
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   937
extern DECLSPEC SDL_GrabMode SDLCALL SDL_WM_GrabInput(SDL_GrabMode mode);
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   938
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   939
/*@}*/
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   940
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   941
/** @internal Not in public API at the moment - do not use! */
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   942
extern DECLSPEC int SDLCALL SDL_SoftStretch(SDL_Surface *src, SDL_Rect *srcrect,
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   943
                                    SDL_Surface *dst, SDL_Rect *dstrect);
10017
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7809
diff changeset
   944
6560
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   945
/* Ends C function definitions when using C++ */
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   946
#ifdef __cplusplus
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   947
}
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   948
#endif
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   949
#include "close_code.h"
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   950
ca07e6be08d0 GCI task: cmd.exe
bovi
parents:
diff changeset
   951
#endif /* _SDL_video_h */