VkInput(3x)VkInput(3x)NAMEVkInput - Encapsulation class for input callbacks on file descriptors
INHERITS FROM
VkCallbackObject
HEADER FILE
#include <Vk/VkInput.h>
PUBLIC PROTOCOL SUMMARY
Constructor/Destructor
VkInput(void);
virtual void ~VkInput(void);
Configuration
void attach(int fd, XtInputMask mask);
void remove(void);
Access Functions
int fd(void);
int id(void);
PROTECTED PROTOCOL SUMMARY
Protected Data Members
XtInputId _id;
int _fd;
CLASS DESCRIPTIONVkInput is a base class intended to encapsulate the mechanism for
setting up object-oriented callbacks on file descriptors. The Xt
event model supports other input sources via XtAppAddInput(), and
the VkInput class is an object-oriented interface to this mechanism.
FUNCTION DESCRIPTIONSVkInput()VkInput(void);
virtual void ~VkInput(void);
Creates a VkInput object with no state. Use the attach() method to
specify an input source.
attach()
void attach(int fd, XtInputMask mask);
Page 1
VkInput(3x)VkInput(3x)
Attaches the VkInput object to a specific input source. If an input
source was already attached, it is detached first. Once this method
is called, the VkInput::inputCallback callback will get called when
input becomes available. The callData parameter to the callback
will be a (VkInput *).
remove()
void remove(void);
Detaches from the previously-attached input source.
fd()
int fd(void);
Returns the file descriptor last specified in attach().
id()
XtInputId id(void);
Returns the XtInputId returned by XtAppAddTimeInput(). Each
attached VkInput object will have a unique XtInputId.
DATA MEMBER DESCRIPTIONS
_id
XtInputId _id;
XtInputId from XtAppAddTimeInput().
_fd
int _fd;
File descriptor specified in attach().
inputCallback
static const const char* inputCallback;
ViewKit-style callback when input becomes available. The callData
parameter to the callback will be a (VkInput *).
INHERITED MEMBER FUNCTIONS
Inherited from VkCallbackObject
callCallbacks(), className(), addCallback(), removeCallback,
removeAllCallbacks(), hasCallbacks(), cloneCallbacks(),
cloneCallback()
Page 2
VkInput(3x)VkInput(3x)CLASSES USED BY THIS CLASS
VkApp
SEE ALSO
VkCallbackObject
ViewKit Programmer's Guide
The X Window System, DEC Press, Bob Sheifler and Jim Gettys
The X Window System Toolkit, DEC Press, Paul Asente and Ralph Swick
The OSF/Motif Programmers Reference, Prentice Hall, OSF
Page 3