~ubuntu-branches/ubuntu/quantal/gclcvs/quantal

« back to all changes in this revision

Viewing changes to xgcl-2/Xutil-2.c

  • Committer: Bazaar Package Importer
  • Author(s): Camm Maguire
  • Date: 2004-06-24 15:13:46 UTC
  • Revision ID: james.westby@ubuntu.com-20040624151346-xh0xaaktyyp7aorc
Tags: 2.7.0-26
C_GC_OFFSET is 2 on m68k-linux

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* Xutil-2.c           Hiep Huu Nguyen                         27 Aug 92 */
 
2
 
 
3
/* ; Copyright (c) 1994 Hiep Huu Nguyen and The University of Texas at Austin.
 
4
 
 
5
; See the files gnu.license and dec.copyright .
 
6
 
 
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)
 
10
; any later version.
 
11
 
 
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.
 
16
 
 
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.
 
20
 
 
21
; Some of the files that interface to the Xlib are adapted from DEC/MIT files.
 
22
; See the file dec.copyright for details. */
 
23
 
 
24
#include <X11/Xlib.h>
 
25
#include <X11/Xresource.h>
 
26
#include <X11/keysym.h>
 
27
 
 
28
int IsKeypadKey(keysym) int keysym; { 
 
29
 return  (((unsigned)(keysym) >= XK_KP_Space) && ((unsigned)(keysym) <= XK_KP_Equal));}
 
30
 
 
31
int IsCursorKey(keysym) int keysym; { 
 
32
  return (((unsigned)(keysym) >= XK_Home)     && ((unsigned)(keysym) <  XK_Select));}
 
33
 
 
34
int IsPFKey(keysym) int keysym; { 
 
35
  return (((unsigned)(keysym) >= XK_KP_F1)     && ((unsigned)(keysym) <= XK_KP_F4));}
 
36
 
 
37
int IsFunctionKey(keysym) int keysym; { 
 
38
  return (((unsigned)(keysym) >= XK_F1)       && ((unsigned)(keysym) <= XK_F35));}
 
39
 
 
40
int IsMiscFunctionKey(keysym) int keysym; { 
 
41
  return (((unsigned)(keysym) >= XK_Select)   && ((unsigned)(keysym) <  XK_KP_Space));}
 
42
 
 
43
int IsModifierKey(keysym) int keysym; { 
 
44
  return (((unsigned)(keysym) >= XK_Shift_L)  && ((unsigned)(keysym) <= XK_Hyper_R));}
 
45
 
 
46
int XUniqueContext() 
 
47
{
 
48
        return( ((int)XrmUniqueQuark()) );
 
49
}
 
50
 
 
51
int XStringToContext(string) 
 
52
        char *string; 
 
53
{
 
54
        return( (int)XrmStringToQuark(string) );
 
55
}
 
56