Rogue Wave Views
Foundation Package API Reference Guide
Product Documentation:

Rogue Wave Views
Documentation Home
Classes | Typedefs | Enumerations | Functions
evloop.h File Reference
#include <ilviews/macros.h>
#include <ilog/list.h>

Classes

class  IlvEventLoop
 Event loop class. More...
 

Typedefs

typedef IlBoolean(* IlvIdleProc) (IlAny userArg)
 
typedef IlAny IlvIdleProcId
 

Enumerations

Functions

void IlvExit (int exitCode)
 Exits the application. More...
 
void IlvMainLoop ()
 Starts the event loop. More...
 

Detailed Description

Library: xviews or winviews or mviews (mutually exclusive)
Event loop related declarations

Typedef Documentation

IlvIdleProc

Function type for user idle procedures.

Defines a function type for a user idle procedure that takes a user argument as its parameter. This type is used in IlvEventLoop::addIdleProc.

Identifier for idle procedure entries.

This type is an opaque type used by the event loop to identify an idle procedure entry.

See also
IlvEventLoop::removeIdleProc.

Enumeration Type Documentation

Sources of input in the event loop.

Type used to indicate the different sources of input in the event loop. It is possible to use OR combinations of IlvInputEvent, IlvInputTimer, and IlvInputExternal to specify several types of input. For this reason, IlvInputMask is defined in such a way that: IlvInputNone == 0 and IlvInputAll == (IlvInputEvent | IlvInputTimer | IlvInputExternal).

Enumerator
IlvInputNone 

No input.

Indicates no source of input.

IlvInputEvent 

Events.

Indicates windowing system events, that is, IlvEvent as source of input.

IlvInputTimer 

Timers.

Indicates IlvTimer objects as source of input.

IlvInputExternal 

External input.

Indicates external sources of input, that is, input channel used by IlvEventLoop::registerInput

IlvInputAll 

All sources of input.

Indicates a combination of all the sources of input.

Function Documentation

void IlvExit ( int  exitCode)

Exits the application.

This function is a Rogue Wave Views version of the regular C runtime function exit, but performs more cleanups.

Parameters
exitCodeA value that is returned to the system for possible error handling.
See also
IlvMainLoop.
void IlvMainLoop ( )

Starts the event loop.

This global function starts the main Rogue Wave Views event loop. It gives control of your application to the event loop.
It then waits for incoming events from all the created instances of IlvDisplay and dispatches the event to the appropriate handlers. This function does not return. The only way to stop a Rogue Wave Views application is to exit the program, using IlvExit, in one of the application callbacks.
You can replace this function with system-specific function calls that better fit your application requirements:

  • On Windows: The IlvMainLoop function is equivalent to the following code:

    1 MSG message;
    2 while (IlvEventLoop::getEventLoop()->nextEvent(&message))
    3  IlvEventLoop::getEventLoop()->dispatchEvent(&message);

    You can replace the call to IlvMainLoop by any other code directly written with Windows function calls, provided that you do not use any Rogue Wave Views top windows. If you do use top windows and need to rewrite the Windows event loop, you can either use the member function IlvEventLoop::nextEvent instead of GetMessage, or explicitly call the member function IlvAbstractView::show of your top window after it has been created.

  • On Unix: The function IlvMainLoop is equivalent to the following code:
    1 XEvent xEvent;
    2 while (1) {
    3  IlvEventLoop::getEventLoop()->nextEvent(&xEvent);
    4  IlvEventLoop::getEventLoop()->dispatch(&xEvent);
    5 }
See also
IlvExit

© Copyright 2016, Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave is a registered trademark of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.