Movatterモバイル変換


[0]ホーム

URL:


libvips

A fast image processing library with low memory needs.

DownloadInstallDocumentationIssuesWikilibvips projectslibvips on GitHub
Top  | Description  | Object Hierarchy  | Properties  | SignalsHomeUpPrevNext

VipsObject

VipsObject — the VIPS base object class

Stability Level

Stable, unless otherwise indicated

Functions

#defineVIPS_UNREF()
#defineVIPS_ARG_IMAGE()
#defineVIPS_ARG_INTERPOLATE()
#defineVIPS_ARG_BOOL()
#defineVIPS_ARG_DOUBLE()
#defineVIPS_ARG_BOXED()
#defineVIPS_ARG_INT()
#defineVIPS_ARG_UINT64()
#defineVIPS_ARG_ENUM()
#defineVIPS_ARG_FLAGS()
#defineVIPS_ARG_STRING()
#defineVIPS_ARG_POINTER()
intvips_argument_get_id ()
voidvips__object_set_member ()
void *(*VipsArgumentMapFn) ()
void *vips_argument_map ()
intvips_object_get_args ()
void *(*VipsArgumentClassMapFn) ()
void *vips_argument_class_map ()
gbooleanvips_argument_class_needsstring ()
intvips_object_get_argument ()
gbooleanvips_object_argument_isset ()
VipsArgumentFlagsvips_object_get_argument_flags ()
intvips_object_get_argument_priority ()
#defineVIPS_ARGUMENT_FOR_ALL()
#defineVIPS_ARGUMENT_COLLECT_SET()
#defineVIPS_ARGUMENT_COLLECT_GET()
gbooleanvips_value_is_null ()
voidvips_object_set_property ()
voidvips_object_get_property ()
voidvips_object_preclose ()
intvips_object_build ()
voidvips_object_summary_class ()
voidvips_object_summary ()
voidvips_object_dump ()
voidvips_object_print_summary_class ()
voidvips_object_print_summary ()
voidvips_object_print_dump ()
voidvips_object_print_name ()
gbooleanvips_object_sanity ()
voidvips_object_class_install_argument ()
intvips_object_set_argument_from_string ()
gbooleanvips_object_argument_needsstring ()
intvips_object_get_argument_to_string ()
intvips_object_set_required ()
void *(*VipsObjectSetArguments) ()
VipsObject *vips_object_new ()
intvips_object_set_valist ()
intvips_object_set ()
intvips_object_set_from_string ()
VipsObject *vips_object_new_from_string ()
voidvips_object_to_string ()
void *vips_object_map ()
void *(*VipsTypeMapFn) ()
void *(*VipsTypeMap2Fn) ()
void *(*VipsClassMapFn) ()
void *vips_type_map ()
void *vips_type_map_all ()
intvips_type_depth ()
GTypevips_type_find ()
constchar *vips_nickname_find ()
void *vips_class_map_all ()
constVipsObjectClass *vips_class_find ()
VipsObject **vips_object_local_array ()
voidvips_object_local_cb ()
#definevips_object_local()
voidvips_object_set_static ()
voidvips_object_print_all ()
voidvips_object_sanity_all ()
voidvips_object_rewind ()
voidvips_object_unref_outputs ()
constchar *vips_object_get_description ()

Properties

char *descriptionRead / Write
char *nicknameRead / Write

Signals

voidcloseRun Last
intpostbuildRun Last
voidpostcloseRun Last
voidprecloseRun Last

Types and Values

enumVipsArgumentFlags
#defineVIPS_ARGUMENT_REQUIRED_INPUT
#defineVIPS_ARGUMENT_OPTIONAL_INPUT
#defineVIPS_ARGUMENT_REQUIRED_OUTPUT
#defineVIPS_ARGUMENT_OPTIONAL_OUTPUT
 VipsArgument
 VipsArgumentClass
 VipsArgumentInstance
typedefVipsArgumentTable
#defineVIPS_ARGUMENT_FOR_ALL_END
#defineVIPS_ARGUMENT_COLLECT_END

