Mercurial > sdl-ios-xcode
annotate src/video/ataricommon/SDL_atarievents_c.h @ 4039:7fd9a811efc7 SDL-1.2
Reverted most of r3200:3201: a malloc() failure would leave a zero-byte
file if opening for write.
author | Ryan C. Gordon <icculus@icculus.org> |
---|---|
date | Tue, 10 Jul 2007 18:56:08 +0000 |
parents | bf1586b58ef2 |
children | a1b03ba2fcd0 |
rev | line source |
---|---|
281
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1 /* |
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
2 SDL - Simple DirectMedia Layer |
1312
c9b51268668f
Updated copyright information and removed rcs id lines (problematic in branch merges)
Sam Lantinga <slouken@libsdl.org>
parents:
1221
diff
changeset
|
3 Copyright (C) 1997-2006 Sam Lantinga |
281
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
4 |
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
5 This library is free software; you can redistribute it and/or |
1312
c9b51268668f
Updated copyright information and removed rcs id lines (problematic in branch merges)
Sam Lantinga <slouken@libsdl.org>
parents:
1221
diff
changeset
|
6 modify it under the terms of the GNU Lesser General Public |
281
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
7 License as published by the Free Software Foundation; either |
1312
c9b51268668f
Updated copyright information and removed rcs id lines (problematic in branch merges)
Sam Lantinga <slouken@libsdl.org>
parents:
1221
diff
changeset
|
8 version 2.1 of the License, or (at your option) any later version. |
281
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
9 |
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
10 This library is distributed in the hope that it will be useful, |
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
11 but WITHOUT ANY WARRANTY; without even the implied warranty of |
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
1312
c9b51268668f
Updated copyright information and removed rcs id lines (problematic in branch merges)
Sam Lantinga <slouken@libsdl.org>
parents:
1221
diff
changeset
|
13 Lesser General Public License for more details. |
281
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
14 |
1312
c9b51268668f
Updated copyright information and removed rcs id lines (problematic in branch merges)
Sam Lantinga <slouken@libsdl.org>
parents:
1221
diff
changeset
|
15 You should have received a copy of the GNU Lesser General Public |
c9b51268668f
Updated copyright information and removed rcs id lines (problematic in branch merges)
Sam Lantinga <slouken@libsdl.org>
parents:
1221
diff
changeset
|
16 License along with this library; if not, write to the Free Software |
c9b51268668f
Updated copyright information and removed rcs id lines (problematic in branch merges)
Sam Lantinga <slouken@libsdl.org>
parents:
1221
diff
changeset
|
17 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
281
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
18 |
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
19 Sam Lantinga |
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
20 slouken@libsdl.org |
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
21 */ |
1402
d910939febfa
Use consistent identifiers for the various platforms we support.
Sam Lantinga <slouken@libsdl.org>
parents:
1361
diff
changeset
|
22 #include "SDL_config.h" |
281
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
23 |
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
24 /* |
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
25 * Atari keyboard events manager |
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
26 * |
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
27 * Patrice Mandin |
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
28 */ |
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
29 |
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
30 #ifndef _SDL_ATARI_EVENTS_H_ |
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
31 #define _SDL_ATARI_EVENTS_H_ |
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
32 |
1361
19418e4422cb
New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents:
1312
diff
changeset
|
33 #include "../SDL_sysvideo.h" |
281
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
34 |
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
35 /* Hidden "this" pointer for the video functions */ |
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
36 #define _THIS SDL_VideoDevice *this |
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
37 |
3860
bf1586b58ef2
Factorize keyboard mapping between drivers
Patrice Mandin <patmandin@gmail.com>
parents:
1402
diff
changeset
|
38 #define ATARIBIOS_MAXKEYS 128 |
bf1586b58ef2
Factorize keyboard mapping between drivers
Patrice Mandin <patmandin@gmail.com>
parents:
1402
diff
changeset
|
39 |
bf1586b58ef2
Factorize keyboard mapping between drivers
Patrice Mandin <patmandin@gmail.com>
parents:
1402
diff
changeset
|
40 /* Special keys state */ |
bf1586b58ef2
Factorize keyboard mapping between drivers
Patrice Mandin <patmandin@gmail.com>
parents:
1402
diff
changeset
|
41 #ifndef K_RSHIFT |
bf1586b58ef2
Factorize keyboard mapping between drivers
Patrice Mandin <patmandin@gmail.com>
parents:
1402
diff
changeset
|
42 enum { |
bf1586b58ef2
Factorize keyboard mapping between drivers
Patrice Mandin <patmandin@gmail.com>
parents:
1402
diff
changeset
|
43 K_RSHIFT=0, |
bf1586b58ef2
Factorize keyboard mapping between drivers
Patrice Mandin <patmandin@gmail.com>
parents:
1402
diff
changeset
|
44 K_LSHIFT, |
bf1586b58ef2
Factorize keyboard mapping between drivers
Patrice Mandin <patmandin@gmail.com>
parents:
1402
diff
changeset
|
45 K_CTRL, |
bf1586b58ef2
Factorize keyboard mapping between drivers
Patrice Mandin <patmandin@gmail.com>
parents:
1402
diff
changeset
|
46 K_ALT, |
bf1586b58ef2
Factorize keyboard mapping between drivers
Patrice Mandin <patmandin@gmail.com>
parents:
1402
diff
changeset
|
47 K_CAPSLOCK, |
bf1586b58ef2
Factorize keyboard mapping between drivers
Patrice Mandin <patmandin@gmail.com>
parents:
1402
diff
changeset
|
48 K_CLRHOME, |
bf1586b58ef2
Factorize keyboard mapping between drivers
Patrice Mandin <patmandin@gmail.com>
parents:
1402
diff
changeset
|
49 K_INSERT |
bf1586b58ef2
Factorize keyboard mapping between drivers
Patrice Mandin <patmandin@gmail.com>
parents:
1402
diff
changeset
|
50 }; |
bf1586b58ef2
Factorize keyboard mapping between drivers
Patrice Mandin <patmandin@gmail.com>
parents:
1402
diff
changeset
|
51 #endif |
bf1586b58ef2
Factorize keyboard mapping between drivers
Patrice Mandin <patmandin@gmail.com>
parents:
1402
diff
changeset
|
52 |
281
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
53 extern void (*Atari_ShutdownEvents)(void); |
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
54 |
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
55 extern void Atari_InitOSKeymap(_THIS); |
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
56 extern void Atari_PumpEvents(_THIS); |
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
57 |
3860
bf1586b58ef2
Factorize keyboard mapping between drivers
Patrice Mandin <patmandin@gmail.com>
parents:
1402
diff
changeset
|
58 extern void SDL_Atari_InitInternalKeymap(_THIS); |
bf1586b58ef2
Factorize keyboard mapping between drivers
Patrice Mandin <patmandin@gmail.com>
parents:
1402
diff
changeset
|
59 |
1221
8ef3e7e92a91
Use a simple table for Unicode translation
Patrice Mandin <patmandin@gmail.com>
parents:
1209
diff
changeset
|
60 /* Atari to Unicode charset translation table */ |
8ef3e7e92a91
Use a simple table for Unicode translation
Patrice Mandin <patmandin@gmail.com>
parents:
1209
diff
changeset
|
61 extern Uint16 SDL_AtariToUnicodeTable[256]; |
3860
bf1586b58ef2
Factorize keyboard mapping between drivers
Patrice Mandin <patmandin@gmail.com>
parents:
1402
diff
changeset
|
62 SDL_keysym *SDL_Atari_TranslateKey(int scancode, SDL_keysym *keysym, |
bf1586b58ef2
Factorize keyboard mapping between drivers
Patrice Mandin <patmandin@gmail.com>
parents:
1402
diff
changeset
|
63 SDL_bool pressed); |
1209
a55ac374271c
Added preliminary missingtranslation from Atari to Unicode charset
Patrice Mandin <patmandin@gmail.com>
parents:
769
diff
changeset
|
64 |
281
c5010ab8ba35
Added initial support for Atari (thanks Patrice!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
65 #endif /* _SDL_ATARI_EVENTS_H_ */ |