Guiliani  Version 2.6 revision 7293 (documentation build 12)
CGfxEnvWin Class Reference

Implements windows GDI specific features. More...

#include <GfxEnvWin.h>

Inheritance diagram for CGfxEnvWin:

Public Member Functions

virtual void * GetWindowHandle () const
 
- Public Member Functions inherited from CGfxEnv
eC_Bool AddLayer (const LayerConfiguration_t &kLayerConfig)
 
void AddMainLayer (const eC_UInt &uiLayerID=0, const eC_Bool &bCached=false)
 
eC_UByte ApplyGlobalAlpha (const eC_UByte &ubAlpha) const
 
virtual void DeInitDisplay ()
 
virtual void EndOfRefresh ()
 
eC_UInt GetActiveLayerID () const
 
virtual eC_UByte GetBPP () const
 
virtual eC_UInt GetBufferCount () const
 
eC_UByte GetBytesPerPixel (const CGUICommonEnums::ImageType_t &ePixFormat) const
 
virtual CGUICommonEnums::ImageType_t GetColorFormat () const
 
void * GetDisplayBuffer (const eC_UInt &uiLayerID) const
 
virtual void * GetDisplayHandle () const
 
virtual void ** GetFrameBuffers () const
 
eC_UByte GetGlobalAlpha () const
 
virtual eC_UInt GetHeight () const
 
eC_UByte GetLayerAlpha (const eC_UInt &uiLayerID) const
 
eC_Bool GetLayerBufferSize (const eC_UInt &uiLayerID, eC_UInt &uiWidth, eC_UInt &uiHeight, eC_UByte &ubBPP)
 
eC_Bool GetLayerChromaKey (const eC_UInt &uiLayerID, eC_Bool &bChromaKeyActive, eC_UInt &uiChromaKey, eC_UByte &ubAlpha) const
 
eC_Bool GetLayerConfig (const eC_UInt &uiLayerIndex, LayerConfiguration_t &rkLayerConfig) const
 
eC_Bool GetLayerConfigForID (const eC_UInt &uiLayerID, LayerConfiguration_t &rkLayerConfig) const
 
eC_Bool GetLayerConfigForMainLayer (LayerConfiguration_t &rkLayerConfig) const
 
eC_Bool GetLayerIndexForID (const eC_UInt &uiLayerID, eC_UInt &ruiLayerIndex) const
 
eC_Bool GetLayerPosition (const eC_UInt &uiLayerID, eC_Int &iXPos, eC_Int &iYPos)
 
eC_Bool GetLayerVisibleSize (const eC_UInt &uiLayerID, eC_UInt &uiWidth, eC_UInt &uiHeight)
 
eC_UInt GetMainLayerID () const
 
virtual void * GetMergeBuffer () const
 
virtual eC_String GetName () const
 
eC_UInt GetNumberOfLayers () const
 
void * GetRenderBuffer (const eC_UInt &uiLayerID) const
 
virtual SurfaceMode_t GetSurfaceMode () const
 
virtual eC_UInt GetWidth () const
 
virtual void * GetWindowHandle () const
 
virtual eC_UInt GetXPos () const
 
virtual eC_UInt GetYPos () const
 
virtual eC_UInt InitDisplay ()
 
void InitLayers ()
 
void InvalidateLayer (const eC_UInt &uiLayerID)
 
virtual eC_Bool IsCreated () const
 
eC_Bool IsLayerModified (const eC_UInt &uiLayerID) const
 
eC_Bool IsLayerVisible (const eC_UInt &uiLayerID) const
 
eC_Bool IsMainLayer (const eC_UInt &uiLayerID) const
 
virtual eC_Bool IsNull ()
 
virtual eC_Bool IsResizable () const
 
virtual eC_Bool IsVSyncEnabled () const
 
virtual eC_Bool NeedsManualMerge () const
 
virtual eC_Bool RefreshScreen (const CGUIRect &rkInvalidatedArea)
 
virtual eC_Bool RefreshScreen (const eC_TListDoubleLinked< CGUIRect > &kInvalidatedRectList)
 
eC_Bool SetActiveLayerID (const eC_UInt &uiLayerID, const eC_Bool &bMarkAsModified=false)
 
virtual void SetCliprect (const CGUIRect &rkNewClipRect)
 
virtual void SetDevice (void *pkDevice)
 
