#ifndef PHSTBDFB_2D_H    /* Multi-include protection.   <FILENAME>_H */
#define PHSTBDFB_2D_H
/*****************************************************************************/
/* Copyright (c) 2008 NXP B.V.                                               */
/*                                                                           */
/* This library is free software; you can redistribute it and/or             */
/* modify it under the terms of the GNU Lesser General Public                */
/* License as published by the Free Software Foundation, using               */
/* version 2.1 of the License.                                               */
/*                                                                           */
/* This library is distributed in the hope that it will be useful,           */
/* but WITHOUT ANY WARRANTY; without even the implied warranty of            */
/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU          */
/* Lesser General Public License for more details.                           */
/*                                                                           */
/* You should have received a copy of the GNU Lesser General Public          */
/* License along with this library; if not, write to the Free Software       */
/* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA   */
/*                                                                           */
/*****************************************************************************/
/*
   NXP STB22X Driver

   Code is derived from TI Davinci driver.

   TI Davinci driver

   (c) Copyright 2007  Telio AG

   Written by Denis Oliver Kropp <dok@directfb.org>

   Code is derived from VMWare driver.

   (c) Copyright 2001-2007  The DirectFB Organization (directfb.org)
   (c) Copyright 2000-2004  Convergence (integrated media) GmbH

   All rights reserved.

   Written by Denis Oliver Kropp <dok@directfb.org>,
              Andreas Hundt <andi@fischlustig.de>,
              Sven Neumann <neo@directfb.org>,
              Ville Syrjälä <syrjala@sci.fi> and
              Claudio Ciccani <klan@users.sf.net>.

   This library is free software; you can redistribute it and/or
   modify it under the terms of the GNU Lesser General Public
   License as published by the Free Software Foundation; either
   version 2 of the License, or (at your option) any later version.

   This library is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   Lesser General Public License for more details.

   You should have received a copy of the GNU Lesser General Public
   License along with this library; if not, write to the
   Free Software Foundation, Inc., 59 Temple Place - Suite 330,
   Boston, MA 02111-1307, USA.
*//**
    @file   phStbDFB_2d.h
    @brief  Header file supporting implemetation of 2D hardware acceleration.

@b  Component:  phStbDFB.

*//*

Rev Date        Author      Comments
--------------------------------------------------------------------------------
  1 20080103    laird       New version for DirectFB 1.1.1
  3 20080902    laird       Update Copyright headers.
  4 20081111    steel       add stretch blit.
  5 20081119    neill       improve stretch blit initialisation.
  6 20090106    neill       add triangle fill and rectangle draw.
--------------------------------------------------------------------------------
    For consistency and standardisation retain the Section Separators.
*/
/***********************************************
* INCLUDE FILES                                *
************************************************/
#include "phStbDFB_internal.h"

/***********************************************
* EXPORTED MACROS                              *
* recommendation only: <MODULE><_WORD>+        *
***********************************************/

/******************************************************************
* EXPORTED TYPEDEFS                                               *
* recommendation only:                [p]phStbTemplate_<Word>+_t  *
*******************************************************************/
#define PH_STBDFB_SUPPORTED_DRAWINGFLAGS      (DSDRAW_BLEND)

#define PH_STBDFB_SUPPORTED_DRAWINGFUNCTIONS  (DFXL_FILLRECTANGLE | DFXL_FILLTRIANGLE | DFXL_DRAWRECTANGLE)

#define PH_STBDFB_SUPPORTED_BLITTINGFLAGS     (DSBLIT_SRC_COLORKEY       |  \
                                               DSBLIT_DST_COLORKEY       |  \
                                               DSBLIT_BLEND_ALPHACHANNEL |  \
                                               DSBLIT_BLEND_COLORALPHA   |  \
                                               DSBLIT_COLORIZE           |  \
                                               DSBLIT_SRC_PREMULTIPLY)

#define PH_STBDFB_SUPPORTED_BLITTINGFUNCTIONS (DFXL_BLIT)

#define PH_STBDFB_SUPPORTED_STRETCHFUNCTIONS  (DFXL_STRETCHBLIT)

typedef struct {
     int                  magic;
     int                  fd;
     PNXDrawSharedArea_t  *shared;
     ph833xCore_hwVersion hwVersion;
} phStbDFB_PNXDraw_t;

/**************************************************************************
* EXPORTED DATA                          g[k|p|kp|pk|kpk]phStbDfb_<Word>+ *
***************************************************************************/

extern bool gphStbDFB_stretchSupported;

/****************************************************************************
* EXPORTED FUNCTION PROTOTYPES                         phStbDfb[_<Word>+]   *
*****************************************************************************/

bool phStbDFB_2DInit(GraphicsDeviceFuncs *funcs, phStbDFB_PNXDraw_t *pnxdraw);

void phStbDFB_2DDeInit(phStbDFB_PNXDraw_t *pnxdraw);

bool phStbDFB_2DAvailable(phStbDFB_PNXDraw_t *pnxdraw);

#endif /* PHSTBDFB_2D_H      Do not add any thing below this line */
