20
20
supply the property. Similarly, when a property changes
21
21
value inside your object you need to notify the property
22
22
bag's listeners that it has changed with a call to
23
<function>bonobo_property_bag_notify_listeners</function>.
23
<function>bonobo_event_source_notify_listeners_full</function>.
27
27
Here is a simple example use of the property bag:
29
<title>Callbacks</title>
29
<title>PropertyBag Callbacks</title>
127
127
BONOBO_ARG_SET_STRING (arg, gtk_clock_get_color (clock));
129
bonobo_property_bag_notify_listeners (
130
pb, "colour", arg, NULL);
129
bonobo_event_source_notify_listeners_full (pb->es,
132
134
bonobo_arg_release (arg);
149
<!-- ##### STRUCT BonoboPropertyBagClass ##### -->
157
<!-- ##### STRUCT BonoboPropertyBag ##### -->
147
166
<!-- ##### MACRO BONOBO_PROPERTY_READABLE ##### -->
168
If this flag is set, the property allows consulting its value.
154
173
<!-- ##### MACRO BONOBO_PROPERTY_WRITEABLE ##### -->
175
If this flag is set, the property supports modification of its value.
180
<!-- ##### MACRO BONOBO_PROPERTY_WRITABLE ##### -->
182
Misspelling of #BONOBO_PROPERTY_WRITEABLE.
161
187
<!-- ##### MACRO BONOBO_PROPERTY_NO_LISTENING ##### -->
189
If this flag set, when the property changes its value its
190
listeners will *not* be notified.
168
195
<!-- ##### MACRO BONOBO_PROPERTY_NO_AUTONOTIFY ##### -->
175
<!-- ##### STRUCT BonoboPropertyBagPrivate ##### -->
181
<!-- ##### STRUCT BonoboPropertyBag ##### -->
197
If this flag set, when the property changes its value its
198
listeners will *not* be notified.
190
203
<!-- ##### STRUCT BonoboProperty ##### -->
204
<!-- ##### STRUCT BonoboPropertyPrivate ##### -->
205
Structure that holds information about a property in a #BonoboPropertyBag.
208
@name: the canonic name of the property
209
@idx: unique numeric identifier of the property within the property bag
210
@type: type of value contained by this property
211
@default_value: the default value
212
@doctitle: documentation string title
213
@docstring: documentation string
214
@flags: property flags (read/write, etc.)
215
@priv: implementation private data
210
217
<!-- ##### USER_FUNCTION BonoboPropertyGetFn ##### -->
219
Property getter function.
222
@bag: the property bag
223
@arg: output parameter; the caller must place here the property value
224
@arg_id: unique numeric identifier of the property within the property bag
225
@ev: the relevant CORBA environment
226
@user_data: user data
222
229
<!-- ##### USER_FUNCTION BonoboPropertySetFn ##### -->
234
<!-- ##### TYPEDEF BonoboPropertyBagClass ##### -->
240
<!-- ##### MACRO BONOBO_PROPERTY_BAG_TYPE ##### -->
231
Property setter function.
234
@bag: the property bag
235
@arg: the new property value to be set
236
@arg_id: unique numeric identifier of the property within the property bag
237
@ev: the relevant CORBA environment
238
@user_data: user data
247
241
<!-- ##### FUNCTION bonobo_property_bag_new ##### -->