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