void SetGfxWrap (CGfxWrap *pkGfxWrap)
 
void SetGlobalAlpha (const eC_UByte &ubGlobalAlpha)
 
eC_Bool SetLayerAlpha (const eC_UInt &uiLayerID, const eC_UByte &ubAlpha)
 
eC_Bool SetLayerChromaKey (const eC_UInt &uiLayerID, const eC_Bool &bChromaKeyActive, const eC_UInt &uiChromaKey, const eC_UByte &ubAlpha)
 
eC_Bool SetLayerPosition (const eC_UInt &uiLayerID, const eC_Int &iXPos, const eC_Int &iYPos)
 
eC_Bool SetLayerVisible (const eC_UInt &uiLayerID, const eC_Bool &bVisible)
 
eC_Bool SetLayerVisiblePos (const eC_UInt &uiLayerID, const eC_Int &iXPos, const eC_Int &iYPos)
 
eC_Bool SetLayerVisibleSize (const eC_UInt &uiLayerID, const eC_UInt &uiWidth, const eC_UInt &uiHeight)
 
void SetMainLayerID (const eC_UInt &uiLayerID)
 
void SetMainLayerProperties (const eC_UInt &uiLayerID, const eC_Bool &bCached)
 
void SetObjectForLayerID (const eC_UInt &uiLayerID, CGUIObject *pkObject)
 
virtual void SetScreenPosition (const eC_UInt &uiX, const eC_UInt &uiY)
 
virtual void SetScreenSize (const eC_UInt &uiWidth, const eC_UInt &uiHeight)
 
virtual void SetVSyncEnabled (const eC_Bool &bVSyncEnabled)
 
virtual void SetWindowCaption (const eC_String &kCaption)
 
virtual void StartOfRefresh ()
 
virtual eC_Bool SupportsCopy () const
 
virtual eC_Bool SwapBuffers ()
 
virtual void UpdateLayer (const LayerConfiguration_t &kLayerConfig, const LayerUpdate_t &eUpdateReason)
 
virtual eC_Bool UpdateLayerBuffers (const eC_UInt &uiLayerID, void *pkRenderBuffer, void *pkDisplayBuffer, const eC_UInt &uiWidth, const eC_UInt &uiHeight)
 
void UpdateLayerPositions ()
 

Static Public Member Functions

static eC_Bool CreateInstance (const HINSTANCE &hInstance, const SurfaceMode_t &eSurfaceMode, const CGUICommonEnums::ImageType_t &eScreenFormat, const eC_UInt &uiWidth, const eC_UInt &uiHeight, const eC_UInt &uiBufferCount=1, const eC_Bool &bResizable=false)
 
- Static Public Member Functions inherited from CGfxEnv
static eC_Bool CreateInstance (const SurfaceMode_t &eSurfaceMode, const CGUICommonEnums::ImageType_t &eScreenFormat, const eC_UInt &uiWidth, const eC_UInt &uiHeight, const eC_UInt &uiBufferCount=1, void **ppkBuffers=NULL, const eC_Bool &bResizable=false)
 
static void DeleteInstance ()
 called to destroy and detach GfxEnv
 

Protected Member Functions

 CGfxEnvWin (const HINSTANCE &hInstance, const SurfaceMode_t &eSurfaceMode, const CGUICommonEnums::ImageType_t &eScreenFormat, const eC_UInt &uiWidth, const eC_UInt &uiHeight, const eC_UInt &uiBufferCount=1, const eC_Bool &bResizable=false)
 
virtual ~CGfxEnvWin ()
 
virtual void EndOfRefresh ()
 
virtual void ** GetFrameBuffers () const
 
virtual eC_UInt GetHeight () const
 
virtual eC_UInt GetWidth () const
 
virtual eC_UInt GetXPos () const
 
virtual eC_UInt GetYPos () const
 
virtual void InitLayer (const LayerConfiguration_t &kLayerInfo)
 
virtual eC_Bool RefreshScreen (const CGUIRect &rkInvalidatedArea)
 
virtual void SetScreenPosition (const eC_UInt &uiX, const eC_UInt &uiY)
 
virtual void SetScreenSize (const eC_UInt &uiWidth, const eC_UInt &uiHeight)
 
virtual void SetWindowCaption (const eC_String &kCaption)
 
virtual eC_Bool SwapBuffers ()
 
virtual void UpdateLayer (const LayerConfiguration_t &rkLayerConfig, const LayerUpdate_t &eUpdateReason)
 
virtual eC_Bool UpdateLayerBuffers (const eC_UInt &uiLayerID, void *pkRenderBuffer, void *pkDisplayBuffer, const eC_UInt &uiWidth, const eC_UInt &uiHeight)
 
- Protected Member Functions inherited from CGfxEnv
 CGfxEnv (const SurfaceMode_t &eSurfaceMode, const CGUICommonEnums::ImageType_t &eScreenFormat, const eC_UInt &uiWidth, const eC_UInt &uiHeight, const eC_UInt &uiBufferCount=1, void **ppkBuffers=NULL, const eC_Bool &bResizable=false)
 
virtual ~CGfxEnv ()
 
eC_UByte GetBPPFromScreenFormat () const
 
virtual void InitLayer (const LayerConfiguration_t &kLayerConfig)
 
void UpdateMainLayer (const CGUICommonEnums::ImageType_t &eColorFormat, const eC_UInt &uiWidth, const eC_UInt &uiHeight, const eC_UInt &uiBufferCount, void **ppkBuffers)
 

Additional Inherited Members

- Public Types inherited from CGfxEnv
enum  SurfaceMode_t { SM_OPENGL , SM_FRAMEBUFFER , SM_VULKAN }
 
- Protected Attributes inherited from CGfxEnv
eC_TArray< LayerConfiguration_tm_akLayers
 : *DCLayer_t, one DCLayer_t struct per layer storing general settings
 
eC_Bool m_bNeedsManualMerge
 if supports merge
 
eC_Bool m_bResizable
 resizable
 
eC_Bool m_bSupportsCopy
 if supports copy
 
eC_Bool m_bVSyncEnabled
 if vsync is enabled
 
CGUICommonEnums::ImageType_t m_eColorFormat
 color-format
 
SurfaceMode_t m_eSurfaceMode
 surface mode
 
eC_Int m_iMainLayerID
 id of main-layer
 
eC_String m_kName
 name
 
CGfxWrapm_pkGfxWrap
 pointer to GfxWrapper
 
void ** m_ppkBuffers
 buffers for the main-screen
 
eC_UByte m_ubBPP
 BPP of the surface.
 
eC_UByte m_ubGlobalAlpha
 global alpha for blending
 
eC_UInt m_uiActiveLayerID
 : unsigned int = Active Layer
 
eC_UInt m_uiActiveLayerIndex
 index of currentl< active layer
 
eC_UInt m_uiBufferCount
 number of buffers used
 
eC_UInt m_uiHeight
 height of the surface
 
eC_UInt m_uiWidth
 width of the surface
 

Detailed Description

Implements windows GDI specific features.

This class implements the Windows GDI specific features, which may be used in different graphic wrappers within the Windows environment.

Constructor & Destructor Documentation

◆ CGfxEnvWin()

CGfxEnvWin::CGfxEnvWin ( const HINSTANCE &  hInstance,
const SurfaceMode_t eSurfaceMode,
const CGUICommonEnums::ImageType_t eScreenFormat,
const eC_UInt &  uiWidth,
const eC_UInt &  uiHeight,
const eC_UInt &  uiBufferCount = 1,
const eC_Bool &  bResizable = false 
)
protected

Constructor.

Parameters
hInstanceThe instance of the window.
eSurfaceModesurface-mode
eScreenFormat
uiWidthwidth
uiHeightheight
uiBufferCountnumber of buffers to use
bResizabletrue if resizable

◆ ~CGfxEnvWin()

virtual CGfxEnvWin::~CGfxEnvWin ( )
protectedvirtual

Destructor

Member Function Documentation

◆ CreateInstance()

static eC_Bool CGfxEnvWin::CreateInstance ( const HINSTANCE &  hInstance,
const SurfaceMode_t eSurfaceMode,
const CGUICommonEnums::ImageType_t eScreenFormat,
const eC_UInt &  uiWidth,
const eC_UInt &  uiHeight,
const eC_UInt &  uiBufferCount = 1,
const eC_Bool &  bResizable = false 
)
static

Create instance

Parameters
hInstanceThe instance of the window.
eSurfaceModesurface-mode
eScreenFormatscreen-format
uiWidthwidth
uiHeightheight
uiBufferCountnumber of buffers
bResizabletrue if resizable
Returns
true if successful

