os/graphics/graphicsresourceservices/graphicsresource/inc/sgimagecollection.h
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/graphics/graphicsresourceservices/graphicsresource/inc/sgimagecollection.h	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,79 @@
     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 SGIMAGECOLLECTION_H
    1.26 +#define SGIMAGECOLLECTION_H
    1.27 +
    1.28 +#include <graphics/sgimage.h>
    1.29 +#include <graphics/surface.h>
    1.30 +
    1.31 +
    1.32 +class MSgImageCollectionAdapter;
    1.33 +
    1.34 +/**
    1.35 +@publishedPartner
    1.36 +@prototype
    1.37 +@deprecated
    1.38 +
    1.39 +A handle to a reference-counted collection of images with the same attributes which
    1.40 +is allocated in such a way that it can be used with the Graphics Composition Engine.
    1.41 +Users can access each of the images in the collection individually through RSgImage
    1.42 +handles. Interoperability with the Graphics Composition Engine is achieved by
    1.43 +passing the surface identifier returned by SurfaceId() in calls to the Graphics
    1.44 +Composition Engine API or the Surface Update API.
    1.45 +
    1.46 +Since both images and image collections are reference-counted, and an image collection
    1.47 +can only be destroyed as a whole, then an image collection is guaranteed to exist
    1.48 +while there is an open RSgImageCollection handle referencing it or there are open
    1.49 +RSgImage handles referencing any of the individual images in the collection.
    1.50 +
    1.51 +A new RSgImageCollection handle does not refer to an image collection until a
    1.52 +successful call to Create(). Before that point, the handle is said to be a null
    1.53 +handle. Instances of RSgImageCollection can be shared among threads in the same
    1.54 +process.
    1.55 +
    1.56 +An RSgImageCollection handle is said to be invalid if it is not null but it does not
    1.57 +reference an existing image collection. Copying an instance of RSgImageCollection
    1.58 +must be done with extreme care, since it does not increment the reference count of
    1.59 +the referenced image collection and may therefore allow some RSgImageCollection or
    1.60 +RSgImage handle to become invalid when the image collection is destroyed.
    1.61 +
    1.62 +@see RSgImage
    1.63 +*/
    1.64 +NONSHARABLE_CLASS(RSgImageCollection)
    1.65 +	{
    1.66 +public:
    1.67 +	IMPORT_C RSgImageCollection();
    1.68 +	IMPORT_C TInt Create(const TSgImageInfo& aInfo, TInt aImageCount);
    1.69 +	IMPORT_C static TInt Create(const TSgImageInfo aInfos[], TInt aImageCount,
    1.70 +	                            RSgImageCollection aCollections[], TInt aCollectionCount);
    1.71 +	IMPORT_C void Close();
    1.72 +	IMPORT_C const TSurfaceId& SurfaceId() const;
    1.73 +	IMPORT_C TBool IsNull() const;
    1.74 +	IMPORT_C TInt GetInfo(TSgImageInfo& aInfo) const;
    1.75 +	IMPORT_C TInt Count() const;
    1.76 +	IMPORT_C TInt OpenImage(TInt aIndex, RSgImage& aResult);
    1.77 +private:
    1.78 +	MSgImageCollectionAdapter* iImpl;
    1.79 +	};
    1.80 +
    1.81 +
    1.82 +#endif // SGIMAGECOLLECTION_H