os/graphics/graphicsresourceservices/graphicsresource/inc/sgimagecollectionadapter.h
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/graphics/graphicsresourceservices/graphicsresource/inc/sgimagecollectionadapter.h Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,121 @@
1.4 +// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
1.5 +// All rights reserved.
1.6 +// This component and the accompanying materials are made available
1.7 +// under the terms of "Eclipse Public License v1.0"
1.8 +// which accompanies this distribution, and is available
1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
1.10 +//
1.11 +// Initial Contributors:
1.12 +// Nokia Corporation - initial contribution.
1.13 +//
1.14 +// Contributors:
1.15 +//
1.16 +// Description:
1.17 +//
1.18 +
1.19 +/**
1.20 + @file
1.21 + @publishedPartner
1.22 + @prototype
1.23 +*/
1.24 +
1.25 +#ifndef SGIMAGECOLLECTIONADAPTER_H
1.26 +#define SGIMAGECOLLECTIONADAPTER_H
1.27 +
1.28 +#include <graphics/sgresourceadapter.h>
1.29 +#include <graphics/sgimagecollection.h>
1.30 +
1.31 +
1.32 +/**
1.33 +@publishedPartner
1.34 +@prototype
1.35 +@deprecated
1.36 +
1.37 +This interface must be implemented by all the user-side objects in the adaptation
1.38 +layer of the Graphics subsystem which are referenced by instances of RSgImageCollection.
1.39 +The interface between the user-side and the kernel-side parts of the adaptation
1.40 +layer is outside the scope of the specification of the Graphics Resource API.
1.41 +
1.42 +@see RSgImageCollection
1.43 +*/
1.44 +class MSgImageCollectionAdapter: public MSgResourceAdapter
1.45 + {
1.46 +public:
1.47 + /**
1.48 + @publishedPartner
1.49 + @prototype
1.50 +
1.51 + Retrieves the surface identifier of the image collection represented by this
1.52 + adapter object.
1.53 +
1.54 + @return The surface identifier of the image collection.
1.55 + @see RSgImageCollection::SurfaceId()
1.56 + */
1.57 + virtual const TSurfaceId& SurfaceId() const = 0;
1.58 + /**
1.59 + @publishedPartner
1.60 + @prototype
1.61 + @deprecated
1.62 +
1.63 + Retrieves the values of the attributes of the images in the image collection
1.64 + represented by this adapter object.
1.65 +
1.66 + @param aInfo On input, the globally unique identifiers of the user-defined
1.67 + attributes to be retrieved from the image collection, if any. On return,
1.68 + the values of the attributes of the images in the collection and the
1.69 + values of the selected user-defined attributes.
1.70 + @pre If aInfo.iUserAttributes is not null then it points to an array of
1.71 + aInfo.iUserAttributeCount elements with globally unique identifiers
1.72 + corresponding to user-defined attributes attached to the image collection.
1.73 + @return KErrNone if successful.
1.74 + @return KErrNotFound if any of the user-defined attributes to be retrieved from
1.75 + the image collection cannot be found.
1.76 + @see RSgImageCollection::GetInfo()
1.77 + */
1.78 + virtual TInt GetInfo(TSgImageInfo& aInfo) const = 0;
1.79 + /**
1.80 + @publishedPartner
1.81 + @prototype
1.82 + @deprecated
1.83 +
1.84 + Retrieves the number of images in the image collection represented by this
1.85 + adapter object.
1.86 +
1.87 + @return The number of images in the image collection.
1.88 + @see RSgImageCollection::Count()
1.89 + */
1.90 + virtual TInt Count() const = 0;
1.91 + /**
1.92 + @publishedPartner
1.93 + @prototype
1.94 + @deprecated
1.95 +
1.96 + Opens a new handle to one of the images in the image collection represented by
1.97 + this adapter object. If there are no handles to the image open in the calling
1.98 + process then this function creates a new adapter object that represents the image
1.99 + in the context of the calling process. Otherwise this function just increments
1.100 + the reference count of the existing adapter object that represents the image
1.101 + in the context of the calling process.
1.102 +
1.103 + @param aIndex The index of the image within the image collection.
1.104 + @param aResult On return, a pointer to the adapter object that represents the
1.105 + specified image in the collection.
1.106 + @pre aIndex is greater than or equal to zero and less than the number of images
1.107 + in the collection.
1.108 + @pre aResult is null.
1.109 + @post aResult points to either a newly created or an existing adapter object
1.110 + that represents the specified image in the collection. If a new adapter
1.111 + object is created then its initial reference count is one and the reference
1.112 + count for the image collection is incremented by one. Otherwise only the
1.113 + reference count for the adapter object is incremented by one.
1.114 + @return KErrNone if successful.
1.115 + @return KErrInUse if aResult was not null.
1.116 + @return KErrArgument if aIndex is invalid.
1.117 + @return KErrNoMemory if there is not enough system memory.
1.118 + @see RSgImageCollection::OpenImage()
1.119 + */
1.120 + virtual TInt OpenImage(TInt aIndex, MSgDrawableAdapter*& aResult) = 0;
1.121 + };
1.122 +
1.123 +
1.124 +#endif // SGIMAGECOLLECTIONADAPTER_H