annotate src/event-xlike-inc.c @ 2828:a25c824ed558

[xemacs-hg @ 2005-06-26 18:04:49 by aidan] Rename the ascii-character property, support more keysyms.
author aidan
date Sun, 26 Jun 2005 18:05:05 +0000
parents fffe735e63ee
children d1754e7f0cea
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1268
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
1 /* Shared event code between X and GTK -- include file.
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
2 Copyright (C) 1991-5, 1997 Free Software Foundation, Inc.
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
3 Copyright (C) 1995 Sun Microsystems, Inc.
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
4 Copyright (C) 1996, 2001, 2002, 2003 Ben Wing.
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
5
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
6 This file is part of XEmacs.
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
7
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
8 XEmacs is free software; you can redistribute it and/or modify it
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
9 under the terms of the GNU General Public License as published by the
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
10 Free Software Foundation; either version 2, or (at your option) any
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
11 later version.
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
12
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
13 XEmacs is distributed in the hope that it will be useful, but WITHOUT
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
14 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
15 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
16 for more details.
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
17
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
18 You should have received a copy of the GNU General Public License
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
19 along with XEmacs; see the file COPYING. If not, write to
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
20 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
21 Boston, MA 02111-1307, USA. */
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
22
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
23 /* Synched up with: Not in FSF. */
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
24
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
25 /* For some code it's reasonable to have only one copy and conditionalize
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
26 at run-time. For other code it isn't. #### Perhaps all code should be
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
27 included here, not in event-xlike.c. However, event-xlike.c is always
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
28 X-specific, whereas the following code isn't, in the GTK case. */
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
29
2828
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
30 EXFUN (Funicode_to_char, 2); /* In unicode.c. */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
31
1268
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
32 static int
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
33 #ifdef THIS_IS_GTK
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
34 emacs_gtk_event_pending_p (int how_many)
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
35 #else
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
36 emacs_Xt_event_pending_p (int how_many)
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
37 #endif
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
38 {
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
39 Lisp_Object event;
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
40 int tick_count_val;
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
41
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
42 /* If `how_many' is 0, then this function returns whether there are any
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
43 X, timeout, or fd events pending (that is, whether
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
44 emacs_Xt_next_event() would return immediately without blocking).
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
45
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
46 If `how_many' is > 0, then this function returns whether there are
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
47 that many *user generated* events available (keyboard, mouse click,
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
48 etc.). This also implies that emacs_Xt_next_event() would not block.
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
49 */
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
50
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
51 /* This function used to simply check whether there were any X events (or
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
52 if user_p was 1, it iterated over all the pending X events using
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
53 XCheckIfEvent(), looking for keystrokes and button events). That
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
54 worked in the old cheesoid event loop, which didn't go through
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
55 XtAppDispatchEvent(), but it doesn't work any more -- X events may not
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
56 result in anything. For example, a button press in a blank part of
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
57 the menubar appears as an X event but will not result in any Emacs
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
58 events (a button press that activates the menubar results in an Emacs
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
59 event through the stop_next_event mechanism).
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
60
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
61 The only accurate way of determining whether these X events translate
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
62 into Emacs events is to go ahead and dispatch them until there's
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
63 something on the dispatch queue. */
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
64
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
65 if (!how_many)
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
66 {
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
67 /* We're being asked for *ALL* events, not just user events. */
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
68
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
69 /* (1) Any pending events in the dispatch queue? */
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
70 if (!NILP (dispatch_event_queue))
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
71 return 1;
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
72
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
73 /* (2) Any TTY or process input available?
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
74
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
75 Note that formerly we just checked the value of XtAppPending() to
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
76 determine if there was file-desc input. This doesn't work any
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
77 more with the signal_event_pipe; XtAppPending() will says "yes" in
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
78 this case but there isn't really any input. So instead we keep
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
79 track of the file descriptors, and call select() ourselves.
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
80 Another way of fixing this problem is for the signal_event_pipe to
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
81 generate actual input in the form of an identity eval event or
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
82 something. (#### maybe this actually happens?) */
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
83
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
84 if (poll_fds_for_input (non_fake_input_wait_mask))
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
85 return 1;
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
86
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
87 #ifndef THIS_IS_GTK
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
88 /* (3) Any timeout input available? */
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
89 if (XtAppPending (Xt_app_con) & XtIMTimer)
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
90 return 1;
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
91 #else
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
92 /* #### Is there any way to do this in Gtk? I don't think there
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
93 is a 'peek' for events */
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
94 #endif
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
95 }
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
96 else
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
97 {
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
98 /* HOW_MANY > 0 */
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
99 EVENT_CHAIN_LOOP (event, dispatch_event_queue)
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
100 {
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
101 if (command_event_p (event))
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
102 {
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
103 how_many--;
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
104 if (how_many <= 0)
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
105 return 1;
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
106 }
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
107 }
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
108 }
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
109
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
110 /* XtAppPending() can be super-slow, esp. over a network connection.
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
111 Quantify results have indicated that in some cases the call to
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
112 detect_input_pending() completely dominates the running time of
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
113 redisplay(). Fortunately, in a SIGIO world we can more quickly
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
114 determine whether there are any X events: if an event has happened
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
115 since the last time we checked, then a SIGIO will have happened. On a
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
116 machine with broken SIGIO, we'll still be in an OK state --
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
117 quit_check_signal_tick_count will get ticked at least every 1/4
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
118 second, so we'll be no more than that much behind reality. (In general
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
119 it's OK if we erroneously report no input pending when input is
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
120 actually pending() -- preemption is just a bit less efficient, that's
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
121 all. It's bad bad bad if you err the other way -- you've promised
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
122 that `next-event' won't block but it actually will, and some action
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
123 might get delayed until the next time you hit a key.)
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
124 */
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
125
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
126 if (!in_modal_loop)
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
127 {
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
128 /* quit_check_signal_tick_count is volatile so try to avoid race
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
129 conditions by using a temporary variable */
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
130 tick_count_val = quit_check_signal_tick_count;
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
131 if (last_quit_check_signal_tick_count != tick_count_val
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
132 #if !defined (THIS_IS_GTK) && (!defined (SIGIO) || defined (CYGWIN))
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
133 || (XtIMXEvent & XtAppPending (Xt_app_con))
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
134 #endif
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
135 )
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
136 {
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
137 last_quit_check_signal_tick_count = tick_count_val;
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
138
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
139 /* We need to drain the entire queue now -- if we only drain part of
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
140 it, we may later on end up with events actually pending but
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
141 detect_input_pending() returning false because there wasn't
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
142 another SIGIO. */
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
143 event_stream_drain_queue ();
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
144
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
145 if (!how_many)
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
146 return !NILP (dispatch_event_queue);
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
147
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
148 EVENT_CHAIN_LOOP (event, dispatch_event_queue)
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
149 {
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
150 if (command_event_p (event))
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
151 {
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
152 how_many--;
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
153 if (how_many <= 0)
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
154 return 1;
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
155 }
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
156 }
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
157
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
158 return 0;
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
159 }
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
160 }
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
161
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
162 return 0;
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
163 }
2828
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
164
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
165 #if defined(THIS_IS_X) || !defined(__GDK_KEYS_H__)
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
166
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
167 /* Use an appropriate map to Unicode within x_keysym_to_character. Arguments
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
168 are evaluated multiple times.
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
169
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
170 Breaks if an X11 keysym maps to zero in Unicode. */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
171
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
172 #define USE_UNICODE_MAP(keysym, map) \
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
173 if (keysym >= FIRST_KNOWN_##map \
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
174 && (keysym < (FIRST_KNOWN_##map + countof(map))) \
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
175 && map[keysym - FIRST_KNOWN_##map ]) do \
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
176 { \
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
177 keysym -= FIRST_KNOWN_##map ; \
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
178 return Funicode_to_char(make_int(map[keysym]), Qnil); \
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
179 } while (0)
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
180
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
181 /* Maps to Unicode for X11 KeySyms, where we don't have a direct internal
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
182 mapping based on a Mule character set, or whatever. Taken from Markus
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
183 Kuhn's X11.keysyms--if you're ever comparing with that file, note the
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
184 sequences of KeySyms often leave out entries, so you'll have to fill them
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
185 in. Doesn't include support for Hangul, which it should, if the X11
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
186 Hangul keysyms have ever been used anywhere.
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
187
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
188 I'm not #ifdef'ing this based on wheter MULE is defined, because it's a
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
189 matter of 324 bytes in a stripped executable, and I want the
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
190 testing. :-P */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
191
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
192 static UINT_16_BIT const TECHNICAL[] =
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
193 {
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
194 0x23B7, /* #x08A1 LEFT RADICAL Technical */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
195
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
196 #define FIRST_KNOWN_TECHNICAL 0x8A1
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
197
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
198 0x0, /* #x08A2 TOP LEFT RADICAL Technical */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
199 0x0, /* #x08A3 HORIZONTAL CONNECTOR Technical */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
200 0x2320, /* #x08A4 TOP INTEGRAL Technical */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
201 0x2321, /* #x08A5 BOTTOM INTEGRAL Technical */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
202 0x0, /* #x08A6 VERTICAL CONNECTOR Technical */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
203 0x23A1, /* #x08A7 TOP LEFT SQUARE BRACKET Technical */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
204 0x23A3, /* #x08A8 BOTTOM LEFT SQUARE BRACKET Technical */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
205 0x23A4, /* #x08A9 TOP RIGHT SQUARE BRACKET Technical */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
206 0x23A6, /* #x08AA BOTTOM RIGHT SQUARE BRACKET Technical */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
207 0x239B, /* #x08AB TOP LEFT PARENTHESIS Technical */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
208 0x239D, /* #x08AC BOTTOM LEFT PARENTHESIS Technical */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
209 0x239E, /* #x08AD TOP RIGHT PARENTHESIS Technical */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
210 0x23A0, /* #x08AE BOTTOM RIGHT PARENTHESIS Technical */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
211 0x23A8, /* #x08AF LEFT MIDDLE CURLY BRACE Technical */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
212 0x23AC, /* #x08B0 RIGHT MIDDLE CURLY BRACE Technical */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
213 0x0, /* #x08B1 TOP LEFT SUMMATION Technical */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
214 0x0, /* #x08B2 BOTTOM LEFT SUMMATION Technical */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
215 0x0, /* #x08B3 TOP VERTICAL SUMMATION CONNECTOR Technical */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
216 0x0, /* #x08B4 BOTTOM VERTICAL SUMMATION CONNECTOR Technical */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
217 0x0, /* #x08B5 TOP RIGHT SUMMATION Technical */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
218 0x0, /* #x08B6 BOTTOM RIGHT SUMMATION Technical */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
219 0x0, /* #x08B7 RIGHT MIDDLE SUMMATION Technical */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
220 0x0, /* #x08B8 */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
221 0x0, /* #x08B9 */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
222 0x0, /* #x08BA */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
223 0x0, /* #x08BB */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
224 0x2264, /* #x08BC LESS THAN OR EQUAL SIGN Technical */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
225 0x2260, /* #x08BD NOT EQUAL SIGN Technical */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
226 0x2265, /* #x08BE GREATER THAN OR EQUAL SIGN Technical */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
227 0x222B, /* #x08BF INTEGRAL Technical */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
228 0x2234, /* #x08C0 THEREFORE Technical */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
229 0x221D, /* #x08C1 VARIATION, PROPORTIONAL TO Technical */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
230 0x221E, /* #x08C2 INFINITY Technical */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
231 0x0, /* #x08C3 */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
232 0x0, /* #x08C4 */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
233 0x2207, /* #x08C5 NABLA, DEL Technical */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
234 0x0, /* #x08C6 */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
235 0x0, /* #x08C7 */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
236 0x223C, /* #x08C8 IS APPROXIMATE TO Technical */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
237 0x2243, /* #x08C9 SIMILAR OR EQUAL TO Technical */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
238 0x0, /* #x08CA */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
239 0x0, /* #x08CB */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
240 0x0, /* #x08CC */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
241 0x21D4, /* #x08CD IF AND ONLY IF Technical */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
242 0x21D2, /* #x08CE IMPLIES Technical */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
243 0x2261, /* #x08CF IDENTICAL TO Technical */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
244 0x0, /* #x08D0 */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
245 0x0, /* #x08D1 */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
246 0x0, /* #x08D2 */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
247 0x0, /* #x08D3 */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
248 0x0, /* #x08D4 */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
249 0x0, /* #x08D5 */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
250 0x221A, /* #x08D6 RADICAL Technical */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
251 0x0, /* #x08D7 */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
252 0x0, /* #x08D8 */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
253 0x0, /* #x08D9 */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
254 0x2282, /* #x08DA IS INCLUDED IN Technical */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
255 0x2283, /* #x08DB INCLUDES Technical */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
256 0x2229, /* #x08DC INTERSECTION Technical */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
257 0x222A, /* #x08DD UNION Technical */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
258 0x2227, /* #x08DE LOGICAL AND Technical */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
259 0x2228, /* #x08DF LOGICAL OR Technical */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
260 0x0, /* #x08E0 */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
261 0x0, /* #x08E1 */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
262 0x0, /* #x08E2 */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
263 0x0, /* #x08E3 */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
264 0x0, /* #x08E4 */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
265 0x0, /* #x08E5 */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
266 0x0, /* #x08E6 */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
267 0x0, /* #x08E7 */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
268 0x0, /* #x08E8 */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
269 0x0, /* #x08E9 */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
270 0x0, /* #x08Ea */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
271 0x0, /* #x08Eb */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
272 0x0, /* #x08Ec */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
273 0x0, /* #x08Ed */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
274 0x0, /* #x08Ee */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
275 0x2202, /* #x08EF PARTIAL DERIVATIVE Technical */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
276 0x0, /* #x08F0 */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
277 0x0, /* #x08F1 */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
278 0x0, /* #x08F2 */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
279 0x0, /* #x08F3 */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
280 0x0, /* #x08F4 */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
281 0x0, /* #x08F5 */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
282 0x0192, /* #x08F6 FUNCTION Technical */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
283 0x0, /* #x08F7 */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
284 0x0, /* #x08F8 */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
285 0x0, /* #x08F9 */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
286 0x0, /* #x08FA */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
287 0x2190, /* #x08FB LEFT ARROW Technical */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
288 0x2191, /* #x08FC UPWARD ARROW Technical */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
289 0x2192, /* #x08FD RIGHT ARROW Technical */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
290 0x2193, /* #x08FE DOWNWARD ARROW Technical */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
291 };
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
292
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
293 static UINT_16_BIT const SPECIAL[] =
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
294 {
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
295 0x25C6, /* #x09E0 SOLID DIAMOND Special */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
296
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
297 #define FIRST_KNOWN_SPECIAL 0x9E0
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
298
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
299 0x2592, /* #x09E1 CHECKERBOARD Special */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
300 0x2409, /* #x09E2 ``HT'' Special */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
301 0x240C, /* #x09E3 ``FF'' Special */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
302 0x240D, /* #x09E4 ``CR'' Special */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
303 0x240A, /* #x09E5 ``LF'' Special */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
304 0x0, /* #x09E6 */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
305 0x0, /* #x09E7 */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
306 0x2424, /* #x09E8 ``NL'' Special */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
307 0x240B, /* #x09E9 ``VT'' Special */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
308 0x2518, /* #x09EA LOWER-RIGHT CORNER Special */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
309 0x2510, /* #x09EB UPPER-RIGHT CORNER Special */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
310 0x250C, /* #x09EC UPPER-LEFT CORNER Special */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
311 0x2514, /* #x09ED LOWER-LEFT CORNER Special */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
312 0x253C, /* #x09EE CROSSING-LINES Special */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
313 0x23BA, /* #x09EF HORIZONTAL LINE, SCAN 1 Special */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
314 0x23BB, /* #x09F0 HORIZONTAL LINE, SCAN 3 Special */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
315 0x2500, /* #x09F1 HORIZONTAL LINE, SCAN 5 Special */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
316 0x23BC, /* #x09F2 HORIZONTAL LINE, SCAN 7 Special */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
317 0x23BD, /* #x09F3 HORIZONTAL LINE, SCAN 9 Special */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
318 0x251C, /* #x09F4 LEFT ``T'' Special */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
319 0x2524, /* #x09F5 RIGHT ``T'' Special */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
320 0x2534, /* #x09F6 BOTTOM ``T'' Special */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
321 0x252C, /* #x09F7 TOP ``T'' Special */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
322 0x2502 /* #x09F8 VERTICAL BAR Special */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
323 };
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
324
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
325 static UINT_16_BIT const PUBLISHING[] =
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
326 {
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
327 0x2003, /* #x0AA1 EM SPACE Publish */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
328
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
329 #define FIRST_KNOWN_PUBLISHING 0xAA1
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
330
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
331 0x2002, /* #x0AA2 EN SPACE Publish */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
332 0x2004, /* #x0AA3 3/EM SPACE Publish */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
333 0x2005, /* #x0AA4 4/EM SPACE Publish */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
334 0x2007, /* #x0AA5 DIGIT SPACE Publish */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
335 0x2008, /* #x0AA6 PUNCTUATION SPACE Publish */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
336 0x2009, /* #x0AA7 THIN SPACE Publish */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
337 0x200A, /* #x0AA8 HAIR SPACE Publish */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
338 0x2014, /* #x0AA9 EM DASH Publish */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
339 0x2013, /* #x0AAA EN DASH Publish */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
340 0x0, /* #x0AAB */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
341 0x0, /* #x0AAC SIGNIFICANT BLANK SYMBOL Publish */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
342 0x0, /* #x0AAD */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
343 0x2026, /* #x0AAE ELLIPSIS Publish */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
344 0x2025, /* #x0AAF DOUBLE BASELINE DOT Publish */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
345 0x2153, /* #x0AB0 VULGAR FRACTION ONE THIRD Publish */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
346 0x2154, /* #x0AB1 VULGAR FRACTION TWO THIRDS Publish */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
347 0x2155, /* #x0AB2 VULGAR FRACTION ONE FIFTH Publish */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
348 0x2156, /* #x0AB3 VULGAR FRACTION TWO FIFTHS Publish */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
349 0x2157, /* #x0AB4 VULGAR FRACTION THREE FIFTHS Publish */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
350 0x2158, /* #x0AB5 VULGAR FRACTION FOUR FIFTHS Publish */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
351 0x2159, /* #x0AB6 VULGAR FRACTION ONE SIXTH Publish */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
352 0x215A, /* #x0AB7 VULGAR FRACTION FIVE SIXTHS Publish */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
353 0x2105, /* #x0AB8 CARE OF Publish */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
354 0x0, /* #x0AB9 */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
355 0x0, /* #x0ABA */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
356 0x2012, /* #x0ABB FIGURE DASH Publish */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
357 0x0, /* #x0ABC LEFT ANGLE BRACKET Publish */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
358 0x0, /* #x0ABD DECIMAL POINT Publish */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
359 0x0, /* #x0ABE RIGHT ANGLE BRACKET Publish */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
360 0x0, /* #x0ABF MARKER Publish */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
361 0x0, /* #x0AC0 */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
362 0x0, /* #x0AC1 */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
363 0x0, /* #x0AC2 */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
364 0x215B, /* #x0AC3 VULGAR FRACTION ONE EIGHTH Publish */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
365 0x215C, /* #x0AC4 VULGAR FRACTION THREE EIGHTHS Publish */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
366 0x215D, /* #x0AC5 VULGAR FRACTION FIVE EIGHTHS Publish */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
367 0x215E, /* #x0AC6 VULGAR FRACTION SEVEN EIGHTHS Publish */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
368 0x0, /* #x0AC7 */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
369 0x0, /* #x0AC8 */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
370 0x2122, /* #x0AC9 TRADEMARK SIGN Publish */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
371 0x0, /* #x0ACA SIGNATURE MARK Publish */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
372 0x0, /* #x0ACB TRADEMARK SIGN IN CIRCLE Publish */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
373 0x0, /* #x0ACC LEFT OPEN TRIANGLE Publish */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
374 0x0, /* #x0ACD RIGHT OPEN TRIANGLE Publish */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
375 0x0, /* #x0ACE EM OPEN CIRCLE Publish */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
376 0x0, /* #x0ACF EM OPEN RECTANGLE Publish */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
377 0x2018, /* #x0AD0 LEFT SINGLE QUOTATION MARK Publish */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
378 0x2019, /* #x0AD1 RIGHT SINGLE QUOTATION MARK Publish */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
379 0x201C, /* #x0AD2 LEFT DOUBLE QUOTATION MARK Publish */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
380 0x201D, /* #x0AD3 RIGHT DOUBLE QUOTATION MARK Publish */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
381 0x211E, /* #x0AD4 PRESCRIPTION, TAKE, RECIPE Publish */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
382 0x0, /* #x0AD5 */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
383 0x2032, /* #x0AD6 MINUTES Publish */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
384 0x2033, /* #x0AD7 SECONDS Publish */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
385 0x0, /* #x0AD8 */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
386 0x271D, /* #x0AD9 LATIN CROSS Publish */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
387 0x0, /* #x0ADA HEXAGRAM Publish */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
388 0x0, /* #x0ADB FILLED RECTANGLE BULLET Publish */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
389 0x0, /* #x0ADC FILLED LEFT TRIANGLE BULLET Publish */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
390 0x0, /* #x0ADD FILLED RIGHT TRIANGLE BULLET Publish */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
391 0x0, /* #x0ADE EM FILLED CIRCLE Publish */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
392 0x0, /* #x0ADF EM FILLED RECTANGLE Publish */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
393 0x0, /* #x0AE0 EN OPEN CIRCLE BULLET Publish */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
394 0x0, /* #x0AE1 EN OPEN SQUARE BULLET Publish */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
395 0x0, /* #x0AE2 OPEN RECTANGULAR BULLET Publish */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
396 0x0, /* #x0AE3 OPEN TRIANGULAR BULLET UP Publish */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
397 0x0, /* #x0AE4 OPEN TRIANGULAR BULLET DOWN Publish */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
398 0x0, /* #x0AE5 OPEN STAR Publish */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
399 0x0, /* #x0AE6 EN FILLED CIRCLE BULLET Publish */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
400 0x0, /* #x0AE7 EN FILLED SQUARE BULLET Publish */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
401 0x0, /* #x0AE8 FILLED TRIANGULAR BULLET UP Publish */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
402 0x0, /* #x0AE9 FILLED TRIANGULAR BULLET DOWN Publish */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
403 0x0, /* #x0AEA LEFT POINTER Publish */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
404 0x0, /* #x0AEB RIGHT POINTER Publish */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
405 0x2663, /* #x0AEC CLUB Publish */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
406 0x2666, /* #x0AED DIAMOND Publish */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
407 0x2665, /* #x0AEE HEART Publish */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
408 0x0, /* #x0AEF */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
409 0x2720, /* #x0AF0 MALTESE CROSS Publish */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
410 0x2020, /* #x0AF1 DAGGER Publish */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
411 0x2021, /* #x0AF2 DOUBLE DAGGER Publish */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
412 0x2713, /* #x0AF3 CHECK MARK, TICK Publish */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
413 0x2717, /* #x0AF4 BALLOT CROSS Publish */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
414 0x266F, /* #x0AF5 MUSICAL SHARP Publish */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
415 0x266D, /* #x0AF6 MUSICAL FLAT Publish */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
416 0x2642, /* #x0AF7 MALE SYMBOL Publish */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
417 0x2640, /* #x0AF8 FEMALE SYMBOL Publish */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
418 0x260E, /* #x0AF9 TELEPHONE SYMBOL Publish */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
419 0x2315, /* #x0AFA TELEPHONE RECORDER SYMBOL Publish */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
420 0x2117, /* #x0AFB PHONOGRAPH COPYRIGHT SIGN Publish */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
421 0x2038, /* #x0AFC CARET Publish */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
422 0x201A, /* #x0AFD SINGLE LOW QUOTATION MARK Publish */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
423 0x201E, /* #x0AFE DOUBLE LOW QUOTATION MARK Publish */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
424 };
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
425
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
426 static UINT_16_BIT const APL[] =
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
427 {
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
428 0x22A5, /* #x0BC2 DOWN TACK APL */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
429 #define FIRST_KNOWN_APL 0xBC2
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
430 0x0, /* #x0BC3 UP SHOE (CAP) APL */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
431 0x230A, /* #x0BC4 DOWN STILE APL */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
432 0x0, /* #x0BC5 */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
433 0x0, /* #x0BC6 UNDERBAR APL */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
434 0x0, /* #x0BC7 */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
435 0x0, /* #x0BC8 */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
436 0x0, /* #x0BC9 */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
437 0x2218, /* #x0BCA JOT APL */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
438 0x0, /* #x0BCB */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
439 0x2395, /* #x0BCC QUAD APL */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
440 0x0, /* #x0BCD */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
441 0x22A4, /* #x0BCE UP TACK APL */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
442 0x25CB, /* #x0BCF CIRCLE APL */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
443 0x0, /* #x0BD0 */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
444 0x0, /* #x0BD1 */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
445 0x0, /* #x0BD2 */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
446 0x2308, /* #x0BD3 UP STILE APL */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
447 0x0, /* #x0BD4 */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
448 0x0, /* #x0BD5 */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
449 0x0, /* #x0BD6 DOWN SHOE (CUP) APL */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
450 0x0, /* #x0BD7 */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
451 0x0, /* #x0BD8 RIGHT SHOE APL */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
452 0x0, /* #x0BD9 */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
453 0x0, /* #x0BDA LEFT SHOE APL */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
454 0x0, /* #x0BDB */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
455 0x0, /* #x0BDC */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
456 0x22A2, /* #x0BDC LEFT TACK APL */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
457 0x0, /* #x0BDE */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
458 0x0, /* #x0BDF */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
459 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, /* 0x0BB0--0x0BBB */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
460 0x0, 0x0, 0x0, 0x0,
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
461 0x22A3, /* #x0BFC RIGHT TACK APL */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
462 };
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
463
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
464 /* For every key on the keyboard that has a known character correspondence,
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
465 we define the character-of-keysym property of its XEmacs keysym, and make
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
466 the default binding for the key be self-insert-command.
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
467
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
468 The following magic is based on intimate knowledge of some of
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
469 X11/keysymdef.h. The keysym mappings defined by X11 are based on the
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
470 iso8859 standards, except for Cyrillic and Greek.
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
471
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
472 In a non-Mule world, a user can still have a multi-lingual editor, by
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
473 doing (set-face-font "...-iso8859-2" (current-buffer)) for all their
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
474 Latin-2 buffers, etc. and the X11 keysyms corresponding to characters in
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
475 those character sets will still do the right thing (because of the
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
476 make_char (code + 0x80) non-Mule case below.) Of course, X11 keysyms in
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
477 other character sets will not do the right thing, because XEmacs won't
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
478 support the right thing.
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
479
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
480 This code is also called when a command lookup is about to fail, and the
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
481 X11 platform code has worked out that it previously wasn't aware the
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
482 keysym of that command could be generated by the user's keyboard; in that
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
483 case, we bind its XEmacs keysym to self-insert-command if it has a
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
484 character correspondence we know about, and tell the general event code
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
485 that we've done so, so it can try the lookup again.
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
486
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
487 Called from the GTK code because GTK 1 has no defined way of doing the
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
488 same thing, and this works for it on X11. It should be moved back into
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
489 event-Xt.c when and if the GTK port moves to GTK 2. */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
490
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
491 #ifndef THIS_IS_GTK
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
492 static Lisp_Object
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
493 x_keysym_to_character(KeySym keysym)
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
494 #else
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
495 Lisp_Object
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
496 gtk_keysym_to_character(guint keysym)
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
497 #endif
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
498 {
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
499 Lisp_Object charset = Qzero;
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
500 int code = 0;
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
501
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
502 /* Markus Kuhn's spec says keysyms in the range #x01000100 to #x0110FFFF
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
503 and only those should correspond directly to Unicode code points, in
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
504 the range #x100-#x10FFFF; actual implementations can have the Latin 1
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
505 code points do the same thing with keysyms
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
506 #x010000A0-#x01000100. */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
507
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
508 if (keysym >= 0x010000A0 && keysym <= 0x0110FFFF)
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
509 return Funicode_to_char (make_int(keysym & 0xffffff), Qnil);
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
510
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
511 if ((keysym & 0xff) < 0xa0)
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
512 return Qnil;
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
513
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
514 switch (keysym >> 8)
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
515 {
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
516
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
517 #define USE_CHARSET(var,cs) \
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
518 ((var) = charset_by_leading_byte (LEADING_BYTE_##cs))
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
519
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
520 case 0: /* ASCII + Latin1 */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
521 USE_CHARSET (charset, LATIN_ISO8859_1);
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
522 code = keysym & 0x7f;
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
523 break;
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
524 case 1: /* Latin2 */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
525 USE_CHARSET (charset, LATIN_ISO8859_2);
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
526 code = keysym & 0x7f;
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
527 break;
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
528 case 2: /* Latin3 */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
529 USE_CHARSET (charset, LATIN_ISO8859_3);
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
530 code = keysym & 0x7f;
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
531 break;
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
532 case 3: /* Latin4 */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
533 USE_CHARSET (charset, LATIN_ISO8859_4);
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
534 code = keysym & 0x7f;
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
535 break;
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
536 case 4: /* Katakana */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
537 USE_CHARSET (charset, KATAKANA_JISX0201);
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
538 if ((keysym & 0xff) > 0xa0)
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
539 code = keysym & 0x7f;
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
540 break;
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
541 case 5: /* Arabic */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
542 USE_CHARSET (charset, ARABIC_ISO8859_6);
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
543 code = keysym & 0x7f;
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
544 break;
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
545 case 6: /* Cyrillic */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
546 {
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
547 static UExtbyte const cyrillic[] = /* 0x20 - 0x7f */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
548 {0x00, 0x72, 0x73, 0x71, 0x74, 0x75, 0x76, 0x77,
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
549 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x00, 0x7e, 0x7f,
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
550 0x70, 0x22, 0x23, 0x21, 0x24, 0x25, 0x26, 0x27,
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
551 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x00, 0x2e, 0x2f,
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
552 0x6e, 0x50, 0x51, 0x66, 0x54, 0x55, 0x64, 0x53,
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
553 0x65, 0x58, 0x59, 0x5a, 0x5b, 0x5c, 0x5d, 0x5e,
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
554 0x5f, 0x6f, 0x60, 0x61, 0x62, 0x63, 0x56, 0x52,
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
555 0x6c, 0x6b, 0x57, 0x68, 0x6d, 0x69, 0x67, 0x6a,
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
556 0x4e, 0x30, 0x31, 0x46, 0x34, 0x35, 0x44, 0x33,
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
557 0x45, 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e,
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
558 0x3f, 0x4f, 0x40, 0x41, 0x42, 0x43, 0x36, 0x32,
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
559 0x4c, 0x4b, 0x37, 0x48, 0x4d, 0x49, 0x47, 0x4a};
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
560 USE_CHARSET (charset, CYRILLIC_ISO8859_5);
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
561 code = cyrillic[(keysym & 0x7f) - 0x20];
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
562 break;
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
563 }
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
564 case 7: /* Greek */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
565 {
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
566 static UExtbyte const greek[] = /* 0x20 - 0x7f */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
567 {0x00, 0x36, 0x38, 0x39, 0x3a, 0x5a, 0x00, 0x3c,
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
568 0x3e, 0x5b, 0x00, 0x3f, 0x00, 0x00, 0x35, 0x2f,
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
569 0x00, 0x5c, 0x5d, 0x5e, 0x5f, 0x7a, 0x40, 0x7c,
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
570 0x7d, 0x7b, 0x60, 0x7e, 0x00, 0x00, 0x00, 0x00,
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
571 0x00, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47,
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
572 0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f,
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
573 0x50, 0x51, 0x53, 0x00, 0x54, 0x55, 0x56, 0x57,
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
574 0x58, 0x59, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
575 0x00, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67,
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
576 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f,
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
577 0x70, 0x71, 0x73, 0x72, 0x74, 0x75, 0x76, 0x77,
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
578 0x78, 0x79, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
579 USE_CHARSET (charset, GREEK_ISO8859_7);
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
580 code = greek[(keysym & 0x7f) - 0x20];
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
581 break;
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
582 }
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
583 case 8:
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
584 USE_UNICODE_MAP(keysym, TECHNICAL);
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
585 break;
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
586 case 9:
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
587 USE_UNICODE_MAP(keysym, SPECIAL);
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
588 break;
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
589 case 10:
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
590 USE_UNICODE_MAP(keysym, PUBLISHING);
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
591 break;
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
592 case 11:
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
593 USE_UNICODE_MAP(keysym, APL);
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
594 break;
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
595 case 12: /* Hebrew */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
596 USE_CHARSET (charset, HEBREW_ISO8859_8);
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
597 code = keysym & 0x7f;
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
598 break;
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
599 case 13: /* Thai */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
600 /* #### This needs to deal with character composition.
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
601 Are you sure we can't leave it to the X server? */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
602 USE_CHARSET (charset, THAI_TIS620);
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
603 code = keysym & 0x7f;
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
604 break;
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
605 case 14: /* Korean Hangul. Would like some information on whether this
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
606 is worth doing--there don't appear to be any Korean keyboard
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
607 layouts in the XKB data files. */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
608 break;
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
609
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
610 case 19: /* Latin 9 - ISO8859-15. */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
611 USE_CHARSET (charset, LATIN_ISO8859_15);
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
612 code = keysym & 0x7f;
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
613 break;
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
614 case 32: /* Currency. The lower sixteen bits of these keysyms happily
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
615 correspond exactly to the Unicode code points of the
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
616 associated characters */
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
617 return Funicode_to_char(make_int(keysym & 0xffff), Qnil);
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
618 break;
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
619 default:
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
620 break;
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
621 }
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
622
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
623 if (code == 0)
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
624 return Qnil;
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
625
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
626 #ifdef MULE
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
627 return make_char (make_ichar (charset, code, 0));
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
628 #else
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
629 return make_char (code + 0x80);
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
630 #endif
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
631 }
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
632
a25c824ed558 [xemacs-hg @ 2005-06-26 18:04:49 by aidan]
aidan
parents: 1268
diff changeset
633 #endif /* defined(THIS_IS_X) || !defined(__GDK_KEYS_H__) */