1 /* |
|
2 * Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: Extension control for window server animation. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef TELBUBBLEANIM_H |
|
21 #define TELBUBBLEANIM_H |
|
22 |
|
23 #include <coecntrl.h> |
|
24 |
|
25 class CAknBitmapAnimation; |
|
26 class CBitmapAnimClientData; |
|
27 class CEikImage; |
|
28 |
|
29 /** |
|
30 * Extension control for window server animation. |
|
31 * |
|
32 * |
|
33 * @lib BMCustomization.lib |
|
34 * @since S60 v5.0 |
|
35 */ |
|
36 class CTelBubbleAnim : public CCoeControl |
|
37 { |
|
38 public: |
|
39 /** |
|
40 * Two phased constructor. |
|
41 * @param aFrameInterval Sets time between showed frames. |
|
42 * Frames are played in cycle mode. |
|
43 */ |
|
44 IMPORT_C static CTelBubbleAnim* NewL( TInt aFrameInterval ); |
|
45 |
|
46 /** destructor */ |
|
47 IMPORT_C virtual ~CTelBubbleAnim(); |
|
48 |
|
49 public: |
|
50 /** Starts animation - this is called from BubbleManager */ |
|
51 IMPORT_C void StartAnimationL(); |
|
52 |
|
53 /** Stop animation */ |
|
54 IMPORT_C void StopAnimation(); |
|
55 |
|
56 /** |
|
57 * Adds frame to animation. |
|
58 * @param aFrame Frame to be added. Parameter is deleted before |
|
59 * returning. Ownership of bitmaps transferred. |
|
60 */ |
|
61 IMPORT_C void AddFrameToAnimationLD( CEikImage* aFrame ) const; |
|
62 |
|
63 /** |
|
64 * Adds frame to animation. |
|
65 * @param aFrame Frame to be added. |
|
66 * Ownership of bitmaps not transferred. |
|
67 */ |
|
68 IMPORT_C void AddFrameToAnimationL( CEikImage& aFrame ) const; |
|
69 |
|
70 /** |
|
71 * Resets animation. Also frame array is reseted. |
|
72 */ |
|
73 IMPORT_C void Reset() const; |
|
74 |
|
75 protected: // from CCoeControl |
|
76 |
|
77 /** returns 0 for animation */ |
|
78 IMPORT_C virtual TInt CountComponentControls() const; |
|
79 |
|
80 /** set container window */ |
|
81 IMPORT_C virtual void SetContainerWindowL( |
|
82 const CCoeControl& aContainer ); |
|
83 |
|
84 /** sets new size for animation */ |
|
85 IMPORT_C virtual void SizeChanged(); |
|
86 |
|
87 /** starts animation */ |
|
88 IMPORT_C virtual void Draw( const TRect& aRect ) const; |
|
89 |
|
90 /** handles animation visibility */ |
|
91 IMPORT_C virtual void MakeVisible( TBool aVisible ); |
|
92 |
|
93 protected: |
|
94 IMPORT_C virtual void ConstructL( TInt aFrameInterval ); |
|
95 IMPORT_C CTelBubbleAnim(); |
|
96 |
|
97 protected: |
|
98 CAknBitmapAnimation* iAnimation; // owned |
|
99 }; |
|
100 |
|
101 #endif // TELBUBBLEANIM_H |
|
102 |
|
103 // end of file |
|