home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / sa104os2.zip / SATHR104.ZIP / SATHER / CONTRIB / SCHNETTR / XLIB / KEY.SA < prev    next >
Text File  |  1994-11-28  |  2KB  |  63 lines

  1. -- -*-Sather-*-
  2. -- access to the X window system routines
  3. -- (c) 1994/11/28 - 1994/11/28 by Erik Schnetter
  4.    
  5.    
  6.    
  7. class X_KEYSYM is
  8.    
  9.    readonly attr c_keysym: INT;
  10.    private const void_c_keysym := -1;
  11.    
  12.    create(c_keysym: INT) pre Void post ~Void is
  13.       res::=new; res.c_keysym:=c_keysym; return res
  14.    end;
  15.    
  16.    Void: BOOL is return void(self) or c_keysum=void_c_keysym end;
  17.    
  18. -- is this a cursor key?
  19.    IsCursorKey: BOOL pre ~Void is
  20.       return C_X_KEYSYM::X_IsCursorKey(c_keysym)
  21.    end; -- IsCursorKey
  22.    
  23. -- is this a function key?
  24.    IsFunctionKey: BOOL pre ~Void is
  25.       return C_X_KEYSYM::X_IsFunctionKey(c_keysym)
  26.    end; -- IsFunctionKey
  27.    
  28. -- is this a keypad key?
  29.    IsKeypadKey: BOOL pre ~Void is
  30.       return C_X_KEYSYM::X_IsKeypadKey(c_keysym)
  31.    end; -- IsKeypadKey
  32.    
  33. -- is this a miscellaneous function key?
  34.    IsMiscFunctionKey: BOOL pre ~Void is
  35.       return C_X_KEYSYM::X_IsMiscFunctionKey(c_keysym)
  36.    end; -- IsMiscFunctionKey
  37.    
  38. -- is this a modifier key?
  39.    IsModifierKey: BOOL pre ~Void is
  40.       return C_X_KEYSYM::X_IsModifierKey(c_keysym)
  41.    end; -- IsModifierKey
  42.    
  43. -- is this a PF key?
  44.    IsPFKey: BOOL pre ~Void is
  45.       return C_X_KEYSYM::X_IsPFKey(c_keysym)
  46.    end; -- IsPFKey
  47.    
  48. end; -- class X_KEYSYM
  49.    
  50.    
  51.    
  52. external class C_X_KEYSYM is
  53.    
  54.    X_IsCursorKey(keysym:INT):BOOL;
  55.    X_IsFunctionKey(keysym:INT):BOOL;
  56.    X_IsKeypadKey(keysym:INT):BOOL;
  57.    X_IsMiscFuntionKey(keysym:INT):BOOL;
  58.    X_IsModifierKey(keysym:INT):BOOL;
  59.    X_IsPFKey(keysym:INT):BOOL;
  60.    
  61. end; -- class C_X_KEYSYM
  62.    
  63.