Symbian3/SDK/Source/GUID-829761B6-ECF7-5E15-A475-AEE357687067.dita
changeset 8 ae94777fff8f
equal deleted inserted replaced
7:51a74ef9ed63 8:ae94777fff8f
       
     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-829761B6-ECF7-5E15-A475-AEE357687067" xml:lang="en"><title>Animation
       
    13 overview</title><prolog><metadata><keywords/></metadata></prolog><conbody>
       
    14 <section id="GUID-1FDB9A85-EA5C-4FA9-902C-A2DD7C23EE28"><title>Purpose</title> <p>The animation component is a framework
       
    15 that provides support to build animated graphics applications. It provides
       
    16 the basic data types that allow animations to be incorporated into the normal
       
    17 drawing of a window from the client, or to be managed on the server as a sprite. </p> </section>
       
    18 <section id="GUID-81E07DE3-E680-410C-A22D-809D72E9CD6D"><title>Required background</title> <p><xref href="GUID-2C443E6F-BC3D-5252-8098-9F850AA88A35.dita">Windows
       
    19 server</xref> component knowledge is recommended before using this component. </p> </section>
       
    20 <section id="GUID-DC47F478-274F-4669-AAF4-C6BD04D7D7D1"><title>Key concepts</title> <p>The component has the following key
       
    21 concepts: </p> <dl>
       
    22 <dlentry>
       
    23 <dt>Animation</dt>
       
    24 <dd><p>The animation is a fairly abstract interface owned by a client application.
       
    25 The interface is independent of the source of the data it uses, as the data
       
    26 providers are responsible for providing data to the animation. </p> </dd>
       
    27 </dlentry>
       
    28 <dlentry>
       
    29 <dt>Animator</dt>
       
    30 <dd><p>The animator represents each data type supported by the animation framework.
       
    31 It can handle data interpretation, timing and control of the animation. An
       
    32 animator is not be visible to the owner of the animation, but is controlled
       
    33 through it using a standard interface. The animators can either reside on
       
    34 the client or on the server. Each animation selects an animator plug-in to
       
    35 be used by providing an appropriate string obtained from the data provider. </p> </dd>
       
    36 </dlentry>
       
    37 <dlentry>
       
    38 <dt>Data provider</dt>
       
    39 <dd><p>A data provider is a generic interface to handle different kinds of
       
    40 data, which has different structures and behaviours, for example, GIFs and
       
    41 SVG (Scalable Vector Graphics). Animations access the data providers they
       
    42 own through an observer interface, which reports events to the animation.
       
    43 The interface in turn reports these events to the respective animators. </p> </dd>
       
    44 </dlentry>
       
    45 <dlentry>
       
    46 <dt>Observer</dt>
       
    47 <dd><p>An observer acts as an interface and is responsible for reporting events.
       
    48 The animation framework provides two such observers: a data provider observer,
       
    49 and an animation observer. The data provider observer is an interface between
       
    50 the animation and the data provider. Using this observer the animation can
       
    51 receive data and events from the data provider. The animation observer is
       
    52 an interface between the animation and the client application, and is used
       
    53 to report events to the client application. In Symbian OS v9.1, the animation
       
    54 observer is implemented to report only errors to the client application. </p> </dd>
       
    55 </dlentry>
       
    56 </dl> </section>
       
    57 <section id="GUID-71398AF6-16D5-4FC5-9342-44304C0A3066"><title>Architectural relationships</title> <p>The animation component
       
    58 provides a set of abstract classes with some basic functionality required
       
    59 for any type of animation. Implementors have to derive their own classes using
       
    60 these abstract classes to support specific animation types such as bitmap
       
    61 animation, sprite animation and so on. </p> <p>The animation framework also
       
    62 provides concrete implementations of the abstract classes. The concrete implementations
       
    63 of the <codeph>CAnimation</codeph> class are: </p> <ul>
       
    64 <li id="GUID-0E148B3E-F6D0-5AC0-B721-FB3BECD432F7"><p> <b>CBasicAnimation</b>  </p> <p>This
       
    65 is a client-side animation class which can also act as a data provider observer
       
    66 and an animation drawer. It provides a bitmap and a mask on which the animation
       
    67 is submitted. This class establishes a session with the windows server before
       
    68 submitting the animation to a particular window. </p> </li>
       
    69 <li id="GUID-4E7B61AF-0FF0-5EBF-A46B-F42D747CF866"><p> <b>CSpriteAnimation</b>  </p> <p>This
       
    70 is a server-side animation class for sprite based animations. The client has
       
    71 limited control over the animation, as sprites are server-side graphic objects
       
    72 and are controlled by the server. This class makes use of the windows server
       
    73 animation API to submit sprite animations. For more information on these APIs,
       
    74 refer to <xref href="GUID-2C443E6F-BC3D-5252-8098-9F850AA88A35.dita">Using Window
       
    75 Server (WSERV)</xref>. </p> </li>
       
    76 <li id="GUID-3514D632-4090-51BD-AD26-B98CA6B31ADC"><p> <b>CAnimationGroup</b>  </p> <p>This
       
    77 class is not an animation class by itself, but is a collection of animations
       
    78 grouped together. It provides access to an array of animation references and
       
    79 handles all synchronisation issues among the animations in the group, provided
       
    80 all the animations are of the same type. For example, if a set of client-side
       
    81 animations are grouped together, they respond to commands collectively in
       
    82 synchronisation with each other. If the group includes both sprite and client-side
       
    83 animations, they will respond to commands collectively in asynchronous mode. </p> </li>
       
    84 </ul> <p>The framework provides the following concrete implementations for
       
    85 the other two abstract classes, <codeph>CAnimationDataProvider</codeph> and <codeph>CAnimator</codeph>: </p> <ul>
       
    86 <li id="GUID-C7FB57BB-25C4-5813-9C0A-B71433999EB3"><p> <b>CICLAnimationDataProvider</b>  </p> <p>This
       
    87 class interprets various data types including animated GIFs using the <xref href="GUID-6B478F86-1EC4-5F78-B7C8-C2E5FCD974B6.dita">Image Conversion Library</xref> (ICL).
       
    88 It provides data to the animation class in the form of individual frames using
       
    89 the <codeph>CAnimationFrame</codeph> object which contains a bitmap, a mask,
       
    90 and frame information. </p> </li>
       
    91 <li id="GUID-650EDA72-3CC2-5A08-8E6A-F57755B6EEAE"><p> <b>CBitmapAnimator</b>  </p> <p>This
       
    92 class can handle fixed sequence of bitmap frames passed by the data provider. </p> </li>
       
    93 </ul> </section>
       
    94 <section id="GUID-20A5B4F1-586A-4ADC-96C5-E4CF49EC7DA9"><title>API summary</title> <p> </p> <table id="GUID-CA7854D0-7D1C-5BCD-B9E5-A1FB2198AE15">
       
    95 <tgroup cols="2"><colspec colname="col0" colwidth="0.60*"/><colspec colname="col1" colwidth="1.40*"/>
       
    96 <thead>
       
    97 <row>
       
    98 <entry>Class Name</entry>
       
    99 <entry>Description</entry>
       
   100 </row>
       
   101 </thead>
       
   102 <tbody>
       
   103 <row>
       
   104 <entry><p> <xref href="GUID-40CEAB8C-2202-3E88-929F-35DA5BD554A4.dita"><apiname>CAnimation</apiname></xref>  </p> </entry>
       
   105 <entry><p>This is an abstract generic class which provides the basic functionality
       
   106 for all types of animations. </p> </entry>
       
   107 </row>
       
   108 <row>
       
   109 <entry><p> <xref href="GUID-AD71F0EC-EB49-3D46-BEEE-B8ECD30BDDEA.dita"><apiname>CAnimator</apiname></xref>  </p> </entry>
       
   110 <entry><p>This is an abstract class, which represents each type of data supported
       
   111 by the animation framework. This class is implemented as an ECOM plug-in. </p> </entry>
       
   112 </row>
       
   113 <row>
       
   114 <entry><p> <xref href="GUID-CB96F59F-BEF9-3296-A80A-4E8E8BE354C6.dita"><apiname>CAnimationDataProvider</apiname></xref>  </p> </entry>
       
   115 <entry><p>This is an abstract class, which takes the animation data and converts
       
   116 it into a format recognized by the animator. </p> </entry>
       
   117 </row>
       
   118 <row>
       
   119 <entry><p> <xref href="GUID-12B29886-1D43-37ED-8DC0-6F43D3E591E8.dita"><apiname>CBasicAnimation</apiname></xref>  </p> </entry>
       
   120 <entry><p>This is a concrete implementation class of the <codeph>CAnimation</codeph> class.
       
   121 This class is used for basic client-side animations. </p> </entry>
       
   122 </row>
       
   123 <row>
       
   124 <entry><p> <xref href="GUID-6BB621FF-F799-357C-BEAC-9767D68E7D50.dita"><apiname>CSpriteAnimation</apiname></xref>  </p> </entry>
       
   125 <entry><p>This is a concrete implementation class of the <codeph>CAnimation</codeph> class.
       
   126 This class is used for sprite animations. </p> </entry>
       
   127 </row>
       
   128 </tbody>
       
   129 </tgroup>
       
   130 </table> </section>
       
   131 <section id="GUID-65234329-B7A6-4A07-B32C-BB3B7D161F0C"><title>Typical uses</title> <p><b>Creating a basic animation </b> </p><p>The
       
   132 animation framework can be used to create a basic client-side animation using
       
   133 the <codeph>CBasicAnimation</codeph> class. You can also have your own implementation
       
   134 for other type of animations. For more information, refer to <xref href="GUID-A97AD7EB-43C2-545A-9756-57D65A4905D9.dita">How
       
   135 to create a basic animation</xref>. </p> <p><b>Creating a sprite animation </b> </p><p>The
       
   136 animation framework supports server-side sprite animations using the <codeph>CSpriteAnimation</codeph> class.
       
   137 The procedure to create a sprite animation is the same as that for creating
       
   138 a basic client-side animation. The only difference between a client-side animation
       
   139 and a sprite animation is that client-side animations are redrawn by the client
       
   140 application. Whereas, for sprite animations redraws are handled automatically,
       
   141 as they run in the window server's high priority thread. </p> </section>
       
   142 </conbody><related-links>
       
   143 <link href="GUID-A97AD7EB-43C2-545A-9756-57D65A4905D9.dita"><linktext>How to create
       
   144 a basic animation</linktext></link>
       
   145 <link href="GUID-0C4B86B5-530A-5839-86C1-46E7ABE281E0.dita"><linktext>Using Window
       
   146 Server (WSERV)</linktext></link>
       
   147 </related-links></concept>