Remove ancient trunk folder from svn repository
[synfig.git] / synfig-osx / launcher / darwin-keyboard.h
1 /* darwin-keyboard.h
2    $Id: darwin-keyboard.h,v 1.1 2003/01/22 01:54:10 jharper Exp $
3
4    Copyright (c) 2003 Apple Computer, Inc. All rights reserved.
5
6    Permission is hereby granted, free of charge, to any person
7    obtaining a copy of this software and associated documentation files
8    (the "Software"), to deal in the Software without restriction,
9    including without limitation the rights to use, copy, modify, merge,
10    publish, distribute, sublicense, and/or sell copies of the Software,
11    and to permit persons to whom the Software is furnished to do so,
12    subject to the following conditions:
13
14    The above copyright notice and this permission notice shall be
15    included in all copies or substantial portions of the Software.
16
17    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
18    EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
19    MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
20    NONINFRINGEMENT.  IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT
21    HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
22    WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23    OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
24    DEALINGS IN THE SOFTWARE.
25
26    Except as contained in this notice, the name(s) of the above
27    copyright holders shall not be used in advertising or otherwise to
28    promote the sale, use or other dealings in this Software without
29    prior written authorization. */
30
31 #ifndef DARWIN_KEYBOARD_H
32 #define DARWIN_KEYBOARD_H 1
33
34 #include "X.h"
35
36 /* Each key can generate 4 glyphs. They are, in order:
37    unshifted, shifted, modeswitch unshifted, modeswitch shifted */
38
39 #ifndef MIN_KEYCODE
40 # define MIN_KEYCODE 8
41 #endif
42
43 #define GLYPHS_PER_KEY  4
44 #define NUM_KEYCODES    248
45 #define MAX_KEYCODE     NUM_KEYCODES + MIN_KEYCODE - 1
46
47 typedef struct darwin_keyboard_info_struct darwin_keyboard_info;
48
49 struct darwin_keyboard_info_struct {
50     unsigned char mod_map[MAX_KEYCODE+1];
51     KeySym key_map[NUM_KEYCODES * GLYPHS_PER_KEY];
52     unsigned char modifier_keycodes[32][2];
53 };
54
55 extern int DarwinReadSystemKeymap (darwin_keyboard_info *info);
56 extern int DarwinParseKeymapFile (darwin_keyboard_info *info);
57
58 #endif /* DARWIN_KEYBOARD_H */