annotate include/SDL_compat.h @ 2268:4baee598306d

Date: Thu, 05 Jul 2007 14:02:33 -0700 From: Sam Lantinga Subject: SDL 1.3 keyboard plan After lots of discussion with Christian, this is what we came up with: > So, to sum up... > SDLK_* become the physical keys, starting at > (1<<21) > We create a macro SDLK_INDEX(X) > We have two functions SDL_GetLayoutKey(SDLKey) and SDL_GetKeyName() > SDL_GetLayoutKey maps to UCS4 for printable characters, and SDLK* for non-printable characters > and does so based on the OS's current keyboard layout > SDL_GetKeyName() handles both SDLK_* and UCS4, converting UCS4 to UTF-8 and converting SDLK_* into our names, which are UTF-8 for printable characters. > WASD folks use SDLK_*, and 'I' folks use SDL_GetLayoutKey(SDLK_*) Here is the patch he came up with, and his e-mail about it: Date: Fri, 17 Aug 2007 19:50:28 +0200 From: Christian Walther Subject: Re: SDL 1.3 keyboard plan > Sounds great, go ahead and send me a patch. Here goes! Thanks for having a look. Don't hesitate to comment if anything does not conform to your ideas. One caveat: Committing this now may break compilability of some video drivers - specifically, if they use any of the SDLK_* codes that were obsoleted and moved into SDL_compat.h. I only tried Cocoa (which did break, but is already fixed) and X11 (which didn't, but then its key handling is #iffed out). If that's a problem, it may need to go into a branch. -Christian
author Sam Lantinga <slouken@libsdl.org>
date Sun, 19 Aug 2007 14:52:52 +0000
parents c785543d1843
children dbc6d1893869
rev   line source
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
1 /*
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
2 SDL - Simple DirectMedia Layer
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
3 Copyright (C) 1997-2006 Sam Lantinga
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
4
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
5 This library is free software; you can redistribute it and/or
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
6 modify it under the terms of the GNU Lesser General Public
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
7 License as published by the Free Software Foundation; either
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
8 version 2.1 of the License, or (at your option) any later version.
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
9
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
10 This library is distributed in the hope that it will be useful,
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
13 Lesser General Public License for more details.
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
14
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
15 You should have received a copy of the GNU Lesser General Public
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
16 License along with this library; if not, write to the Free Software
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
17 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
18
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
19 Sam Lantinga
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
20 slouken@libsdl.org
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
21 */
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
22
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
23 /* This file contains functions for backwards compatibility with SDL 1.2 */
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
24
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
25 #ifndef _SDL_compat_h
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
26 #define _SDL_compat_h
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
27
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
28 #include "SDL_video.h"
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
29 #include "SDL_version.h"
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
30
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
31 #include "begin_code.h"
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
32 /* Set up for C function definitions, even when using C++ */
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
33 #ifdef __cplusplus
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
34 /* *INDENT-OFF* */
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
35 extern "C" {
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
36 /* *INDENT-ON* */
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
37 #endif
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
38
2222
926294b2bb4e Emphasized the separation between SDL_Surface and SDL_Texture
Sam Lantinga <slouken@libsdl.org>
parents: 2153
diff changeset
39 #define SDL_SWSURFACE 0x00000000 /* Not used */
2267
c785543d1843 Okay, still some bugs, but everything builds again...
Sam Lantinga <slouken@libsdl.org>
parents: 2266
diff changeset
40 #define SDL_SRCALPHA 0x00010000
c785543d1843 Okay, still some bugs, but everything builds again...
Sam Lantinga <slouken@libsdl.org>
parents: 2266
diff changeset
41 #define SDL_SRCCOLORKEY 0x00020000
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
42 #define SDL_ANYFORMAT 0x00100000
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
43 #define SDL_HWPALETTE 0x00200000
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
44 #define SDL_DOUBLEBUF 0x00400000
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
45 #define SDL_FULLSCREEN 0x00800000
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
46 #define SDL_RESIZABLE 0x01000000
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
47 #define SDL_NOFRAME 0x02000000
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
48 #define SDL_OPENGL 0x04000000
2222
926294b2bb4e Emphasized the separation between SDL_Surface and SDL_Texture
Sam Lantinga <slouken@libsdl.org>
parents: 2153
diff changeset
49 #define SDL_HWSURFACE 0x08000001 /* Not used */
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
50 #define SDL_ASYNCBLIT 0x08000000 /* Not used */
2267
c785543d1843 Okay, still some bugs, but everything builds again...
Sam Lantinga <slouken@libsdl.org>
parents: 2266
diff changeset
51 #define SDL_RLEACCELOK 0x08000000 /* Not used */
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
52 #define SDL_HWACCEL 0x08000000 /* Not used */
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
53
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
54 #define SDL_APPMOUSEFOCUS 0x01
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
55 #define SDL_APPINPUTFOCUS 0x02
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
56 #define SDL_APPACTIVE 0x04
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
57
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
58 #define SDL_LOGPAL 0x01
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
59 #define SDL_PHYSPAL 0x02
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
60
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
61 #define SDL_ACTIVEEVENT SDL_EVENT_RESERVED1
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
62 #define SDL_VIDEORESIZE SDL_EVENT_RESERVED2
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
63 #define SDL_VIDEOEXPOSE SDL_EVENT_RESERVED3
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
64 #define SDL_ACTIVEEVENTMASK SDL_EVENTMASK(SDL_ACTIVEEVENT)
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
65 #define SDL_VIDEORESIZEMASK SDL_EVENTMASK(SDL_VIDEORESIZE)
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
66 #define SDL_VIDEOEXPOSEMASK SDL_EVENTMASK(SDL_VIDEOEXPOSE)
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
67
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
68 #define SDL_BUTTON_WHEELUP 4
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
69 #define SDL_BUTTON_WHEELDOWN 5
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
70
2129
047245361002 Key repeat is handled by the OS, since text input is now decoupled from physical key events.
Sam Lantinga <slouken@libsdl.org>
parents: 2043
diff changeset
71 #define SDL_DEFAULT_REPEAT_DELAY 500
047245361002 Key repeat is handled by the OS, since text input is now decoupled from physical key events.
Sam Lantinga <slouken@libsdl.org>
parents: 2043
diff changeset
72 #define SDL_DEFAULT_REPEAT_INTERVAL 30
047245361002 Key repeat is handled by the OS, since text input is now decoupled from physical key events.
Sam Lantinga <slouken@libsdl.org>
parents: 2043
diff changeset
73
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
74 typedef struct SDL_VideoInfo
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
75 {
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
76 Uint32 hw_available:1;
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
77 Uint32 wm_available:1;
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
78 Uint32 UnusedBits1:6;
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
79 Uint32 UnusedBits2:1;
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
80 Uint32 blit_hw:1;
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
81 Uint32 blit_hw_CC:1;
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
82 Uint32 blit_hw_A:1;
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
83 Uint32 blit_sw:1;
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
84 Uint32 blit_sw_CC:1;
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
85 Uint32 blit_sw_A:1;
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
86 Uint32 blit_fill:1;
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
87 Uint32 UnusedBits3:16;
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
88 Uint32 video_mem;
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
89
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
90 SDL_PixelFormat *vfmt;
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
91 } SDL_VideoInfo;
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
92
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
93 /* The most common video overlay formats.
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
94 For an explanation of these pixel formats, see:
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
95 http://www.webartz.com/fourcc/indexyuv.htm
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
96
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
97 For information on the relationship between color spaces, see:
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
98 http://www.neuro.sfc.keio.ac.jp/~aly/polygon/info/color-space-faq.html
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
99 */
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
100 #define SDL_YV12_OVERLAY 0x32315659 /* Planar mode: Y + V + U (3 planes) */
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
101 #define SDL_IYUV_OVERLAY 0x56555949 /* Planar mode: Y + U + V (3 planes) */
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
102 #define SDL_YUY2_OVERLAY 0x32595559 /* Packed mode: Y0+U0+Y1+V0 (1 plane) */
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
103 #define SDL_UYVY_OVERLAY 0x59565955 /* Packed mode: U0+Y0+V0+Y1 (1 plane) */
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
104 #define SDL_YVYU_OVERLAY 0x55595659 /* Packed mode: Y0+V0+Y1+U0 (1 plane) */
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
105
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
106 /* The YUV hardware video overlay */
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
107 typedef struct SDL_Overlay
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
108 {
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
109 Uint32 format; /* Read-only */
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
110 int w, h; /* Read-only */
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
111 int planes; /* Read-only */
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
112 Uint16 *pitches; /* Read-only */
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
113 Uint8 **pixels; /* Read-write */
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
114
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
115 /* Hardware-specific surface info */
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
116 struct private_yuvhwfuncs *hwfuncs;
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
117 struct private_yuvhwdata *hwdata;
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
118
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
119 /* Special flags */
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
120 Uint32 hw_overlay:1; /* Flag: This overlay hardware accelerated? */
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
121 Uint32 UnusedBits:31;
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
122 } SDL_Overlay;
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
123
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
124 typedef enum
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
125 {
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
126 SDL_GRAB_QUERY = -1,
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
127 SDL_GRAB_OFF = 0,
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
128 SDL_GRAB_ON = 1
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
129 } SDL_GrabMode;
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
130
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
131 struct SDL_SysWMinfo;
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
132
2268
4baee598306d Date: Thu, 05 Jul 2007 14:02:33 -0700
Sam Lantinga <slouken@libsdl.org>
parents: 2267
diff changeset
133 /* Key codes
4baee598306d Date: Thu, 05 Jul 2007 14:02:33 -0700
Sam Lantinga <slouken@libsdl.org>
parents: 2267
diff changeset
134 Note that the correspondences defined here are approximate at best because
4baee598306d Date: Thu, 05 Jul 2007 14:02:33 -0700
Sam Lantinga <slouken@libsdl.org>
parents: 2267
diff changeset
135 the meaning of the event structure field that carries these values has
4baee598306d Date: Thu, 05 Jul 2007 14:02:33 -0700
Sam Lantinga <slouken@libsdl.org>
parents: 2267
diff changeset
136 changed: in SDL 1.2, it referred to the key's label in the current keyboard
4baee598306d Date: Thu, 05 Jul 2007 14:02:33 -0700
Sam Lantinga <slouken@libsdl.org>
parents: 2267
diff changeset
137 layout, whereas now it refers to a specific physical key on the keyboard,
4baee598306d Date: Thu, 05 Jul 2007 14:02:33 -0700
Sam Lantinga <slouken@libsdl.org>
parents: 2267
diff changeset
138 regardless of the keyboard layout setting.
4baee598306d Date: Thu, 05 Jul 2007 14:02:33 -0700
Sam Lantinga <slouken@libsdl.org>
parents: 2267
diff changeset
139 To get comparable behavior to SDL 1.2, code that uses any of the codes below
4baee598306d Date: Thu, 05 Jul 2007 14:02:33 -0700
Sam Lantinga <slouken@libsdl.org>
parents: 2267
diff changeset
140 in ways like "if (somekey == SDLK_EXCLAIM)" should be changed to the
4baee598306d Date: Thu, 05 Jul 2007 14:02:33 -0700
Sam Lantinga <slouken@libsdl.org>
parents: 2267
diff changeset
141 equivalent of "if (SDL_GetLayoutKey(somekey) == '!')".
4baee598306d Date: Thu, 05 Jul 2007 14:02:33 -0700
Sam Lantinga <slouken@libsdl.org>
parents: 2267
diff changeset
142 */
4baee598306d Date: Thu, 05 Jul 2007 14:02:33 -0700
Sam Lantinga <slouken@libsdl.org>
parents: 2267
diff changeset
143
4baee598306d Date: Thu, 05 Jul 2007 14:02:33 -0700
Sam Lantinga <slouken@libsdl.org>
parents: 2267
diff changeset
144 /* These key constants were renamed for clarity or consistence. */
4baee598306d Date: Thu, 05 Jul 2007 14:02:33 -0700
Sam Lantinga <slouken@libsdl.org>
parents: 2267
diff changeset
145 #define SDLK_QUOTE SDLK_APOSTROPHE
4baee598306d Date: Thu, 05 Jul 2007 14:02:33 -0700
Sam Lantinga <slouken@libsdl.org>
parents: 2267
diff changeset
146 #define SDLK_MINUS SDLK_HYPHENMINUS
4baee598306d Date: Thu, 05 Jul 2007 14:02:33 -0700
Sam Lantinga <slouken@libsdl.org>
parents: 2267
diff changeset
147 #define SDLK_BACKQUOTE SDLK_GRAVE
4baee598306d Date: Thu, 05 Jul 2007 14:02:33 -0700
Sam Lantinga <slouken@libsdl.org>
parents: 2267
diff changeset
148 #define SDLK_a SDLK_A
4baee598306d Date: Thu, 05 Jul 2007 14:02:33 -0700
Sam Lantinga <slouken@libsdl.org>
parents: 2267
diff changeset
149 #define SDLK_b SDLK_B
4baee598306d Date: Thu, 05 Jul 2007 14:02:33 -0700
Sam Lantinga <slouken@libsdl.org>
parents: 2267
diff changeset
150 #define SDLK_c SDLK_C
4baee598306d Date: Thu, 05 Jul 2007 14:02:33 -0700
Sam Lantinga <slouken@libsdl.org>
parents: 2267
diff changeset
151 #define SDLK_d SDLK_D
4baee598306d Date: Thu, 05 Jul 2007 14:02:33 -0700
Sam Lantinga <slouken@libsdl.org>
parents: 2267
diff changeset
152 #define SDLK_e SDLK_E
4baee598306d Date: Thu, 05 Jul 2007 14:02:33 -0700
Sam Lantinga <slouken@libsdl.org>
parents: 2267
diff changeset
153 #define SDLK_f SDLK_F
4baee598306d Date: Thu, 05 Jul 2007 14:02:33 -0700
Sam Lantinga <slouken@libsdl.org>
parents: 2267
diff changeset
154 #define SDLK_g SDLK_G
4baee598306d Date: Thu, 05 Jul 2007 14:02:33 -0700
Sam Lantinga <slouken@libsdl.org>
parents: 2267
diff changeset
155 #define SDLK_h SDLK_H
4baee598306d Date: Thu, 05 Jul 2007 14:02:33 -0700
Sam Lantinga <slouken@libsdl.org>
parents: 2267
diff changeset
156 #define SDLK_i SDLK_I
4baee598306d Date: Thu, 05 Jul 2007 14:02:33 -0700
Sam Lantinga <slouken@libsdl.org>
parents: 2267
diff changeset
157 #define SDLK_j SDLK_J
4baee598306d Date: Thu, 05 Jul 2007 14:02:33 -0700
Sam Lantinga <slouken@libsdl.org>
parents: 2267
diff changeset
158 #define SDLK_k SDLK_K
4baee598306d Date: Thu, 05 Jul 2007 14:02:33 -0700
Sam Lantinga <slouken@libsdl.org>
parents: 2267
diff changeset
159 #define SDLK_l SDLK_L
4baee598306d Date: Thu, 05 Jul 2007 14:02:33 -0700
Sam Lantinga <slouken@libsdl.org>
parents: 2267
diff changeset
160 #define SDLK_m SDLK_M
4baee598306d Date: Thu, 05 Jul 2007 14:02:33 -0700
Sam Lantinga <slouken@libsdl.org>
parents: 2267
diff changeset
161 #define SDLK_n SDLK_N
4baee598306d Date: Thu, 05 Jul 2007 14:02:33 -0700
Sam Lantinga <slouken@libsdl.org>
parents: 2267
diff changeset
162 #define SDLK_o SDLK_O
4baee598306d Date: Thu, 05 Jul 2007 14:02:33 -0700
Sam Lantinga <slouken@libsdl.org>
parents: 2267
diff changeset
163 #define SDLK_p SDLK_P
4baee598306d Date: Thu, 05 Jul 2007 14:02:33 -0700
Sam Lantinga <slouken@libsdl.org>
parents: 2267
diff changeset
164 #define SDLK_q SDLK_Q
4baee598306d Date: Thu, 05 Jul 2007 14:02:33 -0700
Sam Lantinga <slouken@libsdl.org>
parents: 2267
diff changeset
165 #define SDLK_r SDLK_R
4baee598306d Date: Thu, 05 Jul 2007 14:02:33 -0700
Sam Lantinga <slouken@libsdl.org>
parents: 2267
diff changeset
166 #define SDLK_s SDLK_S
4baee598306d Date: Thu, 05 Jul 2007 14:02:33 -0700
Sam Lantinga <slouken@libsdl.org>
parents: 2267
diff changeset
167 #define SDLK_t SDLK_T
4baee598306d Date: Thu, 05 Jul 2007 14:02:33 -0700
Sam Lantinga <slouken@libsdl.org>
parents: 2267
diff changeset
168 #define SDLK_u SDLK_U
4baee598306d Date: Thu, 05 Jul 2007 14:02:33 -0700
Sam Lantinga <slouken@libsdl.org>
parents: 2267
diff changeset
169 #define SDLK_v SDLK_V
4baee598306d Date: Thu, 05 Jul 2007 14:02:33 -0700
Sam Lantinga <slouken@libsdl.org>
parents: 2267
diff changeset
170 #define SDLK_w SDLK_W
4baee598306d Date: Thu, 05 Jul 2007 14:02:33 -0700
Sam Lantinga <slouken@libsdl.org>
parents: 2267
diff changeset
171 #define SDLK_x SDLK_X
4baee598306d Date: Thu, 05 Jul 2007 14:02:33 -0700
Sam Lantinga <slouken@libsdl.org>
parents: 2267
diff changeset
172 #define SDLK_y SDLK_Y
4baee598306d Date: Thu, 05 Jul 2007 14:02:33 -0700
Sam Lantinga <slouken@libsdl.org>
parents: 2267
diff changeset
173 #define SDLK_z SDLK_Z
4baee598306d Date: Thu, 05 Jul 2007 14:02:33 -0700
Sam Lantinga <slouken@libsdl.org>
parents: 2267
diff changeset
174 #define SDLK_KP0 SDLK_KP_0
4baee598306d Date: Thu, 05 Jul 2007 14:02:33 -0700
Sam Lantinga <slouken@libsdl.org>
parents: 2267
diff changeset
175 #define SDLK_KP1 SDLK_KP_1
4baee598306d Date: Thu, 05 Jul 2007 14:02:33 -0700
Sam Lantinga <slouken@libsdl.org>
parents: 2267
diff changeset
176 #define SDLK_KP2 SDLK_KP_2
4baee598306d Date: Thu, 05 Jul 2007 14:02:33 -0700
Sam Lantinga <slouken@libsdl.org>
parents: 2267
diff changeset
177 #define SDLK_KP3 SDLK_KP_3
4baee598306d Date: Thu, 05 Jul 2007 14:02:33 -0700
Sam Lantinga <slouken@libsdl.org>
parents: 2267
diff changeset
178 #define SDLK_KP4 SDLK_KP_4
4baee598306d Date: Thu, 05 Jul 2007 14:02:33 -0700
Sam Lantinga <slouken@libsdl.org>
parents: 2267
diff changeset
179 #define SDLK_KP5 SDLK_KP_5
4baee598306d Date: Thu, 05 Jul 2007 14:02:33 -0700
Sam Lantinga <slouken@libsdl.org>
parents: 2267
diff changeset
180 #define SDLK_KP6 SDLK_KP_6
4baee598306d Date: Thu, 05 Jul 2007 14:02:33 -0700
Sam Lantinga <slouken@libsdl.org>
parents: 2267
diff changeset
181 #define SDLK_KP7 SDLK_KP_7
4baee598306d Date: Thu, 05 Jul 2007 14:02:33 -0700
Sam Lantinga <slouken@libsdl.org>
parents: 2267
diff changeset
182 #define SDLK_KP8 SDLK_KP_8
4baee598306d Date: Thu, 05 Jul 2007 14:02:33 -0700
Sam Lantinga <slouken@libsdl.org>
parents: 2267
diff changeset
183 #define SDLK_KP9 SDLK_KP_9
4baee598306d Date: Thu, 05 Jul 2007 14:02:33 -0700
Sam Lantinga <slouken@libsdl.org>
parents: 2267
diff changeset
184 #define SDLK_NUMLOCK SDLK_KP_NUMLOCKCLEAR
4baee598306d Date: Thu, 05 Jul 2007 14:02:33 -0700
Sam Lantinga <slouken@libsdl.org>
parents: 2267
diff changeset
185 #define SDLK_SCROLLOCK SDLK_SCROLLLOCK
4baee598306d Date: Thu, 05 Jul 2007 14:02:33 -0700
Sam Lantinga <slouken@libsdl.org>
parents: 2267
diff changeset
186 #define SDLK_PRINT SDLK_PRINTSCREEN
4baee598306d Date: Thu, 05 Jul 2007 14:02:33 -0700
Sam Lantinga <slouken@libsdl.org>
parents: 2267
diff changeset
187
4baee598306d Date: Thu, 05 Jul 2007 14:02:33 -0700
Sam Lantinga <slouken@libsdl.org>
parents: 2267
diff changeset
188 /* These key constants are obsoleted the new keyboard handling, their definitions here correspond to how they appear on a US keyboard. */
4baee598306d Date: Thu, 05 Jul 2007 14:02:33 -0700
Sam Lantinga <slouken@libsdl.org>
parents: 2267
diff changeset
189 #define SDLK_EXCLAIM SDLK_1
4baee598306d Date: Thu, 05 Jul 2007 14:02:33 -0700
Sam Lantinga <slouken@libsdl.org>
parents: 2267
diff changeset
190 #define SDLK_QUOTEDBL SDLK_APOSTROPHE
4baee598306d Date: Thu, 05 Jul 2007 14:02:33 -0700
Sam Lantinga <slouken@libsdl.org>
parents: 2267
diff changeset
191 #define SDLK_HASH SDLK_3
4baee598306d Date: Thu, 05 Jul 2007 14:02:33 -0700
Sam Lantinga <slouken@libsdl.org>
parents: 2267
diff changeset
192 #define SDLK_DOLLAR SDLK_4
4baee598306d Date: Thu, 05 Jul 2007 14:02:33 -0700
Sam Lantinga <slouken@libsdl.org>
parents: 2267
diff changeset
193 #define SDLK_AMPERSAND SDLK_7
4baee598306d Date: Thu, 05 Jul 2007 14:02:33 -0700
Sam Lantinga <slouken@libsdl.org>
parents: 2267
diff changeset
194 #define SDLK_LEFTPAREN SDLK_9
4baee598306d Date: Thu, 05 Jul 2007 14:02:33 -0700
Sam Lantinga <slouken@libsdl.org>
parents: 2267
diff changeset
195 #define SDLK_RIGHTPAREN SDLK_0
4baee598306d Date: Thu, 05 Jul 2007 14:02:33 -0700
Sam Lantinga <slouken@libsdl.org>
parents: 2267
diff changeset
196 #define SDLK_ASTERISK SDLK_8
4baee598306d Date: Thu, 05 Jul 2007 14:02:33 -0700
Sam Lantinga <slouken@libsdl.org>
parents: 2267
diff changeset
197 #define SDLK_PLUS SDLK_EQUALS
4baee598306d Date: Thu, 05 Jul 2007 14:02:33 -0700
Sam Lantinga <slouken@libsdl.org>
parents: 2267
diff changeset
198 #define SDLK_COLON SDLK_SEMICOLON
4baee598306d Date: Thu, 05 Jul 2007 14:02:33 -0700
Sam Lantinga <slouken@libsdl.org>
parents: 2267
diff changeset
199 #define SDLK_LESS SDLK_COMMA
4baee598306d Date: Thu, 05 Jul 2007 14:02:33 -0700
Sam Lantinga <slouken@libsdl.org>
parents: 2267
diff changeset
200 #define SDLK_GREATER SDLK_PERIOD
4baee598306d Date: Thu, 05 Jul 2007 14:02:33 -0700
Sam Lantinga <slouken@libsdl.org>
parents: 2267
diff changeset
201 #define SDLK_QUESTION SDLK_SLASH
4baee598306d Date: Thu, 05 Jul 2007 14:02:33 -0700
Sam Lantinga <slouken@libsdl.org>
parents: 2267
diff changeset
202 #define SDLK_AT SDLK_2
4baee598306d Date: Thu, 05 Jul 2007 14:02:33 -0700
Sam Lantinga <slouken@libsdl.org>
parents: 2267
diff changeset
203 #define SDLK_CARET SDLK_6
4baee598306d Date: Thu, 05 Jul 2007 14:02:33 -0700
Sam Lantinga <slouken@libsdl.org>
parents: 2267
diff changeset
204 #define SDLK_UNDERSCORE SDLK_HYPHENMINUS
4baee598306d Date: Thu, 05 Jul 2007 14:02:33 -0700
Sam Lantinga <slouken@libsdl.org>
parents: 2267
diff changeset
205
4baee598306d Date: Thu, 05 Jul 2007 14:02:33 -0700
Sam Lantinga <slouken@libsdl.org>
parents: 2267
diff changeset
206 /* These keys don't appear in the USB specification (or at least not under those names). I'm unsure if the following assignments make sense or if these codes should be defined as actual additional SDLK_ constants. */
4baee598306d Date: Thu, 05 Jul 2007 14:02:33 -0700
Sam Lantinga <slouken@libsdl.org>
parents: 2267
diff changeset
207 #define SDLK_LSUPER SDLK_LMETA
4baee598306d Date: Thu, 05 Jul 2007 14:02:33 -0700
Sam Lantinga <slouken@libsdl.org>
parents: 2267
diff changeset
208 #define SDLK_RSUPER SDLK_RMETA
4baee598306d Date: Thu, 05 Jul 2007 14:02:33 -0700
Sam Lantinga <slouken@libsdl.org>
parents: 2267
diff changeset
209 #define SDLK_COMPOSE SDLK_APPLICATION
4baee598306d Date: Thu, 05 Jul 2007 14:02:33 -0700
Sam Lantinga <slouken@libsdl.org>
parents: 2267
diff changeset
210 #define SDLK_BREAK SDLK_STOP
4baee598306d Date: Thu, 05 Jul 2007 14:02:33 -0700
Sam Lantinga <slouken@libsdl.org>
parents: 2267
diff changeset
211 #define SDLK_EURO SDLK_2
4baee598306d Date: Thu, 05 Jul 2007 14:02:33 -0700
Sam Lantinga <slouken@libsdl.org>
parents: 2267
diff changeset
212
4baee598306d Date: Thu, 05 Jul 2007 14:02:33 -0700
Sam Lantinga <slouken@libsdl.org>
parents: 2267
diff changeset
213
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
214 #define SDL_SetModuleHandle(x)
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
215 #define SDL_AllocSurface SDL_CreateRGBSurface
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
216
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
217 extern DECLSPEC const SDL_version *SDLCALL SDL_Linked_Version(void);
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
218 extern DECLSPEC char *SDLCALL SDL_AudioDriverName(char *namebuf, int maxlen);
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
219 extern DECLSPEC char *SDLCALL SDL_VideoDriverName(char *namebuf, int maxlen);
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
220 extern DECLSPEC const SDL_VideoInfo *SDLCALL SDL_GetVideoInfo(void);
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
221 extern DECLSPEC int SDLCALL SDL_VideoModeOK(int width, int height, int bpp,
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
222 Uint32 flags);
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
223 extern DECLSPEC SDL_Rect **SDLCALL SDL_ListModes(SDL_PixelFormat * format,
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
224 Uint32 flags);
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
225 extern DECLSPEC SDL_Surface *SDLCALL SDL_SetVideoMode(int width, int height,
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
226 int bpp, Uint32 flags);
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
227 extern DECLSPEC SDL_Surface *SDLCALL SDL_GetVideoSurface(void);
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
228 extern DECLSPEC void SDLCALL SDL_UpdateRects(SDL_Surface * screen,
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
229 int numrects, SDL_Rect * rects);
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
230 extern DECLSPEC void SDLCALL SDL_UpdateRect(SDL_Surface * screen, Sint32 x,
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
231 Sint32 y, Uint32 w, Uint32 h);
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
232 extern DECLSPEC int SDLCALL SDL_Flip(SDL_Surface * screen);
2266
e61ad15a205f More work in progress integrating SDL_Surface and the new SDL_Texture API
Sam Lantinga <slouken@libsdl.org>
parents: 2222
diff changeset
233 extern DECLSPEC int SDLCALL SDL_SetAlpha(SDL_Surface * surface, Uint32 flag,
e61ad15a205f More work in progress integrating SDL_Surface and the new SDL_Texture API
Sam Lantinga <slouken@libsdl.org>
parents: 2222
diff changeset
234 Uint8 alpha);
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
235 extern DECLSPEC SDL_Surface *SDLCALL SDL_DisplayFormat(SDL_Surface * surface);
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
236 extern DECLSPEC SDL_Surface *SDLCALL SDL_DisplayFormatAlpha(SDL_Surface *
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
237 surface);
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
238 extern DECLSPEC void SDLCALL SDL_WM_SetCaption(const char *title,
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
239 const char *icon);
2043
adf732f1f016 Formatting update
Sam Lantinga <slouken@libsdl.org>
parents: 2037
diff changeset
240 extern DECLSPEC void SDLCALL SDL_WM_GetCaption(const char **title,
adf732f1f016 Formatting update
Sam Lantinga <slouken@libsdl.org>
parents: 2037
diff changeset
241 const char **icon);
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
242 extern DECLSPEC void SDLCALL SDL_WM_SetIcon(SDL_Surface * icon, Uint8 * mask);
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
243 extern DECLSPEC int SDLCALL SDL_WM_IconifyWindow(void);
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
244 extern DECLSPEC int SDLCALL SDL_WM_ToggleFullScreen(SDL_Surface * surface);
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
245 extern DECLSPEC SDL_GrabMode SDLCALL SDL_WM_GrabInput(SDL_GrabMode mode);
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
246 extern DECLSPEC int SDLCALL SDL_SetPalette(SDL_Surface * surface, int flags,
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
247 const SDL_Color * colors,
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
248 int firstcolor, int ncolors);
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
249 extern DECLSPEC int SDLCALL SDL_SetColors(SDL_Surface * surface,
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
250 const SDL_Color * colors,
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
251 int firstcolor, int ncolors);
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
252 extern DECLSPEC int SDLCALL SDL_GetWMInfo(struct SDL_SysWMinfo *info);
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
253 extern DECLSPEC Uint8 SDLCALL SDL_GetAppState(void);
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
254 extern DECLSPEC void SDLCALL SDL_WarpMouse(Uint16 x, Uint16 y);
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
255 extern DECLSPEC SDL_Overlay *SDLCALL SDL_CreateYUVOverlay(int width,
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
256 int height,
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
257 Uint32 format,
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
258 SDL_Surface *
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
259 display);
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
260 extern DECLSPEC int SDLCALL SDL_LockYUVOverlay(SDL_Overlay * overlay);
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
261 extern DECLSPEC void SDLCALL SDL_UnlockYUVOverlay(SDL_Overlay * overlay);
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
262 extern DECLSPEC int SDLCALL SDL_DisplayYUVOverlay(SDL_Overlay * overlay,
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
263 SDL_Rect * dstrect);
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
264 extern DECLSPEC void SDLCALL SDL_FreeYUVOverlay(SDL_Overlay * overlay);
1912
8d384b647307 Setting up the OpenGL support
Sam Lantinga <slouken@libsdl.org>
parents: 1895
diff changeset
265 extern DECLSPEC void SDLCALL SDL_GL_SwapBuffers(void);
2129
047245361002 Key repeat is handled by the OS, since text input is now decoupled from physical key events.
Sam Lantinga <slouken@libsdl.org>
parents: 2043
diff changeset
266 extern DECLSPEC int SDLCALL SDL_EnableKeyRepeat(int delay, int interval);
047245361002 Key repeat is handled by the OS, since text input is now decoupled from physical key events.
Sam Lantinga <slouken@libsdl.org>
parents: 2043
diff changeset
267 extern DECLSPEC void SDLCALL SDL_GetKeyRepeat(int *delay, int *interval);
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
268
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
269 /* Ends C function definitions when using C++ */
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
270 #ifdef __cplusplus
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
271 /* *INDENT-OFF* */
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
272 }
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
273 /* *INDENT-ON* */
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
274 #endif
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
275 #include "close_code.h"
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
276
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
277 #endif /* _SDL_compat_h */
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
278
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
279 /* vi: set ts=4 sw=4 expandtab: */