static SWFMorph getMorph(zval *id TSRMLS_DC);
static SWFMovieClip getSprite(zval *id TSRMLS_DC);
static SWFSound getSound(zval *id TSRMLS_DC);
+#ifdef HAVE_NEW_MING
static SWFSoundInstance getSoundInstance(zval *id TSRMLS_DC);
+#endif
#define PHP_MING_FILE_CHK(file) \
if ((PG(safe_mode) && !php_checkuid((file), NULL, CHECKUID_CHECK_FILE_AND_DIR)) || php_check_open_basedir((file) TSRMLS_CC)) { \
static int le_swfgradientp;
static int le_swfbitmapp;
static int le_swffontp;
-static int le_swffontcharp;
static int le_swftextp;
static int le_swftextfieldp;
static int le_swfdisplayitemp;
static int le_swfspritep;
static int le_swfinputp;
static int le_swfsoundp;
+#ifdef HAVE_NEW_MING
+static int le_swffontcharp;
static int le_swfsoundinstancep;
+#endif
static zend_class_entry *movie_class_entry_ptr;
static zend_class_entry *shape_class_entry_ptr;
static zend_class_entry *gradient_class_entry_ptr;
static zend_class_entry *bitmap_class_entry_ptr;
static zend_class_entry *font_class_entry_ptr;
-static zend_class_entry *fontchar_class_entry_ptr;
static zend_class_entry *text_class_entry_ptr;
static zend_class_entry *textfield_class_entry_ptr;
static zend_class_entry *displayitem_class_entry_ptr;
static zend_class_entry *morph_class_entry_ptr;
static zend_class_entry *sprite_class_entry_ptr;
static zend_class_entry *sound_class_entry_ptr;
+#ifdef HAVE_NEW_MING
+static zend_class_entry *fontchar_class_entry_ptr;
static zend_class_entry *soundinstance_class_entry_ptr;
+#endif
/* {{{ internal function SWFgetProperty
*/
/* }}} */
/* }}} */
+#ifdef HAVE_NEW_MING
/* {{{ SWFFontCharacter */
static zend_function_entry swffontchar_functions[] = {
SWFFontCharacter_addUTF8Chars(getFontCharacter(getThis() TSRMLS_CC), Z_STRVAL_PP(zstring));
}
/* }}} */
-
/* }}} */
+#endif
+
/* {{{ SWFFont
*/
static zend_function_entry swffont_functions[] = {
free(result);
}
/* }}} */
+/* }}} */
#endif
/* }}} */
/* }}} */
/* {{{ proto class swfsound_init(string filename, int flags)
Returns a new SWFSound object from given file */
-
PHP_FUNCTION(swfsound_init)
{
zval **zfile, **zflags;
else
input = getInput(zfile TSRMLS_CC);
+#ifdef HAVE_NEW_MING
sound = newSWFSound_fromInput(input, flags);
+#else
+ sound = newSWFSound_fromInput(input);
+#endif
ret = zend_list_insert(sound, le_swfsoundp);
PHP_FALIAS(setcolor, swftextfield_setColor, NULL)
PHP_FALIAS(setname, swftextfield_setName, NULL)
PHP_FALIAS(addstring, swftextfield_addString, NULL)
+#ifdef HAVE_NEW_MING
PHP_FALIAS(setpadding, swftextfield_setPadding, NULL)
PHP_FALIAS(addchars, swftextfield_addChars, NULL)
+#endif
{ NULL, NULL, NULL }
};
}
/* }}} */
+#ifdef HAVE_NEW_MING
/* {{{ proto void swftextfield_setPadding(float padding)
Sets the padding of this textfield */
PHP_FUNCTION(swftextfield_setPadding)
}
/* }}} */
-/* }}} */
+#endif
zend_module_entry ming_module_entry = {
STANDARD_MODULE_HEADER,
zend_class_entry text_class_entry;
zend_class_entry textfield_class_entry;
zend_class_entry font_class_entry;
- zend_class_entry fontchar_class_entry;
zend_class_entry displayitem_class_entry;
zend_class_entry movie_class_entry;
zend_class_entry button_class_entry;
zend_class_entry morph_class_entry;
zend_class_entry sprite_class_entry;
zend_class_entry sound_class_entry;
+#ifdef HAVE_NEW_MING
+ zend_class_entry fontchar_class_entry;
zend_class_entry soundinstance_class_entry;
+#endif
Ming_setErrorFunction((void *) php_ming_error);
le_swftextp = zend_register_list_destructors_ex(destroy_SWFText_resource, NULL, "SWFText", module_number);
le_swftextfieldp = zend_register_list_destructors_ex(destroy_SWFTextField_resource, NULL, "SWFTextField", module_number);
le_swffontp = zend_register_list_destructors_ex(destroy_SWFFont_resource, NULL, "SWFFont", module_number);
- le_swffontcharp = zend_register_list_destructors_ex(destroy_SWFFontCharacter_resource, NULL, "SWFFontCharacter", module_number);
le_swfdisplayitemp = zend_register_list_destructors_ex(NULL, NULL, "SWFDisplayItem", module_number);
le_swfmoviep = zend_register_list_destructors_ex(destroy_SWFMovie_resource, NULL, "SWFMovie", module_number);
le_swfbuttonp = zend_register_list_destructors_ex(destroy_SWFButton_resource, NULL, "SWFButton", module_number);
le_swfinputp = zend_register_list_destructors_ex(destroy_SWFInput_resource, NULL, "SWFInput", module_number);
le_swfsoundp = zend_register_list_destructors_ex(destroy_SWFSound_resource, NULL, "SWFSound", module_number);
+#ifdef HAVE_NEW_MING
+ le_swffontcharp = zend_register_list_destructors_ex(destroy_SWFFontCharacter_resource, NULL, "SWFFontCharacter", module_number);
le_swfsoundinstancep = zend_register_list_destructors_ex(NULL, NULL, "SWFSoundInstance", module_number);
+#endif
INIT_CLASS_ENTRY(shape_class_entry, "swfshape", swfshape_functions);
INIT_CLASS_ENTRY(fill_class_entry, "swffill", swffill_functions);