egl/sfegltest/src/main.cpp
author Gareth Stockwell <gareth.stockwell@accenture.com>
Fri, 05 Nov 2010 13:02:33 +0000
branchbug235_bringup_0
changeset 213 deb2534f581f
parent 211 3804ba25b23f
child 215 097e92a68d68
permissions -rw-r--r--
Added WSERV event handler to eglbringuptest This change adds an active object which listens for WSERV events on the application view window. A pointer event causes the application to be terminated. This change means that the timer which was previously used to end execution after a preset duration has been removed.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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>
211
3804ba25b23f Refactored eglbringuptest to separate EGL and VG code
Gareth Stockwell <gareth.stockwell@accenture.com>
parents: 210
diff changeset
    19
#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
    20
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
    21
#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
    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
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
    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
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
    26
	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
    27
	~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
    28
210
da03feddbab7 Cleaned up eglbringuptest code
Gareth Stockwell <gareth.stockwell@accenture.com>
parents: 208
diff changeset
    29
	RWsSession& Session() { return iWs; }
da03feddbab7 Cleaned up eglbringuptest code
Gareth Stockwell <gareth.stockwell@accenture.com>
parents: 208
diff changeset
    30
	RWindow& Window() { return iWin; }
da03feddbab7 Cleaned up eglbringuptest code
Gareth Stockwell <gareth.stockwell@accenture.com>
parents: 208
diff changeset
    31
    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
    32
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
    33
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
    34
	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
    35
	void ConstructL();
210
da03feddbab7 Cleaned up eglbringuptest code
Gareth Stockwell <gareth.stockwell@accenture.com>
parents: 208
diff changeset
    36
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
    37
private:
210
da03feddbab7 Cleaned up eglbringuptest code
Gareth Stockwell <gareth.stockwell@accenture.com>
parents: 208
diff changeset
    38
    const TInt iScrId;
da03feddbab7 Cleaned up eglbringuptest code
Gareth Stockwell <gareth.stockwell@accenture.com>
parents: 208
diff changeset
    39
	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
    40
	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
    41
	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
    42
	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
    43
	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
    44
	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
    45
	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
    46
};
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
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
 * Create a canvas to draw to.
210
da03feddbab7 Cleaned up eglbringuptest code
Gareth Stockwell <gareth.stockwell@accenture.com>
parents: 208
diff changeset
    50
 *
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
    51
 * @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
    52
 * @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
    53
 */
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
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
    55
	{
210
da03feddbab7 Cleaned up eglbringuptest code
Gareth Stockwell <gareth.stockwell@accenture.com>
parents: 208
diff changeset
    56
	CWsCanvas* self = new (ELeave) CWsCanvas(aScrId, aPos);
da03feddbab7 Cleaned up eglbringuptest code
Gareth Stockwell <gareth.stockwell@accenture.com>
parents: 208
diff changeset
    57
	CleanupStack::PushL(self);
da03feddbab7 Cleaned up eglbringuptest code
Gareth Stockwell <gareth.stockwell@accenture.com>
parents: 208
diff changeset
    58
	self->ConstructL();
da03feddbab7 Cleaned up eglbringuptest code
Gareth Stockwell <gareth.stockwell@accenture.com>
parents: 208
diff changeset
    59
	CleanupStack::Pop(self);
da03feddbab7 Cleaned up eglbringuptest code
Gareth Stockwell <gareth.stockwell@accenture.com>
parents: 208
diff changeset
    60
	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
    61
	}
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
    62
210
da03feddbab7 Cleaned up eglbringuptest code
Gareth Stockwell <gareth.stockwell@accenture.com>
parents: 208
diff changeset
    63
CWsCanvas::CWsCanvas(TInt aScrId, const TPoint& aPos)
da03feddbab7 Cleaned up eglbringuptest code
Gareth Stockwell <gareth.stockwell@accenture.com>
parents: 208
diff changeset
    64
    :   iScrId(aScrId)
