hide VipsFormat and VipsWrap7 classes

This commit is contained in:
John Cupitt 2014-06-10 14:43:46 +01:00
parent 1d74aaecc3
commit 30eff079f1
4 changed files with 20 additions and 8 deletions

8
TODO
View File

@ -1,12 +1,4 @@
- mark VipsForeign and VipsWrap7 as deprecated, if they're not
don't display them in vips list classes
- can we use postbuild elsewhere? look at use of "preclose" / "written", etc.

View File

@ -321,6 +321,10 @@ vips_format_class_init( VipsFormatClass *class )
object_class->nickname = "format";
object_class->description = _( "VIPS file formats" );
object_class->summary_class = vips_format_summary_class;
/* Hide from UI.
*/
object_class->deprecated = TRUE;
}
static void

View File

@ -540,6 +540,13 @@ struct _VipsObjectClass {
GSList *argument_table_traverse;
GType argument_table_traverse_gtype;
/* This class is deprecated and therefore hidden from various UI bits.
*
* VipsOperation has a deprecated flag, use that in preference to this
* if you can.
*/
gboolean deprecated;
/* Reserved for future expansion.
*/
void (*_vips_reserved1)( void );

View File

@ -173,9 +173,18 @@ list_function( im_function *func )
static void *
list_class( GType type )
{
VipsObjectClass *class = VIPS_OBJECT_CLASS( g_type_class_ref( type ) );
int depth = vips_type_depth( type );
int i;
if( class->deprecated )
return( NULL );
if( VIPS_IS_OPERATION_CLASS( class ) &&
(VIPS_OPERATION_CLASS( class )->flags &
VIPS_OPERATION_DEPRECATED) )
return( NULL );
for( i = 0; i < depth * 2; i++ )
printf( " " );
vips_object_print_summary_class(