|
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
|
2 <html xmlns="http://www.w3.org/1999/xhtml"> |
|
3 <head> |
|
4 <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> |
|
5 <title>TB9.2 Example Applications: examples/Graphics/WS/transparent/transparent.h Source File</title> |
|
6 <link href="tabs.css" rel="stylesheet" type="text/css"/> |
|
7 <link href="doxygen.css" rel="stylesheet" type="text/css"/> |
|
8 </head> |
|
9 <body> |
|
10 <!-- Generated by Doxygen 1.6.2 --> |
|
11 <h1>examples/Graphics/WS/transparent/transparent.h</h1><a href="transparent_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).</span> |
|
12 <a name="l00002"></a>00002 <span class="comment">// All rights reserved.</span> |
|
13 <a name="l00003"></a>00003 <span class="comment">// This component and the accompanying materials are made available</span> |
|
14 <a name="l00004"></a>00004 <span class="comment">// under the terms of "Eclipse Public License v1.0"</span> |
|
15 <a name="l00005"></a>00005 <span class="comment">// which accompanies this distribution, and is available</span> |
|
16 <a name="l00006"></a>00006 <span class="comment">// at the URL "http://www.eclipse.org/legal/epl-v10.html".</span> |
|
17 <a name="l00007"></a>00007 <span class="comment">//</span> |
|
18 <a name="l00008"></a>00008 <span class="comment">// Initial Contributors:</span> |
|
19 <a name="l00009"></a>00009 <span class="comment">// Nokia Corporation - initial contribution.</span> |
|
20 <a name="l00010"></a>00010 <span class="comment">//</span> |
|
21 <a name="l00011"></a>00011 <span class="comment">// Contributors:</span> |
|
22 <a name="l00012"></a>00012 <span class="comment">//</span> |
|
23 <a name="l00013"></a>00013 <span class="comment">// Description:</span> |
|
24 <a name="l00014"></a>00014 <span class="comment">// Contains the CTransparentApplication, CTransparentDocument, CTransparentAppUi, CWait,</span> |
|
25 <a name="l00015"></a>00015 <span class="comment">// CEventHandler and CTransparentDocument classes.</span> |
|
26 <a name="l00016"></a>00016 <span class="comment">//</span> |
|
27 <a name="l00017"></a>00017 |
|
28 <a name="l00018"></a>00018 |
|
29 <a name="l00019"></a>00019 |
|
30 <a name="l00023"></a>00023 <span class="preprocessor">#ifndef __TRANSPARENT_H__</span> |
|
31 <a name="l00024"></a>00024 <span class="preprocessor"></span><span class="preprocessor">#define __TRANSPARENT_H__</span> |
|
32 <a name="l00025"></a>00025 <span class="preprocessor"></span> |
|
33 <a name="l00026"></a>00026 <span class="preprocessor">#include <coeccntx.h></span> |
|
34 <a name="l00027"></a>00027 |
|
35 <a name="l00028"></a>00028 <span class="preprocessor">#include <eikenv.h></span> |
|
36 <a name="l00029"></a>00029 <span class="preprocessor">#include <eikappui.h></span> |
|
37 <a name="l00030"></a>00030 <span class="preprocessor">#include <eikapp.h></span> |
|
38 <a name="l00031"></a>00031 <span class="preprocessor">#include <eikdoc.h></span> |
|
39 <a name="l00032"></a>00032 <span class="preprocessor">#include <eikmenup.h></span> |
|
40 <a name="l00033"></a>00033 <span class="preprocessor">#include <eikstart.h></span> |
|
41 <a name="l00034"></a>00034 <span class="preprocessor">#include <f32file.h></span> |
|
42 <a name="l00035"></a>00035 <span class="preprocessor">#include <w32std.h></span> |
|
43 <a name="l00036"></a>00036 <span class="preprocessor">#include <e32std.h></span> |
|
44 <a name="l00037"></a>00037 <span class="preprocessor">#include <eikon.hrh></span> |
|
45 <a name="l00038"></a>00038 |
|
46 <a name="l00039"></a>00039 <span class="preprocessor">#include <transparent.rsg></span> |
|
47 <a name="l00040"></a>00040 <span class="preprocessor">#include "transparent.hrh"</span> |
|
48 <a name="l00041"></a>00041 |
|
49 <a name="l00042"></a>00042 <a class="code" href="secureclientandserver_8h.html#a5eadd4429627d82193b37536d4faa03a">_LIT</a>(KEventButton1Pressed, <span class="stringliteral">"Event received for mouse button 1 being pressed"</span>); |
|
50 <a name="l00043"></a>00043 <a class="code" href="secureclientandserver_8h.html#a5eadd4429627d82193b37536d4faa03a">_LIT</a>(KEventButton2Pressed, <span class="stringliteral">"Event received for press of middle button of a 3 button mouse"</span>); |
|
51 <a name="l00044"></a>00044 <a class="code" href="secureclientandserver_8h.html#a5eadd4429627d82193b37536d4faa03a">_LIT</a>(KEventButton3Pressed, <span class="stringliteral">"Event received for last mouse button press"</span>); |
|
52 <a name="l00045"></a>00045 |
|
53 <a name="l00046"></a>00046 <span class="keyword">const</span> TInt KDelay=1000000; |
|
54 <a name="l00047"></a>00047 <span class="keyword">class </span><a class="code" href="class_c_event_handler.html">CEventHandler</a>; |
|
55 <a name="l00048"></a>00048 <span class="keyword">class </span><a class="code" href="class_c_transparent_app_ui.html">CTransparentAppUi</a>; |
|
56 <a name="l00049"></a>00049 |
|
57 <a name="l00054"></a><a class="code" href="class_c_transparent_application.html">00054</a> <span class="keyword">class </span><a class="code" href="class_c_transparent_application.html">CTransparentApplication</a> : <span class="keyword">public</span> CEikApplication |
|
58 <a name="l00055"></a>00055 { |
|
59 <a name="l00056"></a>00056 <span class="keyword">private</span>: |
|
60 <a name="l00057"></a>00057 CApaDocument* CreateDocumentL(); |
|
61 <a name="l00058"></a>00058 TUid AppDllUid() <span class="keyword">const</span>; |
|
62 <a name="l00059"></a>00059 }; |
|
63 <a name="l00060"></a>00060 |
|
64 <a name="l00064"></a><a class="code" href="class_c_transparent_util.html">00064</a> <span class="keyword">class </span><a class="code" href="class_c_transparent_util.html">CTransparentUtil</a> : <span class="keyword">public</span> CCoeControl |
|
65 <a name="l00065"></a>00065 { |
|
66 <a name="l00066"></a>00066 <span class="keyword">public</span>: |
|
67 <a name="l00067"></a>00067 <span class="keyword">static</span> <a class="code" href="class_c_transparent_util.html">CTransparentUtil</a>* <a class="code" href="class_c_transparent_util.html#a9d8db23cebc357a94cfa21213db8a2ab">NewL</a>(); |
|
68 <a name="l00068"></a>00068 <span class="keyword">static</span> TBool Flag(); |
|
69 <a name="l00069"></a>00069 <a class="code" href="class_c_transparent_util.html#a5ac75e00750e9cd60fdf575bf3e400e4">CTransparentUtil</a>(); |
|
70 <a name="l00070"></a>00070 <a class="code" href="class_c_transparent_util.html#acc7952414bc448ede845d4ee1a6306ab">~CTransparentUtil</a>(); |
|
71 <a name="l00071"></a>00071 <span class="keywordtype">void</span> <a class="code" href="class_c_transparent_util.html#a913184d6e06574a7b843e17c021caad6">ConstructL</a>(); |
|
72 <a name="l00072"></a>00072 |
|
73 <a name="l00073"></a>00073 <span class="keywordtype">void</span> <a class="code" href="class_c_transparent_util.html#a1b609f4a41da207c7a42610a42529752">ClearWindow</a>(RWsSession& aSession, RWindow& aWindow, CWindowGc* aGc, TRgb aColor); |
|
74 <a name="l00074"></a>00074 <span class="keywordtype">void</span> <a class="code" href="class_c_transparent_util.html#a253c26d5668451d3186cabe1744e364a">DrawWindow</a>(RWindow& aWindow, TRgb aColor1, TRgb aColor2, TRect aRect, <span class="keyword">const</span> TDesC& aText); |
|
75 <a name="l00075"></a>00075 <span class="keywordtype">void</span> <a class="code" href="class_c_transparent_util.html#ab552b1972db4ef4c22a6733e8f48a959">DrawWindowRegion</a>(RWindow& aWindow, TRgb aColor1, TRgb aColor2,TRect aChopRect, TRect aRect, <span class="keyword">const</span> TDesC& aText, <span class="keyword">const</span> TPoint& aPoint); |
|
76 <a name="l00076"></a>00076 |
|
77 <a name="l00077"></a>00077 <span class="keywordtype">void</span> <a class="code" href="class_c_transparent_util.html#a8789a4bf5bdbbd7ee94c91ac91a5c04f">TransparencyVarianceL</a>(); |
|
78 <a name="l00078"></a>00078 <span class="keywordtype">void</span> <a class="code" href="class_c_transparent_util.html#a5177889bde1510d758ef8e84b6416e5f">TransparentRegionL</a>(); |
|
79 <a name="l00079"></a>00079 |
|
80 <a name="l00080"></a>00080 TBool <a class="code" href="class_c_transparent_util.html#ae5c53597e173f8e554c7f4fbda81a154">DoChangeTransparencyL</a>(); |
|
81 <a name="l00081"></a>00081 TBool DoSetTransparentRegion(); |
|
82 <a name="l00082"></a>00082 |
|
83 <a name="l00083"></a>00083 <span class="keyword">private</span>: |
|
84 <a name="l00084"></a>00084 CPeriodic* iPeriodicObject; |
|
85 <a name="l00085"></a>00085 <a class="code" href="class_c_event_handler.html">CEventHandler</a>* iEventHandler; |
|
86 <a name="l00086"></a>00086 RWindowGroup iGroup; |
|
87 <a name="l00087"></a>00087 RWindow iBackgndWindow; |
|
88 <a name="l00088"></a>00088 RWindow iForegndWindowTrans; |
|
89 <a name="l00089"></a>00089 |
|
90 <a name="l00090"></a>00090 RWindow iFgndWinTransRegion; |
|
91 <a name="l00091"></a>00091 RWsSession iWs; |
|
92 <a name="l00092"></a>00092 CWsScreenDevice* iScr; |
|
93 <a name="l00093"></a>00093 CWindowGc* iGc; |
|
94 <a name="l00094"></a>00094 |
|
95 <a name="l00095"></a>00095 TSize iSize; |
|
96 <a name="l00096"></a>00096 TInt iAlphaValue; |
|
97 <a name="l00097"></a>00097 TInt iXOffset; |
|
98 <a name="l00098"></a>00098 TInt iYOffset; |
|
99 <a name="l00099"></a>00099 CFbsBitmapDevice* iBitmapDevice; |
|
100 <a name="l00100"></a>00100 CFbsBitGc* iBitmapGc; |
|
101 <a name="l00101"></a>00101 TInt iPos; |
|
102 <a name="l00102"></a>00102 TInt iColor; |
|
103 <a name="l00103"></a>00103 TBool iBoolVisible; |
|
104 <a name="l00104"></a>00104 <span class="keyword">public</span>: |
|
105 <a name="l00105"></a>00105 TRegionFix<2> iRegion; |
|
106 <a name="l00106"></a>00106 }; |
|
107 <a name="l00107"></a>00107 |
|
108 <a name="l00111"></a><a class="code" href="class_c_transparent_app_ui.html">00111</a> <span class="keyword">class </span><a class="code" href="class_c_transparent_app_ui.html">CTransparentAppUi</a> : <span class="keyword">public</span> CEikAppUi |
|
109 <a name="l00112"></a>00112 { |
|
110 <a name="l00113"></a>00113 <span class="keyword">public</span>: |
|
111 <a name="l00114"></a>00114 <span class="keywordtype">void</span> <a class="code" href="class_c_transparent_app_ui.html#a326f4addd9c938b310e947e693a677f6">ConstructL</a>(); |
|
112 <a name="l00115"></a>00115 <a class="code" href="class_c_transparent_app_ui.html#ac0551f245d91b66ef370eada24099134">~CTransparentAppUi</a>(); |
|
113 <a name="l00116"></a>00116 |
|
114 <a name="l00117"></a>00117 <span class="keyword">private</span>: |
|
115 <a name="l00118"></a>00118 <span class="keywordtype">void</span> HandleCommandL(TInt aCommand); |
|
116 <a name="l00119"></a>00119 |
|
117 <a name="l00120"></a>00120 <span class="keyword">private</span>: |
|
118 <a name="l00121"></a>00121 <a class="code" href="class_c_transparent_util.html">CTransparentUtil</a>* iUtil; |
|
119 <a name="l00122"></a>00122 }; |
|
120 <a name="l00123"></a>00123 |
|
121 <a name="l00127"></a><a class="code" href="class_c_transparent_document.html">00127</a> <span class="keyword">class </span><a class="code" href="class_c_transparent_document.html">CTransparentDocument</a> : <span class="keyword">public</span> CEikDocument |
|
122 <a name="l00128"></a>00128 { |
|
123 <a name="l00129"></a>00129 <span class="keyword">public</span>: |
|
124 <a name="l00130"></a>00130 <span class="keyword">static</span> <a class="code" href="class_c_transparent_document.html">CTransparentDocument</a>* NewL(CEikApplication& aApp); |
|
125 <a name="l00131"></a>00131 <a class="code" href="class_c_transparent_document.html#adc1f29c2b1b23bfdea626b8b80a60bdb">CTransparentDocument</a>(CEikApplication& aApp); |
|
126 <a name="l00132"></a>00132 <span class="keywordtype">void</span> ConstructL(); |
|
127 <a name="l00133"></a>00133 <span class="keyword">private</span>: |
|
128 <a name="l00134"></a>00134 CEikAppUi* CreateAppUiL(); |
|
129 <a name="l00135"></a>00135 }; |
|
130 <a name="l00136"></a>00136 |
|
131 <a name="l00140"></a><a class="code" href="class_c_event_handler.html">00140</a> <span class="keyword">class </span><a class="code" href="class_c_event_handler.html">CEventHandler</a>: <span class="keyword">public</span> CActive |
|
132 <a name="l00141"></a>00141 { |
|
133 <a name="l00142"></a>00142 <span class="keyword">public</span>: |
|
134 <a name="l00143"></a>00143 <span class="keyword">static</span> <a class="code" href="class_c_event_handler.html">CEventHandler</a>* <a class="code" href="class_c_event_handler.html#a0e709c6e924eb9799e69ea10e26824d6">NewL</a>(RWsSession& aWs); |
|
135 <a name="l00144"></a>00144 <span class="keyword">virtual</span> <a class="code" href="class_c_event_handler.html#a41b6924a33472d04cee2fe3e90cc6acc">~CEventHandler</a>(); |
|
136 <a name="l00145"></a>00145 <span class="keywordtype">void</span> <a class="code" href="class_c_event_handler.html#aaebc5150679bb4621e2bc353d6b97131">HandlePointerEvent</a>(TPointerEvent& aPointerEvent); |
|
137 <a name="l00146"></a>00146 <span class="keywordtype">void</span> <a class="code" href="class_c_event_handler.html#a72d34b52144f8e5312ec78abe44ee895">InfoMessage</a>(<span class="keyword">const</span> TDesC& aMsg); |
|
138 <a name="l00147"></a>00147 <span class="keywordtype">void</span> <a class="code" href="class_c_event_handler.html#aac65df544e26e3ef06cc087b514c030a">IssueRequest</a>(); |
|
139 <a name="l00148"></a>00148 <span class="keyword">private</span>: |
|
140 <a name="l00149"></a>00149 <a class="code" href="class_c_event_handler.html">CEventHandler</a>(RWsSession& aWs); |
|
141 <a name="l00150"></a>00150 <span class="keywordtype">void</span> ConstructL(); |
|
142 <a name="l00151"></a>00151 <span class="keywordtype">void</span> RunL(); |
|
143 <a name="l00152"></a>00152 <span class="keywordtype">void</span> DoCancel(); |
|
144 <a name="l00153"></a>00153 |
|
145 <a name="l00154"></a>00154 <span class="keyword">private</span>: |
|
146 <a name="l00155"></a>00155 TWsEvent iWsEvent; |
|
147 <a name="l00156"></a>00156 RWsSession& iWs; |
|
148 <a name="l00157"></a>00157 }; |
|
149 <a name="l00158"></a>00158 <span class="preprocessor">#endif // __TRANSPARENT_H__</span> |
|
150 <a name="l00159"></a>00159 <span class="preprocessor"></span> |
|
151 </pre></div></div> |
|
152 <hr size="1"/><address style="text-align: right;"><small>Generated by |
|
153 <a href="http://www.doxygen.org/index.html"> |
|
154 <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.2 </small></address> |
|
155 </body> |
|
156 </html> |