Object Hierarchy

GFlags╰── VipsArgumentFlags    GObject╰── VipsObject├──VipsConnection├──VipsOperation├──VipsImage├──VipsInterpolate├──VipsRegion├──VipsSbuf╰──VipsThreadState

Includes

#include <vips/vips.h>

Description

TheVipsObject class and associated types and macros.

VipsObject is the base class for all objects in libvips. It has thefollowing major features:

Functional class creation Vips objects have a veryregular lifecycle: initialise, build, use, destroy. They behave rather likefunction calls and are free of side-effects.

Run-time introspection Vips objects can be fullyintrospected at run-time. There is no need for separate source-codeanalysis.

Command-line interface Any vips object can be run fromthe command-line with thevips driver program.

TheVipsObject lifecycle

VipsObject s have a strictly defined lifecycle, split broadly as constructand then use. In detail, the stages are:

  1. g_object_new(). TheVipsObject is created withg_object_new(). Objectsin this state are blank slates and need to have their various parametersset.

  2. g_object_set(). You loop over theVipsArgument that the object hasdefined withvips_argument_map(). Arguments have a set of flags attached tothem for required, optional, input, output, type, and so on. You must setall required arguments.

  3. vips_object_build(). Call this to construct the object and get it readyfor use. Building an object happens in four stages, see below.

  4. g_object_get(). The object has now been built. You can read out anycomputed values.

  5. g_object_unref(). When you are done with an object, you can unref it.See the section on reference counting for an explanation of the conventionthatVipsObject uses. When the last ref to an object is released, theobject is closed. Objects close in three stages, see below.

The stages insidevips_object_build() are:

  1. Chain up through the object'sbuild class methods. At each stage,each class does any initial setup and checking, then chains up to itssuperclass.

  2. The innermostbuild method insideVipsObject itself checks that allinput arguments have been set and then returns.

  3. All objectbuild methods now finish executing, from innermost tooutermost. They know all input arguments have been checked and supplied, sonow they set all output arguments.

  4. vips_object_build() finishes the process by checking that all outputobjects have been set, and then triggering the“postbuild”signal.“postbuild” only runs if the object has constructedsuccessfully.

VipsOperation has a cache of recent operation objects, see that class foran explanation ofvips_cache_operation_build().

Finally the stages inside close are:

  1. “preclose”. This is emitted at the start oftheVipsObject dispose. The object is still functioning.

  2. “close”. This runs just after allVipsArgument held bythe object have been released.

  3. “postclose”. This runs right at the end. The objectpointer is still valid, but nothing else is.

VipsArgument

libvips has a simple mechanism for automating at least some aspects ofGObject properties. You add a set of macros to your_class_init() whichdescribe the arguments, and set the get and set functions to the vips ones.

Seeextending for a complete example.

TheVipsObject reference counting convention

VipsObject has a set of conventions to simplify reference counting.

  1. All inputGObject have a ref added to them, owned by the object. When aVipsObject is unreffed, all of these refs to input objects areautomatically dropped.

  2. All outputGObject hold a ref to the object. When aGObject which is anoutput of aVipsObject is disposed, it must drop this reference.VipsObject which are outputs of otherVipsObject will do thisautomatically.

SeeVipsOperation for an example ofVipsObject reference counting.

Functions

VIPS_UNREF()

#define             VIPS_UNREF(X)

VIPS_ARG_IMAGE()

#define             VIPS_ARG_IMAGE(CLASS, NAME, PRIORITY, LONG, DESC, FLAGS, OFFSET)

VIPS_ARG_INTERPOLATE()

#define             VIPS_ARG_INTERPOLATE(CLASS, NAME, PRIORITY, LONG, DESC, FLAGS, OFFSET)

VIPS_ARG_BOOL()

#define             VIPS_ARG_BOOL(CLASS, NAME, PRIORITY, LONG, DESC, \            FLAGS, OFFSET, VALUE)

VIPS_ARG_DOUBLE()

