VkBackground(3x)
VkBackground - Support for simple work procedure-based background tasks
As shipped in IRIX 6.5.30. Unchanged since IRIX 6.5.
NAME VkBackground - Support for simple work procedure-based background tasks INHERITS FROM VkCallbackObject HEADER FILE #include <Vk/VkBackground.h> PUBLIC PROTOCOL SUMMARY Constructor/Destructor VkBackground(void); void ~VkBackground(void); Starting and Stopping void start(void); void stop(void); PROTECTED PROTOCOL SUMMARY virtual Boolean timeSlice(void); CLASS DESCRIPTION VkBackground is an abstract class that provides a simple C++ interface to handling background tasks based on Xt work procedures (functions that are called whenever there are no events pending in the application's event queue). VkBackground handles the details of registering a work procedure and provides a convenient way to maintain state between calls to the work procedure. DERIVING SUBCLASSES The VkBackground class is intended to be subclassed. Derived classes must override the timeSlice() member function which behaves just like an Xt work procedure. This member function is called whenever no events are pending in the application's event queue. It is expected to perform a small amount of work and return quickly. The function must return TRUE if the class has completed its task is done, or FALSE if the member function should be called again. The primary for using this class instead of using a work procedure directly is the ability to store state in class data members between calls to the timeSlice() function. FUNCTION DESCRIPTIONS timeSlice() virtual Boolean timeSlice(void); Called whenever no events are pending in the application's event queue. This function must return quickly and return a value of TRUE if the class has completed its task and the member function should not be called again, or FALSE if it should be called again at the next possible time. VkBackground() VkBackground(void); Initialize a VkBackground object. The constructor does not start the work procedure. ~VkBackground() void ~VkBackground(void); Free all storage associated with a VkBackground object. If this object's work procedure is currently active, the destructor removes it. start() void start(void); Start the background task by installing a work procedure. stop() void stop(void); Stop the background task by removing any currently installed work procedure. INHERITED MEMBER FUNCTIONS SEE ALSO 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