da03feddbab7 Cleaned up eglbringuptest code
Gareth Stockwell <gareth.stockwell@accenture.com>
parents: 208
diff changeset
    65
    ,   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
    66
	{
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
    67
	}
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
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
    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
	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
    72
	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
    73
	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
    74
	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
    75
	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
    76
	}
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
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
 * Construct the application canvas.
210
da03feddbab7 Cleaned up eglbringuptest code
Gareth Stockwell <gareth.stockwell@accenture.com>
parents: 208
diff changeset
    80
 *
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
    81
 * 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
    82
 * 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
    83
 * 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
    84
 */
210
da03feddbab7 Cleaned up eglbringuptest code
Gareth Stockwell <gareth.stockwell@accenture.com>
parents: 208
diff changeset
    85
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
    86
	{
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
    87
	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
    88
	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
    89
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
	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
    91
	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
    92
	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
    93
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
	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
    95
	User::LeaveIfError(err);
210
da03feddbab7 Cleaned up eglbringuptest code
Gareth Stockwell <gareth.stockwell@accenture.com>
parents: 208
diff changeset
    96
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
    97
	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
    98
	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
    99
	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
   100
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
	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
   102
	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
   103
	User::LeaveIfError(err);
210
da03feddbab7 Cleaned up eglbringuptest code
Gareth Stockwell <gareth.stockwell@accenture.com>
parents: 208
diff changeset
   104
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
   105
	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
   106
	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
   107
	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
   108
	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
   109
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
	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
   111
210
da03feddbab7 Cleaned up eglbringuptest code
Gareth Stockwell <gareth.stockwell@accenture.com>
parents: 208
diff changeset
   112
	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
   113
	}
213
deb2534f581f Added WSERV event handler to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents: 211
diff changeset
   114
deb2534f581f Added WSERV event handler to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents: 211
diff changeset
   115
class MWsEventObserver
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
public:
deb2534f581f Added WSERV event handler to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents: 211
diff changeset
   118
    virtual void PointerEvent() = 0;
deb2534f581f Added WSERV event handler to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents: 211
diff changeset
   119
    };
deb2534f581f Added WSERV event handler to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents: 211
diff changeset
   120
deb2534f581f Added WSERV event handler to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents: 211
diff changeset
   121
class CWsEventHandler : public CActive
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
public:
deb2534f581f Added WSERV event handler to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents: 211
diff changeset
   124
    CWsEventHandler(RWsSession& aSession, RWindow& aWindow, MWsEventObserver& aObserver);
deb2534f581f Added WSERV event handler to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents: 211
diff changeset
   125
    ~CWsEventHandler();
deb2534f581f Added WSERV event handler to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents: 211
diff changeset
   126
private:
deb2534f581f Added WSERV event handler to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents: 211
diff changeset
   127
    void ConstructL();
deb2534f581f Added WSERV event handler to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents: 211
diff changeset
   128
    void RequestEvent();
deb2534f581f Added WSERV event handler to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents: 211
diff changeset
   129
    void RunL();
deb2534f581f Added WSERV event handler to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents: 211
diff changeset
   130
    void DoCancel();
deb2534f581f Added WSERV event handler to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents: 211
diff changeset
   131
private:
deb2534f581f Added WSERV event handler to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents: 211
diff changeset
   132
    RWsSession& iSession;
deb2534f581f Added WSERV event handler to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents: 211
diff changeset
   133
    RWindow& iWindow;
deb2534f581f Added WSERV event handler to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents: 211
diff changeset
   134
    MWsEventObserver& iObserver;
deb2534f581f Added WSERV event handler to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents: 211
diff changeset
   135
    };
deb2534f581f Added WSERV event handler to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents: 211
diff changeset
   136
deb2534f581f Added WSERV event handler to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents: 211
diff changeset
   137
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
   138
    :   CActive(CActive::EPriorityStandard)
deb2534f581f Added WSERV event handler to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents: 211
diff changeset
   139
    ,   iSession(aSession)
