Window Server Sessions

Each application uses a Window Server session to communicate with the Window Server.

Through the session, the application may control and interrogate

  • its own windows

  • which events it wishes to receive

  • all other window groups connected to the Window Server

The Window Server session provides a low-level interface for application programs’ use, using asynchronous services. To support an application framework, these services should be made higher-level, and the asynchronous services should be encapsulated into active objects. This function is performed by the UI control framework. The control framework is the basis for the GUI. Each event is then handled by the [[[ERROR: [NOKX000E] Unable to find definition for key reference 'CActive']]]CActive::RunL() member function of an active object.

The [[[ERROR: [NOKX000E] Unable to find definition for key reference 'CActive']]]RWsSession class represents a session from the client to the Window Server. Through an RWsSession, the client program controls all its own windows, issues asynchronous requests for up to three types of event, and may in addition control certain system-wide Window Server behavior.

The RWsSession is a client-server session derived from RSessionBase. In a typical application, an RWsSession owns a single window group, but the Window Server architecture allows more than one window group per session. An application owns several windows. See Window Groups and Applications.

The Window Server session delivers events to the application via three event streams. A typical application handles each stream using an active object. See Window Server Client-Side Events.

The application draws to its windows using a [[[ERROR: [NOKX000E] Unable to find definition for key reference 'CActive']]]CWindowGc. Draw functions are buffered in a client-side buffer in order to minimize client/server context switches. This buffer is flushed in certain circumstances by the Window Server and can also be flushed explicitly by the application. The Flush() and SetAutoFlush() functions are part of the RWsSession API. The RWsBuffer is privately owned by an RWsSession and is not as such part of the API. See Client-Side Buffer

Related concepts