#include <X11/Xmu/Lookup.h>#include <X11/keysymdef.h>Include dependency graph for Lookup.c:

Go to the source code of this file.
Defines | |
| #define | XK_LATIN1 |
| #define | XK_PUBLISHING |
| #define | sLatin1 (unsigned long)0 |
| #define | sLatin2 (unsigned long)1 |
| #define | sLatin3 (unsigned long)2 |
| #define | sLatin4 (unsigned long)3 |
| #define | sKana (unsigned long)4 |
| #define | sX0201 (unsigned long)0x01000004 |
| #define | sArabic (unsigned long)5 |
| #define | sCyrillic (unsigned long)6 |
| #define | sGreek (unsigned long)7 |
| #define | sAPL (unsigned long)11 |
| #define | sHebrew (unsigned long)12 |
Functions | |
| int | XmuLookupString (register XKeyEvent *event, unsigned char *buffer, int nbytes, KeySym *keysym, XComposeStatus *status, unsigned long keysymSet) |
| int | XmuLookupLatin1 (register XKeyEvent *event, unsigned char *buffer, int nbytes, KeySym *keysym, XComposeStatus *status) |
| int | XmuLookupLatin2 (register XKeyEvent *event, unsigned char *buffer, int nbytes, KeySym *keysym, XComposeStatus *status) |
| int | XmuLookupLatin3 (register XKeyEvent *event, unsigned char *buffer, int nbytes, KeySym *keysym, XComposeStatus *status) |
| int | XmuLookupLatin4 (register XKeyEvent *event, unsigned char *buffer, int nbytes, KeySym *keysym, XComposeStatus *status) |
| int | XmuLookupKana (register XKeyEvent *event, unsigned char *buffer, int nbytes, KeySym *keysym, XComposeStatus *status) |
| int | XmuLookupJISX0201 (register XKeyEvent *event, unsigned char *buffer, int nbytes, KeySym *keysym, XComposeStatus *status) |
| int | XmuLookupArabic (register XKeyEvent *event, unsigned char *buffer, int nbytes, KeySym *keysym, XComposeStatus *status) |
| int | XmuLookupCyrillic (register XKeyEvent *event, unsigned char *buffer, int nbytes, KeySym *keysym, XComposeStatus *status) |
| int | XmuLookupGreek (register XKeyEvent *event, unsigned char *buffer, int nbytes, KeySym *keysym, XComposeStatus *status) |
| int | XmuLookupAPL (register XKeyEvent *event, unsigned char *buffer, int nbytes, KeySym *keysym, XComposeStatus *status) |
| int | XmuLookupHebrew (register XKeyEvent *event, unsigned char *buffer, int nbytes, KeySym *keysym, XComposeStatus *status) |
Variables | |
| static unsigned short _Xconst | latin1 [128] |
| static unsigned short _Xconst | latin2 [128] |
| static unsigned char _Xconst | cyrillic [128] |
| static unsigned char _Xconst | greek [128] |
| #define sAPL (unsigned long)11 |
| #define sArabic (unsigned long)5 |
| #define sCyrillic (unsigned long)6 |
| #define sGreek (unsigned long)7 |
| #define sHebrew (unsigned long)12 |
| #define sKana (unsigned long)4 |
| #define sLatin2 (unsigned long)1 |
| #define sLatin3 (unsigned long)2 |
| #define sLatin4 (unsigned long)3 |
| #define sX0201 (unsigned long)0x01000004 |
| int XmuLookupAPL | ( | register XKeyEvent * | event, | |
| unsigned char * | buffer, | |||
| int | nbytes, | |||
| KeySym * | keysym, | |||
| XComposeStatus * | status | |||
| ) |
Definition at line 264 of file Lookup.c.
References sAPL, and XmuLookupString().
00266 { 00267 return XmuLookupString(event, buffer, nbytes, keysym, status, sAPL); 00268 }
Here is the call graph for this function:

