home *** CD-ROM | disk | FTP | other *** search
/ IRIX 6.3 Development Libraries / SGI IRIX 6.3 Development Libraries.iso / dist6.3 / ViewKit_dev.idb / usr / include / Vk / VkInput.h.z / VkInput.h
Encoding:
C/C++ Source or Header  |  1996-09-20  |  1.9 KB  |  57 lines

  1. ////////////////////////////////////////////////////////////////////////////////
  2. ///////   Copyright 1992, Silicon Graphics, Inc.  All Rights Reserved.   ///////
  3. //                                                                            //
  4. // This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics, Inc.;     //
  5. // the contents of this file may not be disclosed to third parties, copied    //
  6. // or duplicated in any form, in whole or in part, without the prior written  //
  7. // permission of Silicon Graphics, Inc.                                       //
  8. //                                                                            //
  9. // RESTRICTED RIGHTS LEGEND:                                                  //
  10. // Use,duplication or disclosure by the Government is subject to restrictions //
  11. // as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data     //
  12. // and Computer Software clause at DFARS 252.227-7013, and/or in similar or   //
  13. // successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished -    //
  14. // rights reserved under the Copyright Laws of the United States.             //
  15. //                                                                            //
  16. ////////////////////////////////////////////////////////////////////////////////
  17. #ifndef VKINPUT_H
  18. #define VKINPUT_H
  19.  
  20. #include <X11/Intrinsic.h>
  21. #include <Vk/VkCallbackObject.h>
  22.  
  23. /*
  24.  * VkInput is a base class intended to encapsulate the
  25.  * mechanism for setting up object-oriented callbacks on file descriptors.
  26.  */
  27.  
  28.  
  29. class VkInput : public VkCallbackObject {
  30.  
  31.     public:
  32.  
  33.     VkInput();
  34.         virtual ~VkInput();
  35.  
  36.     void    attach(int fd, XtInputMask mask);
  37.     void    remove();
  38.  
  39.     int    fd()        { return _fd; }
  40.     int    id()        { return _id; }
  41.  
  42.         static const char * const inputCallback;        
  43.  
  44.     protected:
  45.  
  46.     XtInputId  _id;
  47.     int       _fd;
  48.  
  49.     private:
  50.  
  51.        static void inputXtCallback(XtPointer   clientData, 
  52.                    int        *source, 
  53.                    XtInputId  *idptr);
  54. };
  55.  
  56. #endif
  57.