First public contribution.
1 // Copyright (c) 1996-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".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
24 API to allow provide synchronisation of the display of images with the
25 displays refresh to prevent tearing.
27 This is an abstract base class, so must be derived from on a per-variant basis.
32 Note: this class is likely to be deprecated in the future
34 class CDirectScreenBitmap : public CBase
41 EIncrementalUpdate = 2
46 Constructs a CDirectScreenBitmap derived object.
47 The default screen (with number 0) will be used.
48 @return A pointer to the created CDirectScreenBitmap object
49 @leave KErrNoMemory There was insufficient memory to allocate the CDirectScreenBitmap derived object
51 IMPORT_C static CDirectScreenBitmap* NewL();
54 Constructs a CDirectScreenBitmap derived object.
55 @param aScreenNo Screen number, used by the CDirectScreenBitmap object.
56 @return A pointer to the created CDirectScreenBitmap object
57 @leave KErrNoMemory There was insufficient memory to allocate the CDirectScreenBitmap derived object
59 IMPORT_C static CDirectScreenBitmap* NewL(TInt aScreenNo);
62 Creates a CDirectScreenBitmap object which can be used for drawing to
63 a region of the screen indicated by aScreenRect. This region must have
64 previously been 'claimed' via the Window Servers Direct Screen Access API.
66 @param aScreenRect The region to be displayed
67 @param aSettingsFlags The mode of operation. The upper 3 bits are used
68 for the screen number value: 0..7. By default the screen
69 with number 0 will be used.
70 @return KErrNone if successful
71 KErrNoMemory if there was insufficient memory
72 KErrNotSupported if the creation failed for other reasons
74 virtual TInt Create(const TRect& aScreenRect, TSettingsFlags aSettingsFlags) =0;
77 Returns a TAcceleratedBitmapInfo referring to a bitmap which the
78 applicationcan render to.
80 @param aBitmapInfo The Bitmap
81 @return KErrNone if successful, another error code otherwise
83 virtual TInt BeginUpdate(TAcceleratedBitmapInfo& aBitmapInfo) =0;
86 Indicates to the Video Driver that the bitmap corresponding to the
87 update has been fully rendered. The video driver will perform
88 the actions required to copy this to the frame buffer.
90 The request status aComplete will be signalled when the copying has completed.
92 @param aComplete Asynchronous completion status
94 virtual void EndUpdate(TRequestStatus& aComplete) =0;
97 Indicates to the Video Driver that the area indicated in aScreenRect has
98 been fully rendered. The video driver will perform the actions required
99 to copy this to the frame buffer.
101 The request status aComplete will be signalled when the copying has completed.
103 Note: aScreenRects coordinates are relative to the screen, not the update region specified
104 in Create(). aScreenRect must fit entirely within the bounds of the original region passed
107 @param aScreenRect The region to update
108 @param aComplete Asynchronous completion status
110 virtual void EndUpdate(const TRect& aScreenRect, TRequestStatus& aComplete) =0;
113 Deletes all resources associated with the CDirectScreenBitmap object.
115 virtual void Close() =0;