#define             VIPS_ARG_DOUBLE(CLASS, NAME, PRIORITY, LONG, DESC, \            FLAGS, OFFSET, MIN, MAX, VALUE)

VIPS_ARG_BOXED()

#define             VIPS_ARG_BOXED(CLASS, NAME, PRIORITY, LONG, DESC, \            FLAGS, OFFSET, TYPE)

VIPS_ARG_INT()

#define             VIPS_ARG_INT(CLASS, NAME, PRIORITY, LONG, DESC, \            FLAGS, OFFSET, MIN, MAX, VALUE)

VIPS_ARG_UINT64()

#define             VIPS_ARG_UINT64(CLASS, NAME, PRIORITY, LONG, DESC, \            FLAGS, OFFSET, MIN, MAX, VALUE)

VIPS_ARG_ENUM()

#define             VIPS_ARG_ENUM(CLASS, NAME, PRIORITY, LONG, DESC, \            FLAGS, OFFSET, TYPE, VALUE)

VIPS_ARG_FLAGS()

#define             VIPS_ARG_FLAGS(CLASS, NAME, PRIORITY, LONG, DESC, \            FLAGS, OFFSET, TYPE, VALUE)

VIPS_ARG_STRING()

#define             VIPS_ARG_STRING(CLASS, NAME, PRIORITY, LONG, DESC, FLAGS, OFFSET, \            VALUE)

VIPS_ARG_POINTER()

#define             VIPS_ARG_POINTER(CLASS, NAME, PRIORITY, LONG, DESC, FLAGS, OFFSET)

vips_argument_get_id ()

intvips_argument_get_id (void);

Allocate a new property id. Seeg_object_class_install_property().

[skip]

Returns

a new property id > 0


vips__object_set_member ()

voidvips__object_set_member (VipsObject *object,GParamSpec *pspec,GObject **member,GObject *argument);

VipsArgumentMapFn ()

void *(*VipsArgumentMapFn) (VipsObject *object,GParamSpec *pspec,VipsArgumentClass *argument_class,VipsArgumentInstance *argument_instance,void *a,void *b);

vips_argument_map ()

void *vips_argument_map (VipsObject *object,VipsArgumentMapFn fn,void *a,void *b);

Loop over the vips_arguments to an object. Stop whenfn returns non-NULLand return that value.

[skip]

Parameters

object

object whose args should be enumerated

 

fn

call this function for every argument

 

a

client data

 

b

client data

 

Returns

NULL iffnreturnsNULL for all arguments, otherwise the firstnon-NULL value fromfn.


vips_object_get_args ()

intvips_object_get_args (VipsObject *object,constchar ***names,int **flags,int *n_args);

Get allGParamSpec names andVipsArgumentFlags for an object.

This is handy for language bindings. From C, it's usually more convenient tousevips_argument_map().

[skip]

Parameters

object

object whose args should be retrieved

 

names

output array ofGParamSpec names.

[transfer none][array length=n_args][allow-none]

flags

output array ofVipsArgumentFlags.

[transfer none][array length=n_args][allow-none]

n_args

length of output arrays.

[allow-none]

Returns

0 on success, -1 on error


VipsArgumentClassMapFn ()

void *(*VipsArgumentClassMapFn) (VipsObjectClass *object_class,GParamSpec *pspec,VipsArgumentClass *argument_class,void *a,void *b);

vips_argument_class_map ()

void *vips_argument_class_map (VipsObjectClass *object_class,VipsArgumentClassMapFn fn,void *a,void *b);

And loop over a class. Same as ^^, but with no VipsArgumentInstance.

[skip]


vips_argument_class_needsstring ()

gbooleanvips_argument_class_needsstring (VipsArgumentClass *argument_class);

vips_object_get_argument ()

intvips_object_get_argument (VipsObject *object,constchar *name,GParamSpec **pspec,VipsArgumentClass **argument_class,VipsArgumentInstance **argument_instance);

Look up the three things you need to work with a vips argument.

[skip]

Parameters

object

the object to fetch the args from

 

name

arg to fetch

 

pspec

