|
1 /* |
|
2 * Copyright (c) 2002-2004 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: Video Ringing Tone / Video window (DSA) |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 // INCLUDE FILES |
|
21 #include "BMBubbleVideoContainer.h" |
|
22 |
|
23 // EXTERNAL DATA STRUCTURES |
|
24 |
|
25 // EXTERNAL FUNCTION PROTOTYPES |
|
26 |
|
27 // CONSTANTS |
|
28 |
|
29 // MACROS |
|
30 |
|
31 // LOCAL CONSTANTS AND MACROS |
|
32 |
|
33 // MODULE DATA STRUCTURES |
|
34 |
|
35 // LOCAL FUNCTION PROTOTYPES |
|
36 |
|
37 // FORWARD DECLARATIONS |
|
38 |
|
39 // ============================= LOCAL FUNCTIONS =============================== |
|
40 |
|
41 |
|
42 // ============================ MEMBER FUNCTIONS =============================== |
|
43 |
|
44 // ----------------------------------------------------------------------------- |
|
45 // CBubbleVideoContainer::CBubbleVideoContainer |
|
46 // C++ default constructor can NOT contain any code, that |
|
47 // might leave. |
|
48 // ----------------------------------------------------------------------------- |
|
49 // |
|
50 CBubbleVideoContainer::CBubbleVideoContainer( |
|
51 const CCoeControl* aParent ) |
|
52 : iParent( aParent ) |
|
53 { |
|
54 } |
|
55 |
|
56 // ----------------------------------------------------------------------------- |
|
57 // CBubbleVideoContainer::ConstructL |
|
58 // Symbian 2nd phase constructor can leave. |
|
59 // ----------------------------------------------------------------------------- |
|
60 // |
|
61 void CBubbleVideoContainer::ConstructL( ) |
|
62 { |
|
63 CreateWindowL( iParent ); |
|
64 Window().SetNonFading( ETrue ); |
|
65 } |
|
66 |
|
67 // ----------------------------------------------------------------------------- |
|
68 // CBubbleVideoContainer::NewL |
|
69 // Two-phased constructor. |
|
70 // ----------------------------------------------------------------------------- |
|
71 // |
|
72 CBubbleVideoContainer* CBubbleVideoContainer::NewL( |
|
73 const CCoeControl* aParent ) |
|
74 { |
|
75 CBubbleVideoContainer* self = new( ELeave ) |
|
76 CBubbleVideoContainer( aParent ); |
|
77 |
|
78 CleanupStack::PushL( self ); |
|
79 self->ConstructL(); |
|
80 CleanupStack::Pop(); |
|
81 |
|
82 return self; |
|
83 } |
|
84 |
|
85 |
|
86 // Destructor |
|
87 CBubbleVideoContainer::~CBubbleVideoContainer() |
|
88 { |
|
89 |
|
90 } |
|
91 |
|
92 |
|
93 // ----------------------------------------------------------------------------- |
|
94 // CBubbleVideoContainer::Draw |
|
95 // (other items were commented in a header). |
|
96 // ----------------------------------------------------------------------------- |
|
97 // |
|
98 void CBubbleVideoContainer::Draw( const TRect& aRect ) const |
|
99 { |
|
100 if ( Window().DisplayMode() == EColor16MA ) |
|
101 { |
|
102 CWindowGc& gc = SystemGc(); |
|
103 gc.SetDrawMode( CGraphicsContext::EDrawModeWriteAlpha ); |
|
104 gc.SetBrushColor( TRgb::Color16MA( 0 ) ); // alpha 0x00 shows video |
|
105 gc.Clear( aRect ); |
|
106 } |
|
107 else if ( !iRedrawDisabled ) |
|
108 { |
|
109 CWindowGc& gc = SystemGc(); |
|
110 // Draw background frame graphics |
|
111 MAknsSkinInstance* skin = AknsUtils::SkinInstance(); |
|
112 AknsDrawUtils::DrawFrame( skin, |
|
113 gc, |
|
114 iFrameOuterRect, |
|
115 iFrameInnerRect, |
|
116 iFrameId, |
|
117 KAknsIIDDefault ); |
|
118 } |
|
119 } |
|
120 |
|
121 // ----------------------------------------------------------------------------- |
|
122 // CBubbleVideoContainer::SizeChanged |
|
123 // (other items were commented in a header). |
|
124 // ----------------------------------------------------------------------------- |
|
125 // |
|
126 void CBubbleVideoContainer::SizeChanged() |
|
127 { |
|
128 // NOP |
|
129 } |
|
130 |
|
131 // ----------------------------------------------------------------------------- |
|
132 // CBubbleVideoContainer::GetWindow |
|
133 // (other items were commented in a header). |
|
134 // ----------------------------------------------------------------------------- |
|
135 // |
|
136 RWindow& CBubbleVideoContainer::GetWindow() const |
|
137 { |
|
138 return Window(); |
|
139 } |
|
140 |
|
141 // ----------------------------------------------------------------------------- |
|
142 // CBubbleVideoContainer::SetBackgroundFrame |
|
143 // (other items were commented in a header). |
|
144 // ----------------------------------------------------------------------------- |
|
145 // |
|
146 void CBubbleVideoContainer::SetBackgroundFrame( const TAknsItemID& aFrameId, |
|
147 TRect& aOuterRect, |
|
148 TRect& aInnerRect ) |
|
149 { |
|
150 iFrameId = aFrameId; |
|
151 iFrameOuterRect = aOuterRect; |
|
152 iFrameInnerRect = aInnerRect; |
|
153 } |
|
154 |
|
155 // ----------------------------------------------------------------------------- |
|
156 // CBubbleVideoContainer::SetRedrawDisabled |
|
157 // (other items were commented in a header). |
|
158 // ----------------------------------------------------------------------------- |
|
159 // |
|
160 void CBubbleVideoContainer::SetRedrawDisabled( TBool aDisabled ) |
|
161 { |
|
162 iRedrawDisabled = aDisabled; |
|
163 } |
|
164 |
|
165 |
|
166 // End of File |