os/graphics/windowing/windowserver/graphicsresourcewrapper/graphicsresourcewrapper.cpp
Update contrib.
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".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
16 #include "graphicsresourcewrapper.h"
18 class CGraphicsResourceWrapperImpl : public CGraphicsResourceWrapper
21 IMPORT_C static CGraphicsResourceWrapper* New();
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);
30 EXPORT_C CGraphicsResourceWrapper* CGraphicsResourceWrapperImpl::New()
32 return new CGraphicsResourceWrapperImpl;
35 RSgDrawable* CGraphicsResourceWrapperImpl::NewDrawableL()
37 return new(ELeave) RSgDrawable;
40 TInt CGraphicsResourceWrapperImpl::Open(RSgDrawable& aDrawable, const TSgDrawableId& aDrawableId)
42 return aDrawable.Open(aDrawableId);
45 void CGraphicsResourceWrapperImpl::Close(RSgDrawable& aDrawable)
47 return aDrawable.Close();
50 TBool CGraphicsResourceWrapperImpl::IsNull(const RSgDrawable& aDrawable)
52 return aDrawable.IsNull();
55 TSgDrawableId CGraphicsResourceWrapperImpl::Id(const RSgDrawable& aDrawable)
57 return aDrawable.Id();