| int XmuLookupArabic | ( | register XKeyEvent * | event, | |
| unsigned char * | buffer, | |||
| int | nbytes, | |||
| KeySym * | keysym, | |||
| XComposeStatus * | status | |||
| ) |
Definition at line 239 of file Lookup.c.
References sArabic, and XmuLookupString().
00241 { 00242 return XmuLookupString(event, buffer, nbytes, keysym, status, sArabic); 00243 }
Here is the call graph for this function:

| int XmuLookupCyrillic | ( | register XKeyEvent * | event, | |
| unsigned char * | buffer, | |||
| int | nbytes, | |||
| KeySym * | keysym, | |||
| XComposeStatus * | status | |||
| ) |
Definition at line 247 of file Lookup.c.
References sCyrillic, and XmuLookupString().
00249 { 00250 return XmuLookupString(event, buffer, nbytes, keysym, status, sCyrillic); 00251 }
Here is the call graph for this function:

| int XmuLookupGreek | ( | register XKeyEvent * | event, | |
| unsigned char * | buffer, | |||
| int | nbytes, | |||
| KeySym * | keysym, | |||
| XComposeStatus * | status | |||
| ) |
Definition at line 255 of file Lookup.c.
References sGreek, and XmuLookupString().
00257 { 00258 return XmuLookupString(event, buffer, nbytes, keysym, status, sGreek); 00259 }
Here is the call graph for this function:

| int XmuLookupHebrew | ( | register XKeyEvent * | event, | |
| unsigned char * | buffer, | |||
| int | nbytes, | |||
| KeySym * | keysym, | |||
| XComposeStatus * | status | |||
| ) |
Definition at line 272 of file Lookup.c.
References sHebrew, and XmuLookupString().
00274 { 00275 return XmuLookupString(event, buffer, nbytes, keysym, status, sHebrew); 00276 }
Here is the call graph for this function:

| int XmuLookupJISX0201 | ( | register XKeyEvent * | event, | |
| unsigned char * | buffer, | |||
| int | nbytes, | |||
| KeySym * | keysym, | |||
| XComposeStatus * | status | |||
| ) |
Definition at line 231 of file Lookup.c.
References sX0201, and XmuLookupString().
00233 { 00234 return XmuLookupString(event, buffer, nbytes, keysym, status, sX0201); 00235 }
Here is the call graph for this function:

| int XmuLookupKana | ( | register XKeyEvent * | event, | |
| unsigned char * | buffer, | |||
| int | nbytes, | |||
| KeySym * | keysym, | |||
| XComposeStatus * | status | |||
| ) |
Definition at line 223 of file Lookup.c.
References sKana, and XmuLookupString().
00225 { 00226 return XmuLookupString(event, buffer, nbytes, keysym, status, sKana); 00227 }
Here is the call graph for this function:

| int XmuLookupLatin2 | ( | register XKeyEvent * | event, | |
| unsigned char * | buffer, | |||
| int | nbytes, | |||
| KeySym * | keysym, | |||
| XComposeStatus * | status | |||
| ) |
Definition at line 199 of file Lookup.c.
References sLatin2, and XmuLookupString().
00201 { 00202 return XmuLookupString(event, buffer, nbytes, keysym, status, sLatin2); 00203 }
Here is the call graph for this function:

| int XmuLookupLatin3 | ( | register XKeyEvent * | event, | |
| unsigned char * | buffer, | |||
| int | nbytes, | |||
| KeySym * | keysym, | |||
| XComposeStatus * | status | |||
| ) |
Definition at line 207 of file Lookup.c.
References sLatin3, and XmuLookupString().
00209 { 00210 return XmuLookupString(event, buffer, nbytes, keysym, status, sLatin3); 00211 }
Here is the call graph for this function:

| int XmuLookupLatin4 | ( | register XKeyEvent * | event, | |
| unsigned char * | buffer, | |||
| int | nbytes, | |||
| KeySym * | keysym, | |||
| XComposeStatus * | status | |||
| ) |
Definition at line 215 of file Lookup.c.
References sLatin4, and XmuLookupString().
00217 { 00218 return XmuLookupString(event, buffer, nbytes, keysym, status, sLatin4); 00219 }
Here is the call graph for this function:

