1
/* Xutil-2.c Hiep Huu Nguyen 27 Aug 92 */
3
/* ; Copyright (c) 1994 Hiep Huu Nguyen and The University of Texas at Austin.
5
; See the files gnu.license and dec.copyright .
7
; This program is free software; you can redistribute it and/or modify
8
; it under the terms of the GNU General Public License as published by
9
; the Free Software Foundation; either version 1, or (at your option)
12
; This program is distributed in the hope that it will be useful,
13
; but WITHOUT ANY WARRANTY; without even the implied warranty of
14
; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
; GNU General Public License for more details.
17
; You should have received a copy of the GNU General Public License
18
; along with this program; if not, write to the Free Software
19
; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21
; Some of the files that interface to the Xlib are adapted from DEC/MIT files.
22
; See the file dec.copyright for details. */
25
#include <X11/Xresource.h>
26
#include <X11/keysym.h>
28
int IsKeypadKey(keysym) int keysym; {
29
return (((unsigned)(keysym) >= XK_KP_Space) && ((unsigned)(keysym) <= XK_KP_Equal));}
31
int IsCursorKey(keysym) int keysym; {
32
return (((unsigned)(keysym) >= XK_Home) && ((unsigned)(keysym) < XK_Select));}
34
int IsPFKey(keysym) int keysym; {
35
return (((unsigned)(keysym) >= XK_KP_F1) && ((unsigned)(keysym) <= XK_KP_F4));}
37
int IsFunctionKey(keysym) int keysym; {
38
return (((unsigned)(keysym) >= XK_F1) && ((unsigned)(keysym) <= XK_F35));}
40
int IsMiscFunctionKey(keysym) int keysym; {
41
return (((unsigned)(keysym) >= XK_Select) && ((unsigned)(keysym) < XK_KP_Space));}
43
int IsModifierKey(keysym) int keysym; {
44
return (((unsigned)(keysym) >= XK_Shift_L) && ((unsigned)(keysym) <= XK_Hyper_R));}
48
return( ((int)XrmUniqueQuark()) );
51
int XStringToContext(string)
54
return( (int)XrmStringToQuark(string) );