author | Gareth Stockwell <gareth.stockwell@accenture.com> |
Fri, 05 Nov 2010 17:31:20 +0000 | |
branch | bug235_bringup_0 |
changeset 215 | 097e92a68d68 |
parent 213 | deb2534f581f |
permissions | -rw-r--r-- |
193
bbf967b65d9e
Add a bringup test program. Rom build is: buildrom syborg minigui_simulator eglbringuptest.iby The command to run is called ebt. See mmp file for documentation.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff
changeset
|
1 |
// Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). |
bbf967b65d9e
Add a bringup test program. Rom build is: buildrom syborg minigui_simulator eglbringuptest.iby The command to run is called ebt. See mmp file for documentation.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff
changeset
|
2 |
// All rights reserved. |
bbf967b65d9e
Add a bringup test program. Rom build is: buildrom syborg minigui_simulator eglbringuptest.iby The command to run is called ebt. See mmp file for documentation.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff
changeset
|
3 |
// This component and the accompanying materials are made available |
bbf967b65d9e
Add a bringup test program. Rom build is: buildrom syborg minigui_simulator eglbringuptest.iby The command to run is called ebt. See mmp file for documentation.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff
changeset
|
4 |
// under the terms of "Eclipse Public License v1.0" |
bbf967b65d9e
Add a bringup test program. Rom build is: buildrom syborg minigui_simulator eglbringuptest.iby The command to run is called ebt. See mmp file for documentation.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff
changeset
|
5 |
// which accompanies this distribution, and is available |
bbf967b65d9e
Add a bringup test program. Rom build is: buildrom syborg minigui_simulator eglbringuptest.iby The command to run is called ebt. See mmp file for documentation.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff
changeset
|
6 |
// at the URL "http://www.eclipse.org/legal/epl-v10.html". |
bbf967b65d9e
Add a bringup test program. Rom build is: buildrom syborg minigui_simulator eglbringuptest.iby The command to run is called ebt. See mmp file for documentation.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff
changeset
|
7 |
// |
bbf967b65d9e
Add a bringup test program. Rom build is: buildrom syborg minigui_simulator eglbringuptest.iby The command to run is called ebt. See mmp file for documentation.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff
changeset
|
8 |
// Initial Contributors: |
bbf967b65d9e
Add a bringup test program. Rom build is: buildrom syborg minigui_simulator eglbringuptest.iby The command to run is called ebt. See mmp file for documentation.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff
changeset
|
9 |
// Nokia Corporation - initial contribution. |
bbf967b65d9e
Add a bringup test program. Rom build is: buildrom syborg minigui_simulator eglbringuptest.iby The command to run is called ebt. See mmp file for documentation.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff
changeset
|
10 |
// |
bbf967b65d9e
Add a bringup test program. Rom build is: buildrom syborg minigui_simulator eglbringuptest.iby The command to run is called ebt. See mmp file for documentation.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff
changeset
|
11 |
// Contributors: |
bbf967b65d9e
Add a bringup test program. Rom build is: buildrom syborg minigui_simulator eglbringuptest.iby The command to run is called ebt. See mmp file for documentation.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff
changeset
|
12 |
// |
bbf967b65d9e
Add a bringup test program. Rom build is: buildrom syborg minigui_simulator eglbringuptest.iby The command to run is called ebt. See mmp file for documentation.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff
changeset
|
13 |
// Description: |
bbf967b65d9e
Add a bringup test program. Rom build is: buildrom syborg minigui_simulator eglbringuptest.iby The command to run is called ebt. See mmp file for documentation.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff
changeset
|
14 |
|
bbf967b65d9e
Add a bringup test program. Rom build is: buildrom syborg minigui_simulator eglbringuptest.iby The command to run is called ebt. See mmp file for documentation.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff
changeset
|
15 |
#include <e32std.h> |
bbf967b65d9e
Add a bringup test program. Rom build is: buildrom syborg minigui_simulator eglbringuptest.iby The command to run is called ebt. See mmp file for documentation.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff
changeset
|
16 |
#include <w32std.h> |
bbf967b65d9e
Add a bringup test program. Rom build is: buildrom syborg minigui_simulator eglbringuptest.iby The command to run is called ebt. See mmp file for documentation.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff
changeset
|
17 |
#include <e32math.h> |
bbf967b65d9e
Add a bringup test program. Rom build is: buildrom syborg minigui_simulator eglbringuptest.iby The command to run is called ebt. See mmp file for documentation.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff
changeset
|
18 |
#include <e32keys.h> |
215
097e92a68d68
Added GLES 1.x spinning cube-rendering code to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
213
diff
changeset
|
19 |
#include <bacline.h> |
097e92a68d68
Added GLES 1.x spinning cube-rendering code to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
213
diff
changeset
|
20 |
#include "gles1cube.h" |
211
3804ba25b23f
Refactored eglbringuptest to separate EGL and VG code
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
210
diff
changeset
|
21 |
#include "vgline.h" |
193
bbf967b65d9e
Add a bringup test program. Rom build is: buildrom syborg minigui_simulator eglbringuptest.iby The command to run is called ebt. See mmp file for documentation.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff
changeset
|
22 |
|
bbf967b65d9e
Add a bringup test program. Rom build is: buildrom syborg minigui_simulator eglbringuptest.iby The command to run is called ebt. See mmp file for documentation.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff
changeset
|
23 |
#define KDefaultScreenNo 0 |
bbf967b65d9e
Add a bringup test program. Rom build is: buildrom syborg minigui_simulator eglbringuptest.iby The command to run is called ebt. See mmp file for documentation.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff
changeset
|
24 |
|
bbf967b65d9e
Add a bringup test program. Rom build is: buildrom syborg minigui_simulator eglbringuptest.iby The command to run is called ebt. See mmp file for documentation.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff
changeset
|
25 |
class CWsCanvas: public CBase |
bbf967b65d9e
Add a bringup test program. Rom build is: buildrom syborg minigui_simulator eglbringuptest.iby The command to run is called ebt. See mmp file for documentation.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff
changeset
|
26 |
{ |
bbf967b65d9e
Add a bringup test program. Rom build is: buildrom syborg minigui_simulator eglbringuptest.iby The command to run is called ebt. See mmp file for documentation.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff
changeset
|
27 |
public: |
bbf967b65d9e
Add a bringup test program. Rom build is: buildrom syborg minigui_simulator eglbringuptest.iby The command to run is called ebt. See mmp file for documentation.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff
changeset
|
28 |
static CWsCanvas* NewL(TInt, const TPoint&); |
bbf967b65d9e
Add a bringup test program. Rom build is: buildrom syborg minigui_simulator eglbringuptest.iby The command to run is called ebt. See mmp file for documentation.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff
changeset
|
29 |
~CWsCanvas(); |
bbf967b65d9e
Add a bringup test program. Rom build is: buildrom syborg minigui_simulator eglbringuptest.iby The command to run is called ebt. See mmp file for documentation.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff
changeset
|
30 |
|
210
da03feddbab7
Cleaned up eglbringuptest code
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
208
diff
changeset
|
31 |
RWsSession& Session() { return iWs; } |
da03feddbab7
Cleaned up eglbringuptest code
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
208
diff
changeset
|
32 |
RWindow& Window() { return iWin; } |
da03feddbab7
Cleaned up eglbringuptest code
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
208
diff
changeset
|
33 |
const TSize& ScreenSize() const { return iSz; } |
193
bbf967b65d9e
Add a bringup test program. Rom build is: buildrom syborg minigui_simulator eglbringuptest.iby The command to run is called ebt. See mmp file for documentation.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff
changeset
|
34 |
|
bbf967b65d9e
Add a bringup test program. Rom build is: buildrom syborg minigui_simulator eglbringuptest.iby The command to run is called ebt. See mmp file for documentation.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff
changeset
|
35 |
private: |
bbf967b65d9e
Add a bringup test program. Rom build is: buildrom syborg minigui_simulator eglbringuptest.iby The command to run is called ebt. See mmp file for documentation.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff
changeset
|
36 |
CWsCanvas(TInt, const TPoint&); |
bbf967b65d9e
Add a bringup test program. Rom build is: buildrom syborg minigui_simulator eglbringuptest.iby The command to run is called ebt. See mmp file for documentation.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff
changeset
|
37 |
void ConstructL(); |
210
da03feddbab7
Cleaned up eglbringuptest code
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
208
diff
changeset
|
38 |
|
193
bbf967b65d9e
Add a bringup test program. Rom build is: buildrom syborg minigui_simulator eglbringuptest.iby The command to run is called ebt. See mmp file for documentation.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff
changeset
|
39 |
private: |
210
da03feddbab7
Cleaned up eglbringuptest code
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
208
diff
changeset
|
40 |
const TInt iScrId; |
da03feddbab7
Cleaned up eglbringuptest code
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
208
diff
changeset
|
41 |
const TPoint iPos; |
193
bbf967b65d9e
Add a bringup test program. Rom build is: buildrom syborg minigui_simulator eglbringuptest.iby The command to run is called ebt. See mmp file for documentation.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff
changeset
|
42 |
TSize iSz; |
bbf967b65d9e
Add a bringup test program. Rom build is: buildrom syborg minigui_simulator eglbringuptest.iby The command to run is called ebt. See mmp file for documentation.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff
changeset
|
43 |
RWsSession iWs; |
bbf967b65d9e
Add a bringup test program. Rom build is: buildrom syborg minigui_simulator eglbringuptest.iby The command to run is called ebt. See mmp file for documentation.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff
changeset
|
44 |
RWindowGroup iGrp; |
bbf967b65d9e
Add a bringup test program. Rom build is: buildrom syborg minigui_simulator eglbringuptest.iby The command to run is called ebt. See mmp file for documentation.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff
changeset
|
45 |
RWindow iWin; |
bbf967b65d9e
Add a bringup test program. Rom build is: buildrom syborg minigui_simulator eglbringuptest.iby The command to run is called ebt. See mmp file for documentation.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff
changeset
|
46 |
CWsScreenDevice* iScr; |
bbf967b65d9e
Add a bringup test program. Rom build is: buildrom syborg minigui_simulator eglbringuptest.iby The command to run is called ebt. See mmp file for documentation.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff
changeset
|
47 |
CWindowGc* iGc; |
bbf967b65d9e
Add a bringup test program. Rom build is: buildrom syborg minigui_simulator eglbringuptest.iby The command to run is called ebt. See mmp file for documentation.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff
changeset
|
48 |
}; |
bbf967b65d9e
Add a bringup test program. Rom build is: buildrom syborg minigui_simulator eglbringuptest.iby The command to run is called ebt. See mmp file for documentation.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff
changeset
|
49 |
|
bbf967b65d9e
Add a bringup test program. Rom build is: buildrom syborg minigui_simulator eglbringuptest.iby The command to run is called ebt. See mmp file for documentation.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff
changeset
|
50 |
/** |
bbf967b65d9e
Add a bringup test program. Rom build is: buildrom syborg minigui_simulator eglbringuptest.iby The command to run is called ebt. See mmp file for documentation.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff
changeset
|
51 |
* Create a canvas to draw to. |
210
da03feddbab7
Cleaned up eglbringuptest code
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
208
diff
changeset
|
52 |
* |
193
bbf967b65d9e
Add a bringup test program. Rom build is: buildrom syborg minigui_simulator eglbringuptest.iby The command to run is called ebt. See mmp file for documentation.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff
changeset
|
53 |
* @param aScrId Screen number to use |
bbf967b65d9e
Add a bringup test program. Rom build is: buildrom syborg minigui_simulator eglbringuptest.iby The command to run is called ebt. See mmp file for documentation.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff
changeset
|
54 |
* @param aPos Position on screen to use |
bbf967b65d9e
Add a bringup test program. Rom build is: buildrom syborg minigui_simulator eglbringuptest.iby The command to run is called ebt. See mmp file for documentation.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff
changeset
|
55 |
*/ |
bbf967b65d9e
Add a bringup test program. Rom build is: buildrom syborg minigui_simulator eglbringuptest.iby The command to run is called ebt. See mmp file for documentation.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff
changeset
|
56 |
CWsCanvas* CWsCanvas::NewL(TInt aScrId, const TPoint& aPos) |
bbf967b65d9e
Add a bringup test program. Rom build is: buildrom syborg minigui_simulator eglbringuptest.iby The command to run is called ebt. See mmp file for documentation.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff
changeset
|
57 |
{ |
210
da03feddbab7
Cleaned up eglbringuptest code
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
208
diff
changeset
|
58 |
CWsCanvas* self = new (ELeave) CWsCanvas(aScrId, aPos); |
da03feddbab7
Cleaned up eglbringuptest code
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
208
diff
changeset
|
59 |
CleanupStack::PushL(self); |
da03feddbab7
Cleaned up eglbringuptest code
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
208
diff
changeset
|
60 |
self->ConstructL(); |
da03feddbab7
Cleaned up eglbringuptest code
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
208
diff
changeset
|
61 |
CleanupStack::Pop(self); |
da03feddbab7
Cleaned up eglbringuptest code
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
208
diff
changeset
|
62 |
return self; |
193
bbf967b65d9e
Add a bringup test program. Rom build is: buildrom syborg minigui_simulator eglbringuptest.iby The command to run is called ebt. See mmp file for documentation.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff
changeset
|
63 |
} |
bbf967b65d9e
Add a bringup test program. Rom build is: buildrom syborg minigui_simulator eglbringuptest.iby The command to run is called ebt. See mmp file for documentation.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff
changeset
|
64 |
|
210
da03feddbab7
Cleaned up eglbringuptest code
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
208
diff
changeset
|
65 |
CWsCanvas::CWsCanvas(TInt aScrId, const TPoint& aPos) |
da03feddbab7
Cleaned up eglbringuptest code
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
208
diff
changeset
|
66 |
: iScrId(aScrId) |
da03feddbab7
Cleaned up eglbringuptest code
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
208
diff
changeset
|
67 |
, iPos(aPos) |
193
bbf967b65d9e
Add a bringup test program. Rom build is: buildrom syborg minigui_simulator eglbringuptest.iby The command to run is called ebt. See mmp file for documentation.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff
changeset
|
68 |
{ |
bbf967b65d9e
Add a bringup test program. Rom build is: buildrom syborg minigui_simulator eglbringuptest.iby The command to run is called ebt. See mmp file for documentation.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff
changeset
|
69 |
} |
bbf967b65d9e
Add a bringup test program. Rom build is: buildrom syborg minigui_simulator eglbringuptest.iby The command to run is called ebt. See mmp file for documentation.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff
changeset
|
70 |
|
bbf967b65d9e
Add a bringup test program. Rom build is: buildrom syborg minigui_simulator eglbringuptest.iby The command to run is called ebt. See mmp file for documentation.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff
changeset
|
71 |
CWsCanvas::~CWsCanvas() |
bbf967b65d9e
Add a bringup test program. Rom build is: buildrom syborg minigui_simulator eglbringuptest.iby The command to run is called ebt. See mmp file for documentation.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff
changeset
|
72 |
{ |
bbf967b65d9e
Add a bringup test program. Rom build is: buildrom syborg minigui_simulator eglbringuptest.iby The command to run is called ebt. See mmp file for documentation.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff
changeset
|
73 |
delete iGc; |
bbf967b65d9e
Add a bringup test program. Rom build is: buildrom syborg minigui_simulator eglbringuptest.iby The command to run is called ebt. See mmp file for documentation.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff
changeset
|
74 |
delete iScr; |
bbf967b65d9e
Add a bringup test program. Rom build is: buildrom syborg minigui_simulator eglbringuptest.iby The command to run is called ebt. See mmp file for documentation.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff
changeset
|
75 |
iGrp.Close(); |
bbf967b65d9e
Add a bringup test program. Rom build is: buildrom syborg minigui_simulator eglbringuptest.iby The command to run is called ebt. See mmp file for documentation.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff
changeset
|
76 |
iWin.Close(); |
bbf967b65d9e
Add a bringup test program. Rom build is: buildrom syborg minigui_simulator eglbringuptest.iby The command to run is called ebt. See mmp file for documentation.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff
changeset
|
77 |
iWs.Close(); |
bbf967b65d9e
Add a bringup test program. Rom build is: buildrom syborg minigui_simulator eglbringuptest.iby The command to run is called ebt. See mmp file for documentation.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff
changeset
|
78 |
} |
bbf967b65d9e
Add a bringup test program. Rom build is: buildrom syborg minigui_simulator eglbringuptest.iby The command to run is called ebt. See mmp file for documentation.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff
changeset
|
79 |
|
bbf967b65d9e
Add a bringup test program. Rom build is: buildrom syborg minigui_simulator eglbringuptest.iby The command to run is called ebt. See mmp file for documentation.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff
changeset
|
80 |
/** |
bbf967b65d9e
Add a bringup test program. Rom build is: buildrom syborg minigui_simulator eglbringuptest.iby The command to run is called ebt. See mmp file for documentation.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff
changeset
|
81 |
* Construct the application canvas. |
210
da03feddbab7
Cleaned up eglbringuptest code
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
208
diff
changeset
|
82 |
* |
193
bbf967b65d9e
Add a bringup test program. Rom build is: buildrom syborg minigui_simulator eglbringuptest.iby The command to run is called ebt. See mmp file for documentation.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff
changeset
|
83 |
* Here we setup the collaboration with the Window Server. We want to get a window |
bbf967b65d9e
Add a bringup test program. Rom build is: buildrom syborg minigui_simulator eglbringuptest.iby The command to run is called ebt. See mmp file for documentation.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff
changeset
|
84 |
* on the appropriate screen, and setup a redraw handler so we can re-paint our window |
bbf967b65d9e
Add a bringup test program. Rom build is: buildrom syborg minigui_simulator eglbringuptest.iby The command to run is called ebt. See mmp file for documentation.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff
changeset
|
85 |
* when the Window Server wants us to. |
bbf967b65d9e
Add a bringup test program. Rom build is: buildrom syborg minigui_simulator eglbringuptest.iby The command to run is called ebt. See mmp file for documentation.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff
changeset
|
86 |
*/ |
210
da03feddbab7
Cleaned up eglbringuptest code
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
208
diff
changeset
|
87 |
void CWsCanvas::ConstructL() |
193
bbf967b65d9e
Add a bringup test program. Rom build is: buildrom syborg minigui_simulator eglbringuptest.iby The command to run is called ebt. See mmp file for documentation.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff
changeset
|
88 |
{ |
bbf967b65d9e
Add a bringup test program. Rom build is: buildrom syborg minigui_simulator eglbringuptest.iby The command to run is called ebt. See mmp file for documentation.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff
changeset
|
89 |
TInt err = iWs.Connect(); |
bbf967b65d9e
Add a bringup test program. Rom build is: buildrom syborg minigui_simulator eglbringuptest.iby The command to run is called ebt. See mmp file for documentation.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff
changeset
|
90 |
User::LeaveIfError(err); |
bbf967b65d9e
Add a bringup test program. Rom build is: buildrom syborg minigui_simulator eglbringuptest.iby The command to run is called ebt. See mmp file for documentation.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff
changeset
|
91 |
|
bbf967b65d9e
Add a bringup test program. Rom build is: buildrom syborg minigui_simulator eglbringuptest.iby The command to run is called ebt. See mmp file for documentation.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff
changeset
|
92 |
iScr = new(ELeave) CWsScreenDevice(iWs); |
bbf967b65d9e
Add a bringup test program. Rom build is: buildrom syborg minigui_simulator eglbringuptest.iby The command to run is called ebt. See mmp file for documentation.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff
changeset
|
93 |
err = iScr->Construct(iScrId); |
bbf967b65d9e
Add a bringup test program. Rom build is: buildrom syborg minigui_simulator eglbringuptest.iby The command to run is called ebt. See mmp file for documentation.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff
changeset
|
94 |
User::LeaveIfError(err); |
bbf967b65d9e
Add a bringup test program. Rom build is: buildrom syborg minigui_simulator eglbringuptest.iby The command to run is called ebt. See mmp file for documentation.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff
changeset
|
95 |
|
bbf967b65d9e
Add a bringup test program. Rom build is: buildrom syborg minigui_simulator eglbringuptest.iby The command to run is called ebt. See mmp file for documentation.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff
changeset
|
96 |
err = iScr->CreateContext(iGc); |
bbf967b65d9e
Add a bringup test program. Rom build is: buildrom syborg minigui_simulator eglbringuptest.iby The command to run is called ebt. See mmp file for documentation.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff
changeset
|
97 |
User::LeaveIfError(err); |
210
da03feddbab7
Cleaned up eglbringuptest code
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
208
diff
changeset
|
98 |
|
193
bbf967b65d9e
Add a bringup test program. Rom build is: buildrom syborg minigui_simulator eglbringuptest.iby The command to run is called ebt. See mmp file for documentation.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff
changeset
|
99 |
iGrp = RWindowGroup(iWs); |
bbf967b65d9e
Add a bringup test program. Rom build is: buildrom syborg minigui_simulator eglbringuptest.iby The command to run is called ebt. See mmp file for documentation.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff
changeset
|
100 |
err = iGrp.Construct(0xbadf00d, ETrue, iScr); |
bbf967b65d9e
Add a bringup test program. Rom build is: buildrom syborg minigui_simulator eglbringuptest.iby The command to run is called ebt. See mmp file for documentation.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff
changeset
|
101 |
User::LeaveIfError(err); |
bbf967b65d9e
Add a bringup test program. Rom build is: buildrom syborg minigui_simulator eglbringuptest.iby The command to run is called ebt. See mmp file for documentation.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff
changeset
|
102 |
|
bbf967b65d9e
Add a bringup test program. Rom build is: buildrom syborg minigui_simulator eglbringuptest.iby The command to run is called ebt. See mmp file for documentation.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff
changeset
|
103 |
iWin = RWindow(iWs); |
bbf967b65d9e
Add a bringup test program. Rom build is: buildrom syborg minigui_simulator eglbringuptest.iby The command to run is called ebt. See mmp file for documentation.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff
changeset
|
104 |
err = iWin.Construct(iGrp, (TUint32)this); |
bbf967b65d9e
Add a bringup test program. Rom build is: buildrom syborg minigui_simulator eglbringuptest.iby The command to run is called ebt. See mmp file for documentation.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff
changeset
|
105 |
User::LeaveIfError(err); |
210
da03feddbab7
Cleaned up eglbringuptest code
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
208
diff
changeset
|
106 |
|
193
bbf967b65d9e
Add a bringup test program. Rom build is: buildrom syborg minigui_simulator eglbringuptest.iby The command to run is called ebt. See mmp file for documentation.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff
changeset
|
107 |
iSz = iScr->SizeInPixels(); |
bbf967b65d9e
Add a bringup test program. Rom build is: buildrom syborg minigui_simulator eglbringuptest.iby The command to run is called ebt. See mmp file for documentation.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff
changeset
|
108 |
iWin.SetExtent(iPos, iSz); |
bbf967b65d9e
Add a bringup test program. Rom build is: buildrom syborg minigui_simulator eglbringuptest.iby The command to run is called ebt. See mmp file for documentation.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff
changeset
|
109 |
iWin.SetBackgroundColor(); |
bbf967b65d9e
Add a bringup test program. Rom build is: buildrom syborg minigui_simulator eglbringuptest.iby The command to run is called ebt. See mmp file for documentation.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff
changeset
|
110 |
iWin.Activate(); |
bbf967b65d9e
Add a bringup test program. Rom build is: buildrom syborg minigui_simulator eglbringuptest.iby The command to run is called ebt. See mmp file for documentation.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff
changeset
|
111 |
|
bbf967b65d9e
Add a bringup test program. Rom build is: buildrom syborg minigui_simulator eglbringuptest.iby The command to run is called ebt. See mmp file for documentation.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff
changeset
|
112 |
iWs.Flush(); |
bbf967b65d9e
Add a bringup test program. Rom build is: buildrom syborg minigui_simulator eglbringuptest.iby The command to run is called ebt. See mmp file for documentation.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff
changeset
|
113 |
|
210
da03feddbab7
Cleaned up eglbringuptest code
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
208
diff
changeset
|
114 |
iWs.SetFocusScreen(iScrId); |
193
bbf967b65d9e
Add a bringup test program. Rom build is: buildrom syborg minigui_simulator eglbringuptest.iby The command to run is called ebt. See mmp file for documentation.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff
changeset
|
115 |
} |
213
deb2534f581f
Added WSERV event handler to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
211
diff
changeset
|
116 |
|
deb2534f581f
Added WSERV event handler to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
211
diff
changeset
|
117 |
class MWsEventObserver |
deb2534f581f
Added WSERV event handler to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
211
diff
changeset
|
118 |
{ |
deb2534f581f
Added WSERV event handler to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
211
diff
changeset
|
119 |
public: |
deb2534f581f
Added WSERV event handler to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
211
diff
changeset
|
120 |
virtual void PointerEvent() = 0; |
deb2534f581f
Added WSERV event handler to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
211
diff
changeset
|
121 |
}; |
deb2534f581f
Added WSERV event handler to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
211
diff
changeset
|
122 |
|
deb2534f581f
Added WSERV event handler to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
211
diff
changeset
|
123 |
class CWsEventHandler : public CActive |
deb2534f581f
Added WSERV event handler to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
211
diff
changeset
|
124 |
{ |
deb2534f581f
Added WSERV event handler to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
211
diff
changeset
|
125 |
public: |
deb2534f581f
Added WSERV event handler to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
211
diff
changeset
|
126 |
CWsEventHandler(RWsSession& aSession, RWindow& aWindow, MWsEventObserver& aObserver); |
deb2534f581f
Added WSERV event handler to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
211
diff
changeset
|
127 |
~CWsEventHandler(); |
deb2534f581f
Added WSERV event handler to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
211
diff
changeset
|
128 |
private: |
deb2534f581f
Added WSERV event handler to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
211
diff
changeset
|
129 |
void ConstructL(); |
deb2534f581f
Added WSERV event handler to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
211
diff
changeset
|
130 |
void RequestEvent(); |
deb2534f581f
Added WSERV event handler to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
211
diff
changeset
|
131 |
void RunL(); |
deb2534f581f
Added WSERV event handler to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
211
diff
changeset
|
132 |
void DoCancel(); |
deb2534f581f
Added WSERV event handler to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
211
diff
changeset
|
133 |
private: |
deb2534f581f
Added WSERV event handler to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
211
diff
changeset
|
134 |
RWsSession& iSession; |
deb2534f581f
Added WSERV event handler to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
211
diff
changeset
|
135 |
RWindow& iWindow; |
deb2534f581f
Added WSERV event handler to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
211
diff
changeset
|
136 |
MWsEventObserver& iObserver; |
deb2534f581f
Added WSERV event handler to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
211
diff
changeset
|
137 |
}; |
deb2534f581f
Added WSERV event handler to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
211
diff
changeset
|
138 |
|
deb2534f581f
Added WSERV event handler to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
211
diff
changeset
|
139 |
CWsEventHandler::CWsEventHandler(RWsSession& aSession, RWindow& aWindow, MWsEventObserver& aObserver) |
deb2534f581f
Added WSERV event handler to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
211
diff
changeset
|
140 |
: CActive(CActive::EPriorityStandard) |
deb2534f581f
Added WSERV event handler to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
211
diff
changeset
|
141 |
, iSession(aSession) |
deb2534f581f
Added WSERV event handler to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
211
diff
changeset
|
142 |
, iWindow(aWindow) |
deb2534f581f
Added WSERV event handler to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
211
diff
changeset
|
143 |
, iObserver(aObserver) |
deb2534f581f
Added WSERV event handler to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
211
diff
changeset
|
144 |
{ |
deb2534f581f
Added WSERV event handler to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
211
diff
changeset
|
145 |
RDebug::Printf("[EBT] CWsEventHandler::CWsEventHandler"); |
deb2534f581f
Added WSERV event handler to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
211
diff
changeset
|
146 |
CActiveScheduler::Add(this); |
deb2534f581f
Added WSERV event handler to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
211
diff
changeset
|
147 |
RequestEvent(); |
deb2534f581f
Added WSERV event handler to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
211
diff
changeset
|
148 |
} |
deb2534f581f
Added WSERV event handler to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
211
diff
changeset
|
149 |
|
deb2534f581f
Added WSERV event handler to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
211
diff
changeset
|
150 |
CWsEventHandler::~CWsEventHandler() |
deb2534f581f
Added WSERV event handler to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
211
diff
changeset
|
151 |
{ |
deb2534f581f
Added WSERV event handler to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
211
diff
changeset
|
152 |
RDebug::Printf("[EBT] CWsEventHandler::~CWsEventHandler"); |
deb2534f581f
Added WSERV event handler to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
211
diff
changeset
|
153 |
Cancel(); |
deb2534f581f
Added WSERV event handler to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
211
diff
changeset
|
154 |
} |
deb2534f581f
Added WSERV event handler to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
211
diff
changeset
|
155 |
|
deb2534f581f
Added WSERV event handler to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
211
diff
changeset
|
156 |
void CWsEventHandler::ConstructL() |
deb2534f581f
Added WSERV event handler to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
211
diff
changeset
|
157 |
{ |
deb2534f581f
Added WSERV event handler to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
211
diff
changeset
|
158 |
CActiveScheduler::Add(this); |
deb2534f581f
Added WSERV event handler to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
211
diff
changeset
|
159 |
RequestEvent(); |
deb2534f581f
Added WSERV event handler to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
211
diff
changeset
|
160 |
} |
deb2534f581f
Added WSERV event handler to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
211
diff
changeset
|
161 |
|
deb2534f581f
Added WSERV event handler to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
211
diff
changeset
|
162 |
void CWsEventHandler::RequestEvent() |
deb2534f581f
Added WSERV event handler to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
211
diff
changeset
|
163 |
{ |
deb2534f581f
Added WSERV event handler to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
211
diff
changeset
|
164 |
iStatus = KRequestPending; |
deb2534f581f
Added WSERV event handler to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
211
diff
changeset
|
165 |
iSession.EventReady(&iStatus); |
deb2534f581f
Added WSERV event handler to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
211
diff
changeset
|
166 |
SetActive(); |
deb2534f581f
Added WSERV event handler to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
211
diff
changeset
|
167 |
} |
deb2534f581f
Added WSERV event handler to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
211
diff
changeset
|
168 |
|
deb2534f581f
Added WSERV event handler to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
211
diff
changeset
|
169 |
void CWsEventHandler::RunL() |
deb2534f581f
Added WSERV event handler to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
211
diff
changeset
|
170 |
{ |
deb2534f581f
Added WSERV event handler to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
211
diff
changeset
|
171 |
if (KErrNone == iStatus.Int()) |
deb2534f581f
Added WSERV event handler to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
211
diff
changeset
|
172 |
{ |
deb2534f581f
Added WSERV event handler to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
211
diff
changeset
|
173 |
TWsEvent event; |
deb2534f581f
Added WSERV event handler to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
211
diff
changeset
|
174 |
iSession.GetEvent(event); |
deb2534f581f
Added WSERV event handler to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
211
diff
changeset
|
175 |
RequestEvent(); |
deb2534f581f
Added WSERV event handler to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
211
diff
changeset
|
176 |
switch (event.Type()) |
deb2534f581f
Added WSERV event handler to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
211
diff
changeset
|
177 |
{ |
deb2534f581f
Added WSERV event handler to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
211
diff
changeset
|
178 |
case EEventPointer: |
deb2534f581f
Added WSERV event handler to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
211
diff
changeset
|
179 |
iObserver.PointerEvent(); |
deb2534f581f
Added WSERV event handler to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
211
diff
changeset
|
180 |
break; |
deb2534f581f
Added WSERV event handler to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
211
diff
changeset
|
181 |
} |
deb2534f581f
Added WSERV event handler to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
211
diff
changeset
|
182 |
} |
deb2534f581f
Added WSERV event handler to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
211
diff
changeset
|
183 |
} |
deb2534f581f
Added WSERV event handler to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
211
diff
changeset
|
184 |
|
deb2534f581f
Added WSERV event handler to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
211
diff
changeset
|
185 |
void CWsEventHandler::DoCancel() |
deb2534f581f
Added WSERV event handler to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
211
diff
changeset
|
186 |
{ |
deb2534f581f
Added WSERV event handler to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
211
diff
changeset
|
187 |
iSession.EventReadyCancel(); |
deb2534f581f
Added WSERV event handler to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
211
diff
changeset
|
188 |
} |
deb2534f581f
Added WSERV event handler to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
211
diff
changeset
|
189 |
|
210
da03feddbab7
Cleaned up eglbringuptest code
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
208
diff
changeset
|
190 |
class CWsApp : public CBase |
213
deb2534f581f
Added WSERV event handler to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
211
diff
changeset
|
191 |
, public MWsEventObserver |
210
da03feddbab7
Cleaned up eglbringuptest code
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
208
diff
changeset
|
192 |
{ |
da03feddbab7
Cleaned up eglbringuptest code
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
208
diff
changeset
|
193 |
public: |
da03feddbab7
Cleaned up eglbringuptest code
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
208
diff
changeset
|
194 |
static CWsApp* NewL(); |
da03feddbab7
Cleaned up eglbringuptest code
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
208
diff
changeset
|
195 |
~CWsApp(); |
da03feddbab7
Cleaned up eglbringuptest code
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
208
diff
changeset
|
196 |
void Start(); |
da03feddbab7
Cleaned up eglbringuptest code
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
208
diff
changeset
|
197 |
void Stop(); |
193
bbf967b65d9e
Add a bringup test program. Rom build is: buildrom syborg minigui_simulator eglbringuptest.iby The command to run is called ebt. See mmp file for documentation.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff
changeset
|
198 |
|
213
deb2534f581f
Added WSERV event handler to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
211
diff
changeset
|
199 |
// MWsEventObserver |
deb2534f581f
Added WSERV event handler to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
211
diff
changeset
|
200 |
void PointerEvent(); |
193
bbf967b65d9e
Add a bringup test program. Rom build is: buildrom syborg minigui_simulator eglbringuptest.iby The command to run is called ebt. See mmp file for documentation.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff
changeset
|
201 |
|
210
da03feddbab7
Cleaned up eglbringuptest code
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
208
diff
changeset
|
202 |
private: |
da03feddbab7
Cleaned up eglbringuptest code
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
208
diff
changeset
|
203 |
CWsApp(); |
da03feddbab7
Cleaned up eglbringuptest code
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
208
diff
changeset
|
204 |
void ConstructL(); |
193
bbf967b65d9e
Add a bringup test program. Rom build is: buildrom syborg minigui_simulator eglbringuptest.iby The command to run is called ebt. See mmp file for documentation.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff
changeset
|
205 |
|
210
da03feddbab7
Cleaned up eglbringuptest code
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
208
diff
changeset
|
206 |
private: |
da03feddbab7
Cleaned up eglbringuptest code
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
208
diff
changeset
|
207 |
CWsCanvas* iAppView; |
213
deb2534f581f
Added WSERV event handler to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
211
diff
changeset
|
208 |
CWsEventHandler* iEventHandler; |
210
da03feddbab7
Cleaned up eglbringuptest code
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
208
diff
changeset
|
209 |
CEGLRendering* iDemo; |
da03feddbab7
Cleaned up eglbringuptest code
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
208
diff
changeset
|
210 |
TPoint iPos; |
da03feddbab7
Cleaned up eglbringuptest code
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
208
diff
changeset
|
211 |
TSize iSz; |
da03feddbab7
Cleaned up eglbringuptest code
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
208
diff
changeset
|
212 |
TInt iScrId; |
da03feddbab7
Cleaned up eglbringuptest code
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
208
diff
changeset
|
213 |
}; |
193
bbf967b65d9e
Add a bringup test program. Rom build is: buildrom syborg minigui_simulator eglbringuptest.iby The command to run is called ebt. See mmp file for documentation.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff
changeset
|
214 |
|
210
da03feddbab7
Cleaned up eglbringuptest code
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
208
diff
changeset
|
215 |
CWsApp::CWsApp() |
193
bbf967b65d9e
Add a bringup test program. Rom build is: buildrom syborg minigui_simulator eglbringuptest.iby The command to run is called ebt. See mmp file for documentation.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff
changeset
|
216 |
{ |
bbf967b65d9e
Add a bringup test program. Rom build is: buildrom syborg minigui_simulator eglbringuptest.iby The command to run is called ebt. See mmp file for documentation.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff
changeset
|
217 |
} |
bbf967b65d9e
Add a bringup test program. Rom build is: buildrom syborg minigui_simulator eglbringuptest.iby The command to run is called ebt. See mmp file for documentation.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff
changeset
|
218 |
|
bbf967b65d9e
Add a bringup test program. Rom build is: buildrom syborg minigui_simulator eglbringuptest.iby The command to run is called ebt. See mmp file for documentation.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff
changeset
|
219 |
CWsApp* CWsApp::NewL() |
bbf967b65d9e
Add a bringup test program. Rom build is: buildrom syborg minigui_simulator eglbringuptest.iby The command to run is called ebt. See mmp file for documentation.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff
changeset
|
220 |
{ |
210
da03feddbab7
Cleaned up eglbringuptest code
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
208
diff
changeset
|
221 |
RDebug::Printf("[EBT] CWsApp::NewL"); |
da03feddbab7
Cleaned up eglbringuptest code
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
208
diff
changeset
|
222 |
CWsApp* self = new (ELeave) CWsApp; |
da03feddbab7
Cleaned up eglbringuptest code
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
208
diff
changeset
|
223 |
CleanupStack::PushL(self); |
da03feddbab7
Cleaned up eglbringuptest code
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
208
diff
changeset
|
224 |
self->ConstructL(); |
da03feddbab7
Cleaned up eglbringuptest code
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
208
diff
changeset
|
225 |
CleanupStack::Pop(self); |
da03feddbab7
Cleaned up eglbringuptest code
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
208
diff
changeset
|
226 |
return self; |
193
bbf967b65d9e
Add a bringup test program. Rom build is: buildrom syborg minigui_simulator eglbringuptest.iby The command to run is called ebt. See mmp file for documentation.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff
changeset
|
227 |
} |
bbf967b65d9e
Add a bringup test program. Rom build is: buildrom syborg minigui_simulator eglbringuptest.iby The command to run is called ebt. See mmp file for documentation.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff
changeset
|
228 |
|
215
097e92a68d68
Added GLES 1.x spinning cube-rendering code to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
213
diff
changeset
|
229 |
_LIT(KOptionScreen, "-screen"); |
097e92a68d68
Added GLES 1.x spinning cube-rendering code to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
213
diff
changeset
|
230 |
|
097e92a68d68
Added GLES 1.x spinning cube-rendering code to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
213
diff
changeset
|
231 |
typedef CEGLRendering* (*RendererFactoryFunctionL)(RWindow&); |
097e92a68d68
Added GLES 1.x spinning cube-rendering code to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
213
diff
changeset
|
232 |
|
193
bbf967b65d9e
Add a bringup test program. Rom build is: buildrom syborg minigui_simulator eglbringuptest.iby The command to run is called ebt. See mmp file for documentation.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff
changeset
|
233 |
/** |
bbf967b65d9e
Add a bringup test program. Rom build is: buildrom syborg minigui_simulator eglbringuptest.iby The command to run is called ebt. See mmp file for documentation.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff
changeset
|
234 |
* Constructor for CWsApp |
210
da03feddbab7
Cleaned up eglbringuptest code
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
208
diff
changeset
|
235 |
* |
193
bbf967b65d9e
Add a bringup test program. Rom build is: buildrom syborg minigui_simulator eglbringuptest.iby The command to run is called ebt. See mmp file for documentation.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff
changeset
|
236 |
* @note This constructor looks at the command line argument, if any, supplied when |
210
da03feddbab7
Cleaned up eglbringuptest code
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
208
diff
changeset
|
237 |
* launching the application. If specified, its used as the screen number to |
da03feddbab7
Cleaned up eglbringuptest code
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
208
diff
changeset
|
238 |
* target the output of the program. By default, screen 0 is used. |
193
bbf967b65d9e
Add a bringup test program. Rom build is: buildrom syborg minigui_simulator eglbringuptest.iby The command to run is called ebt. See mmp file for documentation.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff
changeset
|
239 |
*/ |
bbf967b65d9e
Add a bringup test program. Rom build is: buildrom syborg minigui_simulator eglbringuptest.iby The command to run is called ebt. See mmp file for documentation.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff
changeset
|
240 |
void CWsApp::ConstructL() |
bbf967b65d9e
Add a bringup test program. Rom build is: buildrom syborg minigui_simulator eglbringuptest.iby The command to run is called ebt. See mmp file for documentation.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff
changeset
|
241 |
{ |
210
da03feddbab7
Cleaned up eglbringuptest code
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
208
diff
changeset
|
242 |
RDebug::Printf("[EBT] CWsApp::ConstructL"); |
da03feddbab7
Cleaned up eglbringuptest code
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
208
diff
changeset
|
243 |
|
193
bbf967b65d9e
Add a bringup test program. Rom build is: buildrom syborg minigui_simulator eglbringuptest.iby The command to run is called ebt. See mmp file for documentation.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff
changeset
|
244 |
iScrId = KDefaultScreenNo; |
215
097e92a68d68
Added GLES 1.x spinning cube-rendering code to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
213
diff
changeset
|
245 |
HBufC* rendererName = 0; |
097e92a68d68
Added GLES 1.x spinning cube-rendering code to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
213
diff
changeset
|
246 |
CCommandLineArguments* args = CCommandLineArguments::NewLC(); |
097e92a68d68
Added GLES 1.x spinning cube-rendering code to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
213
diff
changeset
|
247 |
for (TInt i=1; i<args->Count(); ++i) |
193
bbf967b65d9e
Add a bringup test program. Rom build is: buildrom syborg minigui_simulator eglbringuptest.iby The command to run is called ebt. See mmp file for documentation.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff
changeset
|
248 |
{ |
215
097e92a68d68
Added GLES 1.x spinning cube-rendering code to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
213
diff
changeset
|
249 |
const TPtrC arg = args->Arg(i); |
097e92a68d68
Added GLES 1.x spinning cube-rendering code to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
213
diff
changeset
|
250 |
if (!arg.Compare(KOptionScreen)) |
097e92a68d68
Added GLES 1.x spinning cube-rendering code to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
213
diff
changeset
|
251 |
{ |
097e92a68d68
Added GLES 1.x spinning cube-rendering code to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
213
diff
changeset
|
252 |
if (++i < args->Count()) |
097e92a68d68
Added GLES 1.x spinning cube-rendering code to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
213
diff
changeset
|
253 |
{ |
097e92a68d68
Added GLES 1.x spinning cube-rendering code to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
213
diff
changeset
|
254 |
TLex lex(args->Arg(i)); |
097e92a68d68
Added GLES 1.x spinning cube-rendering code to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
213
diff
changeset
|
255 |
User::LeaveIfError(lex.Val(iScrId)); |
097e92a68d68
Added GLES 1.x spinning cube-rendering code to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
213
diff
changeset
|
256 |
RDebug::Printf("[EBT] CWsApp::ConstructL screenId %d", iScrId); |
097e92a68d68
Added GLES 1.x spinning cube-rendering code to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
213
diff
changeset
|
257 |
} |
097e92a68d68
Added GLES 1.x spinning cube-rendering code to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
213
diff
changeset
|
258 |
} |
097e92a68d68
Added GLES 1.x spinning cube-rendering code to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
213
diff
changeset
|
259 |
else if (!rendererName) |
097e92a68d68
Added GLES 1.x spinning cube-rendering code to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
213
diff
changeset
|
260 |
{ |
097e92a68d68
Added GLES 1.x spinning cube-rendering code to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
213
diff
changeset
|
261 |
RDebug::Print(_L("[EBT] CWsApp::ConstructL rendererName %S"), &arg); |
097e92a68d68
Added GLES 1.x spinning cube-rendering code to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
213
diff
changeset
|
262 |
rendererName = HBufC::NewL(arg.Length()); |
097e92a68d68
Added GLES 1.x spinning cube-rendering code to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
213
diff
changeset
|
263 |
rendererName->Des() = arg; |
097e92a68d68
Added GLES 1.x spinning cube-rendering code to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
213
diff
changeset
|
264 |
} |
097e92a68d68
Added GLES 1.x spinning cube-rendering code to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
213
diff
changeset
|
265 |
else |
097e92a68d68
Added GLES 1.x spinning cube-rendering code to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
213
diff
changeset
|
266 |
{ |
097e92a68d68
Added GLES 1.x spinning cube-rendering code to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
213
diff
changeset
|
267 |
RDebug::Print(_L("[EBT] CWsApp::ConstructL ignoring argument %S"), &arg); |
097e92a68d68
Added GLES 1.x spinning cube-rendering code to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
213
diff
changeset
|
268 |
} |
193
bbf967b65d9e
Add a bringup test program. Rom build is: buildrom syborg minigui_simulator eglbringuptest.iby The command to run is called ebt. See mmp file for documentation.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff
changeset
|
269 |
} |
210
da03feddbab7
Cleaned up eglbringuptest code
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
208
diff
changeset
|
270 |
|
215
097e92a68d68
Added GLES 1.x spinning cube-rendering code to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
213
diff
changeset
|
271 |
CleanupStack::PopAndDestroy(args); |
097e92a68d68
Added GLES 1.x spinning cube-rendering code to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
213
diff
changeset
|
272 |
if (rendererName) |
097e92a68d68
Added GLES 1.x spinning cube-rendering code to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
213
diff
changeset
|
273 |
{ |
097e92a68d68
Added GLES 1.x spinning cube-rendering code to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
213
diff
changeset
|
274 |
CleanupStack::PushL(rendererName); |
097e92a68d68
Added GLES 1.x spinning cube-rendering code to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
213
diff
changeset
|
275 |
} |
097e92a68d68
Added GLES 1.x spinning cube-rendering code to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
213
diff
changeset
|
276 |
|
193
bbf967b65d9e
Add a bringup test program. Rom build is: buildrom syborg minigui_simulator eglbringuptest.iby The command to run is called ebt. See mmp file for documentation.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff
changeset
|
277 |
iAppView = CWsCanvas::NewL(iScrId, iPos); |
215
097e92a68d68
Added GLES 1.x spinning cube-rendering code to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
213
diff
changeset
|
278 |
iSz = iAppView->ScreenSize(); |
213
deb2534f581f
Added WSERV event handler to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
211
diff
changeset
|
279 |
iEventHandler = new (ELeave) CWsEventHandler(iAppView->Session(), iAppView->Window(), *this); |
215
097e92a68d68
Added GLES 1.x spinning cube-rendering code to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
213
diff
changeset
|
280 |
|
097e92a68d68
Added GLES 1.x spinning cube-rendering code to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
213
diff
changeset
|
281 |
RendererFactoryFunctionL factoryFunctionL = CVGLine::NewL; |
097e92a68d68
Added GLES 1.x spinning cube-rendering code to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
213
diff
changeset
|
282 |
if (rendererName) |
097e92a68d68
Added GLES 1.x spinning cube-rendering code to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
213
diff
changeset
|
283 |
{ |
097e92a68d68
Added GLES 1.x spinning cube-rendering code to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
213
diff
changeset
|
284 |
if (!rendererName->Des().Compare(CGLES1Cube::Name())) |
097e92a68d68
Added GLES 1.x spinning cube-rendering code to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
213
diff
changeset
|
285 |
{ |
097e92a68d68
Added GLES 1.x spinning cube-rendering code to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
213
diff
changeset
|
286 |
factoryFunctionL = CGLES1Cube::NewL; |
097e92a68d68
Added GLES 1.x spinning cube-rendering code to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
213
diff
changeset
|
287 |
} |
097e92a68d68
Added GLES 1.x spinning cube-rendering code to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
213
diff
changeset
|
288 |
if (!rendererName->Des().Compare(CVGLine::Name())) |
097e92a68d68
Added GLES 1.x spinning cube-rendering code to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
213
diff
changeset
|
289 |
{ |
097e92a68d68
Added GLES 1.x spinning cube-rendering code to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
213
diff
changeset
|
290 |
factoryFunctionL = CVGLine::NewL; |
097e92a68d68
Added GLES 1.x spinning cube-rendering code to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
213
diff
changeset
|
291 |
} |
097e92a68d68
Added GLES 1.x spinning cube-rendering code to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
213
diff
changeset
|
292 |
CleanupStack::PopAndDestroy(rendererName); |
097e92a68d68
Added GLES 1.x spinning cube-rendering code to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
213
diff
changeset
|
293 |
} |
097e92a68d68
Added GLES 1.x spinning cube-rendering code to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
213
diff
changeset
|
294 |
iDemo = (*factoryFunctionL)(iAppView->Window()); |
193
bbf967b65d9e
Add a bringup test program. Rom build is: buildrom syborg minigui_simulator eglbringuptest.iby The command to run is called ebt. See mmp file for documentation.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff
changeset
|
295 |
} |
bbf967b65d9e
Add a bringup test program. Rom build is: buildrom syborg minigui_simulator eglbringuptest.iby The command to run is called ebt. See mmp file for documentation.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff
changeset
|
296 |
|
bbf967b65d9e
Add a bringup test program. Rom build is: buildrom syborg minigui_simulator eglbringuptest.iby The command to run is called ebt. See mmp file for documentation.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff
changeset
|
297 |
void CWsApp::Start() |
bbf967b65d9e
Add a bringup test program. Rom build is: buildrom syborg minigui_simulator eglbringuptest.iby The command to run is called ebt. See mmp file for documentation.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff
changeset
|
298 |
{ |
210
da03feddbab7
Cleaned up eglbringuptest code
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
208
diff
changeset
|
299 |
RDebug::Printf("[EBT] CWsApp::Start"); |
193
bbf967b65d9e
Add a bringup test program. Rom build is: buildrom syborg minigui_simulator eglbringuptest.iby The command to run is called ebt. See mmp file for documentation.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff
changeset
|
300 |
CActiveScheduler::Start(); |
bbf967b65d9e
Add a bringup test program. Rom build is: buildrom syborg minigui_simulator eglbringuptest.iby The command to run is called ebt. See mmp file for documentation.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff
changeset
|
301 |
} |
bbf967b65d9e
Add a bringup test program. Rom build is: buildrom syborg minigui_simulator eglbringuptest.iby The command to run is called ebt. See mmp file for documentation.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff
changeset
|
302 |
|
bbf967b65d9e
Add a bringup test program. Rom build is: buildrom syborg minigui_simulator eglbringuptest.iby The command to run is called ebt. See mmp file for documentation.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff
changeset
|
303 |
void CWsApp::Stop() |
bbf967b65d9e
Add a bringup test program. Rom build is: buildrom syborg minigui_simulator eglbringuptest.iby The command to run is called ebt. See mmp file for documentation.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff
changeset
|
304 |
{ |
210
da03feddbab7
Cleaned up eglbringuptest code
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
208
diff
changeset
|
305 |
RDebug::Printf("[EBT] CWsApp::Stop"); |
da03feddbab7
Cleaned up eglbringuptest code
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
208
diff
changeset
|
306 |
CActiveScheduler::Stop(); |
193
bbf967b65d9e
Add a bringup test program. Rom build is: buildrom syborg minigui_simulator eglbringuptest.iby The command to run is called ebt. See mmp file for documentation.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff
changeset
|
307 |
} |
bbf967b65d9e
Add a bringup test program. Rom build is: buildrom syborg minigui_simulator eglbringuptest.iby The command to run is called ebt. See mmp file for documentation.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff
changeset
|
308 |
|
213
deb2534f581f
Added WSERV event handler to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
211
diff
changeset
|
309 |
void CWsApp::PointerEvent() |
deb2534f581f
Added WSERV event handler to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
211
diff
changeset
|
310 |
{ |
deb2534f581f
Added WSERV event handler to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
211
diff
changeset
|
311 |
RDebug::Printf("[EBT] CWsApp::PointerEvent"); |
deb2534f581f
Added WSERV event handler to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
211
diff
changeset
|
312 |
Stop(); |
deb2534f581f
Added WSERV event handler to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
211
diff
changeset
|
313 |
} |
deb2534f581f
Added WSERV event handler to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
211
diff
changeset
|
314 |
|
193
bbf967b65d9e
Add a bringup test program. Rom build is: buildrom syborg minigui_simulator eglbringuptest.iby The command to run is called ebt. See mmp file for documentation.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff
changeset
|
315 |
CWsApp::~CWsApp() |
210
da03feddbab7
Cleaned up eglbringuptest code
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
208
diff
changeset
|
316 |
{ |
193
bbf967b65d9e
Add a bringup test program. Rom build is: buildrom syborg minigui_simulator eglbringuptest.iby The command to run is called ebt. See mmp file for documentation.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff
changeset
|
317 |
delete iDemo; |
213
deb2534f581f
Added WSERV event handler to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
211
diff
changeset
|
318 |
delete iEventHandler; |
193
bbf967b65d9e
Add a bringup test program. Rom build is: buildrom syborg minigui_simulator eglbringuptest.iby The command to run is called ebt. See mmp file for documentation.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff
changeset
|
319 |
delete iAppView; |
bbf967b65d9e
Add a bringup test program. Rom build is: buildrom syborg minigui_simulator eglbringuptest.iby The command to run is called ebt. See mmp file for documentation.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff
changeset
|
320 |
} |
bbf967b65d9e
Add a bringup test program. Rom build is: buildrom syborg minigui_simulator eglbringuptest.iby The command to run is called ebt. See mmp file for documentation.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff
changeset
|
321 |
|
bbf967b65d9e
Add a bringup test program. Rom build is: buildrom syborg minigui_simulator eglbringuptest.iby The command to run is called ebt. See mmp file for documentation.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff
changeset
|
322 |
/** |
bbf967b65d9e
Add a bringup test program. Rom build is: buildrom syborg minigui_simulator eglbringuptest.iby The command to run is called ebt. See mmp file for documentation.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff
changeset
|
323 |
* Application second level entry point. |
210
da03feddbab7
Cleaned up eglbringuptest code
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
208
diff
changeset
|
324 |
* |
193
bbf967b65d9e
Add a bringup test program. Rom build is: buildrom syborg minigui_simulator eglbringuptest.iby The command to run is called ebt. See mmp file for documentation.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff
changeset
|
325 |
* Launches the application specific class CWsApp and calls Start() on it. |
210
da03feddbab7
Cleaned up eglbringuptest code
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
208
diff
changeset
|
326 |
* |
193
bbf967b65d9e
Add a bringup test program. Rom build is: buildrom syborg minigui_simulator eglbringuptest.iby The command to run is called ebt. See mmp file for documentation.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff
changeset
|
327 |
* @pre Active scheduler established. |
bbf967b65d9e
Add a bringup test program. Rom build is: buildrom syborg minigui_simulator eglbringuptest.iby The command to run is called ebt. See mmp file for documentation.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff
changeset
|
328 |
*/ |
bbf967b65d9e
Add a bringup test program. Rom build is: buildrom syborg minigui_simulator eglbringuptest.iby The command to run is called ebt. See mmp file for documentation.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff
changeset
|
329 |
void MainL() |
bbf967b65d9e
Add a bringup test program. Rom build is: buildrom syborg minigui_simulator eglbringuptest.iby The command to run is called ebt. See mmp file for documentation.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff
changeset
|
330 |
{ |
210
da03feddbab7
Cleaned up eglbringuptest code
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
208
diff
changeset
|
331 |
RDebug::Printf("[EBT] ::MainL"); |
193
bbf967b65d9e
Add a bringup test program. Rom build is: buildrom syborg minigui_simulator eglbringuptest.iby The command to run is called ebt. See mmp file for documentation.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff
changeset
|
332 |
CWsApp* app = CWsApp::NewL(); |
bbf967b65d9e
Add a bringup test program. Rom build is: buildrom syborg minigui_simulator eglbringuptest.iby The command to run is called ebt. See mmp file for documentation.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff
changeset
|
333 |
CleanupStack::PushL(app); |
bbf967b65d9e
Add a bringup test program. Rom build is: buildrom syborg minigui_simulator eglbringuptest.iby The command to run is called ebt. See mmp file for documentation.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff
changeset
|
334 |
app->Start(); |
bbf967b65d9e
Add a bringup test program. Rom build is: buildrom syborg minigui_simulator eglbringuptest.iby The command to run is called ebt. See mmp file for documentation.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff
changeset
|
335 |
CleanupStack::PopAndDestroy(1, app); |
bbf967b65d9e
Add a bringup test program. Rom build is: buildrom syborg minigui_simulator eglbringuptest.iby The command to run is called ebt. See mmp file for documentation.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff
changeset
|
336 |
} |
bbf967b65d9e
Add a bringup test program. Rom build is: buildrom syborg minigui_simulator eglbringuptest.iby The command to run is called ebt. See mmp file for documentation.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff
changeset
|
337 |
|
bbf967b65d9e
Add a bringup test program. Rom build is: buildrom syborg minigui_simulator eglbringuptest.iby The command to run is called ebt. See mmp file for documentation.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff
changeset
|
338 |
/** |
bbf967b65d9e
Add a bringup test program. Rom build is: buildrom syborg minigui_simulator eglbringuptest.iby The command to run is called ebt. See mmp file for documentation.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff
changeset
|
339 |
* Application entry point. |
210
da03feddbab7
Cleaned up eglbringuptest code
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
208
diff
changeset
|
340 |
* |
193
bbf967b65d9e
Add a bringup test program. Rom build is: buildrom syborg minigui_simulator eglbringuptest.iby The command to run is called ebt. See mmp file for documentation.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff
changeset
|
341 |
* This sets up the application environment active scheduler and runs MainL under a trap |
bbf967b65d9e
Add a bringup test program. Rom build is: buildrom syborg minigui_simulator eglbringuptest.iby The command to run is called ebt. See mmp file for documentation.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff
changeset
|
342 |
* harness. |
bbf967b65d9e
Add a bringup test program. Rom build is: buildrom syborg minigui_simulator eglbringuptest.iby The command to run is called ebt. See mmp file for documentation.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff
changeset
|
343 |
*/ |
bbf967b65d9e
Add a bringup test program. Rom build is: buildrom syborg minigui_simulator eglbringuptest.iby The command to run is called ebt. See mmp file for documentation.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff
changeset
|
344 |
GLDEF_C TInt E32Main() |
bbf967b65d9e
Add a bringup test program. Rom build is: buildrom syborg minigui_simulator eglbringuptest.iby The command to run is called ebt. See mmp file for documentation.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff
changeset
|
345 |
{ |
210
da03feddbab7
Cleaned up eglbringuptest code
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
208
diff
changeset
|
346 |
RDebug::Printf("[EBT] ::E32Main"); |
193
bbf967b65d9e
Add a bringup test program. Rom build is: buildrom syborg minigui_simulator eglbringuptest.iby The command to run is called ebt. See mmp file for documentation.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff
changeset
|
347 |
|
bbf967b65d9e
Add a bringup test program. Rom build is: buildrom syborg minigui_simulator eglbringuptest.iby The command to run is called ebt. See mmp file for documentation.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff
changeset
|
348 |
CTrapCleanup* tc = CTrapCleanup::New(); |
bbf967b65d9e
Add a bringup test program. Rom build is: buildrom syborg minigui_simulator eglbringuptest.iby The command to run is called ebt. See mmp file for documentation.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff
changeset
|
349 |
if (!tc) |
bbf967b65d9e
Add a bringup test program. Rom build is: buildrom syborg minigui_simulator eglbringuptest.iby The command to run is called ebt. See mmp file for documentation.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff
changeset
|
350 |
{ |
bbf967b65d9e
Add a bringup test program. Rom build is: buildrom syborg minigui_simulator eglbringuptest.iby The command to run is called ebt. See mmp file for documentation.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff
changeset
|
351 |
return KErrNoMemory; |
bbf967b65d9e
Add a bringup test program. Rom build is: buildrom syborg minigui_simulator eglbringuptest.iby The command to run is called ebt. See mmp file for documentation.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff
changeset
|
352 |
} |
bbf967b65d9e
Add a bringup test program. Rom build is: buildrom syborg minigui_simulator eglbringuptest.iby The command to run is called ebt. See mmp file for documentation.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff
changeset
|
353 |
|
bbf967b65d9e
Add a bringup test program. Rom build is: buildrom syborg minigui_simulator eglbringuptest.iby The command to run is called ebt. See mmp file for documentation.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff
changeset
|
354 |
CActiveScheduler* as = new CActiveScheduler; |
bbf967b65d9e
Add a bringup test program. Rom build is: buildrom syborg minigui_simulator eglbringuptest.iby The command to run is called ebt. See mmp file for documentation.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff
changeset
|
355 |
if (!as) |
bbf967b65d9e
Add a bringup test program. Rom build is: buildrom syborg minigui_simulator eglbringuptest.iby The command to run is called ebt. See mmp file for documentation.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff
changeset
|
356 |
{ |
bbf967b65d9e
Add a bringup test program. Rom build is: buildrom syborg minigui_simulator eglbringuptest.iby The command to run is called ebt. See mmp file for documentation.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff
changeset
|
357 |
delete tc; |
bbf967b65d9e
Add a bringup test program. Rom build is: buildrom syborg minigui_simulator eglbringuptest.iby The command to run is called ebt. See mmp file for documentation.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff
changeset
|
358 |
return KErrNoMemory; |
bbf967b65d9e
Add a bringup test program. Rom build is: buildrom syborg minigui_simulator eglbringuptest.iby The command to run is called ebt. See mmp file for documentation.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff
changeset
|
359 |
} |
bbf967b65d9e
Add a bringup test program. Rom build is: buildrom syborg minigui_simulator eglbringuptest.iby The command to run is called ebt. See mmp file for documentation.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff
changeset
|
360 |
|
bbf967b65d9e
Add a bringup test program. Rom build is: buildrom syborg minigui_simulator eglbringuptest.iby The command to run is called ebt. See mmp file for documentation.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff
changeset
|
361 |
CActiveScheduler::Install(as); |
bbf967b65d9e
Add a bringup test program. Rom build is: buildrom syborg minigui_simulator eglbringuptest.iby The command to run is called ebt. See mmp file for documentation.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff
changeset
|
362 |
TRAPD(err, MainL()); |
210
da03feddbab7
Cleaned up eglbringuptest code
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
208
diff
changeset
|
363 |
|
193
bbf967b65d9e
Add a bringup test program. Rom build is: buildrom syborg minigui_simulator eglbringuptest.iby The command to run is called ebt. See mmp file for documentation.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff
changeset
|
364 |
delete as; |
bbf967b65d9e
Add a bringup test program. Rom build is: buildrom syborg minigui_simulator eglbringuptest.iby The command to run is called ebt. See mmp file for documentation.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff
changeset
|
365 |
delete tc; |
bbf967b65d9e
Add a bringup test program. Rom build is: buildrom syborg minigui_simulator eglbringuptest.iby The command to run is called ebt. See mmp file for documentation.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff
changeset
|
366 |
return err; |
bbf967b65d9e
Add a bringup test program. Rom build is: buildrom syborg minigui_simulator eglbringuptest.iby The command to run is called ebt. See mmp file for documentation.
Faisal Memon <faisal.memon@nokia.com>
parents:
diff
changeset
|
367 |
} |
210
da03feddbab7
Cleaned up eglbringuptest code
Gareth Stockwell <gareth.stockwell@accenture.com>
parents:
208
diff
changeset
|
368 |