| int XmuLookupString | ( | register XKeyEvent * | event, | |
| unsigned char * | buffer, | |||
| int | nbytes, | |||
| KeySym * | keysym, | |||
| XComposeStatus * | status, | |||
| unsigned long | keysymSet | |||
| ) |
Definition at line 125 of file Lookup.c.
References count, cyrillic, greek, latin1, latin2, sCyrillic, sGreek, sHebrew, sKana, sLatin2, and sX0201.
Referenced by XmuLookupAPL(), XmuLookupArabic(), XmuLookupCyrillic(), XmuLookupGreek(), XmuLookupHebrew(), XmuLookupJISX0201(), XmuLookupKana(), XmuLookupLatin2(), XmuLookupLatin3(), and XmuLookupLatin4().
00128 { 00129 int count; 00130 KeySym symbol; 00131 unsigned long kset; 00132 00133 kset = keysymSet & 0xffffff; 00134 count = XLookupString(event, (char *)buffer, nbytes, &symbol, status); 00135 if (keysym) *keysym = symbol; 00136 if ((nbytes == 0) || (symbol == NoSymbol)) { 00137 /* nothing */ 00138 } else if ((count == 0) && ((symbol >> 8) == kset)) { 00139 count = 1; 00140 switch (keysymSet) { 00141 case sKana: 00142 buffer[0] = (symbol & 0xff); 00143 if (buffer[0] == 0x7e) 00144 count = 0; 00145 break; 00146 case sCyrillic: 00147 buffer[0] = cyrillic[symbol & 0x7f]; 00148 break; 00149 case sGreek: 00150 buffer[0] = greek[symbol & 0x7f]; 00151 if (!buffer[0]) 00152 count = 0; 00153 break; 00154 default: 00155 buffer[0] = (symbol & 0xff); 00156 break; 00157 } 00158 } else if ((keysymSet != 0) && (count == 1) && 00159 (((unsigned char *)buffer)[0] == symbol) && 00160 (symbol & 0x80) && 00161 !(latin1[symbol & 0x7f] & (1 << kset))) { 00162 if ((keysymSet == sHebrew) && (symbol == XK_multiply)) 00163 buffer[0] = 0xaa; 00164 else if ((keysymSet == sHebrew) && (symbol == XK_division)) 00165 buffer[0] = 0xba; 00166 else if ((keysymSet == sCyrillic) && (symbol == XK_section)) 00167 buffer[0] = 0xfd; 00168 else if ((keysymSet == sX0201) && (symbol == XK_yen)) 00169 buffer[0] = 0x5c; 00170 else 00171 count = 0; 00172 } else if (count != 0) { 00173 if ((keysymSet == sX0201) && 00174 ((symbol == XK_backslash) || (symbol == XK_asciitilde))) 00175 count = 0; 00176 } else if (((symbol >> 8) == sLatin2) && 00177 (symbol & 0x80) && (latin2[symbol & 0x7f] & (1 << kset))) { 00178 buffer[0] = (symbol & 0xff); 00179 count = 1; 00180 } else if ((keysymSet == sGreek) && 00181 ((symbol == XK_leftsinglequotemark) || 00182 (symbol == XK_rightsinglequotemark))) { 00183 buffer[0] = symbol - (XK_leftsinglequotemark - 0xa1); 00184 count = 1; 00185 } 00186 return count; 00187 }
Here is the caller graph for this function:

