sl@0: // Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: // All rights reserved. sl@0: // This component and the accompanying materials are made available sl@0: // under the terms of "Eclipse Public License v1.0" sl@0: // which accompanies this distribution, and is available sl@0: // at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: // sl@0: // Initial Contributors: sl@0: // Nokia Corporation - initial contribution. sl@0: // sl@0: // Contributors: sl@0: // sl@0: // Description: sl@0: // sl@0: sl@0: #include "swdirectgdidriverimpl.h" sl@0: #include sl@0: sl@0: /** sl@0: Creates an object of the derived class i.e. CDirectGdiDriverImpl sl@0: sl@0: @param aInternal A reference to a CDirectGdiDriverInternal pointer. sl@0: @param aLibrary A handle to the adapter library. Only used on WINS. sl@0: sl@0: @pre CDirectGdiDriver object has been initialised from the calling thread. sl@0: @post Instance of CDirectGdiDriverImpl has been created. sl@0: sl@0: @return KErrNone if successful, KErrNoMemory if not enough memory could be allocated. sl@0: */ sl@0: EXPORT_C TInt CDirectGdiDriverInternal::New(CDirectGdiDriverInternal*& aInternal, RLibrary aLibrary) sl@0: { sl@0: CDirectGdiDriverInternal* internalDriver = new CSwDirectGdiDriverImpl(aLibrary); sl@0: if(!internalDriver) sl@0: return KErrNoMemory; sl@0: sl@0: aInternal = internalDriver; sl@0: return KErrNone; sl@0: }