uiacceltk/hitchcock/coretoolkit/inc/huicanvasrenderbuffer.h
author Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Tue, 02 Feb 2010 07:56:43 +0200
changeset 0 15bf7259bb7c
child 17 3ac8bf5c5014
permissions -rw-r--r--
Revision: 201003

/*
* Copyright (c) 2006-2007 Nokia Corporation and/or its subsidiary(-ies). 
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
* which accompanies this distribution, and is available
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
*
* Initial Contributors:
* Nokia Corporation - initial contribution.
*
* Contributors:
*
* Description:   Definition of CHuiCanvasRenderBuffer
*
*/



#ifndef __HUICANVASRENDERBUFFER_H__
#define __HUICANVASRENDERBUFFER_H__


#include <e32base.h>
    
/* Forward declarations. */    
class CHuiRenderPlugin;

class CHuiCanvasRenderBuffer : public CBase
    {
public:

	/**
	 * Constructor.
	 */
	IMPORT_C CHuiCanvasRenderBuffer();

	/**
	 * Destructor.
	 */ 
	IMPORT_C ~CHuiCanvasRenderBuffer();
    
    /**
     * Initializes render buffer.
     */
	IMPORT_C virtual void InitializeL(const TSize& aSize);
    
    /**
     * Releases render buffer resources.
     */
	IMPORT_C virtual void UnInitialize();
	
    /**
     * Binds as render target.
     */ 
	IMPORT_C virtual void Bind();

    /**
     * Unbinds as from being the active render target.
     */ 
    IMPORT_C virtual void UnBind();

    /**
     * Returns size in pixels.
     */ 
    IMPORT_C TSize Size() const;
    
    /**
     * Is buffer initilized or not
     */ 
    IMPORT_C TBool IsInitialized() const;
    
    /**
     * Copies content from the given buffer
     */ 
    IMPORT_C virtual void Copy(const CHuiCanvasRenderBuffer& aSourceBuffer);
    
    /**
     * Copies content from the active surface.
     */ 
    IMPORT_C virtual void Copy(TPoint aPoint);    
    
protected:
    
    TSize iSize;
    TBool iInitialized;
 
    };

#endif