the pspec for this arg.

[transfer none]

argument_class

the argument_class for this arg.

[transfer none]

argument_instance

the argument_instance for this arg.

[transfer none]

Returns

0 on success, or -1 on error.


vips_object_argument_isset ()

gbooleanvips_object_argument_isset (VipsObject *object,constchar *name);

Convenience: has an argument been assigned. Useful for bindings.

Parameters

object

the object to fetch the args from

 

name

arg to fetch

 

Returns

TRUE if the argument has been assigned.


vips_object_get_argument_flags ()

VipsArgumentFlagsvips_object_get_argument_flags (VipsObject *object,constchar *name);

Convenience: get the flags for an argument. Useful for bindings.

Parameters

object

the object to fetch the args from

 

name

arg to fetch

 

Returns

TheVipsArgumentFlags for this argument.


vips_object_get_argument_priority ()

intvips_object_get_argument_priority (VipsObject *object,constchar *name);

Convenience: get the priority for an argument. Useful for bindings.

Parameters

object

the object to fetch the args from

 

name

arg to fetch

 

Returns

The priority of this argument.


VIPS_ARGUMENT_FOR_ALL()

#define             VIPS_ARGUMENT_FOR_ALL(OBJECT, PSPEC, ARG_CLASS, ARG_INSTANCE)

VIPS_ARGUMENT_COLLECT_SET()

#define             VIPS_ARGUMENT_COLLECT_SET(PSPEC, ARG_CLASS, AP)

VIPS_ARGUMENT_COLLECT_GET()

#define             VIPS_ARGUMENT_COLLECT_GET(PSPEC, ARG_CLASS, AP)

vips_value_is_null ()

gbooleanvips_value_is_null (GParamSpec *psoec,constGValue *value);

vips_object_set_property ()

voidvips_object_set_property (GObject *gobject,guint property_id,constGValue *value,GParamSpec *pspec);

vips_object_get_property ()

voidvips_object_get_property (GObject *gobject,guint property_id,GValue *value,GParamSpec *pspec);

vips_object_preclose ()

voidvips_object_preclose (VipsObject *object);

vips_object_build ()

intvips_object_build (VipsObject *object);

vips_object_summary_class ()

voidvips_object_summary_class (VipsObjectClass *klass,VipsBuf *buf);

Generate a human-readable summary for a class.

[skip]

Parameters

klass

class to summarise

 

buf

write summary here

 

vips_object_summary ()

voidvips_object_summary (VipsObject *object,VipsBuf *buf);

Generate a human-readable summary for an object.

[skip]

Parameters

object

object to summarise

 

buf

write summary here

 

vips_object_dump ()

voidvips_object_dump (VipsObject *object,VipsBuf *buf);

Dump everything that vips knows about an object to a string.

[skip]

Parameters

object

object to dump

 

buf

write dump here

 

vips_object_print_summary_class ()

voidvips_object_print_summary_class (VipsObjectClass *klass);

vips_object_print_summary ()

voidvips_object_print_summary (VipsObject *object);

vips_object_print_dump ()

voidvips_object_print_dump (VipsObject *object);

vips_object_print_name ()

voidvips_object_print_name (VipsObject *object);

vips_object_sanity ()

gbooleanvips_object_sanity (VipsObject *object);

vips_object_class_install_argument ()

voidvips_object_class_install_argument (VipsObjectClass *cls,GParamSpec *pspec,VipsArgumentFlags flags,int priority,guint offset);

vips_object_set_argument_from_string ()

intvips_object_set_argument_from_string (VipsObject *object,constchar *name,constchar *value);

vips_object_argument_needsstring ()

gbooleanvips_object_argument_needsstring (VipsObject *object,constchar *name);

vips_object_get_argument_to_string ()

intvips_object_get_argument_to_string (VipsObject *object,constchar *name,constchar *arg);

vips_object_set_required ()

intvips_object_set_required (VipsObject *object,constchar *value);

VipsObjectSetArguments ()

void *(*VipsObjectSetArguments) (VipsObject *object,void *a,void *b);

