2010-10-23 18:45 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* contrib/hbhpdf/harupdf.c
! Newly added 2.2.0 wrapper code protected with version guards.
Added fallback code for older versions.
; TODO: Split the wrapper into separate files to save final
binary size.
This commit is contained in:
@@ -16,6 +16,13 @@
|
||||
The license applies to all entries newer than 2009-04-28.
|
||||
*/
|
||||
|
||||
2010-10-23 18:45 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
|
||||
* contrib/hbhpdf/harupdf.c
|
||||
! Newly added 2.2.0 wrapper code protected with version guards.
|
||||
Added fallback code for older versions.
|
||||
; TODO: Split the wrapper into separate files to save final
|
||||
binary size.
|
||||
|
||||
2010-10-23 09:07 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)
|
||||
* contrib/hbhpdf/harupdf.c
|
||||
+ Added: following functions contained in LibHaru 2.2.0:
|
||||
|
||||
@@ -64,6 +64,8 @@
|
||||
|
||||
#include "hpdf.h"
|
||||
|
||||
#define HB_HPDF_VERS( ma, mi, re ) ( HPDF_MAJOR_VERSION >= ma && HPDF_MINOR_VERSION >= mi && HPDF_BUGFIX_VERSION >= re )
|
||||
|
||||
static HB_GARBAGE_FUNC( HPDF_Doc_release )
|
||||
{
|
||||
void ** ph = ( void ** ) Cargo;
|
||||
@@ -1853,6 +1855,7 @@ HPDF_GetContents (HPDF_Doc pdf,
|
||||
*/
|
||||
HB_FUNC( HPDF_GETCONTENTS )
|
||||
{
|
||||
#if HB_HPDF_VERS( 2, 2, 0 )
|
||||
HPDF_UINT32 size = ( HPDF_UINT32 ) hb_parclen( 2 );
|
||||
HPDF_BYTE * buffer;
|
||||
|
||||
@@ -1865,6 +1868,10 @@ HB_FUNC( HPDF_GETCONTENTS )
|
||||
|
||||
if( ! hb_storclen_buffer( ( char * ) buffer, size, 2 ) )
|
||||
hb_xfree( buffer );
|
||||
#else
|
||||
hb_storc( NULL, 2 )
|
||||
hb_retnl( -1 );
|
||||
#endif
|
||||
}
|
||||
/*
|
||||
HPDF_EXPORT(HPDF_STATUS)
|
||||
@@ -1872,7 +1879,11 @@ HPDF_CheckError (HPDF_Error error);
|
||||
*/
|
||||
HB_FUNC( HPDF_CHECKERROR )
|
||||
{
|
||||
#if HB_HPDF_VERS( 2, 2, 0 )
|
||||
hb_retnl( ( long ) HPDF_CheckError( ( HPDF_Error ) hb_parptr( 1 ) ) );
|
||||
#else
|
||||
hb_retnl( -1 );
|
||||
#endif
|
||||
}
|
||||
/*
|
||||
HPDF_EXPORT(HPDF_STATUS)
|
||||
@@ -1881,7 +1892,11 @@ HPDF_Page_SetZoom (HPDF_Page page,
|
||||
*/
|
||||
HB_FUNC( HPDF_PAGE_SETZOOM )
|
||||
{
|
||||
#if HB_HPDF_VERS( 2, 2, 0 )
|
||||
hb_retnl( ( long ) HPDF_Page_SetZoom( ( HPDF_Page ) hb_parptr( 1 ), ( HPDF_REAL ) hb_parnd( 2 ) ) );
|
||||
#else
|
||||
hb_retnl( -1 );
|
||||
#endif
|
||||
}
|
||||
/*
|
||||
HPDF_EXPORT(HPDF_Annotation)
|
||||
@@ -1892,6 +1907,7 @@ HPDF_Page_CreateFreeTextAnnot (HPDF_Page page,
|
||||
*/
|
||||
HB_FUNC( HPDF_PAGE_CREATEFREETEXTANNOT )
|
||||
{
|
||||
#if HB_HPDF_VERS( 2, 2, 0 )
|
||||
HPDF_Rect rc;
|
||||
|
||||
rc.left = ( HPDF_REAL ) hb_parvnd( 2, 1 );
|
||||
@@ -1900,6 +1916,9 @@ HB_FUNC( HPDF_PAGE_CREATEFREETEXTANNOT )
|
||||
rc.bottom = ( HPDF_REAL ) hb_parvnd( 2, 4 );
|
||||
|
||||
hb_retptr( HPDF_Page_CreateFreeTextAnnot( ( HPDF_Page ) hb_parptr( 1 ), rc, hb_parc( 3 ), ( HPDF_Encoder ) hb_parptr( 4 ) ) );
|
||||
#else
|
||||
hb_retptr( NULL );
|
||||
#endif
|
||||
}
|
||||
/*
|
||||
HPDF_EXPORT(HPDF_Annotation)
|
||||
@@ -1909,7 +1928,11 @@ HPDF_Page_CreateLineAnnot (HPDF_Page page,
|
||||
*/
|
||||
HB_FUNC( HPDF_PAGE_CREATELINEANNOT )
|
||||
{
|
||||
#if HB_HPDF_VERS( 2, 2, 0 )
|
||||
hb_retptr( HPDF_Page_CreateLineAnnot( ( HPDF_Page ) hb_parptr( 1 ), hb_parc( 2 ), ( HPDF_Encoder ) hb_parptr( 3 ) ) );
|
||||
#else
|
||||
hb_retptr( NULL );
|
||||
#endif
|
||||
}
|
||||
/*
|
||||
HPDF_Annotation
|
||||
@@ -1921,6 +1944,7 @@ HPDF_Page_CreateTextMarkupAnnot (HPDF_Page page,
|
||||
*/
|
||||
HB_FUNC( HPDF_PAGE_CREATETEXTMARKUPANNOT )
|
||||
{
|
||||
#if HB_HPDF_VERS( 2, 2, 0 )
|
||||
HPDF_Rect rc;
|
||||
|
||||
rc.left = ( HPDF_REAL ) hb_parvnd( 2, 1 );
|
||||
@@ -1929,6 +1953,9 @@ HB_FUNC( HPDF_PAGE_CREATETEXTMARKUPANNOT )
|
||||
rc.bottom = ( HPDF_REAL ) hb_parvnd( 2, 4 );
|
||||
|
||||
hb_retptr( HPDF_Page_CreateTextMarkupAnnot( ( HPDF_Page ) hb_parptr( 1 ), rc, hb_parc( 3 ), ( HPDF_Encoder ) hb_parptr( 4 ), ( HPDF_AnnotType ) hb_parni( 5 ) ) );
|
||||
#else
|
||||
hb_retptr( NULL );
|
||||
#endif
|
||||
}
|
||||
/*
|
||||
HPDF_EXPORT(HPDF_Annotation)
|
||||
@@ -1939,6 +1966,7 @@ HPDF_Page_CreateHighlightAnnot (HPDF_Page page,
|
||||
*/
|
||||
HB_FUNC( HPDF_Page_CreateHighlightAnnot )
|
||||
{
|
||||
#if HB_HPDF_VERS( 2, 2, 0 )
|
||||
HPDF_Rect rc;
|
||||
|
||||
rc.left = ( HPDF_REAL ) hb_parvnd( 2, 1 );
|
||||
@@ -1947,6 +1975,9 @@ HB_FUNC( HPDF_Page_CreateHighlightAnnot )
|
||||
rc.bottom = ( HPDF_REAL ) hb_parvnd( 2, 4 );
|
||||
|
||||
hb_retptr( HPDF_Page_CreateHighlightAnnot( ( HPDF_Page ) hb_parptr( 1 ), rc, hb_parc( 3 ), ( HPDF_Encoder ) hb_parptr( 4 ) ) );
|
||||
#else
|
||||
hb_retptr( NULL );
|
||||
#endif
|
||||
}
|
||||
/*
|
||||
HPDF_EXPORT(HPDF_Annotation)
|
||||
@@ -1957,6 +1988,7 @@ HPDF_Page_CreateUnderlineAnnot (HPDF_Page page,
|
||||
*/
|
||||
HB_FUNC( HPDF_Page_CreateUnderlineAnnot )
|
||||
{
|
||||
#if HB_HPDF_VERS( 2, 2, 0 )
|
||||
HPDF_Rect rc;
|
||||
|
||||
rc.left = ( HPDF_REAL ) hb_parvnd( 2, 1 );
|
||||
@@ -1965,6 +1997,9 @@ HB_FUNC( HPDF_Page_CreateUnderlineAnnot )
|
||||
rc.bottom = ( HPDF_REAL ) hb_parvnd( 2, 4 );
|
||||
|
||||
hb_retptr( HPDF_Page_CreateUnderlineAnnot( ( HPDF_Page ) hb_parptr( 1 ), rc, hb_parc( 3 ), ( HPDF_Encoder ) hb_parptr( 4 ) ) );
|
||||
#else
|
||||
hb_retptr( NULL );
|
||||
#endif
|
||||
}
|
||||
/*
|
||||
HPDF_EXPORT(HPDF_Annotation)
|
||||
@@ -1975,6 +2010,7 @@ HPDF_Page_CreateSquigglyAnnot (HPDF_Page page,
|
||||
*/
|
||||
HB_FUNC( HPDF_Page_CreateSquigglyAnnot )
|
||||
{
|
||||
#if HB_HPDF_VERS( 2, 2, 0 )
|
||||
HPDF_Rect rc;
|
||||
|
||||
rc.left = ( HPDF_REAL ) hb_parvnd( 2, 1 );
|
||||
@@ -1983,6 +2019,9 @@ HB_FUNC( HPDF_Page_CreateSquigglyAnnot )
|
||||
rc.bottom = ( HPDF_REAL ) hb_parvnd( 2, 4 );
|
||||
|
||||
hb_retptr( HPDF_Page_CreateSquigglyAnnot( ( HPDF_Page ) hb_parptr( 1 ), rc, hb_parc( 3 ), ( HPDF_Encoder ) hb_parptr( 4 ) ) );
|
||||
#else
|
||||
hb_retptr( NULL );
|
||||
#endif
|
||||
}
|
||||
/*
|
||||
HPDF_EXPORT(HPDF_Annotation)
|
||||
@@ -1993,6 +2032,7 @@ HPDF_Page_CreateStrikeOutAnnot (HPDF_Page page,
|
||||
*/
|
||||
HB_FUNC( HPDF_Page_CreateStrikeOutAnnot )
|
||||
{
|
||||
#if HB_HPDF_VERS( 2, 2, 0 )
|
||||
HPDF_Rect rc;
|
||||
|
||||
rc.left = ( HPDF_REAL ) hb_parvnd( 2, 1 );
|
||||
@@ -2001,6 +2041,9 @@ HB_FUNC( HPDF_Page_CreateStrikeOutAnnot )
|
||||
rc.bottom = ( HPDF_REAL ) hb_parvnd( 2, 4 );
|
||||
|
||||
hb_retptr( HPDF_Page_CreateStrikeOutAnnot( ( HPDF_Page ) hb_parptr( 1 ), rc, hb_parc( 3 ), ( HPDF_Encoder ) hb_parptr( 4 ) ) );
|
||||
#else
|
||||
hb_retptr( NULL );
|
||||
#endif
|
||||
}
|
||||
/*
|
||||
HPDF_EXPORT(HPDF_Annotation)
|
||||
@@ -2010,6 +2053,7 @@ HPDF_Page_CreatePopupAnnot ( HPDF_Page page,
|
||||
*/
|
||||
HB_FUNC( HPDF_Page_CreatePopupAnnot )
|
||||
{
|
||||
#if HB_HPDF_VERS( 2, 2, 0 )
|
||||
HPDF_Rect rc;
|
||||
|
||||
rc.left = ( HPDF_REAL ) hb_parvnd( 2, 1 );
|
||||
@@ -2018,6 +2062,9 @@ HB_FUNC( HPDF_Page_CreatePopupAnnot )
|
||||
rc.bottom = ( HPDF_REAL ) hb_parvnd( 2, 4 );
|
||||
|
||||
hb_retptr( HPDF_Page_CreatePopupAnnot( ( HPDF_Page ) hb_parptr( 1 ), rc, ( HPDF_Annotation ) hb_parptr( 3 ) ) );
|
||||
#else
|
||||
hb_retptr( NULL );
|
||||
#endif
|
||||
}
|
||||
/*
|
||||
HPDF_EXPORT(HPDF_Annotation)
|
||||
@@ -2029,6 +2076,7 @@ HPDF_Page_CreateStampAnnot ( HPDF_Page page,
|
||||
*/
|
||||
HB_FUNC( HPDF_Page_CreateStampAnnot )
|
||||
{
|
||||
#if HB_HPDF_VERS( 2, 2, 0 )
|
||||
HPDF_Rect rc;
|
||||
|
||||
rc.left = ( HPDF_REAL ) hb_parvnd( 2, 1 );
|
||||
@@ -2037,6 +2085,9 @@ HB_FUNC( HPDF_Page_CreateStampAnnot )
|
||||
rc.bottom = ( HPDF_REAL ) hb_parvnd( 2, 4 );
|
||||
|
||||
hb_retptr( HPDF_Page_CreateStampAnnot( ( HPDF_Page ) hb_parptr( 1 ), rc, ( HPDF_StampAnnotName ) hb_parc( 3 ), hb_parc( 4 ), ( HPDF_Encoder ) hb_parptr( 5 ) ) );
|
||||
#else
|
||||
hb_retptr( NULL );
|
||||
#endif
|
||||
}
|
||||
/*
|
||||
HPDF_EXPORT(HPDF_Annotation)
|
||||
@@ -2047,6 +2098,7 @@ HPDF_Page_CreateSquareAnnot (HPDF_Page page,
|
||||
*/
|
||||
HB_FUNC( HPDF_Page_CreateSquareAnnot )
|
||||
{
|
||||
#if HB_HPDF_VERS( 2, 2, 0 )
|
||||
HPDF_Rect rc;
|
||||
|
||||
rc.left = ( HPDF_REAL ) hb_parvnd( 2, 1 );
|
||||
@@ -2055,6 +2107,9 @@ HB_FUNC( HPDF_Page_CreateSquareAnnot )
|
||||
rc.bottom = ( HPDF_REAL ) hb_parvnd( 2, 4 );
|
||||
|
||||
hb_retptr( HPDF_Page_CreateSquareAnnot( ( HPDF_Page ) hb_parptr( 1 ), rc, hb_parc( 3 ), ( HPDF_Encoder ) hb_parptr( 4 ) ) );
|
||||
#else
|
||||
hb_retptr( NULL );
|
||||
#endif
|
||||
}
|
||||
/*
|
||||
HPDF_EXPORT(HPDF_Annotation)
|
||||
@@ -2065,6 +2120,7 @@ HPDF_Page_CreateCircleAnnot (HPDF_Page page,
|
||||
*/
|
||||
HB_FUNC( HPDF_Page_CreateCircleAnnot )
|
||||
{
|
||||
#if HB_HPDF_VERS( 2, 2, 0 )
|
||||
HPDF_Rect rc;
|
||||
|
||||
rc.left = ( HPDF_REAL ) hb_parvnd( 2, 1 );
|
||||
@@ -2073,6 +2129,9 @@ HB_FUNC( HPDF_Page_CreateCircleAnnot )
|
||||
rc.bottom = ( HPDF_REAL ) hb_parvnd( 2, 4 );
|
||||
|
||||
hb_retptr( HPDF_Page_CreateCircleAnnot( ( HPDF_Page ) hb_parptr( 1 ), rc, hb_parc( 3 ), ( HPDF_Encoder ) hb_parptr( 4 ) ) );
|
||||
#else
|
||||
hb_retptr( NULL );
|
||||
#endif
|
||||
}
|
||||
/*
|
||||
HPDF_EXPORT(HPDF_STATUS)
|
||||
@@ -2080,6 +2139,7 @@ HPDF_Annot_SetRGBColor (HPDF_Annotation annot, HPDF_RGBColor color);
|
||||
*/
|
||||
HB_FUNC( HPDF_Annot_SetRGBColor )
|
||||
{
|
||||
#if HB_HPDF_VERS( 2, 2, 0 )
|
||||
HPDF_RGBColor rgb;
|
||||
|
||||
rgb.r = ( HPDF_REAL ) hb_parvnd( 2, 1 );
|
||||
@@ -2087,6 +2147,9 @@ HB_FUNC( HPDF_Annot_SetRGBColor )
|
||||
rgb.b = ( HPDF_REAL ) hb_parvnd( 2, 3 );
|
||||
|
||||
hb_retnl( ( long ) HPDF_Annot_SetRGBColor( ( HPDF_Annotation ) hb_parptr( 1 ), rgb ) );
|
||||
#else
|
||||
hb_retnl( -1 );
|
||||
#endif
|
||||
}
|
||||
/*
|
||||
HPDF_EXPORT(HPDF_STATUS)
|
||||
@@ -2094,6 +2157,7 @@ HPDF_Annot_SetCMYKColor (HPDF_Annotation annot, HPDF_CMYKColor color);
|
||||
*/
|
||||
HB_FUNC( HPDF_Annot_SetCMYKColor )
|
||||
{
|
||||
#if HB_HPDF_VERS( 2, 2, 0 )
|
||||
HPDF_CMYKColor cmyk;
|
||||
|
||||
cmyk.c = ( HPDF_REAL ) hb_parvnd( 2, 1 );
|
||||
@@ -2102,6 +2166,9 @@ HB_FUNC( HPDF_Annot_SetCMYKColor )
|
||||
cmyk.k = ( HPDF_REAL ) hb_parvnd( 2, 4 );
|
||||
|
||||
hb_retnl( ( long ) HPDF_Annot_SetCMYKColor( ( HPDF_Annotation ) hb_parptr( 1 ), cmyk ) );
|
||||
#else
|
||||
hb_retnl( -1 );
|
||||
#endif
|
||||
}
|
||||
/*
|
||||
HPDF_EXPORT(HPDF_STATUS)
|
||||
@@ -2109,7 +2176,11 @@ HPDF_Annot_SetGrayColor (HPDF_Annotation annot, HPDF_REAL color);
|
||||
*/
|
||||
HB_FUNC( HPDF_Annot_SetGrayColor )
|
||||
{
|
||||
#if HB_HPDF_VERS( 2, 2, 0 )
|
||||
hb_retnl( ( long ) HPDF_Annot_SetGrayColor( ( HPDF_Annotation ) hb_parptr( 1 ), ( HPDF_REAL ) hb_parnd( 2 ) ) );
|
||||
#else
|
||||
hb_retnl( -1 );
|
||||
#endif
|
||||
}
|
||||
/*
|
||||
HPDF_EXPORT(HPDF_STATUS)
|
||||
@@ -2117,7 +2188,11 @@ HPDF_Annot_SetNoColor (HPDF_Annotation annot);
|
||||
*/
|
||||
HB_FUNC( HPDF_Annot_SetNoColor )
|
||||
{
|
||||
#if HB_HPDF_VERS( 2, 2, 0 )
|
||||
hb_retnl( ( long ) HPDF_Annot_SetNoColor( ( HPDF_Annotation ) hb_parptr( 1 ) ) );
|
||||
#else
|
||||
hb_retnl( -1 );
|
||||
#endif
|
||||
}
|
||||
/*
|
||||
HPDF_EXPORT(HPDF_STATUS)
|
||||
@@ -2125,7 +2200,11 @@ HPDF_MarkupAnnot_SetTitle (HPDF_Annotation annot, const char* name);
|
||||
*/
|
||||
HB_FUNC( HPDF_MarkupAnnot_SetTitle )
|
||||
{
|
||||
#if HB_HPDF_VERS( 2, 2, 0 )
|
||||
hb_retnl( ( long ) HPDF_MarkupAnnot_SetTitle( ( HPDF_Annotation ) hb_parptr( 1 ), hb_parc( 2 ) ) );
|
||||
#else
|
||||
hb_retnl( -1 );
|
||||
#endif
|
||||
}
|
||||
/*
|
||||
HPDF_EXPORT(HPDF_STATUS)
|
||||
@@ -2133,7 +2212,11 @@ HPDF_MarkupAnnot_SetSubject (HPDF_Annotation annot, const char* name);
|
||||
*/
|
||||
HB_FUNC( HPDF_MarkupAnnot_SetSubject )
|
||||
{
|
||||
#if HB_HPDF_VERS( 2, 2, 0 )
|
||||
hb_retnl( ( long ) HPDF_MarkupAnnot_SetSubject( ( HPDF_Annotation ) hb_parptr( 1 ), hb_parc( 2 ) ) );
|
||||
#else
|
||||
hb_retnl( -1 );
|
||||
#endif
|
||||
}
|
||||
/*
|
||||
HPDF_EXPORT(HPDF_STATUS)
|
||||
@@ -2141,6 +2224,7 @@ HPDF_MarkupAnnot_SetCreationDate (HPDF_Annotation annot, HPDF_Date value);
|
||||
*/
|
||||
HB_FUNC( HPDF_MarkupAnnot_SetCreationDate )
|
||||
{
|
||||
#if HB_HPDF_VERS( 2, 2, 0 )
|
||||
HPDF_Date date;
|
||||
|
||||
memset( &date, 0, sizeof( date ) );
|
||||
@@ -2154,6 +2238,9 @@ HB_FUNC( HPDF_MarkupAnnot_SetCreationDate )
|
||||
date.ind = ' ';
|
||||
|
||||
hb_retnl( ( long ) HPDF_MarkupAnnot_SetCreationDate( ( HPDF_Annotation ) hb_parptr( 1 ), date ) );
|
||||
#else
|
||||
hb_retnl( -1 );
|
||||
#endif
|
||||
}
|
||||
/*
|
||||
HPDF_EXPORT(HPDF_STATUS)
|
||||
@@ -2161,7 +2248,11 @@ HPDF_MarkupAnnot_SetTransparency (HPDF_Annotation annot, HPDF_REAL value);
|
||||
*/
|
||||
HB_FUNC( HPDF_MarkupAnnot_SetTransparency )
|
||||
{
|
||||
#if HB_HPDF_VERS( 2, 2, 0 )
|
||||
hb_retnl( ( long ) HPDF_MarkupAnnot_SetTransparency( ( HPDF_Annotation ) hb_parptr( 1 ), ( HPDF_REAL ) hb_parnd( 2 ) ) );
|
||||
#else
|
||||
hb_retnl( -1 );
|
||||
#endif
|
||||
}
|
||||
/*
|
||||
HPDF_EXPORT(HPDF_STATUS)
|
||||
@@ -2169,7 +2260,11 @@ HPDF_MarkupAnnot_SetIntent (HPDF_Annotation annot, HPDF_AnnotIntent intent);
|
||||
*/
|
||||
HB_FUNC( HPDF_MarkupAnnot_SetIntent )
|
||||
{
|
||||
#if HB_HPDF_VERS( 2, 2, 0 )
|
||||
hb_retnl( ( long ) HPDF_MarkupAnnot_SetIntent( ( HPDF_Annotation ) hb_parptr( 1 ), ( HPDF_AnnotIntent ) hb_parni( 2 ) ) );
|
||||
#else
|
||||
hb_retnl( -1 );
|
||||
#endif
|
||||
}
|
||||
/*
|
||||
HPDF_EXPORT(HPDF_STATUS)
|
||||
@@ -2177,7 +2272,11 @@ HPDF_MarkupAnnot_SetPopup (HPDF_Annotation annot, HPDF_Annotation popup);
|
||||
*/
|
||||
HB_FUNC( HPDF_MarkupAnnot_SetPopup )
|
||||
{
|
||||
#if HB_HPDF_VERS( 2, 2, 0 )
|
||||
hb_retnl( ( long ) HPDF_MarkupAnnot_SetPopup( ( HPDF_Annotation ) hb_parptr( 1 ), ( HPDF_Annotation ) hb_parptr( 2 ) ) );
|
||||
#else
|
||||
hb_retnl( -1 );
|
||||
#endif
|
||||
}
|
||||
/*
|
||||
HPDF_EXPORT(HPDF_STATUS)
|
||||
@@ -2185,6 +2284,7 @@ HPDF_MarkupAnnot_SetRectDiff (HPDF_Annotation annot, HPDF_Rect rect);
|
||||
*/
|
||||
HB_FUNC( HPDF_MarkupAnnot_SetRectDiff )
|
||||
{
|
||||
#if HB_HPDF_VERS( 2, 2, 0 )
|
||||
HPDF_Rect rc;
|
||||
|
||||
rc.left = ( HPDF_REAL ) hb_parvnd( 2, 1 );
|
||||
@@ -2193,6 +2293,9 @@ HB_FUNC( HPDF_MarkupAnnot_SetRectDiff )
|
||||
rc.bottom = ( HPDF_REAL ) hb_parvnd( 2, 4 );
|
||||
|
||||
hb_retnl( ( long ) HPDF_MarkupAnnot_SetRectDiff( ( HPDF_Annotation ) hb_parptr( 1 ), rc ) );
|
||||
#else
|
||||
hb_retnl( -1 );
|
||||
#endif
|
||||
}
|
||||
/*
|
||||
HPDF_EXPORT(HPDF_STATUS)
|
||||
@@ -2200,7 +2303,11 @@ HPDF_MarkupAnnot_SetCloudEffect (HPDF_Annotation annot, HPDF_INT cloudIntensity
|
||||
*/
|
||||
HB_FUNC( HPDF_MarkupAnnot_SetCloudEffect )
|
||||
{
|
||||
#if HB_HPDF_VERS( 2, 2, 0 )
|
||||
hb_retnl( ( long ) HPDF_MarkupAnnot_SetCloudEffect( ( HPDF_Annotation ) hb_parptr( 1 ), ( HPDF_INT ) hb_parni( 2 ) ) );
|
||||
#else
|
||||
hb_retnl( -1 );
|
||||
#endif
|
||||
}
|
||||
/*
|
||||
HPDF_EXPORT(HPDF_STATUS)
|
||||
@@ -2208,6 +2315,7 @@ HPDF_MarkupAnnot_SetInteriorRGBColor (HPDF_Annotation annot, HPDF_RGBColor colo
|
||||
*/
|
||||
HB_FUNC( HPDF_MarkupAnnot_SetInteriorRGBColor )
|
||||
{
|
||||
#if HB_HPDF_VERS( 2, 2, 0 )
|
||||
HPDF_RGBColor rgb;
|
||||
|
||||
rgb.r = ( HPDF_REAL ) hb_parvnd( 2, 1 );
|
||||
@@ -2215,6 +2323,9 @@ HB_FUNC( HPDF_MarkupAnnot_SetInteriorRGBColor )
|
||||
rgb.b = ( HPDF_REAL ) hb_parvnd( 2, 3 );
|
||||
|
||||
hb_retnl( ( long ) HPDF_MarkupAnnot_SetInteriorRGBColor( ( HPDF_Annotation ) hb_parptr( 1 ), rgb ) );
|
||||
#else
|
||||
hb_retnl( -1 );
|
||||
#endif
|
||||
}
|
||||
/*
|
||||
HPDF_EXPORT(HPDF_STATUS)
|
||||
@@ -2222,6 +2333,7 @@ HPDF_MarkupAnnot_SetInteriorCMYKColor (HPDF_Annotation annot, HPDF_CMYKColor co
|
||||
*/
|
||||
HB_FUNC( HPDF_MarkupAnnot_SetInteriorCMYKColor )
|
||||
{
|
||||
#if HB_HPDF_VERS( 2, 2, 0 )
|
||||
HPDF_CMYKColor cmyk;
|
||||
|
||||
cmyk.c = ( HPDF_REAL ) hb_parvnd( 2, 1 );
|
||||
@@ -2230,6 +2342,9 @@ HB_FUNC( HPDF_MarkupAnnot_SetInteriorCMYKColor )
|
||||
cmyk.k = ( HPDF_REAL ) hb_parvnd( 2, 4 );
|
||||
|
||||
hb_retnl( ( long ) HPDF_MarkupAnnot_SetInteriorCMYKColor( ( HPDF_Annotation ) hb_parptr( 1 ), cmyk ) );
|
||||
#else
|
||||
hb_retnl( -1 );
|
||||
#endif
|
||||
}
|
||||
/*
|
||||
HPDF_EXPORT(HPDF_STATUS)
|
||||
@@ -2237,7 +2352,11 @@ HPDF_MarkupAnnot_SetInteriorGrayColor (HPDF_Annotation annot, HPDF_REAL color);
|
||||
*/
|
||||
HB_FUNC( HPDF_MarkupAnnot_SetInteriorGrayColor )
|
||||
{
|
||||
#if HB_HPDF_VERS( 2, 2, 0 )
|
||||
hb_retnl( ( long ) HPDF_MarkupAnnot_SetInteriorGrayColor( ( HPDF_Annotation ) hb_parptr( 1 ), ( HPDF_REAL ) hb_parnd( 2 ) ) );
|
||||
#else
|
||||
hb_retnl( -1 );
|
||||
#endif
|
||||
}
|
||||
/*
|
||||
HPDF_EXPORT(HPDF_STATUS)
|
||||
@@ -2245,7 +2364,11 @@ HPDF_MarkupAnnot_SetInteriorTransparent (HPDF_Annotation annot);
|
||||
*/
|
||||
HB_FUNC( HPDF_MarkupAnnot_SetInteriorTransparent )
|
||||
{
|
||||
#if HB_HPDF_VERS( 2, 2, 0 )
|
||||
hb_retnl( ( long ) HPDF_MarkupAnnot_SetInteriorTransparent( ( HPDF_Annotation ) hb_parptr( 1 ) ) );
|
||||
#else
|
||||
hb_retnl( -1 );
|
||||
#endif
|
||||
}
|
||||
/*
|
||||
HPDF_EXPORT(HPDF_STATUS)
|
||||
@@ -2253,6 +2376,7 @@ HPDF_TextMarkupAnnot_SetQuadPoints ( HPDF_Annotation annot, HPDF_Point lb, HPDF_
|
||||
*/
|
||||
HB_FUNC( HPDF_TextMarkupAnnot_SetQuadPoints )
|
||||
{
|
||||
#if HB_HPDF_VERS( 2, 2, 0 )
|
||||
HPDF_Point p1;
|
||||
HPDF_Point p2;
|
||||
HPDF_Point p3;
|
||||
@@ -2271,6 +2395,9 @@ HB_FUNC( HPDF_TextMarkupAnnot_SetQuadPoints )
|
||||
p4.y = ( HPDF_REAL ) hb_parvnd( 5, 2 );
|
||||
|
||||
hb_retnl( ( long ) HPDF_TextMarkupAnnot_SetQuadPoints( ( HPDF_Annotation ) hb_parptr( 1 ), p1, p2, p3, p4 ) );
|
||||
#else
|
||||
hb_retnl( -1 );
|
||||
#endif
|
||||
}
|
||||
/*
|
||||
HPDF_EXPORT(HPDF_STATUS)
|
||||
@@ -2281,7 +2408,11 @@ HPDF_Annot_Set3DView ( HPDF_MMgr mmgr,
|
||||
*/
|
||||
HB_FUNC( HPDF_Annot_Set3DView )
|
||||
{
|
||||
#if HB_HPDF_VERS( 2, 2, 0 )
|
||||
hb_retnl( ( long ) HPDF_Annot_Set3DView( ( HPDF_MMgr ) hb_parptr( 1 ), ( HPDF_Annotation ) hb_parptr( 2 ), ( HPDF_Annotation ) hb_parptr( 3 ), ( HPDF_Dict ) hb_parptr( 4 ) ) );
|
||||
#else
|
||||
hb_retnl( -1 );
|
||||
#endif
|
||||
}
|
||||
/*
|
||||
HPDF_EXPORT(HPDF_STATUS)
|
||||
@@ -2290,7 +2421,11 @@ HPDF_PopupAnnot_SetOpened (HPDF_Annotation annot,
|
||||
*/
|
||||
HB_FUNC( HPDF_PopupAnnot_SetOpened )
|
||||
{
|
||||
#if HB_HPDF_VERS( 2, 2, 0 )
|
||||
hb_retnl( ( long ) HPDF_PopupAnnot_SetOpened( ( HPDF_Annotation ) hb_parptr( 1 ), ( HPDF_BOOL ) hb_parl( 2 ) ) );
|
||||
#else
|
||||
hb_retnl( -1 );
|
||||
#endif
|
||||
}
|
||||
/*
|
||||
HPDF_EXPORT(HPDF_STATUS)
|
||||
@@ -2298,7 +2433,11 @@ HPDF_FreeTextAnnot_SetLineEndingStyle (HPDF_Annotation annot, HPDF_LineAnnotEndi
|
||||
*/
|
||||
HB_FUNC( HPDF_FreeTextAnnot_SetLineEndingStyle )
|
||||
{
|
||||
#if HB_HPDF_VERS( 2, 2, 0 )
|
||||
hb_retnl( ( long ) HPDF_FreeTextAnnot_SetLineEndingStyle( ( HPDF_Annotation ) hb_parptr( 1 ), ( HPDF_LineAnnotEndingStyle ) hb_parni( 2 ), ( HPDF_LineAnnotEndingStyle ) hb_parni( 3 ) ) );
|
||||
#else
|
||||
hb_retnl( -1 );
|
||||
#endif
|
||||
}
|
||||
/*
|
||||
HPDF_EXPORT(HPDF_STATUS)
|
||||
@@ -2306,6 +2445,7 @@ HPDF_FreeTextAnnot_Set3PointCalloutLine (HPDF_Annotation annot, HPDF_Point start
|
||||
*/
|
||||
HB_FUNC( HPDF_FreeTextAnnot_Set3PointCalloutLine )
|
||||
{
|
||||
#if HB_HPDF_VERS( 2, 2, 0 )
|
||||
HPDF_Point p1;
|
||||
HPDF_Point p2;
|
||||
HPDF_Point p3;
|
||||
@@ -2320,6 +2460,9 @@ HB_FUNC( HPDF_FreeTextAnnot_Set3PointCalloutLine )
|
||||
p3.y = ( HPDF_REAL ) hb_parvnd( 4, 2 );
|
||||
|
||||
hb_retnl( ( long ) HPDF_FreeTextAnnot_Set3PointCalloutLine( ( HPDF_Annotation ) hb_parptr( 1 ), p1, p2, p3 ) );
|
||||
#else
|
||||
hb_retnl( -1 );
|
||||
#endif
|
||||
}
|
||||
/*
|
||||
HPDF_EXPORT(HPDF_STATUS)
|
||||
@@ -2327,6 +2470,7 @@ HPDF_FreeTextAnnot_Set2PointCalloutLine (HPDF_Annotation annot, HPDF_Point start
|
||||
*/
|
||||
HB_FUNC( HPDF_FreeTextAnnot_Set2PointCalloutLine )
|
||||
{
|
||||
#if HB_HPDF_VERS( 2, 2, 0 )
|
||||
HPDF_Point p1;
|
||||
HPDF_Point p2;
|
||||
|
||||
@@ -2337,6 +2481,9 @@ HB_FUNC( HPDF_FreeTextAnnot_Set2PointCalloutLine )
|
||||
p2.y = ( HPDF_REAL ) hb_parvnd( 3, 2 );
|
||||
|
||||
hb_retnl( ( long ) HPDF_FreeTextAnnot_Set2PointCalloutLine( ( HPDF_Annotation ) hb_parptr( 1 ), p1, p2 ) );
|
||||
#else
|
||||
hb_retnl( -1 );
|
||||
#endif
|
||||
}
|
||||
/*
|
||||
HPDF_EXPORT(HPDF_STATUS)
|
||||
@@ -2344,7 +2491,11 @@ HPDF_FreeTextAnnot_SetDefaultStyle (HPDF_Annotation annot, const char* style);
|
||||
*/
|
||||
HB_FUNC( HPDF_FreeTextAnnot_SetDefaultStyle )
|
||||
{
|
||||
#if HB_HPDF_VERS( 2, 2, 0 )
|
||||
hb_retnl( ( long ) HPDF_FreeTextAnnot_SetDefaultStyle( ( HPDF_Annotation ) hb_parptr( 1 ), hb_parc( 2 ) ) );
|
||||
#else
|
||||
hb_retnl( -1 );
|
||||
#endif
|
||||
}
|
||||
/*
|
||||
HPDF_EXPORT(HPDF_STATUS)
|
||||
@@ -2354,6 +2505,7 @@ HPDF_LineAnnot_SetPosition (HPDF_Annotation annot,
|
||||
*/
|
||||
HB_FUNC( HPDF_LineAnnot_SetPosition )
|
||||
{
|
||||
#if HB_HPDF_VERS( 2, 2, 0 )
|
||||
HPDF_Point p1;
|
||||
HPDF_Point p2;
|
||||
|
||||
@@ -2364,6 +2516,9 @@ HB_FUNC( HPDF_LineAnnot_SetPosition )
|
||||
p2.y = ( HPDF_REAL ) hb_parvnd( 4, 2 );
|
||||
|
||||
hb_retnl( ( long ) HPDF_LineAnnot_SetPosition( ( HPDF_Annotation ) hb_parptr( 1 ), p1, ( HPDF_LineAnnotEndingStyle ) hb_parni( 3 ), p2, ( HPDF_LineAnnotEndingStyle ) hb_parni( 5 ) ) );
|
||||
#else
|
||||
hb_retnl( -1 );
|
||||
#endif
|
||||
}
|
||||
/*
|
||||
HPDF_EXPORT(HPDF_STATUS)
|
||||
@@ -2371,7 +2526,11 @@ HPDF_LineAnnot_SetLeader (HPDF_Annotation annot, HPDF_INT leaderLen, HPDF_INT le
|
||||
*/
|
||||
HB_FUNC( HPDF_LineAnnot_SetLeader )
|
||||
{
|
||||
#if HB_HPDF_VERS( 2, 2, 0 )
|
||||
hb_retnl( ( long ) HPDF_LineAnnot_SetLeader( ( HPDF_Annotation ) hb_parptr( 1 ), hb_parni( 2 ), hb_parni( 3 ), hb_parni( 4 ) ) );
|
||||
#else
|
||||
hb_retnl( -1 );
|
||||
#endif
|
||||
}
|
||||
/*
|
||||
HPDF_EXPORT(HPDF_STATUS)
|
||||
@@ -2379,7 +2538,11 @@ HPDF_LineAnnot_SetCaption (HPDF_Annotation annot, HPDF_BOOL showCaption, HPDF_Li
|
||||
*/
|
||||
HB_FUNC( HPDF_LineAnnot_SetCaption )
|
||||
{
|
||||
#if HB_HPDF_VERS( 2, 2, 0 )
|
||||
hb_retnl( ( long ) HPDF_LineAnnot_SetCaption( ( HPDF_Annotation ) hb_parptr( 1 ), hb_parl( 2 ), ( HPDF_LineAnnotCapPosition ) hb_parni( 3 ), hb_parni( 4 ), hb_parni( 5 ) ) );
|
||||
#else
|
||||
hb_retnl( -1 );
|
||||
#endif
|
||||
}
|
||||
/*
|
||||
HPDF_EXPORT(HPDF_STATUS)
|
||||
@@ -2392,7 +2555,11 @@ HPDF_Annotation_SetBorderStyle (HPDF_Annotation annot,
|
||||
*/
|
||||
HB_FUNC( HPDF_Annotation_SetBorderStyle )
|
||||
{
|
||||
#if HB_HPDF_VERS( 2, 2, 0 )
|
||||
hb_retnl( ( long ) HPDF_Annotation_SetBorderStyle( ( HPDF_Annotation ) hb_parptr( 1 ), ( HPDF_BSSubtype ) hb_parni( 2 ), ( HPDF_REAL ) hb_parnd( 3 ), ( HPDF_UINT16 ) hb_parni( 4 ), ( HPDF_UINT16 ) hb_parni( 5 ), ( HPDF_UINT16 ) hb_parni( 6 ) ) );
|
||||
#else
|
||||
hb_retnl( -1 );
|
||||
#endif
|
||||
}
|
||||
/*
|
||||
HPDF_EXPORT(HPDF_Dict)
|
||||
@@ -2403,7 +2570,11 @@ HPDF_Page_Create3DView (HPDF_Page page,
|
||||
*/
|
||||
HB_FUNC( HPDF_Page_Create3DView )
|
||||
{
|
||||
#if HB_HPDF_VERS( 2, 2, 0 )
|
||||
hb_retptr( ( HPDF_Dict ) HPDF_Page_Create3DView( ( HPDF_Page ) hb_parptr( 1 ), ( HPDF_U3D ) hb_parptr( 2 ), ( HPDF_Annotation ) hb_parptr( 3 ), hb_parc( 4 ) ) );
|
||||
#else
|
||||
hb_retptr( NULL );
|
||||
#endif
|
||||
}
|
||||
/*
|
||||
HPDF_EXPORT(HPDF_Image)
|
||||
@@ -2413,6 +2584,7 @@ HPDF_LoadPngImageFromMem (HPDF_Doc pdf,
|
||||
*/
|
||||
HB_FUNC( HPDF_LoadPngImageFromMem )
|
||||
{
|
||||
#if HB_HPDF_VERS( 2, 2, 0 )
|
||||
HPDF_UINT size = ( HPDF_UINT ) hb_parclen( 2 );
|
||||
HPDF_BYTE * buffer;
|
||||
|
||||
@@ -2422,6 +2594,10 @@ HB_FUNC( HPDF_LoadPngImageFromMem )
|
||||
|
||||
if( ! hb_storclen_buffer( ( char * ) buffer, size, 2 ) )
|
||||
hb_xfree( buffer );
|
||||
#else
|
||||
hb_storc( NULL, 2 );
|
||||
hb_retptr( NULL );
|
||||
#endif
|
||||
}
|
||||
/*
|
||||
HPDF_EXPORT(HPDF_Image)
|
||||
@@ -2431,6 +2607,7 @@ HPDF_LoadJpegImageFromMem (HPDF_Doc pdf,
|
||||
*/
|
||||
HB_FUNC( HPDF_LoadJpegImageFromMem )
|
||||
{
|
||||
#if HB_HPDF_VERS( 2, 2, 0 )
|
||||
HPDF_UINT size = ( HPDF_UINT ) hb_parclen( 2 );
|
||||
HPDF_BYTE * buffer;
|
||||
|
||||
@@ -2440,6 +2617,10 @@ HB_FUNC( HPDF_LoadJpegImageFromMem )
|
||||
|
||||
if( ! hb_storclen_buffer( ( char * ) buffer, size, 2 ) )
|
||||
hb_xfree( buffer );
|
||||
#else
|
||||
hb_storc( NULL, 2 );
|
||||
hb_retptr( NULL );
|
||||
#endif
|
||||
}
|
||||
/*
|
||||
HPDF_EXPORT(HPDF_STATUS)
|
||||
@@ -2448,7 +2629,11 @@ HPDF_Image_AddSMask (HPDF_Image image,
|
||||
*/
|
||||
HB_FUNC( HPDF_Image_AddSMask )
|
||||
{
|
||||
#if HB_HPDF_VERS( 2, 2, 0 )
|
||||
hb_retnl( ( long ) HPDF_Image_AddSMask( ( HPDF_Image ) hb_parptr( 1 ), ( HPDF_Image ) hb_parptr( 1 ) ) );
|
||||
#else
|
||||
hb_retnl( -1 );
|
||||
#endif
|
||||
}
|
||||
/*
|
||||
HPDF_EXPORT(HPDF_EmbeddedFile)
|
||||
@@ -2457,7 +2642,11 @@ HPDF_AttachFile (HPDF_Doc pdf,
|
||||
*/
|
||||
HB_FUNC( HPDF_AttachFile )
|
||||
{
|
||||
#if HB_HPDF_VERS( 2, 2, 0 )
|
||||
hb_retptr( ( HPDF_EmbeddedFile ) HPDF_AttachFile( HPDF_Doc_par( 1 ), hb_parc( 2 ) ) );
|
||||
#else
|
||||
hb_retptr( NULL );
|
||||
#endif
|
||||
}
|
||||
/*
|
||||
HPDF_EXPORT(HPDF_OutputIntent)
|
||||
@@ -2469,7 +2658,11 @@ HPDF_ICC_LoadIccFromMem (HPDF_Doc pdf,
|
||||
*/
|
||||
HB_FUNC( HPDF_ICC_LoadIccFromMem )
|
||||
{
|
||||
#if HB_HPDF_VERS( 2, 2, 0 )
|
||||
hb_retptr( ( HPDF_OutputIntent ) HPDF_ICC_LoadIccFromMem( HPDF_Doc_par( 1 ), ( HPDF_MMgr ) hb_parptr( 2 ), ( HPDF_Stream ) hb_parptr( 3 ), ( HPDF_Xref ) hb_parptr( 4 ), hb_parni( 5 ) ) );
|
||||
#else
|
||||
hb_retptr( NULL );
|
||||
#endif
|
||||
}
|
||||
/*
|
||||
HPDF_EXPORT(HPDF_OutputIntent)
|
||||
@@ -2479,7 +2672,11 @@ HPDF_LoadIccProfileFromFile (HPDF_Doc pdf,
|
||||
*/
|
||||
HB_FUNC( HPDF_LoadIccProfileFromFile )
|
||||
{
|
||||
#if HB_HPDF_VERS( 2, 2, 0 )
|
||||
hb_retptr( ( HPDF_OutputIntent ) HPDF_LoadIccProfileFromFile( HPDF_Doc_par( 1 ), hb_parc( 2 ), hb_parni( 3 ) ) );
|
||||
#else
|
||||
hb_retptr( NULL );
|
||||
#endif
|
||||
}
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
Reference in New Issue
Block a user