VirtualBox

source: vbox/trunk/src/VBox/Additions/x11/x11include/xorg-server-1.3.0.0/keysym2ucs.h@ 33428

Last change on this file since 33428 was 25078, checked in by vboxsync, 15 years ago

Additions/x11/x11include: exported and set eol-style on new headers

  • Property svn:eol-style set to native
File size: 1.4 KB
Line 
1/* $XFree86: $
2 *
3 * This module converts keysym values into the corresponding ISO 10646
4 * (UCS, Unicode) values.
5 *
6 * The array keysymtab[] contains pairs of X11 keysym values for graphical
7 * characters and the corresponding Unicode value. The function
8 * keysym2ucs() maps a keysym onto a Unicode value using a binary search,
9 * therefore keysymtab[] must remain SORTED by keysym value.
10 *
11 * The keysym -> UTF-8 conversion will hopefully one day be provided
12 * by Xlib via XmbLookupString() and should ideally not have to be
13 * done in X applications. But we are not there yet.
14 *
15 * We allow to represent any UCS character in the range U-00000000 to
16 * U-00FFFFFF by a keysym value in the range 0x01000000 to 0x01ffffff.
17 * This admittedly does not cover the entire 31-bit space of UCS, but
18 * it does cover all of the characters up to U-10FFFF, which can be
19 * represented by UTF-16, and more, and it is very unlikely that higher
20 * UCS codes will ever be assigned by ISO. So to get Unicode character
21 * U+ABCD you can directly use keysym 0x0100abcd.
22 *
23 * Author: Markus G. Kuhn <[email protected]>, University of Cambridge, April 2001
24 *
25 * Special thanks to Richard Verhoeven <[email protected]> for preparing
26 * an initial draft of the mapping table.
27 *
28 * This software is in the public domain. Share and enjoy!
29 */
30
31#ifndef KEYSYM2UCS_H
32#define KEYSYM2UCS_H 1
33
34extern long keysym2ucs(int keysym);
35extern int ucs2keysym(long ucs);
36
37#endif /* KEYSYM2UCS_H */
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette