Graphics-MNG
view release on metacpan or search on metacpan
#= proof-of-concept -- code to call the user back synchronously
#===============================================================================
void
mng_test_callback_fn(hHandle,cbfn)
mng_handle hHandle
SV *cbfn
PROTOTYPE: $$
PREINIT:
int c_rv = 0;
int count;
PPCODE:
if ( SvROK(cbfn) ) cbfn=SvRV(cbfn); // allow one level of deref
if ( SvTYPE(cbfn) != SVt_PVCV )
{
my_warn( "test_callback_fn: wrong type for callback function" );
XSRETURN_UNDEF;
}
// in production code, this would be a good place to STORE the callback fn
#===============================================================================
#= This function is called by the MNG.pm module upon initialization to
#= record what category offset the warnings::register module placed us at.
#===============================================================================
void
mng_set_warn_category(offset)
unsigned long offset
PROTOTYPE: $
PPCODE:
warn_category = offset/2; // need to half the value for use in PERL guts
#===============================================================================
# MNG CONSTANTS RETURNING NON-INTEGER DATA
#
# These are more verbose than normal because I'm assigning a #define constant
# instead of calling a function
#===============================================================================
PREINIT:
// declare some local variables
mng_int8 c_iSeverity = 0;
mng_chunkid c_iChunkname = 0;
mng_uint32 c_iChunkseq = 0;
mng_int32 c_iExtra1 = 0;
mng_int32 c_iExtra2 = 0;
mng_pchar c_zErrortext = NULL;
mng_retcode c_rv;
SV* errortext = &PL_sv_undef;
PPCODE:
c_rv = mng_getlasterror ( hHandle,
&c_iSeverity,
&c_iChunkname,
&c_iChunkseq,
&c_iExtra1,
&c_iExtra2,
&c_zErrortext );
// always return the mng_retcode
void
mng_get_bgcolor(hHandle)
mng_handle hHandle
PROTOTYPE: $
PREINIT:
mng_retcode c_rv;
mng_uint16 c_iRed;
mng_uint16 c_iGreen;
mng_uint16 c_iBlue;
PPCODE:
c_rv = mng_get_bgcolor(hHandle,&c_iRed,&c_iGreen,&c_iBlue);
XPUSHs( sv_2mortal( newSViv( c_rv ) ) );
if ( c_rv == MNG_NOERROR )
{
XPUSHs( sv_2mortal( newSViv( c_iRed ) ) );
XPUSHs( sv_2mortal( newSViv( c_iGreen ) ) );
XPUSHs( sv_2mortal( newSViv( c_iBlue ) ) );
}
mng_get_lastbackchunk(hHandle)
mng_handle hHandle
PROTOTYPE: $
PREINIT:
mng_retcode c_rv;
mng_uint16 c_iRed = 0;
mng_uint16 c_iGreen = 0;
mng_uint16 c_iBlue = 0;
mng_uint8 c_iMandatory = 0;
PPCODE:
// this function was introduced in v1.0.3
c_rv = _MNG_GET_LASTBACKCHUNK(hHandle,&c_iRed,&c_iGreen,&c_iBlue,&c_iMandatory);
XPUSHs( sv_2mortal( newSViv( c_rv ) ) );
if ( c_rv == MNG_NOERROR )
{
XPUSHs( sv_2mortal( newSViv( c_iRed ) ) );
XPUSHs( sv_2mortal( newSViv( c_iGreen ) ) );
XPUSHs( sv_2mortal( newSViv( c_iBlue ) ) );
XPUSHs( sv_2mortal( newSViv( c_iMandatory ) ) );
PREINIT:
mng_retcode c_rv;
mng_handle c_hChunk = (mng_handle) hChunk;
mng_uint32 c_iWidth = 0;
mng_uint32 c_iHeight = 0;
mng_uint8 c_iBitdepth = 0;
mng_uint8 c_iColortype = 0;
mng_uint8 c_iCompression = 0;
mng_uint8 c_iFilter = 0;
mng_uint8 c_iInterlace = 0;
PPCODE:
c_rv = mng_getchunk_ihdr(hHandle,c_hChunk,&c_iWidth,&c_iHeight,&c_iBitdepth,&c_iColortype,&c_iCompression,&c_iFilter,&c_iInterlace);
XPUSHs( sv_2mortal( newSViv( c_rv ) ) );
if ( c_rv == MNG_NOERROR )
{
XPUSHs( sv_2mortal( newSViv( c_iWidth ) ) );
XPUSHs( sv_2mortal( newSViv( c_iHeight ) ) );
XPUSHs( sv_2mortal( newSViv( c_iBitdepth ) ) );
XPUSHs( sv_2mortal( newSViv( c_iColortype ) ) );
XPUSHs( sv_2mortal( newSViv( c_iCompression ) ) );
void
mng_getchunk_plte(hHandle,hChunk)
mng_handle hHandle
mng_chunkhandle hChunk
PROTOTYPE: $$
PREINIT:
mng_retcode c_rv;
mng_handle c_hChunk = (mng_handle) hChunk;
mng_uint32 c_iCount = 0;
mng_palette8 c_aPalette;
PPCODE:
c_rv = mng_getchunk_plte(hHandle,c_hChunk,&c_iCount,&c_aPalette);
XPUSHs( sv_2mortal( newSViv( c_rv ) ) );
if ( c_rv == MNG_NOERROR )
{
XPUSHs( sv_2mortal( newSViv( c_iCount ) ) );
XPUSHs( sv_2mortal( newSVpvn( CHAR_PTR_CAST(c_aPalette), sizeof(c_aPalette) ) ) );
}
mng_getchunk_idat(hHandle,hChunk)
mng_handle hHandle
mng_chunkhandle hChunk
PROTOTYPE: $$
PREINIT:
mng_retcode c_rv;
mng_handle c_hChunk = (mng_handle) hChunk;
mng_uint32 c_iRawlen = 0;
mng_ptr c_pRawdata = NULL;
PPCODE:
c_rv = mng_getchunk_idat(hHandle,c_hChunk,&c_iRawlen,&c_pRawdata);
XPUSHs( sv_2mortal( newSViv( c_rv ) ) );
if ( c_rv == MNG_NOERROR )
{
FIX_NULL_PTR( c_pRawdata, c_iRawlen );
XPUSHs( sv_2mortal( newSViv( c_iRawlen ) ) );
XPUSHs( sv_2mortal( newSVpvn( c_pRawdata, sizeof(char) * c_iRawlen ) ) );
}
mng_uint8 c_iType = 0;
mng_uint32 c_iCount = 0;
mng_uint8arr c_aAlphas;
mng_uint16 c_iGray = 0;
mng_uint16 c_iRed = 0;
mng_uint16 c_iGreen = 0;
mng_uint16 c_iBlue = 0;
mng_uint32 c_iRawlen = 0;
mng_uint8arr c_aRawdata;
PPCODE:
c_rv = mng_getchunk_trns(hHandle,c_hChunk,&c_bEmpty,&c_bGlobal,&c_iType,&c_iCount,&c_aAlphas,&c_iGray,&c_iRed,&c_iGreen,&c_iBlue,&c_iRawlen,&c_aRawdata);
XPUSHs( sv_2mortal( newSViv( c_rv ) ) );
if ( c_rv == MNG_NOERROR )
{
XPUSHs( sv_2mortal( newSViv ( c_bEmpty ) ) );
XPUSHs( sv_2mortal( newSViv ( c_bGlobal ) ) );
XPUSHs( sv_2mortal( newSViv ( c_iType ) ) );
XPUSHs( sv_2mortal( newSViv ( c_iCount ) ) );
mng_getchunk_gama(hHandle,hChunk)
mng_handle hHandle
mng_chunkhandle hChunk
PROTOTYPE: $$
PREINIT:
mng_retcode c_rv;
mng_handle c_hChunk = (mng_handle) hChunk;
mng_bool c_bEmpty = FALSE;
mng_uint32 c_iGamma = 0;
PPCODE:
c_rv = mng_getchunk_gama(hHandle,c_hChunk,&c_bEmpty,&c_iGamma);
XPUSHs( sv_2mortal( newSViv( c_rv ) ) );
if ( c_rv == MNG_NOERROR )
{
XPUSHs( sv_2mortal( newSViv( c_bEmpty ) ) );
XPUSHs( sv_2mortal( newSViv( c_iGamma ) ) );
}
mng_bool c_bEmpty = FALSE;
mng_uint32 c_iWhitepointx = 0;
mng_uint32 c_iWhitepointy = 0;
mng_uint32 c_iRedx = 0;
mng_uint32 c_iRedy = 0;
mng_uint32 c_iGreenx = 0;
mng_uint32 c_iGreeny = 0;
mng_uint32 c_iBluex = 0;
mng_uint32 c_iBluey = 0;
PPCODE:
c_rv = mng_getchunk_chrm(hHandle,c_hChunk, &c_bEmpty, &c_iWhitepointx, &c_iWhitepointy, &c_iRedx, &c_iRedy, &c_iGreenx, &c_iGreeny, &c_iBluex, &c_iBluey);
XPUSHs( sv_2mortal( newSViv( c_rv ) ) );
if ( c_rv == MNG_NOERROR )
{
XPUSHs( sv_2mortal( newSViv( c_bEmpty ) ) );
XPUSHs( sv_2mortal( newSViv( c_iWhitepointx ) ) );
XPUSHs( sv_2mortal( newSViv( c_iWhitepointy ) ) );
XPUSHs( sv_2mortal( newSViv( c_iRedx ) ) );
XPUSHs( sv_2mortal( newSViv( c_iRedy ) ) );
mng_getchunk_srgb(hHandle,hChunk)
mng_handle hHandle
mng_chunkhandle hChunk
PROTOTYPE: $$
PREINIT:
mng_retcode c_rv;
mng_handle c_hChunk = (mng_handle) hChunk;
mng_bool c_bEmpty = FALSE;
mng_uint8 c_iRenderingintent = 0;
PPCODE:
c_rv = mng_getchunk_srgb(hHandle,c_hChunk, &c_bEmpty, &c_iRenderingintent);
XPUSHs( sv_2mortal( newSViv( c_rv ) ) );
if ( c_rv == MNG_NOERROR )
{
XPUSHs( sv_2mortal( newSViv( c_bEmpty ) ) );
XPUSHs( sv_2mortal( newSViv( c_iRenderingintent ) ) );
}
PREINIT:
mng_retcode c_rv;
mng_handle c_hChunk = (mng_handle) hChunk;
mng_bool c_bEmpty = FALSE;
mng_uint32 c_iNamesize = 0;
mng_pchar c_zName = NULL;
mng_uint8 c_iCompression = 0;
mng_uint32 c_iProfilesize = 0;
mng_ptr c_pProfile = NULL;
PPCODE:
c_rv = mng_getchunk_iccp(hHandle,c_hChunk, &c_bEmpty, &c_iNamesize, &c_zName, &c_iCompression, &c_iProfilesize, &c_pProfile);
XPUSHs( sv_2mortal( newSViv( c_rv ) ) );
if ( c_rv == MNG_NOERROR )
{
FIX_NULL_PTR( c_zName, c_iNamesize );
FIX_NULL_PTR( c_pProfile, c_iProfilesize );
XPUSHs( sv_2mortal( newSViv ( c_bEmpty ) ) );
XPUSHs( sv_2mortal( newSViv ( c_iNamesize ) ) );
XPUSHs( sv_2mortal( newSVpvn( c_zName, c_iNamesize ) ) );
mng_chunkhandle hChunk
PROTOTYPE: $$
PREINIT:
mng_retcode c_rv;
mng_handle c_hChunk = (mng_handle) hChunk;
mng_uint32 c_iKeywordsize = 0;
mng_pchar c_zKeyword = NULL;
mng_uint32 c_iTextsize = 0;
mng_pchar c_zText = NULL;
PPCODE:
c_rv = mng_getchunk_text(hHandle,c_hChunk,&c_iKeywordsize,&c_zKeyword,&c_iTextsize,&c_zText);
XPUSHs( sv_2mortal( newSViv( c_rv ) ) );
if ( c_rv == MNG_NOERROR )
{
FIX_NULL_PTR( c_zKeyword, c_iKeywordsize );
FIX_NULL_PTR( c_zText, c_iTextsize );
XPUSHs( sv_2mortal( newSViv ( c_iKeywordsize ) ) );
XPUSHs( sv_2mortal( newSVpvn( c_zKeyword, c_iKeywordsize ) ) );
XPUSHs( sv_2mortal( newSViv ( c_iTextsize ) ) );
PROTOTYPE: $$
PREINIT:
mng_retcode c_rv;
mng_handle c_hChunk = (mng_handle) hChunk;
mng_uint32 c_iKeywordsize = 0;
mng_pchar c_zKeyword = NULL;
mng_uint8 c_iCompression = 0;
mng_uint32 c_iTextsize = 0;
mng_pchar c_zText = NULL;
PPCODE:
c_rv = mng_getchunk_ztxt(hHandle,c_hChunk,&c_iKeywordsize,&c_zKeyword,&c_iCompression,&c_iTextsize,&c_zText);
XPUSHs( sv_2mortal( newSViv( c_rv ) ) );
if ( c_rv == MNG_NOERROR )
{
FIX_NULL_PTR( c_zKeyword, c_iKeywordsize );
FIX_NULL_PTR( c_zText, c_iTextsize );
XPUSHs( sv_2mortal( newSViv ( c_iKeywordsize ) ) );
XPUSHs( sv_2mortal( newSVpvn( c_zKeyword, c_iKeywordsize ) ) );
XPUSHs( sv_2mortal( newSViv ( c_iCompression ) ) );
mng_pchar c_zKeyword = NULL;
mng_uint8 c_iCompressionflag = 0;
mng_uint8 c_iCompressionmethod = 0;
mng_uint32 c_iLanguagesize = 0;
mng_pchar c_zLanguage = NULL;
mng_uint32 c_iTranslationsize = 0;
mng_pchar c_zTranslation = NULL;
mng_uint32 c_iTextsize = 0;
mng_pchar c_zText = NULL;
PPCODE:
c_rv = mng_getchunk_itxt(hHandle,c_hChunk,&c_iKeywordsize,&c_zKeyword,&c_iCompressionflag,&c_iCompressionmethod,&c_iLanguagesize,&c_zLanguage,&c_iTranslationsize,&c_zTranslation,&c_iTextsize,&c_zText);
XPUSHs( sv_2mortal( newSViv( c_rv ) ) );
if ( c_rv == MNG_NOERROR )
{
FIX_NULL_PTR( c_zKeyword, c_iKeywordsize );
FIX_NULL_PTR( c_zLanguage, c_iLanguagesize );
FIX_NULL_PTR( c_zTranslation, c_iTranslationsize );
FIX_NULL_PTR( c_zText, c_iTextsize );
XPUSHs( sv_2mortal( newSViv ( c_iKeywordsize ) ) );
mng_retcode c_rv;
mng_handle c_hChunk = (mng_handle) hChunk;
mng_bool c_bEmpty = FALSE;
mng_uint8 c_iType = 0;
mng_uint8 c_iIndex = 0;
mng_uint16 c_iGray = 0;
mng_uint16 c_iRed = 0;
mng_uint16 c_iGreen = 0;
mng_uint16 c_iBlue = 0;
PPCODE:
c_rv = mng_getchunk_bkgd(hHandle,c_hChunk,&c_bEmpty,&c_iType,&c_iIndex,&c_iGray,&c_iRed,&c_iGreen,&c_iBlue);
XPUSHs( sv_2mortal( newSViv( c_rv ) ) );
if ( c_rv == MNG_NOERROR )
{
XPUSHs( sv_2mortal( newSViv( c_bEmpty ) ) );
XPUSHs( sv_2mortal( newSViv( c_iType ) ) );
XPUSHs( sv_2mortal( newSViv( c_iIndex ) ) );
XPUSHs( sv_2mortal( newSViv( c_iGray ) ) );
XPUSHs( sv_2mortal( newSViv( c_iRed ) ) );
mng_chunkhandle hChunk
PROTOTYPE: $$
PREINIT:
mng_retcode c_rv;
mng_handle c_hChunk = (mng_handle) hChunk;
mng_bool c_bEmpty = FALSE;
mng_uint32 c_iSizex = 0;
mng_uint32 c_iSizey = 0;
mng_uint8 c_iUnit = 0;
PPCODE:
c_rv = mng_getchunk_phys(hHandle,c_hChunk,&c_bEmpty,&c_iSizex,&c_iSizey,&c_iUnit);
XPUSHs( sv_2mortal( newSViv( c_rv ) ) );
if ( c_rv == MNG_NOERROR )
{
XPUSHs( sv_2mortal( newSViv( c_bEmpty ) ) );
XPUSHs( sv_2mortal( newSViv( c_iSizex ) ) );
XPUSHs( sv_2mortal( newSViv( c_iSizey ) ) );
XPUSHs( sv_2mortal( newSViv( c_iUnit ) ) );
}
mng_handle hHandle
mng_chunkhandle hChunk
PROTOTYPE: $$
PREINIT:
mng_retcode c_rv;
mng_handle c_hChunk = (mng_handle) hChunk;
mng_bool c_bEmpty = FALSE;
mng_uint8 c_iType = 0;
mng_uint8arr4 c_aBits;
PPCODE:
c_rv = mng_getchunk_sbit(hHandle,c_hChunk,&c_bEmpty,&c_iType,&c_aBits);
XPUSHs( sv_2mortal( newSViv( c_rv ) ) );
if ( c_rv == MNG_NOERROR )
{
XPUSHs( sv_2mortal( newSViv( c_bEmpty ) ) );
XPUSHs( sv_2mortal( newSViv( c_iType ) ) );
XPUSHs( sv_2mortal( newSVpvn( c_aBits, sizeof(c_aBits) ) ) );
}
PREINIT:
mng_retcode c_rv;
mng_handle c_hChunk = (mng_handle) hChunk;
mng_bool c_bEmpty = FALSE;
mng_uint32 c_iNamesize = 0;
mng_pchar c_zName = NULL;
mng_uint8 c_iSampledepth = 0;
mng_uint32 c_iEntrycount = 0;
mng_ptr c_pEntries = NULL;
PPCODE:
c_rv = mng_getchunk_splt(hHandle,c_hChunk,&c_bEmpty,&c_iNamesize,&c_zName,&c_iSampledepth,&c_iEntrycount,&c_pEntries);
XPUSHs( sv_2mortal( newSViv( c_rv ) ) );
if ( c_rv == MNG_NOERROR )
{
FIX_NULL_PTR( c_zName, c_iNamesize );
FIX_NULL_PTR( c_pEntries, c_iEntrycount );
XPUSHs( sv_2mortal( newSViv ( c_bEmpty ) ) );
XPUSHs( sv_2mortal( newSViv ( c_iNamesize ) ) );
XPUSHs( sv_2mortal( newSVpvn( c_zName, c_iNamesize ) ) );
mng_getchunk_hist(hHandle,hChunk)
mng_handle hHandle
mng_chunkhandle hChunk
PROTOTYPE: $$
PREINIT:
mng_retcode c_rv;
mng_handle c_hChunk = (mng_handle) hChunk;
mng_uint32 c_iEntrycount = 0;
mng_uint16arr c_aEntries;
PPCODE:
c_rv = mng_getchunk_hist(hHandle,c_hChunk,&c_iEntrycount,&c_aEntries);
XPUSHs( sv_2mortal( newSViv( c_rv ) ) );
if ( c_rv == MNG_NOERROR )
{
XPUSHs( sv_2mortal( newSViv( c_iEntrycount ) ) );
XPUSHs( sv_2mortal( newSVpvn( CHAR_PTR_CAST(c_aEntries), sizeof(c_aEntries) ) ) );
}
PREINIT:
mng_retcode c_rv;
mng_handle c_hChunk = (mng_handle) hChunk;
mng_uint16 c_iYear = 0;
mng_uint8 c_iMonth = 0;
mng_uint8 c_iDay = 0;
mng_uint8 c_iHour = 0;
mng_uint8 c_iMinute = 0;
mng_uint8 c_iSecond = 0;
PPCODE:
c_rv = mng_getchunk_time(hHandle,c_hChunk,&c_iYear,&c_iMonth,&c_iDay,&c_iHour,&c_iMinute,&c_iSecond);
XPUSHs( sv_2mortal( newSViv( c_rv ) ) );
if ( c_rv == MNG_NOERROR )
{
XPUSHs( sv_2mortal( newSViv( c_iYear ) ) );
XPUSHs( sv_2mortal( newSViv( c_iMonth ) ) );
XPUSHs( sv_2mortal( newSViv( c_iDay ) ) );
XPUSHs( sv_2mortal( newSViv( c_iHour ) ) );
XPUSHs( sv_2mortal( newSViv( c_iMinute ) ) );
mng_retcode c_rv;
mng_handle c_hChunk = (mng_handle) hChunk;
mng_uint32 c_iWidth = 0;
mng_uint32 c_iHeight = 0;
mng_uint32 c_iTicks = 0;
mng_uint32 c_iLayercount = 0;
mng_uint32 c_iFramecount = 0;
mng_uint32 c_iPlaytime = 0;
mng_uint32 c_iSimplicity = 0;
PPCODE:
c_rv = mng_getchunk_mhdr(hHandle,c_hChunk,&c_iWidth,&c_iHeight,&c_iTicks,&c_iLayercount,&c_iFramecount,&c_iPlaytime,&c_iSimplicity);
XPUSHs( sv_2mortal( newSViv( c_rv ) ) );
if ( c_rv == MNG_NOERROR )
{
XPUSHs( sv_2mortal( newSViv( c_iWidth ) ) );
XPUSHs( sv_2mortal( newSViv( c_iHeight ) ) );
XPUSHs( sv_2mortal( newSViv( c_iTicks ) ) );
XPUSHs( sv_2mortal( newSViv( c_iLayercount ) ) );
XPUSHs( sv_2mortal( newSViv( c_iFramecount ) ) );
mng_retcode c_rv;
mng_handle c_hChunk = (mng_handle) hChunk;
mng_uint8 c_iLevel = 0;
mng_uint32 c_iRepeat = 0;
mng_uint8 c_iTermination = 0;
mng_uint32 c_iItermin = 0;
mng_uint32 c_iItermax = 0;
mng_uint32 c_iCount = 0;
mng_uint32p c_pSignals = NULL;
PPCODE:
c_rv = mng_getchunk_loop(hHandle,c_hChunk,&c_iLevel,&c_iRepeat,&c_iTermination,&c_iItermin,&c_iItermax,&c_iCount,&c_pSignals);
XPUSHs( sv_2mortal( newSViv( c_rv ) ) );
if ( c_rv == MNG_NOERROR )
{
FIX_NULL_PTR( c_pSignals, c_iCount );
XPUSHs( sv_2mortal( newSViv( c_iLevel ) ) );
XPUSHs( sv_2mortal( newSViv( c_iRepeat ) ) );
XPUSHs( sv_2mortal( newSViv( c_iTermination ) ) );
XPUSHs( sv_2mortal( newSViv( c_iItermin ) ) );
mng_getchunk_endl(hHandle,hChunk)
mng_handle hHandle
mng_chunkhandle hChunk
PROTOTYPE: $$
PREINIT:
mng_retcode c_rv;
mng_handle c_hChunk = (mng_handle) hChunk;
mng_uint8 c_iLevel = 0;
PPCODE:
c_rv = mng_getchunk_endl(hHandle,c_hChunk,&c_iLevel);
XPUSHs( sv_2mortal( newSViv( c_rv ) ) );
if ( c_rv == MNG_NOERROR )
{
XPUSHs( sv_2mortal( newSViv( c_iLevel ) ) );
}
void
mng_uint8 c_iConcrete = 0;
mng_bool c_bHasloca = FALSE;
mng_int32 c_iXlocation = 0;
mng_int32 c_iYlocation = 0;
mng_bool c_bHasclip = FALSE;
mng_int32 c_iLeftcb = 0;
mng_int32 c_iRightcb = 0;
mng_int32 c_iTopcb = 0;
mng_int32 c_iBottomcb = 0;
PPCODE:
c_rv = mng_getchunk_defi(hHandle,c_hChunk,&c_iObjectid,&c_iDonotshow,&c_iConcrete,&c_bHasloca,&c_iXlocation,&c_iYlocation,&c_bHasclip,&c_iLeftcb,&c_iRightcb,&c_iTopcb,&c_iBottomcb);
XPUSHs( sv_2mortal( newSViv( c_rv ) ) );
if ( c_rv == MNG_NOERROR )
{
XPUSHs( sv_2mortal( newSViv( c_iObjectid ) ) );
XPUSHs( sv_2mortal( newSViv( c_iDonotshow ) ) );
XPUSHs( sv_2mortal( newSViv( c_iConcrete ) ) );
XPUSHs( sv_2mortal( newSViv( c_bHasloca ) ) );
XPUSHs( sv_2mortal( newSViv( c_iXlocation ) ) );
mng_uint8 c_iColortype = 0;
mng_uint8 c_iCompression = 0;
mng_uint8 c_iFilter = 0;
mng_uint8 c_iInterlace = 0;
mng_uint16 c_iRed = 0;
mng_uint16 c_iGreen = 0;
mng_uint16 c_iBlue = 0;
mng_uint16 c_iAlpha = 0;
mng_uint8 c_iViewable = 0;
PPCODE:
c_rv = mng_getchunk_basi(hHandle,c_hChunk,&c_iWidth,&c_iHeight,&c_iBitdepth,&c_iColortype,&c_iCompression,&c_iFilter,&c_iInterlace,&c_iRed,&c_iGreen,&c_iBlue,&c_iAlpha,&c_iViewable);
XPUSHs( sv_2mortal( newSViv( c_rv ) ) );
if ( c_rv == MNG_NOERROR )
{
XPUSHs( sv_2mortal( newSViv( c_iWidth ) ) );
XPUSHs( sv_2mortal( newSViv( c_iHeight ) ) );
XPUSHs( sv_2mortal( newSViv( c_iBitdepth ) ) );
XPUSHs( sv_2mortal( newSViv( c_iColortype ) ) );
XPUSHs( sv_2mortal( newSViv( c_iCompression ) ) );
mng_uint16 c_iSourceid = 0;
mng_uint16 c_iCloneid = 0;
mng_uint8 c_iClonetype = 0;
mng_uint8 c_iDonotshow = 0;
mng_uint8 c_iConcrete = 0;
mng_bool c_bHasloca = FALSE;
mng_uint8 c_iLocationtype = 0;
mng_int32 c_iLocationx = 0;
mng_int32 c_iLocationy = 0;
PPCODE:
c_rv = mng_getchunk_clon(hHandle,c_hChunk,&c_iSourceid,&c_iCloneid,&c_iClonetype,&c_iDonotshow,&c_iConcrete,&c_bHasloca,&c_iLocationtype,&c_iLocationx,&c_iLocationy);
XPUSHs( sv_2mortal( newSViv( c_rv ) ) );
if ( c_rv == MNG_NOERROR )
{
XPUSHs( sv_2mortal( newSViv( c_iSourceid ) ) );
XPUSHs( sv_2mortal( newSViv( c_iCloneid ) ) );
XPUSHs( sv_2mortal( newSViv( c_iClonetype ) ) );
XPUSHs( sv_2mortal( newSViv( c_iDonotshow ) ) );
XPUSHs( sv_2mortal( newSViv( c_iConcrete ) ) );
PROTOTYPE: $$
PREINIT:
mng_retcode c_rv;
mng_handle c_hChunk = (mng_handle) hChunk;
mng_uint16 c_iDestid = 0;
mng_uint8 c_iTargettype = 0;
mng_int32 c_iTargetx = 0;
mng_int32 c_iTargety = 0;
mng_uint32 c_iCount = 0;
PPCODE:
c_rv = mng_getchunk_past(hHandle,c_hChunk,&c_iDestid,&c_iTargettype,&c_iTargetx,&c_iTargety,&c_iCount);
XPUSHs( sv_2mortal( newSViv( c_rv ) ) );
if ( c_rv == MNG_NOERROR )
{
XPUSHs( sv_2mortal( newSViv( c_iDestid ) ) );
XPUSHs( sv_2mortal( newSViv( c_iTargettype ) ) );
XPUSHs( sv_2mortal( newSViv( c_iTargetx ) ) );
XPUSHs( sv_2mortal( newSViv( c_iTargety ) ) );
XPUSHs( sv_2mortal( newSViv( c_iCount ) ) );
mng_uint8 c_iOrientation = 0;
mng_uint8 c_iOffsettype = 0;
mng_int32 c_iOffsetx = 0;
mng_int32 c_iOffsety = 0;
mng_uint8 c_iBoundarytype = 0;
mng_int32 c_iBoundaryl = 0;
mng_int32 c_iBoundaryr = 0;
mng_int32 c_iBoundaryt = 0;
mng_int32 c_iBoundaryb = 0;
PPCODE:
c_rv = mng_getchunk_past_src(hHandle,c_hChunk,iEntry,&c_iSourceid,&c_iComposition,&c_iOrientation,&c_iOffsettype,&c_iOffsetx,&c_iOffsety,&c_iBoundarytype,&c_iBoundaryl,&c_iBoundaryr,&c_iBoundaryt,&c_iBoundaryb);
XPUSHs( sv_2mortal( newSViv( c_rv ) ) );
if ( c_rv == MNG_NOERROR )
{
XPUSHs( sv_2mortal( newSViv( c_iComposition ) ) );
XPUSHs( sv_2mortal( newSViv( c_iOrientation ) ) );
XPUSHs( sv_2mortal( newSViv( c_iOffsettype ) ) );
XPUSHs( sv_2mortal( newSViv( c_iOffsetx ) ) );
XPUSHs( sv_2mortal( newSViv( c_iOffsety ) ) );
mng_getchunk_disc(hHandle,hChunk)
mng_handle hHandle
mng_chunkhandle hChunk
PROTOTYPE: $$
PREINIT:
mng_retcode c_rv;
mng_handle c_hChunk = (mng_handle) hChunk;
mng_uint32 c_iCount = 0;
mng_uint16p c_pObjectids = NULL;
PPCODE:
c_rv = mng_getchunk_disc(hHandle,c_hChunk,&c_iCount,&c_pObjectids);
XPUSHs( sv_2mortal( newSViv( c_rv ) ) );
if ( c_rv == MNG_NOERROR )
{
FIX_NULL_PTR( c_pObjectids, c_iCount );
XPUSHs( sv_2mortal( newSViv( c_iCount ) ) );
XPUSHs( sv_2mortal( newSVpvn( CHAR_PTR_CAST(c_pObjectids), sizeof(mng_uint16) * c_iCount ) ) );
}
PREINIT:
mng_retcode c_rv;
mng_handle c_hChunk = (mng_handle) hChunk;
mng_uint16 c_iRed = 0;
mng_uint16 c_iGreen = 0;
mng_uint16 c_iBlue = 0;
mng_uint8 c_iMandatory = 0;
mng_uint16 c_iImageid = 0;
mng_uint8 c_iTile = 0;
PPCODE:
c_rv = mng_getchunk_back(hHandle,c_hChunk,&c_iRed,&c_iGreen,&c_iBlue,&c_iMandatory,&c_iImageid,&c_iTile);
XPUSHs( sv_2mortal( newSViv( c_rv ) ) );
if ( c_rv == MNG_NOERROR )
{
XPUSHs( sv_2mortal( newSViv( c_iRed ) ) );
XPUSHs( sv_2mortal( newSViv( c_iGreen ) ) );
XPUSHs( sv_2mortal( newSViv( c_iBlue ) ) );
XPUSHs( sv_2mortal( newSViv( c_iMandatory ) ) );
XPUSHs( sv_2mortal( newSViv( c_iImageid ) ) );
mng_uint32 c_iDelay = 0;
mng_uint32 c_iTimeout = 0;
mng_uint8 c_iBoundarytype = 0;
mng_int32 c_iBoundaryl = 0;
mng_int32 c_iBoundaryr = 0;
mng_int32 c_iBoundaryt = 0;
mng_int32 c_iBoundaryb = 0;
mng_uint32 c_iCount = 0;
mng_uint32p c_pSyncids = NULL;
PPCODE:
c_rv = mng_getchunk_fram(hHandle,c_hChunk,&c_bEmpty,&c_iMode,&c_iNamesize,&c_zName,&c_iChangedelay,&c_iChangetimeout,&c_iChangeclipping,&c_iChangesyncid,&c_iDelay,&c_iTimeout,&c_iBoundarytype,&c_iBoundaryl,&c_iBoundaryr,&c_iBoundaryt,&c_iBounda...
XPUSHs( sv_2mortal( newSViv( c_rv ) ) );
if ( c_rv == MNG_NOERROR )
{
FIX_NULL_PTR( c_zName, c_iNamesize );
FIX_NULL_PTR( c_pSyncids, c_iCount );
XPUSHs( sv_2mortal( newSViv ( c_bEmpty ) ) );
XPUSHs( sv_2mortal( newSViv ( c_iMode ) ) );
XPUSHs( sv_2mortal( newSViv ( c_iNamesize ) ) );
PROTOTYPE: $$
PREINIT:
mng_retcode c_rv;
mng_handle c_hChunk = (mng_handle) hChunk;
mng_uint16 c_iFirstid = 0;
mng_uint16 c_iLastid = 0;
mng_uint8 c_iMovetype = 0;
mng_int32 c_iMovex = 0;
mng_int32 c_iMovey = 0;
PPCODE:
c_rv = mng_getchunk_move(hHandle,c_hChunk,&c_iFirstid,&c_iLastid,&c_iMovetype,&c_iMovex,&c_iMovey);
XPUSHs( sv_2mortal( newSViv( c_rv ) ) );
if ( c_rv == MNG_NOERROR )
{
XPUSHs( sv_2mortal( newSViv( c_iFirstid ) ) );
XPUSHs( sv_2mortal( newSViv( c_iLastid ) ) );
XPUSHs( sv_2mortal( newSViv( c_iMovetype ) ) );
XPUSHs( sv_2mortal( newSViv( c_iMovex ) ) );
XPUSHs( sv_2mortal( newSViv( c_iMovey ) ) );
mng_handle c_hChunk = (mng_handle) hChunk;
mng_uint16 c_iFirstid = 0;
mng_uint16 c_iLastid = 0;
mng_uint8 c_iCliptype = 0;
mng_int32 c_iClipl = 0;
mng_int32 c_iClipr = 0;
mng_int32 c_iClipt = 0;
mng_int32 c_iClipb = 0;
PPCODE:
c_rv = mng_getchunk_clip(hHandle,c_hChunk,&c_iFirstid,&c_iLastid,&c_iCliptype,&c_iClipl,&c_iClipr,&c_iClipt,&c_iClipb);
XPUSHs( sv_2mortal( newSViv( c_rv ) ) );
if ( c_rv == MNG_NOERROR )
{
XPUSHs( sv_2mortal( newSViv( c_iFirstid ) ) );
XPUSHs( sv_2mortal( newSViv( c_iLastid ) ) );
XPUSHs( sv_2mortal( newSViv( c_iCliptype ) ) );
XPUSHs( sv_2mortal( newSViv( c_iClipl ) ) );
XPUSHs( sv_2mortal( newSViv( c_iClipr ) ) );
mng_chunkhandle hChunk
PROTOTYPE: $$
PREINIT:
mng_retcode c_rv;
mng_handle c_hChunk = (mng_handle) hChunk;
mng_bool c_bEmpty = FALSE;
mng_uint16 c_iFirstid = 0;
mng_uint16 c_iLastid = 0;
mng_uint8 c_iMode = 0;
PPCODE:
c_rv = mng_getchunk_show(hHandle,c_hChunk,&c_bEmpty,&c_iFirstid,&c_iLastid,&c_iMode);
XPUSHs( sv_2mortal( newSViv( c_rv ) ) );
if ( c_rv == MNG_NOERROR )
{
XPUSHs( sv_2mortal( newSViv( c_bEmpty ) ) );
XPUSHs( sv_2mortal( newSViv( c_iFirstid ) ) );
XPUSHs( sv_2mortal( newSViv( c_iLastid ) ) );
XPUSHs( sv_2mortal( newSViv( c_iMode ) ) );
}
mng_chunkhandle hChunk
PROTOTYPE: $$
PREINIT:
mng_retcode c_rv;
mng_handle c_hChunk = (mng_handle) hChunk;
mng_uint8 c_iTermaction = 0;
mng_uint8 c_iIteraction = 0;
mng_uint32 c_iDelay = 0;
mng_uint32 c_iItermax = 0;
PPCODE:
c_rv = mng_getchunk_term(hHandle,c_hChunk,&c_iTermaction,&c_iIteraction,&c_iDelay,&c_iItermax);
XPUSHs( sv_2mortal( newSViv( c_rv ) ) );
if ( c_rv == MNG_NOERROR )
{
XPUSHs( sv_2mortal( newSViv( c_iTermaction ) ) );
XPUSHs( sv_2mortal( newSViv( c_iIteraction ) ) );
XPUSHs( sv_2mortal( newSViv( c_iDelay ) ) );
XPUSHs( sv_2mortal( newSViv( c_iItermax ) ) );
}
mng_handle hHandle
mng_chunkhandle hChunk
PROTOTYPE: $$
PREINIT:
mng_retcode c_rv;
mng_handle c_hChunk = (mng_handle) hChunk;
mng_bool c_bEmpty = FALSE;
mng_uint8 c_iOffsettype = 0;
mng_uint32 c_iCount = 0;
PPCODE:
c_rv = mng_getchunk_save(hHandle,c_hChunk,&c_bEmpty,&c_iOffsettype,&c_iCount);
XPUSHs( sv_2mortal( newSViv( c_rv ) ) );
if ( c_rv == MNG_NOERROR )
{
XPUSHs( sv_2mortal( newSViv( c_bEmpty ) ) );
XPUSHs( sv_2mortal( newSViv( c_iOffsettype ) ) );
XPUSHs( sv_2mortal( newSViv( c_iCount ) ) );
}
mng_retcode c_rv;
mng_handle c_hChunk = (mng_handle) hChunk;
mng_uint8 c_iEntrytype = 0;
mng_uint32arr2 c_aiOffset;
mng_uint32arr2 c_aiStarttime;
mng_uint32 c_iLayernr = 0;
mng_uint32 c_iFramenr = 0;
mng_uint32 c_iNamesize = 0;
mng_pchar c_zName = NULL;
PPCODE:
c_rv = mng_getchunk_save_entry(hHandle,c_hChunk,iEntry,&c_iEntrytype,&c_aiOffset,&c_aiStarttime,&c_iLayernr,&c_iFramenr,&c_iNamesize,&c_zName);
XPUSHs( sv_2mortal( newSViv( c_rv ) ) );
if ( c_rv == MNG_NOERROR )
{
FIX_NULL_PTR( c_zName, c_iNamesize );
XPUSHs( sv_2mortal( newSVpvn( CHAR_PTR_CAST(c_aiOffset), sizeof(c_aiOffset) ) ) );
XPUSHs( sv_2mortal( newSVpvn( CHAR_PTR_CAST(c_aiStarttime), sizeof(c_aiStarttime) ) ) );
XPUSHs( sv_2mortal( newSViv ( c_iLayernr ) ) );
XPUSHs( sv_2mortal( newSViv ( c_iFramenr ) ) );
mng_getchunk_seek(hHandle,hChunk)
mng_handle hHandle
mng_chunkhandle hChunk
PROTOTYPE: $$
PREINIT:
mng_retcode c_rv;
mng_handle c_hChunk = (mng_handle) hChunk;
mng_uint32 c_iNamesize = 0;
mng_pchar c_zName = NULL;
PPCODE:
c_rv = mng_getchunk_seek(hHandle,c_hChunk,&c_iNamesize,&c_zName);
XPUSHs( sv_2mortal( newSViv( c_rv ) ) );
if ( c_rv == MNG_NOERROR )
{
FIX_NULL_PTR( c_zName, c_iNamesize );
XPUSHs( sv_2mortal( newSViv ( c_iNamesize ) ) );
XPUSHs( sv_2mortal( newSVpvn( c_zName, c_iNamesize ) ) );
}
mng_handle hHandle
mng_chunkhandle hChunk
PROTOTYPE: $$
PREINIT:
mng_retcode c_rv;
mng_handle c_hChunk = (mng_handle) hChunk;
mng_uint16 c_iSnapshotid = 0;
mng_uint32 c_iNamesize = 0;
mng_pchar c_zName = NULL;
PPCODE:
c_rv = mng_getchunk_expi(hHandle,c_hChunk,&c_iSnapshotid,&c_iNamesize,&c_zName);
XPUSHs( sv_2mortal( newSViv( c_rv ) ) );
if ( c_rv == MNG_NOERROR )
{
FIX_NULL_PTR( c_zName, c_iNamesize );
XPUSHs( sv_2mortal( newSViv ( c_iSnapshotid ) ) );
XPUSHs( sv_2mortal( newSViv ( c_iNamesize ) ) );
XPUSHs( sv_2mortal( newSVpvn( c_zName, c_iNamesize ) ) );
}
mng_getchunk_fpri(hHandle,hChunk)
mng_handle hHandle
mng_chunkhandle hChunk
PROTOTYPE: $$
PREINIT:
mng_retcode c_rv;
mng_handle c_hChunk = (mng_handle) hChunk;
mng_uint8 c_iDeltatype = 0;
mng_uint8 c_iPriority = 0;
PPCODE:
c_rv = mng_getchunk_fpri(hHandle,c_hChunk,&c_iDeltatype,&c_iPriority);
XPUSHs( sv_2mortal( newSViv( c_rv ) ) );
if ( c_rv == MNG_NOERROR )
{
XPUSHs( sv_2mortal( newSViv( c_iDeltatype ) ) );
XPUSHs( sv_2mortal( newSViv( c_iPriority ) ) );
}
mng_getchunk_need(hHandle,hChunk)
mng_handle hHandle
mng_chunkhandle hChunk
PROTOTYPE: $$
PREINIT:
mng_retcode c_rv;
mng_handle c_hChunk = (mng_handle) hChunk;
mng_uint32 c_iKeywordssize = 0;
mng_pchar c_zKeywords = NULL;
PPCODE:
c_rv = mng_getchunk_need(hHandle,c_hChunk,&c_iKeywordssize,&c_zKeywords);
XPUSHs( sv_2mortal( newSViv( c_rv ) ) );
if ( c_rv == MNG_NOERROR )
{
FIX_NULL_PTR( c_zKeywords, c_iKeywordssize );
XPUSHs( sv_2mortal( newSViv ( c_iKeywordssize ) ) );
XPUSHs( sv_2mortal( newSVpvn( c_zKeywords, c_iKeywordssize ) ) );
}
mng_chunkhandle hChunk
PROTOTYPE: $$
PREINIT:
mng_retcode c_rv;
mng_handle c_hChunk = (mng_handle) hChunk;
mng_bool c_bEmpty = FALSE;
mng_uint32 c_iSizex = 0;
mng_uint32 c_iSizey = 0;
mng_uint8 c_iUnit = 0;
PPCODE:
c_rv = mng_getchunk_phyg(hHandle,c_hChunk,&c_bEmpty,&c_iSizex,&c_iSizey,&c_iUnit);
XPUSHs( sv_2mortal( newSViv( c_rv ) ) );
if ( c_rv == MNG_NOERROR )
{
XPUSHs( sv_2mortal( newSViv( c_bEmpty ) ) );
XPUSHs( sv_2mortal( newSViv( c_iSizex ) ) );
XPUSHs( sv_2mortal( newSViv( c_iSizey ) ) );
XPUSHs( sv_2mortal( newSViv( c_iUnit ) ) );
}
mng_uint32 c_iHeight = 0;
mng_uint8 c_iColortype = 0;
mng_uint8 c_iImagesampledepth = 0;
mng_uint8 c_iImagecompression = 0;
mng_uint8 c_iImageinterlace = 0;
mng_uint8 c_iAlphasampledepth = 0;
mng_uint8 c_iAlphacompression = 0;
mng_uint8 c_iAlphafilter = 0;
mng_uint8 c_iAlphainterlace = 0;
PPCODE:
c_rv = mng_getchunk_jhdr(hHandle,c_hChunk,&c_iWidth,&c_iHeight,&c_iColortype,&c_iImagesampledepth,&c_iImagecompression,&c_iImageinterlace,&c_iAlphasampledepth,&c_iAlphacompression,&c_iAlphafilter,&c_iAlphainterlace);
XPUSHs( sv_2mortal( newSViv( c_rv ) ) );
if ( c_rv == MNG_NOERROR )
{
XPUSHs( sv_2mortal( newSViv( c_iWidth ) ) );
XPUSHs( sv_2mortal( newSViv( c_iHeight ) ) );
XPUSHs( sv_2mortal( newSViv( c_iColortype ) ) );
XPUSHs( sv_2mortal( newSViv( c_iImagesampledepth ) ) );
XPUSHs( sv_2mortal( newSViv( c_iImagecompression ) ) );
mng_getchunk_jdat(hHandle,hChunk)
mng_handle hHandle
mng_chunkhandle hChunk
PROTOTYPE: $$
PREINIT:
mng_retcode c_rv;
mng_handle c_hChunk = (mng_handle) hChunk;
mng_uint32 c_iRawlen = 0;
mng_ptr c_pRawdata = NULL;
PPCODE:
c_rv = mng_getchunk_jdat(hHandle,c_hChunk,&c_iRawlen,&c_pRawdata);
XPUSHs( sv_2mortal( newSViv( c_rv ) ) );
if ( c_rv == MNG_NOERROR )
{
FIX_NULL_PTR( c_pRawdata, c_iRawlen );
XPUSHs( sv_2mortal( newSViv( c_iRawlen ) ) );
XPUSHs( sv_2mortal( newSVpvn( c_pRawdata, sizeof(char) * c_iRawlen ) ) );
}
mng_retcode c_rv;
mng_handle c_hChunk = (mng_handle) hChunk;
mng_uint16 c_iObjectid = 0;
mng_uint8 c_iImagetype = 0;
mng_uint8 c_iDeltatype = 0;
mng_uint32 c_iBlockwidth = 0;
mng_uint32 c_iBlockheight = 0;
mng_uint32 c_iBlockx = 0;
mng_uint32 c_iBlocky = 0;
PPCODE:
c_rv = mng_getchunk_dhdr(hHandle,c_hChunk,&c_iObjectid,&c_iImagetype,&c_iDeltatype,&c_iBlockwidth,&c_iBlockheight,&c_iBlockx,&c_iBlocky);
XPUSHs( sv_2mortal( newSViv( c_rv ) ) );
if ( c_rv == MNG_NOERROR )
{
XPUSHs( sv_2mortal( newSViv( c_iObjectid ) ) );
XPUSHs( sv_2mortal( newSViv( c_iImagetype ) ) );
XPUSHs( sv_2mortal( newSViv( c_iDeltatype ) ) );
XPUSHs( sv_2mortal( newSViv( c_iBlockwidth ) ) );
XPUSHs( sv_2mortal( newSViv( c_iBlockheight ) ) );
mng_handle hHandle
mng_chunkhandle hChunk
PROTOTYPE: $$
PREINIT:
mng_retcode c_rv;
mng_handle c_hChunk = (mng_handle) hChunk;
mng_uint8 c_iColortype = 0;
mng_uint8 c_iSampledepth = 0;
mng_uint8 c_iFilltype = 0;
PPCODE:
c_rv = mng_getchunk_prom(hHandle,c_hChunk,&c_iColortype,&c_iSampledepth,&c_iFilltype);
XPUSHs( sv_2mortal( newSViv( c_rv ) ) );
if ( c_rv == MNG_NOERROR )
{
XPUSHs( sv_2mortal( newSViv( c_iColortype ) ) );
XPUSHs( sv_2mortal( newSViv( c_iSampledepth ) ) );
XPUSHs( sv_2mortal( newSViv( c_iFilltype ) ) );
}
void
mng_getchunk_pplt(hHandle,hChunk)
mng_handle hHandle
mng_chunkhandle hChunk
PROTOTYPE: $$
PREINIT:
mng_retcode c_rv;
mng_handle c_hChunk = (mng_handle) hChunk;
mng_uint32 c_iCount = 0;
PPCODE:
c_rv = mng_getchunk_pplt(hHandle,c_hChunk,&c_iCount);
XPUSHs( sv_2mortal( newSViv( c_rv ) ) );
if ( c_rv == MNG_NOERROR )
{
XPUSHs( sv_2mortal( newSViv( c_iCount ) ) );
}
void mng_getchunk_pplt_entry(hHandle,hChunk,iEntry)
PROTOTYPE: $$$
PREINIT:
mng_retcode c_rv;
mng_handle c_hChunk = (mng_handle) hChunk;
mng_uint16 c_iRed = 0;
mng_uint16 c_iGreen = 0;
mng_uint16 c_iBlue = 0;
mng_uint16 c_iAlpha = 0;
mng_bool c_bUsed = FALSE;
PPCODE:
c_rv = mng_getchunk_pplt_entry(hHandle,c_hChunk,iEntry,&c_iRed,&c_iGreen,&c_iBlue,&c_iAlpha,&c_bUsed);
XPUSHs( sv_2mortal( newSViv( c_rv ) ) );
if ( c_rv == MNG_NOERROR )
{
XPUSHs( sv_2mortal( newSViv( c_iGreen ) ) );
XPUSHs( sv_2mortal( newSViv( c_iBlue ) ) );
XPUSHs( sv_2mortal( newSViv( c_iAlpha ) ) );
XPUSHs( sv_2mortal( newSViv( c_bUsed ) ) );
}
void mng_getchunk_drop(hHandle,hChunk)
mng_handle hHandle
mng_chunkhandle hChunk
PROTOTYPE: $$
PREINIT:
mng_retcode c_rv;
mng_handle c_hChunk = (mng_handle) hChunk;
mng_uint32 c_iCount = 0;
mng_chunkidp c_pChunknames = NULL;
PPCODE:
c_rv = mng_getchunk_drop(hHandle,c_hChunk,&c_iCount,&c_pChunknames);
XPUSHs( sv_2mortal( newSViv( c_rv ) ) );
if ( c_rv == MNG_NOERROR )
{
FIX_NULL_PTR( c_pChunknames, c_iCount );
XPUSHs( sv_2mortal( newSViv( c_iCount ) ) );
XPUSHs( sv_2mortal( newSVpvn( CHAR_PTR_CAST(c_pChunknames), sizeof(mng_chunkid) * c_iCount ) ) );
}
mng_chunkhandle hChunk
PROTOTYPE: $$
PREINIT:
mng_retcode c_rv;
mng_handle c_hChunk = (mng_handle) hChunk;
mng_chunkid c_iChunkname = 0;
mng_uint8 c_iPolarity = 0;
mng_uint32 c_iKeywordssize = 0;
mng_pchar c_zKeywords = NULL;
PPCODE:
c_rv = mng_getchunk_dbyk(hHandle,c_hChunk,&c_iChunkname,&c_iPolarity,&c_iKeywordssize,&c_zKeywords);
XPUSHs( sv_2mortal( newSViv( c_rv ) ) );
if ( c_rv == MNG_NOERROR )
{
FIX_NULL_PTR( c_zKeywords, c_iKeywordssize );
XPUSHs( sv_2mortal( newSViv ( c_iChunkname ) ) );
XPUSHs( sv_2mortal( newSViv ( c_iPolarity ) ) );
XPUSHs( sv_2mortal( newSViv ( c_iKeywordssize ) ) );
XPUSHs( sv_2mortal( newSVpvn( c_zKeywords, c_iKeywordssize ) ) );
void mng_getchunk_ordr(hHandle,hChunk)
mng_handle hHandle
mng_chunkhandle hChunk
PROTOTYPE: $$
PREINIT:
mng_retcode c_rv;
mng_handle c_hChunk = (mng_handle) hChunk;
mng_uint32 c_iCount = 0;
PPCODE:
c_rv = mng_getchunk_ordr(hHandle,c_hChunk,&c_iCount);
XPUSHs( sv_2mortal( newSViv( c_rv ) ) );
if ( c_rv == MNG_NOERROR )
{
XPUSHs( sv_2mortal( newSViv( c_iCount ) ) );
}
void mng_getchunk_ordr_entry(hHandle,hChunk,iEntry)
mng_handle hHandle
mng_chunkhandle hChunk
mng_uint32 iEntry;
PROTOTYPE: $$$
PREINIT:
mng_retcode c_rv;
mng_handle c_hChunk = (mng_handle) hChunk;
mng_chunkid c_iChunkname = 0;
mng_uint8 c_iOrdertype = 0;
PPCODE:
c_rv = mng_getchunk_ordr_entry(hHandle,c_hChunk,iEntry,&c_iChunkname,&c_iOrdertype);
XPUSHs( sv_2mortal( newSViv( c_rv ) ) );
if ( c_rv == MNG_NOERROR )
{
XPUSHs( sv_2mortal( newSViv( c_iOrdertype ) ) );
}
void mng_getchunk_magn(hHandle,hChunk)
mng_uint16 c_iLastid = 0;
mng_uint16 c_iMethodX = 0;
mng_uint16 c_iMX = 0;
mng_uint16 c_iMY = 0;
mng_uint16 c_iML = 0;
mng_uint16 c_iMR = 0;
mng_uint16 c_iMT = 0;
mng_uint16 c_iMB = 0;
mng_uint16 c_iMethodY = 0;
PPCODE:
c_rv = mng_getchunk_magn(hHandle,c_hChunk,&c_iFirstid,&c_iLastid,&c_iMethodX,&c_iMX,&c_iMY,&c_iML,&c_iMR,&c_iMT,&c_iMB,&c_iMethodY);
XPUSHs( sv_2mortal( newSViv( c_rv ) ) );
if ( c_rv == MNG_NOERROR )
{
XPUSHs( sv_2mortal( newSViv( c_iFirstid ) ) );
XPUSHs( sv_2mortal( newSViv( c_iLastid ) ) );
XPUSHs( sv_2mortal( newSViv( c_iMethodX ) ) );
XPUSHs( sv_2mortal( newSViv( c_iMX ) ) );
XPUSHs( sv_2mortal( newSViv( c_iMY ) ) );
mng_handle hHandle
mng_chunkhandle hChunk
PROTOTYPE: $$
PREINIT:
mng_retcode c_rv;
mng_handle c_hChunk = (mng_handle) hChunk;
mng_chunkid c_iChunkname = 0;
mng_uint32 c_iRawlen = 0;
mng_ptr c_pRawdata = NULL;
PPCODE:
c_rv = mng_getchunk_unknown(hHandle,c_hChunk,&c_iChunkname,&c_iRawlen,&c_pRawdata);
XPUSHs( sv_2mortal( newSViv( c_rv ) ) );
if ( c_rv == MNG_NOERROR )
{
FIX_NULL_PTR( c_pRawdata, c_iRawlen );
XPUSHs( sv_2mortal( newSViv( c_iChunkname ) ) );
XPUSHs( sv_2mortal( newSViv( c_iRawlen ) ) );
XPUSHs( sv_2mortal( newSVpvn( c_pRawdata, sizeof(char) * c_iRawlen ) ) );
}
( run in 1.286 second using v1.01-cache-2.11-cpan-71847e10f99 )