Graphics-MNG
view release on metacpan or search on metacpan
PREPARE_PERL_STACK()
XPUSHs( sv_2mortal( _MNG_GETOBJREF(hHandle) ) );
XPUSHs( sv_2mortal( newSViv( (long)hChunk ) ) ); // it's just a ptr
XPUSHs( sv_2mortal( newSViv( iChunkid ) ) );
XPUSHs( sv_2mortal( newSViv( iChunkseq ) ) );
CALL_CBFN_SET_RETVAL(rv,POPi)
}
return rv;
}
//===============================================================================
// TEST FUNCTIONS
//===============================================================================
//==============================================================================
// PERL XS MODULE CODE STARTS HERE
//==============================================================================
MODULE = Graphics::MNG PACKAGE = Graphics::MNG PREFIX = mng_
double
constant(sv,arg)
PREINIT:
STRLEN len;
INPUT:
SV * sv
char * s = SvPV(sv, len);
int arg
CODE:
RETVAL = constant(s,len,arg);
OUTPUT:
RETVAL
#===============================================================================
# TEST FUNCTIONS
#===============================================================================
#===============================================================================
#= 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
// -----------------------------------------------------------------------
// in production code, here's how you'd CALL the callback fn
{
PREPARE_PERL_STACK()
XPUSHs( sv_2mortal( _MNG_GETOBJREF(hHandle) ) );
CALL_CBFN_SET_RETVAL(c_rv,POPi)
}
XPUSHs( sv_2mortal( newSViv( c_rv ) ) );
#===============================================================================
#= 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
#===============================================================================
#
#mng_pchar
#_MNG_DATA()
# PROTOTYPE:
# CODE:
# RETVAL = _MNG_DATA;
# OUTPUT:
# RETVAL
#
#mng_pchar
#_MNG_HANDLE()
# PROTOTYPE:
# CODE:
# RETVAL = _MNG_HANDLE;
# OUTPUT:
# RETVAL
mng_pchar
MNG_TEXT_TITLE()
PROTOTYPE:
CODE:
RETVAL = MNG_TEXT_TITLE;
OUTPUT:
RETVAL
mng_pchar
MNG_TEXT_AUTHOR()
CODE:
RETVAL = MNG_TEXT_AUTHOR;
OUTPUT:
RETVAL
mng_pchar
MNG_TEXT_DESCRIPTION()
PROTOTYPE:
CODE:
RETVAL = MNG_TEXT_DESCRIPTION;
OUTPUT:
RETVAL
mng_pchar
MNG_TEXT_COPYRIGHT()
PROTOTYPE:
CODE:
RETVAL = MNG_TEXT_COPYRIGHT;
OUTPUT:
c_hHandle = mng_initialize( (mng_ptr)hash, &_mng_memalloc, &_mng_memfree, MNG_NULL );
if ( c_hHandle == 0 )
{
my_warn("mng_initialize: returned NULL handle");
XSRETURN_UNDEF;
}
// now add a reference to our newly created hash and store the user data
sv_setiv(_MNG_GETPRIVATE( c_hHandle, _MNG_HANDLE ), (long)c_hHandle );
sv_setsv(_MNG_GETPRIVATE( c_hHandle, _MNG_DATA ), userdata );
// set the return value
RETVAL = newRV_inc( (SV*)hash );
OUTPUT:
RETVAL
mng_retcode
mng_reset(hHandle)
mng_handle hHandle
PROTOTYPE: $
mng_retcode
mng_cleanup(hHandle)
mng_handle hHandle
PROTOTYPE: $
PREINIT:
void * userdata;
CODE:
userdata = mng_get_userdata( hHandle );
if ( userdata != NULL )
{
// clean up our data
}
RETVAL = mng_cleanup( &hHandle );
OUTPUT:
RETVAL
hHandle sv_setiv(ST(0), 0);
void
mng_getlasterror(hHandle)
mng_handle hHandle
PROTOTYPE: $
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
XPUSHs( sv_2mortal( newSViv( c_rv ) ) );
// only include the extras if we DID have an error...
if ( c_rv != MNG_NOERROR )
{
FIX_NULL_STRING( c_zErrortext );
XPUSHs( sv_2mortal( newSViv( c_iSeverity ) ) );
XPUSHs( sv_2mortal( newSViv( c_iChunkname ) ) );
XPUSHs( sv_2mortal( newSViv( c_iChunkseq ) ) );
XPUSHs( sv_2mortal( newSViv( c_iExtra1 ) ) );
XPUSHs( sv_2mortal( newSViv( c_iExtra2 ) ) );
XPUSHs( sv_2mortal( newSVpv( c_zErrortext, 0 ) ) );
}
# ------------------------------------------------------------
# ----------------- AUTOGENERATED CODE HERE ------------------
# ------------------------------------------------------------
mng_retcode
mng_read(hHandle)
mng_handle hHandle
PROTOTYPE: $
mng_retcode
mng_read_resume(hHandle)
mng_handle hHandle
PROTOTYPE: $
mng_retcode
mng_write(hHandle)
mng_handle hHandle
PROTOTYPE: $
mng_retcode
mng_create(hHandle)
mng_handle hHandle
PROTOTYPE: $
mng_retcode
mng_readdisplay(hHandle)
mng_handle hHandle
PROTOTYPE: $
mng_retcode
mng_display(hHandle)
mng_handle hHandle
PROTOTYPE: $
mng_retcode
mng_display_resume(hHandle)
PROTOTYPE: $
mng_uint8
mng_get_alphabitdepth(hHandle)
mng_handle hHandle
PROTOTYPE: $
mng_uint8
mng_get_alphacompression(hHandle)
mng_handle hHandle
PROTOTYPE: $
mng_uint8
mng_get_alphafilter(hHandle)
mng_handle hHandle
PROTOTYPE: $
mng_uint8
mng_get_alphainterlace(hHandle)
mng_handle hHandle
PROTOTYPE: $
mng_uint8
mng_get_alphadepth(hHandle)
mng_handle hHandle
PROTOTYPE: $
mng_uint8
mng_get_refreshpass(hHandle)
mng_handle hHandle
PROTOTYPE: $
mng_uint32
mng_get_canvasstyle(hHandle)
mng_handle hHandle
PROTOTYPE: $
mng_uint32
mng_get_bkgdstyle(hHandle)
mng_handle hHandle
PROTOTYPE: $
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_bool
mng_get_usebkgd(hHandle)
mng_handle hHandle
PROTOTYPE: $
mng_bool
mng_get_storechunks(hHandle)
mng_handle hHandle
PROTOTYPE: $
mng_bool
mng_get_sectionbreaks(hHandle)
mng_handle hHandle
PROTOTYPE: $
mng_bool
mng_get_cacheplayback(hHandle)
mng_handle hHandle
PROTOTYPE: $
mng_bool
mng_get_doprogressive(hHandle)
mng_handle hHandle
PROTOTYPE: $
mng_bool
mng_get_srgb(hHandle)
mng_handle hHandle
PROTOTYPE: $
mng_float
mng_get_viewgamma(hHandle)
mng_handle hHandle
PROTOTYPE: $
mng_float
mng_get_displaygamma(hHandle)
mng_handle hHandle
PROTOTYPE: $
mng_float
mng_int32
mng_get_jpeg_quality(hHandle)
mng_handle hHandle
PROTOTYPE: $
mng_int32
mng_get_jpeg_smoothing(hHandle)
mng_handle hHandle
PROTOTYPE: $
mng_bool
mng_get_jpeg_progressive(hHandle)
mng_handle hHandle
PROTOTYPE: $
mng_bool
mng_get_jpeg_optimized(hHandle)
mng_handle hHandle
PROTOTYPE: $
mng_uint32
mng_get_jpeg_maxjdat(hHandle)
mng_handle hHandle
PROTOTYPE: $
mng_bool
mng_get_suspensionmode(hHandle)
mng_handle hHandle
PROTOTYPE: $
mng_speedtype
mng_get_speed(hHandle)
mng_handle hHandle
PROTOTYPE: $
mng_uint32
mng_get_imagelevel(hHandle)
mng_handle hHandle
PROTOTYPE: $
mng_retcode
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 ) ) );
}
mng_uint32
mng_get_starttime(hHandle)
mng_handle hHandle
PROTOTYPE: $
mng_uint32
mng_get_runtime(hHandle)
mng_handle hHandle
PROTOTYPE: $
mng_uint32
mng_get_currentframe(hHandle)
mng_handle hHandle
PROTOTYPE: $
mng_uint32
mng_get_currentlayer(hHandle)
mng_handle hHandle
PROTOTYPE: $
mng_uint32
mng_get_currentplaytime(hHandle)
mng_handle hHandle
PROTOTYPE: $
mng_bool
mng_status_error(hHandle)
mng_handle hHandle
PROTOTYPE: $
mng_bool
mng_status_reading(hHandle)
mng_handle hHandle
PROTOTYPE: $
mng_bool
mng_status_suspendbreak(hHandle)
mng_handle hHandle
PROTOTYPE: $
mng_handle hHandle
PROTOTYPE: $
mng_bool
mng_status_timerbreak(hHandle)
mng_handle hHandle
PROTOTYPE: $
# ------------------------------------------------------------
# ---------- END OF AUTOGENERATED CODE -----------------------
# ------------------------------------------------------------
mng_retcode
mng_iterate_chunks(hHandle,iChunkseq,fProc)
mng_handle hHandle
mng_uint32 iChunkseq
SV * fProc
PROTOTYPE: $$$
PREINIT:
mng_iteratechunk c_fProc;
CODE:
#ifdef MNG_ACCESS_CHUNKS
if ( store_cbfn( hHandle, _MNG_ITERATECHUNK, fProc ) )
{
RETVAL = mng_iterate_chunks(hHandle,iChunkseq,&_mng_iteratechunk);
}
else
#endif
{
RETVAL = MNG_NOCALLBACK;
}
OUTPUT:
RETVAL
# ------------------------------------------------------------
# ---------- mng_getchunk_* functions
# ------------------------------------------------------------
void
mng_getchunk_ihdr(hHandle, hChunk)
mng_handle hHandle
mng_chunkhandle hChunk
PROTOTYPE: $$
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 ) ) );
XPUSHs( sv_2mortal( newSViv( c_iFilter ) ) );
XPUSHs( sv_2mortal( newSViv( c_iInterlace ) ) );
}
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) ) ) );
}
void
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 ) ) );
}
void
mng_getchunk_trns(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_bool c_bGlobal = FALSE;
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 ) ) );
XPUSHs( sv_2mortal( newSVpvn( c_aAlphas, sizeof(c_aAlphas) ) ) );
XPUSHs( sv_2mortal( newSViv ( c_iGray ) ) );
XPUSHs( sv_2mortal( newSViv ( c_iRed ) ) );
XPUSHs( sv_2mortal( newSViv ( c_iGreen ) ) );
XPUSHs( sv_2mortal( newSViv ( c_iBlue ) ) );
XPUSHs( sv_2mortal( newSViv ( c_iRawlen ) ) );
XPUSHs( sv_2mortal( newSVpvn( c_aRawdata, sizeof(c_aRawdata) ) ) );
}
void
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 ) ) );
}
void
mng_getchunk_chrm(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_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 ) ) );
XPUSHs( sv_2mortal( newSViv( c_iGreenx ) ) );
XPUSHs( sv_2mortal( newSViv( c_iGreeny ) ) );
XPUSHs( sv_2mortal( newSViv( c_iBluex ) ) );
XPUSHs( sv_2mortal( newSViv( c_iBluey ) ) );
}
void
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 ) ) );
}
void
mng_getchunk_iccp(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_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 ) ) );
XPUSHs( sv_2mortal( newSViv ( c_iCompression ) ) );
XPUSHs( sv_2mortal( newSViv ( c_iProfilesize ) ) );
XPUSHs( sv_2mortal( newSVpvn( c_pProfile, sizeof(char) * c_iProfilesize ) ) );
}
void
mng_getchunk_text(hHandle,hChunk)
mng_handle hHandle
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 ) ) );
XPUSHs( sv_2mortal( newSVpvn( c_zText, c_iTextsize ) ) );
}
void
mng_getchunk_ztxt(hHandle,hChunk)
mng_handle hHandle
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_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 ) ) );
XPUSHs( sv_2mortal( newSViv ( c_iTextsize ) ) );
XPUSHs( sv_2mortal( newSVpvn( c_zText, c_iTextsize ) ) );
}
void
mng_getchunk_itxt(hHandle,hChunk)
mng_handle hHandle
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_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 ) ) );
XPUSHs( sv_2mortal( newSVpvn( c_zKeyword, c_iKeywordsize ) ) );
XPUSHs( sv_2mortal( newSViv ( c_iCompressionflag ) ) );
XPUSHs( sv_2mortal( newSViv ( c_iCompressionmethod ) ) );
XPUSHs( sv_2mortal( newSViv ( c_iLanguagesize ) ) );
XPUSHs( sv_2mortal( newSVpvn( c_zLanguage, c_iLanguagesize ) ) );
XPUSHs( sv_2mortal( newSViv ( c_iTranslationsize ) ) );
XPUSHs( sv_2mortal( newSVpvn( c_zTranslation, c_iTranslationsize ) ) );
XPUSHs( sv_2mortal( newSViv ( c_iTextsize ) ) );
XPUSHs( sv_2mortal( newSVpvn( c_zText, c_iTextsize ) ) );
}
void
mng_getchunk_bkgd(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_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 ) ) );
XPUSHs( sv_2mortal( newSViv( c_iGreen ) ) );
XPUSHs( sv_2mortal( newSViv( c_iBlue ) ) );
}
void
mng_getchunk_phys(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_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 ) ) );
}
void
mng_getchunk_sbit(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_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) ) ) );
}
void
mng_getchunk_splt(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_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 ) ) );
XPUSHs( sv_2mortal( newSViv ( c_iSampledepth ) ) );
XPUSHs( sv_2mortal( newSViv ( c_iEntrycount ) ) );
XPUSHs( sv_2mortal( newSVpvn( c_pEntries, sizeof(char) * c_iEntrycount ) ) );
}
void
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) ) ) );
}
void
mng_getchunk_time(hHandle,hChunk)
mng_handle hHandle
mng_chunkhandle hChunk
PROTOTYPE: $$
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 ) ) );
XPUSHs( sv_2mortal( newSViv( c_iSecond ) ) );
}
void
mng_getchunk_mhdr(hHandle,hChunk)
mng_handle hHandle
mng_chunkhandle hChunk
PROTOTYPE: $$
PREINIT:
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 ) ) );
XPUSHs( sv_2mortal( newSViv( c_iPlaytime ) ) );
XPUSHs( sv_2mortal( newSViv( c_iSimplicity ) ) );
}
void
mng_getchunk_loop(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;
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 ) ) );
XPUSHs( sv_2mortal( newSViv( c_iItermax ) ) );
XPUSHs( sv_2mortal( newSViv( c_iCount ) ) );
XPUSHs( sv_2mortal( newSVpvn( CHAR_PTR_CAST(c_pSignals), sizeof(mng_uint32) * c_iCount ) ) );
}
void
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_getchunk_defi(hHandle,hChunk)
mng_handle hHandle
mng_chunkhandle hChunk
PROTOTYPE: $$
PREINIT:
mng_retcode c_rv;
mng_handle c_hChunk = (mng_handle) hChunk;
mng_uint16 c_iObjectid = 0;
mng_uint8 c_iDonotshow = 0;
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 ) ) );
XPUSHs( sv_2mortal( newSViv( c_iYlocation ) ) );
XPUSHs( sv_2mortal( newSViv( c_bHasclip ) ) );
XPUSHs( sv_2mortal( newSViv( c_iLeftcb ) ) );
XPUSHs( sv_2mortal( newSViv( c_iRightcb ) ) );
XPUSHs( sv_2mortal( newSViv( c_iTopcb ) ) );
XPUSHs( sv_2mortal( newSViv( c_iBottomcb ) ) );
}
void
mng_getchunk_basi(hHandle,hChunk)
mng_handle hHandle
mng_chunkhandle hChunk
PROTOTYPE: $$
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;
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 ) ) );
XPUSHs( sv_2mortal( newSViv( c_iFilter ) ) );
XPUSHs( sv_2mortal( newSViv( c_iInterlace ) ) );
XPUSHs( sv_2mortal( newSViv( c_iRed ) ) );
XPUSHs( sv_2mortal( newSViv( c_iGreen ) ) );
XPUSHs( sv_2mortal( newSViv( c_iBlue ) ) );
XPUSHs( sv_2mortal( newSViv( c_iAlpha ) ) );
XPUSHs( sv_2mortal( newSViv( c_iViewable ) ) );
}
void
mng_getchunk_clon(hHandle,hChunk)
mng_handle hHandle
mng_chunkhandle hChunk
PROTOTYPE: $$
PREINIT:
mng_retcode c_rv;
mng_handle c_hChunk = (mng_handle) hChunk;
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 ) ) );
XPUSHs( sv_2mortal( newSViv( c_bHasloca ) ) );
XPUSHs( sv_2mortal( newSViv( c_iLocationtype ) ) );
XPUSHs( sv_2mortal( newSViv( c_iLocationx ) ) );
XPUSHs( sv_2mortal( newSViv( c_iLocationy ) ) );
}
void
mng_getchunk_past(hHandle,hChunk)
mng_handle hHandle
mng_chunkhandle hChunk
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 ) ) );
}
void
mng_getchunk_past_src(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_uint16 c_iSourceid = 0;
mng_uint8 c_iComposition = 0;
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 ) ) );
XPUSHs( sv_2mortal( newSViv( c_iBoundarytype ) ) );
XPUSHs( sv_2mortal( newSViv( c_iBoundaryl ) ) );
XPUSHs( sv_2mortal( newSViv( c_iBoundaryr ) ) );
XPUSHs( sv_2mortal( newSViv( c_iBoundaryt ) ) );
XPUSHs( sv_2mortal( newSViv( c_iBoundaryb ) ) );
}
void
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 ) ) );
}
void
mng_getchunk_back(hHandle,hChunk)
mng_handle hHandle
mng_chunkhandle hChunk
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_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 ) ) );
XPUSHs( sv_2mortal( newSViv( c_iTile ) ) );
}
void
mng_getchunk_fram(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_iMode = 0;
mng_uint32 c_iNamesize = 0;
mng_pchar c_zName = NULL;
mng_uint8 c_iChangedelay = 0;
mng_uint8 c_iChangetimeout = 0;
mng_uint8 c_iChangeclipping = 0;
mng_uint8 c_iChangesyncid = 0;
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 ) ) );
XPUSHs( sv_2mortal( newSVpvn( c_zName, c_iNamesize ) ) );
XPUSHs( sv_2mortal( newSViv ( c_iChangedelay ) ) );
XPUSHs( sv_2mortal( newSViv ( c_iChangetimeout ) ) );
XPUSHs( sv_2mortal( newSViv ( c_iChangeclipping ) ) );
XPUSHs( sv_2mortal( newSViv ( c_iChangesyncid ) ) );
XPUSHs( sv_2mortal( newSViv ( c_iDelay ) ) );
XPUSHs( sv_2mortal( newSViv ( c_iTimeout ) ) );
XPUSHs( sv_2mortal( newSViv ( c_iBoundarytype ) ) );
XPUSHs( sv_2mortal( newSViv ( c_iBoundaryl ) ) );
XPUSHs( sv_2mortal( newSViv ( c_iBoundaryr ) ) );
XPUSHs( sv_2mortal( newSViv ( c_iBoundaryt ) ) );
XPUSHs( sv_2mortal( newSViv ( c_iBoundaryb ) ) );
XPUSHs( sv_2mortal( newSViv ( c_iCount ) ) );
XPUSHs( sv_2mortal( newSVpvn( CHAR_PTR_CAST(c_pSyncids), sizeof(mng_uint32) * c_iCount ) ) );
}
void
mng_getchunk_move(hHandle,hChunk)
mng_handle hHandle
mng_chunkhandle hChunk
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 ) ) );
}
void
mng_getchunk_clip(hHandle,hChunk)
mng_handle hHandle
mng_chunkhandle hChunk
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_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 ) ) );
XPUSHs( sv_2mortal( newSViv( c_iClipt ) ) );
XPUSHs( sv_2mortal( newSViv( c_iClipb ) ) );
}
void
mng_getchunk_show(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_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 ) ) );
}
void
mng_getchunk_term(hHandle,hChunk)
mng_handle hHandle
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 ) ) );
}
void
mng_getchunk_save(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_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 ) ) );
}
void
mng_getchunk_save_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_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 ) ) );
XPUSHs( sv_2mortal( newSViv ( c_iNamesize ) ) );
XPUSHs( sv_2mortal( newSVpvn( c_zName, c_iNamesize ) ) );
}
void
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 ) ) );
}
void
mng_getchunk_expi(hHandle,hChunk)
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 ) ) );
}
void
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 ) ) );
}
void
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 ) ) );
}
void
mng_getchunk_phyg(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_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 ) ) );
}
void
mng_getchunk_jhdr(hHandle,hChunk)
mng_handle hHandle
mng_chunkhandle hChunk
PROTOTYPE: $$
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_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 ) ) );
XPUSHs( sv_2mortal( newSViv( c_iImageinterlace ) ) );
XPUSHs( sv_2mortal( newSViv( c_iAlphasampledepth ) ) );
XPUSHs( sv_2mortal( newSViv( c_iAlphacompression ) ) );
XPUSHs( sv_2mortal( newSViv( c_iAlphafilter ) ) );
XPUSHs( sv_2mortal( newSViv( c_iAlphainterlace ) ) );
}
void
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 ) ) );
}
void
mng_getchunk_dhdr(hHandle,hChunk)
mng_handle hHandle
mng_chunkhandle hChunk
PROTOTYPE: $$
PREINIT:
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 ) ) );
XPUSHs( sv_2mortal( newSViv( c_iBlockx ) ) );
XPUSHs( sv_2mortal( newSViv( c_iBlocky ) ) );
}
void
mng_getchunk_prom(hHandle,hChunk)
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)
mng_handle hHandle
mng_chunkhandle hChunk
mng_uint32 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 ) ) );
}
void mng_getchunk_dbyk(hHandle,hChunk)
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_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_handle hHandle
mng_chunkhandle hChunk
PROTOTYPE: $$
PREINIT:
mng_retcode c_rv;
mng_handle c_hChunk = (mng_handle) hChunk;
mng_uint16 c_iFirstid = 0;
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 ) ) );
XPUSHs( sv_2mortal( newSViv( c_iML ) ) );
XPUSHs( sv_2mortal( newSViv( c_iMR ) ) );
XPUSHs( sv_2mortal( newSViv( c_iMT ) ) );
XPUSHs( sv_2mortal( newSViv( c_iMB ) ) );
XPUSHs( sv_2mortal( newSViv( c_iMethodY ) ) );
}
void mng_getchunk_unknown(hHandle,hChunk)
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 ) ) );
}
# ------------------------------------------------------------
# ---------- mng_putchunk_* functions
# ------------------------------------------------------------
mng_retcode
mng_putchunk_ihdr(hHandle,iWidth,iHeight,iBitdepth,iColortype,iCompression,iFilter,iInterlace)
mng_handle hHandle
mng_uint32 iWidth
mng_uint32 iHeight
mng_uint8 iBitdepth
mng_uint8 iColortype
mng_uint8 iCompression
mng_uint8 iFilter
mng_uint8 iInterlace
PROTOTYPE: $$$$$$$$
mng_retcode
mng_putchunk_plte(hHandle,iCount,aPalette)
mng_handle hHandle
mng_uint32 iCount
mng_palette8ep aPalette
PROTOTYPE: $$$
mng_retcode
mng_putchunk_idat(hHandle,iRawlen,pRawdata)
mng_handle hHandle
mng_uint32 iRawlen
mng_ptr pRawdata
PROTOTYPE: $$$
mng_retcode
mng_putchunk_iend(hHandle)
mng_handle hHandle
PROTOTYPE: $
mng_retcode
mng_putchunk_trns(hHandle,bEmpty,bGlobal,iType,iCount,aAlphas,iGray,iRed,iGreen,iBlue,iRawlen,aRawdata)
mng_handle hHandle
mng_bool bEmpty
mng_bool bGlobal
mng_uint8 iType
mng_uint32 iCount
( run in 0.861 second using v1.01-cache-2.11-cpan-71847e10f99 )