Symbian3/SDK/Source/GUID-0174CE72-AEF6-5DA9-A9C5-074781BD544F.dita
changeset 0 89d6a7a84779
equal deleted inserted replaced
-1:000000000000 0:89d6a7a84779
       
     1 <?xml version="1.0" encoding="utf-8"?>
       
     2 <!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. -->
       
     3 <!-- This component and the accompanying materials are made available under the terms of the License 
       
     4 "Eclipse Public License v1.0" which accompanies this distribution, 
       
     5 and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". -->
       
     6 <!-- Initial Contributors:
       
     7     Nokia Corporation - initial contribution.
       
     8 Contributors: 
       
     9 -->
       
    10 <!DOCTYPE concept
       
    11   PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
       
    12 <concept id="GUID-0174CE72-AEF6-5DA9-A9C5-074781BD544F" xml:lang="en"><title>Window
       
    13 Server Sessions</title><shortdesc>Each application uses a Window Server session to communicate with
       
    14 the Window Server. </shortdesc><prolog><metadata><keywords/></metadata></prolog><conbody>
       
    15 <p>Through the session, the application may control and interrogate </p>
       
    16 <ul>
       
    17 <li id="GUID-81DEE250-87BC-5C47-91E5-B8E480884111"><p>its own windows </p> </li>
       
    18 <li id="GUID-7F8F429D-AD79-5634-A815-CE7DB12F2866"><p>which events it wishes
       
    19 to receive </p> </li>
       
    20 <li id="GUID-E86BCF17-F124-5CE5-B07B-704BBD020F97"><p>all other window groups
       
    21 connected to the Window Server </p> </li>
       
    22 </ul>
       
    23 <p>The Window Server session provides a low-level interface for application
       
    24 programs’ use, using asynchronous services. To support an application framework,
       
    25 these services should be made higher-level, and the asynchronous services
       
    26 should be encapsulated into active objects. This function is performed by
       
    27 the UI control framework. The control framework is the basis for the GUI.
       
    28 Each event is then handled by the <xref href="GUID-067293BF-B28C-3CEC-92F4-1351A795EA7F.dita"><apiname>CActive::RunL()</apiname></xref> member
       
    29 function of an active object. </p>
       
    30 <p>The <xref href="GUID-067293BF-B28C-3CEC-92F4-1351A795EA7F.dita"><apiname>RWsSession</apiname></xref> class represents a <keyword>session</keyword> from
       
    31 the client to the Window Server. Through an <codeph>RWsSession</codeph>, the
       
    32 client program controls all its own windows, issues asynchronous requests
       
    33 for up to three types of event, and may in addition control certain system-wide
       
    34 Window Server behavior. </p>
       
    35 <p>The <codeph>RWsSession</codeph> is a client-server session derived from <codeph>RSessionBase</codeph>.
       
    36 In a typical application, an <codeph>RWsSession</codeph> owns a single <keyword>window
       
    37 group</keyword>, but the Window Server architecture allows more than one window
       
    38 group per session. An application owns several windows. See <xref href="GUID-D68E0A64-0E8A-5C52-9C5B-93BA3B80C200.dita">Window
       
    39 Groups and Applications</xref>. </p>
       
    40 <p>The Window Server session delivers events to the application via three
       
    41 event streams. A typical application handles each stream using an active object.
       
    42 See <xref href="GUID-08427065-B8E5-5194-B095-3B5213836BED.dita">Window Server Client-Side
       
    43 Events</xref>. </p>
       
    44 <p>The application draws to its windows using a <xref href="GUID-067293BF-B28C-3CEC-92F4-1351A795EA7F.dita"><apiname>CWindowGc</apiname></xref>.
       
    45 Draw functions are buffered in a client-side buffer in order to minimize client/server
       
    46 context switches. This buffer is flushed in certain circumstances by the Window
       
    47 Server and can also be flushed explicitly by the application. The <codeph>Flush()</codeph> and <codeph>SetAutoFlush()</codeph> functions
       
    48 are part of the <codeph>RWsSession</codeph> API. The <codeph>RWsBuffer</codeph> is
       
    49 privately owned by an <codeph>RWsSession</codeph> and is not as such part
       
    50 of the API. See <xref href="GUID-E5CDDA05-CD86-5C44-B9DA-3249D9C14396.dita">Client-Side
       
    51 Buffer</xref>  </p>
       
    52 </conbody><related-links>
       
    53 <link href="GUID-890F06C6-DE32-5EB1-BF0F-D41794F47AE1.dita"><linktext>Active objects</linktext>
       
    54 </link>
       
    55 <link href="GUID-1F9A47CE-7F4C-52BD-8823-25D5D1BEF42F.dita"><linktext>Window Server
       
    56 Client-Side Library                 Concepts</linktext></link>
       
    57 </related-links></concept>