QtPositioning: module updated (xHarbour compatibility)

Modified:
source/QtPositioning/QGeoAreaMonitorSource.prg

/*

  Qt5xHb - bibliotecas de ligao entre Harbour/xHarbour e Qt Framework 5

  Copyright (C) 2017 Marcos Antonio Gambeta <marcosgambeta AT outlook DOT com>

*/

#include "hbclass.ch"

#ifndef QT5XHB_NO_REQUESTS
REQUEST QGEOPOSITIONINFOSOURCE
REQUEST QGEOAREAMONITORINFO
#endif

CLASS QGeoAreaMonitorSource INHERIT QObject

   METHOD delete
   METHOD setPositionInfoSource
   METHOD positionInfoSource
   METHOD sourceName
   METHOD error
   METHOD supportedAreaMonitorFeatures
   METHOD startMonitoring
   METHOD stopMonitoring
   METHOD requestUpdate
   METHOD activeMonitors1
   METHOD activeMonitors2
   METHOD activeMonitors
   METHOD createDefaultSource
   METHOD createSource
   METHOD availableSources

   METHOD onAreaEntered
   METHOD onAreaExited
   METHOD onMonitorExpired
   METHOD onError

   DESTRUCTOR destroyObject

END CLASS

PROCEDURE destroyObject () CLASS QGeoAreaMonitorSource
   IF ::self_destruction
      ::delete()
   ENDIF
RETURN

#pragma BEGINDUMP

#include <Qt>

#ifndef __XHARBOUR__
#if (QT_VERSION >= QT_VERSION_CHECK(5,2,0))
#include <QGeoAreaMonitorSource>
#endif
#endif

#include "qt5xhb_common.h"
#include "qt5xhb_macros.h"
#include "qt5xhb_utils.h"

#ifdef __XHARBOUR__
#if (QT_VERSION >= QT_VERSION_CHECK(5,2,0))
#include <QGeoAreaMonitorSource>
#endif
#endif

HB_FUNC_STATIC( QGEOAREAMONITORSOURCE_DELETE )
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,2,0))
  QGeoAreaMonitorSource * obj = (QGeoAreaMonitorSource *) hb_itemGetPtr( hb_objSendMsg( hb_stackSelfItem(), "POINTER", 0 ) );
  if( obj )
  {
    delete obj;
    obj = NULL;
    PHB_ITEM self = hb_stackSelfItem();
    PHB_ITEM ptr = hb_itemPutPtr( NULL, NULL );
    hb_objSendMsg( self, "_pointer", 1, ptr );
    hb_itemRelease( ptr );
  }
  hb_itemReturn( hb_stackSelfItem() );
#endif
}

/*
virtual void setPositionInfoSource(QGeoPositionInfoSource *source)
*/
HB_FUNC_STATIC( QGEOAREAMONITORSOURCE_SETPOSITIONINFOSOURCE )
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,2,0))
  QGeoAreaMonitorSource * obj = (QGeoAreaMonitorSource *) _qt5xhb_itemGetPtrStackSelfItem();
  if( obj )
  {
    QGeoPositionInfoSource * par1 = (QGeoPositionInfoSource *) _qt5xhb_itemGetPtr(1);
    obj->setPositionInfoSource ( par1 );
  }
  hb_itemReturn( hb_stackSelfItem() );
#endif
}

/*
virtual QGeoPositionInfoSource* positionInfoSource() const
*/
HB_FUNC_STATIC( QGEOAREAMONITORSOURCE_POSITIONINFOSOURCE )
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,2,0))
  QGeoAreaMonitorSource * obj = (QGeoAreaMonitorSource *) _qt5xhb_itemGetPtrStackSelfItem();
  if( obj )
  {
    QGeoPositionInfoSource * ptr = obj->positionInfoSource ();
    _qt5xhb_createReturnClass ( ptr, "QGEOPOSITIONINFOSOURCE" );
  }
#endif
}

/*
QString sourceName() const
*/
HB_FUNC_STATIC( QGEOAREAMONITORSOURCE_SOURCENAME )
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,2,0))
  QGeoAreaMonitorSource * obj = (QGeoAreaMonitorSource *) _qt5xhb_itemGetPtrStackSelfItem();
  if( obj )
  {
    RQSTRING( obj->sourceName () );
  }
#endif
}

/*
virtual Error error() const = 0
*/
HB_FUNC_STATIC( QGEOAREAMONITORSOURCE_ERROR )
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,2,0))
  QGeoAreaMonitorSource * obj = (QGeoAreaMonitorSource *) _qt5xhb_itemGetPtrStackSelfItem();
  if( obj )
  {
    hb_retni( obj->error () );
  }
#endif
}

/*
virtual AreaMonitorFeatures supportedAreaMonitorFeatures() const = 0
*/
HB_FUNC_STATIC( QGEOAREAMONITORSOURCE_SUPPORTEDAREAMONITORFEATURES )
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,2,0))
  QGeoAreaMonitorSource * obj = (QGeoAreaMonitorSource *) _qt5xhb_itemGetPtrStackSelfItem();
  if( obj )
  {
    hb_retni( obj->supportedAreaMonitorFeatures () );
  }
#endif
}

/*
virtual bool startMonitoring(const QGeoAreaMonitorInfo &monitor) = 0
*/
HB_FUNC_STATIC( QGEOAREAMONITORSOURCE_STARTMONITORING )
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,2,0))
  QGeoAreaMonitorSource * obj = (QGeoAreaMonitorSource *) _qt5xhb_itemGetPtrStackSelfItem();
  if( obj )
  {
    RBOOL( obj->startMonitoring ( *PQGEOAREAMONITORINFO(1) ) );
  }
#endif
}

/*
virtual bool stopMonitoring(const QGeoAreaMonitorInfo &monitor) = 0
*/
HB_FUNC_STATIC( QGEOAREAMONITORSOURCE_STOPMONITORING )
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,2,0))
  QGeoAreaMonitorSource * obj = (QGeoAreaMonitorSource *) _qt5xhb_itemGetPtrStackSelfItem();
  if( obj )
  {
    RBOOL( obj->stopMonitoring ( *PQGEOAREAMONITORINFO(1) ) );
  }
#endif
}

/*
virtual bool requestUpdate(const QGeoAreaMonitorInfo &monitor, const char *signal) = 0
*/
HB_FUNC_STATIC( QGEOAREAMONITORSOURCE_REQUESTUPDATE )
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,2,0))
  QGeoAreaMonitorSource * obj = (QGeoAreaMonitorSource *) _qt5xhb_itemGetPtrStackSelfItem();
  if( obj )
  {
    RBOOL( obj->requestUpdate ( *PQGEOAREAMONITORINFO(1), PCONSTCHAR(2) ) );
  }
#endif
}

/*
virtual QList<QGeoAreaMonitorInfo> activeMonitors() const = 0
*/
HB_FUNC_STATIC( QGEOAREAMONITORSOURCE_ACTIVEMONITORS1 )
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,2,0))
  QGeoAreaMonitorSource * obj = (QGeoAreaMonitorSource *) _qt5xhb_itemGetPtrStackSelfItem();
  if( obj )
  {
    QList<QGeoAreaMonitorInfo> list = obj->activeMonitors ();
    PHB_DYNS pDynSym;
    pDynSym = hb_dynsymFindName( "QGEOAREAMONITORINFO" );
    PHB_ITEM pArray;
    pArray = hb_itemArrayNew(0);
    int i;
    for(i=0;i<list.count();i++)
    {
      if( pDynSym )
      {
        #ifdef __XHARBOUR__
        hb_vmPushSymbol( pDynSym->pSymbol );
        #else
        hb_vmPushDynSym( pDynSym );
        #endif
        hb_vmPushNil();
        hb_vmDo( 0 );
        PHB_ITEM pObject = hb_itemNew( NULL );
        hb_itemCopy( pObject, hb_stackReturnItem() );
        PHB_ITEM pItem = hb_itemNew( NULL );
        hb_itemPutPtr( pItem, (QGeoAreaMonitorInfo *) new QGeoAreaMonitorInfo ( list[i] ) );
        hb_objSendMsg( pObject, "_POINTER", 1, pItem );
        hb_itemRelease( pItem );
        PHB_ITEM pDestroy = hb_itemNew( NULL );
        hb_itemPutL( pDestroy, true );
        hb_objSendMsg( pObject, "_SELF_DESTRUCTION", 1, pDestroy );
        hb_itemRelease( pDestroy );
        hb_arrayAddForward( pArray, pObject );
        hb_itemRelease( pObject );
      }
    }
    hb_itemReturnRelease(pArray);
  }
#endif
}

/*
virtual QList<QGeoAreaMonitorInfo> activeMonitors(const QGeoShape &lookupArea) const = 0
*/
HB_FUNC_STATIC( QGEOAREAMONITORSOURCE_ACTIVEMONITORS2 )
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,2,0))
  QGeoAreaMonitorSource * obj = (QGeoAreaMonitorSource *) _qt5xhb_itemGetPtrStackSelfItem();
  if( obj )
  {
    QList<QGeoAreaMonitorInfo> list = obj->activeMonitors ( *PQGEOSHAPE(1) );
    PHB_DYNS pDynSym;
    pDynSym = hb_dynsymFindName( "QGEOAREAMONITORINFO" );
    PHB_ITEM pArray;
    pArray = hb_itemArrayNew(0);
    int i;
    for(i=0;i<list.count();i++)
    {
      if( pDynSym )
      {
        #ifdef __XHARBOUR__
        hb_vmPushSymbol( pDynSym->pSymbol );
        #else
        hb_vmPushDynSym( pDynSym );
        #endif
        hb_vmPushNil();
        hb_vmDo( 0 );
        PHB_ITEM pObject = hb_itemNew( NULL );
        hb_itemCopy( pObject, hb_stackReturnItem() );
        PHB_ITEM pItem = hb_itemNew( NULL );
        hb_itemPutPtr( pItem, (QGeoAreaMonitorInfo *) new QGeoAreaMonitorInfo ( list[i] ) );
        hb_objSendMsg( pObject, "_POINTER", 1, pItem );
        hb_itemRelease( pItem );
        PHB_ITEM pDestroy = hb_itemNew( NULL );
        hb_itemPutL( pDestroy, true );
        hb_objSendMsg( pObject, "_SELF_DESTRUCTION", 1, pDestroy );
        hb_itemRelease( pDestroy );
        hb_arrayAddForward( pArray, pObject );
        hb_itemRelease( pObject );
      }
    }
    hb_itemReturnRelease(pArray);
  }
#endif
}

//[1]virtual QList<QGeoAreaMonitorInfo> activeMonitors() const = 0
//[2]virtual QList<QGeoAreaMonitorInfo> activeMonitors(const QGeoShape &lookupArea) const = 0

HB_FUNC_STATIC( QGEOAREAMONITORSOURCE_ACTIVEMONITORS )
{
  if( ISNUMPAR(0) )
  {
    HB_FUNC_EXEC( QGEOAREAMONITORSOURCE_ACTIVEMONITORS1 );
  }
  else if( ISNUMPAR(1) && ISQGEOSHAPE(1) )
  {
    HB_FUNC_EXEC( QGEOAREAMONITORSOURCE_ACTIVEMONITORS2 );
  }
  else
  {
    hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
  }
}

/*
static QGeoAreaMonitorSource *createDefaultSource(QObject *parent)
*/
HB_FUNC_STATIC( QGEOAREAMONITORSOURCE_CREATEDEFAULTSOURCE )
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,2,0))
  QGeoAreaMonitorSource * ptr = QGeoAreaMonitorSource::createDefaultSource ( PQOBJECT(1) );
  _qt5xhb_createReturnClass ( ptr, "QGEOAREAMONITORSOURCE" );
#endif
}

/*
static QGeoAreaMonitorSource *createSource(const QString& sourceName, QObject *parent)
*/
HB_FUNC_STATIC( QGEOAREAMONITORSOURCE_CREATESOURCE )
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,2,0))
  QGeoAreaMonitorSource * ptr = QGeoAreaMonitorSource::createSource ( PQSTRING(1), PQOBJECT(2) );
  _qt5xhb_createReturnClass ( ptr, "QGEOAREAMONITORSOURCE" );
#endif
}

/*
static QStringList availableSources()
*/
HB_FUNC_STATIC( QGEOAREAMONITORSOURCE_AVAILABLESOURCES )
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,2,0))
  RQSTRINGLIST( QGeoAreaMonitorSource::availableSources () );
#endif
}

#pragma ENDDUMP

/*

  Qt5xHb - bibliotecas de ligao entre Harbour/xHarbour e Qt Framework 5

  Copyright (C) 2017 Marcos Antonio Gambeta <marcosgambeta AT outlook DOT com>

*/

#include "hbclass.ch"

#ifndef QT5XHB_NO_REQUESTS
REQUEST QGEOPOSITIONINFOSOURCE
REQUEST QGEOAREAMONITORINFO
#endif

CLASS QGeoAreaMonitorSource INHERIT QObject

   METHOD delete
   METHOD setPositionInfoSource
   METHOD positionInfoSource
   METHOD sourceName
   METHOD error
   METHOD supportedAreaMonitorFeatures
   METHOD startMonitoring
   METHOD stopMonitoring
   METHOD requestUpdate
   METHOD activeMonitors1
   METHOD activeMonitors2
   METHOD activeMonitors
   METHOD createDefaultSource
   METHOD createSource
   METHOD availableSources

   METHOD onAreaEntered
   METHOD onAreaExited
   METHOD onMonitorExpired
   METHOD onError

   DESTRUCTOR destroyObject

END CLASS

PROCEDURE destroyObject () CLASS QGeoAreaMonitorSource
   IF ::self_destruction
      ::delete()
   ENDIF
RETURN

#pragma BEGINDUMP

#include <Qt>

#ifndef __XHARBOUR__
#if (QT_VERSION >= QT_VERSION_CHECK(5,2,0))
#include <QGeoAreaMonitorSource>
#endif
#endif

#include "qt5xhb_common.h"
#include "qt5xhb_macros.h"
#include "qt5xhb_utils.h"

#ifdef __XHARBOUR__
#if (QT_VERSION >= QT_VERSION_CHECK(5,2,0))
#include <QGeoAreaMonitorSource>
#endif
#endif

HB_FUNC_STATIC( QGEOAREAMONITORSOURCE_DELETE )
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,2,0))
  QGeoAreaMonitorSource * obj = (QGeoAreaMonitorSource *) hb_itemGetPtr( hb_objSendMsg( hb_stackSelfItem(), "POINTER", 0 ) );
  if( obj )
  {
    delete obj;
    obj = NULL;
    PHB_ITEM self = hb_stackSelfItem();
    PHB_ITEM ptr = hb_itemPutPtr( NULL, NULL );
    hb_objSendMsg( self, "_pointer", 1, ptr );
    hb_itemRelease( ptr );
  }
  hb_itemReturn( hb_stackSelfItem() );
#endif
}

/*
virtual void setPositionInfoSource(QGeoPositionInfoSource *source)
*/
HB_FUNC_STATIC( QGEOAREAMONITORSOURCE_SETPOSITIONINFOSOURCE )
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,2,0))
  QGeoAreaMonitorSource * obj = (QGeoAreaMonitorSource *) _qt5xhb_itemGetPtrStackSelfItem();
  if( obj )
  {
    QGeoPositionInfoSource * par1 = (QGeoPositionInfoSource *) _qt5xhb_itemGetPtr(1);
    obj->setPositionInfoSource ( par1 );
  }
  hb_itemReturn( hb_stackSelfItem() );
#endif
}

/*
virtual QGeoPositionInfoSource* positionInfoSource() const
*/
HB_FUNC_STATIC( QGEOAREAMONITORSOURCE_POSITIONINFOSOURCE )
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,2,0))
  QGeoAreaMonitorSource * obj = (QGeoAreaMonitorSource *) _qt5xhb_itemGetPtrStackSelfItem();
  if( obj )
  {
    QGeoPositionInfoSource * ptr = obj->positionInfoSource ();
    _qt5xhb_createReturnClass ( ptr, "QGEOPOSITIONINFOSOURCE" );
  }
#endif
}

/*
QString sourceName() const
*/
HB_FUNC_STATIC( QGEOAREAMONITORSOURCE_SOURCENAME )
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,2,0))
  QGeoAreaMonitorSource * obj = (QGeoAreaMonitorSource *) _qt5xhb_itemGetPtrStackSelfItem();
  if( obj )
  {
    RQSTRING( obj->sourceName () );
  }
#endif
}

/*
virtual Error error() const = 0
*/
HB_FUNC_STATIC( QGEOAREAMONITORSOURCE_ERROR )
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,2,0))
  QGeoAreaMonitorSource * obj = (QGeoAreaMonitorSource *) _qt5xhb_itemGetPtrStackSelfItem();
  if( obj )
  {
    hb_retni( obj->error () );
  }
#endif
}

/*
virtual AreaMonitorFeatures supportedAreaMonitorFeatures() const = 0
*/
HB_FUNC_STATIC( QGEOAREAMONITORSOURCE_SUPPORTEDAREAMONITORFEATURES )
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,2,0))
  QGeoAreaMonitorSource * obj = (QGeoAreaMonitorSource *) _qt5xhb_itemGetPtrStackSelfItem();
  if( obj )
  {
    hb_retni( obj->supportedAreaMonitorFeatures () );
  }
#endif
}

/*
virtual bool startMonitoring(const QGeoAreaMonitorInfo &monitor) = 0
*/
HB_FUNC_STATIC( QGEOAREAMONITORSOURCE_STARTMONITORING )
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,2,0))
  QGeoAreaMonitorSource * obj = (QGeoAreaMonitorSource *) _qt5xhb_itemGetPtrStackSelfItem();
  if( obj )
  {
    RBOOL( obj->startMonitoring ( *PQGEOAREAMONITORINFO(1) ) );
  }
#endif
}

/*
virtual bool stopMonitoring(const QGeoAreaMonitorInfo &monitor) = 0
*/
HB_FUNC_STATIC( QGEOAREAMONITORSOURCE_STOPMONITORING )
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,2,0))
  QGeoAreaMonitorSource * obj = (QGeoAreaMonitorSource *) _qt5xhb_itemGetPtrStackSelfItem();
  if( obj )
  {
    RBOOL( obj->stopMonitoring ( *PQGEOAREAMONITORINFO(1) ) );
  }
#endif
}

/*
virtual bool requestUpdate(const QGeoAreaMonitorInfo &monitor, const char *signal) = 0
*/
HB_FUNC_STATIC( QGEOAREAMONITORSOURCE_REQUESTUPDATE )
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,2,0))
  QGeoAreaMonitorSource * obj = (QGeoAreaMonitorSource *) _qt5xhb_itemGetPtrStackSelfItem();
  if( obj )
  {
    RBOOL( obj->requestUpdate ( *PQGEOAREAMONITORINFO(1), PCONSTCHAR(2) ) );
  }
#endif
}

/*
virtual QList<QGeoAreaMonitorInfo> activeMonitors() const = 0
*/
HB_FUNC_STATIC( QGEOAREAMONITORSOURCE_ACTIVEMONITORS1 )
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,2,0))
  QGeoAreaMonitorSource * obj = (QGeoAreaMonitorSource *) _qt5xhb_itemGetPtrStackSelfItem();
  if( obj )
  {
    QList<QGeoAreaMonitorInfo> list = obj->activeMonitors ();
    PHB_DYNS pDynSym;
    #ifdef __XHARBOUR__
    pDynSym = hb_dynsymFind( "QGEOAREAMONITORINFO" );
    #else
    pDynSym = hb_dynsymFindName( "QGEOAREAMONITORINFO" );
    #endif
    PHB_ITEM pArray;
    pArray = hb_itemArrayNew(0);
    int i;
    for(i=0;i<list.count();i++)
    {
      if( pDynSym )
      {
        #ifdef __XHARBOUR__
        hb_vmPushSymbol( pDynSym->pSymbol );
        #else
        hb_vmPushDynSym( pDynSym );
        #endif
        hb_vmPushNil();
        hb_vmDo( 0 );
        PHB_ITEM pObject = hb_itemNew( NULL );
        hb_itemCopy( pObject, hb_stackReturnItem() );
        PHB_ITEM pItem = hb_itemNew( NULL );
        hb_itemPutPtr( pItem, (QGeoAreaMonitorInfo *) new QGeoAreaMonitorInfo ( list[i] ) );
        hb_objSendMsg( pObject, "_POINTER", 1, pItem );
        hb_itemRelease( pItem );
        PHB_ITEM pDestroy = hb_itemNew( NULL );
        hb_itemPutL( pDestroy, true );
        hb_objSendMsg( pObject, "_SELF_DESTRUCTION", 1, pDestroy );
        hb_itemRelease( pDestroy );
        hb_arrayAddForward( pArray, pObject );
        hb_itemRelease( pObject );
      }
    }
    hb_itemReturnRelease(pArray);
  }
#endif
}

/*
virtual QList<QGeoAreaMonitorInfo> activeMonitors(const QGeoShape &lookupArea) const = 0
*/
HB_FUNC_STATIC( QGEOAREAMONITORSOURCE_ACTIVEMONITORS2 )
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,2,0))
  QGeoAreaMonitorSource * obj = (QGeoAreaMonitorSource *) _qt5xhb_itemGetPtrStackSelfItem();
  if( obj )
  {
    QList<QGeoAreaMonitorInfo> list = obj->activeMonitors ( *PQGEOSHAPE(1) );
    PHB_DYNS pDynSym;
    #ifdef __XHARBOUR__
    pDynSym = hb_dynsymFind( "QGEOAREAMONITORINFO" );
    #else
    pDynSym = hb_dynsymFindName( "QGEOAREAMONITORINFO" );
    #endif
    PHB_ITEM pArray;
    pArray = hb_itemArrayNew(0);
    int i;
    for(i=0;i<list.count();i++)
    {
      if( pDynSym )
      {
        #ifdef __XHARBOUR__
        hb_vmPushSymbol( pDynSym->pSymbol );
        #else
        hb_vmPushDynSym( pDynSym );
        #endif
        hb_vmPushNil();
        hb_vmDo( 0 );
        PHB_ITEM pObject = hb_itemNew( NULL );
        hb_itemCopy( pObject, hb_stackReturnItem() );
        PHB_ITEM pItem = hb_itemNew( NULL );
        hb_itemPutPtr( pItem, (QGeoAreaMonitorInfo *) new QGeoAreaMonitorInfo ( list[i] ) );
        hb_objSendMsg( pObject, "_POINTER", 1, pItem );
        hb_itemRelease( pItem );
        PHB_ITEM pDestroy = hb_itemNew( NULL );
        hb_itemPutL( pDestroy, true );
        hb_objSendMsg( pObject, "_SELF_DESTRUCTION", 1, pDestroy );
        hb_itemRelease( pDestroy );
        hb_arrayAddForward( pArray, pObject );
        hb_itemRelease( pObject );
      }
    }
    hb_itemReturnRelease(pArray);
  }
#endif
}

//[1]virtual QList<QGeoAreaMonitorInfo> activeMonitors() const = 0
//[2]virtual QList<QGeoAreaMonitorInfo> activeMonitors(const QGeoShape &lookupArea) const = 0

HB_FUNC_STATIC( QGEOAREAMONITORSOURCE_ACTIVEMONITORS )
{
  if( ISNUMPAR(0) )
  {
    HB_FUNC_EXEC( QGEOAREAMONITORSOURCE_ACTIVEMONITORS1 );
  }
  else if( ISNUMPAR(1) && ISQGEOSHAPE(1) )
  {
    HB_FUNC_EXEC( QGEOAREAMONITORSOURCE_ACTIVEMONITORS2 );
  }
  else
  {
    hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
  }
}

/*
static QGeoAreaMonitorSource *createDefaultSource(QObject *parent)
*/
HB_FUNC_STATIC( QGEOAREAMONITORSOURCE_CREATEDEFAULTSOURCE )
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,2,0))
  QGeoAreaMonitorSource * ptr = QGeoAreaMonitorSource::createDefaultSource ( PQOBJECT(1) );
  _qt5xhb_createReturnClass ( ptr, "QGEOAREAMONITORSOURCE" );
#endif
}

/*
static QGeoAreaMonitorSource *createSource(const QString& sourceName, QObject *parent)
*/
HB_FUNC_STATIC( QGEOAREAMONITORSOURCE_CREATESOURCE )
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,2,0))
  QGeoAreaMonitorSource * ptr = QGeoAreaMonitorSource::createSource ( PQSTRING(1), PQOBJECT(2) );
  _qt5xhb_createReturnClass ( ptr, "QGEOAREAMONITORSOURCE" );
#endif
}

/*
static QStringList availableSources()
*/
HB_FUNC_STATIC( QGEOAREAMONITORSOURCE_AVAILABLESOURCES )
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,2,0))
  RQSTRINGLIST( QGeoAreaMonitorSource::availableSources () );
#endif
}

#pragma ENDDUMP


QtTest: data for code generation updated

Modified:
codegen/QtTest/QTestEventList.prg

$header

#include "hbclass.ch"

CLASS QTestEventList

   DATA pointer
   DATA self_destruction INIT .F.

   METHOD new
   METHOD delete
   METHOD addDelay
   METHOD addKeyClick1
   METHOD addKeyClick2
   METHOD addKeyClick
   METHOD addKeyClicks
   METHOD addKeyPress1
   METHOD addKeyPress2
   METHOD addKeyPress
   METHOD addKeyRelease1
   METHOD addKeyRelease2
   METHOD addKeyRelease
   METHOD addMouseClick
   METHOD addMouseDClick
   METHOD addMouseMove
   METHOD addMousePress
   METHOD addMouseRelease
   METHOD clear
   METHOD simulate

   METHOD newFrom
   METHOD newFromObject
   METHOD newFromPointer
   METHOD selfDestruction
   METHOD setSelfDestruction

   DESTRUCTOR destroyObject

END CLASS

$destructor

#pragma BEGINDUMP

#include <QTestEventList>

#include "qt4xhb_common.h"
#include "qt4xhb_macros.h"
#include "qt4xhb_utils.h"

$prototype=QTestEventList ()
$internalConstructor=|new1|

$prototype=QTestEventList ( const QTestEventList & other )
$internalConstructor=|new2|const QTestEventList &

//[1]QTestEventList ()
//[2]QTestEventList ( const QTestEventList & other )

HB_FUNC_STATIC( QTESTEVENTLIST_NEW )
{
  if( ISNUMPAR(0) )
  {
    QTestEventList_new1();
  }
  else if( ISNUMPAR(1) && ISQTESTEVENTLIST(1) )
  {
    QTestEventList_new2();
  }
  else
  {
    hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
  }
}

$deleteMethod

$prototype=void addDelay ( int msecs )
$method=|void|addDelay|int

$prototype=void addKeyClick ( Qt::Key qtKey, Qt::KeyboardModifiers modifiers = Qt::NoModifier, int msecs = -1 )
$method=|void|addKeyClick,addKeyClick1|Qt::Key,Qt::KeyboardModifiers=Qt::NoModifier,int=-1

$prototype=void addKeyClick ( char ascii, Qt::KeyboardModifiers modifiers = Qt::NoModifier, int msecs = -1 )
$method=|void|addKeyClick,addKeyClick2|char,Qt::KeyboardModifiers=Qt::NoModifier,int=-1

//[1]void addKeyClick ( Qt::Key qtKey, Qt::KeyboardModifiers modifiers = Qt::NoModifier, int msecs = -1 )
//[2]void addKeyClick ( char ascii, Qt::KeyboardModifiers modifiers = Qt::NoModifier, int msecs = -1 )

HB_FUNC_STATIC( QTESTEVENTLIST_ADDKEYCLICK )
{
  if( ISBETWEEN(1,3) && ISNUM(1) && (ISNUM(2)||ISNIL(2)) && (ISNUM(3)||ISNIL(3)) )
  {
    HB_FUNC_EXEC( QTESTEVENTLIST_ADDKEYCLICK1 );
  }
  else if( ISBETWEEN(1,3) && ISCHAR(1) && (ISNUM(2)||ISNIL(2)) && (ISNUM(3)||ISNIL(3)) )
  {
    HB_FUNC_EXEC( QTESTEVENTLIST_ADDKEYCLICK2 );
  }
  else
  {
    hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
  }
}

$prototype=void addKeyClicks ( const QString & keys, Qt::KeyboardModifiers modifiers = Qt::NoModifier, int msecs = -1 )
$method=|void|addKeyClicks|const QString &,Qt::KeyboardModifiers=Qt::NoModifier,int=-1

$prototype=void addKeyPress ( Qt::Key qtKey, Qt::KeyboardModifiers modifiers = Qt::NoModifier, int msecs = -1 )
$method=|void|addKeyPress,addKeyPress1|Qt::Key,Qt::KeyboardModifiers=Qt::NoModifier,int=-1

$prototype=void addKeyPress ( char ascii, Qt::KeyboardModifiers modifiers = Qt::NoModifier, int msecs = -1 )
$method=|void|addKeyPress,addKeyPress2|char,Qt::KeyboardModifiers=Qt::NoModifier,int=-1

//[1]void addKeyPress ( Qt::Key qtKey, Qt::KeyboardModifiers modifiers = Qt::NoModifier, int msecs = -1 )
//[2]void addKeyPress ( char ascii, Qt::KeyboardModifiers modifiers = Qt::NoModifier, int msecs = -1 )

HB_FUNC_STATIC( QTESTEVENTLIST_ADDKEYPRESS )
{
  if( ISBETWEEN(1,3) && ISNUM(1) && (ISNUM(2)||ISNIL(2)) && (ISNUM(3)||ISNIL(3)) )
  {
    HB_FUNC_EXEC( QTESTEVENTLIST_ADDKEYPRESS1 );
  }
  else if( ISBETWEEN(1,3) && ISCHAR(1) && (ISNUM(2)||ISNIL(2)) && (ISNUM(3)||ISNIL(3)) )
  {
    HB_FUNC_EXEC( QTESTEVENTLIST_ADDKEYPRESS2 );
  }
  else
  {
    hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
  }
}

$prototype=void addKeyRelease ( Qt::Key qtKey, Qt::KeyboardModifiers modifiers = Qt::NoModifier, int msecs = -1 )
$method=|void|addKeyRelease,addKeyRelease1|Qt::Key,Qt::KeyboardModifiers=Qt::NoModifier,int=-1

$prototype=void addKeyRelease ( char ascii, Qt::KeyboardModifiers modifiers = Qt::NoModifier, int msecs = -1 )
$method=|void|addKeyRelease,addKeyRelease2|char,Qt::KeyboardModifiers=Qt::NoModifier,int=-1

//[1]void addKeyRelease ( Qt::Key qtKey, Qt::KeyboardModifiers modifiers = Qt::NoModifier, int msecs = -1 )
//[2]void addKeyRelease ( char ascii, Qt::KeyboardModifiers modifiers = Qt::NoModifier, int msecs = -1 )

HB_FUNC_STATIC( QTESTEVENTLIST_ADDKEYRELEASE )
{
  if( ISBETWEEN(1,3) && ISNUM(1) && (ISNUM(2)||ISNIL(2)) && (ISNUM(3)||ISNIL(3)) )
  {
    HB_FUNC_EXEC( QTESTEVENTLIST_ADDKEYRELEASE1 );
  }
  else if( ISBETWEEN(1,3) && ISCHAR(1) && (ISNUM(2)||ISNIL(2)) && (ISNUM(3)||ISNIL(3)) )
  {
    HB_FUNC_EXEC( QTESTEVENTLIST_ADDKEYRELEASE2 );
  }
  else
  {
    hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
  }
}

$prototype=void addMouseClick ( Qt::MouseButton button, Qt::KeyboardModifiers modifiers = 0, QPoint pos = QPoint(), int delay = -1 )
$method=|void|addMouseClick|Qt::MouseButton,Qt::KeyboardModifiers=0,QPoint=QPoint(),int=-1

$prototype=void addMouseDClick ( Qt::MouseButton button, Qt::KeyboardModifiers modifiers = 0, QPoint pos = QPoint(), int delay = -1 )
$method=|void|addMouseDClick|Qt::MouseButton,Qt::KeyboardModifiers=0,QPoint=QPoint(),int=-1

$prototype=void addMouseMove ( QPoint pos = QPoint(), int delay = -1 )
$method=|void|addMouseMove|QPoint=QPoint(),int=-1

$prototype=void addMousePress ( Qt::MouseButton button, Qt::KeyboardModifiers modifiers = 0, QPoint pos = QPoint(), int delay = -1 )
$method=|void|addMousePress|Qt::MouseButton,Qt::KeyboardModifiers=0,QPoint=QPoint(),int=-1

$prototype=void addMouseRelease ( Qt::MouseButton button, Qt::KeyboardModifiers modifiers = 0, QPoint pos = QPoint(), int delay = -1 )
$method=|void|addMouseRelease|Qt::MouseButton,Qt::KeyboardModifiers=0,QPoint=QPoint(),int=-1

$prototype=void clear ()
$method=|void|clear|

$prototype=void simulate ( QWidget * w )
$method=|void|simulate|QWidget *

$extraMethods

#pragma ENDDUMP

$header

#include "hbclass.ch"

CLASS QTestEventList

   DATA pointer
   DATA self_destruction INIT .F.

   METHOD new
   METHOD delete
   METHOD addDelay
   METHOD addKeyClick1
   METHOD addKeyClick2
   METHOD addKeyClick
   METHOD addKeyClicks
   METHOD addKeyPress1
   METHOD addKeyPress2
   METHOD addKeyPress
   METHOD addKeyRelease1
   METHOD addKeyRelease2
   METHOD addKeyRelease
   METHOD addMouseClick
   METHOD addMouseDClick
   METHOD addMouseMove
   METHOD addMousePress
   METHOD addMouseRelease
   METHOD clear
   METHOD simulate

   METHOD newFrom
   METHOD newFromObject
   METHOD newFromPointer
   METHOD selfDestruction
   METHOD setSelfDestruction

   DESTRUCTOR destroyObject

END CLASS

$destructor

#pragma BEGINDUMP

#include <QTestEventList>

#include "qt4xhb_common.h"
#include "qt4xhb_macros.h"
#include "qt4xhb_utils.h"

/*
QTestEventList ()
*/
$internalConstructor=|new1|

/*
QTestEventList ( const QTestEventList & other )
*/
$internalConstructor=|new2|const QTestEventList &

//[1]QTestEventList ()
//[2]QTestEventList ( const QTestEventList & other )

HB_FUNC_STATIC( QTESTEVENTLIST_NEW )
{
  if( ISNUMPAR(0) )
  {
    QTestEventList_new1();
  }
  else if( ISNUMPAR(1) && ISQTESTEVENTLIST(1) )
  {
    QTestEventList_new2();
  }
  else
  {
    hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
  }
}

$deleteMethod

/*
void addDelay ( int msecs )
*/
$method=|void|addDelay|int

/*
void addKeyClick ( Qt::Key qtKey, Qt::KeyboardModifiers modifiers = Qt::NoModifier, int msecs = -1 )
*/
$method=|void|addKeyClick,addKeyClick1|Qt::Key,Qt::KeyboardModifiers=Qt::NoModifier,int=-1

/*
void addKeyClick ( char ascii, Qt::KeyboardModifiers modifiers = Qt::NoModifier, int msecs = -1 )
*/
$method=|void|addKeyClick,addKeyClick2|char,Qt::KeyboardModifiers=Qt::NoModifier,int=-1

//[1]void addKeyClick ( Qt::Key qtKey, Qt::KeyboardModifiers modifiers = Qt::NoModifier, int msecs = -1 )
//[2]void addKeyClick ( char ascii, Qt::KeyboardModifiers modifiers = Qt::NoModifier, int msecs = -1 )

HB_FUNC_STATIC( QTESTEVENTLIST_ADDKEYCLICK )
{
  if( ISBETWEEN(1,3) && ISNUM(1) && (ISNUM(2)||ISNIL(2)) && (ISNUM(3)||ISNIL(3)) )
  {
    HB_FUNC_EXEC( QTESTEVENTLIST_ADDKEYCLICK1 );
  }
  else if( ISBETWEEN(1,3) && ISCHAR(1) && (ISNUM(2)||ISNIL(2)) && (ISNUM(3)||ISNIL(3)) )
  {
    HB_FUNC_EXEC( QTESTEVENTLIST_ADDKEYCLICK2 );
  }
  else
  {
    hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
  }
}

/*
void addKeyClicks ( const QString & keys, Qt::KeyboardModifiers modifiers = Qt::NoModifier, int msecs = -1 )
*/
$method=|void|addKeyClicks|const QString &,Qt::KeyboardModifiers=Qt::NoModifier,int=-1

/*
void addKeyPress ( Qt::Key qtKey, Qt::KeyboardModifiers modifiers = Qt::NoModifier, int msecs = -1 )
*/
$method=|void|addKeyPress,addKeyPress1|Qt::Key,Qt::KeyboardModifiers=Qt::NoModifier,int=-1

/*
void addKeyPress ( char ascii, Qt::KeyboardModifiers modifiers = Qt::NoModifier, int msecs = -1 )
*/
$method=|void|addKeyPress,addKeyPress2|char,Qt::KeyboardModifiers=Qt::NoModifier,int=-1

//[1]void addKeyPress ( Qt::Key qtKey, Qt::KeyboardModifiers modifiers = Qt::NoModifier, int msecs = -1 )
//[2]void addKeyPress ( char ascii, Qt::KeyboardModifiers modifiers = Qt::NoModifier, int msecs = -1 )

HB_FUNC_STATIC( QTESTEVENTLIST_ADDKEYPRESS )
{
  if( ISBETWEEN(1,3) && ISNUM(1) && (ISNUM(2)||ISNIL(2)) && (ISNUM(3)||ISNIL(3)) )
  {
    HB_FUNC_EXEC( QTESTEVENTLIST_ADDKEYPRESS1 );
  }
  else if( ISBETWEEN(1,3) && ISCHAR(1) && (ISNUM(2)||ISNIL(2)) && (ISNUM(3)||ISNIL(3)) )
  {
    HB_FUNC_EXEC( QTESTEVENTLIST_ADDKEYPRESS2 );
  }
  else
  {
    hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
  }
}

/*
void addKeyRelease ( Qt::Key qtKey, Qt::KeyboardModifiers modifiers = Qt::NoModifier, int msecs = -1 )
*/
$method=|void|addKeyRelease,addKeyRelease1|Qt::Key,Qt::KeyboardModifiers=Qt::NoModifier,int=-1

/*
void addKeyRelease ( char ascii, Qt::KeyboardModifiers modifiers = Qt::NoModifier, int msecs = -1 )
*/
$method=|void|addKeyRelease,addKeyRelease2|char,Qt::KeyboardModifiers=Qt::NoModifier,int=-1

//[1]void addKeyRelease ( Qt::Key qtKey, Qt::KeyboardModifiers modifiers = Qt::NoModifier, int msecs = -1 )
//[2]void addKeyRelease ( char ascii, Qt::KeyboardModifiers modifiers = Qt::NoModifier, int msecs = -1 )

HB_FUNC_STATIC( QTESTEVENTLIST_ADDKEYRELEASE )
{
  if( ISBETWEEN(1,3) && ISNUM(1) && (ISNUM(2)||ISNIL(2)) && (ISNUM(3)||ISNIL(3)) )
  {
    HB_FUNC_EXEC( QTESTEVENTLIST_ADDKEYRELEASE1 );
  }
  else if( ISBETWEEN(1,3) && ISCHAR(1) && (ISNUM(2)||ISNIL(2)) && (ISNUM(3)||ISNIL(3)) )
  {
    HB_FUNC_EXEC( QTESTEVENTLIST_ADDKEYRELEASE2 );
  }
  else
  {
    hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
  }
}

/*
void addMouseClick ( Qt::MouseButton button, Qt::KeyboardModifiers modifiers = 0, QPoint pos = QPoint(), int delay = -1 )
*/
$method=|void|addMouseClick|Qt::MouseButton,Qt::KeyboardModifiers=0,QPoint=QPoint(),int=-1

/*
void addMouseDClick ( Qt::MouseButton button, Qt::KeyboardModifiers modifiers = 0, QPoint pos = QPoint(), int delay = -1 )
*/
$method=|void|addMouseDClick|Qt::MouseButton,Qt::KeyboardModifiers=0,QPoint=QPoint(),int=-1

/*
void addMouseMove ( QPoint pos = QPoint(), int delay = -1 )
*/
$method=|void|addMouseMove|QPoint=QPoint(),int=-1

/*
void addMousePress ( Qt::MouseButton button, Qt::KeyboardModifiers modifiers = 0, QPoint pos = QPoint(), int delay = -1 )
*/
$method=|void|addMousePress|Qt::MouseButton,Qt::KeyboardModifiers=0,QPoint=QPoint(),int=-1

/*
void addMouseRelease ( Qt::MouseButton button, Qt::KeyboardModifiers modifiers = 0, QPoint pos = QPoint(), int delay = -1 )
*/
$method=|void|addMouseRelease|Qt::MouseButton,Qt::KeyboardModifiers=0,QPoint=QPoint(),int=-1

/*
void clear ()
*/
$method=|void|clear|

/*
void simulate ( QWidget * w )
*/
$method=|void|simulate|QWidget *

$extraMethods

#pragma ENDDUMP


codegen/QtPurchasing: updated

codegen/QtPurchasing: updated

Modified:
codegen/QtPurchasing/QInAppStore.prg

%%
%% Qt5xHb - Bindings libraries for Harbour/xHarbour and Qt Framework 5
%%
%% Copyright (C) 2018 Marcos Antonio Gambeta <marcosgambeta AT outlook DOT com>
%%

$header

#include "hbclass.ch"

$addRequests

$beginClassFrom=QObject

   METHOD new
   METHOD delete

   METHOD restorePurchases
   METHOD registerProduct
   METHOD registeredProduct
   METHOD setPlatformProperty

$addSignals

$endClass

$destructor

#pragma BEGINDUMP

$includes

$prototype=explicit QInAppStore(QObject *parent = Q_NULLPTR)
$constructor=|new|QObject *=Q_NULLPTR

$prototype=~QInAppStore()
$deleteMethod

$prototype=Q_INVOKABLE void restorePurchases()
$method=|void|restorePurchases|

$prototype=Q_INVOKABLE void registerProduct(QInAppProduct::ProductType productType, const QString &identifier)
$method=|void|registerProduct|QInAppProduct::ProductType,const QString &

$prototype=Q_INVOKABLE QInAppProduct *registeredProduct(const QString &identifier) const
$method=|QInAppProduct *|registeredProduct|const QString &

$prototype=Q_INVOKABLE void setPlatformProperty(const QString &propertyName, const QString &value)
$method=|void|setPlatformProperty|const QString &,const QString &

$prototype=void registerPendingProducts() (private) (slot)

$prototype=void registerProduct(QInAppProduct *) (private) (slot)

$prototype=void setupBackend() (private)

$beginSignals
$signal=|productRegistered(QInAppProduct*)
$signal=|productUnknown(QInAppProduct::ProductType,QString)
$signal=|transactionReady(QInAppTransaction*)
$endSignals

#pragma ENDDUMP

%%
%% Qt5xHb - Bindings libraries for Harbour/xHarbour and Qt Framework 5
%%
%% Copyright (C) 2018 Marcos Antonio Gambeta <marcosgambeta AT outlook DOT com>
%%

$header

#include "hbclass.ch"

$addRequests

$beginClassFrom=QObject

   METHOD new
   METHOD delete

   METHOD restorePurchases
   METHOD registerProduct
   METHOD registeredProduct
   METHOD setPlatformProperty

   METHOD onProductRegistered
   METHOD onProductUnknown
   METHOD onTransactionReady

$endClass

$destructor

#pragma BEGINDUMP

$includes

$prototype=explicit QInAppStore(QObject *parent = Q_NULLPTR)
$constructor=|new|QObject *=Q_NULLPTR

$prototype=~QInAppStore()
$deleteMethod

$prototype=Q_INVOKABLE void restorePurchases()
$method=|void|restorePurchases|

$prototype=Q_INVOKABLE void registerProduct(QInAppProduct::ProductType productType, const QString &identifier)
$method=|void|registerProduct|QInAppProduct::ProductType,const QString &

$prototype=Q_INVOKABLE QInAppProduct *registeredProduct(const QString &identifier) const
$method=|QInAppProduct *|registeredProduct|const QString &

$prototype=Q_INVOKABLE void setPlatformProperty(const QString &propertyName, const QString &value)
$method=|void|setPlatformProperty|const QString &,const QString &

$prototype=void registerPendingProducts() (private) (slot)

$prototype=void registerProduct(QInAppProduct *) (private) (slot)

$prototype=void setupBackend() (private)

$beginSignals
$signal=|productRegistered(QInAppProduct*)
$signal=|productUnknown(QInAppProduct::ProductType,QString)
$signal=|transactionReady(QInAppTransaction*)
$endSignals

#pragma ENDDUMP


QtSerialPort: data for code generation updated

Modified:
codegen/QtSerialPort/QSerialPort.prg

%%
%% Qt5xHb - Bindings libraries for Harbour/xHarbour and Qt Framework 5
%%
%% Copyright (C) 2018 Marcos Antonio Gambeta <marcosgambeta AT outlook DOT com>
%%

$header

#include "hbclass.ch"

CLASS QSerialPort INHERIT QIODevice

   METHOD new
   METHOD delete
   METHOD setPortName
   METHOD portName
   METHOD setPort
   METHOD open
   METHOD close
   METHOD setSettingsRestoredOnClose
   METHOD settingsRestoredOnClose
   METHOD setBaudRate
   METHOD baudRate
   METHOD setDataBits
   METHOD dataBits
   METHOD setParity
   METHOD parity
   METHOD setStopBits
   METHOD stopBits
   METHOD setFlowControl
   METHOD flowControl
   METHOD setDataTerminalReady
   METHOD isDataTerminalReady
   METHOD setRequestToSend
   METHOD isRequestToSend
   METHOD pinoutSignals
   METHOD flush
   METHOD clear
   METHOD atEnd
   METHOD setDataErrorPolicy
   METHOD dataErrorPolicy
   METHOD error
   METHOD clearError
   METHOD readBufferSize
   METHOD setReadBufferSize
   METHOD isSequential
   METHOD bytesAvailable
   METHOD bytesToWrite
   METHOD canReadLine
   METHOD waitForReadyRead
   METHOD waitForBytesWritten
   METHOD sendBreak
   METHOD setBreakEnabled

   METHOD onBaudRateChanged
   METHOD onDataBitsChanged
   METHOD onParityChanged
   METHOD onStopBitsChanged
   METHOD onFlowControlChanged
   METHOD onDataErrorPolicyChanged
   METHOD onDataTerminalReadyChanged
   METHOD onRequestToSendChanged
   METHOD onError
   METHOD onSettingsRestoredOnCloseChanged

   DESTRUCTOR destroyObject

END CLASS

$destructor

#pragma BEGINDUMP

$includes=5,1,0

$prototype=QSerialPort(QObject *parent = 0)
$internalConstructor=5,1,0|new1|QObject *=0

$prototype=QSerialPort(const QString &name, QObject *parent = 0)
$internalConstructor=5,1,0|new2|const QString &,QObject *=0

$prototype=QSerialPort(const QSerialPortInfo &info, QObject *parent = 0)
$internalConstructor=5,1,0|new3|const QSerialPortInfo &,QObject *=0

//[1]QSerialPort(QObject *parent = 0)
//[2]QSerialPort(const QString &name, QObject *parent = 0)
//[3]QSerialPort(const QSerialPortInfo &info, QObject *parent = 0)

HB_FUNC_STATIC( QSERIALPORT_NEW )
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,1,0))
  if( ISBETWEEN(0,1) && ISOPTQOBJECT(1) )
  {
    QSerialPort_new1();
  }
  else if( ISBETWEEN(1,2) && ISCHAR(1) && ISOPTQOBJECT(2) )
  {
    QSerialPort_new2();
  }
  else if( ISBETWEEN(1,2) && ISQSERIALPORTINFO(1) && ISOPTQOBJECT(2) )
  {
    QSerialPort_new3();
  }
  else
  {
    hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
  }
#endif
}

$deleteMethod=5,1,0

$prototype=void setPortName(const QString &name)
$method=5,1,0|void|setPortName|const QString &

$prototype=QString portName() const
$method=5,1,0|QString|portName|

$prototype=void setPort(const QSerialPortInfo &info)
$method=5,1,0|void|setPort|const QSerialPortInfo &

$prototype=bool open(OpenMode mode) Q_DECL_OVERRIDE
$method=5,1,0|bool|open|QIODevice::OpenMode

$prototype=void close() Q_DECL_OVERRIDE
$method=5,1,0|void|close|

$prototype=void setSettingsRestoredOnClose(bool restore)
$method=5,1,0|void|setSettingsRestoredOnClose|bool

$prototype=bool settingsRestoredOnClose() const
$method=5,1,0|bool|settingsRestoredOnClose|

$prototype=bool setBaudRate(qint32 baudRate, Directions dir = AllDirections)
$method=5,1,0|bool|setBaudRate|qint32,QSerialPort::Directions=QSerialPort::AllDirections

$prototype=qint32 baudRate(Directions dir = AllDirections) const
$method=5,1,0|qint32|baudRate|QSerialPort::Directions=QSerialPort::AllDirections

$prototype=bool setDataBits(DataBits dataBits)
$method=5,1,0|bool|setDataBits|QSerialPort::DataBits

$prototype=DataBits dataBits() const
$method=5,1,0|QSerialPort::DataBits|dataBits|

$prototype=bool setParity(Parity parity)
$method=5,1,0|bool|setParity|QSerialPort::Parity

$prototype=Parity parity() const
$method=5,1,0|QSerialPort::Parity|parity|

$prototype=bool setStopBits(StopBits stopBits)
$method=5,1,0|bool|setStopBits|QSerialPort::StopBits

$prototype=StopBits stopBits() const
$method=5,1,0|QSerialPort::StopBits|stopBits|

$prototype=bool setFlowControl(FlowControl flow)
$method=5,1,0|bool|setFlowControl|QSerialPort::FlowControl

$prototype=FlowControl flowControl() const
$method=5,1,0|QSerialPort::FlowControl|flowControl|

$prototype=bool setDataTerminalReady(bool set)
$method=5,1,0|bool|setDataTerminalReady|bool

$prototype=bool isDataTerminalReady()
$method=5,1,0|bool|isDataTerminalReady|

$prototype=bool setRequestToSend(bool set)
$method=5,1,0|bool|setRequestToSend|bool

$prototype=bool isRequestToSend()
$method=5,1,0|bool|isRequestToSend|

$prototype=PinoutSignals pinoutSignals()
$method=5,1,0|QSerialPort::PinoutSignals|pinoutSignals|

$prototype=bool flush()
$method=5,1,0|bool|flush|

$prototype=bool clear(Directions dir = AllDirections)
$method=5,1,0|bool|clear|QSerialPort::Directions=QSerialPort::AllDirections

$prototype=bool atEnd() const Q_DECL_OVERRIDE
$method=5,1,0|bool|atEnd|

$prototype=bool setDataErrorPolicy(DataErrorPolicy policy = IgnorePolicy)
$method=5,1,0|bool|setDataErrorPolicy|QSerialPort::DataErrorPolicy=QSerialPort::IgnorePolicy

$prototype=DataErrorPolicy dataErrorPolicy() const
$method=5,1,0|QSerialPort::DataErrorPolicy|dataErrorPolicy|

$prototype=SerialPortError error() const
$method=5,1,0|QSerialPort::SerialPortError|error|

$prototype=void clearError()
$method=5,1,0|void|clearError|

$prototype=qint64 readBufferSize() const
$method=5,1,0|qint64|readBufferSize|

$prototype=void setReadBufferSize(qint64 size)
$method=5,1,0|void|setReadBufferSize|qint64

$prototype=bool isSequential() const Q_DECL_OVERRIDE
$method=5,1,0|bool|isSequential|

$prototype=qint64 bytesAvailable() const Q_DECL_OVERRIDE
$method=5,1,0|qint64|bytesAvailable|

$prototype=qint64 bytesToWrite() const Q_DECL_OVERRIDE
$method=5,1,0|qint64|bytesToWrite|

$prototype=bool canReadLine() const Q_DECL_OVERRIDE
$method=5,1,0|bool|canReadLine|

$prototype=bool waitForReadyRead(int msecs) Q_DECL_OVERRIDE
$method=5,1,0|bool|waitForReadyRead|int

$prototype=bool waitForBytesWritten(int msecs) Q_DECL_OVERRIDE
$method=5,1,0|bool|waitForBytesWritten|int

$prototype=bool sendBreak(int duration = 0)
$method=5,1,0|bool|sendBreak|int=0

$prototype=bool setBreakEnabled(bool set = true)
$method=5,1,0|bool|setBreakEnabled|bool=true

$beginSignals
$signalMethod=5,1,0|baudRateChanged(qint32,QSerialPort::Directions)
$signalMethod=5,1,0|dataBitsChanged(QSerialPort::DataBits)
$signalMethod=5,1,0|parityChanged(QSerialPort::Parity)
$signalMethod=5,1,0|stopBitsChanged(QSerialPort::StopBits)
$signalMethod=5,1,0|flowControlChanged(QSerialPort::FlowControl)
$signalMethod=5,1,0|dataErrorPolicyChanged(QSerialPort::DataErrorPolicy)
$signalMethod=5,1,0|dataTerminalReadyChanged(bool)
$signalMethod=5,1,0|requestToSendChanged(bool)
$signalMethod=5,1,0|error(QSerialPort::SerialPortError)
$signalMethod=5,1,0|settingsRestoredOnCloseChanged(bool)
$endSignals

#pragma ENDDUMP

%%
%% Qt5xHb - Bindings libraries for Harbour/xHarbour and Qt Framework 5
%%
%% Copyright (C) 2018 Marcos Antonio Gambeta <marcosgambeta AT outlook DOT com>
%%

$header

#include "hbclass.ch"

CLASS QSerialPort INHERIT QIODevice

   METHOD new
   METHOD delete
   METHOD setPortName
   METHOD portName
   METHOD setPort
   METHOD open
   METHOD close
   METHOD setSettingsRestoredOnClose
   METHOD settingsRestoredOnClose
   METHOD setBaudRate
   METHOD baudRate
   METHOD setDataBits
   METHOD dataBits
   METHOD setParity
   METHOD parity
   METHOD setStopBits
   METHOD stopBits
   METHOD setFlowControl
   METHOD flowControl
   METHOD setDataTerminalReady
   METHOD isDataTerminalReady
   METHOD setRequestToSend
   METHOD isRequestToSend
   METHOD pinoutSignals
   METHOD flush
   METHOD clear
   METHOD atEnd
   METHOD setDataErrorPolicy
   METHOD dataErrorPolicy
   METHOD error
   METHOD clearError
   METHOD readBufferSize
   METHOD setReadBufferSize
   METHOD isSequential
   METHOD bytesAvailable
   METHOD bytesToWrite
   METHOD canReadLine
   METHOD waitForReadyRead
   METHOD waitForBytesWritten
   METHOD sendBreak
   METHOD setBreakEnabled

   METHOD onBaudRateChanged
   METHOD onDataBitsChanged
   METHOD onParityChanged
   METHOD onStopBitsChanged
   METHOD onFlowControlChanged
   METHOD onDataErrorPolicyChanged
   METHOD onDataTerminalReadyChanged
   METHOD onRequestToSendChanged
   METHOD onError
   METHOD onSettingsRestoredOnCloseChanged

   DESTRUCTOR destroyObject

END CLASS

$destructor

#pragma BEGINDUMP

$includes=5,1,0

$prototype=QSerialPort(QObject *parent = 0)
$internalConstructor=5,1,0|new1|QObject *=0

$prototype=QSerialPort(const QString &name, QObject *parent = 0)
$internalConstructor=5,1,0|new2|const QString &,QObject *=0

$prototype=QSerialPort(const QSerialPortInfo &info, QObject *parent = 0)
$internalConstructor=5,1,0|new3|const QSerialPortInfo &,QObject *=0

//[1]QSerialPort(QObject *parent = 0)
//[2]QSerialPort(const QString &name, QObject *parent = 0)
//[3]QSerialPort(const QSerialPortInfo &info, QObject *parent = 0)

HB_FUNC_STATIC( QSERIALPORT_NEW )
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,1,0))
  if( ISBETWEEN(0,1) && ISOPTQOBJECT(1) )
  {
    QSerialPort_new1();
  }
  else if( ISBETWEEN(1,2) && ISCHAR(1) && ISOPTQOBJECT(2) )
  {
    QSerialPort_new2();
  }
  else if( ISBETWEEN(1,2) && ISQSERIALPORTINFO(1) && ISOPTQOBJECT(2) )
  {
    QSerialPort_new3();
  }
  else
  {
    hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
  }
#endif
}

$deleteMethod=5,1,0

$prototype=void setPortName(const QString &name)
$method=5,1,0|void|setPortName|const QString &

$prototype=QString portName() const
$method=5,1,0|QString|portName|

$prototype=void setPort(const QSerialPortInfo &info)
$method=5,1,0|void|setPort|const QSerialPortInfo &

$prototype=bool open(OpenMode mode) Q_DECL_OVERRIDE
$method=5,1,0|bool|open|QIODevice::OpenMode

$prototype=void close() Q_DECL_OVERRIDE
$method=5,1,0|void|close|

$prototype=void setSettingsRestoredOnClose(bool restore)
$method=5,1,0|void|setSettingsRestoredOnClose|bool

$prototype=bool settingsRestoredOnClose() const
$method=5,1,0|bool|settingsRestoredOnClose|

$prototype=bool setBaudRate(qint32 baudRate, Directions dir = AllDirections)
$method=5,1,0|bool|setBaudRate|qint32,QSerialPort::Directions=QSerialPort::AllDirections

$prototype=qint32 baudRate(Directions dir = AllDirections) const
$method=5,1,0|qint32|baudRate|QSerialPort::Directions=QSerialPort::AllDirections

$prototype=bool setDataBits(DataBits dataBits)
$method=5,1,0|bool|setDataBits|QSerialPort::DataBits

$prototype=DataBits dataBits() const
$method=5,1,0|QSerialPort::DataBits|dataBits|

$prototype=bool setParity(Parity parity)
$method=5,1,0|bool|setParity|QSerialPort::Parity

$prototype=Parity parity() const
$method=5,1,0|QSerialPort::Parity|parity|

$prototype=bool setStopBits(StopBits stopBits)
$method=5,1,0|bool|setStopBits|QSerialPort::StopBits

$prototype=StopBits stopBits() const
$method=5,1,0|QSerialPort::StopBits|stopBits|

$prototype=bool setFlowControl(FlowControl flow)
$method=5,1,0|bool|setFlowControl|QSerialPort::FlowControl

$prototype=FlowControl flowControl() const
$method=5,1,0|QSerialPort::FlowControl|flowControl|

$prototype=bool setDataTerminalReady(bool set)
$method=5,1,0|bool|setDataTerminalReady|bool

$prototype=bool isDataTerminalReady()
$method=5,1,0|bool|isDataTerminalReady|

$prototype=bool setRequestToSend(bool set)
$method=5,1,0|bool|setRequestToSend|bool

$prototype=bool isRequestToSend()
$method=5,1,0|bool|isRequestToSend|

$prototype=PinoutSignals pinoutSignals()
$method=5,1,0|QSerialPort::PinoutSignals|pinoutSignals|

$prototype=bool flush()
$method=5,1,0|bool|flush|

$prototype=bool clear(Directions dir = AllDirections)
$method=5,1,0|bool|clear|QSerialPort::Directions=QSerialPort::AllDirections

$prototype=bool atEnd() const Q_DECL_OVERRIDE
$method=5,1,0|bool|atEnd|

$prototype=bool setDataErrorPolicy(DataErrorPolicy policy = IgnorePolicy)
$method=5,1,0|bool|setDataErrorPolicy|QSerialPort::DataErrorPolicy=QSerialPort::IgnorePolicy

$prototype=DataErrorPolicy dataErrorPolicy() const
$method=5,1,0|QSerialPort::DataErrorPolicy|dataErrorPolicy|

$prototype=SerialPortError error() const
$method=5,1,0|QSerialPort::SerialPortError|error|

$prototype=void clearError()
$method=5,1,0|void|clearError|

$prototype=qint64 readBufferSize() const
$method=5,1,0|qint64|readBufferSize|

$prototype=void setReadBufferSize(qint64 size)
$method=5,1,0|void|setReadBufferSize|qint64

$prototype=bool isSequential() const Q_DECL_OVERRIDE
$method=5,1,0|bool|isSequential|

$prototype=qint64 bytesAvailable() const Q_DECL_OVERRIDE
$method=5,1,0|qint64|bytesAvailable|

$prototype=qint64 bytesToWrite() const Q_DECL_OVERRIDE
$method=5,1,0|qint64|bytesToWrite|

$prototype=bool canReadLine() const Q_DECL_OVERRIDE
$method=5,1,0|bool|canReadLine|

$prototype=bool waitForReadyRead(int msecs) Q_DECL_OVERRIDE
$method=5,1,0|bool|waitForReadyRead|int

$prototype=bool waitForBytesWritten(int msecs) Q_DECL_OVERRIDE
$method=5,1,0|bool|waitForBytesWritten|int

$prototype=bool sendBreak(int duration = 0)
$method=5,1,0|bool|sendBreak|int=0

$prototype=bool setBreakEnabled(bool set = true)
$method=5,1,0|bool|setBreakEnabled|bool=true

$connectSignalFunction

$signalMethod=5,1,0|baudRateChanged(qint32,QSerialPort::Directions)
$signalMethod=5,1,0|dataBitsChanged(QSerialPort::DataBits)
$signalMethod=5,1,0|parityChanged(QSerialPort::Parity)
$signalMethod=5,1,0|stopBitsChanged(QSerialPort::StopBits)
$signalMethod=5,1,0|flowControlChanged(QSerialPort::FlowControl)
$signalMethod=5,1,0|dataErrorPolicyChanged(QSerialPort::DataErrorPolicy)
$signalMethod=5,1,0|dataTerminalReadyChanged(bool)
$signalMethod=5,1,0|requestToSendChanged(bool)
$signalMethod=5,1,0|error(QSerialPort::SerialPortError)
$signalMethod=5,1,0|settingsRestoredOnCloseChanged(bool)

#pragma ENDDUMP


codegen/QtWebEngineCore: updated

codegen/QtWebEngineCore: updated

Modified:
codegen/QtWebEngineCore/QWebEngineHttpRequest.prg

%%
%% Qt5xHb - Bindings libraries for Harbour/xHarbour and Qt Framework 5
%%
%% Copyright (C) 2020 Marcos Antonio Gambeta <marcosgambeta AT outlook DOT com>
%%

$project=Qt5xHb
$module=QtWebEngineCore

$header

#include "hbclass.ch"

$addRequests

$beginClassFrom=

$addMethods

$endClass

$destructor

#pragma BEGINDUMP

$includes

$prototype=explicit QWebEngineHttpRequest(const QUrl &url = QUrl(), const QWebEngineHttpRequest::Method &method = QWebEngineHttpRequest::Get)
$constructor=|new1|const QUrl &=QUrl(),const QWebEngineHttpRequest::Method &=QWebEngineHttpRequest::Get

$prototype=QWebEngineHttpRequest(const QWebEngineHttpRequest &other)
$constructor=|new2|const QWebEngineHttpRequest &

/*
[1]explicit QWebEngineHttpRequest(const QUrl &url = QUrl(), const QWebEngineHttpRequest::Method &method = QWebEngineHttpRequest::Get)
[2]QWebEngineHttpRequest(const QWebEngineHttpRequest &other)
*/

HB_FUNC_STATIC( QWEBENGINEHTTPREQUEST_NEW )
{
%% TODO: implementar
}

$prototype=~QWebEngineHttpRequest()
$deleteMethod

$prototype=static QWebEngineHttpRequest postRequest(const QUrl &url, const QMap<QString, QString> &postData)
%% TODO: implementar QMap
%% $staticMethod=|QWebEngineHttpRequest|postRequest|const QUrl &,const QMap<QString, QString> &

$prototype=void swap(QWebEngineHttpRequest &other)
$method=|void|swap|QWebEngineHttpRequest &

$prototype=Method method() const
$method=|QWebEngineHttpRequest::Method|method|

$prototype=void setMethod(QWebEngineHttpRequest::Method method)
$method=|void|setMethod|QWebEngineHttpRequest::Method

$prototype=QUrl url() const
$method=|QUrl|url|

$prototype=void setUrl(const QUrl &url)
$method=|void|setUrl|const QUrl &

$prototype=QByteArray postData() const
$method=|QByteArray|postData|

$prototype=void setPostData(const QByteArray &postData)
$method=|void|setPostData|const QByteArray &

$prototype=bool hasHeader(const QByteArray &headerName) const
$method=|bool|hasHeader|const QByteArray &

$prototype=QVector<QByteArray> headers() const
$method=|QVector<QByteArray>|headers|

$prototype=QByteArray header(const QByteArray &headerName) const
$method=|QByteArray|header|const QByteArray &

$prototype=void setHeader(const QByteArray &headerName, const QByteArray &value)
$method=|void|setHeader|const QByteArray &,const QByteArray &

$prototype=void unsetHeader(const QByteArray &headerName)
$method=|void|unsetHeader|const QByteArray &

#pragma ENDDUMP

%%
%% Qt5xHb - Bindings libraries for Harbour/xHarbour and Qt Framework 5
%%
%% Copyright (C) 2020 Marcos Antonio Gambeta <marcosgambeta AT outlook DOT com>
%%

$project=Qt5xHb
$module=QtWebEngineCore

$header

#include "hbclass.ch"

$addRequests

$beginClassFrom=

$addMethods

$endClass

$destructor

#pragma BEGINDUMP

$includes

$prototype=explicit QWebEngineHttpRequest(const QUrl &url = QUrl(), const QWebEngineHttpRequest::Method &method = QWebEngineHttpRequest::Get)
$constructor=|new1|const QUrl &=QUrl(),const QWebEngineHttpRequest::Method &=QWebEngineHttpRequest::Get

$prototype=QWebEngineHttpRequest(const QWebEngineHttpRequest &other)
$constructor=|new2|const QWebEngineHttpRequest &

//[1]explicit QWebEngineHttpRequest(const QUrl &url = QUrl(), const QWebEngineHttpRequest::Method &method = QWebEngineHttpRequest::Get)
//[2]QWebEngineHttpRequest(const QWebEngineHttpRequest &other)

HB_FUNC_STATIC( QWEBENGINEHTTPREQUEST_NEW )
{
%% TODO: implementar
}

$prototype=~QWebEngineHttpRequest()
$deleteMethod

$prototype=static QWebEngineHttpRequest postRequest(const QUrl &url, const QMap<QString, QString> &postData)
%% TODO: implementar QMap
%% $staticMethod=|QWebEngineHttpRequest|postRequest|const QUrl &,const QMap<QString, QString> &

$prototype=void swap(QWebEngineHttpRequest &other)
$method=|void|swap|QWebEngineHttpRequest &

$prototype=Method method() const
$method=|QWebEngineHttpRequest::Method|method|