deb2534f581f Added WSERV event handler to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents: 211
diff changeset
   140
    ,   iWindow(aWindow)
deb2534f581f Added WSERV event handler to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents: 211
diff changeset
   141
    ,   iObserver(aObserver)
deb2534f581f Added WSERV event handler to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents: 211
diff changeset
   142
    {
deb2534f581f Added WSERV event handler to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents: 211
diff changeset
   143
    RDebug::Printf("[EBT] CWsEventHandler::CWsEventHandler");
deb2534f581f Added WSERV event handler to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents: 211
diff changeset
   144
    CActiveScheduler::Add(this);
deb2534f581f Added WSERV event handler to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents: 211
diff changeset
   145
    RequestEvent();
deb2534f581f Added WSERV event handler to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents: 211
diff changeset
   146
    }
deb2534f581f Added WSERV event handler to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents: 211
diff changeset
   147
deb2534f581f Added WSERV event handler to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents: 211
diff changeset
   148
CWsEventHandler::~CWsEventHandler()
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
    RDebug::Printf("[EBT] CWsEventHandler::~CWsEventHandler");
deb2534f581f Added WSERV event handler to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents: 211
diff changeset
   151
    Cancel();
deb2534f581f Added WSERV event handler to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents: 211
diff changeset
   152
    }
deb2534f581f Added WSERV event handler to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents: 211
diff changeset
   153
deb2534f581f Added WSERV event handler to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents: 211
diff changeset
   154
void CWsEventHandler::ConstructL()
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
    CActiveScheduler::Add(this);
deb2534f581f Added WSERV event handler to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents: 211
diff changeset
   157
    RequestEvent();
deb2534f581f Added WSERV event handler to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents: 211
diff changeset
   158
    }
deb2534f581f Added WSERV event handler to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents: 211
diff changeset
   159
deb2534f581f Added WSERV event handler to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents: 211
diff changeset
   160
void CWsEventHandler::RequestEvent()
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
    iStatus = KRequestPending;
deb2534f581f Added WSERV event handler to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents: 211
diff changeset
   163
    iSession.EventReady(&iStatus);
deb2534f581f Added WSERV event handler to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents: 211
diff changeset
   164
    SetActive();
deb2534f581f Added WSERV event handler to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents: 211
diff changeset
   165
    }
deb2534f581f Added WSERV event handler to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents: 211
diff changeset
   166
deb2534f581f Added WSERV event handler to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents: 211
diff changeset
   167
void CWsEventHandler::RunL()
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
    if (KErrNone == iStatus.Int())
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
        TWsEvent event;
deb2534f581f Added WSERV event handler to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents: 211
diff changeset
   172
        iSession.GetEvent(event);
deb2534f581f Added WSERV event handler to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents: 211
diff changeset
   173
        RequestEvent();
deb2534f581f Added WSERV event handler to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents: 211
diff changeset
   174
        switch (event.Type())
deb2534f581f Added WSERV event handler to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents: 211
diff changeset
   175
            {
deb2534f581f Added WSERV event handler to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents: 211
diff changeset
   176
            case EEventPointer:
deb2534f581f Added WSERV event handler to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents: 211
diff changeset
   177
                iObserver.PointerEvent();
deb2534f581f Added WSERV event handler to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents: 211
diff changeset
   178
                break;
deb2534f581f Added WSERV event handler to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents: 211
diff changeset
   179
            }
deb2534f581f Added WSERV event handler to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents: 211
diff changeset
   180
        }
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
void CWsEventHandler::DoCancel()
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
    iSession.EventReadyCancel();
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
210
da03feddbab7 Cleaned up eglbringuptest code
Gareth Stockwell <gareth.stockwell@accenture.com>
parents: 208
diff changeset
   188
class CWsApp : public CBase
213
deb2534f581f Added WSERV event handler to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents: 211
diff changeset
   189
             , public MWsEventObserver
