php-directfb-cvs Mailing List for PHP-DirectFB
Status: Pre-Alpha
Brought to you by:
klan
You can subscribe to this list here.
2004 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(23) |
Dec
(7) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2005 |
Jan
(3) |
Feb
|
Mar
(2) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Claudio C. <kl...@us...> - 2005-03-06 11:43:04
|
Update of /cvsroot/php-directfb/PHP-DirectFB/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31926/src Modified Files: datatypes.c idisplaylayer.c iscreen.c isurface.c php_directfb.c Log Message: Updated API to DirectFB 0.9.22. Index: datatypes.c =================================================================== RCS file: /cvsroot/php-directfb/PHP-DirectFB/src/datatypes.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- datatypes.c 30 Jan 2005 11:02:47 -0000 1.8 +++ datatypes.c 6 Mar 2005 11:42:51 -0000 1.9 @@ -611,9 +611,10 @@ { DFBDisplayLayerConfig config; - if (zend_parse_parameters( ht, "lllllll", &config.flags, &config.width, - &config.height, &config.pixelformat, &config.buffermode, - &config.options, &config.source ) != SUCCESS) + if (zend_parse_parameters( ht, "llllllll", &config.flags, &config.width, + &config.height, &config.pixelformat, + &config.buffermode, &config.options, + &config.source, &config.surface_caps ) != SUCCESS) return false; DFBDisplayLayerConfig_init( &config, this ); @@ -630,6 +631,7 @@ add_property_long( ret, "buffermode", config->buffermode ); add_property_long( ret, "options", config->options ); add_property_long( ret, "source", config->source ); + add_property_long( ret, "surface_caps", config->surface_caps ); } void @@ -656,6 +658,9 @@ if (ret->flags & DLCONF_SOURCE) GET_ENTRY_LONG( source, &ret->source ); + + if (ret->flags & DLCONF_SURFACE_CAPS) + GET_ENTRY_LONG( surface_caps, &ret->surface_caps ); } DIRECTFB_DATATYPE_DEFINITION( DFBDisplayLayerConfig ) Index: isurface.c =================================================================== RCS file: /cvsroot/php-directfb/PHP-DirectFB/src/isurface.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- isurface.c 30 Jan 2005 11:02:47 -0000 1.7 +++ isurface.c 6 Mar 2005 11:42:52 -0000 1.8 @@ -147,6 +147,26 @@ } static +INTERFACE_METHOD( SetAlphaRamp ) +{ + IDirectFBSurface *surface; + int a0; + int a1; + int a2; + int a3; + + DIRECTFB_GET_THIS( surface ); + + if (zend_parse_parameters( ZEND_NUM_ARGS() TSRMLS_CC, + "llll", &a0, &a1, &a2, &a3 ) != SUCCESS) + INVARG(); + + dfb_errno = surface->SetAlphaRamp( surface, a0, a1, a2, a3 ); + + DIRECTFB_RESULT(); +} + +static INTERFACE_METHOD( Flip ) { IDirectFBSurface *surface; @@ -729,60 +749,6 @@ } static -INTERFACE_METHOD( FillSpans ) -{ - IDirectFBSurface *surface; - int y; - DFBSpan *spans = NULL; - int num = 0; - zval *sp; - - DIRECTFB_GET_THIS( surface ); - - if (zend_parse_parameters( ZEND_NUM_ARGS() TSRMLS_CC, - "la|l", &y, &sp, &num ) != SUCCESS) - INVARG(); - - if (num < 0) - num = 0; - - if (num) { - int i; - - spans = (DFBSpan*) safe_emalloc( num, sizeof(DFBSpan), 0 ); - - for (i = 0; i < num; i++) { - zval **s; - if (zend_hash_index_find( Z_ARRVAL_P( sp ), i, (void**) &s ) != SUCCESS || - Z_TYPE_PP( s ) != IS_OBJECT || Z_OBJCE_PP( s ) != DFBSpan_ce) { - efree( spans ); - spans = NULL; - break; - } - DIRECTFB_TRANSLATE_DATA( DFBSpan, *s, &spans[i] ); - } - - } else { - zval **s; - - while (zend_hash_index_find( Z_ARRVAL_P( sp ), - num, (void**) &s ) == SUCCESS) { - if (Z_TYPE_PP( s ) != IS_OBJECT || - Z_OBJCE_PP( s ) != DFBSpan_ce) - break; - spans = erealloc( spans, ++num * sizeof(DFBSpan) ); - DIRECTFB_TRANSLATE_DATA( DFBSpan, *s, &spans[num-1] ); - } - } - - if (spans) { - dfb_errno = surface->FillSpans( surface, y, spans, num ); - efree( spans ); - } else - dfb_errno = DFB_INVARG; -} - -static INTERFACE_METHOD( DrawLine ) { IDirectFBSurface *surface; @@ -868,6 +834,113 @@ } static +INTERFACE_METHOD( FillRectangles ) +{ + IDirectFBSurface *surface; + DFBRectangle *rects = NULL; + int num = 0; + zval *z; + + DIRECTFB_GET_THIS( surface ); + + if (zend_parse_parameters( ZEND_NUM_ARGS() TSRMLS_CC, + "a|l", &z, &num ) != SUCCESS) + INVARG(); + + if (num < 0) + num = 0; + + if (num) { + int i; + + rects = (DFBRectangle*) safe_emalloc( num, sizeof(DFBRectangle), 0 ); + + for (i = 0; i < num; i++) { + zval **r; + if (zend_hash_index_find( Z_ARRVAL_P( z ), i, (void**) &r ) != SUCCESS || + Z_TYPE_PP( r ) != IS_OBJECT || Z_OBJCE_PP( r ) != DFBRectangle_ce) { + efree( rects ); + rects = NULL; + break; + } + DIRECTFB_TRANSLATE_DATA( DFBRectangle, *r, &rects[i] ); + } + } + else { + zval **r; + + while (zend_hash_index_find( Z_ARRVAL_P( z ), + num, (void**) &r ) == SUCCESS) { + if (Z_TYPE_PP( r ) != IS_OBJECT || + Z_OBJCE_PP( r ) != DFBRectangle_ce) + break; + rects = erealloc( rects, ++num * sizeof(DFBRectangle) ); + DIRECTFB_TRANSLATE_DATA( DFBRectangle, *r, &rects[num-1] ); + } + } + + if (rects) { + dfb_errno = surface->FillRectangles( surface, rects, num ); + efree( rects ); + } else + dfb_errno = DFB_INVARG; +} + +static +INTERFACE_METHOD( FillSpans ) +{ + IDirectFBSurface *surface; + int y; + DFBSpan *spans = NULL; + int num = 0; + zval *z; + + DIRECTFB_GET_THIS( surface ); + + if (zend_parse_parameters( ZEND_NUM_ARGS() TSRMLS_CC, + "la|l", &y, &z, &num ) != SUCCESS) + INVARG(); + + if (num < 0) + num = 0; + + if (num) { + int i; + + spans = (DFBSpan*) safe_emalloc( num, sizeof(DFBSpan), 0 ); + + for (i = 0; i < num; i++) { + zval **s; + if (zend_hash_index_find( Z_ARRVAL_P( z ), i, (void**) &s ) != SUCCESS || + Z_TYPE_PP( s ) != IS_OBJECT || Z_OBJCE_PP( s ) != DFBSpan_ce) { + efree( spans ); + spans = NULL; + break; + } + DIRECTFB_TRANSLATE_DATA( DFBSpan, *s, &spans[i] ); + } + + } else { + zval **s; + + while (zend_hash_index_find( Z_ARRVAL_P( z ), + num, (void**) &s ) == SUCCESS) { + if (Z_TYPE_PP( s ) != IS_OBJECT || + Z_OBJCE_PP( s ) != DFBSpan_ce) + break; + spans = erealloc( spans, ++num * sizeof(DFBSpan) ); + DIRECTFB_TRANSLATE_DATA( DFBSpan, *s, &spans[num-1] ); + } + } + + if (spans) { + dfb_errno = surface->FillSpans( surface, y, spans, num ); + efree( spans ); + } else + dfb_errno = DFB_INVARG; +} + +static INTERFACE_METHOD( SetFont ) { IDirectFBSurface *surface; @@ -1002,6 +1075,21 @@ DIRECTFB_RESULT(); } +static +INTERFACE_METHOD( DisableAcceleration ) +{ + IDirectFBSurface *surface; + DFBAccelerationMask mask = DFXL_NONE; + + DIRECTFB_GET_THIS( surface ); + + if (zend_parse_parameters( ZEND_NUM_ARGS() TSRMLS_CC, + "|l", &mask ) != SUCCESS) + INVARG(); + + dfb_errno = surface->DisableAcceleration( surface, mask ); +} + INTERFACE_DESTRUCTOR() { IDirectFBSurface *surface = (IDirectFBSurface*) wrp->interface; @@ -1028,6 +1116,7 @@ METHOD( GetAccelerationMask ) METHOD( GetPalette ) METHOD( SetPalette ) + METHOD( SetAlphaRamp ) METHOD( Flip ) METHOD( SetField ) METHOD( Clear ) @@ -1050,15 +1139,17 @@ METHOD( SetDrawingFlags ) METHOD( FillRectangle ) METHOD( DrawRectangle ) - METHOD( FillSpans ) METHOD( DrawLine ) METHOD( DrawLines ) METHOD( FillTriangle ) + METHOD( FillRectangles ) + METHOD( FillSpans ) METHOD( SetFont ) METHOD( GetFont ) METHOD( DrawString ) METHOD( DrawGlyph ) METHOD( GetSubSurface ) METHOD( Dump ) + METHOD( DisableAcceleration ) ) Index: idisplaylayer.c =================================================================== RCS file: /cvsroot/php-directfb/PHP-DirectFB/src/idisplaylayer.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- idisplaylayer.c 2 Jan 2005 16:27:08 -0000 1.4 +++ idisplaylayer.c 6 Mar 2005 11:42:52 -0000 1.5 @@ -78,6 +78,49 @@ } static +INTERFACE_METHOD( GetSourceDescriptions ) +{ + IDirectFBDisplayLayer *layer; + DFBDisplayLayerDescription dsc; + + DIRECTFB_GET_THIS( layer ); + + dfb_errno = layer->GetDescription( layer, &dsc ); + + array_init( return_value ); + + if ((dsc.caps & DLCAPS_SOURCES) && dsc.sources > 0) { + DFBDisplayLayerSourceDescription sdscs[dsc.sources]; + int i; + + memset( &sdscs[0], 0, dsc.sources * sizeof(sdscs[0]) ); + dfb_errno = layer->GetSourceDescriptions( layer, &sdscs[0] ); + + for (i = 0; i < dsc.sources; i++) { + zval *sdsc; + MAKE_STD_ZVAL( sdsc ); + object_init( sdsc ); + add_property_long( sdsc, "source_id", sdscs[i].source_id ); + add_property_string( sdsc, "name", &sdscs[i].name[0], 1 ); + add_index_zval( return_value, i, sdsc ); + } + } +} + +static +INTERFACE_METHOD( GetCurrentOutputField ) +{ + IDirectFBDisplayLayer *layer; + int field = 0; + + DIRECTFB_GET_THIS( layer ); + + dfb_errno = layer->GetCurrentOutputField( layer, &field ); + + RETURN_LONG( field ); +} + +static INTERFACE_METHOD( GetSurface ) { IDirectFBDisplayLayer *layer; @@ -177,6 +220,44 @@ } static +INTERFACE_METHOD( SetScreenPosition ) +{ + IDirectFBDisplayLayer *layer; + int x; + int y; + + DIRECTFB_GET_THIS( layer ); + + if (zend_parse_parameters( ZEND_NUM_ARGS() TSRMLS_CC, + "ll", &x, &y ) != SUCCESS) + INVARG(); + + dfb_errno = layer->SetScreenPosition( layer, x, y ); + + DIRECTFB_RESULT(); +} + +static +INTERFACE_METHOD( SetScreenRectangle ) +{ + IDirectFBDisplayLayer *layer; + int x; + int y; + int w; + int h; + + DIRECTFB_GET_THIS( layer ); + + if (zend_parse_parameters( ZEND_NUM_ARGS() TSRMLS_CC, + "llll", &x, &y, &w, &h ) != SUCCESS) + INVARG(); + + dfb_errno = layer->SetScreenRectangle( layer, x, y, w, h ); + + DIRECTFB_RESULT(); +} + +static INTERFACE_METHOD( SetSrcColorKey ) { IDirectFBDisplayLayer *layer; @@ -239,19 +320,6 @@ } static -INTERFACE_METHOD( GetCurrentOutputField ) -{ - IDirectFBDisplayLayer *layer; - int field = 0; - - DIRECTFB_GET_THIS( layer ); - - dfb_errno = layer->GetCurrentOutputField( layer, &field ); - - RETURN_LONG( field ); -} - -static INTERFACE_METHOD( SetFieldParity ) { IDirectFBDisplayLayer *layer; @@ -554,36 +622,6 @@ dfb_errno = layer->WaitForSync( layer ); } -static -INTERFACE_METHOD( GetSourceDescriptions ) -{ - IDirectFBDisplayLayer *layer; - DFBDisplayLayerDescription dsc; - - DIRECTFB_GET_THIS( layer ); - - dfb_errno = layer->GetDescription( layer, &dsc ); - - array_init( return_value ); - - if ((dsc.caps & DLCAPS_SOURCES) && dsc.sources > 0) { - DFBDisplayLayerSourceDescription sdscs[dsc.sources]; - int i; - - memset( &sdscs[0], 0, dsc.sources * sizeof(sdscs[0]) ); - dfb_errno = layer->GetSourceDescriptions( layer, &sdscs[0] ); - - for (i = 0; i < dsc.sources; i++) { - zval *sdsc; - MAKE_STD_ZVAL( sdsc ); - object_init( sdsc ); - add_property_long( sdsc, "source_id", sdscs[i].source_id ); - add_property_string( sdsc, "name", &sdscs[i].name[0], 1 ); - add_index_zval( return_value, i, sdsc ); - } - } -} - STANDARD_INTERFACE_DESTRUCTOR() @@ -592,17 +630,20 @@ DIRECTFB_INTERFACE_DEFINITION( IDirectFBDisplayLayer, METHOD( GetID ) METHOD( GetDescription ) + METHOD( GetCurrentOutputField ) + METHOD( GetSourceDescriptions ) METHOD( GetSurface ) METHOD( GetScreen ) METHOD( SetCooperativeLevel ) METHOD( SetOpacity ) METHOD( SetSourceRectangle ) METHOD( SetScreenLocation ) + METHOD( SetScreenPosition ) + METHOD( SetScreenRectangle ) METHOD( SetSrcColorKey ) METHOD( SetDstColorKey ) METHOD( GetLevel ) METHOD( SetLevel ) - METHOD( GetCurrentOutputField ) METHOD( SetFieldParity ) METHOD( GetConfiguration ) METHOD( TestConfiguration ) @@ -621,6 +662,5 @@ METHOD( SetCursorShape ) METHOD( SetCursorOpacity ) METHOD( WaitForSync ) - METHOD( GetSourceDescriptions ) ) Index: iscreen.c =================================================================== RCS file: /cvsroot/php-directfb/PHP-DirectFB/src/iscreen.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- iscreen.c 2 Jan 2005 16:27:08 -0000 1.4 +++ iscreen.c 6 Mar 2005 11:42:52 -0000 1.5 @@ -107,7 +107,10 @@ add_property_long( args[1], "regions", desc.regions ); - + add_property_long( args[1], + "source", + desc.sources ); + if (!ctx[1]) { MAKE_STD_ZVAL( args[2] ); ZVAL_NULL( args[2] ); Index: php_directfb.c =================================================================== RCS file: /cvsroot/php-directfb/PHP-DirectFB/src/php_directfb.c,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- php_directfb.c 2 Jan 2005 16:27:08 -0000 1.10 +++ php_directfb.c 6 Mar 2005 11:42:52 -0000 1.11 @@ -144,6 +144,11 @@ DIRECTFB_REGISTER_DEF( DSECAPS_MIXER_SEL ); DIRECTFB_REGISTER_DEF( DSECAPS_OUT_SIGNALS ); DIRECTFB_REGISTER_DEF( DSECAPS_SCANMODE ); + DIRECTFB_REGISTER_DEF( DSECAPS_BRIGHTNESS ); + DIRECTFB_REGISTER_DEF( DSECAPS_CONTRAST ); + DIRECTFB_REGISTER_DEF( DSECAPS_HUE ); + DIRECTFB_REGISTER_DEF( DSECAPS_SATURATION ); + DIRECTFB_REGISTER_DEF( DSECAPS_ALL ); /* DFBScreenEncoderType */ DIRECTFB_REGISTER_DEF( DSET_CRTC ); DIRECTFB_REGISTER_DEF( DSET_TV ); @@ -161,6 +166,7 @@ DIRECTFB_REGISTER_DEF( DSECONF_OUT_SIGNALS ); DIRECTFB_REGISTER_DEF( DSECONF_SCANMODE ); DIRECTFB_REGISTER_DEF( DSECONF_TEST_COLOR ); + DIRECTFB_REGISTER_DEF( DSECONF_ADJUSTMENT ); DIRECTFB_REGISTER_DEF( DSECONF_ALL ); /* DFBScreenEncoderTestPicture */ DIRECTFB_REGISTER_DEF( DSETP_OFF ); @@ -226,6 +232,10 @@ DIRECTFB_REGISTER_DEF( DLCAPS_FIELD_PARITY ); DIRECTFB_REGISTER_DEF( DLCAPS_WINDOWS ); DIRECTFB_REGISTER_DEF( DLCAPS_SOURCES ); + DIRECTFB_REGISTER_DEF( DLCAPS_ALPHA_RAMP ); + DIRECTFB_REGISTER_DEF( DLCAPS_PREMULTIPLIED ); + DIRECTFB_REGISTER_DEF( DLCAPS_SCREEN_POSITION ); + DIRECTFB_REGISTER_DEF( DLCAPS_SCREEN_SIZE ); DIRECTFB_REGISTER_DEF( DLCAPS_ALL ); /* DFBDisplayLayerConfigFlags */ DIRECTFB_REGISTER_DEF( DLCONF_WIDTH ); @@ -234,6 +244,7 @@ DIRECTFB_REGISTER_DEF( DLCONF_BUFFERMODE ); DIRECTFB_REGISTER_DEF( DLCONF_OPTIONS ); DIRECTFB_REGISTER_DEF( DLCONF_SOURCE ); + DIRECTFB_REGISTER_DEF( DLCONF_SURFACE_CAPS ); DIRECTFB_REGISTER_DEF( DLCONF_ALL ); /* DFBDisplayLayerBufferMode */ DIRECTFB_REGISTER_DEF( DLBM_FRONTONLY ); @@ -272,6 +283,7 @@ DIRECTFB_REGISTER_DEF( DSCAPS_SEPARATED ); DIRECTFB_REGISTER_DEF( DSCAPS_STATIC_ALLOC ); DIRECTFB_REGISTER_DEF( DSCAPS_TRIPLE ); + DIRECTFB_REGISTER_DEF( DSCAPS_PREMULTIPLIED ); DIRECTFB_REGISTER_DEF( DSCAPS_DEPTH ); DIRECTFB_REGISTER_DEF( DSCAPS_FLIPPING ); /* DFBSurfacePixelFormat */ @@ -292,6 +304,9 @@ DIRECTFB_REGISTER_DEF( DSPF_A1 ); DIRECTFB_REGISTER_DEF( DSPF_NV12 ); DIRECTFB_REGISTER_DEF( DSPF_NV16 ); + DIRECTFB_REGISTER_DEF( DSPF_ARGB2554 ); + DIRECTFB_REGISTER_DEF( DSPF_ARGB4444 ); + DIRECTFB_REGISTER_DEF( DSPF_NV21 ); /* DFBSurfaceFlipFlags */ DIRECTFB_REGISTER_DEF( DSFLIP_WAIT ); DIRECTFB_REGISTER_DEF( DSFLIP_BLIT ); |
From: Claudio C. <kl...@us...> - 2005-03-06 11:43:04
|
Update of /cvsroot/php-directfb/PHP-DirectFB In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31926 Modified Files: configure.ac README Log Message: Updated API to DirectFB 0.9.22. Index: README =================================================================== RCS file: /cvsroot/php-directfb/PHP-DirectFB/README,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- README 29 Dec 2004 21:28:08 -0000 1.4 +++ README 6 Mar 2005 11:42:51 -0000 1.5 @@ -14,7 +14,7 @@ ------------ To compile and use PHP-DirectFB you need: - - DirectFB 0.9.21 or higher (get it at http://directfb.org) + - DirectFB 0.9.22 or higher (get it at http://directfb.org) - PHP 5.0.0 or higher CLI version (get it at http://php.net). Index: configure.ac =================================================================== RCS file: /cvsroot/php-directfb/PHP-DirectFB/configure.ac,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- configure.ac 29 Dec 2004 21:28:08 -0000 1.3 +++ configure.ac 6 Mar 2005 11:42:51 -0000 1.4 @@ -134,7 +134,7 @@ # # Check for DirectFB # -DIRECTFB_REQUIRED_VERSION=0.9.21 +DIRECTFB_REQUIRED_VERSION=0.9.22 AC_MSG_CHECKING( [for DirectFB >= $DIRECTFB_REQUIRED_VERSION] ) if $PKG_CONFIG --atleast-version $DIRECTFB_REQUIRED_VERSION directfb ; then DFB_CFLAGS=`$PKG_CONFIG --cflags directfb` |
From: Claudio C. <kl...@us...> - 2005-01-30 11:03:12
|
Update of /cvsroot/php-directfb/PHP-DirectFB/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11182 Modified Files: datatypes.c isurface.c Log Message: Added missing IDirectFBSurface method BatchBlit(). Fixed NV12/NV16 surface's size calculation. Index: isurface.c =================================================================== RCS file: /cvsroot/php-directfb/PHP-DirectFB/src/isurface.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- isurface.c 2 Jan 2005 16:27:08 -0000 1.6 +++ isurface.c 30 Jan 2005 11:02:47 -0000 1.7 @@ -151,7 +151,7 @@ { IDirectFBSurface *surface; DFBRegion reg; - DFBSurfaceFlipFlags flags = 0; + DFBSurfaceFlipFlags flags = DSFLIP_NONE; zval *r = NULL; DIRECTFB_GET_THIS( surface ); @@ -479,6 +479,77 @@ } static +INTERFACE_METHOD( BatchBlit ) +{ + IDirectFBSurface *surface; + IDirectFBSurface *source; + DFBRectangle *source_rects = NULL; + DFBPoint *dest_points = NULL; + int i, num = 0; + zval *src; + zval *rects; + zval *points; + + DIRECTFB_GET_THIS( surface ); + + if (zend_parse_parameters( ZEND_NUM_ARGS() TSRMLS_CC, "Oaa|l", + &src, IDirectFBSurface_ce, &rects, + &points, &num ) != SUCCESS) + INVARG(); + + DIRECTFB_GET_INTERFACE( src, IDirectFBSurface, source ); + + if (num > 0) { + source_rects = (DFBRectangle*) emalloc( num * sizeof(DFBRectangle) ); + dest_points = (DFBPoint*) emalloc( num * sizeof(DFBPoint) ); + + for (i = 0; i < num; i++) { + zval **r, **p; + + if (zend_hash_index_find( Z_ARRVAL_P( rects ), + i, (void*) &r ) != SUCCESS || + zend_hash_index_find( Z_ARRVAL_P( points ), + i, (void*) &p ) != SUCCESS) { + efree( source_rects ); + efree( dest_points ); + source_rects = NULL; + dest_points = NULL; + break; + } + + DIRECTFB_TRANSLATE_DATA( DFBRectangle, *r, &source_rects[i] ); + DIRECTFB_TRANSLATE_DATA( DFBPoint, *p, &dest_points[i] ); + } + } + else { + zval **r, **p; + + while (zend_hash_index_find( Z_ARRVAL_P( rects ), + num, (void*) &r ) == SUCCESS && + zend_hash_index_find( Z_ARRVAL_P( points ), + num, (void*) &p ) == SUCCESS) { + ++num; + source_rects = (DFBRectangle*) erealloc( source_rects, + num*sizeof(DFBRectangle) ); + dest_points = (DFBPoint*) erealloc( dest_points, + num*sizeof(DFBPoint) ); + + DIRECTFB_TRANSLATE_DATA( DFBRectangle, *r, &source_rects[num-1] ); + DIRECTFB_TRANSLATE_DATA( DFBPoint, *p, &dest_points[num-1] ); + } + } + + dfb_errno = surface->BatchBlit( surface, source, + source_rects, dest_points, num ); + + if (source_rects) + efree( source_rects ); + + if (dest_points) + efree( dest_points ); +} + +static INTERFACE_METHOD( StretchBlit ) { IDirectFBSurface *surface; @@ -973,6 +1044,7 @@ METHOD( SetBlittingFlags ) METHOD( Blit ) METHOD( TileBlit ) + METHOD( BatchBlit ) METHOD( StretchBlit ) METHOD( TextureTriangles ) METHOD( SetDrawingFlags ) Index: datatypes.c =================================================================== RCS file: /cvsroot/php-directfb/PHP-DirectFB/src/datatypes.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- datatypes.c 2 Jan 2005 16:27:08 -0000 1.7 +++ datatypes.c 30 Jan 2005 11:02:47 -0000 1.8 @@ -791,9 +791,18 @@ dsc->preallocated[0].pitch > 0 && dsc->height > 0 && dsc->pixelformat) { int size = dsc->preallocated[0].pitch * dsc->height; - if (dsc->pixelformat == DSPF_YV12 || - dsc->pixelformat == DSPF_I420) + switch (dsc->pixelformat) { + case DSPF_NV16: + size += size & ~1; + break; + case DSPF_YV12: + case DSPF_I420: + case DSPF_NV12: size += (size >> 1) & ~1; + break; + default: + break; + } add_property_stringl( ret, "preallocated_data", dsc->preallocated[0].data, size, 1 ); |
From: Claudio C. <kl...@us...> - 2005-01-02 16:27:24
|
Update of /cvsroot/php-directfb/PHP-DirectFB/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6089/src Modified Files: datatypes.c idatabuffer.c idirectfb.c idisplaylayer.c ieventbuffer.c ifont.c iimageprovider.c iinputdevice.c ipalette.c iscreen.c isurface.c ivideoprovider.c iwindow.c php_directfb.c php_directfb.h Log Message: Updated copyright. Index: datatypes.c =================================================================== RCS file: /cvsroot/php-directfb/PHP-DirectFB/src/datatypes.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- datatypes.c 4 Dec 2004 10:38:58 -0000 1.6 +++ datatypes.c 2 Jan 2005 16:27:08 -0000 1.7 @@ -1,7 +1,7 @@ /* * PHP-DirectFB - The PHP wrapper for DirectFB * - * Copyright (C) 2004 Claudio Ciccani <kl...@ch...> + * Copyright (C) 2004-2005 Claudio Ciccani <kl...@ch...> * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public Index: isurface.c =================================================================== RCS file: /cvsroot/php-directfb/PHP-DirectFB/src/isurface.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- isurface.c 29 Dec 2004 21:28:08 -0000 1.5 +++ isurface.c 2 Jan 2005 16:27:08 -0000 1.6 @@ -1,7 +1,7 @@ /* * PHP-DirectFB - The PHP wrapper for DirectFB * - * Copyright (C) 2004 Claudio Ciccani <kl...@ch...> + * Copyright (C) 2004-2005 Claudio Ciccani <kl...@ch...> * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public Index: idisplaylayer.c =================================================================== RCS file: /cvsroot/php-directfb/PHP-DirectFB/src/idisplaylayer.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- idisplaylayer.c 4 Dec 2004 10:38:58 -0000 1.3 +++ idisplaylayer.c 2 Jan 2005 16:27:08 -0000 1.4 @@ -1,7 +1,7 @@ /* * PHP-DirectFB - The PHP wrapper for DirectFB * - * Copyright (C) 2004 Claudio Ciccani <kl...@ch...> + * Copyright (C) 2004-2005 Claudio Ciccani <kl...@ch...> * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public Index: iinputdevice.c =================================================================== RCS file: /cvsroot/php-directfb/PHP-DirectFB/src/iinputdevice.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- iinputdevice.c 15 Nov 2004 15:06:18 -0000 1.2 +++ iinputdevice.c 2 Jan 2005 16:27:08 -0000 1.3 @@ -1,7 +1,7 @@ /* * PHP-DirectFB - The PHP wrapper for DirectFB * - * Copyright (C) 2004 Claudio Ciccani <kl...@ch...> + * Copyright (C) 2004-2005 Claudio Ciccani <kl...@ch...> * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public Index: iimageprovider.c =================================================================== RCS file: /cvsroot/php-directfb/PHP-DirectFB/src/iimageprovider.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- iimageprovider.c 15 Nov 2004 15:06:18 -0000 1.2 +++ iimageprovider.c 2 Jan 2005 16:27:08 -0000 1.3 @@ -1,7 +1,7 @@ /* * PHP-DirectFB - The PHP wrapper for DirectFB * - * Copyright (C) 2004 Claudio Ciccani <kl...@ch...> + * Copyright (C) 2004-2005 Claudio Ciccani <kl...@ch...> * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public Index: idirectfb.c =================================================================== RCS file: /cvsroot/php-directfb/PHP-DirectFB/src/idirectfb.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- idirectfb.c 22 Nov 2004 16:57:53 -0000 1.3 +++ idirectfb.c 2 Jan 2005 16:27:08 -0000 1.4 @@ -1,7 +1,7 @@ /* * PHP-DirectFB - The PHP wrapper for DirectFB * - * Copyright (C) 2004 Claudio Ciccani <kl...@ch...> + * Copyright (C) 2004-2005 Claudio Ciccani <kl...@ch...> * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public Index: iwindow.c =================================================================== RCS file: /cvsroot/php-directfb/PHP-DirectFB/src/iwindow.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- iwindow.c 15 Nov 2004 15:06:18 -0000 1.2 +++ iwindow.c 2 Jan 2005 16:27:08 -0000 1.3 @@ -1,7 +1,7 @@ /* * PHP-DirectFB - The PHP wrapper for DirectFB * - * Copyright (C) 2004 Claudio Ciccani <kl...@ch...> + * Copyright (C) 2004-2005 Claudio Ciccani <kl...@ch...> * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public Index: ipalette.c =================================================================== RCS file: /cvsroot/php-directfb/PHP-DirectFB/src/ipalette.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- ipalette.c 15 Nov 2004 15:06:18 -0000 1.2 +++ ipalette.c 2 Jan 2005 16:27:08 -0000 1.3 @@ -1,7 +1,7 @@ /* * PHP-DirectFB - The PHP wrapper for DirectFB * - * Copyright (C) 2004 Claudio Ciccani <kl...@ch...> + * Copyright (C) 2004-2005 Claudio Ciccani <kl...@ch...> * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public Index: ifont.c =================================================================== RCS file: /cvsroot/php-directfb/PHP-DirectFB/src/ifont.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- ifont.c 15 Nov 2004 15:06:18 -0000 1.2 +++ ifont.c 2 Jan 2005 16:27:08 -0000 1.3 @@ -1,7 +1,7 @@ /* * PHP-DirectFB - The PHP wrapper for DirectFB * - * Copyright (C) 2004 Claudio Ciccani <kl...@ch...> + * Copyright (C) 2004-2005 Claudio Ciccani <kl...@ch...> * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public Index: iscreen.c =================================================================== RCS file: /cvsroot/php-directfb/PHP-DirectFB/src/iscreen.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- iscreen.c 4 Dec 2004 10:38:58 -0000 1.3 +++ iscreen.c 2 Jan 2005 16:27:08 -0000 1.4 @@ -1,7 +1,7 @@ /* * PHP-DirectFB - The PHP wrapper for DirectFB * - * Copyright (C) 2004 Claudio Ciccani <kl...@ch...> + * Copyright (C) 2004-2005 Claudio Ciccani <kl...@ch...> * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public Index: php_directfb.c =================================================================== RCS file: /cvsroot/php-directfb/PHP-DirectFB/src/php_directfb.c,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- php_directfb.c 29 Dec 2004 21:28:08 -0000 1.9 +++ php_directfb.c 2 Jan 2005 16:27:08 -0000 1.10 @@ -1,7 +1,7 @@ /* * PHP-DirectFB - The PHP wrapper for DirectFB * - * Copyright (C) 2004 Claudio Ciccani <kl...@ch...> + * Copyright (C) 2004-2005 Claudio Ciccani <kl...@ch...> * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public Index: ivideoprovider.c =================================================================== RCS file: /cvsroot/php-directfb/PHP-DirectFB/src/ivideoprovider.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- ivideoprovider.c 29 Dec 2004 21:28:08 -0000 1.3 +++ ivideoprovider.c 2 Jan 2005 16:27:08 -0000 1.4 @@ -1,7 +1,7 @@ /* * PHP-DirectFB - The PHP wrapper for DirectFB * - * Copyright (C) 2004 Claudio Ciccani <kl...@ch...> + * Copyright (C) 2004-2005 Claudio Ciccani <kl...@ch...> * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public Index: php_directfb.h =================================================================== RCS file: /cvsroot/php-directfb/PHP-DirectFB/src/php_directfb.h,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- php_directfb.h 29 Dec 2004 21:28:08 -0000 1.5 +++ php_directfb.h 2 Jan 2005 16:27:08 -0000 1.6 @@ -1,7 +1,7 @@ /* * PHP-DirectFB - The PHP wrapper for DirectFB * - * Copyright (C) 2004 Claudio Ciccani <kl...@ch...> + * Copyright (C) 2004-2005 Claudio Ciccani <kl...@ch...> * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public Index: idatabuffer.c =================================================================== RCS file: /cvsroot/php-directfb/PHP-DirectFB/src/idatabuffer.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- idatabuffer.c 15 Nov 2004 15:06:18 -0000 1.2 +++ idatabuffer.c 2 Jan 2005 16:27:08 -0000 1.3 @@ -1,7 +1,7 @@ /* * PHP-DirectFB - The PHP wrapper for DirectFB * - * Copyright (C) 2004 Claudio Ciccani <kl...@ch...> + * Copyright (C) 2004-2005 Claudio Ciccani <kl...@ch...> * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public Index: ieventbuffer.c =================================================================== RCS file: /cvsroot/php-directfb/PHP-DirectFB/src/ieventbuffer.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- ieventbuffer.c 15 Nov 2004 15:06:18 -0000 1.2 +++ ieventbuffer.c 2 Jan 2005 16:27:08 -0000 1.3 @@ -1,7 +1,7 @@ /* * PHP-DirectFB - The PHP wrapper for DirectFB * - * Copyright (C) 2004 Claudio Ciccani <kl...@ch...> + * Copyright (C) 2004-2005 Claudio Ciccani <kl...@ch...> * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public |
From: Claudio C. <kl...@us...> - 2005-01-02 16:27:24
|
Update of /cvsroot/php-directfb/PHP-DirectFB/tools In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6089/tools Modified Files: directfb-phpsource.c Log Message: Updated copyright. Index: directfb-phpsource.c =================================================================== RCS file: /cvsroot/php-directfb/PHP-DirectFB/tools/directfb-phpsource.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- directfb-phpsource.c 15 Nov 2004 15:13:17 -0000 1.1 +++ directfb-phpsource.c 2 Jan 2005 16:27:09 -0000 1.2 @@ -1,5 +1,5 @@ /* - Copyright (C) 2004 Claudio Ciccani <kl...@ch...> + Copyright (C) 2004-2005 Claudio Ciccani <kl...@ch...> directfb-phpsource is based on directfb-csource, DirectFB surface dump utility |
From: Claudio C. <kl...@us...> - 2004-12-29 21:29:22
|
Update of /cvsroot/php-directfb/PHP-DirectFB/examples In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1663 Removed Files: df_palette.php Log Message: Removed df_palette: too slow. --- df_palette.php DELETED --- |
From: Claudio C. <kl...@us...> - 2004-12-29 21:28:18
|
Update of /cvsroot/php-directfb/PHP-DirectFB/doc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1142/doc Modified Files: reference.txt Log Message: Fixed BUG related to preallocated sub-surfaces. Preparing for first alpha release. Index: reference.txt =================================================================== RCS file: /cvsroot/php-directfb/PHP-DirectFB/doc/reference.txt,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- reference.txt 4 Dec 2004 10:38:58 -0000 1.4 +++ reference.txt 29 Dec 2004 21:28:08 -0000 1.5 @@ -934,10 +934,6 @@ ------------------------------------------------------------------------------- -Prototype: bool SetRenderCallback( string callback [, mixed data] ) - -------------------------------------------------------------------------------- - 2.11 IDirectFBVideoProvider --------------------------- |
From: Claudio C. <kl...@us...> - 2004-12-29 21:28:17
|
Update of /cvsroot/php-directfb/PHP-DirectFB/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1142/src Modified Files: isurface.c ivideoprovider.c php_directfb.c php_directfb.h Log Message: Fixed BUG related to preallocated sub-surfaces. Preparing for first alpha release. Index: php_directfb.h =================================================================== RCS file: /cvsroot/php-directfb/PHP-DirectFB/src/php_directfb.h,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- php_directfb.h 15 Nov 2004 15:06:18 -0000 1.4 +++ php_directfb.h 29 Dec 2004 21:28:08 -0000 1.5 @@ -216,7 +216,19 @@ RETURN_FALSE; \ } \ } - + +#define DIRECTFB_WRAPPER_ADDREF( obj ) \ +{ \ + zval **tmp; \ + if (zend_hash_index_find( Z_OBJPROP_P( obj ), 0, (void**) &tmp ) != SUCCESS) { \ + php_error( E_WARNING, "object was destroyed" ); \ + dfb_errno = DFB_DESTROYED; \ + RETURN_FALSE; \ + } \ + zend_list_addref( Z_LVAL_PP( tmp ) ); \ +} + + #define DIRECTFB_GET_INTERFACE( obj, iface, thiz ) \ { \ DirectFB_wrp *wrp = NULL; \ Index: isurface.c =================================================================== RCS file: /cvsroot/php-directfb/PHP-DirectFB/src/isurface.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- isurface.c 15 Nov 2004 15:06:18 -0000 1.4 +++ isurface.c 29 Dec 2004 21:28:08 -0000 1.5 @@ -885,6 +885,7 @@ IDirectFBSurface *sub_surface = NULL; DFBRectangle rect; zval *r = NULL; + DirectFB_wrp *wrapper = NULL; DIRECTFB_GET_THIS( surface ); @@ -901,6 +902,10 @@ if (!sub_surface) RETURN_NULL(); + DIRECTFB_GET_WRAPPER( getThis(), wrapper ); + if (wrapper->pdata) /* preallocated surface */ + DIRECTFB_WRAPPER_ADDREF( getThis() ); + DIRECTFB_RETURN_INTERFACE( IDirectFBSurface, sub_surface, NULL ); } Index: php_directfb.c =================================================================== RCS file: /cvsroot/php-directfb/PHP-DirectFB/src/php_directfb.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- php_directfb.c 8 Dec 2004 21:21:47 -0000 1.8 +++ php_directfb.c 29 Dec 2004 21:28:08 -0000 1.9 @@ -160,6 +160,7 @@ DIRECTFB_REGISTER_DEF( DSECONF_MIXER ); DIRECTFB_REGISTER_DEF( DSECONF_OUT_SIGNALS ); DIRECTFB_REGISTER_DEF( DSECONF_SCANMODE ); + DIRECTFB_REGISTER_DEF( DSECONF_TEST_COLOR ); DIRECTFB_REGISTER_DEF( DSECONF_ALL ); /* DFBScreenEncoderTestPicture */ DIRECTFB_REGISTER_DEF( DSETP_OFF ); @@ -189,6 +190,7 @@ DIRECTFB_REGISTER_DEF( DSOS_YC ); DIRECTFB_REGISTER_DEF( DSOS_CVBS ); DIRECTFB_REGISTER_DEF( DSOS_RGB ); + DIRECTFB_REGISTER_DEF( DSOS_YCBCR ); /* DFBScreenOutputConfigFlags */ DIRECTFB_REGISTER_DEF( DSOCONF_ENCODER ); DIRECTFB_REGISTER_DEF( DSOCONF_SIGNALS ); @@ -294,6 +296,7 @@ DIRECTFB_REGISTER_DEF( DSFLIP_WAIT ); DIRECTFB_REGISTER_DEF( DSFLIP_BLIT ); DIRECTFB_REGISTER_DEF( DSFLIP_ONSYNC ); + DIRECTFB_REGISTER_DEF( DSFLIP_PIPELINE ); DIRECTFB_REGISTER_DEF( DSFLIP_WAITFORSYNC ); /* DFBSurfaceBlendFunction */ DIRECTFB_REGISTER_DEF( DSBF_ZERO ); Index: ivideoprovider.c =================================================================== RCS file: /cvsroot/php-directfb/PHP-DirectFB/src/ivideoprovider.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- ivideoprovider.c 15 Nov 2004 15:06:18 -0000 1.2 +++ ivideoprovider.c 29 Dec 2004 21:28:08 -0000 1.3 @@ -63,7 +63,7 @@ { IDirectFBSurface *surface = (IDirectFBSurface*) data; - surface->Flip( surface, NULL, DSFLIP_WAITFORSYNC ); + surface->Flip( surface, NULL, DSFLIP_ONSYNC ); return 0; } |
From: Claudio C. <kl...@us...> - 2004-12-29 21:28:17
|
Update of /cvsroot/php-directfb/PHP-DirectFB In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1142 Modified Files: README configure.ac Log Message: Fixed BUG related to preallocated sub-surfaces. Preparing for first alpha release. Index: README =================================================================== RCS file: /cvsroot/php-directfb/PHP-DirectFB/README,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- README 12 Nov 2004 18:47:31 -0000 1.3 +++ README 29 Dec 2004 21:28:08 -0000 1.4 @@ -18,8 +18,8 @@ - PHP 5.0.0 or higher CLI version (get it at http://php.net). -Installing ----------- +Installation +------------ See INTALL. @@ -36,8 +36,8 @@ ------------- There is a brief reference, under the doc/ directory, that - explains the main differencies between PHP-DirectFB APIs and - DirectFB APIs; refer to DirectFB documentation for an extended + explains the main differencies between PHP-DirectFB API and + DirectFB API; refer to DirectFB documentation for an extended explanation of DirectFB architecture and development. Index: configure.ac =================================================================== RCS file: /cvsroot/php-directfb/PHP-DirectFB/configure.ac,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- configure.ac 15 Nov 2004 15:13:16 -0000 1.2 +++ configure.ac 29 Dec 2004 21:28:08 -0000 1.3 @@ -8,15 +8,32 @@ PHP_DIRECTFB_MAJOR=0 PHP_DIRECTFB_MINOR=0 PHP_DIRECTFB_MICRO=0 +PHP_DIRECTFB_REVISION=0 +PHP_DIRECTFB_AGE=0 VERSION=$PHP_DIRECTFB_MAJOR.$PHP_DIRECTFB_MINOR.$PHP_DIRECTFB_MICRO PACKAGE=PHP-DirectFB +AC_DEFINE_UNQUOTED( PHP_DIRECTFB_VERSION, "$VERSION", [PHP-DirectFB Version.] ) + +# Libtool versioning +LT_RELEASE=$PHP_DIRECTFB_MAJOR.$PHP_DIRECTFB_MINOR +LT_CURRENT=`expr $PHP_DIRECTFB_MICRO - $PHP_DIRECTFB_REVISION` +LT_REVISION=$PHP_DIRECTFB_REVISION +LT_AGE=`expr $PHP_DIRECTFB_REVISION - $PHP_DIRECTFB_AGE` + +AC_SUBST( LT_RELEASE ) +AC_SUBST( LT_CURRENT ) +AC_SUBST( LT_REVISION ) +AC_SUBST( LT_AGE ) + + AM_INIT_AUTOMAKE( $PACKAGE, $VERSION, no-define ) AM_CONFIG_HEADER( config.h ) - +AM_MAINTAINER_MODE AC_DISABLE_STATIC + AM_PROG_LIBTOOL AM_SANITY_CHECK AC_ISC_POSIX @@ -27,12 +44,6 @@ # -# Version -# -AC_DEFINE_UNQUOTED( PHP_DIRECTFB_VERSION, "$VERSION", [Define to the version of PHP-DirectFB.] ) - - -# # Compiler Flags # CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE" |
From: Claudio C. <kl...@us...> - 2004-12-08 21:22:36
|
Update of /cvsroot/php-directfb/PHP-DirectFB/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24323 Modified Files: php_directfb.c Log Message: Added new DSPF_NV12,DSPF_NV16 pixelformats. Index: php_directfb.c =================================================================== RCS file: /cvsroot/php-directfb/PHP-DirectFB/src/php_directfb.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- php_directfb.c 4 Dec 2004 10:38:58 -0000 1.7 +++ php_directfb.c 8 Dec 2004 21:21:47 -0000 1.8 @@ -54,7 +54,6 @@ directfb_minor_version != DIRECTFB_MINOR_VERSION || directfb_micro_version != DIRECTFB_MICRO_VERSION) { php_error( E_WARNING, - " (!!) PHP-DirectFB: " "current DirectFB Library version (%i.%i.%i) " "doesn't match compiled version (%i.%i.%i).\n", directfb_major_version, @@ -289,8 +288,8 @@ DIRECTFB_REGISTER_DEF( DSPF_ALUT44 ); DIRECTFB_REGISTER_DEF( DSPF_AiRGB ); DIRECTFB_REGISTER_DEF( DSPF_A1 ); - DIRECTFB_REGISTER_DEF( DSPF_YC420 ); - DIRECTFB_REGISTER_DEF( DSPF_YC422 ); + DIRECTFB_REGISTER_DEF( DSPF_NV12 ); + DIRECTFB_REGISTER_DEF( DSPF_NV16 ); /* DFBSurfaceFlipFlags */ DIRECTFB_REGISTER_DEF( DSFLIP_WAIT ); DIRECTFB_REGISTER_DEF( DSFLIP_BLIT ); |
From: Claudio C. <kl...@us...> - 2004-12-04 10:39:07
|
Update of /cvsroot/php-directfb/PHP-DirectFB/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16440/src Modified Files: datatypes.c idisplaylayer.c iscreen.c php_directfb.c Log Message: Sync to current DirectFB code. If DirectFB library version doesn't match compiled version, print a warning instead of returning FAILURE. Index: iscreen.c =================================================================== RCS file: /cvsroot/php-directfb/PHP-DirectFB/src/iscreen.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- iscreen.c 15 Nov 2004 15:06:18 -0000 1.2 +++ iscreen.c 4 Dec 2004 10:38:58 -0000 1.3 @@ -206,8 +206,9 @@ object_init( mdsc ); add_property_long( mdsc, "caps", mdscs[i].caps ); add_property_long( mdsc, "layers", mdscs[i].layers ); - add_property_long( mdsc, "num_layers", mdscs[i].num_layers ); + add_property_long( mdsc, "sub_num", mdscs[i].sub_num ); add_property_long( mdsc, "sub_layers", mdscs[i].sub_layers ); + add_property_string( mdsc, "name", &mdscs[i].name[0], 1 ); add_index_zval( return_value, i, mdsc ); } @@ -296,6 +297,8 @@ add_property_long( edsc, "caps", edscs[i].caps ); add_property_long( edsc, "type", edscs[i].type ); add_property_long( edsc, "tv_standards", edscs[i].tv_standards ); + add_property_long( edsc, "out_signals", edscs[i].out_signals ); + add_property_string( edsc, "name", &edscs[i].name[0], 1 ); add_index_zval( return_value, i, edsc ); } @@ -384,6 +387,7 @@ add_property_long( odsc, "caps", odscs[i].caps ); add_property_long( odsc, "all_connectors", odscs[i].all_connectors ); add_property_long( odsc, "all_signals", odscs[i].all_signals ); + add_property_string( odsc, "name", &odscs[i].name[0], 1 ); add_index_zval( return_value, i, odsc ); } Index: idisplaylayer.c =================================================================== RCS file: /cvsroot/php-directfb/PHP-DirectFB/src/idisplaylayer.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- idisplaylayer.c 15 Nov 2004 15:06:18 -0000 1.2 +++ idisplaylayer.c 4 Dec 2004 10:38:58 -0000 1.3 @@ -72,6 +72,9 @@ add_property_long( return_value, "regions", dsc.regions ); + add_property_long( return_value, + "sources", + dsc.sources ); } static @@ -551,6 +554,36 @@ dfb_errno = layer->WaitForSync( layer ); } +static +INTERFACE_METHOD( GetSourceDescriptions ) +{ + IDirectFBDisplayLayer *layer; + DFBDisplayLayerDescription dsc; + + DIRECTFB_GET_THIS( layer ); + + dfb_errno = layer->GetDescription( layer, &dsc ); + + array_init( return_value ); + + if ((dsc.caps & DLCAPS_SOURCES) && dsc.sources > 0) { + DFBDisplayLayerSourceDescription sdscs[dsc.sources]; + int i; + + memset( &sdscs[0], 0, dsc.sources * sizeof(sdscs[0]) ); + dfb_errno = layer->GetSourceDescriptions( layer, &sdscs[0] ); + + for (i = 0; i < dsc.sources; i++) { + zval *sdsc; + MAKE_STD_ZVAL( sdsc ); + object_init( sdsc ); + add_property_long( sdsc, "source_id", sdscs[i].source_id ); + add_property_string( sdsc, "name", &sdscs[i].name[0], 1 ); + add_index_zval( return_value, i, sdsc ); + } + } +} + STANDARD_INTERFACE_DESTRUCTOR() @@ -588,5 +621,6 @@ METHOD( SetCursorShape ) METHOD( SetCursorOpacity ) METHOD( WaitForSync ) + METHOD( GetSourceDescriptions ) ) Index: php_directfb.c =================================================================== RCS file: /cvsroot/php-directfb/PHP-DirectFB/src/php_directfb.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- php_directfb.c 18 Nov 2004 10:38:34 -0000 1.6 +++ php_directfb.c 4 Dec 2004 10:38:58 -0000 1.7 @@ -53,16 +53,16 @@ if (directfb_major_version != DIRECTFB_MAJOR_VERSION || directfb_minor_version != DIRECTFB_MINOR_VERSION || directfb_micro_version != DIRECTFB_MICRO_VERSION) { - fprintf( stderr, " (!!) PHP-DirectFB: " - "current DirectFB Library version (%i.%i.%i) " - "doesn't match compiled version (%i.%i.%i).\n", - directfb_major_version, - directfb_minor_version, - directfb_micro_version, - DIRECTFB_MAJOR_VERSION, - DIRECTFB_MINOR_VERSION, - DIRECTFB_MICRO_VERSION ); - return FAILURE; + php_error( E_WARNING, + " (!!) PHP-DirectFB: " + "current DirectFB Library version (%i.%i.%i) " + "doesn't match compiled version (%i.%i.%i).\n", + directfb_major_version, + directfb_minor_version, + directfb_micro_version, + DIRECTFB_MAJOR_VERSION, + DIRECTFB_MINOR_VERSION, + DIRECTFB_MICRO_VERSION ); } le_DirectFB = zend_register_list_destructors_ex( php_directfb_wrp_dtor, NULL, @@ -164,15 +164,16 @@ DIRECTFB_REGISTER_DEF( DSECONF_ALL ); /* DFBScreenEncoderTestPicture */ DIRECTFB_REGISTER_DEF( DSETP_OFF ); - DIRECTFB_REGISTER_DEF( DSETP_MULTI_COLOR ); - DIRECTFB_REGISTER_DEF( DSETP_SINGLE_BLACK ); - DIRECTFB_REGISTER_DEF( DSETP_SINGLE_WHITE ); - DIRECTFB_REGISTER_DEF( DSETP_SINGLE_YELLOW ); - DIRECTFB_REGISTER_DEF( DSETP_SINGLE_CYAN ); - DIRECTFB_REGISTER_DEF( DSETP_SINGLE_GREEN ); - DIRECTFB_REGISTER_DEF( DSETP_SINGLE_MAGENTA ); - DIRECTFB_REGISTER_DEF( DSETP_SINGLE_RED ); - DIRECTFB_REGISTER_DEF( DSETP_SINGLE_BLUE ); + DIRECTFB_REGISTER_DEF( DSETP_MULTI ); + DIRECTFB_REGISTER_DEF( DSETP_SINGLE ); + DIRECTFB_REGISTER_DEF( DSETP_WHITE ); + DIRECTFB_REGISTER_DEF( DSETP_YELLOW ); + DIRECTFB_REGISTER_DEF( DSETP_CYAN ); + DIRECTFB_REGISTER_DEF( DSETP_GREEN ); + DIRECTFB_REGISTER_DEF( DSETP_MAGENTA ); + DIRECTFB_REGISTER_DEF( DSETP_RED ); + DIRECTFB_REGISTER_DEF( DSETP_BLUE ); + DIRECTFB_REGISTER_DEF( DSETP_BLACK ); /* DFBScreenOutputCapabilities */ DIRECTFB_REGISTER_DEF( DSOCAPS_CONNECTORS ); DIRECTFB_REGISTER_DEF( DSOCAPS_ENCODER_SEL ); @@ -223,6 +224,7 @@ DIRECTFB_REGISTER_DEF( DLCAPS_LEVELS ); DIRECTFB_REGISTER_DEF( DLCAPS_FIELD_PARITY ); DIRECTFB_REGISTER_DEF( DLCAPS_WINDOWS ); + DIRECTFB_REGISTER_DEF( DLCAPS_SOURCES ); DIRECTFB_REGISTER_DEF( DLCAPS_ALL ); /* DFBDisplayLayerConfigFlags */ DIRECTFB_REGISTER_DEF( DLCONF_WIDTH ); @@ -230,6 +232,7 @@ DIRECTFB_REGISTER_DEF( DLCONF_PIXELFORMAT ); DIRECTFB_REGISTER_DEF( DLCONF_BUFFERMODE ); DIRECTFB_REGISTER_DEF( DLCONF_OPTIONS ); + DIRECTFB_REGISTER_DEF( DLCONF_SOURCE ); DIRECTFB_REGISTER_DEF( DLCONF_ALL ); /* DFBDisplayLayerBufferMode */ DIRECTFB_REGISTER_DEF( DLBM_FRONTONLY ); @@ -286,6 +289,8 @@ DIRECTFB_REGISTER_DEF( DSPF_ALUT44 ); DIRECTFB_REGISTER_DEF( DSPF_AiRGB ); DIRECTFB_REGISTER_DEF( DSPF_A1 ); + DIRECTFB_REGISTER_DEF( DSPF_YC420 ); + DIRECTFB_REGISTER_DEF( DSPF_YC422 ); /* DFBSurfaceFlipFlags */ DIRECTFB_REGISTER_DEF( DSFLIP_WAIT ); DIRECTFB_REGISTER_DEF( DSFLIP_BLIT ); Index: datatypes.c =================================================================== RCS file: /cvsroot/php-directfb/PHP-DirectFB/src/datatypes.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- datatypes.c 18 Nov 2004 10:38:34 -0000 1.5 +++ datatypes.c 4 Dec 2004 10:38:58 -0000 1.6 @@ -611,9 +611,9 @@ { DFBDisplayLayerConfig config; - if (zend_parse_parameters( ht, "llllll", &config.flags, &config.width, - &config.height, &config.pixelformat, - &config.buffermode, &config.options ) != SUCCESS) + if (zend_parse_parameters( ht, "lllllll", &config.flags, &config.width, + &config.height, &config.pixelformat, &config.buffermode, + &config.options, &config.source ) != SUCCESS) return false; DFBDisplayLayerConfig_init( &config, this ); @@ -629,6 +629,7 @@ add_property_long( ret, "pixelformat", config->pixelformat ); add_property_long( ret, "buffermode", config->buffermode ); add_property_long( ret, "options", config->options ); + add_property_long( ret, "source", config->source ); } void @@ -652,6 +653,9 @@ if (ret->flags & DLCONF_OPTIONS) GET_ENTRY_LONG( options, &ret->options ); + + if (ret->flags & DLCONF_SOURCE) + GET_ENTRY_LONG( source, &ret->source ); } DIRECTFB_DATATYPE_DEFINITION( DFBDisplayLayerConfig ) |
From: Claudio C. <kl...@us...> - 2004-12-04 10:39:06
|
Update of /cvsroot/php-directfb/PHP-DirectFB/doc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16440/doc Modified Files: reference.txt Log Message: Sync to current DirectFB code. If DirectFB library version doesn't match compiled version, print a warning instead of returning FAILURE. Index: reference.txt =================================================================== RCS file: /cvsroot/php-directfb/PHP-DirectFB/doc/reference.txt,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- reference.txt 22 Nov 2004 16:57:52 -0000 1.3 +++ reference.txt 4 Dec 2004 10:38:58 -0000 1.4 @@ -469,6 +469,10 @@ ------------------------------------------------------------------------------- +Prototype: array GetSourceDescriptions( void ) + +------------------------------------------------------------------------------- + 2.4 IDirectFBSurface -------------------- |
From: Claudio C. <kl...@us...> - 2004-11-22 16:58:03
|
Update of /cvsroot/php-directfb/PHP-DirectFB/doc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25020/doc Modified Files: reference.txt Log Message: Changes in clipboard handling APIs: - SetClipboardData() accepts NULL as mime arguments (in that case "text/plain" is assumed) - GetClipboardTimeStamp() returns timestamp in double format (seconds,microseconds) Index: reference.txt =================================================================== RCS file: /cvsroot/php-directfb/PHP-DirectFB/doc/reference.txt,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- reference.txt 13 Nov 2004 10:52:21 -0000 1.2 +++ reference.txt 22 Nov 2004 16:57:52 -0000 1.3 @@ -228,7 +228,7 @@ Prototype: bool SetClipboardData( string mime, string data ) -Description: Set clipboard content. +Description: Set clipboard content; if mime is NULL, text/plain is assumed. ------------------------------------------------------------------------------- @@ -240,10 +240,10 @@ ------------------------------------------------------------------------------- -Prototype: string GetClipboardTimeStamp( void ) +Prototype: double GetClipboardTimeStamp( void ) -Description: Returns the timestamp, in microtime() format, of the last - SetClipboardData call. +Description: Returns the timestamp of last SetClipboardData() call + in double format (seconds,microseconds). ------------------------------------------------------------------------------- |
From: Claudio C. <kl...@us...> - 2004-11-22 16:58:03
|
Update of /cvsroot/php-directfb/PHP-DirectFB/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25020/src Modified Files: idirectfb.c Log Message: Changes in clipboard handling APIs: - SetClipboardData() accepts NULL as mime arguments (in that case "text/plain" is assumed) - GetClipboardTimeStamp() returns timestamp in double format (seconds,microseconds) Index: idirectfb.c =================================================================== RCS file: /cvsroot/php-directfb/PHP-DirectFB/src/idirectfb.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- idirectfb.c 15 Nov 2004 15:06:18 -0000 1.2 +++ idirectfb.c 22 Nov 2004 16:57:53 -0000 1.3 @@ -690,10 +690,13 @@ DIRECTFB_GET_THIS( dfb ); - if (zend_parse_parameters( ZEND_NUM_ARGS() TSRMLS_CC, "ss", + if (zend_parse_parameters( ZEND_NUM_ARGS() TSRMLS_CC, "s!s", &mime, &size, &data, &size ) != SUCCESS) INVARG(); + if (!mime) + mime = "text/plain"; + dfb_errno = dfb->SetClipboardData( dfb, mime, data, size, NULL ); DIRECTFB_RESULT(); @@ -717,7 +720,7 @@ add_assoc_string( return_value, "mime", mime, 1 ); free( mime ); } else - add_assoc_string( return_value, "mime", "", 1 ); + add_assoc_stringl( return_value, "mime", empty_string, 0, 0 ); if (data && size) { zval *d; @@ -731,30 +734,22 @@ add_assoc_zval( return_value, "data", d ); free( data ); } else - add_assoc_string( return_value, "data", "", 1 ); + add_assoc_stringl( return_value, "data", empty_string, 0, 0 ); } static INTERFACE_METHOD( GetClipboardTimeStamp ) { IDirectFB *dfb; - struct timeval time; - double msec; - char buf[100]; + struct timeval tv; DIRECTFB_GET_THIS( dfb ); - dfb_errno = dfb->GetClipboardTimeStamp( dfb, &time ); + dfb_errno = dfb->GetClipboardTimeStamp( dfb, &tv ); if (dfb_errno != DFB_OK) RETURN_NULL(); - msec = (double) time.tv_usec / 1000000.00; - if (msec >= 1.0) - msec -= (long) msec; - - snprintf( &buf[0], 100, "%.8f %ld", msec, time.tv_sec ); - - RETURN_STRING( &buf[0], 1 ); + RETURN_DOUBLE( (double) tv.tv_sec + (double) tv.tv_usec / 1000000.00 ); } static |
From: Claudio C. <kl...@us...> - 2004-11-18 10:38:45
|
Update of /cvsroot/php-directfb/PHP-DirectFB/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29001 Modified Files: datatypes.c php_directfb.c Log Message: Added DFBScreenEncoderScanMode. Fixed DFBScreenEncoderConfig (::$out_signals was missing). Index: php_directfb.c =================================================================== RCS file: /cvsroot/php-directfb/PHP-DirectFB/src/php_directfb.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- php_directfb.c 15 Nov 2004 15:06:18 -0000 1.5 +++ php_directfb.c 18 Nov 2004 10:38:34 -0000 1.6 @@ -143,6 +143,8 @@ DIRECTFB_REGISTER_DEF( DSECAPS_TV_STANDARDS ); DIRECTFB_REGISTER_DEF( DSECAPS_TEST_PICTURE ); DIRECTFB_REGISTER_DEF( DSECAPS_MIXER_SEL ); + DIRECTFB_REGISTER_DEF( DSECAPS_OUT_SIGNALS ); + DIRECTFB_REGISTER_DEF( DSECAPS_SCANMODE ); /* DFBScreenEncoderType */ DIRECTFB_REGISTER_DEF( DSET_CRTC ); DIRECTFB_REGISTER_DEF( DSET_TV ); @@ -150,10 +152,15 @@ DIRECTFB_REGISTER_DEF( DSETV_PAL ); DIRECTFB_REGISTER_DEF( DSETV_NTSC ); DIRECTFB_REGISTER_DEF( DSETV_SECAM ); + /* DFBScreenEncoderScanMode */ + DIRECTFB_REGISTER_DEF( DSESM_INTERLACED ); + DIRECTFB_REGISTER_DEF( DSESM_PROGRESSIVE ); /* DFBScreenEncoderConfigFlags */ DIRECTFB_REGISTER_DEF( DSECONF_TV_STANDARD ); DIRECTFB_REGISTER_DEF( DSECONF_TEST_PICTURE ); DIRECTFB_REGISTER_DEF( DSECONF_MIXER ); + DIRECTFB_REGISTER_DEF( DSECONF_OUT_SIGNALS ); + DIRECTFB_REGISTER_DEF( DSECONF_SCANMODE ); DIRECTFB_REGISTER_DEF( DSECONF_ALL ); /* DFBScreenEncoderTestPicture */ DIRECTFB_REGISTER_DEF( DSETP_OFF ); Index: datatypes.c =================================================================== RCS file: /cvsroot/php-directfb/PHP-DirectFB/src/datatypes.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- datatypes.c 17 Nov 2004 17:04:25 -0000 1.4 +++ datatypes.c 18 Nov 2004 10:38:34 -0000 1.5 @@ -486,8 +486,9 @@ { DFBScreenEncoderConfig config; - if (zend_parse_parameters( ht, "llll", &config.flags, &config.tv_standard, - &config.test_picture, &config.mixer ) != SUCCESS) + if (zend_parse_parameters( ht, "llllll", &config.flags, &config.tv_standard, + &config.test_picture, &config.mixer, + &config.out_signals, &config.scanmode ) != SUCCESS) return false; DFBScreenEncoderConfig_init( &config, this ); @@ -501,6 +502,8 @@ add_property_long( ret, "tv_standard", config->tv_standard ); add_property_long( ret, "test_picture", config->test_picture ); add_property_long( ret, "mixer", config->mixer ); + add_property_long( ret, "out_signals", config->out_signals ); + add_property_long( ret, "scanmode", config->scanmode ); } void @@ -518,6 +521,12 @@ if (ret->flags & DSECONF_MIXER) GET_ENTRY_LONG( mixer, &ret->mixer ); + + if (ret->flags & DSECONF_OUT_SIGNALS) + GET_ENTRY_LONG( out_signals, &ret->out_signals ); + + if (ret->flags & DSECONF_SCANMODE) + GET_ENTRY_LONG( scanmode, &ret->scanmode ); } DIRECTFB_DATATYPE_DEFINITION( DFBScreenEncoderConfig ) |
From: Claudio C. <kl...@us...> - 2004-11-17 17:04:36
|
Update of /cvsroot/php-directfb/PHP-DirectFB/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29168 Modified Files: datatypes.c Log Message: Renamed DFBSurfaceDescription::$preallocated DFBSurfaceDescription::$preallocated_data. Index: datatypes.c =================================================================== RCS file: /cvsroot/php-directfb/PHP-DirectFB/src/datatypes.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- datatypes.c 15 Nov 2004 15:06:18 -0000 1.3 +++ datatypes.c 17 Nov 2004 17:04:25 -0000 1.4 @@ -80,7 +80,8 @@ break; case T_STRING: convert_to_string_ex( tmp ); - *((char**) ret) = estrdup( Z_STRVAL_PP( tmp )); + *((char**) ret) = Z_STRVAL_PP( tmp ); + break; case T_ARRAY: convert_to_array_ex( tmp ); *((zval**) ret) = *tmp; @@ -739,9 +740,9 @@ add_property_long( this, "height", dsc.height ); add_property_long( this, "pixelformat", dsc.pixelformat ); if (buffer && size > 0 && pitch > 0) - add_property_stringl( this, "preallocated", buffer, size, 1 ); + add_property_stringl( this, "preallocated_data", buffer, size, 1 ); else - add_property_unset( this, "preallocated" ); + add_property_unset( this, "preallocated_data" ); add_property_long( this, "preallocated_pitch", pitch ); add_property_zval( this, "palette", palette ); @@ -781,10 +782,10 @@ dsc->pixelformat == DSPF_I420) size += (size >> 1) & ~1; - add_property_stringl( ret, "preallocated", + add_property_stringl( ret, "preallocated_data", dsc->preallocated[0].data, size, 1 ); } else - add_property_unset( ret, "preallocated" ); + add_property_unset( ret, "preallocated_data" ); add_property_long( ret, "preallocated_pitch", dsc->preallocated[0].pitch ); add_property_zval( ret, "palette", palette ); @@ -812,7 +813,7 @@ if (ret->flags & DSDESC_PREALLOCATED) { zval *data = NULL; - GET_ENTRY_DATA( preallocated, &data ); + GET_ENTRY_DATA( preallocated_data, &data ); GET_ENTRY_LONG( preallocated_pitch, &ret->preallocated[0].pitch ); if (data && Z_STRLEN_P( data ) > 0 && ret->preallocated[0].pitch > 0) { @@ -822,7 +823,7 @@ ret->preallocated[1] = ret->preallocated[0]; } else { php_error( E_WARNING, - "wrong or unset DFBSurfaceDescription::$preallocated" ); + "wrong or unset DFBSurfaceDescription::$preallocated_data" ); ret->flags &= ~DSDESC_PREALLOCATED; } } |
From: Claudio C. <kl...@us...> - 2004-11-15 15:14:37
|
Update of /cvsroot/php-directfb/PHP-DirectFB In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15447 Added Files: ChangeLog Log Message: Initial import. --- NEW FILE: ChangeLog --- |
From: Claudio C. <kl...@us...> - 2004-11-15 15:13:27
|
Update of /cvsroot/php-directfb/PHP-DirectFB/tools In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14887/tools Added Files: .cvsignore Makefile.am directfb-phpsource.c Log Message: Added directfb-phpsource. --- NEW FILE: .cvsignore --- Makefile Makefile.in .libs .deps *.o *.lo *.la --- NEW FILE: Makefile.am --- # Makefile.am fot PHP-DirectFB/tools INCLUDES = $(DFB_CFLAGS) if BUILD_DIRECTFB_PHPSOURCE DFB_PHPSOURCE = directfb-phpsource directfb_phpsource_SOURCES = directfb-phpsource.c directfb_phpsource_LDADD = -lpng $(ZLIB) -lm endif bin_PROGRAMS = $(DFB_PHPSOURCE) --- NEW FILE: directfb-phpsource.c --- /* Copyright (C) 2004 Claudio Ciccani <kl...@ch...> directfb-phpsource is based on directfb-csource, DirectFB surface dump utility (c) Copyright 2000-2002 convergence integrated media GmbH. (c) Copyright 2002-2004 convergence GmbH. Written by Denis Oliver Kropp <do...@di...>, Andreas Hundt <an...@fi...>, Sven Neumann <ne...@di...> and Ville Syrjälä <sy...@sc...>. directfb-csource is based on gdk-pixbuf-csource, a GdkPixbuf based image CSource generator Copyright (C) 1999, 2001 Tim Janik This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifdef HAVE_CONFIG_H # include <config.h> #endif #include <stdio.h> #include <stdlib.h> #include <string.h> #include <errno.h> #include <assert.h> #include <png.h> #include <directfb.h> #include <direct/types.h> #include <direct/util.h> static struct { DFBSurfacePixelFormat format; const char *name; } pixelformats[] = { { DSPF_ARGB, "ARGB" }, { DSPF_ARGB1555, "ARGB1555" }, { DSPF_RGB32, "RGB32" }, { DSPF_RGB24, "RGB24" }, { DSPF_RGB16, "RGB16" }, { DSPF_RGB332, "RGB332" }, { DSPF_A8, "A8" }, { DSPF_LUT8, "LUT8" } }; static int n_pixelformats = sizeof (pixelformats) / sizeof (pixelformats[0]); static void print_usage (const char *prg_name); static DFBResult load_image (const char *filename, DFBSurfaceDescription *desc, DFBColor *palette, int *palette_size); static DFBResult merge_images (DFBSurfaceDescription *images, int num_images, DFBSurfaceDescription *dest, DFBRectangle *rectangles); static DFBResult dump_image (const char *name, DFBSurfaceDescription *desc, DFBColor *palette, int palette_size); static DFBResult dump_rectangles (const char *name, DFBRectangle *rectangles, const char **names, int num_rects); static char * variable_name (const char *name); static char * base_name (const char *name); int main (int argc, char *argv[]) { DFBSurfaceDescription desc = { flags: 0 }; DFBSurfacePixelFormat format = DSPF_UNKNOWN; DFBColor palette[256]; const char *filename[argc]; const char *output = NULL; const char *name = NULL; int palette_size = 0; int num_images = 0; int i, n; /* parse command line */ for (n = 1; n < argc; n++) { if (strncmp (argv[n], "--", 2) == 0) { const char *arg = argv[n] + 2; if (strcmp (arg, "help") == 0) { print_usage (argv[0]); return EXIT_SUCCESS; } if (strcmp (arg, "version") == 0) { fprintf (stderr, "directfb-phpsource version %s\n", PHP_DIRECTFB_VERSION); return EXIT_SUCCESS; } if (strncmp (arg, "file=", 5) == 0 && !output) { output = arg + 5; stdout = freopen( output, "w", stdout ); if (!stdout) { fprintf( stderr, "Failed to open %s\n", output ); return EXIT_FAILURE; } continue; } if (strncmp (arg, "format=", 7) == 0 && !format) { for (i = 0; i < n_pixelformats && !format; i++) if (!strcasecmp (pixelformats[i].name, arg + 7)) format = pixelformats[i].format; if (format) continue; } if (strncmp (arg, "name=", 5) == 0 && !name) { name = arg + 5; if (*name) continue; } print_usage (argv[0]); return EXIT_FAILURE; } filename[num_images++] = argv[n]; } /* check parameters */ if (! num_images) { print_usage (argv[0]); return EXIT_FAILURE; } if (num_images > 1 && !name) { fprintf (stderr, "You must specify a variable name when using multiple images.\n"); return EXIT_FAILURE; } /* load the first image */ if (format) { desc.flags = DSDESC_PIXELFORMAT; desc.pixelformat = format; } if (load_image (filename[0], &desc, palette, &palette_size) != DFB_OK) return EXIT_FAILURE; /* dump comment */ printf ("<?php\n" "/* PHP-DirectFB %ssurface dump created by directfb-phpsource %s */\n\n", (num_images > 1) ? "multi-" : "", PHP_DIRECTFB_VERSION); /* dump it and quit if this is the only image on the command line */ if (num_images > 1) { /* merge multiple images into one surface */ DFBSurfaceDescription image[num_images]; DFBRectangle rect[num_images]; DFBColor foo[256]; int foo_size; image[0] = desc; for (i = 1; i < num_images; i++) { image[i].flags = DSDESC_PIXELFORMAT; image[i].pixelformat = desc.pixelformat; if (load_image (filename[i], image + i, foo, &foo_size) != DFB_OK) return EXIT_FAILURE; } if (merge_images (image, num_images, &desc, rect) != DFB_OK) return EXIT_FAILURE; /* dump the rectangles, then the surface */ if (dump_rectangles (name, rect, filename, num_images) != DFB_OK) return EXIT_FAILURE; if (dump_image (name, &desc, palette, palette_size) != DFB_OK) return EXIT_FAILURE; } else { if (!name) { name = (strrchr (filename[0], '/')) ? (strrchr (filename[0], '/') + 1) : filename[0]; } if (dump_image (name, &desc, palette, palette_size) != DFB_OK) return EXIT_FAILURE; } printf ("?>\n"); return 0; } static void print_usage (const char *prg_name) { fprintf (stderr, "directfb-phpsource version %s\n\n", PHP_DIRECTFB_VERSION); fprintf (stderr, "Usage: %s [options] <imagefile>\n", prg_name); fprintf (stderr, " --file=<identifier> specifies output file\n"); fprintf (stderr, " --name=<identifer> specifies variable name\n"); fprintf (stderr, " --format=<identifer> specifies surface format\n"); fprintf (stderr, " --help show this help message\n"); fprintf (stderr, " --version print version information\n"); fprintf (stderr, "\n"); } static inline void argb_to_rgb332( __u32 *src, __u8 *dst, int len ) { int i; for (i = 0; i<len; i++) { register __u32 argb = src[i]; dst[i] = ((argb & 0x00e00000) >> 16) | ((argb & 0x0000e000) >> 11) | ((argb & 0x000000c0) >> 6); } } static inline void argb_to_argb1555( __u32 *src, __u16 *dst, int len ) { int i; for (i = 0; i<len; i++) { register __u32 argb = src[i]; dst[i] = ((argb & 0x80000000) >> 16) | ((argb & 0x00f80000) >> 9) | ((argb & 0x0000f800) >> 6) | ((argb & 0x000000f8) >> 3); } } static inline void argb_to_rgb16( __u32 *src, __u16 *dst, int len ) { int i; for (i = 0; i<len; i++) { register __u32 argb = src[i]; dst[i] = ((argb & 0x00f80000) >> 8) | ((argb & 0x0000fc00) >> 5) | ((argb & 0x000000f8) >> 3); } } static inline void argb_to_a8( __u32 *src, __u8 *dst, int len ) { int i; for (i = 0; i<len; i++) dst[i] = src[i] >> 24; } static DFBResult load_image (const char *filename, DFBSurfaceDescription *desc, DFBColor *palette, int *palette_size) { DFBSurfacePixelFormat dest_format; DFBSurfacePixelFormat src_format; FILE *fp; png_structp png_ptr = NULL; png_infop info_ptr = NULL; png_uint_32 width, height; unsigned char *data = NULL; int type; char header[8]; int bytes, pitch; dest_format = (desc->flags & DSDESC_PIXELFORMAT) ? desc->pixelformat : DSPF_UNKNOWN; desc->flags = 0; desc->preallocated[0].data = NULL; if (!(fp = fopen (filename, "rb"))) { fprintf (stderr, "Failed to open file '%s': %s.\n", filename, strerror (errno)); goto cleanup; } bytes = fread (header, 1, sizeof(header), fp); if (png_sig_cmp ((unsigned char*) header, 0, bytes)) { fprintf (stderr, "File '%s' doesn't seem to be a PNG image file.\n", filename); goto cleanup; } png_ptr = png_create_read_struct (PNG_LIBPNG_VER_STRING, NULL, NULL, NULL); if (!png_ptr) goto cleanup; if (setjmp (png_ptr->jmpbuf)) { if (desc->preallocated[0].data) { free (desc->preallocated[0].data); desc->preallocated[0].data = NULL; } /* data might have been clobbered, set it to NULL and leak instead of crashing */ data = NULL; goto cleanup; } info_ptr = png_create_info_struct (png_ptr); if (!info_ptr) goto cleanup; png_init_io (png_ptr, fp); png_set_sig_bytes (png_ptr, bytes); png_read_info (png_ptr, info_ptr); png_get_IHDR (png_ptr, info_ptr, &width, &height, &bytes, &type, NULL, NULL, NULL); if (bytes == 16) png_set_strip_16 (png_ptr); #ifdef WORDS_BIGENDIAN png_set_swap_alpha (png_ptr); #else png_set_bgr (png_ptr); #endif src_format = (type & PNG_COLOR_MASK_ALPHA) ? DSPF_ARGB : DSPF_RGB32; switch (type) { case PNG_COLOR_TYPE_GRAY: if (dest_format == DSPF_A8) { src_format = DSPF_A8; break; } /* fallthru */ case PNG_COLOR_TYPE_GRAY_ALPHA: png_set_gray_to_rgb (png_ptr); break; case PNG_COLOR_TYPE_PALETTE: if (dest_format == DSPF_LUT8) { src_format = DSPF_LUT8; break; } png_set_palette_to_rgb (png_ptr); /* fallthru */ case PNG_COLOR_TYPE_RGB: case PNG_COLOR_TYPE_RGB_ALPHA: if (dest_format == DSPF_RGB24) { png_set_strip_alpha (png_ptr); src_format = DSPF_RGB24; } break; } switch (src_format) { case DSPF_LUT8: if (info_ptr->num_palette) { png_byte *alpha; int i, num; *palette_size = MIN (info_ptr->num_palette, 256); for (i = 0; i < *palette_size; i++) { palette[i].a = 0xFF; palette[i].r = info_ptr->palette[i].red; palette[i].g = info_ptr->palette[i].green; palette[i].b = info_ptr->palette[i].blue; } if (png_get_valid (png_ptr, info_ptr, PNG_INFO_tRNS)) { png_get_tRNS (png_ptr, info_ptr, &alpha, &num, NULL); for (i = 0; i < MIN (num, *palette_size); i++) palette[i].a = alpha[i]; } } break; case DSPF_RGB32: png_set_filler (png_ptr, 0xFF, #ifdef WORDS_BIGENDIAN PNG_FILLER_BEFORE #else PNG_FILLER_AFTER #endif ); break; case DSPF_ARGB: case DSPF_A8: if (png_get_valid (png_ptr, info_ptr, PNG_INFO_tRNS)) png_set_tRNS_to_alpha (png_ptr); break; default: break; } pitch = width * DFB_BYTES_PER_PIXEL (src_format); if (pitch & 3) pitch += 4 - (pitch & 3); data = malloc (height * pitch); if (!data) { fprintf (stderr, "Failed to allocate %ld bytes.\n", height * pitch); goto cleanup; } { unsigned int i; png_bytep bptrs[height]; for (i = 0; i < height; i++) bptrs[i] = data + i * pitch; png_read_image (png_ptr, bptrs); } if (!dest_format) dest_format = src_format; if (DFB_BYTES_PER_PIXEL(src_format) != DFB_BYTES_PER_PIXEL(dest_format)) { unsigned char *s, *d, *dest; int d_pitch, h; assert (DFB_BYTES_PER_PIXEL (src_format) == 4); d_pitch = width * DFB_BYTES_PER_PIXEL (dest_format); if (d_pitch & 3) d_pitch += 4 - (d_pitch & 3); dest = malloc (height * d_pitch); if (!dest) { fprintf (stderr, "Failed to allocate %ld bytes.\n", height * d_pitch); goto cleanup; } h = height; switch (dest_format) { case DSPF_RGB16: for (s = data, d = dest; h; h--, s += pitch, d += d_pitch) argb_to_rgb16 ((__u32 *) s, (__u16 *) d, width); break; case DSPF_ARGB1555: for (s = data, d = dest; h; h--, s += pitch, d += d_pitch) argb_to_argb1555 ((__u32 *) s, (__u16 *) d, width); break; case DSPF_RGB332: for (s = data, d = dest; h; h--, s += pitch, d += d_pitch) argb_to_rgb332 ((__u32 *) s, (__u8 *) d, width); break; case DSPF_A8: for (s = data, d = dest; h; h--, s += pitch, d += d_pitch) argb_to_a8 ((__u32 *) s, (__u8 *) d, width); break; default: fprintf (stderr, "Sorry, unsupported format conversion.\n"); goto cleanup; } free (data); data = dest; pitch = d_pitch; } desc->flags = (DSDESC_WIDTH | DSDESC_HEIGHT | DSDESC_PIXELFORMAT | DSDESC_PREALLOCATED); desc->width = width; desc->height = height; desc->pixelformat = dest_format; desc->preallocated[0].pitch = pitch; desc->preallocated[0].data = data; data = NULL; cleanup: if (fp) fclose (fp); if (png_ptr) png_destroy_read_struct (&png_ptr, &info_ptr, NULL); if (data) free (data); return ((desc->flags) ? DFB_OK : DFB_FAILURE); } static DFBResult merge_images (DFBSurfaceDescription *images, int num_images, DFBSurfaceDescription *dest, DFBRectangle *rectangles) { DFBSurfaceDescription *image = images; DFBRectangle *rect = rectangles; unsigned char *data; int bpp; int pitch, i; rect->x = 0; rect->y = 0; rect->w = image->width; rect->h = image->height; dest->flags = (DSDESC_WIDTH | DSDESC_HEIGHT | DSDESC_PIXELFORMAT | DSDESC_PREALLOCATED); dest->pixelformat = image->pixelformat; bpp = DFB_BYTES_PER_PIXEL (dest->pixelformat); if (bpp == 1) dest->width = (rect->w + 3) & ~3; else dest->width = rect->w; dest->height = rect->h; for (i = 1; i < num_images; i++) { image++; rect++; if (image->pixelformat != dest->pixelformat) return DFB_INVARG; rect->x = dest->width; rect->y = 0; rect->w = image->width; rect->h = image->height; if (bpp == 1) dest->width += (rect->w + 3) & ~3; else dest->width += rect->w; if (dest->height < rect->h) dest->height = rect->h; } pitch = (dest->width * bpp + 3) &~ 3; data = malloc (dest->height * pitch); if (!data) { fprintf (stderr, "Failed to allocate %ld bytes.\n", (long) dest->height * pitch); return DFB_FAILURE; } for (i = 0, image = images, rect = rectangles; i < num_images; i++, image++, rect++) { unsigned char *dest = data + rect->x * bpp; unsigned char *src = image->preallocated[0].data; int height = rect->h; do { memcpy (dest, src, rect->w * bpp); src += image->preallocated[0].pitch; dest += pitch; } while (--height); } dest->preallocated[0].pitch = pitch; dest->preallocated[0].data = data; return DFB_OK; } static DFBResult dump_image (const char *name, DFBSurfaceDescription *desc, DFBColor *palette, int palette_size) { int pos = 3; bool pad = false; const char *format = NULL; char *vname = variable_name (name); unsigned char *data; unsigned long len; int i; if (desc->flags != (DSDESC_WIDTH | DSDESC_HEIGHT | DSDESC_PIXELFORMAT | DSDESC_PREALLOCATED)) return DFB_INVARG; for (i = 0; i < n_pixelformats && !format; i++) if (pixelformats[i].format == desc->pixelformat) format = pixelformats[i].name; if (!format) return DFB_INVARG; data = (unsigned char *) desc->preallocated[0].data; len = desc->height * desc->preallocated[0].pitch; if (!len) return DFB_INVARG; /* dump data */ printf ("$%s_data =\n", vname); printf (" \""); do { unsigned char d = *data++; if (pos > 70) { printf ("\".\n \""); pos = 3; pad = false; } switch (d) { case 0 ... 32: case 127 ... 255: printf ("\\%o", d); pos += 1 + 1 + (d > 7) + (d > 63); pad = d < 64; continue; case '\\': case '"' : case '$' : putchar ('\\'); putchar (d); pos += 2; break; case '0' ... '9': if (pad) { printf ("\".\"%c", d); pos += 4; break; } default: putchar (d); pos++; break; } pad = false; } while (--len); printf ("\";\n\n"); /* dump palette */ if (palette_size > 0) { printf ("$%s_palette = array(\n", vname); for (i = 0; i < palette_size; i++) printf (" new DFBColor( 0x%02x, 0x%02x, 0x%02x, 0x%02x )%c\n", palette[i].a, palette[i].r, palette[i].g, palette[i].b, i+1 < palette_size ? ',' : ' '); printf (");\n\n"); } /* dump description */ printf ("$%s_desc = new DFBSurfaceDescription(\n", vname); printf (" DSDESC_WIDTH | DSDESC_HEIGHT | DSDESC_PIXELFORMAT |\n" " DSDESC_PREALLOCATED" ); if (palette_size > 0) printf (" | DSDESC_PALETTE"); printf (",\n"); printf (" 0,\n"); printf (" %d,\n", desc->width); printf (" %d,\n", desc->height); printf (" DSPF_%s,\n", format); printf (" $%s_data,\n", vname); printf (" %d,\n", desc->preallocated[0].pitch); if (palette_size > 0) printf (" $%s_palette\n", vname); else printf (" NULL\n" ); printf (");\n\n"); free (vname); return DFB_OK; } static DFBResult dump_rectangles (const char *name, DFBRectangle *rectangles, const char **names, int num_rects) { DFBRectangle *rect; char *vname = variable_name (name); int i; if (num_rects < 1) return DFB_INVARG; printf ("$%s = array(\n", vname ); for (i = 0, rect = rectangles; i < num_rects; i++, rect++) { char *v = base_name (names[i]); if (i) printf (",\n"); printf (" array( 'name' => \"%s\",\n" " 'rect' => new DFBRectangle( %4d, %4d, %4d, %4d ) )", v, rect->x, rect->y, rect->w, rect->h); free (v); } printf ("\n);\n\n"); free (vname); return DFB_OK; } static char * variable_name (const char *name) { char *vname = strdup (name); char *v = vname; while (DFB_TRUE) { switch (*v) { case 0: return vname; case 'a'...'z': case 'A'...'Z': case '0'...'9': case '_': break; default: *v = '_'; } v++; } } static char * base_name (const char *name) { char *vname = strdup (name); char *v = vname; while (DFB_TRUE) { switch (*v) { case '.': *v = 0; case 0: return vname; default: break; } v++; } } |
From: Claudio C. <kl...@us...> - 2004-11-15 15:13:26
|
Update of /cvsroot/php-directfb/PHP-DirectFB In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14887 Modified Files: Makefile.am configure.ac Log Message: Added directfb-phpsource. Index: configure.ac =================================================================== RCS file: /cvsroot/php-directfb/PHP-DirectFB/configure.ac,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** configure.ac 10 Nov 2004 12:14:16 -0000 1.1.1.1 --- configure.ac 15 Nov 2004 15:13:16 -0000 1.2 *************** *** 55,58 **** --- 55,59 ---- AC_DEFINE( PHP_DEBUG, 1, [Define to 1 to enable PHP debugging support.] ) AC_DEFINE( DFB_DEBUG, 1, [Define to 1 to enable DirectFB debugging support.] ) + AC_DEFINE( PHP_DIRECTFB_DEBUG, 1, [Define to 1 to enable PHP-DirectFB debugging support.] ) CFLAGS="$CFLAGS -g3 -fno-inline" else *************** *** 71,75 **** AC_PATH_PROG( PHP_CONFIG, $PHP_CONFIG, no ) if test "x$PHP_CONFIG" = "xno"; then ! AC_MSG_ERROR( [* Cannot find php-config. Use --with-php-config=PATH] ) fi --- 72,76 ---- AC_PATH_PROG( PHP_CONFIG, $PHP_CONFIG, no ) if test "x$PHP_CONFIG" = "xno"; then ! AC_MSG_ERROR( [*** Cannot find php-config. Use --with-php-config=PATH] ) fi *************** *** 94,98 **** *) AC_MSG_RESULT( [not found] ) ! AC_MSG_ERROR( [* PHP version 5.0.0 or newer is required. See http://php.net] ) ;; esac --- 95,100 ---- *) AC_MSG_RESULT( [not found] ) ! AC_MSG_ERROR( ! [*** PHP version 5.0.0 or newer is required. See http://php.net] ) ;; esac *************** *** 114,118 **** if ! pkg-config --atleast-pkgconfig-version 0.9 ; then ! AC_MSG_ERROR( [* pkg-config too old; version 0.9 or newer is required. See http://pkgconfig.sf.net] ) fi --- 116,121 ---- if ! pkg-config --atleast-pkgconfig-version 0.9 ; then ! AC_MSG_ERROR( ! [*** pkg-config too old; version 0.9 or newer is required. See http://pkgconfig.sf.net] ) fi *************** *** 130,134 **** else AC_MSG_RESULT( [not found] ) ! AC_MSG_ERROR( [* DirectFB version $DIRECTFB_REQUIRED_VERSION or newer is required. See http://directfb.org] ) fi --- 133,138 ---- else AC_MSG_RESULT( [not found] ) ! AC_MSG_ERROR( ! [*** DirectFB version $DIRECTFB_REQUIRED_VERSION or newer is required. See http://directfb.org] ) fi *************** *** 137,140 **** --- 141,170 ---- + # + # Check Tools + # + AC_ARG_WITH( tools, + [ --without-tools do not build any tools], + BUILD_TOOLS=$withvalm, BUILD_TOOLS=yes ) + if test "x$BUILD_TOOLS" = "xyes"; then + # Check libpng (required by directfb-phpsource) + AC_CHECK_LIB( z, gzsetparams, ZLIB="-lz", ) + AC_CHECK_HEADER( png.h, have_png_h=yes, have_png_h=no ) + if test "x$have_png_h" = "xyes"; then + AC_CHECK_LIB( png, png_read_info, have_png=yes, have_png=no, $ZLIB -lm ) + if test "x$have_png" = "xno"; then + AC_MSG_WARN( + [*** PNG Library not found. directfb-phpsource will not be built.]) + fi + else + AC_MSG_WARN( + [*** PNG header not found. directfb-phpsource will not be built.]) + fi + fi + + AM_CONDITIONAL( BUILD_DIRECTFB_PHPSOURCE, test "x$have_png" = "xyes" ) + AC_SUBST( ZLIB ) + + ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS" *************** *** 143,146 **** --- 173,177 ---- Makefile src/Makefile + tools/Makefile ]) Index: Makefile.am =================================================================== RCS file: /cvsroot/php-directfb/PHP-DirectFB/Makefile.am,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** Makefile.am 10 Nov 2004 12:14:16 -0000 1.1.1.1 --- Makefile.am 15 Nov 2004 15:13:16 -0000 1.2 *************** *** 1 **** ! SUBDIRS = src --- 1 ---- ! SUBDIRS = src tools |
From: Claudio C. <kl...@us...> - 2004-11-15 15:10:41
|
Update of /cvsroot/php-directfb/PHP-DirectFB/tools In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14679/tools Log Message: Directory /cvsroot/php-directfb/PHP-DirectFB/tools added to the repository |
From: Claudio C. <kl...@us...> - 2004-11-15 15:09:31
|
Update of /cvsroot/php-directfb/PHP-DirectFB/examples In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14178 Modified Files: df_dok.php Added Files: image_lut.dsc Removed Files: palette.dsc Log Message: Fixed --blit-lut and --blit-lut-blend; now we use a preallocated surface generated by directfb-phpsource. Index: df_dok.php =================================================================== RCS file: /cvsroot/php-directfb/PHP-DirectFB/examples/df_dok.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** df_dok.php 13 Nov 2004 17:04:02 -0000 1.1 --- df_dok.php 15 Nov 2004 15:09:20 -0000 1.2 *************** *** 33,37 **** dl( "php_directfb.so" ); ! include( "./palette.dsc" ); /* the super interface */ --- 33,37 ---- dl( "php_directfb.so" ); ! include( "./image_lut.dsc" ); /* the super interface */ *************** *** 1128,1135 **** /* create a surface and render an image to it */ { ! $palette = $dfb->CreatePalette( $image_lut_palette_dsc ); ! if (!$palette) ! DirectFBErrorFatal( "IDirectFB::CreatePalette()" ); $dsc->flags = DSDESC_WIDTH | DSDESC_HEIGHT | DSDESC_PIXELFORMAT; $dsc->width = $SX; --- 1128,1139 ---- /* create a surface and render an image to it */ { ! $tmp = $dfb->CreateSurface( $image_lut_desc ); ! if (!$tmp) ! DirectFBErrorFatal( "IDirectFB::CreateSurface()" ); + $palette = $tmp->GetPalette(); + if (!$palette) + DirectFBErrorFatal( "IDirectFBSurface::GetPalette()" ); + $dsc->flags = DSDESC_WIDTH | DSDESC_HEIGHT | DSDESC_PIXELFORMAT; $dsc->width = $SX; *************** *** 1143,1150 **** $image_lut->SetPalette( $palette ); ! $image_lut->StretchBlit( $image32a ); $palette->Release(); ! unset( $image_lut_palette_dsc ); } --- 1147,1158 ---- $image_lut->SetPalette( $palette ); ! $image_lut->StretchBlit( $tmp ); $palette->Release(); ! $tmp->Release(); ! ! unset( $image_lut_desc ); ! unset( $image_lut_palette ); ! unset( $image_lut_data ); } --- palette.dsc DELETED --- --- NEW FILE: image_lut.dsc --- <?php /* PHP-DirectFB surface dump created by directfb-phpsource 0.0.0 */ $image_lut_data = "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0". "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0". "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0". "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0". "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0". "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0". "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0". "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0". "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0". "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0". "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0". "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0". "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0". "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0". "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0". [...1514 lines suppressed...] new DFBColor( 0x80, 0xca, 0xb9, 0xc2 ), new DFBColor( 0x80, 0x6a, 0x54, 0x47 ), new DFBColor( 0x80, 0x86, 0x7e, 0x78 ), new DFBColor( 0x80, 0xb7, 0xc4, 0xe2 ), new DFBColor( 0x80, 0xcc, 0xa2, 0x64 ) ); $image_lut_desc = new DFBSurfaceDescription( DSDESC_WIDTH | DSDESC_HEIGHT | DSDESC_PIXELFORMAT | DSDESC_PREALLOCATED | DSDESC_PALETTE, 0, 175, 200, DSPF_LUT8, $image_lut_data, 176, $image_lut_palette ); ?> |
From: Claudio C. <kl...@us...> - 2004-11-15 15:06:49
|
Update of /cvsroot/php-directfb/PHP-DirectFB/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13072 Modified Files: datatypes.c idatabuffer.c idirectfb.c idisplaylayer.c ieventbuffer.c ifont.c iimageprovider.c iinputdevice.c ipalette.c iscreen.c isurface.c ivideoprovider.c iwindow.c php_directfb.c php_directfb.h Log Message: Review of the interface handling routines: now private data is handled by a Resource and each interface can register a specific destructor for its own data. Added support for preallocated surfaces. Added some debugging macros for interface handling routines: PD_DEBUG, PD_MAGIC_SET, PD_MAGIC_CHECK Index: datatypes.c =================================================================== RCS file: /cvsroot/php-directfb/PHP-DirectFB/src/datatypes.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** datatypes.c 13 Nov 2004 16:17:54 -0000 1.2 --- datatypes.c 15 Nov 2004 15:06:18 -0000 1.3 *************** *** 30,33 **** --- 30,36 ---- #include "php_directfb.h" + #include <direct/types.h> + #include <direct/memcpy.h> + enum { *************** *** 55,59 **** if (zend_hash_find( ht, (char*) entry, size, (void**) &tmp ) != SUCCESS) { ! php_error( E_ERROR, "entry '%s' not found", entry ); return; } --- 58,62 ---- if (zend_hash_find( ht, (char*) entry, size, (void**) &tmp ) != SUCCESS) { ! php_error( E_ERROR, "property '%s' not found", entry ); return; } *************** *** 124,134 **** /*********************************** DFBPoint ********************************/ ! static void DFBPoint_ctor( int ht, zval *this ) { DFBPoint point; ! if (zend_parse_parameters( ht, "ll", &point.x, &point.y ) == SUCCESS) ! DFBPoint_init( &point, this ); } --- 127,140 ---- /*********************************** DFBPoint ********************************/ ! static bool DFBPoint_ctor( int ht, zval *this ) { DFBPoint point; ! if (zend_parse_parameters( ht, "ll", &point.x, &point.y ) != SUCCESS) ! return false; ! ! DFBPoint_init( &point, this ); ! return true; } *************** *** 154,158 **** /********************************** DFBRectangle *****************************/ ! static void DFBRectangle_ctor( int ht, zval *this ) { --- 160,164 ---- /********************************** DFBRectangle *****************************/ ! static bool DFBRectangle_ctor( int ht, zval *this ) { *************** *** 160,165 **** if (zend_parse_parameters( ht, "llll", ! &rect.x, &rect.y, &rect.w, &rect.h ) == SUCCESS) ! DFBRectangle_init( &rect, this ); } --- 166,174 ---- if (zend_parse_parameters( ht, "llll", ! &rect.x, &rect.y, &rect.w, &rect.h ) != SUCCESS) ! return false; ! ! DFBRectangle_init( &rect, this ); ! return true; } *************** *** 189,199 **** /********************************** DFBSpan **********************************/ ! static void DFBSpan_ctor( int ht, zval *this ) { DFBSpan span; ! if (zend_parse_parameters( ht, "ll", &span.x, &span.w ) == SUCCESS) ! DFBSpan_init( &span, this ); } --- 198,211 ---- /********************************** DFBSpan **********************************/ ! static bool DFBSpan_ctor( int ht, zval *this ) { DFBSpan span; ! if (zend_parse_parameters( ht, "ll", &span.x, &span.w ) != SUCCESS) ! return false; ! ! DFBSpan_init( &span, this ); ! return true; } *************** *** 219,223 **** /***************************** DFBRegion *************************************/ ! static void DFBRegion_ctor( int ht, zval *this ) { --- 231,235 ---- /***************************** DFBRegion *************************************/ ! static bool DFBRegion_ctor( int ht, zval *this ) { *************** *** 225,230 **** if (zend_parse_parameters( ht, "llll", ! ®.x1, ®.y1, ®.x2, ®.y2 ) == SUCCESS) ! DFBRegion_init( ®, this ); } --- 237,245 ---- if (zend_parse_parameters( ht, "llll", ! ®.x1, ®.y1, ®.x2, ®.y2 ) != SUCCESS) ! return false; ! ! DFBRegion_init( ®, this ); ! return true; } *************** *** 254,258 **** /**************************** DFBVertex **************************************/ ! static void DFBVertex_ctor( int ht, zval *this ) { --- 269,273 ---- /**************************** DFBVertex **************************************/ ! static bool DFBVertex_ctor( int ht, zval *this ) { *************** *** 264,268 **** --- 279,286 ---- DFBVertex ve = { x, y, z, w, s, t }; DFBVertex_init( &ve, this ); + return true; } + + return false; } *************** *** 296,300 **** /****************************** DFBColor *************************************/ ! static void DFBColor_ctor( int ht, zval *this ) { --- 314,318 ---- /****************************** DFBColor *************************************/ ! static bool DFBColor_ctor( int ht, zval *this ) { *************** *** 304,308 **** --- 322,329 ---- DFBColor color = { a, r, g, b }; DFBColor_init( &color, this ); + return true; } + + return false; } *************** *** 375,379 **** /************************** DFBScreenMixerConfig *****************************/ ! static void DFBScreenMixerConfig_ctor( int ht, zval *this ) { --- 396,400 ---- /************************** DFBScreenMixerConfig *****************************/ ! static bool DFBScreenMixerConfig_ctor( int ht, zval *this ) { *************** *** 385,402 **** if (zend_parse_parameters( ht, "llllO!", &config.flags, &config.tree, &config.level, &config.layers, ! &bg, DFBScreenMixerConfig_ce ) == SUCCESS) { ! if (!bg) { ! MAKE_STD_ZVAL( bg ); ! object_init_ex( bg, DFBColor_ce ); ! DFBColor_init( &config.background, bg ); ! } else ! ZVAL_ADDREF( bg ); ! add_property_long( this, "flags", config.flags ); ! add_property_long( this, "tree", config.tree ); ! add_property_long( this, "level", config.level ); ! add_property_long( this, "layers", config.layers ); ! add_property_zval( this, "background", bg ); ! } } --- 406,425 ---- if (zend_parse_parameters( ht, "llllO!", &config.flags, &config.tree, &config.level, &config.layers, ! &bg, DFBScreenMixerConfig_ce ) != SUCCESS) ! return false; ! ! if (!bg) { ! MAKE_STD_ZVAL( bg ); ! object_init_ex( bg, DFBColor_ce ); ! DFBColor_init( &config.background, bg ); ! } else ! ZVAL_ADDREF( bg ); ! add_property_long( this, "flags", config.flags ); ! add_property_long( this, "tree", config.tree ); ! add_property_long( this, "level", config.level ); ! add_property_long( this, "layers", config.layers ); ! add_property_zval( this, "background", bg ); ! return true; } *************** *** 458,462 **** /*************************** DFBScreenEncoderConfig **************************/ ! static void DFBScreenEncoderConfig_ctor( int ht, zval *this ) { --- 481,485 ---- /*************************** DFBScreenEncoderConfig **************************/ ! static bool DFBScreenEncoderConfig_ctor( int ht, zval *this ) { *************** *** 464,469 **** if (zend_parse_parameters( ht, "llll", &config.flags, &config.tv_standard, ! &config.test_picture, &config.mixer ) == SUCCESS) ! DFBScreenEncoderConfig_init( &config, this ); } --- 487,495 ---- if (zend_parse_parameters( ht, "llll", &config.flags, &config.tv_standard, ! &config.test_picture, &config.mixer ) != SUCCESS) ! return false; ! ! DFBScreenEncoderConfig_init( &config, this ); ! return true; } *************** *** 512,516 **** /************************** DFBScreenOutputConfig ****************************/ ! static void DFBScreenOutputConfig_ctor( int ht, zval *this ) { --- 538,542 ---- /************************** DFBScreenOutputConfig ****************************/ ! static bool DFBScreenOutputConfig_ctor( int ht, zval *this ) { *************** *** 518,523 **** if (zend_parse_parameters( ht, "llll", &config.flags, &config.encoder, ! &config.out_signals, &config.out_connectors ) == SUCCESS) ! DFBScreenOutputConfig_init( &config, this ); } --- 544,552 ---- if (zend_parse_parameters( ht, "llll", &config.flags, &config.encoder, ! &config.out_signals, &config.out_connectors ) != SUCCESS) ! return false; ! ! DFBScreenOutputConfig_init( &config, this ); ! return true; } *************** *** 568,572 **** /*********************** DFBDisplayLayerConfig *******************************/ ! static void DFBDisplayLayerConfig_ctor( int ht, zval *this ) { --- 597,601 ---- /*********************** DFBDisplayLayerConfig *******************************/ ! static bool DFBDisplayLayerConfig_ctor( int ht, zval *this ) { *************** *** 575,580 **** if (zend_parse_parameters( ht, "llllll", &config.flags, &config.width, &config.height, &config.pixelformat, ! &config.buffermode, &config.options ) == SUCCESS) ! DFBDisplayLayerConfig_init( &config, this ); } --- 604,612 ---- if (zend_parse_parameters( ht, "llllll", &config.flags, &config.width, &config.height, &config.pixelformat, ! &config.buffermode, &config.options ) != SUCCESS) ! return false; ! ! DFBDisplayLayerConfig_init( &config, this ); ! return true; } *************** *** 617,621 **** /************************ DFBColorAdjustment *********************************/ ! static void DFBColorAdjustment_ctor( int ht, zval *this ) { --- 649,653 ---- /************************ DFBColorAdjustment *********************************/ ! static bool DFBColorAdjustment_ctor( int ht, zval *this ) { *************** *** 627,631 **** --- 659,666 ---- DFBColorAdjustment adj = { flags, b, c, h, s }; DFBColorAdjustment_init( &adj, this ); + return true; } + + return false; } *************** *** 665,705 **** /**************************** DFBSurfaceDescription **************************/ ! static void DFBSurfaceDescription_ctor( int ht, zval *this ) { DFBSurfaceDescription dsc; zval *palette = NULL; ! if (zend_parse_parameters( ht, "llllla!", &dsc.flags, ! &dsc.caps, &dsc.width, &dsc.height, ! &dsc.pixelformat, &palette ) == SUCCESS) { ! if (palette) { ! zval **entry; ! int i = 0; ! while (zend_hash_index_find( Z_ARRVAL_P( palette ), ! i++, (void**) &entry ) == SUCCESS) { ! if (Z_TYPE_PP( entry ) != IS_OBJECT || ! Z_OBJCE_PP( entry ) != DFBColor_ce) { ! palette = NULL; ! break; ! } } } ! if (!palette) { ! MAKE_STD_ZVAL( palette ); ! array_init( palette ); ! } else ! ZVAL_ADDREF( palette ); ! add_property_long( this, "flags", dsc.flags ); ! add_property_long( this, "caps", dsc.caps ); ! add_property_long( this, "width", dsc.width ); ! add_property_long( this, "height", dsc.height ); ! add_property_long( this, "pixelformat", dsc.pixelformat ); ! /* no preallocated */ ! add_property_zval( this, "palette", palette ); ! } } --- 700,750 ---- /**************************** DFBSurfaceDescription **************************/ ! static bool DFBSurfaceDescription_ctor( int ht, zval *this ) { DFBSurfaceDescription dsc; + char *buffer = NULL; + int size = 0; + int pitch = 0; zval *palette = NULL; ! if (zend_parse_parameters( ht, "llllls!la!", &dsc.flags, &dsc.caps, ! &dsc.width, &dsc.height, &dsc.pixelformat, ! &buffer, &size, &pitch, &palette ) != SUCCESS) ! return false; ! ! if (palette) { ! zval **entry; ! int i = 0; ! while (zend_hash_index_find( Z_ARRVAL_P( palette ), ! i++, (void**) &entry ) == SUCCESS) { ! if (Z_TYPE_PP( entry ) != IS_OBJECT || ! Z_OBJCE_PP( entry ) != DFBColor_ce) { ! palette = NULL; ! break; } } + } ! if (!palette) { ! MAKE_STD_ZVAL( palette ); ! array_init( palette ); ! } else ! ZVAL_ADDREF( palette ); ! add_property_long( this, "flags", dsc.flags ); ! add_property_long( this, "caps", dsc.caps ); ! add_property_long( this, "width", dsc.width ); ! add_property_long( this, "height", dsc.height ); ! add_property_long( this, "pixelformat", dsc.pixelformat ); ! if (buffer && size > 0 && pitch > 0) ! add_property_stringl( this, "preallocated", buffer, size, 1 ); ! else ! add_property_unset( this, "preallocated" ); ! add_property_long( this, "preallocated_pitch", pitch ); ! add_property_zval( this, "palette", palette ); ! ! return true; } *************** *** 728,734 **** add_property_long( ret, "height", dsc->height ); add_property_long( ret, "pixelformat", dsc->pixelformat ); - /* no preallocated */ - add_property_zval( ret, "palette", palette ); } --- 773,792 ---- add_property_long( ret, "height", dsc->height ); add_property_long( ret, "pixelformat", dsc->pixelformat ); + if ((dsc->flags & DSDESC_PREALLOCATED) && dsc->preallocated[0].data && + dsc->preallocated[0].pitch > 0 && dsc->height > 0 && dsc->pixelformat) { + int size = dsc->preallocated[0].pitch * dsc->height; + + if (dsc->pixelformat == DSPF_YV12 || + dsc->pixelformat == DSPF_I420) + size += (size >> 1) & ~1; + + add_property_stringl( ret, "preallocated", + dsc->preallocated[0].data, size, 1 ); + } else + add_property_unset( ret, "preallocated" ); + + add_property_long( ret, "preallocated_pitch", dsc->preallocated[0].pitch ); + add_property_zval( ret, "palette", palette ); } *************** *** 752,759 **** GET_ENTRY_LONG( pixelformat, &ret->pixelformat ); if (ret->flags & DSDESC_PALETTE) { DFBColor *palette = NULL; ! zval *pal; ! zval **entry; int i = 0; --- 810,835 ---- GET_ENTRY_LONG( pixelformat, &ret->pixelformat ); + if (ret->flags & DSDESC_PREALLOCATED) { + zval *data = NULL; + + GET_ENTRY_DATA( preallocated, &data ); + GET_ENTRY_LONG( preallocated_pitch, &ret->preallocated[0].pitch ); + + if (data && Z_STRLEN_P( data ) > 0 && ret->preallocated[0].pitch > 0) { + ret->preallocated[0].data = emalloc( Z_STRLEN_P( data ) ); + direct_memcpy( ret->preallocated[0].data, + Z_STRVAL_P( data ), Z_STRLEN_P( data ) ); + ret->preallocated[1] = ret->preallocated[0]; + } else { + php_error( E_WARNING, + "wrong or unset DFBSurfaceDescription::$preallocated" ); + ret->flags &= ~DSDESC_PREALLOCATED; + } + } + if (ret->flags & DSDESC_PALETTE) { DFBColor *palette = NULL; ! zval *pal = NULL; ! zval **entry = NULL; int i = 0; *************** *** 772,777 **** ret->palette.entries = palette; ret->palette.size = i; ! } else ! ret->flags &= ~DSDESC_PALETTE; } } --- 848,856 ---- ret->palette.entries = palette; ret->palette.size = i; ! } else { ! php_error( E_WARNING, ! "wrong or unset DFBSurfaceDescription::$palette" ); ! ret->flags &= ~DSDESC_PALETTE; ! } } } *************** *** 782,786 **** /************************* DFBPaletteDescription *****************************/ ! static void DFBPaletteDescription_ctor( int ht, zval *this ) { --- 861,865 ---- /************************* DFBPaletteDescription *****************************/ ! static bool DFBPaletteDescription_ctor( int ht, zval *this ) { *************** *** 789,818 **** if (zend_parse_parameters( ht, "llla!", &dsc.flags, &dsc.caps, ! &dsc.size, &entries ) == SUCCESS) { ! if (entries) { ! zval **entry; ! int i = 0; ! while (zend_hash_index_find( Z_ARRVAL_P( entries ), ! i++, (void**) &entry ) == SUCCESS) { ! if (Z_TYPE_PP( entry ) != IS_OBJECT || ! Z_OBJCE_PP( entry ) != DFBColor_ce) { ! entries = NULL; ! break; ! } } } ! if (!entries) { ! MAKE_STD_ZVAL( entries ); ! array_init( entries ); ! } else ! ZVAL_ADDREF( entries ); ! add_property_long( this, "flags", dsc.flags ); ! add_property_long( this, "caps", dsc.caps ); ! add_property_long( this, "size", dsc.size ); ! add_property_zval( this, "entries", entries ); ! } } --- 868,900 ---- if (zend_parse_parameters( ht, "llla!", &dsc.flags, &dsc.caps, ! &dsc.size, &entries ) != SUCCESS) ! return false; ! ! if (entries) { ! zval **entry; ! int i = 0; ! while (zend_hash_index_find( Z_ARRVAL_P( entries ), ! i++, (void**) &entry ) == SUCCESS) { ! if (Z_TYPE_PP( entry ) != IS_OBJECT || ! Z_OBJCE_PP( entry ) != DFBColor_ce) { ! entries = NULL; ! break; } } + } ! if (!entries) { ! MAKE_STD_ZVAL( entries ); ! array_init( entries ); ! } else ! ZVAL_ADDREF( entries ); ! add_property_long( this, "flags", dsc.flags ); ! add_property_long( this, "caps", dsc.caps ); ! add_property_long( this, "size", dsc.size ); ! add_property_zval( this, "entries", entries ); ! ! return true; } *************** *** 857,862 **** if (ret->flags & DPDESC_ENTRIES) { DFBColor *entries = NULL; ! zval *array; ! zval **entry; int i = 0; --- 939,944 ---- if (ret->flags & DPDESC_ENTRIES) { DFBColor *entries = NULL; ! zval *array = NULL; ! zval **entry = NULL; int i = 0; *************** *** 876,882 **** if (!ret->size || ret->size > i) ret->size = i; ! } else ! ret->flags &= ~DPDESC_ENTRIES; ! } } --- 958,966 ---- if (!ret->size || ret->size > i) ret->size = i; ! } else { ! php_error( E_WARNING, ! "wrong or unset DFBPaletteDescription::$entries" ); ! ret->flags &= ~DPDESC_ENTRIES; ! } } } *************** *** 887,891 **** /************************** DFBWindowDescription *****************************/ ! static void DFBWindowDescription_ctor( int ht, zval *this ) { --- 971,975 ---- /************************** DFBWindowDescription *****************************/ ! static bool DFBWindowDescription_ctor( int ht, zval *this ) { *************** *** 894,899 **** if (zend_parse_parameters( ht, "llllllll", &dsc.flags, &dsc.caps, &dsc.width, &dsc.height, &dsc.pixelformat, ! &dsc.posx, &dsc.posy, &dsc.surface_caps ) == SUCCESS) ! DFBWindowDescription_init( &dsc, this ); } --- 978,986 ---- if (zend_parse_parameters( ht, "llllllll", &dsc.flags, &dsc.caps, &dsc.width, &dsc.height, &dsc.pixelformat, ! &dsc.posx, &dsc.posy, &dsc.surface_caps ) != SUCCESS) ! return false; ! ! DFBWindowDescription_init( &dsc, this ); ! return true; } *************** *** 945,949 **** /********************** DFBFontDescription ***********************************/ ! static void DFBFontDescription_ctor( int ht, zval *this ) { --- 1032,1036 ---- /********************** DFBFontDescription ***********************************/ ! static bool DFBFontDescription_ctor( int ht, zval *this ) { *************** *** 952,957 **** if (zend_parse_parameters( ht, "llllll", &dsc.flags, &dsc.attributes, &dsc.height, &dsc.width, ! &dsc.index, &dsc.fixed_advance ) == SUCCESS) ! DFBFontDescription_init( &dsc, this ); } --- 1039,1047 ---- if (zend_parse_parameters( ht, "llllll", &dsc.flags, &dsc.attributes, &dsc.height, &dsc.width, ! &dsc.index, &dsc.fixed_advance ) != SUCCESS) ! return false; ! ! DFBFontDescription_init( &dsc, this ); ! return true; } *************** *** 1013,1017 **** /**************************** DFBInputEvent **********************************/ ! static void DFBInputEvent_ctor( int ht, zval *this ) { --- 1103,1107 ---- /**************************** DFBInputEvent **********************************/ ! static bool DFBInputEvent_ctor( int ht, zval *this ) { *************** *** 1022,1027 **** &evt.key_id, &evt.key_symbol, &evt.modifiers, &evt.locks, &evt.button, &evt.buttons, &evt.axis, ! &evt.axisabs, &evt.axisrel ) == SUCCESS) ! DFBInputEvent_init( &evt, this ); } --- 1112,1120 ---- &evt.key_id, &evt.key_symbol, &evt.modifiers, &evt.locks, &evt.button, &evt.buttons, &evt.axis, ! &evt.axisabs, &evt.axisrel ) != SUCCESS) ! return false; ! ! DFBInputEvent_init( &evt, this ); ! return true; } *************** *** 1089,1093 **** /******************************** DFBWindowEvent *****************************/ ! static void DFBWindowEvent_ctor( int ht, zval *this ) { --- 1182,1186 ---- /******************************** DFBWindowEvent *****************************/ ! static bool DFBWindowEvent_ctor( int ht, zval *this ) { *************** *** 1099,1104 **** &evt.h, &evt.key_code, &evt.key_id, &evt.key_symbol, &evt.modifiers, &evt.locks, ! &evt.button, &evt.buttons ) == SUCCESS) ! DFBWindowEvent_init( &evt, this ); } --- 1192,1200 ---- &evt.h, &evt.key_code, &evt.key_id, &evt.key_symbol, &evt.modifiers, &evt.locks, ! &evt.button, &evt.buttons ) != SUCCESS) ! return false; ! ! DFBWindowEvent_init( &evt, this ); ! return true; } Index: isurface.c =================================================================== RCS file: /cvsroot/php-directfb/PHP-DirectFB/src/isurface.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** isurface.c 13 Nov 2004 10:57:13 -0000 1.3 --- isurface.c 15 Nov 2004 15:06:18 -0000 1.4 *************** *** 39,43 **** DFBSurfaceCapabilities caps = 0; ! DIRECTFB_THIS_GET_PRIVATE( surface ); dfb_errno = surface->GetCapabilities( surface, &caps ); --- 39,43 ---- DFBSurfaceCapabilities caps = 0; ! DIRECTFB_GET_THIS( surface ); dfb_errno = surface->GetCapabilities( surface, &caps ); *************** *** 53,57 **** int h = 0; ! DIRECTFB_THIS_GET_PRIVATE( surface ); dfb_errno = surface->GetSize( surface, &w, &h ); --- 53,57 ---- int h = 0; ! DIRECTFB_GET_THIS( surface ); dfb_errno = surface->GetSize( surface, &w, &h ); *************** *** 68,72 **** DFBRectangle rect = {0, 0, 0, 0}; ! DIRECTFB_THIS_GET_PRIVATE( surface ); dfb_errno = surface->GetVisibleRectangle( surface, &rect ); --- 68,72 ---- DFBRectangle rect = {0, 0, 0, 0}; ! DIRECTFB_GET_THIS( surface ); dfb_errno = surface->GetVisibleRectangle( surface, &rect ); *************** *** 83,87 **** DFBSurfacePixelFormat format = 0; ! DIRECTFB_THIS_GET_PRIVATE( surface ); dfb_errno = surface->GetPixelFormat( surface, &format ); --- 83,87 ---- DFBSurfacePixelFormat format = 0; ! DIRECTFB_GET_THIS( surface ); dfb_errno = surface->GetPixelFormat( surface, &format ); *************** *** 98,102 **** zval *obj = NULL; ! DIRECTFB_THIS_GET_PRIVATE( surface ); if (zend_parse_parameters( ZEND_NUM_ARGS() TSRMLS_CC, "|O!", --- 98,102 ---- zval *obj = NULL; ! DIRECTFB_GET_THIS( surface ); if (zend_parse_parameters( ZEND_NUM_ARGS() TSRMLS_CC, "|O!", *************** *** 105,109 **** if (obj) ! DIRECTFB_INTERFACE_GET_PRIVATE( obj, IDirectFBSurface, source ); dfb_errno = surface->GetAccelerationMask( surface, source, &mask ); --- 105,109 ---- if (obj) ! DIRECTFB_GET_INTERFACE( obj, IDirectFBSurface, source ); dfb_errno = surface->GetAccelerationMask( surface, source, &mask ); *************** *** 118,122 **** IDirectFBPalette *palette = NULL; ! DIRECTFB_THIS_GET_PRIVATE( surface ); dfb_errno = surface->GetPalette( surface, &palette ); --- 118,122 ---- IDirectFBPalette *palette = NULL; ! DIRECTFB_GET_THIS( surface ); dfb_errno = surface->GetPalette( surface, &palette ); *************** *** 124,128 **** RETURN_NULL(); ! DIRECTFB_RETURN_INTERFACE( IDirectFBPalette, palette ); } --- 124,128 ---- RETURN_NULL(); ! DIRECTFB_RETURN_INTERFACE( IDirectFBPalette, palette, NULL ); } *************** *** 134,138 **** zval *pal; ! DIRECTFB_THIS_GET_PRIVATE( surface ); if (zend_parse_parameters( ZEND_NUM_ARGS() TSRMLS_CC, "O", --- 134,138 ---- zval *pal; ! DIRECTFB_GET_THIS( surface ); if (zend_parse_parameters( ZEND_NUM_ARGS() TSRMLS_CC, "O", *************** *** 140,144 **** INVARG(); ! DIRECTFB_INTERFACE_GET_PRIVATE( pal, IDirectFBPalette, palette ); dfb_errno = surface->SetPalette( surface, palette ); --- 140,144 ---- INVARG(); ! DIRECTFB_GET_INTERFACE( pal, IDirectFBPalette, palette ); dfb_errno = surface->SetPalette( surface, palette ); *************** *** 155,159 **** zval *r = NULL; ! DIRECTFB_THIS_GET_PRIVATE( surface ); switch (ZEND_NUM_ARGS()) { --- 155,159 ---- zval *r = NULL; ! DIRECTFB_GET_THIS( surface ); switch (ZEND_NUM_ARGS()) { *************** *** 189,193 **** int field; ! DIRECTFB_THIS_GET_PRIVATE( surface ); if (zend_parse_parameters( ZEND_NUM_ARGS() TSRMLS_CC, --- 189,193 ---- int field; ! DIRECTFB_GET_THIS( surface ); if (zend_parse_parameters( ZEND_NUM_ARGS() TSRMLS_CC, *************** *** 204,208 **** int r, g, b, a; ! DIRECTFB_THIS_GET_PRIVATE( surface ); if (zend_parse_parameters( ZEND_NUM_ARGS() TSRMLS_CC, --- 204,208 ---- int r, g, b, a; ! DIRECTFB_GET_THIS( surface ); if (zend_parse_parameters( ZEND_NUM_ARGS() TSRMLS_CC, *************** *** 220,224 **** zval *r = NULL; ! DIRECTFB_THIS_GET_PRIVATE( surface ); if (zend_parse_parameters( ZEND_NUM_ARGS() TSRMLS_CC, --- 220,224 ---- zval *r = NULL; ! DIRECTFB_GET_THIS( surface ); if (zend_parse_parameters( ZEND_NUM_ARGS() TSRMLS_CC, *************** *** 241,245 **** int r, g, b, a; ! DIRECTFB_THIS_GET_PRIVATE( surface ); if (zend_parse_parameters( ZEND_NUM_ARGS() TSRMLS_CC, --- 241,245 ---- int r, g, b, a; ! DIRECTFB_GET_THIS( surface ); if (zend_parse_parameters( ZEND_NUM_ARGS() TSRMLS_CC, *************** *** 256,260 **** int index; ! DIRECTFB_THIS_GET_PRIVATE( surface ); if (zend_parse_parameters( ZEND_NUM_ARGS() TSRMLS_CC, --- 256,260 ---- int index; ! DIRECTFB_GET_THIS( surface ); if (zend_parse_parameters( ZEND_NUM_ARGS() TSRMLS_CC, *************** *** 271,275 **** DFBSurfaceBlendFunction func; ! DIRECTFB_THIS_GET_PRIVATE( surface ); if (zend_parse_parameters( ZEND_NUM_ARGS() TSRMLS_CC, --- 271,275 ---- DFBSurfaceBlendFunction func; ! DIRECTFB_GET_THIS( surface ); if (zend_parse_parameters( ZEND_NUM_ARGS() TSRMLS_CC, *************** *** 286,290 **** DFBSurfaceBlendFunction func; ! DIRECTFB_THIS_GET_PRIVATE( surface ); if (zend_parse_parameters( ZEND_NUM_ARGS() TSRMLS_CC, --- 286,290 ---- DFBSurfaceBlendFunction func; ! DIRECTFB_GET_THIS( surface ); if (zend_parse_parameters( ZEND_NUM_ARGS() TSRMLS_CC, *************** *** 301,305 **** DFBSurfacePorterDuffRule rule; ! DIRECTFB_THIS_GET_PRIVATE( surface ); if (zend_parse_parameters( ZEND_NUM_ARGS() TSRMLS_CC, --- 301,305 ---- DFBSurfacePorterDuffRule rule; ! DIRECTFB_GET_THIS( surface ); if (zend_parse_parameters( ZEND_NUM_ARGS() TSRMLS_CC, *************** *** 316,320 **** int r, g, b; ! DIRECTFB_THIS_GET_PRIVATE( surface ); if (zend_parse_parameters( ZEND_NUM_ARGS() TSRMLS_CC, --- 316,320 ---- int r, g, b; ! DIRECTFB_GET_THIS( surface ); if (zend_parse_parameters( ZEND_NUM_ARGS() TSRMLS_CC, *************** *** 331,335 **** int index; ! DIRECTFB_THIS_GET_PRIVATE( surface ); if (zend_parse_parameters( ZEND_NUM_ARGS() TSRMLS_CC, --- 331,335 ---- int index; ! DIRECTFB_GET_THIS( surface ); if (zend_parse_parameters( ZEND_NUM_ARGS() TSRMLS_CC, *************** *** 346,350 **** int r, g, b; ! DIRECTFB_THIS_GET_PRIVATE( surface ); if (zend_parse_parameters( ZEND_NUM_ARGS() TSRMLS_CC, --- 346,350 ---- int r, g, b; ! DIRECTFB_GET_THIS( surface ); if (zend_parse_parameters( ZEND_NUM_ARGS() TSRMLS_CC, *************** *** 361,365 **** int index; ! DIRECTFB_THIS_GET_PRIVATE( surface ); if (zend_parse_parameters( ZEND_NUM_ARGS() TSRMLS_CC, --- 361,365 ---- int index; ! DIRECTFB_GET_THIS( surface ); if (zend_parse_parameters( ZEND_NUM_ARGS() TSRMLS_CC, *************** *** 376,380 **** DFBSurfaceBlittingFlags flags; ! DIRECTFB_THIS_GET_PRIVATE( surface ); if (zend_parse_parameters( ZEND_NUM_ARGS() TSRMLS_CC, --- 376,380 ---- DFBSurfaceBlittingFlags flags; ! DIRECTFB_GET_THIS( surface ); if (zend_parse_parameters( ZEND_NUM_ARGS() TSRMLS_CC, *************** *** 396,400 **** zval *rect = NULL; ! DIRECTFB_THIS_GET_PRIVATE( surface ); switch (ZEND_NUM_ARGS()) { --- 396,400 ---- zval *rect = NULL; ! DIRECTFB_GET_THIS( surface ); switch (ZEND_NUM_ARGS()) { *************** *** 423,427 **** } ! DIRECTFB_INTERFACE_GET_PRIVATE( src, IDirectFBSurface, source ); if (rect) { --- 423,427 ---- } ! DIRECTFB_GET_INTERFACE( src, IDirectFBSurface, source ); if (rect) { *************** *** 443,447 **** zval *rect = NULL; ! DIRECTFB_THIS_GET_PRIVATE( surface ); switch (ZEND_NUM_ARGS()) { --- 443,447 ---- zval *rect = NULL; ! DIRECTFB_GET_THIS( surface ); switch (ZEND_NUM_ARGS()) { *************** *** 470,474 **** } ! DIRECTFB_INTERFACE_GET_PRIVATE( src, IDirectFBSurface, source ); if (rect) { --- 470,474 ---- } ! DIRECTFB_GET_INTERFACE( src, IDirectFBSurface, source ); if (rect) { *************** *** 490,494 **** zval *dr = NULL; ! DIRECTFB_THIS_GET_PRIVATE( surface ); surface->GetSize( surface, &dst_rect.w, &dst_rect.h ); --- 490,494 ---- zval *dr = NULL; ! DIRECTFB_GET_THIS( surface ); surface->GetSize( surface, &dst_rect.w, &dst_rect.h ); *************** *** 499,503 **** INVARG(); ! DIRECTFB_INTERFACE_GET_PRIVATE( src, IDirectFBSurface, source ); source->GetSize( source, &src_rect.w, &src_rect.h ); if (sr) --- 499,503 ---- INVARG(); ! DIRECTFB_GET_INTERFACE( src, IDirectFBSurface, source ); source->GetSize( source, &src_rect.w, &src_rect.h ); if (sr) *************** *** 522,526 **** zval *in = NULL; ! DIRECTFB_THIS_GET_PRIVATE( surface ); switch (ZEND_NUM_ARGS()) { --- 522,526 ---- zval *in = NULL; ! DIRECTFB_GET_THIS( surface ); switch (ZEND_NUM_ARGS()) { *************** *** 548,552 **** } ! DIRECTFB_INTERFACE_GET_PRIVATE( src, IDirectFBSurface, source ); if (num) { --- 548,552 ---- } ! DIRECTFB_GET_INTERFACE( src, IDirectFBSurface, source ); if (num) { *************** *** 619,623 **** DFBSurfaceDrawingFlags flags; ! DIRECTFB_THIS_GET_PRIVATE( surface ); if (zend_parse_parameters( ZEND_NUM_ARGS() TSRMLS_CC, --- 619,623 ---- DFBSurfaceDrawingFlags flags; ! DIRECTFB_GET_THIS( surface ); if (zend_parse_parameters( ZEND_NUM_ARGS() TSRMLS_CC, *************** *** 634,638 **** int x, y, w, h; ! DIRECTFB_THIS_GET_PRIVATE( surface ); if (zend_parse_parameters( ZEND_NUM_ARGS() TSRMLS_CC, --- 634,638 ---- int x, y, w, h; ! DIRECTFB_GET_THIS( surface ); if (zend_parse_parameters( ZEND_NUM_ARGS() TSRMLS_CC, *************** *** 649,653 **** int x, y, w, h; ! DIRECTFB_THIS_GET_PRIVATE( surface ); if (zend_parse_parameters( ZEND_NUM_ARGS() TSRMLS_CC, --- 649,653 ---- int x, y, w, h; ! DIRECTFB_GET_THIS( surface ); if (zend_parse_parameters( ZEND_NUM_ARGS() TSRMLS_CC, *************** *** 667,671 **** zval *sp; ! DIRECTFB_THIS_GET_PRIVATE( surface ); if (zend_parse_parameters( ZEND_NUM_ARGS() TSRMLS_CC, --- 667,671 ---- zval *sp; ! DIRECTFB_GET_THIS( surface ); if (zend_parse_parameters( ZEND_NUM_ARGS() TSRMLS_CC, *************** *** 718,722 **** int x1, y1, x2, y2; ! DIRECTFB_THIS_GET_PRIVATE( surface ); if (zend_parse_parameters( ZEND_NUM_ARGS() TSRMLS_CC, --- 718,722 ---- int x1, y1, x2, y2; ! DIRECTFB_GET_THIS( surface ); if (zend_parse_parameters( ZEND_NUM_ARGS() TSRMLS_CC, *************** *** 735,739 **** zval *li; ! DIRECTFB_THIS_GET_PRIVATE( surface ); if (zend_parse_parameters( ZEND_NUM_ARGS() TSRMLS_CC, --- 735,739 ---- zval *li; ! DIRECTFB_GET_THIS( surface ); if (zend_parse_parameters( ZEND_NUM_ARGS() TSRMLS_CC, *************** *** 788,792 **** int x3, y3; ! DIRECTFB_THIS_GET_PRIVATE( surface ); if (zend_parse_parameters( ZEND_NUM_ARGS() TSRMLS_CC, "llllll", --- 788,792 ---- int x3, y3; ! DIRECTFB_GET_THIS( surface ); if (zend_parse_parameters( ZEND_NUM_ARGS() TSRMLS_CC, "llllll", *************** *** 804,808 **** zval *obj; ! DIRECTFB_THIS_GET_PRIVATE( surface ); if (zend_parse_parameters( ZEND_NUM_ARGS() TSRMLS_CC, "O", --- 804,808 ---- zval *obj; ! DIRECTFB_GET_THIS( surface ); if (zend_parse_parameters( ZEND_NUM_ARGS() TSRMLS_CC, "O", *************** *** 810,814 **** INVARG(); ! DIRECTFB_INTERFACE_GET_PRIVATE( obj, IDirectFBFont, font ); dfb_errno = surface->SetFont( surface, font ); --- 810,814 ---- INVARG(); ! DIRECTFB_GET_INTERFACE( obj, IDirectFBFont, font ); dfb_errno = surface->SetFont( surface, font ); *************** *** 821,825 **** IDirectFBFont *font = NULL; ! DIRECTFB_THIS_GET_PRIVATE( surface ); dfb_errno = surface->GetFont( surface, &font ); --- 821,825 ---- IDirectFBFont *font = NULL; ! DIRECTFB_GET_THIS( surface ); dfb_errno = surface->GetFont( surface, &font ); *************** *** 827,831 **** RETURN_NULL(); ! DIRECTFB_RETURN_INTERFACE( IDirectFBFont, font ); } --- 827,831 ---- RETURN_NULL(); ! DIRECTFB_RETURN_INTERFACE( IDirectFBFont, font, NULL ); } *************** *** 841,845 **** int len; ! DIRECTFB_THIS_GET_PRIVATE( surface ); switch (ZEND_NUM_ARGS()) { --- 841,845 ---- int len; ! DIRECTFB_GET_THIS( surface ); switch (ZEND_NUM_ARGS()) { *************** *** 870,874 **** DFBSurfaceTextFlags flags; ! DIRECTFB_THIS_GET_PRIVATE( surface ); if (zend_parse_parameters( ZEND_NUM_ARGS() TSRMLS_CC, "llll", --- 870,874 ---- DFBSurfaceTextFlags flags; ! DIRECTFB_GET_THIS( surface ); if (zend_parse_parameters( ZEND_NUM_ARGS() TSRMLS_CC, "llll", *************** *** 887,891 **** zval *r = NULL; ! DIRECTFB_THIS_GET_PRIVATE( surface ); if (zend_parse_parameters( ZEND_NUM_ARGS() TSRMLS_CC, "|O!", --- 887,891 ---- zval *r = NULL; ! DIRECTFB_GET_THIS( surface ); if (zend_parse_parameters( ZEND_NUM_ARGS() TSRMLS_CC, "|O!", *************** *** 902,906 **** RETURN_NULL(); ! DIRECTFB_RETURN_INTERFACE( IDirectFBSurface, sub_surface ); } --- 902,906 ---- RETURN_NULL(); ! DIRECTFB_RETURN_INTERFACE( IDirectFBSurface, sub_surface, NULL ); } *************** *** 913,917 **** int len; ! DIRECTFB_THIS_GET_PRIVATE( surface ); if (zend_parse_parameters( ZEND_NUM_ARGS() TSRMLS_CC, "s|s!", --- 913,917 ---- int len; ! DIRECTFB_GET_THIS( surface ); if (zend_parse_parameters( ZEND_NUM_ARGS() TSRMLS_CC, "s|s!", *************** *** 927,930 **** --- 927,945 ---- } + INTERFACE_DESTRUCTOR() + { + IDirectFBSurface *surface = (IDirectFBSurface*) wrp->interface; + + if (directfb_refs) { + PD_DEBUG( "releasing interface IDirectFBSurface (%p).\n", surface ); + dfb_errno = surface->Release( surface ); + wrp->interface = NULL; + } + + /* preallocated */ + if (wrp->pdata) + efree( wrp->pdata ); + } + /****************************** Interface Data ********************************/ Index: idisplaylayer.c =================================================================== RCS file: /cvsroot/php-directfb/PHP-DirectFB/src/idisplaylayer.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** idisplaylayer.c 10 Nov 2004 12:14:30 -0000 1.1.1.1 --- idisplaylayer.c 15 Nov 2004 15:06:18 -0000 1.2 *************** *** 39,43 **** DFBDisplayLayerID id = 0; ! DIRECTFB_THIS_GET_PRIVATE( layer ); dfb_errno = layer->GetID( layer, &id ); --- 39,43 ---- DFBDisplayLayerID id = 0; ! DIRECTFB_GET_THIS( layer ); dfb_errno = layer->GetID( layer, &id ); *************** *** 52,56 **** DFBDisplayLayerDescription dsc; ! DIRECTFB_THIS_GET_PRIVATE( layer ); memset( &dsc, 0, sizeof(DFBDisplayLayerDescription) ); --- 52,56 ---- DFBDisplayLayerDescription dsc; ! DIRECTFB_GET_THIS( layer ); memset( &dsc, 0, sizeof(DFBDisplayLayerDescription) ); *************** *** 81,85 **** IDirectFBSurface *surface = NULL; ! DIRECTFB_THIS_GET_PRIVATE( layer ); dfb_errno = layer->GetSurface( layer, &surface ); --- 81,85 ---- IDirectFBSurface *surface = NULL; ! DIRECTFB_GET_THIS( layer ); dfb_errno = layer->GetSurface( layer, &surface ); *************** *** 87,91 **** RETURN_NULL(); ! DIRECTFB_RETURN_INTERFACE( IDirectFBSurface, surface ); } --- 87,91 ---- RETURN_NULL(); ! DIRECTFB_RETURN_INTERFACE( IDirectFBSurface, surface, NULL ); } *************** *** 96,100 **** IDirectFBScreen *screen = NULL; ! DIRECTFB_THIS_GET_PRIVATE( layer ); dfb_errno = layer->GetScreen( layer, &screen ); --- 96,100 ---- IDirectFBScreen *screen = NULL; ! DIRECTFB_GET_THIS( layer ); dfb_errno = layer->GetScreen( layer, &screen ); *************** *** 102,106 **** RETURN_NULL(); ! DIRECTFB_RETURN_INTERFACE( IDirectFBScreen, screen ); } --- 102,106 ---- RETURN_NULL(); ! DIRECTFB_RETURN_INTERFACE( IDirectFBScreen, screen, NULL ); } *************** *** 111,115 **** DFBDisplayLayerCooperativeLevel level; ! DIRECTFB_THIS_GET_PRIVATE( layer ); if (zend_parse_parameters( ZEND_NUM_ARGS() TSRMLS_CC, --- 111,115 ---- DFBDisplayLayerCooperativeLevel level; ! DIRECTFB_GET_THIS( layer ); if (zend_parse_parameters( ZEND_NUM_ARGS() TSRMLS_CC, *************** *** 128,132 **** int a; ! DIRECTFB_THIS_GET_PRIVATE( layer ); if (zend_parse_parameters( ZEND_NUM_ARGS() TSRMLS_CC, "l", &a ) != SUCCESS) --- 128,132 ---- int a; ! DIRECTFB_GET_THIS( layer ); if (zend_parse_parameters( ZEND_NUM_ARGS() TSRMLS_CC, "l", &a ) != SUCCESS) *************** *** 145,149 **** int w, h; ! DIRECTFB_THIS_GET_PRIVATE( layer ); if (zend_parse_parameters( ZEND_NUM_ARGS() TSRMLS_CC, --- 145,149 ---- int w, h; ! DIRECTFB_GET_THIS( layer ); if (zend_parse_parameters( ZEND_NUM_ARGS() TSRMLS_CC, *************** *** 163,167 **** double w, h; ! DIRECTFB_THIS_GET_PRIVATE( layer ); if (zend_parse_parameters( ZEND_NUM_ARGS() TSRMLS_CC, --- 163,167 ---- double w, h; ! DIRECTFB_GET_THIS( layer ); if (zend_parse_parameters( ZEND_NUM_ARGS() TSRMLS_CC, *************** *** 180,184 **** int r, g, b; ! DIRECTFB_THIS_GET_PRIVATE( layer ); if (zend_parse_parameters( ZEND_NUM_ARGS() TSRMLS_CC, --- 180,184 ---- int r, g, b; ! DIRECTFB_GET_THIS( layer ); if (zend_parse_parameters( ZEND_NUM_ARGS() TSRMLS_CC, *************** *** 195,199 **** int r, g, b; ! DIRECTFB_THIS_GET_PRIVATE( layer ); if (zend_parse_parameters( ZEND_NUM_ARGS() TSRMLS_CC, --- 195,199 ---- int r, g, b; ! DIRECTFB_GET_THIS( layer ); if (zend_parse_parameters( ZEND_NUM_ARGS() TSRMLS_CC, *************** *** 212,216 **** int level = 0; ! DIRECTFB_THIS_GET_PRIVATE( layer ); dfb_errno = layer->GetLevel( layer, &level ); --- 212,216 ---- int level = 0; ! DIRECTFB_GET_THIS( layer ); dfb_errno = layer->GetLevel( layer, &level ); *************** *** 225,229 **** int level; ! DIRECTFB_THIS_GET_PRIVATE( layer ); if (zend_parse_parameters( ZEND_NUM_ARGS() TSRMLS_CC, --- 225,229 ---- int level; ! DIRECTFB_GET_THIS( layer ); if (zend_parse_parameters( ZEND_NUM_ARGS() TSRMLS_CC, *************** *** 242,246 **** int field = 0; ! DIRECTFB_THIS_GET_PRIVATE( layer ); dfb_errno = layer->GetCurrentOutputField( layer, &field ); --- 242,246 ---- int field = 0; ! DIRECTFB_GET_THIS( layer ); dfb_errno = layer->GetCurrentOutputField( layer, &field ); *************** *** 255,259 **** int field; ! DIRECTFB_THIS_GET_PRIVATE( layer ); if (zend_parse_parameters( ZEND_NUM_ARGS() TSRMLS_CC, --- 255,259 ---- int field; ! DIRECTFB_GET_THIS( layer ); if (zend_parse_parameters( ZEND_NUM_ARGS() TSRMLS_CC, *************** *** 272,276 **** DFBDisplayLayerConfig config = { .flags = 0 }; ! DIRECTFB_THIS_GET_PRIVATE( layer ); dfb_errno = layer->GetConfiguration( layer, &config ); --- 272,276 ---- DFBDisplayLayerConfig config = { .flags = 0 }; ! DIRECTFB_GET_THIS( layer ); dfb_errno = layer->GetConfiguration( layer, &config ); *************** *** 287,291 **** zval *cfg; ! DIRECTFB_THIS_GET_PRIVATE( layer ); if (zend_parse_parameters( ZEND_NUM_ARGS() TSRMLS_CC, "O", --- 287,291 ---- zval *cfg; ! DIRECTFB_GET_THIS( layer ); if (zend_parse_parameters( ZEND_NUM_ARGS() TSRMLS_CC, "O", *************** *** 307,311 **** zval *cfg; ! DIRECTFB_THIS_GET_PRIVATE( layer ); if (zend_parse_parameters( ZEND_NUM_ARGS() TSRMLS_CC, "O", --- 307,311 ---- zval *cfg; ! DIRECTFB_GET_THIS( layer ); if (zend_parse_parameters( ZEND_NUM_ARGS() TSRMLS_CC, "O", *************** *** 326,330 **** DFBDisplayLayerBackgroundMode mode; ! DIRECTFB_THIS_GET_PRIVATE( layer ); if (zend_parse_parameters( ZEND_NUM_ARGS() TSRMLS_CC, --- 326,330 ---- DFBDisplayLayerBackgroundMode mode; ! DIRECTFB_GET_THIS( layer ); if (zend_parse_parameters( ZEND_NUM_ARGS() TSRMLS_CC, *************** *** 344,348 **** zval *image; ! DIRECTFB_THIS_GET_PRIVATE( layer ); if (zend_parse_parameters( ZEND_NUM_ARGS() TSRMLS_CC, "O", --- 344,348 ---- zval *image; ! DIRECTFB_GET_THIS( layer ); if (zend_parse_parameters( ZEND_NUM_ARGS() TSRMLS_CC, "O", *************** *** 350,354 **** INVARG(); ! DIRECTFB_INTERFACE_GET_PRIVATE( image, IDirectFBSurface, surface ); dfb_errno = layer->SetBackgroundImage( layer, surface ); --- 350,354 ---- INVARG(); ! DIRECTFB_GET_INTERFACE( image, IDirectFBSurface, surface ); dfb_errno = layer->SetBackgroundImage( layer, surface ); *************** *** 363,367 **** int a, r, g, b; ! DIRECTFB_THIS_GET_PRIVATE( layer ); if (zend_parse_parameters( ZEND_NUM_ARGS() TSRMLS_CC, --- 363,367 ---- int a, r, g, b; ! DIRECTFB_GET_THIS( layer ); if (zend_parse_parameters( ZEND_NUM_ARGS() TSRMLS_CC, *************** *** 380,384 **** DFBColorAdjustment adj = {0, 0, 0, 0, 0}; ! DIRECTFB_THIS_GET_PRIVATE( layer ); dfb_errno = layer->GetColorAdjustment( layer, &adj ); --- 380,384 ---- DFBColorAdjustment adj = {0, 0, 0, 0, 0}; ! DIRECTFB_GET_THIS( layer ); dfb_errno = layer->GetColorAdjustment( layer, &adj ); *************** *** 394,398 **** zval *adj; ! DIRECTFB_THIS_GET_PRIVATE( layer ); if (zend_parse_parameters( ZEND_NUM_ARGS() TSRMLS_CC, "O", --- 394,398 ---- zval *adj; ! DIRECTFB_GET_THIS( layer ); if (zend_parse_parameters( ZEND_NUM_ARGS() TSRMLS_CC, "O", *************** *** 413,417 **** zval *dsc; ! DIRECTFB_THIS_GET_PRIVATE( layer ); if (zend_parse_parameters( ZEND_NUM_ARGS() TSRMLS_CC, "O", --- 413,417 ---- zval *dsc; ! DIRECTFB_GET_THIS( layer ); if (zend_parse_parameters( ZEND_NUM_ARGS() TSRMLS_CC, "O", *************** *** 425,429 **** RETURN_NULL(); ! DIRECTFB_RETURN_INTERFACE( IDirectFBWindow, window ); } --- 425,429 ---- RETURN_NULL(); ! DIRECTFB_RETURN_INTERFACE( IDirectFBWindow, window, NULL ); } *************** *** 435,439 **** IDirectFBWindow *window = NULL; ! DIRECTFB_THIS_GET_PRIVATE( layer ); if (zend_parse_parameters( ZEND_NUM_ARGS() TSRMLS_CC, "l", &id ) != SUCCESS) --- 435,439 ---- IDirectFBWindow *window = NULL; ! DIRECTFB_GET_THIS( layer ); if (zend_parse_parameters( ZEND_NUM_ARGS() TSRMLS_CC, "l", &id ) != SUCCESS) *************** *** 444,448 **** RETURN_NULL(); ! DIRECTFB_RETURN_INTERFACE( IDirectFBWindow, window ); } --- 444,448 ---- RETURN_NULL(); ! DIRECTFB_RETURN_INTERFACE( IDirectFBWindow, window, NULL ); } *************** *** 453,457 **** int enable; ! DIRECTFB_THIS_GET_PRIVATE( layer ); if (zend_parse_parameters( ZEND_NUM_ARGS() TSRMLS_CC, --- 453,457 ---- int enable; ! DIRECTFB_GET_THIS( layer ); if (zend_parse_parameters( ZEND_NUM_ARGS() TSRMLS_CC, *************** *** 469,473 **** int y = 0; ! DIRECTFB_THIS_GET_PRIVATE( layer ); dfb_errno = layer->GetCursorPosition( layer, &x, &y ); --- 469,473 ---- int y = 0; ! DIRECTFB_GET_THIS( layer ); dfb_errno = layer->GetCursorPosition( layer, &x, &y ); *************** *** 484,488 **** int x, y; ! DIRECTFB_THIS_GET_PRIVATE( layer ); if (zend_parse_parameters( ZEND_NUM_ARGS() TSRMLS_CC, --- 484,488 ---- int x, y; ! DIRECTFB_GET_THIS( layer ); if (zend_parse_parameters( ZEND_NUM_ARGS() TSRMLS_CC, *************** *** 499,503 **** int n, d, t; ! DIRECTFB_THIS_GET_PRIVATE( layer ); if (zend_parse_parameters( ZEND_NUM_ARGS() TSRMLS_CC, --- 499,503 ---- int n, d, t; ! DIRECTFB_GET_THIS( layer ); if (zend_parse_parameters( ZEND_NUM_ARGS() TSRMLS_CC, *************** *** 517,521 **** int hot_y = 0; ! DIRECTFB_THIS_GET_PRIVATE( layer ); if (zend_parse_parameters( ZEND_NUM_ARGS() TSRMLS_CC, "O|ll", &shape, --- 517,521 ---- int hot_y = 0; ! DIRECTFB_GET_THIS( layer ); if (zend_parse_parameters( ZEND_NUM_ARGS() TSRMLS_CC, "O|ll", &shape, *************** *** 523,527 **** INVARG(); ! DIRECTFB_INTERFACE_GET_PRIVATE( shape, IDirectFBSurface, surface ); dfb_errno = layer->SetCursorShape( layer, surface, hot_x, hot_y ); --- 523,527 ---- INVARG(); ! DIRECTFB_GET_INTERFACE( shape, IDirectFBSurface, surface ); dfb_errno = layer->SetCursorShape( layer, surface, hot_x, hot_y ); *************** *** 534,538 **** int a; ! DIRECTFB_THIS_GET_PRIVATE( layer ); if (zend_parse_parameters( ZEND_NUM_ARGS() TSRMLS_CC, "l", &a ) != SUCCESS) --- 534,538 ---- int a; ! DIRECTFB_GET_THIS( layer ); if (zend_parse_parameters( ZEND_NUM_ARGS() TSRMLS_CC, "l", &a ) != SUCCESS) *************** *** 547,555 **** IDirectFBDisplayLayer *layer; ! DIRECTFB_THIS_GET_PRIVATE( layer ); dfb_errno = layer->WaitForSync( layer ); } /****************************** Interface Data ********************************/ --- 547,557 ---- IDirectFBDisplayLayer *layer; ! DIRECTFB_GET_THIS( layer ); dfb_errno = layer->WaitForSync( layer ); } + STANDARD_INTERFACE_DESTRUCTOR() + /****************************** Interface Data ********************************/ Index: iinputdevice.c =================================================================== RCS file: /cvsroot/php-directfb/PHP-DirectFB/src/iinputdevice.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** iinputdevice.c 10 Nov 2004 12:14:30 -0000 1.1.1.1 --- iinputdevice.c 15 Nov 2004 15:06:18 -0000 1.2 *************** *** 39,43 **** DFBInputDeviceID id = 0; ! DIRECTFB_THIS_GET_PRIVATE( device ); dfb_errno = device->GetID( device, &id ); --- 39,43 ---- DFBInputDeviceID id = 0; ! DIRECTFB_GET_THIS( device ); dfb_errno = device->GetID( device, &id ); *************** *** 52,56 **** DFBInputDeviceDescription dsc; ! DIRECTFB_THIS_GET_PRIVATE( device ); memset( &dsc, 0, sizeof(DFBInputDeviceDescription) ); --- 52,56 ---- DFBInputDeviceDescription dsc; ! DIRECTFB_GET_THIS( device ); memset( &dsc, 0, sizeof(DFBInputDeviceDescription) ); *************** *** 93,97 **** int i; ! DIRECTFB_THIS_GET_PRIVATE( device ); if (zend_parse_parameters( ZEND_NUM_ARGS() TSRMLS_CC, --- 93,97 ---- int i; ! DIRECTFB_GET_THIS( device ); if (zend_parse_parameters( ZEND_NUM_ARGS() TSRMLS_CC, *************** *** 122,126 **** IDirectFBEventBuffer *buffer = NULL; ! DIRECTFB_THIS_GET_PRIVATE( device ); dfb_errno = device->CreateEventBuffer( device, &buffer ); --- 122,126 ---- IDirectFBEventBuffer *buffer = NULL; ! DIRECTFB_GET_THIS( device ); dfb_errno = device->CreateEventBuffer( device, &buffer ); *************** *** 128,132 **** RETURN_NULL(); ! DIRECTFB_RETURN_INTERFACE( IDirectFBEventBuffer, buffer ); } --- 128,132 ---- RETURN_NULL(); ! DIRECTFB_RETURN_INTERFACE( IDirectFBEventBuffer, buffer, NULL ); } *************** *** 138,142 **** zval *buf; ! DIRECTFB_THIS_GET_PRIVATE( device ); if (zend_parse_parameters( ZEND_NUM_ARGS() TSRMLS_CC, "O", --- 138,142 ---- zval *buf; ! DIRECTFB_GET_THIS( device ); if (zend_parse_parameters( ZEND_NUM_ARGS() TSRMLS_CC, "O", *************** *** 144,148 **** INVARG(); ! DIRECTFB_INTERFACE_GET_PRIVATE( buf, IDirectFBEventBuffer, buffer ); dfb_errno = device->AttachEventBuffer( device, buffer ); --- 144,148 ---- INVARG(); ! DIRECTFB_GET_INTERFACE( buf, IDirectFBEventBuffer, buffer ); dfb_errno = device->AttachEventBuffer( device, buffer ); *************** *** 158,162 **** DFBInputDeviceKeyState state = 0; ! DIRECTFB_THIS_GET_PRIVATE( device ); if (zend_parse_parameters( ZEND_NUM_ARGS() TSRMLS_CC, --- 158,162 ---- DFBInputDeviceKeyState state = 0; ! DIRECTFB_GET_THIS( device ); if (zend_parse_parameters( ZEND_NUM_ARGS() TSRMLS_CC, *************** *** 175,179 **** DFBInputDeviceModifierMask mask = 0; ! DIRECTFB_THIS_GET_PRIVATE( device ); dfb_errno = device->GetModifiers( device, &mask ); --- 175,179 ---- DFBInputDeviceModifierMask mask = 0; ! DIRECTFB_GET_THIS( device ); dfb_errno = device->GetModifiers( device, &mask ); *************** *** 188,192 **** DFBInputDeviceLockState lock = 0; ! DIRECTFB_THIS_GET_PRIVATE( device ); dfb_errno = device->GetLockState( device, &lock ); --- 188,192 ---- DFBInputDeviceLockState lock = 0; ! DIRECTFB_GET_THIS( device ); dfb_errno = device->GetLockState( device, &lock ); *************** *** 201,205 **** DFBInputDeviceButtonMask buttons = 0; ! DIRECTFB_THIS_GET_PRIVATE( device ); dfb_errno = device->GetButtons( device, &buttons ); --- 201,205 ---- DFBInputDeviceButtonMask buttons = 0; ! DIRECTFB_GET_THIS( device ); dfb_errno = device->GetButtons( device, &buttons ); *************** *** 215,219 **** DFBInputDeviceButtonState state = 0; ! DIRECTFB_THIS_GET_PRIVATE( device ); if (zend_parse_parameters( ZEND_NUM_ARGS() TSRMLS_CC, --- 215,219 ---- DFBInputDeviceButtonState state = 0; ! DIRECTFB_GET_THIS( device ); if (zend_parse_parameters( ZEND_NUM_ARGS() TSRMLS_CC, *************** *** 233,237 **** int pos = 0; ! DIRECTFB_THIS_GET_PRIVATE( device ); if (zend_parse_parameters( ZEND_NUM_ARGS() TSRMLS_CC, --- 233,237 ---- int pos = 0; ! DIRECTFB_GET_THIS( device ); if (zend_parse_parameters( ZEND_NUM_ARGS() TSRMLS_CC, *************** *** 251,255 **** int y = 0; ! DIRECTFB_THIS_GET_PRIVATE( device ); dfb_errno = device->GetXY( device, &x, &y ); --- 251,255 ---- int y = 0; ! DIRECTFB_GET_THIS( device ); dfb_errno = device->GetXY( device, &x, &y ); *************** *** 260,263 **** --- 260,265 ---- } + STANDARD_INTERFACE_DESTRUCTOR() + /****************************** Interface Data ********************************/ Index: iimageprovider.c =================================================================== RCS file: /cvsroot/php-directfb/PHP-DirectFB/src/iimageprovider.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** iimageprovider.c 10 Nov 2004 12:14:25 -0000 1.1.1.1 --- iimageprovider.c 15 Nov 2004 15:06:18 -0000 1.2 *************** *** 39,43 **** DFBSurfaceDescription dsc = { .flags = 0 }; ! ... [truncated message content] |
From: Claudio C. <kl...@us...> - 2004-11-15 15:01:34
|
Update of /cvsroot/php-directfb/PHP-DirectFB/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12895 Modified Files: Makefile.am Log Message: Removed flag -I./, not needed. Index: Makefile.am =================================================================== RCS file: /cvsroot/php-directfb/PHP-DirectFB/src/Makefile.am,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** Makefile.am 10 Nov 2004 12:14:25 -0000 1.1.1.1 --- Makefile.am 15 Nov 2004 15:01:25 -0000 1.2 *************** *** 1,5 **** libdir = $(PHP_EXTENSION_DIR) ! INCLUDES = -I./ $(PHP_INCLUDES) $(DFB_CFLAGS) AM_CPPFLAGS = -DCOMPILE_DL=1 --- 1,5 ---- libdir = $(PHP_EXTENSION_DIR) ! INCLUDES = $(PHP_INCLUDES) $(DFB_CFLAGS) AM_CPPFLAGS = -DCOMPILE_DL=1 |
From: Claudio C. <kl...@us...> - 2004-11-13 17:04:14
|
Update of /cvsroot/php-directfb/PHP-DirectFB/examples/data In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11493/data Added Files: biglogo.png card.png colorkeyed.gif intro.png melted.png meter.png pngtest.png pngtest2.png Log Message: Ported df_dok. --- NEW FILE: intro.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: meter.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: colorkeyed.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: melted.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: pngtest2.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: biglogo.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: pngtest.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: card.png --- (This appears to be a binary file; contents omitted.) |
From: Claudio C. <kl...@us...> - 2004-11-13 17:04:14
|
Update of /cvsroot/php-directfb/PHP-DirectFB/examples In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11493 Added Files: df_dok.php palette.dsc Log Message: Ported df_dok. --- NEW FILE: df_dok.php --- <?php /* (c) Copyright 2000-2002 convergence integrated media GmbH. (c) Copyright 2002 convergence GmbH. All rights reserved. Written by Denis Oliver Kropp <do...@di...>, Andreas Hundt <an...@fi...> and Sven Neumann <ne...@di...>. This file is subject to the terms and conditions of the MIT License: Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: [...1180 lines suppressed...] printf( "%-44s %3ld.%.3ld secs (%s%4ld.%.3ld %s)\n", $demo->desc, $dt / 1000, $dt % 1000, $demo->accelerated ? "*" : " ", $demo->result / 1000, $demo->result % 1000, $demo->unit); if ($do_offscreen) { $primary->SetBlittingFlags( DSBLIT_NOFX ); $primary->Blit( $dest, $clip ); sleep(2); $dest->Clear( 0, 0, 0, 0x80 ); } } if ($show_results) showResult(); printf( "\n" ); shutdown(); --- NEW FILE: palette.dsc --- <?php $image_lut_palette_dsc = new DFBPaletteDescription ( DPDESC_CAPS | DPDESC_SIZE | DPDESC_ENTRIES, 0, 256, array( new DFBColor( 0x00, 0x00, 0x00, 0x00 ), new DFBColor( 0x80, 0x05, 0x03, 0x04 ), new DFBColor( 0x80, 0x36, 0x54, 0x47 ), new DFBColor( 0x80, 0x7d, 0x8f, 0x88 ), new DFBColor( 0x80, 0xa4, 0xb4, 0xa0 ), new DFBColor( 0x80, 0xbe, 0xd2, 0xc2 ), new DFBColor( 0x80, 0x1d, 0x41, 0x2c ), new DFBColor( 0x80, 0x0c, 0x30, 0x14 ), new DFBColor( 0x80, 0x55, 0x6b, 0x63 ), new DFBColor( 0x80, 0xde, 0xf5, 0xda ), new DFBColor( 0x80, 0x06, 0x1f, 0x06 ), new DFBColor( 0x80, 0xdc, 0xe8, 0xde ), new DFBColor( 0x80, 0x67, 0x78, 0x6f ), new DFBColor( 0x80, 0xbe, 0x8e, 0x69 ), new DFBColor( 0x80, 0xcb, 0xb6, 0xa2 ), new DFBColor( 0x80, 0x2b, 0x02, 0x03 ), new DFBColor( 0x80, 0xe7, 0xd0, 0xb4 ), new DFBColor( 0x80, 0x96, 0xa7, 0xab ), new DFBColor( 0x80, 0xa6, 0x7d, 0x50 ), new DFBColor( 0x80, 0x40, 0x1c, 0x09 ), new DFBColor( 0x80, 0x61, 0x43, 0x14 ), new DFBColor( 0x80, 0x0b, 0x13, 0x10 ), new DFBColor( 0x80, 0xe5, 0xdc, 0xc9 ), new DFBColor( 0x80, 0xcb, 0xc0, 0xaf ), new DFBColor( 0x80, 0x4f, 0x31, 0x18 ), new DFBColor( 0x80, 0x9c, 0x8e, 0x86 ), new DFBColor( 0x80, 0x7e, 0x8a, 0x91 ), new DFBColor( 0x80, 0x1d, 0x02, 0x02 ), new DFBColor( 0x80, 0x7b, 0x5e, 0x0a ), new DFBColor( 0x80, 0xec, 0xe7, 0xd2 ), new DFBColor( 0x80, 0xf4, 0xc7, 0x84 ), new DFBColor( 0x80, 0x85, 0x79, 0x6f ), new DFBColor( 0x80, 0x48, 0x3d, 0x20 ), new DFBColor( 0x80, 0x27, 0x1c, 0x06 ), new DFBColor( 0x80, 0x82, 0x6a, 0x02 ), new DFBColor( 0x80, 0x34, 0x2c, 0x11 ), new DFBColor( 0x80, 0xa0, 0x9c, 0x95 ), new DFBColor( 0x80, 0x53, 0x4e, 0x44 ), new DFBColor( 0x80, 0xfe, 0xde, 0x76 ), new DFBColor( 0x80, 0x93, 0xbc, 0xfa ), new DFBColor( 0x80, 0x60, 0x53, 0x34 ), new DFBColor( 0x80, 0xdc, 0xf3, 0xf2 ), new DFBColor( 0x80, 0x47, 0x45, 0x49 ), new DFBColor( 0x80, 0x0a, 0x04, 0x03 ), new DFBColor( 0x80, 0xfe, 0xe6, 0x82 ), new DFBColor( 0x80, 0xab, 0xd4, 0xfe ), new DFBColor( 0x80, 0x3c, 0x34, 0x35 ), new DFBColor( 0x80, 0xd5, 0xc0, 0xb4 ), new DFBColor( 0x80, 0xbd, 0x99, 0x8e ), new DFBColor( 0x80, 0x88, 0x7e, 0x6a ), new DFBColor( 0x80, 0xe1, 0xd0, 0xc9 ), new DFBColor( 0x80, 0xda, 0xfe, 0xea ), new DFBColor( 0x80, 0x27, 0x22, 0x24 ), new DFBColor( 0x80, 0x61, 0x5c, 0x4e ), new DFBColor( 0x80, 0xf7, 0xe6, 0xe3 ), new DFBColor( 0x80, 0x50, 0x4a, 0x37 ), new DFBColor( 0x80, 0xf0, 0xda, 0xd4 ), new DFBColor( 0x80, 0xbb, 0xc6, 0xc2 ), new DFBColor( 0x80, 0x0a, 0x0b, 0x06 ), new DFBColor( 0x80, 0x2e, 0x26, 0x12 ), new DFBColor( 0x80, 0xdc, 0xa7, 0x97 ), new DFBColor( 0x80, 0xbc, 0xb4, 0xa2 ), new DFBColor( 0x80, 0x2e, 0x06, 0x02 ), new DFBColor( 0x80, 0x8f, 0x6e, 0x5e ), new DFBColor( 0x80, 0xba, 0xa7, 0x96 ), new DFBColor( 0x80, 0xfa, 0xb2, 0x52 ), new DFBColor( 0x80, 0xd3, 0xe0, 0xd1 ), new DFBColor( 0x80, 0x3e, 0x2e, 0x0e ), new DFBColor( 0x80, 0x74, 0x69, 0x64 ), new DFBColor( 0x80, 0x47, 0x3d, 0x32 ), new DFBColor( 0x80, 0xf6, 0xd5, 0xcd ), new DFBColor( 0x80, 0x14, 0x13, 0x09 ), new DFBColor( 0x80, 0x8e, 0x9a, 0xb4 ), new DFBColor( 0x80, 0xa9, 0x9a, 0x92 ), new DFBColor( 0x80, 0xd7, 0xd0, 0xbc ), new DFBColor( 0x80, 0x9f, 0xaa, 0xc9 ), new DFBColor( 0x80, 0xd5, 0xc1, 0xc2 ), new DFBColor( 0x80, 0xe1, 0xdb, 0xd9 ), new DFBColor( 0x80, 0xb7, 0xba, 0xc8 ), new DFBColor( 0x80, 0x60, 0x3d, 0x33 ), new DFBColor( 0x80, 0xca, 0xc6, 0xcf ), new DFBColor( 0x80, 0xc7, 0x85, 0x75 ), new DFBColor( 0x80, 0x33, 0x1f, 0x0c ), new DFBColor( 0x80, 0x49, 0x10, 0x08 ), new DFBColor( 0x80, 0xec, 0xf4, 0xef ), new DFBColor( 0x80, 0xcd, 0xd1, 0xd1 ), new DFBColor( 0x80, 0x87, 0x4b, 0x3e ), new DFBColor( 0x80, 0xf7, 0xec, 0xe2 ), new DFBColor( 0x80, 0xf3, 0xe1, 0xe5 ), new DFBColor( 0x80, 0xe5, 0xd4, 0xd9 ), new DFBColor( 0x80, 0x92, 0x85, 0x7e ), new DFBColor( 0x80, 0x74, 0x70, 0x68 ), new DFBColor( 0x80, 0xe9, 0xc5, 0xaa ), new DFBColor( 0x80, 0x4a, 0x44, 0x35 ), new DFBColor( 0x80, 0xa4, 0xa8, 0xa3 ), new DFBColor( 0x80, 0x74, 0x77, 0x71 ), new DFBColor( 0x80, 0x27, 0x2f, 0x3e ), new DFBColor( 0x80, 0x3d, 0x2d, 0x1e ), new DFBColor( 0x80, 0x16, 0x1f, 0x31 ), new DFBColor( 0x80, 0x8a, 0x84, 0x85 ), new DFBColor( 0x80, 0xae, 0x93, 0x8c ), new DFBColor( 0x80, 0xdc, 0xb7, 0xab ), new DFBColor( 0x80, 0x37, 0x44, 0x54 ), new DFBColor( 0x80, 0x2a, 0x0c, 0x04 ), new DFBColor( 0x80, 0x6b, 0x67, 0x5f ), new DFBColor( 0x80, 0xd2, 0xfc, 0xfe ), new DFBColor( 0x80, 0xcc, 0xab, 0xa1 ), new DFBColor( 0x80, 0x60, 0x5d, 0x5c ), new DFBColor( 0x80, 0x5b, 0x20, 0x0c ), new DFBColor( 0x80, 0xcc, 0xca, 0xbc ), new DFBColor( 0x80, 0x7b, 0x83, 0x82 ), new DFBColor( 0x80, 0xfa, 0xed, 0xf5 ), new DFBColor( 0x80, 0xb9, 0xa6, 0xa4 ), new DFBColor( 0x80, 0x26, 0x1a, 0x12 ), new DFBColor( 0x80, 0x19, 0x15, 0x26 ), new DFBColor( 0x80, 0xd6, 0xda, 0xd4 ), new DFBColor( 0x80, 0x9b, 0x7c, 0x70 ), new DFBColor( 0x80, 0xbe, 0xbe, 0xb0 ), new DFBColor( 0x80, 0x1d, 0x06, 0x04 ), new DFBColor( 0x80, 0x11, 0x04, 0x03 ), new DFBColor( 0x80, 0xe4, 0xd6, 0xcb ), new DFBColor( 0x80, 0xc9, 0xb2, 0xb0 ), new DFBColor( 0x80, 0x79, 0x58, 0x31 ), new DFBColor( 0x80, 0xea, 0xea, 0xf4 ), new DFBColor( 0x80, 0x1d, 0x13, 0x06 ), new DFBColor( 0x80, 0x8f, 0x95, 0xa4 ), new DFBColor( 0x80, 0xba, 0xd2, 0xf1 ), new DFBColor( 0x80, 0x53, 0x33, 0x32 ), new DFBColor( 0x80, 0x3f, 0x34, 0x20 ), new DFBColor( 0x80, 0x83, 0x71, 0x69 ), new DFBColor( 0x80, 0xac, 0xa1, 0xa2 ), new DFBColor( 0x80, 0xfc, 0xe0, 0xd5 ), new DFBColor( 0x80, 0xfe, 0xfa, 0x96 ), new DFBColor( 0x80, 0xe6, 0xe2, 0xde ), new DFBColor( 0x80, 0x5e, 0x4b, 0x38 ), new DFBColor( 0x80, 0xd8, 0xc8, 0xc4 ), new DFBColor( 0x80, 0xaa, 0xaa, 0xb7 ), new DFBColor( 0x80, 0xb4, 0xb4, 0xb3 ), new DFBColor( 0x80, 0x95, 0x5f, 0x4c ), new DFBColor( 0x80, 0xfc, 0xf4, 0xe8 ), new DFBColor( 0x80, 0x9e, 0x95, 0x99 ), new DFBColor( 0x80, 0xf1, 0xe0, 0xcf ), new DFBColor( 0x80, 0x41, 0x22, 0x2c ), new DFBColor( 0x80, 0x8a, 0x83, 0x7a ), new DFBColor( 0x80, 0x39, 0x11, 0x05 ), new DFBColor( 0x80, 0x6b, 0x72, 0x6d ), new DFBColor( 0x80, 0x5d, 0x54, 0x49 ), new DFBColor( 0x80, 0xea, 0xfc, 0xfe ), new DFBColor( 0x80, 0x52, 0x59, 0x63 ), new DFBColor( 0x80, 0x3b, 0x3b, 0x20 ), new DFBColor( 0x80, 0x34, 0x2c, 0x20 ), new DFBColor( 0x80, 0x7b, 0x7b, 0x82 ), new DFBColor( 0x80, 0xe5, 0xc9, 0xc4 ), new DFBColor( 0x80, 0xb2, 0x86, 0x79 ), new DFBColor( 0x80, 0xfe, 0xf6, 0x9e ), new DFBColor( 0x80, 0xfe, 0xed, 0xe4 ), new DFBColor( 0x80, 0x93, 0x90, 0x87 ), new DFBColor( 0x80, 0xd8, 0xc7, 0xb6 ), new DFBColor( 0x80, 0xcb, 0xbf, 0xbc ), new DFBColor( 0x80, 0x2a, 0x2e, 0x27 ), new DFBColor( 0x80, 0x04, 0x0e, 0x0d ), new DFBColor( 0x80, 0x6b, 0x6b, 0x6d ), new DFBColor( 0x80, 0x12, 0x0b, 0x05 ), new DFBColor( 0x80, 0xbe, 0xb4, 0xb1 ), new DFBColor( 0x80, 0x17, 0x1f, 0x23 ), new DFBColor( 0x80, 0xa3, 0xbb, 0xe1 ), new DFBColor( 0x80, 0x77, 0x71, 0x75 ), new DFBColor( 0x80, 0x75, 0x49, 0x41 ), new DFBColor( 0x80, 0xfe, 0xd2, 0x9b ), new DFBColor( 0x80, 0x68, 0x60, 0x5b ), new DFBColor( 0x80, 0xa0, 0x9f, 0xb7 ), new DFBColor( 0x80, 0xfb, 0xf5, 0xfc ), new DFBColor( 0x80, 0xd4, 0xe9, 0xfd ), new DFBColor( 0x80, 0x9d, 0x94, 0x8c ), new DFBColor( 0x80, 0xa6, 0x9f, 0x96 ), new DFBColor( 0x80, 0x56, 0x46, 0x34 ), new DFBColor( 0x80, 0x2a, 0x14, 0x07 ), new DFBColor( 0x80, 0x5e, 0x4b, 0x4c ), new DFBColor( 0x80, 0xd7, 0xce, 0xcb ), new DFBColor( 0x80, 0x04, 0x04, 0x28 ), new DFBColor( 0x80, 0x7b, 0x71, 0x69 ), new DFBColor( 0x80, 0x53, 0x54, 0x49 ), new DFBColor( 0x80, 0xbb, 0xac, 0xa8 ), new DFBColor( 0x80, 0x93, 0x9b, 0x92 ), new DFBColor( 0x80, 0x98, 0x89, 0x81 ), new DFBColor( 0x80, 0x29, 0x20, 0x13 ), new DFBColor( 0x80, 0x78, 0x54, 0x4a ), new DFBColor( 0x80, 0x3b, 0x3d, 0x34 ), new DFBColor( 0x80, 0x6c, 0x2a, 0x18 ), new DFBColor( 0x80, 0x54, 0x3c, 0x2f ), new DFBColor( 0x80, 0x8f, 0x8a, 0x83 ), new DFBColor( 0x80, 0x54, 0x40, 0x21 ), new DFBColor( 0x80, 0x7d, 0x78, 0x72 ), new DFBColor( 0x80, 0xd3, 0xb9, 0xb5 ), new DFBColor( 0x80, 0x50, 0x20, 0x0e ), new DFBColor( 0x80, 0x1b, 0x1c, 0x0e ), new DFBColor( 0x80, 0xcc, 0xc6, 0xbe ), new DFBColor( 0x80, 0xfd, 0xfc, 0xf9 ), new DFBColor( 0x80, 0xfd, 0xfe, 0xdf ), new DFBColor( 0x80, 0xb0, 0xa8, 0x98 ), new DFBColor( 0x80, 0xd8, 0xc8, 0xd5 ), new DFBColor( 0x80, 0x52, 0x48, 0x47 ), new DFBColor( 0x80, 0x04, 0x0a, 0x08 ), new DFBColor( 0x80, 0xd8, 0xd4, 0xd0 ), new DFBColor( 0x80, 0xd2, 0xda, 0xef ), new DFBColor( 0x80, 0xa6, 0x95, 0x8a ), new DFBColor( 0x80, 0xc9, 0xb8, 0xb3 ), new DFBColor( 0x80, 0xc6, 0xad, 0xa6 ), new DFBColor( 0x80, 0x3e, 0x25, 0x0e ), new DFBColor( 0x80, 0xeb, 0xd0, 0xc6 ), new DFBColor( 0x80, 0xf6, 0xdd, 0xbe ), new DFBColor( 0x80, 0x2e, 0x1e, 0x06 ), new DFBColor( 0x80, 0xfd, 0xfc, 0xeb ), new DFBColor( 0x80, 0xbf, 0xba, 0xb4 ), new DFBColor( 0x80, 0x50, 0x60, 0x54 ), new DFBColor( 0x80, 0x1c, 0x0c, 0x05 ), new DFBColor( 0x80, 0xe3, 0xdc, 0xef ), new DFBColor( 0x80, 0x11, 0x0b, 0x25 ), new DFBColor( 0x80, 0x1e, 0x14, 0x14 ), new DFBColor( 0x80, 0xf1, 0xe1, 0xda ), new DFBColor( 0x80, 0x34, 0x33, 0x21 ), new DFBColor( 0x80, 0xe6, 0xf8, 0xe1 ), new DFBColor( 0x80, 0x52, 0x45, 0x34 ), new DFBColor( 0x80, 0x47, 0x02, 0x02 ), new DFBColor( 0x80, 0x85, 0x79, 0x7e ), new DFBColor( 0x80, 0xec, 0xe8, 0xe1 ), new DFBColor( 0x80, 0xee, 0xd6, 0xca ), new DFBColor( 0x80, 0x7d, 0x7e, 0x76 ), new DFBColor( 0x80, 0x78, 0x69, 0x53 ), new DFBColor( 0x80, 0xf9, 0xe9, 0xd2 ), new DFBColor( 0x80, 0xf7, 0xed, 0xec ), new DFBColor( 0x80, 0x5e, 0x55, 0x59 ), new DFBColor( 0x80, 0x34, 0x4a, 0x34 ), new DFBColor( 0x80, 0x92, 0x91, 0x94 ), new DFBColor( 0x80, 0xb0, 0xa8, 0xa4 ), new DFBColor( 0x80, 0x31, 0x24, 0x23 ), new DFBColor( 0x80, 0xe8, 0xdc, 0xd9 ), new DFBColor( 0x80, 0xfc, 0xf4, 0xf1 ), new DFBColor( 0x80, 0xa5, 0xb4, 0xc1 ), new DFBColor( 0x80, 0x8d, 0x8a, 0x97 ), new DFBColor( 0x80, 0xfc, 0xc6, 0xc0 ), new DFBColor( 0x80, 0x6a, 0x5d, 0x4f ), new DFBColor( 0x80, 0x72, 0x60, 0x58 ), new DFBColor( 0x80, 0xef, 0xb8, 0xaa ), new DFBColor( 0x80, 0x2a, 0x2c, 0x14 ), new DFBColor( 0x80, 0xae, 0xa0, 0x95 ), new DFBColor( 0x80, 0x36, 0x26, 0x0d ), new DFBColor( 0x80, 0x6c, 0x6e, 0x63 ), new DFBColor( 0x80, 0xce, 0x72, 0x5e ), new DFBColor( 0x80, 0xfc, 0xf5, 0xdd ), new DFBColor( 0x80, 0xa8, 0x85, 0x79 ), new DFBColor( 0x80, 0xca, 0xb9, 0xc2 ), new DFBColor( 0x80, 0x6a, 0x54, 0x47 ), new DFBColor( 0x80, 0x86, 0x7e, 0x78 ), new DFBColor( 0x80, 0xb7, 0xc4, 0xe2 ), new DFBColor( 0x80, 0xcc, 0xa2, 0x64 ), ) ); ?> |