diff --git a/examples/generate_phpdoc.py b/examples/generate_phpdoc.py index 5b89216..2d52e35 100755 --- a/examples/generate_phpdoc.py +++ b/examples/generate_phpdoc.py @@ -3,7 +3,7 @@ # needs pyvips 2.2.3 or later from pyvips import Image, Introspect, GValue, Error, \ - ffi, enum_dict, flags_dict, vips_lib, gobject_lib, \ + ffi, enum_dict, flags_dict, gobject_lib, \ type_map, type_name, type_from_name, nickname_find # This file generates the phpdoc comments for the magic methods and properties. @@ -275,11 +275,6 @@ def add_nickname(gtype, a, b): def generate_enums(): - # otherwise we're missing some enums - vips_lib.vips_token_get_type() - vips_lib.vips_saveable_get_type() - vips_lib.vips_image_type_get_type() - all_enums = [] def add_enum(gtype, a, b): @@ -292,10 +287,6 @@ def add_enum(gtype, a, b): type_map(type_from_name('GEnum'), add_enum) - # Filter internal enums - blacklist = ['VipsImageType', 'VipsToken'] - all_enums = [name for name in all_enums if name not in blacklist] - for name in all_enums: gtype = type_from_name(name) php_name = remove_prefix(name) diff --git a/src/DemandStyle.php b/src/DemandStyle.php index 36970a2..395a404 100644 --- a/src/DemandStyle.php +++ b/src/DemandStyle.php @@ -53,4 +53,5 @@ abstract class DemandStyle const SMALLTILE = 'smalltile'; const FATSTRIP = 'fatstrip'; const THINSTRIP = 'thinstrip'; + const ANY = 'any'; } diff --git a/src/FFI.php b/src/FFI.php index f259f7b..bfbf94d 100644 --- a/src/FFI.php +++ b/src/FFI.php @@ -551,9 +551,6 @@ private static function init(): void GType vips_interpretation_get_type (void); GType vips_operation_flags_get_type (void); GType vips_band_format_get_type (void); -GType vips_token_get_type (void); -GType vips_saveable_get_type (void); -GType vips_image_type_get_type (void); void vips_image_set_progress (VipsImage* image, bool progress); void vips_image_set_kill (VipsImage* image, bool kill); @@ -822,9 +819,6 @@ private static function init(): void self::$vips->vips_interpretation_get_type(); self::$vips->vips_operation_flags_get_type(); self::$vips->vips_band_format_get_type(); - self::$vips->vips_token_get_type(); - self::$vips->vips_saveable_get_type(); - self::$vips->vips_image_type_get_type(); // look these up in advance self::$ctypes = [ diff --git a/src/ForeignJpegSubsample.php b/src/ForeignJpegSubsample.php deleted file mode 100644 index f87bfa7..0000000 --- a/src/ForeignJpegSubsample.php +++ /dev/null @@ -1,55 +0,0 @@ - - * @copyright 2016 John Cupitt - * @license https://opensource.org/licenses/MIT MIT - * @link https://github.com/jcupitt/php-vips - */ - -namespace Jcupitt\Vips; - -/** - * The ForeignJpegSubsample enum. - * @category Images - * @package Jcupitt\Vips - * @author John Cupitt - * @copyright 2016 John Cupitt - * @license https://opensource.org/licenses/MIT MIT - * @link https://github.com/jcupitt/php-vips - */ -abstract class ForeignJpegSubsample -{ - const AUTO = 'auto'; - const ON = 'on'; - const OFF = 'off'; -} diff --git a/src/GsfOutputCsvQuotingMode.php b/src/GsfOutputCsvQuotingMode.php deleted file mode 100644 index a8a08f0..0000000 --- a/src/GsfOutputCsvQuotingMode.php +++ /dev/null @@ -1,54 +0,0 @@ - - * @copyright 2016 John Cupitt - * @license https://opensource.org/licenses/MIT MIT - * @link https://github.com/jcupitt/php-vips - */ - -namespace Jcupitt\Vips; - -/** - * The GsfOutputCsvQuotingMode enum. - * @category Images - * @package Jcupitt\Vips - * @author John Cupitt - * @copyright 2016 John Cupitt - * @license https://opensource.org/licenses/MIT MIT - * @link https://github.com/jcupitt/php-vips - */ -abstract class GsfOutputCsvQuotingMode -{ - const NEVER = 'never'; - const AUTO = 'auto'; -} diff --git a/src/Saveable.php b/src/Saveable.php deleted file mode 100644 index 8558f9e..0000000 --- a/src/Saveable.php +++ /dev/null @@ -1,58 +0,0 @@ - - * @copyright 2016 John Cupitt - * @license https://opensource.org/licenses/MIT MIT - * @link https://github.com/jcupitt/php-vips - */ - -namespace Jcupitt\Vips; - -/** - * The Saveable enum. - * @category Images - * @package Jcupitt\Vips - * @author John Cupitt - * @copyright 2016 John Cupitt - * @license https://opensource.org/licenses/MIT MIT - * @link https://github.com/jcupitt/php-vips - */ -abstract class Saveable -{ - const MONO = 'mono'; - const RGB = 'rgb'; - const RGBA = 'rgba'; - const RGBA_ONLY = 'rgba-only'; - const RGB_CMYK = 'rgb-cmyk'; - const ANY = 'any'; -}