VipsArgument

VipsArgument

Synopsis

struct              VipsObject;
struct              VipsObjectClass;
enum                VipsArgumentFlags;
#define             VIPS_ARGUMENT_REQUIRED_INPUT
#define             VIPS_ARGUMENT_OPTIONAL_INPUT
#define             VIPS_ARGUMENT_REQUIRED_OUTPUT
#define             VIPS_ARGUMENT_OPTIONAL_OUTPUT
                    VipsArgument;
                    VipsArgumentClass;
                    VipsArgumentInstance;
typedef             VipsArgumentTable;
VipsArgumentInstance * vips__argument_get_instance      (VipsArgumentClass *Param1,
                                                         VipsObject *Param2);
VipsArgument *      vips__argument_table_lookup         (VipsArgumentTable *Param1,
                                                         GParamSpec *Param2);
void *              (*VipsArgumentMapFn)                (VipsObject *Param1,
                                                         GParamSpec *Param2,
                                                         VipsArgumentClass *Param3,
                                                         VipsArgumentInstance *Param4,
                                                         void *a,
                                                         void *b);
void *              vips_argument_map                   (VipsObject *object,
                                                         VipsArgumentMapFn fn,
                                                         void *a,
                                                         void *b);
void                vips_object_set_property            (GObject *gobject,
                                                         guint property_id,
                                                         const GValue *value,
                                                         GParamSpec *pspec);
void                vips_object_get_property            (GObject *gobject,
                                                         guint property_id,
                                                         GValue *value,
                                                         GParamSpec *pspec);
int                 vips_object_build                   (VipsObject *object);
void                vips_object_print_class             (VipsObjectClass *klass);
void                vips_object_print                   (VipsObject *object);
void                vips_object_class_install_argument  (VipsObjectClass *Param1,
                                                         GParamSpec *pspec,
                                                         VipsArgumentFlags flags,
                                                         guint offset);
void *              (*VipsObjectSetArguments)           (VipsObject *Param1,
                                                         void *Param2,
                                                         void *Param3);
VipsObject *        vips_object_new                     (GType type,
                                                         VipsObjectSetArguments set,
                                                         void *a,
                                                         void *b);
VipsObject *        vips_object_new_from_string         (const char *base,
                                                         const char *str);
void                vips_object_to_string               (VipsObject *object,
                                                         VipsBuf *buf);

Object Hierarchy

  GObject
   +----VipsObject
         +----VipsFormat
         +----VipsInterpolate
         +----VipsThreadState

Properties

  "description"              gchar*                : Read / Write
  "nickname"                 gchar*                : Read / Write

Description

Details

struct VipsObject

struct VipsObject;

struct VipsObjectClass

struct VipsObjectClass {
	GObjectClass parent_class;

	/* Build the object ... all argument properties have been set,
	 * now build the thing.
	 */
	int (*build)( VipsObject *object );

	/* Try to print something about the class, handy for help displays.
	 */
	void (*print_class)( struct _VipsObjectClass *, VipsBuf * );

	/* Try to print something about the object, handy for debugging.
	 */
	void (*print)( VipsObject *, VipsBuf * );

	/* Class nickname, eg. "VipsInterpolateBicubic" has "bicubic" as a
	 * nickname. Not internationalised. 
	 */
	const char *nickname;

	/* Class description. Used for help messages, so internationalised.
	 */
	const char *description;

	/* Table of arguments for this class and any derived classes. Order
	 * is important, so keep a traverse list too. We can't rely on the
	 * ordering given by g_object_class_list_properties() since it comes
	 * from a hash :-(
	 */
	VipsArgumentTable *argument_table;
	GSList *argument_table_traverse;
};

enum VipsArgumentFlags

typedef enum _VipsArgumentFlags {
	VIPS_ARGUMENT_NONE = 0,

	/* Must be set in the constructor.
	 */
	VIPS_ARGUMENT_REQUIRED = 1,

	/* Can only be set in the constructor.
	 */
	VIPS_ARGUMENT_CONSTRUCT = 2,

	/* Can only be set once.
	 */
	VIPS_ARGUMENT_SET_ONCE = 4,

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

	/* Is an input argument (one we depend on) ... if it's a gobject, we 
	 * should ref it. In our _dispose(), we should unref it.
	 */
	VIPS_ARGUMENT_INPUT = 8,

	/* Is an output argument (one that depends on us) ... if it's a
	 * gobject, we should ref ourselves. We watch "destroy" on the
	 * argument: if it goes, we unref ourselves. If we dispose, we
	 * disconnect the signal.
	 */
	VIPS_ARGUMENT_OUTPUT = 16
} VipsArgumentFlags;

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;
	guint offset;		/* G_STRUCT_OFFSET of member in object */
} VipsArgumentClass;

VipsArgumentInstance

typedef struct {
	VipsArgument parent;

	/* The object we are attached to.
	 */
	VipsObject *object;

	/* Has been set.
	 */
	gboolean assigned;

	/* If this is an output argument, keep the id of our "destroy" handler
	 * here.
	 */
	gulong destroy_id;	
} VipsArgumentInstance;

VipsArgumentTable

typedef GHashTable VipsArgumentTable;

vips__argument_get_instance ()

VipsArgumentInstance * vips__argument_get_instance      (VipsArgumentClass *Param1,
                                                         VipsObject *Param2);

vips__argument_table_lookup ()

VipsArgument *      vips__argument_table_lookup         (VipsArgumentTable *Param1,
                                                         GParamSpec *Param2);

VipsArgumentMapFn ()

void *              (*VipsArgumentMapFn)                (VipsObject *Param1,
                                                         GParamSpec *Param2,
                                                         VipsArgumentClass *Param3,
                                                         VipsArgumentInstance *Param4,
                                                         void *a,
                                                         void *b);

vips_argument_map ()

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

vips_object_set_property ()

void                vips_object_set_property            (GObject *gobject,
                                                         guint property_id,
                                                         const GValue *value,
                                                         GParamSpec *pspec);

vips_object_get_property ()

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

vips_object_build ()

int                 vips_object_build                   (VipsObject *object);

vips_object_print_class ()

void                vips_object_print_class             (VipsObjectClass *klass);

vips_object_print ()

void                vips_object_print                   (VipsObject *object);

vips_object_class_install_argument ()

void                vips_object_class_install_argument  (VipsObjectClass *Param1,
                                                         GParamSpec *pspec,
                                                         VipsArgumentFlags flags,
                                                         guint offset);

VipsObjectSetArguments ()

void *              (*VipsObjectSetArguments)           (VipsObject *Param1,
                                                         void *Param2,
                                                         void *Param3);

vips_object_new ()

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

vips_object_new_from_string ()

VipsObject *        vips_object_new_from_string         (const char *base,
                                                         const char *str);

vips_object_to_string ()

void                vips_object_to_string               (VipsObject *object,
                                                         VipsBuf *buf);

Property Details

The "description" property

  "description"              gchar*                : Read / Write

Class description.

Default value: ""


The "nickname" property

  "nickname"                 gchar*                : Read / Write

Class nickname.

Default value: ""