Mercurial > hg > xemacs-beta
comparison src/event-xlike-inc.c @ 3439:d1754e7f0cea
[xemacs-hg @ 2006-06-03 17:50:39 by aidan]
Just-in-time Unicode code point support.
author | aidan |
---|---|
date | Sat, 03 Jun 2006 17:51:06 +0000 |
parents | a25c824ed558 |
children | 6139607b3fbf |
comparison
equal
deleted
inserted
replaced
3438:14fbcab7c67b | 3439:d1754e7f0cea |
---|---|
24 | 24 |
25 /* For some code it's reasonable to have only one copy and conditionalize | 25 /* For some code it's reasonable to have only one copy and conditionalize |
26 at run-time. For other code it isn't. #### Perhaps all code should be | 26 at run-time. For other code it isn't. #### Perhaps all code should be |
27 included here, not in event-xlike.c. However, event-xlike.c is always | 27 included here, not in event-xlike.c. However, event-xlike.c is always |
28 X-specific, whereas the following code isn't, in the GTK case. */ | 28 X-specific, whereas the following code isn't, in the GTK case. */ |
29 | |
30 EXFUN (Funicode_to_char, 2); /* In unicode.c. */ | |
31 | 29 |
32 static int | 30 static int |
33 #ifdef THIS_IS_GTK | 31 #ifdef THIS_IS_GTK |
34 emacs_gtk_event_pending_p (int how_many) | 32 emacs_gtk_event_pending_p (int how_many) |
35 #else | 33 #else |
501 | 499 |
502 /* Markus Kuhn's spec says keysyms in the range #x01000100 to #x0110FFFF | 500 /* Markus Kuhn's spec says keysyms in the range #x01000100 to #x0110FFFF |
503 and only those should correspond directly to Unicode code points, in | 501 and only those should correspond directly to Unicode code points, in |
504 the range #x100-#x10FFFF; actual implementations can have the Latin 1 | 502 the range #x100-#x10FFFF; actual implementations can have the Latin 1 |
505 code points do the same thing with keysyms | 503 code points do the same thing with keysyms |
506 #x010000A0-#x01000100. */ | 504 #x01000000-#x01000100. */ |
507 | 505 |
508 if (keysym >= 0x010000A0 && keysym <= 0x0110FFFF) | 506 if (keysym >= 0x01000000 && keysym <= 0x0110FFFF) |
509 return Funicode_to_char (make_int(keysym & 0xffffff), Qnil); | 507 return Funicode_to_char (make_int(keysym & 0xffffff), Qnil); |
510 | 508 |
511 if ((keysym & 0xff) < 0xa0) | 509 if ((keysym & 0xff) < 0xa0) |
512 return Qnil; | 510 return Qnil; |
513 | 511 |