diff -r f5050f1da672 -r 04becd199f91 javauis/lcdui_akn/lcdui/src/CMIDApplication.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/javauis/lcdui_akn/lcdui/src/CMIDApplication.cpp Tue Apr 27 16:30:29 2010 +0300 @@ -0,0 +1,49 @@ +/* +* Copyright (c) 2003-2006 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: ?Description +* +*/ + + +#include +#include + +#include "CMIDAppUi.h" +// using GetResourceFileName function + +#include "coreuiavkonlcdui.h" + +_LIT(KLcduiResourceFileName, "lcdui.rsc"); + +void doCreateAppL() +{ + CMIDAppUi* appui = new(ELeave) CMIDAppUi(); + appui->ConstructL(); + CCoeEnv* env = CCoeEnv::Static(); + + TFileName fileName; + fileName.Append(KLcduiResourceFileName); + fileName = java::util::S60CommonUtils::ResourceLanguageFileNameL(fileName); + + int offset = 0; + TRAP_IGNORE(offset = env->AddResourceFileL(fileName)); + // The CoreUi owns now the appui. + java::ui::CoreUiAvkonLcdui::getInstance().getJavaUiAppUi()->setLcduiChild(appui, offset); +} + +EXPORT_C int createApp() +{ + TRAPD(err, doCreateAppL()); + return err; +}