sl@0
|
1 |
// Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
|
sl@0
|
2 |
//
|
sl@0
|
3 |
// Permission is hereby granted, free of charge, to any person obtaining a
|
sl@0
|
4 |
// copy of this software and/or associated documentation files (the
|
sl@0
|
5 |
// "Materials"), to deal in the Materials without restriction, including
|
sl@0
|
6 |
// without limitation the rights to use, copy, modify, merge, publish,
|
sl@0
|
7 |
// distribute, sublicense, and/or sell copies of the Materials, and to
|
sl@0
|
8 |
// permit persons to whom the Materials are furnished to do so, subject to
|
sl@0
|
9 |
// the following conditions:
|
sl@0
|
10 |
//
|
sl@0
|
11 |
// The above copyright notice and this permission notice shall be included
|
sl@0
|
12 |
// in all copies or substantial portions of the Materials.
|
sl@0
|
13 |
//
|
sl@0
|
14 |
// THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
sl@0
|
15 |
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
sl@0
|
16 |
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
sl@0
|
17 |
// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
sl@0
|
18 |
// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
sl@0
|
19 |
// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
sl@0
|
20 |
// MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
|
sl@0
|
21 |
//
|
sl@0
|
22 |
// Description:
|
sl@0
|
23 |
// Display Update Abstract Interface
|
sl@0
|
24 |
//
|
sl@0
|
25 |
//
|
sl@0
|
26 |
|
sl@0
|
27 |
#ifndef OPENWFC_RI_DISPLAY_UPDATE_H
|
sl@0
|
28 |
#define OPENWFC_RI_DISPLAY_UPDATE_H
|
sl@0
|
29 |
|
sl@0
|
30 |
#include <e32base.h>
|
sl@0
|
31 |
#include <graphics/symbianstream.h>
|
sl@0
|
32 |
|
sl@0
|
33 |
/**
|
sl@0
|
34 |
* \brief Abstract interface used by OPENWF-C SI in order to display
|
sl@0
|
35 |
* the composed content
|
sl@0
|
36 |
*
|
sl@0
|
37 |
*/
|
sl@0
|
38 |
|
sl@0
|
39 |
class MOpenWFC_RI_Display_Update
|
sl@0
|
40 |
{
|
sl@0
|
41 |
public:
|
sl@0
|
42 |
/**
|
sl@0
|
43 |
* Retrieves one of the display attributes
|
sl@0
|
44 |
*
|
sl@0
|
45 |
* @param aAttributeId The attribute ID to be retrieved.
|
sl@0
|
46 |
* @param aAttribute Pointer to the attribute to be retrieved
|
sl@0
|
47 |
* @param aAttributeSize Size in bytes of attribute to be retrieved
|
sl@0
|
48 |
*
|
sl@0
|
49 |
* @return KErrNone or a system wide error
|
sl@0
|
50 |
*/
|
sl@0
|
51 |
virtual TInt GetAttribute(TInt aAttributeId, TAny* aAttribute, TInt aAttributeSize) = 0;
|
sl@0
|
52 |
|
sl@0
|
53 |
/**
|
sl@0
|
54 |
* Sets one of the display attributes
|
sl@0
|
55 |
*
|
sl@0
|
56 |
* @param aAttributeId The attribute ID to be retrieved.
|
sl@0
|
57 |
* @param aAttribute Pointer to the attribute to be retrieved
|
sl@0
|
58 |
* @param aAttributeSize Size in bytes of attribute to be retrieved
|
sl@0
|
59 |
*
|
sl@0
|
60 |
* @return KErrNone or a system wide error
|
sl@0
|
61 |
*/
|
sl@0
|
62 |
virtual TInt SetAttribute(TInt aAttributeId, TAny* aAttribute, TInt aAttributeSize) = 0;
|
sl@0
|
63 |
|
sl@0
|
64 |
/**
|
sl@0
|
65 |
* Commits the display attribute.
|
sl@0
|
66 |
*
|
sl@0
|
67 |
* @return KErrNone or a system wide error
|
sl@0
|
68 |
*/
|
sl@0
|
69 |
virtual TInt CommitAttribute() = 0;
|
sl@0
|
70 |
|
sl@0
|
71 |
/**
|
sl@0
|
72 |
* Associates a stream with the topmost display layer (overlay).
|
sl@0
|
73 |
* Must have been called successfully before calling UpdateDisplay.
|
sl@0
|
74 |
* Also used to specify the composed output stream as the display layer.
|
sl@0
|
75 |
* Note that currently this method is called each composition,
|
sl@0
|
76 |
* but it is only necessary to call it when the top stream changes.
|
sl@0
|
77 |
*
|
sl@0
|
78 |
* This method may fail if any attributes of the stream cannot be handled by the display device.
|
sl@0
|
79 |
* The aNonTrivialAttributes is a zero-terminated list of attribute keys and values
|
sl@0
|
80 |
* that do not match the trivial cases for direct composition, but that some devices may support,
|
sl@0
|
81 |
* representing eg mirror, scale, rotation, offset, or oversize cases.
|
sl@0
|
82 |
* The implementation of this method will stop processing the list and fail if it does not recogise
|
sl@0
|
83 |
* any of the keys or cannot accept the value associated with that key for direct display.
|
sl@0
|
84 |
* All platforms should accept an empty or NULL list, but some may simply fail if the list is non-empty,
|
sl@0
|
85 |
* so the caller should keep the list brief.
|
sl@0
|
86 |
*
|
sl@0
|
87 |
* If the method fails, then the caller must compose the content into a simpler format,
|
sl@0
|
88 |
* and call SetTopLayerSurface again before calling UpdateDisplay.
|
sl@0
|
89 |
* It is expected that there will be at least 1 pre-determined simpler format or stream handle that will always succeed.
|
sl@0
|
90 |
*
|
sl@0
|
91 |
* @param aStream The stream Id to be associated with the topmost layer
|
sl@0
|
92 |
* @param aNonTrivialAttributes Attribute integer pair list of any non-trivial attribute values.
|
sl@0
|
93 |
*
|
sl@0
|
94 |
* @return KErrNone or a system wide error
|
sl@0
|
95 |
*/
|
sl@0
|
96 |
virtual TInt SetTopLayerSurface(SymbianStreamType aStream,TInt* aNonTrivialAttributes=NULL) = 0;
|
sl@0
|
97 |
|
sl@0
|
98 |
/**
|
sl@0
|
99 |
* Associates a stream with a specific layer.
|
sl@0
|
100 |
* Must have been called successfully before calling UpdateDisplay.
|
sl@0
|
101 |
* Note that currently this method is called each composition,
|
sl@0
|
102 |
* but it is only necessary to call it when the stream stack changes,
|
sl@0
|
103 |
* when all layers should be re-specified in turn before the next UpdateDisplay call.
|
sl@0
|
104 |
*
|
sl@0
|
105 |
* This method may fail if any attributes of the stream cannot be handled by the display device.
|
sl@0
|
106 |
* The aNonTrivialAttributes is a zero-terminated list of attribute keys and values
|
sl@0
|
107 |
* that do not match the trivial cases for direct composition, but that some devices may support,
|
sl@0
|
108 |
* representing eg mirror, scale, rotation, offset, undersize or oversize cases,
|
sl@0
|
109 |
* and could be used to represent multiple layers.
|
sl@0
|
110 |
* The implementation of this method will fail if it does not recogise any of the keys
|
sl@0
|
111 |
* or cannot accept the value associated with that key for direct display.
|
sl@0
|
112 |
* All platforms should accept an empty or NULL list, but some may simply fail if the list is non-empty,
|
sl@0
|
113 |
* so the caller should keep the list brief.
|
sl@0
|
114 |
*
|
sl@0
|
115 |
* If the method fails, then the caller must compose the content into a simpler format,
|
sl@0
|
116 |
* and call SetTopLayerSurface (or SetLayerSurface) again before calling UpdateDisplay.
|
sl@0
|
117 |
*
|
sl@0
|
118 |
* @param aLayer The layer id. The layer number "0" is the topmost layer.
|
sl@0
|
119 |
* @param aStream The stream Id to be associated with the specified layer, or SYMBIAN_INVALID_HANDLE.
|
sl@0
|
120 |
* @param aNonTrivialAttributes Attribute integer pair list of any non-trivial attribute values.
|
sl@0
|
121 |
*
|
sl@0
|
122 |
* @return KErrNone or a system wide error
|
sl@0
|
123 |
*/
|
sl@0
|
124 |
virtual TInt SetLayerSurface(TInt aLayer, SymbianStreamType aStream,TInt* aNonTrivialAttributes=NULL) = 0;
|
sl@0
|
125 |
|
sl@0
|
126 |
/**
|
sl@0
|
127 |
* Update (flush/post) the screen
|
sl@0
|
128 |
*
|
sl@0
|
129 |
* @return KErrNone or a system wide error
|
sl@0
|
130 |
*/
|
sl@0
|
131 |
virtual TInt UpdateDisplay() = 0;
|
sl@0
|
132 |
};
|
sl@0
|
133 |
#endif // OPENWFC_RI_DISPLAY_UPDATE_H
|