◆ EndOfRefresh()

virtual void CGfxEnvWin::EndOfRefresh ( )
protectedvirtual

This will be called when all layers have been refreshed. To wait for V-sync this would be the right place.

Reimplemented from CGfxEnv.

◆ GetFrameBuffers()

virtual void ** CGfxEnvWin::GetFrameBuffers ( ) const
protectedvirtual

return the used framebuffer if any

Returns
framebuffer or NULL

Reimplemented from CGfxEnv.

◆ GetHeight()

virtual eC_UInt CGfxEnvWin::GetHeight ( ) const
protectedvirtual

Get the height of the surface

Returns
height

Reimplemented from CGfxEnv.

◆ GetWidth()

virtual eC_UInt CGfxEnvWin::GetWidth ( ) const
protectedvirtual

Get the width of the surface

Returns
width

Reimplemented from CGfxEnv.

◆ GetWindowHandle()

virtual void * CGfxEnvWin::GetWindowHandle ( ) const
inlinevirtual

Get handle of window

Returns
window-handle

Reimplemented from CGfxEnv.

◆ GetXPos()

virtual eC_UInt CGfxEnvWin::GetXPos ( ) const
protectedvirtual

Get the x-position of the surface

Returns
x-position

Reimplemented from CGfxEnv.

◆ GetYPos()

virtual eC_UInt CGfxEnvWin::GetYPos ( ) const
protectedvirtual

Get the y-position of the surface

Returns
y-position

Reimplemented from CGfxEnv.

◆ InitLayer()

virtual void CGfxEnvWin::InitLayer ( const LayerConfiguration_t kLayerConfig)
protectedvirtual

Initialize layer this can be used to execute platform-specific code is called when layer gets added to DCWrap

Parameters
kLayerConfiglayer-configuration

Reimplemented from CGfxEnv.

◆ RefreshScreen()

virtual eC_Bool CGfxEnvWin::RefreshScreen ( const CGUIRect rkInvalidatedArea)
protectedvirtual

Refresh the screen within the given invalidate area. This can be used to copy regions of the display-buffer to the drawing-buffer

Parameters
rkInvalidatedAreaThis area will be refreshed.
Returns
True if OK

Reimplemented from CGfxEnv.

◆ SetScreenPosition()

virtual void CGfxEnvWin::SetScreenPosition ( const eC_UInt &  uiX,
const eC_UInt &  uiY 
)
protectedvirtual

Set the screen position if available

Parameters
uiX
uiY

Reimplemented from CGfxEnv.

◆ SetScreenSize()

virtual void CGfxEnvWin::SetScreenSize ( const eC_UInt &  uiWidth,
const eC_UInt &  uiHeight 
)
protectedvirtual

Set the screen-size this will normally result in recreating the surfaces

Parameters
uiWidth
uiHeight

Reimplemented from CGfxEnv.

◆ SetWindowCaption()

virtual void CGfxEnvWin::SetWindowCaption ( const eC_String &  kCaption)
protectedvirtual

Set the window caption

Parameters
kCaption

Reimplemented from CGfxEnv.

◆ SwapBuffers()

virtual eC_Bool CGfxEnvWin::SwapBuffers ( )
protectedvirtual

Swap buffers

Returns
true if successful

Reimplemented from CGfxEnv.

◆ UpdateLayer()

virtual void CGfxEnvWin::UpdateLayer ( const LayerConfiguration_t kLayerConfig,
const LayerUpdate_t &  eUpdateReason 
)
protectedvirtual

Update layer according to reason. This will be called when attributes of the layer (position, size, etc) have changed

Parameters
kLayerConfigconfiguration of updated layer
eUpdateReasonreason of update

Reimplemented from CGfxEnv.

◆ UpdateLayerBuffers()

virtual eC_Bool CGfxEnvWin::UpdateLayerBuffers ( const eC_UInt &  uiLayerID,
void *  pkRenderBuffer,
void *  pkDisplayBuffer,
const eC_UInt &  uiWidth,
const eC_UInt &  uiHeight 
)
protectedvirtual

Update buffers for layer

Parameters
uiLayerIDid of layer
pkRenderBuffercurrently used buffer for rendering
pkDisplayBuffercurrently used buffer for display
uiWidthwidth of layer
uiHeightheight of layer
Returns
true if successful

Reimplemented from CGfxEnv.


The documentation for this class was generated from the following file: