diff --git a/ChangeLog.txt b/ChangeLog.txt index fa525d0b94..ce730ebe55 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -1,5 +1,5 @@ /* - * $Id$ + * $Id: fa525d0b946be0f5210ddf613a5db20f999bd2b0 $ */ /* Read doc/howtorep.txt and use this format for entry headers: @@ -10,6 +10,17 @@ * Change, ! Fix, % Optimization, + Addition, - Removal, ; Comment */ +2013-06-05 23:40 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com) + * contrib/gtwvg/wvgcore.c + + Added: function WVT_DRAWPICTUREEX + WVT_LOADPICTUREFROMRESOURCEEX + + * contrib/gtwvg/wvgcuig.c + + Added: function WVG_PICTUREEX + + * contrib/gtwvg/wvgwin.c + + Added: function WVG_FORCEWINDOWTOTOP + 2013-06-05 19:15 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl) * contrib/gtqtc/gtqtc1.cpp ! added workaround for AltGR and German keyboard diff --git a/contrib/gtwvg/wvgcore.c b/contrib/gtwvg/wvgcore.c index 372763064c..26fec8a747 100644 --- a/contrib/gtwvg/wvgcore.c +++ b/contrib/gtwvg/wvgcore.c @@ -1839,6 +1839,30 @@ HB_FUNC( WVT_DRAWPICTURE ) #endif } +/* + * Wvt_DrawPictureByHandle( nTop, nLeft, nBottom, nRight, hPicture, aPxlOff, lDoNotScale ) -> lOk + */ +HB_FUNC( WVT_DRAWPICTUREEX ) +{ +#if ! defined( HB_OS_WIN_CE ) + POINT xy = { 0, 0 }; + int iTop, iLeft, iBottom, iRight; + + if( HB_ISNUM( 5 ) ) + { + xy = hb_wvt_gtGetXYFromColRow( hb_parni( 2 ), hb_parni( 1 ) );; + iTop = xy.y + hb_parvni( 6, 1 ); + iLeft = xy.x + hb_parvni( 6, 2 ); + + xy = hb_wvt_gtGetXYFromColRow( hb_parni( 4 ) + 1, hb_parni( 3 ) + 1 ); + iBottom = xy.y - 1 + hb_parvni( 6, 3 ); + iRight = xy.x - 1 + hb_parvni( 6, 4 ); + + hb_retl( hb_wvt_gtRenderPicture( iLeft, iTop, iRight - iLeft + 1, iBottom - iTop + 1, ( IPicture * ) hb_parnl( 5 ), hb_parl( 7 ) ) ); + } +#endif +} + /* * Wvt_DrawLabelEx( nRow, nCol, cLabel, nAlign, nTextColor, nBkColor, nSlotFont, aPxlOff ) */ @@ -2738,6 +2762,22 @@ HB_FUNC( WVT_LOADPICTUREFROMRESOURCE ) hb_retl( bResult ); } +HB_FUNC( WVT_LOADPICTUREFROMRESOURCEEX ) +{ +#if ! defined( HB_OS_WIN_CE ) + void * hResource; + void * hSection; + IPicture * iPicture = hb_wvt_gtLoadPictureFromResource( HB_PARSTR( 1, &hResource, NULL ), HB_PARSTR( 2, &hSection, NULL ) ); + + hb_strfree( hResource ); + hb_strfree( hSection ); + if( iPicture ) + { + hb_retnl( ( HB_PTRDIFF ) iPicture ); + } +#endif +} + /* * Wvt_LoadFont( nSlotFont, cFontFace, nHeight, nWidth, nWeight, lItalic, lUnderline, lStrikeout, * nCharSet, nQuality, nEscapement ) diff --git a/contrib/gtwvg/wvgcuig.c b/contrib/gtwvg/wvgcuig.c index 3a50e87244..d5e14ea588 100644 --- a/contrib/gtwvg/wvgcuig.c +++ b/contrib/gtwvg/wvgcuig.c @@ -1285,6 +1285,39 @@ HB_FUNC( WVG_PICTURE ) #endif } +HB_FUNC( WVG_PICTUREEX ) +{ +#if ! defined( HB_OS_WIN_CE ) + if( HB_ISNUM( 6 ) ) + { + PHB_GTWVT pWVT = hb_wvt_gtGetWVT(); + HB_GOBJS * gObj = hb_wvg_ObjectNew( pWVT ); + + gObj->iObjType = GOBJ_OBJTYPE_PICTURE; + + gObj->iTop = hb_parni( 1 ); + gObj->iLeft = hb_parni( 2 ); + gObj->iBottom = hb_parni( 3 ); + gObj->iRight = hb_parni( 4 ); + + gObj->aOffset.iTop = hb_parvni( 5, 1 ); + gObj->aOffset.iLeft = hb_parvni( 5, 2 ); + gObj->aOffset.iBottom = hb_parvni( 5, 3 ); + gObj->aOffset.iRight = hb_parvni( 5, 4 ); + + gObj->iPicture = ( IPicture * ) hb_parnl( 6 ); + gObj->bDestroyPicture = HB_FALSE; + + gObj->gObjNext = pWVT->gObjs; + pWVT->gObjs = gObj; + } + else + hb_retni( 0 ); +#else + hb_retni( 0 ); +#endif +} + /* Wvg_Image( nTop, nLeft, nBottom, nRight, aPxlOff, nImageSource, cImage/nPictureSlot, cSection ) */ diff --git a/contrib/gtwvg/wvgwin.c b/contrib/gtwvg/wvgwin.c index 4ef1fa6924..675a5edc32 100644 --- a/contrib/gtwvg/wvgwin.c +++ b/contrib/gtwvg/wvgwin.c @@ -1018,6 +1018,12 @@ HB_FUNC( WVG_POSTMESSAGE ) hb_retl( PostMessage( wvg_parhwnd( 1 ), hb_parni( 2 ), ( WPARAM ) hb_parni( 3 ), ( LPARAM ) hb_parni( 4 ) ) ); } +HB_FUNC( WVG_FORCEWINDOWTOTOP ) +{ + SetWindowPos( wvg_parhwnd( 1 ), HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE ); + SetWindowPos( wvg_parhwnd( 1 ), HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE ); +} + /* * Win_SetLayeredWindowAttributes( hWnd, nRGB, nOpacityFactor [0-255] ) */