os/graphics/graphicsdeviceinterface/screendriver/inc/cdsb.h
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/graphics/graphicsdeviceinterface/screendriver/inc/cdsb.h	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,118 @@
     1.4 +// Copyright (c) 1996-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 +#ifndef __CDSB_H__
    1.20 +#define __CDSB_H__
    1.21 +
    1.22 +#include <e32base.h>
    1.23 +#include <bitdev.h>
    1.24 +
    1.25 +/**
    1.26 +Direct Screen Bitmap.
    1.27 +API to allow provide synchronisation of the display of images with the
    1.28 +displays refresh to prevent tearing.
    1.29 + 
    1.30 +This is an abstract base class, so must be derived from on a per-variant basis.
    1.31 +
    1.32 +@publishedPartner
    1.33 +@released
    1.34 +
    1.35 +Note: this class is likely to be deprecated in the future
    1.36 +*/ 
    1.37 +class CDirectScreenBitmap : public CBase
    1.38 +	{
    1.39 +public:
    1.40 +	enum TSettingsFlags
    1.41 +		{
    1.42 +		ENone = 0,
    1.43 +		EDoubleBuffer = 1,
    1.44 +		EIncrementalUpdate = 2
    1.45 +		};
    1.46 +
    1.47 +public:
    1.48 +	/**
    1.49 +	Constructs a CDirectScreenBitmap derived object.
    1.50 +    The default screen (with number 0) will be used.
    1.51 +    @return A pointer to the created CDirectScreenBitmap object
    1.52 +    @leave KErrNoMemory There was insufficient memory to allocate the CDirectScreenBitmap derived object
    1.53 +	*/
    1.54 +	IMPORT_C static CDirectScreenBitmap* NewL();	
    1.55 +
    1.56 +	/**
    1.57 +	Constructs a CDirectScreenBitmap derived object.
    1.58 +	@param aScreenNo Screen number, used by the CDirectScreenBitmap object.
    1.59 +    @return A pointer to the created CDirectScreenBitmap object
    1.60 +    @leave KErrNoMemory There was insufficient memory to allocate the CDirectScreenBitmap derived object
    1.61 +	*/
    1.62 +	IMPORT_C static CDirectScreenBitmap* NewL(TInt aScreenNo);	
    1.63 +
    1.64 +    /**
    1.65 +	Creates a CDirectScreenBitmap object which can be used for drawing to
    1.66 +	a region of the screen indicated by aScreenRect.  This region must have
    1.67 +	previously been 'claimed' via the Window Servers Direct Screen Access API.
    1.68 +
    1.69 +	@param aScreenRect The region to be displayed
    1.70 +	@param aSettingsFlags The mode of operation. The upper 3 bits are used 
    1.71 +                          for the screen number value: 0..7.  By default the screen 
    1.72 +                          with  number 0 will be used.
    1.73 +	@return KErrNone if successful
    1.74 +	        KErrNoMemory if there was insufficient memory
    1.75 +	        KErrNotSupported if the creation failed for other reasons
    1.76 +	*/
    1.77 +	virtual TInt Create(const TRect& aScreenRect, TSettingsFlags aSettingsFlags) =0;
    1.78 +
    1.79 +	/**
    1.80 +	Returns a TAcceleratedBitmapInfo referring to a bitmap which the
    1.81 +	applicationcan render to.
    1.82 +
    1.83 +	@param aBitmapInfo The Bitmap
    1.84 +	@return KErrNone if successful, another error code otherwise
    1.85 +	*/
    1.86 +	virtual TInt BeginUpdate(TAcceleratedBitmapInfo& aBitmapInfo) =0;
    1.87 +
    1.88 +	/**
    1.89 +	Indicates to the Video Driver that the bitmap corresponding to the
    1.90 +	update has been fully rendered.  The video driver will perform
    1.91 +	the actions required to copy this to the frame buffer.
    1.92 +
    1.93 +	The request status aComplete will be signalled when the copying has completed.
    1.94 +	
    1.95 +	@param aComplete Asynchronous completion status
    1.96 +	*/
    1.97 +	virtual void EndUpdate(TRequestStatus& aComplete) =0;
    1.98 +
    1.99 +	/**
   1.100 +	Indicates to the Video Driver that the area indicated in aScreenRect has
   1.101 +	been fully rendered.  The video driver will perform the actions required 
   1.102 +	to copy this to the frame buffer.
   1.103 +	
   1.104 +	The request status aComplete will be signalled when the copying has completed.
   1.105 +	
   1.106 +	Note: aScreenRects coordinates are relative to the screen, not the update region specified
   1.107 +	in Create().  aScreenRect must fit entirely within the bounds of the original region passed
   1.108 +	to Create().
   1.109 +
   1.110 +	@param aScreenRect The region to update
   1.111 +	@param aComplete Asynchronous completion status
   1.112 +	*/
   1.113 +	virtual void EndUpdate(const TRect& aScreenRect, TRequestStatus& aComplete) =0;
   1.114 +
   1.115 +	/**
   1.116 +	Deletes all resources associated with the CDirectScreenBitmap object.
   1.117 +	*/
   1.118 +	virtual void Close() =0;
   1.119 +	};
   1.120 +
   1.121 +#endif