$prototype=void setMethod(QWebEngineHttpRequest::Method method)
$method=|void|setMethod|QWebEngineHttpRequest::Method

$prototype=QUrl url() const
$method=|QUrl|url|

$prototype=void setUrl(const QUrl &url)
$method=|void|setUrl|const QUrl &

$prototype=QByteArray postData() const
$method=|QByteArray|postData|

$prototype=void setPostData(const QByteArray &postData)
$method=|void|setPostData|const QByteArray &

$prototype=bool hasHeader(const QByteArray &headerName) const
$method=|bool|hasHeader|const QByteArray &

$prototype=QVector<QByteArray> headers() const
$method=|QVector<QByteArray>|headers|

$prototype=QByteArray header(const QByteArray &headerName) const
$method=|QByteArray|header|const QByteArray &

$prototype=void setHeader(const QByteArray &headerName, const QByteArray &value)
$method=|void|setHeader|const QByteArray &,const QByteArray &

$prototype=void unsetHeader(const QByteArray &headerName)
$method=|void|unsetHeader|const QByteArray &

#pragma ENDDUMP


QtWinExtras: modified to use macros

QtWinExtras: modified to use macros

Modified:
source/QtWinExtras/QtWin.prg

/*

  Qt5xHb - bibliotecas de ligao entre Harbour/xHarbour e Qt Framework 5

  Copyright (C) 2012-2017 Marcos Antonio Gambeta <marcosgambeta@uol.com.br>

*/

#include "hbclass.ch"

#ifndef QT5XHB_NO_REQUESTS
REQUEST QPIXMAP
REQUEST QIMAGE
REQUEST QREGION
REQUEST QCOLOR
#endif

CLASS QtWin

   DATA pointer
   DATA self_destruction INIT .F.

   METHOD createMask
   METHOD toHBITMAP
   METHOD fromHBITMAP
   METHOD toHICON
   METHOD imageFromHBITMAP
   METHOD fromHICON
   METHOD toHRGN
   METHOD fromHRGN
   METHOD stringFromHresult
   METHOD errorStringFromHresult
   METHOD colorizationColor
   METHOD realColorizationColor
   METHOD setWindowExcludedFromPeek
   METHOD isWindowExcludedFromPeek
   METHOD setWindowDisallowPeek
   METHOD isWindowPeekDisallowed
   METHOD setWindowFlip3DPolicy
   METHOD windowFlip3DPolicy
   METHOD extendFrameIntoClientArea1
   METHOD extendFrameIntoClientArea2
   METHOD extendFrameIntoClientArea
   METHOD resetExtendedFrame
   METHOD enableBlurBehindWindow1
   METHOD enableBlurBehindWindow2
   METHOD enableBlurBehindWindow
   METHOD disableBlurBehindWindow
   METHOD isCompositionEnabled
   METHOD setCompositionEnabled
   METHOD isCompositionOpaque
   METHOD setCurrentProcessExplicitAppUserModelID
   METHOD markFullscreenWindow
   METHOD taskbarActivateTab
   METHOD taskbarActivateTabAlt
   METHOD taskbarAddTab
   METHOD taskbarDeleteTab

   METHOD newFrom
   METHOD newFromObject
   METHOD newFromPointer
   METHOD selfDestruction
   METHOD setSelfDestruction

   DESTRUCTOR destroyObject

END CLASS

PROCEDURE destroyObject () CLASS QtWin
   IF ::self_destruction
      ::delete()
   ENDIF
RETURN

#pragma BEGINDUMP

#include <Qt>

#ifndef __XHARBOUR__
#if (QT_VERSION >= QT_VERSION_CHECK(5,2,0))
#include <QtWin>
#endif
#endif

#include "qt5xhb_common.h"
#include "qt5xhb_macros.h"
#include "qt5xhb_utils.h"

#ifdef __XHARBOUR__
#if (QT_VERSION >= QT_VERSION_CHECK(5,2,0))
#include <QtWin>
#endif
#endif

/*
static HBITMAP createMask(const QBitmap &bitmap)
*/
HB_FUNC_STATIC( QTWIN_CREATEMASK )
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,2,0))
  hb_retptr( (HBITMAP) QtWin::createMask ( *PQBITMAP(1) ) );
#endif
}

/*
static HBITMAP toHBITMAP(const QPixmap &p, HBitmapFormat format = HBitmapNoAlpha)
*/
HB_FUNC_STATIC( QTWIN_TOHBITMAP )
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,2,0))
  int par2 = ISNIL(2)? (int) QtWin::HBitmapNoAlpha : hb_parni(2);
  hb_retptr( (HBITMAP) QtWin::toHBITMAP ( *PQPIXMAP(1), (QtWin::HBitmapFormat) par2 ) );
#endif
}

/*
static QPixmap fromHBITMAP(HBITMAP bitmap, HBitmapFormat format = HBitmapNoAlpha)
*/
HB_FUNC_STATIC( QTWIN_FROMHBITMAP )
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,2,0))
  HBITMAP par1 = (HBITMAP) hb_parptr(1);
  int par2 = ISNIL(2)? (int) QtWin::HBitmapNoAlpha : hb_parni(2);
  QPixmap * ptr = new QPixmap( QtWin::fromHBITMAP ( par1, (QtWin::HBitmapFormat) par2 ) );
  _qt5xhb_createReturnClass ( ptr, "QPIXMAP", true );
#endif
}

/*
static HICON toHICON(const QPixmap &p)
*/
HB_FUNC_STATIC( QTWIN_TOHICON )
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,2,0))
  hb_retptr( (HICON) QtWin::toHICON ( *PQPIXMAP(1) ) );
#endif
}

/*
static QImage imageFromHBITMAP(HDC hdc, HBITMAP bitmap, int width, int height)
*/
HB_FUNC_STATIC( QTWIN_IMAGEFROMHBITMAP )
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,2,0))
  HDC par1 = (HDC) hb_parptr(1);
  HBITMAP par2 = (HBITMAP) hb_parptr(2);
  QImage * ptr = new QImage( QtWin::imageFromHBITMAP ( par1, par2, PINT(3), PINT(4) ) );
  _qt5xhb_createReturnClass ( ptr, "QIMAGE", true );
#endif
}

/*
static QPixmap fromHICON(HICON icon)
*/
HB_FUNC_STATIC( QTWIN_FROMHICON )
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,2,0))
  HICON par1 = (HICON) hb_parptr(1);
  QPixmap * ptr = new QPixmap( QtWin::fromHICON ( par1 ) );
  _qt5xhb_createReturnClass ( ptr, "QPIXMAP", true );
#endif
}

/*
static HRGN toHRGN(const QRegion &region)
*/
HB_FUNC_STATIC( QTWIN_TOHRGN )
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,2,0))
  hb_retptr( (HRGN) QtWin::toHRGN ( *PQREGION(1) ) );
#endif
}

/*
static QRegion fromHRGN(HRGN hrgn)
*/
HB_FUNC_STATIC( QTWIN_FROMHRGN )
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,2,0))
  HRGN par1 = (HRGN) hb_parptr(1);
  QRegion * ptr = new QRegion( QtWin::fromHRGN ( par1 ) );
  _qt5xhb_createReturnClass ( ptr, "QREGION", true );
#endif
}

/*
static QString stringFromHresult(HRESULT hresult)
*/
HB_FUNC_STATIC( QTWIN_STRINGFROMHRESULT )
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,2,0))
#ifndef Q_OS_WIN64
  HRESULT par1 = (HRESULT) hb_parptr(1);
  hb_retc( RQSTRING( QtWin::stringFromHresult ( par1 ) ) );
#endif
#endif
}

/*
static QString errorStringFromHresult(HRESULT hresult)
*/
HB_FUNC_STATIC( QTWIN_ERRORSTRINGFROMHRESULT )
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,2,0))
#ifndef Q_OS_WIN64
  HRESULT par1 = (HRESULT) hb_parptr(1);
  hb_retc( RQSTRING( QtWin::errorStringFromHresult ( par1 ) ) );
#endif
#endif
}

/*
static QColor colorizationColor(bool *opaqueBlend = 0)
*/
HB_FUNC_STATIC( QTWIN_COLORIZATIONCOLOR )
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,2,0))
  bool par1;
  QColor * ptr = new QColor( QtWin::colorizationColor ( &par1 ) );
  _qt5xhb_createReturnClass ( ptr, "QCOLOR", true );
  hb_storl( par1, 1 );
#endif
}

/*
static QColor realColorizationColor()
*/
HB_FUNC_STATIC( QTWIN_REALCOLORIZATIONCOLOR )
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,2,0))
  QColor * ptr = new QColor( QtWin::realColorizationColor () );
  _qt5xhb_createReturnClass ( ptr, "QCOLOR", true );
#endif
}

/*
static void setWindowExcludedFromPeek(QWindow *window, bool exclude)
*/
HB_FUNC_STATIC( QTWIN_SETWINDOWEXCLUDEDFROMPEEK )
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,2,0))
  QWindow * par1 = (QWindow *) _qt5xhb_itemGetPtr(1);
  QtWin::setWindowExcludedFromPeek ( par1, PBOOL(2) );
  hb_itemReturn( hb_stackSelfItem() );
#endif
}

/*
static bool isWindowExcludedFromPeek(QWindow *window)
*/
HB_FUNC_STATIC( QTWIN_ISWINDOWEXCLUDEDFROMPEEK )
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,2,0))
  QWindow * par1 = (QWindow *) _qt5xhb_itemGetPtr(1);
  hb_retl( QtWin::isWindowExcludedFromPeek ( par1 ) );
#endif
}

/*
static void setWindowDisallowPeek(QWindow *window, bool disallow)
*/
HB_FUNC_STATIC( QTWIN_SETWINDOWDISALLOWPEEK )
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,2,0))
  QWindow * par1 = (QWindow *) _qt5xhb_itemGetPtr(1);
  QtWin::setWindowDisallowPeek ( par1, PBOOL(2) );
  hb_itemReturn( hb_stackSelfItem() );
#endif
}

/*
static bool isWindowPeekDisallowed(QWindow *window)
*/
HB_FUNC_STATIC( QTWIN_ISWINDOWPEEKDISALLOWED )
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,2,0))
  QWindow * par1 = (QWindow *) _qt5xhb_itemGetPtr(1);
  hb_retl( QtWin::isWindowPeekDisallowed ( par1 ) );
#endif
}

/*
static void setWindowFlip3DPolicy(QWindow *window, WindowFlip3DPolicy policy)
*/
HB_FUNC_STATIC( QTWIN_SETWINDOWFLIP3DPOLICY )
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,2,0))
  QWindow * par1 = (QWindow *) _qt5xhb_itemGetPtr(1);
  int par2 = hb_parni(2);
  QtWin::setWindowFlip3DPolicy ( par1, (QtWin::WindowFlip3DPolicy) par2 );
  hb_itemReturn( hb_stackSelfItem() );
#endif
}

/*
static WindowFlip3DPolicy windowFlip3DPolicy(QWindow *)
*/
HB_FUNC_STATIC( QTWIN_WINDOWFLIP3DPOLICY )
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,2,0))
  QWindow * par1 = (QWindow *) _qt5xhb_itemGetPtr(1);
  hb_retni( QtWin::windowFlip3DPolicy ( par1 ) );
#endif
}

/*
static void extendFrameIntoClientArea(QWindow *window, int left, int top, int right, int bottom)
*/
HB_FUNC_STATIC( QTWIN_EXTENDFRAMEINTOCLIENTAREA1 )
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,2,0))
  QWindow * par1 = (QWindow *) _qt5xhb_itemGetPtr(1);
  QtWin::extendFrameIntoClientArea ( par1, PINT(2), PINT(3), PINT(4), PINT(5) );
  hb_itemReturn( hb_stackSelfItem() );
#endif
}

/*
static void extendFrameIntoClientArea(QWindow *window, const QMargins &margins)
*/
HB_FUNC_STATIC( QTWIN_EXTENDFRAMEINTOCLIENTAREA2 )
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,2,0))
  QWindow * par1 = (QWindow *) _qt5xhb_itemGetPtr(1);
  QMargins * par2 = (QMargins *) _qt5xhb_itemGetPtr(2);
  QtWin::extendFrameIntoClientArea ( par1, *par2 );
  hb_itemReturn( hb_stackSelfItem() );
#endif
}

//[1]void extendFrameIntoClientArea(QWindow *window, int left, int top, int right, int bottom)
//[2]void extendFrameIntoClientArea(QWindow *window, const QMargins &margins)

HB_FUNC_STATIC( QTWIN_EXTENDFRAMEINTOCLIENTAREA )
{
  if( ISNUMPAR(5) && ISQWINDOW(1) && ISNUM(2) && ISNUM(3) && ISNUM(4) && ISNUM(5) )
  {
    HB_FUNC_EXEC( QTWIN_EXTENDFRAMEINTOCLIENTAREA1 );
  }
  else if( ISNUMPAR(2) && ISQWINDOW(1) && ISQMARGINS(2) )
  {
    HB_FUNC_EXEC( QTWIN_EXTENDFRAMEINTOCLIENTAREA2 );
  }
  else
  {
    hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
  }
}

/*
static void resetExtendedFrame(QWindow *window)
*/
HB_FUNC_STATIC( QTWIN_RESETEXTENDEDFRAME )
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,2,0))
  QWindow * par1 = (QWindow *) _qt5xhb_itemGetPtr(1);
  QtWin::resetExtendedFrame ( par1 );
  hb_itemReturn( hb_stackSelfItem() );
#endif
}

/*
static void enableBlurBehindWindow(QWindow *window, const QRegion &region)
*/
HB_FUNC_STATIC( QTWIN_ENABLEBLURBEHINDWINDOW1 )
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,2,0))
  QWindow * par1 = (QWindow *) _qt5xhb_itemGetPtr(1);
  QtWin::enableBlurBehindWindow ( par1, *PQREGION(2) );
  hb_itemReturn( hb_stackSelfItem() );
#endif
}

/*
static void enableBlurBehindWindow(QWindow *window)
*/
HB_FUNC_STATIC( QTWIN_ENABLEBLURBEHINDWINDOW2 )
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,2,0))
  QWindow * par1 = (QWindow *) _qt5xhb_itemGetPtr(1);
  QtWin::enableBlurBehindWindow ( par1 );
  hb_itemReturn( hb_stackSelfItem() );
#endif
}

//[1]void enableBlurBehindWindow(QWindow *window, const QRegion &region)
//[2]void enableBlurBehindWindow(QWindow *window)

HB_FUNC_STATIC( QTWIN_ENABLEBLURBEHINDWINDOW )
{
  if( ISNUMPAR(1) && ISQWINDOW(1) && ISQREGION(2) )
  {
    HB_FUNC_EXEC( QTWIN_ENABLEBLURBEHINDWINDOW1 );
  }
  else if( ISNUMPAR(1) && ISQWINDOW(1) )
  {
    HB_FUNC_EXEC( QTWIN_ENABLEBLURBEHINDWINDOW2 );
  }
  else
  {
    hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
  }
}

/*
static void disableBlurBehindWindow(QWindow *window)
*/
HB_FUNC_STATIC( QTWIN_DISABLEBLURBEHINDWINDOW )
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,2,0))
  QWindow * par1 = (QWindow *) _qt5xhb_itemGetPtr(1);
  QtWin::disableBlurBehindWindow ( par1 );
  hb_itemReturn( hb_stackSelfItem() );
#endif
}

/*
static bool isCompositionEnabled()
*/
HB_FUNC_STATIC( QTWIN_ISCOMPOSITIONENABLED )
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,2,0))
  hb_retl( QtWin::isCompositionEnabled () );
#endif
}

/*
static void setCompositionEnabled(bool enabled)
*/
HB_FUNC_STATIC( QTWIN_SETCOMPOSITIONENABLED )
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,2,0))
  QtWin::setCompositionEnabled ( PBOOL(1) );
  hb_itemReturn( hb_stackSelfItem() );
#endif
}

/*
static bool isCompositionOpaque()
*/
HB_FUNC_STATIC( QTWIN_ISCOMPOSITIONOPAQUE )
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,2,0))
  hb_retl( QtWin::isCompositionOpaque () );
#endif
}

/*
static void setCurrentProcessExplicitAppUserModelID(const QString &id)
*/
HB_FUNC_STATIC( QTWIN_SETCURRENTPROCESSEXPLICITAPPUSERMODELID )
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,2,0))
  QtWin::setCurrentProcessExplicitAppUserModelID ( PQSTRING(1) );
  hb_itemReturn( hb_stackSelfItem() );
#endif
}

/*
static void markFullscreenWindow(QWindow *, bool fullscreen = true)
*/
HB_FUNC_STATIC( QTWIN_MARKFULLSCREENWINDOW )
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,2,0))
  QWindow * par1 = (QWindow *) _qt5xhb_itemGetPtr(1);
  QtWin::markFullscreenWindow ( par1, OPBOOL(2,true) );
  hb_itemReturn( hb_stackSelfItem() );
#endif
}

/*
static void taskbarActivateTab(QWindow *)
*/
HB_FUNC_STATIC( QTWIN_TASKBARACTIVATETAB )
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,2,0))
  QWindow * par1 = (QWindow *) _qt5xhb_itemGetPtr(1);
  QtWin::taskbarActivateTab ( par1 );
  hb_itemReturn( hb_stackSelfItem() );
#endif
}

/*
static void taskbarActivateTabAlt(QWindow *)
*/
HB_FUNC_STATIC( QTWIN_TASKBARACTIVATETABALT )
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,2,0))
  QWindow * par1 = (QWindow *) _qt5xhb_itemGetPtr(1);
  QtWin::taskbarActivateTabAlt ( par1 );
  hb_itemReturn( hb_stackSelfItem() );
#endif
}

/*
static void taskbarAddTab(QWindow *)
*/
HB_FUNC_STATIC( QTWIN_TASKBARADDTAB )
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,2,0))
  QWindow * par1 = (QWindow *) _qt5xhb_itemGetPtr(1);
  QtWin::taskbarAddTab ( par1 );
  hb_itemReturn( hb_stackSelfItem() );
#endif
}

/*
static void taskbarDeleteTab(QWindow *)
*/
HB_FUNC_STATIC( QTWIN_TASKBARDELETETAB )
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,2,0))
  QWindow * par1 = (QWindow *) _qt5xhb_itemGetPtr(1);
  QtWin::taskbarDeleteTab ( par1 );
  hb_itemReturn( hb_stackSelfItem() );
#endif
}

HB_FUNC_STATIC( QTWIN_NEWFROM )
{
  PHB_ITEM self = hb_stackSelfItem();
  if( hb_pcount() == 1 && ISOBJECT(1) )
  {
    PHB_ITEM ptr = hb_itemPutPtr( NULL, (void *) hb_itemGetPtr( hb_objSendMsg( hb_param(1, HB_IT_OBJECT ), "POINTER", 0 ) ) );
    hb_objSendMsg( self, "_pointer", 1, ptr );
    hb_itemRelease( ptr );
    PHB_ITEM des = hb_itemPutL( NULL, false );
    hb_objSendMsg( self, "_self_destruction", 1, des );
    hb_itemRelease( des );
  }
  else if( hb_pcount() == 1 && ISPOINTER(1) )
  {
    PHB_ITEM ptr = hb_itemPutPtr( NULL, (void *) hb_itemGetPtr( hb_param(1, HB_IT_POINTER ) ) );
    hb_objSendMsg( self, "_pointer", 1, ptr );
    hb_itemRelease( ptr );
    PHB_ITEM des = hb_itemPutL( NULL, false );
    hb_objSendMsg( self, "_self_destruction", 1, des );
    hb_itemRelease( des );
  }
  hb_itemReturn( self );
}

HB_FUNC_STATIC( QTWIN_NEWFROMOBJECT )
{
  HB_FUNC_EXEC( QTWIN_NEWFROM );
}

HB_FUNC_STATIC( QTWIN_NEWFROMPOINTER )
{
  HB_FUNC_EXEC( QTWIN_NEWFROM );
}

HB_FUNC_STATIC( QTWIN_SELFDESTRUCTION )
{
  hb_retl( (bool) hb_itemGetL( hb_objSendMsg( hb_stackSelfItem(), "SELF_DESTRUCTION", 0 ) ) );
}

HB_FUNC_STATIC( QTWIN_SETSELFDESTRUCTION )
{
  PHB_ITEM self = hb_stackSelfItem();
  if( hb_pcount() == 1 && ISLOG(1) )
  {
    PHB_ITEM des = hb_itemPutL( NULL, hb_parl(1) );
    hb_objSendMsg( self, "_self_destruction", 1, des );
    hb_itemRelease( des );
  }
  hb_itemReturn( self );
}

#pragma ENDDUMP

/*

  Qt5xHb - bibliotecas de ligao entre Harbour/xHarbour e Qt Framework 5

  Copyright (C) 2012-2017 Marcos Antonio Gambeta <marcosgambeta@uol.com.br>

*/

#include "hbclass.ch"

#ifndef QT5XHB_NO_REQUESTS
REQUEST QPIXMAP
REQUEST QIMAGE
REQUEST QREGION
REQUEST QCOLOR
#endif

CLASS QtWin

   DATA pointer
   DATA self_destruction INIT .F.

   METHOD createMask
   METHOD toHBITMAP
   METHOD fromHBITMAP
   METHOD toHICON
   METHOD imageFromHBITMAP
   METHOD fromHICON
   METHOD toHRGN
   METHOD fromHRGN
   METHOD stringFromHresult
   METHOD errorStringFromHresult
   METHOD colorizationColor
   METHOD realColorizationColor
   METHOD setWindowExcludedFromPeek
   METHOD isWindowExcludedFromPeek
   METHOD setWindowDisallowPeek
   METHOD isWindowPeekDisallowed
   METHOD setWindowFlip3DPolicy
   METHOD windowFlip3DPolicy
   METHOD extendFrameIntoClientArea1
   METHOD extendFrameIntoClientArea2
   METHOD extendFrameIntoClientArea
   METHOD resetExtendedFrame
   METHOD enableBlurBehindWindow1
   METHOD enableBlurBehindWindow2
   METHOD enableBlurBehindWindow
   METHOD disableBlurBehindWindow
   METHOD isCompositionEnabled
   METHOD setCompositionEnabled
   METHOD isCompositionOpaque
   METHOD setCurrentProcessExplicitAppUserModelID
   METHOD markFullscreenWindow
   METHOD taskbarActivateTab
   METHOD taskbarActivateTabAlt
   METHOD taskbarAddTab
   METHOD taskbarDeleteTab

   METHOD newFrom
   METHOD newFromObject
   METHOD newFromPointer
   METHOD selfDestruction
   METHOD setSelfDestruction

   DESTRUCTOR destroyObject

END CLASS

PROCEDURE destroyObject () CLASS QtWin
   IF ::self_destruction
      ::delete()
   ENDIF
RETURN

#pragma BEGINDUMP

#include <Qt>

#ifndef __XHARBOUR__
#if (QT_VERSION >= QT_VERSION_CHECK(5,2,0))
#include <QtWin>
#endif
#endif

#include "qt5xhb_common.h"
#include "qt5xhb_macros.h"
#include "qt5xhb_utils.h"

#ifdef __XHARBOUR__
#if (QT_VERSION >= QT_VERSION_CHECK(5,2,0))
#include <QtWin>
#endif
#endif

/*
static HBITMAP createMask(const QBitmap &bitmap)
*/
HB_FUNC_STATIC( QTWIN_CREATEMASK )
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,2,0))
  QBitmap * par1 = (QBitmap *) _qt5xhb_itemGetPtr(1);
  hb_retptr( (HBITMAP) QtWin::createMask ( *par1 ) );
#endif
}

/*
static HBITMAP toHBITMAP(const QPixmap &p, HBitmapFormat format = HBitmapNoAlpha)
*/
HB_FUNC_STATIC( QTWIN_TOHBITMAP )
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,2,0))
  QPixmap * par1 = (QPixmap *) _qt5xhb_itemGetPtr(1);
  int par2 = ISNIL(2)? (int) QtWin::HBitmapNoAlpha : hb_parni(2);
  hb_retptr( (HBITMAP) QtWin::toHBITMAP ( *par1, (QtWin::HBitmapFormat) par2 ) );
#endif
}

/*
static QPixmap fromHBITMAP(HBITMAP bitmap, HBitmapFormat format = HBitmapNoAlpha)
*/
HB_FUNC_STATIC( QTWIN_FROMHBITMAP )
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,2,0))
  HBITMAP par1 = (HBITMAP) hb_parptr(1);
  int par2 = ISNIL(2)? (int) QtWin::HBitmapNoAlpha : hb_parni(2);
  QPixmap * ptr = new QPixmap( QtWin::fromHBITMAP ( par1, (QtWin::HBitmapFormat) par2 ) );
  _qt5xhb_createReturnClass ( ptr, "QPIXMAP", true );
#endif
}

/*
static HICON toHICON(const QPixmap &p)
*/
HB_FUNC_STATIC( QTWIN_TOHICON )
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,2,0))
  QPixmap * par1 = (QPixmap *) _qt5xhb_itemGetPtr(1);
  hb_retptr( (HICON) QtWin::toHICON ( *par1 ) );
#endif
}

/*
static QImage imageFromHBITMAP(HDC hdc, HBITMAP bitmap, int width, int height)
*/
HB_FUNC_STATIC( QTWIN_IMAGEFROMHBITMAP )
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,2,0))
  HDC par1 = (HDC) hb_parptr(1);
  HBITMAP par2 = (HBITMAP) hb_parptr(2);
  QImage * ptr = new QImage( QtWin::imageFromHBITMAP ( par1, par2, PINT(3), PINT(4) ) );
  _qt5xhb_createReturnClass ( ptr, "QIMAGE", true );
#endif
}

/*
static QPixmap fromHICON(HICON icon)
*/
HB_FUNC_STATIC( QTWIN_FROMHICON )
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,2,0))
  HICON par1 = (HICON) hb_parptr(1);
  QPixmap * ptr = new QPixmap( QtWin::fromHICON ( par1 ) );
  _qt5xhb_createReturnClass ( ptr, "QPIXMAP", true );
#endif
}

/*
static HRGN toHRGN(const QRegion &region)
*/
HB_FUNC_STATIC( QTWIN_TOHRGN )
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,2,0))
  QRegion * par1 = (QRegion *) _qt5xhb_itemGetPtr(1);
  hb_retptr( (HRGN) QtWin::toHRGN ( *par1 ) );
#endif
}

/*
static QRegion fromHRGN(HRGN hrgn)
*/
HB_FUNC_STATIC( QTWIN_FROMHRGN )
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,2,0))
  HRGN par1 = (HRGN) hb_parptr(1);
  QRegion * ptr = new QRegion( QtWin::fromHRGN ( par1 ) );
  _qt5xhb_createReturnClass ( ptr, "QREGION", true );
#endif
}