vips_object_new ()

VipsObject *vips_object_new (GType type,VipsObjectSetArguments set,void *a,void *b);

g_object_new() the object, set any arguments withset, callvips_object_build() and return the complete object.

[skip]

Parameters

type

object to create

 

set

set arguments with this

 

a

client data

 

b

client data

 

Returns

the new object


vips_object_set_valist ()

intvips_object_set_valist (VipsObject *object,va_list ap);

Seevips_object_set().

Parameters

object

object to set arguments on

 

ap

NULL-terminated list of argument/value pairs

 

Returns

0 on success, -1 on error


vips_object_set ()

intvips_object_set (VipsObject *object,...);

Set a list of vips object arguments. For example:

1234
vips_object_set(operation,"input",in,"output",&out,NULL);

Input arguments are given in-line, output arguments are given as pointersto where the output value should be written.

See also:vips_object_set_valist(),vips_object_set_from_string().

Parameters

object

object to set arguments on

 

...

NULL-terminated list of argument/value pairs

 

Returns

0 on success, -1 on error


vips_object_set_from_string ()

intvips_object_set_from_string (VipsObject *object,constchar *string);

Set object arguments from a string. The string can be something like"a=12", or "a = 12, b = 13", or "fred". The string can optionally beenclosed in brackets.

You'd typically use this between creating the object and building it.

See also:vips_object_set(),vips_object_build(),vips_cache_operation_buildp().

Parameters

object

object to set arguments on

 

string

arguments as a string

 

Returns

0 on success, -1 on error


vips_object_new_from_string ()

VipsObject *vips_object_new_from_string (VipsObjectClass *object_class,constchar *p);

vips_object_to_string ()

voidvips_object_to_string (VipsObject *object,VipsBuf *buf);

The inverse ofvips_object_new_from_string(): turnobject into eg."VipsInterpolateSnohalo1(blur=.333333)".

Parameters

object

object to stringify

 

buf

write string here

 

vips_object_map ()

void *vips_object_map (VipsSListMap2Fn fn,void *a,void *b);

Call a function for all alive objects.Stop whenfn returns non-NULL and return that value.

[skip]

Parameters

fn

function to call for all objects

 

a

client data

 

b

client data

 

Returns

NULL iffnreturnsNULL for all arguments, otherwise the firstnon-NULL value fromfn.


VipsTypeMapFn ()

void *(*VipsTypeMapFn) (GType type,void *a);

VipsTypeMap2Fn ()

void *(*VipsTypeMap2Fn) (GType type,void *a,void *b);

VipsClassMapFn ()

void *(*VipsClassMapFn) (VipsObjectClass *cls,void *a);

vips_type_map ()

void *vips_type_map (GType base,VipsTypeMap2Fn fn,void *a,void *b);

Map over a type's children. Stop whenfn returns non-NULLand return that value.

[skip]

Parameters

base

base type

 

fn

call this function for every type

 

a

client data

 

b

client data

 

Returns

NULL iffnreturnsNULL for all arguments, otherwise the firstnon-NULL value fromfn.


vips_type_map_all ()

void *vips_type_map_all (GType base,VipsTypeMapFn fn,void *a);

Map over a type's children, direct and indirect. Stop whenfn returnsnon-NULL and return that value.

[skip]

Parameters

base

base type

 

fn

call this function for every type

 

a

client data

 

Returns

NULL iffnreturnsNULL for all arguments, otherwise the firstnon-NULL value fromfn.


vips_type_depth ()

intvips_type_depth (GType type);

vips_type_find ()

GTypevips_type_find (constchar *basename,constchar *nickname);

Search belowbasename, return theGType of the class whose name ornickname matches, or 0 for not found.Ifbasename is NULL, the whole ofVipsObject is searched.

This function uses a cache, so it should be quick.

See also:vips_class_find()

Parameters

basename

name of base class

 

nickname

search for a class with this nickname

 

Returns

theGType of the class, or 0 if the class is not found.


vips_nickname_find ()