210
da03feddbab7 Cleaned up eglbringuptest code
Gareth Stockwell <gareth.stockwell@accenture.com>
parents: 208
diff changeset
   190
    {
da03feddbab7 Cleaned up eglbringuptest code
Gareth Stockwell <gareth.stockwell@accenture.com>
parents: 208
diff changeset
   191
public:
da03feddbab7 Cleaned up eglbringuptest code
Gareth Stockwell <gareth.stockwell@accenture.com>
parents: 208
diff changeset
   192
    static CWsApp* NewL();
da03feddbab7 Cleaned up eglbringuptest code
Gareth Stockwell <gareth.stockwell@accenture.com>
parents: 208
diff changeset
   193
    ~CWsApp();
da03feddbab7 Cleaned up eglbringuptest code
Gareth Stockwell <gareth.stockwell@accenture.com>
parents: 208
diff changeset
   194
    void Start();
da03feddbab7 Cleaned up eglbringuptest code
Gareth Stockwell <gareth.stockwell@accenture.com>
parents: 208
diff changeset
   195
    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
   196
213
deb2534f581f Added WSERV event handler to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents: 211
diff changeset
   197
    // MWsEventObserver
deb2534f581f Added WSERV event handler to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents: 211
diff changeset
   198
    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
   199
210
da03feddbab7 Cleaned up eglbringuptest code
Gareth Stockwell <gareth.stockwell@accenture.com>
parents: 208
diff changeset
   200
private:
da03feddbab7 Cleaned up eglbringuptest code
Gareth Stockwell <gareth.stockwell@accenture.com>
parents: 208
diff changeset
   201
    CWsApp();
da03feddbab7 Cleaned up eglbringuptest code
Gareth Stockwell <gareth.stockwell@accenture.com>
parents: 208
diff changeset
   202
    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
   203
210
da03feddbab7 Cleaned up eglbringuptest code
Gareth Stockwell <gareth.stockwell@accenture.com>
parents: 208
diff changeset
   204
private:
da03feddbab7 Cleaned up eglbringuptest code
Gareth Stockwell <gareth.stockwell@accenture.com>
parents: 208
diff changeset
   205
    CWsCanvas* iAppView;
213
deb2534f581f Added WSERV event handler to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents: 211
diff changeset
   206
    CWsEventHandler* iEventHandler;
210
da03feddbab7 Cleaned up eglbringuptest code
Gareth Stockwell <gareth.stockwell@accenture.com>
parents: 208
diff changeset
   207
    CEGLRendering* iDemo;
da03feddbab7 Cleaned up eglbringuptest code
Gareth Stockwell <gareth.stockwell@accenture.com>
parents: 208
diff changeset
   208
    TPoint iPos;
da03feddbab7 Cleaned up eglbringuptest code
Gareth Stockwell <gareth.stockwell@accenture.com>
parents: 208
diff changeset
   209
    TSize iSz;
da03feddbab7 Cleaned up eglbringuptest code
Gareth Stockwell <gareth.stockwell@accenture.com>
parents: 208
diff changeset
   210
    TInt iScrId;
da03feddbab7 Cleaned up eglbringuptest code
Gareth Stockwell <gareth.stockwell@accenture.com>
parents: 208
diff changeset
   211
    };
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
   212