/*
static QString stringFromHresult(HRESULT hresult)
*/
HB_FUNC_STATIC( QTWIN_STRINGFROMHRESULT )
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,2,0))
#ifndef Q_OS_WIN64
  HRESULT par1 = (HRESULT) hb_parptr(1);
  hb_retc( RQSTRING( QtWin::stringFromHresult ( par1 ) ) );
#endif
#endif
}

/*
static QString errorStringFromHresult(HRESULT hresult)
*/
HB_FUNC_STATIC( QTWIN_ERRORSTRINGFROMHRESULT )
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,2,0))
#ifndef Q_OS_WIN64
  HRESULT par1 = (HRESULT) hb_parptr(1);
  hb_retc( RQSTRING( QtWin::errorStringFromHresult ( par1 ) ) );
#endif
#endif
}

/*
static QColor colorizationColor(bool *opaqueBlend = 0)
*/
HB_FUNC_STATIC( QTWIN_COLORIZATIONCOLOR )
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,2,0))
  bool par1;
  QColor * ptr = new QColor( QtWin::colorizationColor ( &par1 ) );
  _qt5xhb_createReturnClass ( ptr, "QCOLOR", true );
  hb_storl( par1, 1 );
#endif
}

/*
static QColor realColorizationColor()
*/
HB_FUNC_STATIC( QTWIN_REALCOLORIZATIONCOLOR )
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,2,0))
  QColor * ptr = new QColor( QtWin::realColorizationColor () );
  _qt5xhb_createReturnClass ( ptr, "QCOLOR", true );
#endif
}

/*
static void setWindowExcludedFromPeek(QWindow *window, bool exclude)
*/
HB_FUNC_STATIC( QTWIN_SETWINDOWEXCLUDEDFROMPEEK )
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,2,0))
  QWindow * par1 = (QWindow *) _qt5xhb_itemGetPtr(1);
  QtWin::setWindowExcludedFromPeek ( par1, PBOOL(2) );
  hb_itemReturn( hb_stackSelfItem() );
#endif
}

/*
static bool isWindowExcludedFromPeek(QWindow *window)
*/
HB_FUNC_STATIC( QTWIN_ISWINDOWEXCLUDEDFROMPEEK )
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,2,0))
  QWindow * par1 = (QWindow *) _qt5xhb_itemGetPtr(1);
  hb_retl( QtWin::isWindowExcludedFromPeek ( par1 ) );
#endif
}

/*
static void setWindowDisallowPeek(QWindow *window, bool disallow)
*/
HB_FUNC_STATIC( QTWIN_SETWINDOWDISALLOWPEEK )
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,2,0))
  QWindow * par1 = (QWindow *) _qt5xhb_itemGetPtr(1);
  QtWin::setWindowDisallowPeek ( par1, PBOOL(2) );
  hb_itemReturn( hb_stackSelfItem() );
#endif
}

/*
static bool isWindowPeekDisallowed(QWindow *window)
*/
HB_FUNC_STATIC( QTWIN_ISWINDOWPEEKDISALLOWED )
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,2,0))
  QWindow * par1 = (QWindow *) _qt5xhb_itemGetPtr(1);
  hb_retl( QtWin::isWindowPeekDisallowed ( par1 ) );
#endif
}

/*
static void setWindowFlip3DPolicy(QWindow *window, WindowFlip3DPolicy policy)
*/
HB_FUNC_STATIC( QTWIN_SETWINDOWFLIP3DPOLICY )
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,2,0))
  QWindow * par1 = (QWindow *) _qt5xhb_itemGetPtr(1);
  int par2 = hb_parni(2);
  QtWin::setWindowFlip3DPolicy ( par1, (QtWin::WindowFlip3DPolicy) par2 );
  hb_itemReturn( hb_stackSelfItem() );
#endif
}

/*
static WindowFlip3DPolicy windowFlip3DPolicy(QWindow *)
*/
HB_FUNC_STATIC( QTWIN_WINDOWFLIP3DPOLICY )
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,2,0))
  QWindow * par1 = (QWindow *) _qt5xhb_itemGetPtr(1);
  hb_retni( QtWin::windowFlip3DPolicy ( par1 ) );
#endif
}

/*
static void extendFrameIntoClientArea(QWindow *window, int left, int top, int right, int bottom)
*/
HB_FUNC_STATIC( QTWIN_EXTENDFRAMEINTOCLIENTAREA1 )
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,2,0))
  QWindow * par1 = (QWindow *) _qt5xhb_itemGetPtr(1);
  QtWin::extendFrameIntoClientArea ( par1, PINT(2), PINT(3), PINT(4), PINT(5) );
  hb_itemReturn( hb_stackSelfItem() );
#endif
}

/*
static void extendFrameIntoClientArea(QWindow *window, const QMargins &margins)
*/
HB_FUNC_STATIC( QTWIN_EXTENDFRAMEINTOCLIENTAREA2 )
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,2,0))
  QWindow * par1 = (QWindow *) _qt5xhb_itemGetPtr(1);
  QMargins * par2 = (QMargins *) _qt5xhb_itemGetPtr(2);
  QtWin::extendFrameIntoClientArea ( par1, *par2 );
  hb_itemReturn( hb_stackSelfItem() );
#endif
}

//[1]void extendFrameIntoClientArea(QWindow *window, int left, int top, int right, int bottom)
//[2]void extendFrameIntoClientArea(QWindow *window, const QMargins &margins)

HB_FUNC_STATIC( QTWIN_EXTENDFRAMEINTOCLIENTAREA )
{
  if( ISNUMPAR(5) && ISQWINDOW(1) && ISNUM(2) && ISNUM(3) && ISNUM(4) && ISNUM(5) )
  {
    HB_FUNC_EXEC( QTWIN_EXTENDFRAMEINTOCLIENTAREA1 );
  }
  else if( ISNUMPAR(2) && ISQWINDOW(1) && ISQMARGINS(2) )
  {
    HB_FUNC_EXEC( QTWIN_EXTENDFRAMEINTOCLIENTAREA2 );
  }
  else
  {
    hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
  }
}

/*
static void resetExtendedFrame(QWindow *window)
*/
HB_FUNC_STATIC( QTWIN_RESETEXTENDEDFRAME )
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,2,0))
  QWindow * par1 = (QWindow *) _qt5xhb_itemGetPtr(1);
  QtWin::resetExtendedFrame ( par1 );
  hb_itemReturn( hb_stackSelfItem() );
#endif
}

/*
static void enableBlurBehindWindow(QWindow *window, const QRegion &region)
*/
HB_FUNC_STATIC( QTWIN_ENABLEBLURBEHINDWINDOW1 )
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,2,0))
  QWindow * par1 = (QWindow *) _qt5xhb_itemGetPtr(1);
  QRegion * par2 = (QRegion *) _qt5xhb_itemGetPtr(2);
  QtWin::enableBlurBehindWindow ( par1, *par2 );
  hb_itemReturn( hb_stackSelfItem() );
#endif
}

/*
static void enableBlurBehindWindow(QWindow *window)
*/
HB_FUNC_STATIC( QTWIN_ENABLEBLURBEHINDWINDOW2 )
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,2,0))
  QWindow * par1 = (QWindow *) _qt5xhb_itemGetPtr(1);
  QtWin::enableBlurBehindWindow ( par1 );
  hb_itemReturn( hb_stackSelfItem() );
#endif
}

//[1]void enableBlurBehindWindow(QWindow *window, const QRegion &region)
//[2]void enableBlurBehindWindow(QWindow *window)

HB_FUNC_STATIC( QTWIN_ENABLEBLURBEHINDWINDOW )
{
  if( ISNUMPAR(1) && ISQWINDOW(1) && ISQREGION(2) )
  {
    HB_FUNC_EXEC( QTWIN_ENABLEBLURBEHINDWINDOW1 );
  }
  else if( ISNUMPAR(1) && ISQWINDOW(1) )
  {
    HB_FUNC_EXEC( QTWIN_ENABLEBLURBEHINDWINDOW2 );
  }
  else
  {
    hb_errRT_BASE( EG_ARG, 3012, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS );
  }
}

/*
static void disableBlurBehindWindow(QWindow *window)
*/
HB_FUNC_STATIC( QTWIN_DISABLEBLURBEHINDWINDOW )
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,2,0))
  QWindow * par1 = (QWindow *) _qt5xhb_itemGetPtr(1);
  QtWin::disableBlurBehindWindow ( par1 );
  hb_itemReturn( hb_stackSelfItem() );
#endif
}

/*
static bool isCompositionEnabled()
*/
HB_FUNC_STATIC( QTWIN_ISCOMPOSITIONENABLED )
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,2,0))
  hb_retl( QtWin::isCompositionEnabled () );
#endif
}

/*
static void setCompositionEnabled(bool enabled)
*/
HB_FUNC_STATIC( QTWIN_SETCOMPOSITIONENABLED )
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,2,0))
  QtWin::setCompositionEnabled ( PBOOL(1) );
  hb_itemReturn( hb_stackSelfItem() );
#endif
}

/*
static bool isCompositionOpaque()
*/
HB_FUNC_STATIC( QTWIN_ISCOMPOSITIONOPAQUE )
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,2,0))
  hb_retl( QtWin::isCompositionOpaque () );
#endif
}

/*
static void setCurrentProcessExplicitAppUserModelID(const QString &id)
*/
HB_FUNC_STATIC( QTWIN_SETCURRENTPROCESSEXPLICITAPPUSERMODELID )
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,2,0))
  QtWin::setCurrentProcessExplicitAppUserModelID ( PQSTRING(1) );
  hb_itemReturn( hb_stackSelfItem() );
#endif
}

/*
static void markFullscreenWindow(QWindow *, bool fullscreen = true)
*/
HB_FUNC_STATIC( QTWIN_MARKFULLSCREENWINDOW )
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,2,0))
  QWindow * par1 = (QWindow *) _qt5xhb_itemGetPtr(1);
  QtWin::markFullscreenWindow ( par1, OPBOOL(2,true) );
  hb_itemReturn( hb_stackSelfItem() );
#endif
}

/*
static void taskbarActivateTab(QWindow *)
*/
HB_FUNC_STATIC( QTWIN_TASKBARACTIVATETAB )
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,2,0))
  QWindow * par1 = (QWindow *) _qt5xhb_itemGetPtr(1);
  QtWin::taskbarActivateTab ( par1 );
  hb_itemReturn( hb_stackSelfItem() );
#endif
}

/*
static void taskbarActivateTabAlt(QWindow *)
*/
HB_FUNC_STATIC( QTWIN_TASKBARACTIVATETABALT )
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,2,0))
  QWindow * par1 = (QWindow *) _qt5xhb_itemGetPtr(1);
  QtWin::taskbarActivateTabAlt ( par1 );
  hb_itemReturn( hb_stackSelfItem() );
#endif
}

/*
static void taskbarAddTab(QWindow *)
*/
HB_FUNC_STATIC( QTWIN_TASKBARADDTAB )
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,2,0))
  QWindow * par1 = (QWindow *) _qt5xhb_itemGetPtr(1);
  QtWin::taskbarAddTab ( par1 );
  hb_itemReturn( hb_stackSelfItem() );
#endif
}

/*
static void taskbarDeleteTab(QWindow *)
*/
HB_FUNC_STATIC( QTWIN_TASKBARDELETETAB )
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,2,0))
  QWindow * par1 = (QWindow *) _qt5xhb_itemGetPtr(1);
  QtWin::taskbarDeleteTab ( par1 );
  hb_itemReturn( hb_stackSelfItem() );
#endif
}

HB_FUNC_STATIC( QTWIN_NEWFROM )
{
  PHB_ITEM self = hb_stackSelfItem();
  if( hb_pcount() == 1 && ISOBJECT(1) )
  {
    PHB_ITEM ptr = hb_itemPutPtr( NULL, (void *) hb_itemGetPtr( hb_objSendMsg( hb_param(1, HB_IT_OBJECT ), "POINTER", 0 ) ) );
    hb_objSendMsg( self, "_pointer", 1, ptr );
    hb_itemRelease( ptr );
    PHB_ITEM des = hb_itemPutL( NULL, false );
    hb_objSendMsg( self, "_self_destruction", 1, des );
    hb_itemRelease( des );
  }
  else if( hb_pcount() == 1 && ISPOINTER(1) )
  {
    PHB_ITEM ptr = hb_itemPutPtr( NULL, (void *) hb_itemGetPtr( hb_param(1, HB_IT_POINTER ) ) );
    hb_objSendMsg( self, "_pointer", 1, ptr );
    hb_itemRelease( ptr );
    PHB_ITEM des = hb_itemPutL( NULL, false );
    hb_objSendMsg( self, "_self_destruction", 1, des );
    hb_itemRelease( des );
  }
  hb_itemReturn( self );
}

HB_FUNC_STATIC( QTWIN_NEWFROMOBJECT )
{
  HB_FUNC_EXEC( QTWIN_NEWFROM );
}

HB_FUNC_STATIC( QTWIN_NEWFROMPOINTER )
{
  HB_FUNC_EXEC( QTWIN_NEWFROM );
}

HB_FUNC_STATIC( QTWIN_SELFDESTRUCTION )
{
  hb_retl( (bool) hb_itemGetL( hb_objSendMsg( hb_stackSelfItem(), "SELF_DESTRUCTION", 0 ) ) );
}

HB_FUNC_STATIC( QTWIN_SETSELFDESTRUCTION )
{
  PHB_ITEM self = hb_stackSelfItem();
  if( hb_pcount() == 1 && ISLOG(1) )
  {
    PHB_ITEM des = hb_itemPutL( NULL, hb_parl(1) );
    hb_objSendMsg( self, "_self_destruction", 1, des );
    hb_itemRelease( des );
  }
  hb_itemReturn( self );
}

#pragma ENDDUMP