os/graphics/windowing/windowserver/graphicsresourcewrapper/graphicsresourcewrapper.cpp
author sl@SLION-WIN7.fritz.box
Fri, 15 Jun 2012 03:10:57 +0200
changeset 0 bde4ae8d615e
permissions -rw-r--r--
First public contribution.
     1 // Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
     2 // All rights reserved.
     3 // This component and the accompanying materials are made available
     4 // under the terms of "Eclipse Public License v1.0"
     5 // which accompanies this distribution, and is available
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 //
     8 // Initial Contributors:
     9 // Nokia Corporation - initial contribution.
    10 //
    11 // Contributors:
    12 //
    13 // Description:
    14 //
    15 
    16 #include "graphicsresourcewrapper.h"
    17 
    18 class CGraphicsResourceWrapperImpl : public CGraphicsResourceWrapper
    19 	{
    20 public:
    21 	IMPORT_C static CGraphicsResourceWrapper* New();
    22 
    23 	RSgDrawable* NewDrawableL();
    24 	TInt Open(RSgDrawable& aDrawable, const TSgDrawableId& aDrawableId);
    25 	void Close(RSgDrawable& aDrawable);
    26 	TBool IsNull(const RSgDrawable& aDrawable);
    27 	TSgDrawableId Id(const RSgDrawable& aDrawable);
    28 	};
    29 
    30 EXPORT_C CGraphicsResourceWrapper* CGraphicsResourceWrapperImpl::New()
    31 	{
    32 	return new CGraphicsResourceWrapperImpl;
    33 	}
    34 
    35 RSgDrawable* CGraphicsResourceWrapperImpl::NewDrawableL()
    36 	{
    37 	return new(ELeave) RSgDrawable;
    38 	}
    39 
    40 TInt CGraphicsResourceWrapperImpl::Open(RSgDrawable& aDrawable, const TSgDrawableId& aDrawableId)
    41 	{
    42 	return aDrawable.Open(aDrawableId);
    43 	}
    44 
    45 void CGraphicsResourceWrapperImpl::Close(RSgDrawable& aDrawable)
    46 	{
    47 	return aDrawable.Close();
    48 	}
    49 
    50 TBool CGraphicsResourceWrapperImpl::IsNull(const RSgDrawable& aDrawable)
    51 	{
    52 	return aDrawable.IsNull();
    53 	}
    54 
    55 TSgDrawableId CGraphicsResourceWrapperImpl::Id(const RSgDrawable& aDrawable)
    56 	{
    57 	return aDrawable.Id();
    58 	}