constchar *vips_nickname_find (GType type);

Return the VIPS nickname for aGType. Handy for language bindings.

Parameters

type

GType to search for

 

Returns

the class nickname.

[transfer none]


vips_class_map_all ()

void *vips_class_map_all (GType type,VipsClassMapFn fn,void *a);

Loop over all the subclasses oftype. Non-abstract classes only.Stop whenfn returnsnon-NULL and return that value.

[skip]

Parameters

type

base type

 

fn

call this function for every type

 

a

client data

 

Returns

NULL iffnreturnsNULL for all arguments, otherwise the firstnon-NULL value fromfn.


vips_class_find ()

constVipsObjectClass *vips_class_find (constchar *basename,constchar *nickname);

Search belowbasename, return the first class whose name ornicknamematches.

See also:vips_type_find()

Parameters

basename

name of base class

 

nickname

search for a class with this nickname

 

Returns

the found class.

[transfer none]


vips_object_local_array ()

VipsObject **vips_object_local_array (VipsObject *parent,int n);

Make an array of NULL VipsObject pointers. Whenparent closes, everynon-NULL pointer in the array will be unreffed and the array will befreed. Handy for creating a set of temporary images for a function.

The array is NULL-terminated, ie. contains an extra NULL element at theend.

Example:

12345678
VipsObject**t;t=vips_object_local_array(parent,5);if(vips_add(a,b,&t[0],NULL)||vips_invert(t[0],&t[1],NULL)||vips_add(t[1],t[0],&t[2],NULL)||vips_costra(t[2],out,NULL))return-1;

See also:vips_object_local().

[skip]

Parameters

parent

objects unref when this object unrefs

 

n

array size

 

Returns

an array of NULL pointers of lengthn


vips_object_local_cb ()

voidvips_object_local_cb (VipsObject *vobject,GObject *gobject);

vips_object_local()

#define             vips_object_local(V, G)

vips_object_set_static ()

voidvips_object_set_static (VipsObject *object,gboolean static_object);

vips_object_print_all ()

voidvips_object_print_all (void);

vips_object_sanity_all ()

voidvips_object_sanity_all (void);

vips_object_rewind ()

voidvips_object_rewind (VipsObject *object);

vips_object_unref_outputs ()

voidvips_object_unref_outputs (VipsObject *object);

Unref all assigned output objects. Useful for language bindings.

After an object is built, all output args are owned by the caller. Ifsomething goes wrong before then, we have to unref the outputs that havebeen made so far. This function can also be useful for callers whenthey've finished processing outputs themselves.

See also:vips_cache_operation_build().

Parameters

object

object to drop output refs from

 

vips_object_get_description ()

constchar *vips_object_get_description (VipsObject *object);

Fetch the object description. Useful for language bindings.

object.description is only available after_build(), which can be toolate. This function fetches from the instance, if possible, but falls backto the class description if we are too early.

Parameters

object

object to fetch description from

 

Returns

the object description

Types and Values

enum VipsArgumentFlags

Flags we associate with each object argument.

Have separate input & output flags. Both set is an error; neither set is OK.

Input gobjects are automatically reffed, output gobjects automatically refus. We also automatically watch for "destroy" and unlink.

VIPS_ARGUMENT_SET_ALWAYS is handy for arguments which are set from C. Forexample, VipsImage::width is a property that gives access to the Xsizemember of struct _VipsImage. We default its 'assigned' to TRUEsince the field is always set directly by C.

VIPS_ARGUMENT_DEPRECATED arguments are not shown in help text, are notlooked for if required, are not checked for "have-been-set". You candeprecate a required argument, but you must obviously add a new requiredargument if you do.

Input args withVIPS_ARGUMENT_MODIFY will be modified by the operation.This is used for things like the in-place drawing operations.

VIPS_ARGUMENT_NON_HASHABLE stops the argument being used in hash andequality tests. It's useful for arguments likerevalidate whichcontrol the behaviour of the operator cache.

Members

VIPS_ARGUMENT_NONE

no flags

 