210
da03feddbab7 Cleaned up eglbringuptest code
Gareth Stockwell <gareth.stockwell@accenture.com>
parents: 208
diff changeset
   213
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
   214
	{
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
   215
	}
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
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
   218
	{
210
da03feddbab7 Cleaned up eglbringuptest code
Gareth Stockwell <gareth.stockwell@accenture.com>
parents: 208
diff changeset
   219
	RDebug::Printf("[EBT] CWsApp::NewL");
da03feddbab7 Cleaned up eglbringuptest code
Gareth Stockwell <gareth.stockwell@accenture.com>
parents: 208
diff changeset
   220
	CWsApp* self = new (ELeave) CWsApp;
da03feddbab7 Cleaned up eglbringuptest code
Gareth Stockwell <gareth.stockwell@accenture.com>
parents: 208
diff changeset
   221
	CleanupStack::PushL(self);
da03feddbab7 Cleaned up eglbringuptest code
Gareth Stockwell <gareth.stockwell@accenture.com>
parents: 208
diff changeset
   222
	self->ConstructL();
da03feddbab7 Cleaned up eglbringuptest code
Gareth Stockwell <gareth.stockwell@accenture.com>
parents: 208
diff changeset
   223
	CleanupStack::Pop(self);
da03feddbab7 Cleaned up eglbringuptest code
Gareth Stockwell <gareth.stockwell@accenture.com>
parents: 208
diff changeset
   224
	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
   225
	}
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
   226
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
 * Constructor for CWsApp
