Symbian3/SDK/Source/GUID-0174CE72-AEF6-5DA9-A9C5-074781BD544F.dita
author Dominic Pinkman <dominic.pinkman@nokia.com>
Tue, 20 Jul 2010 12:00:49 +0100
changeset 13 48780e181b38
parent 0 89d6a7a84779
permissions -rw-r--r--
Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.

<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. -->
<!-- This component and the accompanying materials are made available under the terms of the License 
"Eclipse Public License v1.0" which accompanies this distribution, 
and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". -->
<!-- Initial Contributors:
    Nokia Corporation - initial contribution.
Contributors: 
-->
<!DOCTYPE concept
  PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
<concept id="GUID-0174CE72-AEF6-5DA9-A9C5-074781BD544F" xml:lang="en"><title>Window
Server Sessions</title><shortdesc>Each application uses a Window Server session to communicate with
the Window Server. </shortdesc><prolog><metadata><keywords/></metadata></prolog><conbody>
<p>Through the session, the application may control and interrogate </p>
<ul>
<li id="GUID-81DEE250-87BC-5C47-91E5-B8E480884111"><p>its own windows </p> </li>
<li id="GUID-7F8F429D-AD79-5634-A815-CE7DB12F2866"><p>which events it wishes
to receive </p> </li>
<li id="GUID-E86BCF17-F124-5CE5-B07B-704BBD020F97"><p>all other window groups
connected to the Window Server </p> </li>
</ul>
<p>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 <xref href="GUID-067293BF-B28C-3CEC-92F4-1351A795EA7F.dita"><apiname>CActive::RunL()</apiname></xref> member
function of an active object. </p>
<p>The <xref href="GUID-067293BF-B28C-3CEC-92F4-1351A795EA7F.dita"><apiname>RWsSession</apiname></xref> class represents a <keyword>session</keyword> from
the client to the Window Server. Through an <codeph>RWsSession</codeph>, 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. </p>
<p>The <codeph>RWsSession</codeph> is a client-server session derived from <codeph>RSessionBase</codeph>.
In a typical application, an <codeph>RWsSession</codeph> owns a single <keyword>window
group</keyword>, but the Window Server architecture allows more than one window
group per session. An application owns several windows. See <xref href="GUID-D68E0A64-0E8A-5C52-9C5B-93BA3B80C200.dita">Window
Groups and Applications</xref>. </p>
<p>The Window Server session delivers events to the application via three
event streams. A typical application handles each stream using an active object.
See <xref href="GUID-08427065-B8E5-5194-B095-3B5213836BED.dita">Window Server Client-Side
Events</xref>. </p>
<p>The application draws to its windows using a <xref href="GUID-067293BF-B28C-3CEC-92F4-1351A795EA7F.dita"><apiname>CWindowGc</apiname></xref>.
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 <codeph>Flush()</codeph> and <codeph>SetAutoFlush()</codeph> functions
are part of the <codeph>RWsSession</codeph> API. The <codeph>RWsBuffer</codeph> is
privately owned by an <codeph>RWsSession</codeph> and is not as such part
of the API. See <xref href="GUID-E5CDDA05-CD86-5C44-B9DA-3249D9C14396.dita">Client-Side
Buffer</xref>  </p>
</conbody><related-links>
<link href="GUID-890F06C6-DE32-5EB1-BF0F-D41794F47AE1.dita"><linktext>Active objects</linktext>
</link>
<link href="GUID-1F9A47CE-7F4C-52BD-8823-25D5D1BEF42F.dita"><linktext>Window Server
Client-Side Library                 Concepts</linktext></link>
</related-links></concept>