bonobo-property-bag

bonobo-property-bag

Functions

Types and Values

Description

Functions

BonoboPropertyGetFn ()

void
(*BonoboPropertyGetFn) (BonoboPropertyBag *bag,
                        BonoboArg *arg,
                        guint arg_id,
                        CORBA_Environment *ev,
                        gpointer user_data);

BonoboPropertySetFn ()

void
(*BonoboPropertySetFn) (BonoboPropertyBag *bag,
                        const BonoboArg *arg,
                        guint arg_id,
                        CORBA_Environment *ev,
                        gpointer user_data);

bonobo_property_bag_new ()

BonoboPropertyBag *
bonobo_property_bag_new (BonoboPropertyGetFn get_prop_cb,
                         BonoboPropertySetFn set_prop_cb,
                         gpointer user_data);

Creates a new property bag with the specified callbacks.

Parameters

get_prop_cb

the property get callback

 

set_prop_cb

the property set callback

 

user_data

user data for the callbacks

 

Returns

A new BonoboPropertyBag object.


bonobo_property_bag_new_closure ()

BonoboPropertyBag *
bonobo_property_bag_new_closure (GClosure *get_prop,
                                 GClosure *set_prop);

Creates a new property bag with the specified callbacks.

Parameters

get_prop

the property get closure

 

set_prop

the property set closure

 

Returns

A new BonoboPropertyBag object.


bonobo_property_bag_new_full ()

BonoboPropertyBag *
bonobo_property_bag_new_full (GClosure *get_prop,
                              GClosure *set_prop,
                              BonoboEventSource *es);

Creates a new property bag with the specified callbacks.

Parameters

get_prop

the property get closure

 

set_prop

the property set closure

 

es

an event source to aggregate

 

Returns

A new BonoboPropertyBag object.


bonobo_property_bag_construct ()

BonoboPropertyBag *
bonobo_property_bag_construct (BonoboPropertyBag *pb,
                               GClosure *get_prop,
                               GClosure *set_prop,
                               BonoboEventSource *es);

Constructor, only for use in wrappers and object derivation, please refer to the bonobo_property_bag_new for normal use.

This function returns pb , or NULL in case of error. If it returns NULL, the passed in pb is unrefed.

Parameters

pb

BonoboPropertyBag to construct

 

get_prop

the property get closure

 

set_prop

the property set closure

 

es

an event source to aggregate

 

Returns

BonoboPropertyBag pointer or NULL.


bonobo_property_bag_add ()

void
bonobo_property_bag_add (BonoboPropertyBag *pb,
                         const char *name,
                         int idx,
                         BonoboArgType type,
                         BonoboArg *default_value,
                         const char *doctitle,
                         Bonobo_PropertyFlags flags);

Adds a property to the property bag.

Parameters

pb

property bag to add to

 

name

name of new property

 

idx

integer index for fast callback switch statement

 

type

the CORBA type eg. TC_long

 

default_value

the default value or NULL

 

doctitle

the translated documentation string

 

flags

various flags

 

bonobo_property_bag_add_full ()

void
bonobo_property_bag_add_full (BonoboPropertyBag *pb,
                              const char *name,
                              int idx,
                              BonoboArgType type,
                              BonoboArg *default_value,
                              const char *doctitle,
                              const char *docstring,
                              Bonobo_PropertyFlags flags,
                              GClosure *get_prop,
                              GClosure *set_prop);

This adds a property to pb at the full tilt of complexity.

Parameters

pb

property bag to add to

 

name

name of new property

 

idx

integer index for fast callback switch statement

 

type

the CORBA type eg. TC_long

 

default_value

the default value or NULL

 

doctitle

the translated documentation title

 

docstring

the translated documentation string

 

flags

various flags

 

get_prop

a per property get callback

 

set_prop

a per property set callback

 

bonobo_property_bag_remove ()

void
bonobo_property_bag_remove (BonoboPropertyBag *pb,
                            const char *name);

removes the property with name from b .

Parameters

pb

the property bag

 

name

name of property to remove.

 

bonobo_property_bag_map_params ()

void
bonobo_property_bag_map_params (BonoboPropertyBag *pb,
                                GObject *on_instance,
                                const GParamSpec **pspecs,
                                guint n_params);

bonobo_property_bag_get_prop_list ()

GList *
bonobo_property_bag_get_prop_list (BonoboPropertyBag *pb);

Returns a GList of BonoboProperty structures. This function is private and should only be used internally, or in a PropertyBag persistence implementation. You should not touch the BonoboProperty structure unless you know what you're doing.

Parameters

Types and Values

BonoboPropertyBagClass

typedef struct {
	BonoboObjectClass        parent;

	POA_Bonobo_PropertyBag__epv epv;
} BonoboPropertyBagClass;

struct BonoboPropertyBag

struct BonoboPropertyBag {
	BonoboObject             parent;
	BonoboPropertyBagPrivate *priv;
	BonoboEventSource        *es;
};

BONOBO_PROPERTY_READABLE

#define BONOBO_PROPERTY_READABLE      Bonobo_PROPERTY_READABLE

BONOBO_PROPERTY_WRITEABLE

#define BONOBO_PROPERTY_WRITEABLE     Bonobo_PROPERTY_WRITEABLE

BONOBO_PROPERTY_WRITABLE

#define BONOBO_PROPERTY_WRITABLE      Bonobo_PROPERTY_WRITEABLE

BONOBO_PROPERTY_NO_LISTENING

#define BONOBO_PROPERTY_NO_LISTENING  Bonobo_PROPERTY_NO_LISTENING


BONOBO_PROPERTY_NO_AUTONOTIFY

#define BONOBO_PROPERTY_NO_AUTONOTIFY Bonobo_PROPERTY_NO_AUTONOTIFY


struct BonoboProperty

struct BonoboProperty {
	char		      *name;
	int                    idx;
	BonoboArgType          type;
	BonoboArg             *default_value;
	char		      *doctitle;
	char		      *docstring;
	Bonobo_PropertyFlags   flags;

	BonoboPropertyPrivate *priv;
};