sl@0
|
1 |
// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
|
sl@0
|
2 |
// All rights reserved.
|
sl@0
|
3 |
// This component and the accompanying materials are made available
|
sl@0
|
4 |
// under the terms of "Eclipse Public License v1.0"
|
sl@0
|
5 |
// which accompanies this distribution, and is available
|
sl@0
|
6 |
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
sl@0
|
7 |
//
|
sl@0
|
8 |
// Initial Contributors:
|
sl@0
|
9 |
// Nokia Corporation - initial contribution.
|
sl@0
|
10 |
//
|
sl@0
|
11 |
// Contributors:
|
sl@0
|
12 |
//
|
sl@0
|
13 |
// Description:
|
sl@0
|
14 |
//
|
sl@0
|
15 |
|
sl@0
|
16 |
/**
|
sl@0
|
17 |
@file
|
sl@0
|
18 |
@publishedPartner
|
sl@0
|
19 |
@prototype
|
sl@0
|
20 |
*/
|
sl@0
|
21 |
|
sl@0
|
22 |
#ifndef SGIMAGECOLLECTIONADAPTER_H
|
sl@0
|
23 |
#define SGIMAGECOLLECTIONADAPTER_H
|
sl@0
|
24 |
|
sl@0
|
25 |
#include <graphics/sgresourceadapter.h>
|
sl@0
|
26 |
#include <graphics/sgimagecollection.h>
|
sl@0
|
27 |
|
sl@0
|
28 |
|
sl@0
|
29 |
/**
|
sl@0
|
30 |
@publishedPartner
|
sl@0
|
31 |
@prototype
|
sl@0
|
32 |
@deprecated
|
sl@0
|
33 |
|
sl@0
|
34 |
This interface must be implemented by all the user-side objects in the adaptation
|
sl@0
|
35 |
layer of the Graphics subsystem which are referenced by instances of RSgImageCollection.
|
sl@0
|
36 |
The interface between the user-side and the kernel-side parts of the adaptation
|
sl@0
|
37 |
layer is outside the scope of the specification of the Graphics Resource API.
|
sl@0
|
38 |
|
sl@0
|
39 |
@see RSgImageCollection
|
sl@0
|
40 |
*/
|
sl@0
|
41 |
class MSgImageCollectionAdapter: public MSgResourceAdapter
|
sl@0
|
42 |
{
|
sl@0
|
43 |
public:
|
sl@0
|
44 |
/**
|
sl@0
|
45 |
@publishedPartner
|
sl@0
|
46 |
@prototype
|
sl@0
|
47 |
|
sl@0
|
48 |
Retrieves the surface identifier of the image collection represented by this
|
sl@0
|
49 |
adapter object.
|
sl@0
|
50 |
|
sl@0
|
51 |
@return The surface identifier of the image collection.
|
sl@0
|
52 |
@see RSgImageCollection::SurfaceId()
|
sl@0
|
53 |
*/
|
sl@0
|
54 |
virtual const TSurfaceId& SurfaceId() const = 0;
|
sl@0
|
55 |
/**
|
sl@0
|
56 |
@publishedPartner
|
sl@0
|
57 |
@prototype
|
sl@0
|
58 |
@deprecated
|
sl@0
|
59 |
|
sl@0
|
60 |
Retrieves the values of the attributes of the images in the image collection
|
sl@0
|
61 |
represented by this adapter object.
|
sl@0
|
62 |
|
sl@0
|
63 |
@param aInfo On input, the globally unique identifiers of the user-defined
|
sl@0
|
64 |
attributes to be retrieved from the image collection, if any. On return,
|
sl@0
|
65 |
the values of the attributes of the images in the collection and the
|
sl@0
|
66 |
values of the selected user-defined attributes.
|
sl@0
|
67 |
@pre If aInfo.iUserAttributes is not null then it points to an array of
|
sl@0
|
68 |
aInfo.iUserAttributeCount elements with globally unique identifiers
|
sl@0
|
69 |
corresponding to user-defined attributes attached to the image collection.
|
sl@0
|
70 |
@return KErrNone if successful.
|
sl@0
|
71 |
@return KErrNotFound if any of the user-defined attributes to be retrieved from
|
sl@0
|
72 |
the image collection cannot be found.
|
sl@0
|
73 |
@see RSgImageCollection::GetInfo()
|
sl@0
|
74 |
*/
|
sl@0
|
75 |
virtual TInt GetInfo(TSgImageInfo& aInfo) const = 0;
|
sl@0
|
76 |
/**
|
sl@0
|
77 |
@publishedPartner
|
sl@0
|
78 |
@prototype
|
sl@0
|
79 |
@deprecated
|
sl@0
|
80 |
|
sl@0
|
81 |
Retrieves the number of images in the image collection represented by this
|
sl@0
|
82 |
adapter object.
|
sl@0
|
83 |
|
sl@0
|
84 |
@return The number of images in the image collection.
|
sl@0
|
85 |
@see RSgImageCollection::Count()
|
sl@0
|
86 |
*/
|
sl@0
|
87 |
virtual TInt Count() const = 0;
|
sl@0
|
88 |
/**
|
sl@0
|
89 |
@publishedPartner
|
sl@0
|
90 |
@prototype
|
sl@0
|
91 |
@deprecated
|
sl@0
|
92 |
|
sl@0
|
93 |
Opens a new handle to one of the images in the image collection represented by
|
sl@0
|
94 |
this adapter object. If there are no handles to the image open in the calling
|
sl@0
|
95 |
process then this function creates a new adapter object that represents the image
|
sl@0
|
96 |
in the context of the calling process. Otherwise this function just increments
|
sl@0
|
97 |
the reference count of the existing adapter object that represents the image
|
sl@0
|
98 |
in the context of the calling process.
|
sl@0
|
99 |
|
sl@0
|
100 |
@param aIndex The index of the image within the image collection.
|
sl@0
|
101 |
@param aResult On return, a pointer to the adapter object that represents the
|
sl@0
|
102 |
specified image in the collection.
|
sl@0
|
103 |
@pre aIndex is greater than or equal to zero and less than the number of images
|
sl@0
|
104 |
in the collection.
|
sl@0
|
105 |
@pre aResult is null.
|
sl@0
|
106 |
@post aResult points to either a newly created or an existing adapter object
|
sl@0
|
107 |
that represents the specified image in the collection. If a new adapter
|
sl@0
|
108 |
object is created then its initial reference count is one and the reference
|
sl@0
|
109 |
count for the image collection is incremented by one. Otherwise only the
|
sl@0
|
110 |
reference count for the adapter object is incremented by one.
|
sl@0
|
111 |
@return KErrNone if successful.
|
sl@0
|
112 |
@return KErrInUse if aResult was not null.
|
sl@0
|
113 |
@return KErrArgument if aIndex is invalid.
|
sl@0
|
114 |
@return KErrNoMemory if there is not enough system memory.
|
sl@0
|
115 |
@see RSgImageCollection::OpenImage()
|
sl@0
|
116 |
*/
|
sl@0
|
117 |
virtual TInt OpenImage(TInt aIndex, MSgDrawableAdapter*& aResult) = 0;
|
sl@0
|
118 |
};
|
sl@0
|
119 |
|
sl@0
|
120 |
|
sl@0
|
121 |
#endif // SGIMAGECOLLECTIONADAPTER_H
|