VIPS_ARGUMENT_REQUIRED

must be set in the constructor

 

VIPS_ARGUMENT_CONSTRUCT

can only be set in the constructor

 

VIPS_ARGUMENT_SET_ONCE

can only be set once

 

VIPS_ARGUMENT_SET_ALWAYS

don't do use-before-set checks

 

VIPS_ARGUMENT_INPUT

is an input argument (one we depend on)

 

VIPS_ARGUMENT_OUTPUT

is an output argument (depends on us)

 

VIPS_ARGUMENT_DEPRECATED

just there for back-compat, hide

 

VIPS_ARGUMENT_MODIFY

the input argument will be modified

 

VIPS_ARGUMENT_NON_HASHABLE

the argument is non-hashable

 

VIPS_ARGUMENT_REQUIRED_INPUT

#define             VIPS_ARGUMENT_REQUIRED_INPUT

VIPS_ARGUMENT_OPTIONAL_INPUT

#define             VIPS_ARGUMENT_OPTIONAL_INPUT

VIPS_ARGUMENT_REQUIRED_OUTPUT

#define             VIPS_ARGUMENT_REQUIRED_OUTPUT

VIPS_ARGUMENT_OPTIONAL_OUTPUT

#define             VIPS_ARGUMENT_OPTIONAL_OUTPUT

VipsArgument

typedef struct {GParamSpec *pspec; /* pspec for this argument *//* More stuff, see below */} VipsArgument;

VipsArgumentClass

typedef struct {VipsArgument parent;/* The class of the object we are an arg for. */VipsObjectClass *object_class;VipsArgumentFlags flags;int priority; /* Order args by this */guint offset; /* G_STRUCT_OFFSET of member in object */} VipsArgumentClass;

VipsArgumentInstance

typedef struct {VipsArgument parent;/* The class we are part of. */VipsArgumentClass *argument_class;/* The object we are attached to. */VipsObject *object;/* Has been set. */gboolean assigned;/* If this is an output argument, keep the id of our "close" handler * here. */gulong close_id;/* We need to listen for "invalidate" on input images and send our own * "invalidate" out. If we go, we need to disconnect. */gulong invalidate_id;} VipsArgumentInstance;

VipsArgumentTable

typedef GHashTable VipsArgumentTable;

VIPS_ARGUMENT_FOR_ALL_END

#define             VIPS_ARGUMENT_FOR_ALL_END

VIPS_ARGUMENT_COLLECT_END

#define             VIPS_ARGUMENT_COLLECT_END

Property Details

The“description” property

  “description”char *

Class description.

Owner: VipsObject

Flags: Read / Write

Default value: ""


The“nickname” property

  “nickname”char *

Class nickname.

Owner: VipsObject

Flags: Read / Write

Default value: ""

Signal Details

The“close” signal

voiduser_function (VipsObject *object,gpointer    user_data)

The ::close signal is emitted once during object close. The objectis dying and may not work.

Parameters

object

the object that is closing

 

user_data

user data set when the signal handler was connected.

 

Flags: Run Last


The“postbuild” signal

intuser_function (VipsObject *object,gpointer    user_data)

The ::postbuild signal is emitted once just after successful objectconstruction. Return non-zero to cause object construction to fail.

Parameters

object

the object that has been built

 

user_data

user data set when the signal handler was connected.

 

Flags: Run Last


The“postclose” signal

voiduser_function (VipsObject *object,gpointer    user_data)

The ::postclose signal is emitted once after object close. Theobject pointer is still valid, but nothing else.

Parameters

object

the object that has closed

 

user_data

user data set when the signal handler was connected.

 

Flags: Run Last


The“preclose” signal

voiduser_function (VipsObject *object,gpointer    user_data)

The ::preclose signal is emitted once just before object closestarts. The object is still alive.

Parameters

object

the object that is to close

 

user_data

user data set when the signal handler was connected.

 

Flags: Run Last

See Also

operation

Generated by GTK-Doc V1.34.0

[8]ページ先頭

©2009-2025 Movatter.jp