210
da03feddbab7 Cleaned up eglbringuptest code
Gareth Stockwell <gareth.stockwell@accenture.com>
parents: 208
diff changeset
   229
 *
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
   230
 * @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
   231
 *		 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
   232
 *		 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
   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
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
   235
    {
210
da03feddbab7 Cleaned up eglbringuptest code
Gareth Stockwell <gareth.stockwell@accenture.com>
parents: 208
diff changeset
   236
	RDebug::Printf("[EBT] CWsApp::ConstructL");
da03feddbab7 Cleaned up eglbringuptest code
Gareth Stockwell <gareth.stockwell@accenture.com>
parents: 208
diff changeset
   237
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
   238
	iScrId = KDefaultScreenNo;
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
	if (User::CommandLineLength() > 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
   240
		{
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
		TBuf<1> arg;
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
   242
		User::CommandLine(arg);
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
   243
		iScrId = (TInt)(arg[0]-'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
   244
		}
210
da03feddbab7 Cleaned up eglbringuptest code
Gareth Stockwell <gareth.stockwell@accenture.com>
parents: 208
diff changeset
   245
da03feddbab7 Cleaned up eglbringuptest code
Gareth Stockwell <gareth.stockwell@accenture.com>
parents: 208
diff changeset
   246
	RDebug::Printf("[EBT] CWsApp::ConstructL 1");
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
   247
	iAppView = CWsCanvas::NewL(iScrId, iPos);
210
da03feddbab7 Cleaned up eglbringuptest code
Gareth Stockwell <gareth.stockwell@accenture.com>
parents: 208
diff changeset
   248
	RDebug::Printf("[EBT] CWsApp::ConstructL 2");
213
deb2534f581f Added WSERV event handler to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents: 211
diff changeset
   249
	iEventHandler = new (ELeave) CWsEventHandler(iAppView->Session(), iAppView->Window(), *this);
210
da03feddbab7 Cleaned up eglbringuptest code
Gareth Stockwell <gareth.stockwell@accenture.com>
parents: 208
diff changeset
   250
	RDebug::Printf("[EBT] CWsApp::ConstructL 3");
213
deb2534f581f Added WSERV event handler to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents: 211
diff changeset
   251
	iDemo = CVGLine::NewL(iAppView->Window());
deb2534f581f Added WSERV event handler to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents: 211
diff changeset
   252
	RDebug::Printf("[EBT] CWsApp::ConstructL 4");
211
3804ba25b23f Refactored eglbringuptest to separate EGL and VG code
Gareth Stockwell <gareth.stockwell@accenture.com>
parents: 210
diff changeset
   253
	iSz = iAppView->ScreenSize();
213
deb2534f581f Added WSERV event handler to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents: 211
diff changeset
   254
	RDebug::Printf("[EBT] CWsApp::ConstructL 5");
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
   255
	}
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
   256
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
   257
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
   258
	{
210
da03feddbab7 Cleaned up eglbringuptest code
Gareth Stockwell <gareth.stockwell@accenture.com>
parents: 208
diff changeset
   259
	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
   260
	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
   261
	}
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
   262
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
   263
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
   264
	{
210
da03feddbab7 Cleaned up eglbringuptest code
Gareth Stockwell <gareth.stockwell@accenture.com>
parents: 208
diff changeset
   265
    RDebug::Printf("[EBT] CWsApp::Stop");
da03feddbab7 Cleaned up eglbringuptest code
Gareth Stockwell <gareth.stockwell@accenture.com>
parents: 208
diff changeset
   266
    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
   267
	}
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
   268
213
deb2534f581f Added WSERV event handler to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents: 211
diff changeset
   269
void CWsApp::PointerEvent()
deb2534f581f Added WSERV event handler to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents: 211
diff changeset
   270
    {
deb2534f581f Added WSERV event handler to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents: 211
diff changeset
   271
    RDebug::Printf("[EBT] CWsApp::PointerEvent");
deb2534f581f Added WSERV event handler to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents: 211
diff changeset
   272
    Stop();
deb2534f581f Added WSERV event handler to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents: 211
diff changeset
   273
    }
deb2534f581f Added WSERV event handler to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents: 211
diff changeset
   274
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
   275
CWsApp::~CWsApp()
210
da03feddbab7 Cleaned up eglbringuptest code
Gareth Stockwell <gareth.stockwell@accenture.com>
parents: 208
diff changeset
   276
	{
da03feddbab7 Cleaned up eglbringuptest code
Gareth Stockwell <gareth.stockwell@accenture.com>
parents: 208
diff changeset
   277
    RDebug::Printf("[EBT] 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
   278
	delete iDemo;
213
deb2534f581f Added WSERV event handler to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents: 211
diff changeset
   279
	RDebug::Printf("[EBT] CWsApp::~CWsApp 1");
deb2534f581f Added WSERV event handler to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents: 211
diff changeset
   280
	delete iEventHandler;
deb2534f581f Added WSERV event handler to eglbringuptest
Gareth Stockwell <gareth.stockwell@accenture.com>
parents: 211
diff changeset
   281
    RDebug::Printf("[EBT] CWsApp::~CWsApp 2");
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
   282
	delete iAppView;
210
da03feddbab7 Cleaned up eglbringuptest code
Gareth Stockwell <gareth.stockwell@accenture.com>
parents: 208
diff changeset
   283
    RDebug::Printf("[EBT] CWsApp::~CWsApp 3");
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
   284
	}
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
   285
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
   286
/**
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
   287
 * Application second level entry point.
210
da03feddbab7 Cleaned up eglbringuptest code
Gareth Stockwell <gareth.stockwell@accenture.com>
parents: 208
diff changeset
   288
 *
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
   289
 * 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
   290
 *
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
   291
 * @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
   292
 */
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
   293
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
   294
	{
210
da03feddbab7 Cleaned up eglbringuptest code
Gareth Stockwell <gareth.stockwell@accenture.com>
parents: 208
diff changeset
   295
	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
   296
	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
   297
	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
   298
    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
   299
	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
   300
	}
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
 * Application entry point.
210
da03feddbab7 Cleaned up eglbringuptest code
Gareth Stockwell <gareth.stockwell@accenture.com>
parents: 208
diff changeset
   304
 *
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
   305
 * 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
   306
 * 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
   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
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
   309
    {
210
da03feddbab7 Cleaned up eglbringuptest code
Gareth Stockwell <gareth.stockwell@accenture.com>
parents: 208
diff changeset
   310
	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
   311
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
   312
	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
   313
	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
   314
		{
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
		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
   316
		}
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
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
   318
	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
   319
	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
   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
		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
   322
		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
   323
		}
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
   324
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
	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
   326
	TRAPD(err, MainL());
210
da03feddbab7 Cleaned up eglbringuptest code
Gareth Stockwell <gareth.stockwell@accenture.com>
parents: 208
diff changeset
   327
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
   328
	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
   329
	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
   330
	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
   331
    }
210
da03feddbab7 Cleaned up eglbringuptest code
Gareth Stockwell <gareth.stockwell@accenture.com>
parents: 208
diff changeset
   332