unsigned char _Xconst cyrillic[128] [static] |
Initial value:
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xf2, 0xf3, 0xf1, 0xf4, 0xf5, 0xf6, 0xf7,
0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0x00, 0xfe, 0xff,
0xf0, 0xa2, 0xa3, 0xa1, 0xa4, 0xa5, 0xa6, 0xa7,
0xa8, 0xa9, 0xaa, 0xab, 0xac, 0x00, 0xae, 0xaf,
0xee, 0xd0, 0xd1, 0xe6, 0xd4, 0xd5, 0xe4, 0xd3,
0xe5, 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde,
0xdf, 0xef, 0xe0, 0xe1, 0xe2, 0xe3, 0xd6, 0xd2,
0xec, 0xeb, 0xd7, 0xe8, 0xed, 0xe9, 0xe7, 0xea,
0xce, 0xb0, 0xb1, 0xc6, 0xb4, 0xb5, 0xc4, 0xb3,
0xc5, 0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe,
0xbf, 0xcf, 0xc0, 0xc1, 0xc2, 0xc3, 0xb6, 0xb2,
0xcc, 0xcb, 0xb7, 0xc8, 0xcd, 0xc9, 0xc7, 0xca}
Definition at line 75 of file Lookup.c.
Referenced by XmuLookupString().
unsigned char _Xconst greek[128] [static] |
Initial value:
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xb6, 0xb8, 0xb9, 0xba, 0xda, 0x00, 0xbc,
0xbe, 0xdb, 0x00, 0xbf, 0x00, 0x00, 0xb5, 0xaf,
0x00, 0xdc, 0xdd, 0xde, 0xdf, 0xfa, 0xc0, 0xfc,
0xfd, 0xfb, 0xe0, 0xfe, 0x00, 0x00, 0x00, 0x00,
0x00, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7,
0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf,
0xd0, 0xd1, 0xd3, 0x00, 0xd4, 0xd5, 0xd6, 0xd7,
0xd8, 0xd9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7,
0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef,
0xf0, 0xf1, 0xf3, 0xf2, 0xf4, 0xf5, 0xf6, 0xf7,
0xf8, 0xf9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
Definition at line 94 of file Lookup.c.
Referenced by XmuLookupString().
unsigned short _Xconst latin1[128] [static] |
Initial value:
{0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x10ee, 0x0000, 0x1000, 0x1084, 0x102e, 0x1000, 0x1080, 0x108e,
0x108e, 0x1080, 0x0000, 0x1080, 0x1080, 0x10ee, 0x1000, 0x1008,
0x108e, 0x1080, 0x1084, 0x1084, 0x108e, 0x1004, 0x1000, 0x1084,
0x100e, 0x1000, 0x0000, 0x1080, 0x1000, 0x1084, 0x1000, 0x0000,
0x0004, 0x000e, 0x000e, 0x0008, 0x000e, 0x0008, 0x0008, 0x0006,
0x0004, 0x000e, 0x0004, 0x000e, 0x0004, 0x000e, 0x000e, 0x0004,
0x0000, 0x0004, 0x0004, 0x0006, 0x000e, 0x0008, 0x000e, 0x000e,
0x0008, 0x0004, 0x000e, 0x000c, 0x000e, 0x0002, 0x0000, 0x000e,
0x0004, 0x000e, 0x000e, 0x0008, 0x000e, 0x0008, 0x0008, 0x0006,
0x0004, 0x000e, 0x0004, 0x000e, 0x0004, 0x000e, 0x000e, 0x0004,
0x0000, 0x0004, 0x0004, 0x0006, 0x000e, 0x0008, 0x000e, 0x000e,
0x0008, 0x0004, 0x000e, 0x000c, 0x000e, 0x0002, 0x0000, 0x0000}
Definition at line 37 of file Lookup.c.
Referenced by XmuLookupString().
unsigned short _Xconst latin2[128] [static] |
Initial value:
{0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0008, 0x0004, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0008, 0x0004, 0x0000, 0x0000, 0x0000, 0x0008, 0x0004,
0x0000, 0x0008, 0x0008, 0x0000, 0x0000, 0x0000, 0x0000, 0x0008,
0x0000, 0x0008, 0x0004, 0x0000, 0x0000, 0x0000, 0x0008, 0x0004,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0008, 0x0000, 0x0008, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0008, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0008, 0x0000, 0x0008, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0008, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x000c}
Definition at line 56 of file Lookup.c.
Referenced by XmuLookupString().
1.5.1