~ubuntu-branches/ubuntu/saucy/libbonobo/saucy-proposed

« back to all changes in this revision

Viewing changes to doc/api/html/properties.html

  • Committer: Bazaar Package Importer
  • Author(s): Sebastien Bacher
  • Date: 2010-03-30 13:59:10 UTC
  • mfrom: (1.1.27 upstream)
  • Revision ID: james.westby@ubuntu.com-20100330135910-bq8awt4jhdd71oq1
Tags: 2.24.3-0ubuntu1
* New upstream version:
  - Set up dbus environment in test-activation/test.sh 
  - Fix memory corruption 
  - Updated translations 

Show diffs side-by-side

added added

removed removed

Lines of Context:
8
8
<link rel="up" href="property-bags.html" title="Property Bags, Events, Listeners">
9
9
<link rel="prev" href="property-bags.html" title="Property Bags, Events, Listeners">
10
10
<link rel="next" href="libbonobo-bonobo-event-source.html" title="bonobo-event-source">
11
 
<meta name="generator" content="GTK-Doc V1.11 (XML mode)">
 
11
<meta name="generator" content="GTK-Doc V1.14 (XML mode)">
12
12
<link rel="stylesheet" href="style.css" type="text/css">
13
13
<link rel="chapter" href="general.html" title="General">
14
14
<link rel="chapter" href="factories.html" title="Objects, Factories, Reference Counting">
30
30
<div class="refentry" title="Properties">
31
31
<a name="properties"></a><div class="titlepage"></div>
32
32
<div class="refsect1" title="Properties">
33
 
<a name="id2979020"></a><h2>Properties</h2>
 
33
<a name="id2619131"></a><h2>Properties</h2>
34
34
<p>Bonobo component properties, version 0.1 by Michael
35
35
            Meeks &lt;mmeeks@gnu.org&gt;</p>
36
36
<p>A brief discussion of how to use the property API to add
37
37
            a simple to use configuration mechanism to your bonobo
38
38
            component.</p>
39
39
<div class="refsect2" title="Properties and bags">
40
 
<a name="id2979037"></a><h3>Properties and bags</h3>
 
40
<a name="id2619150"></a><h3>Properties and bags</h3>
41
41
<p>A property is an attribute that is attached to a
42
42
                Bonobo object.  It can have any type, although the
43
43
                standard types <span class="type">boolean</span>,
49
49
</div>
50
50
<hr>
51
51
<div class="refsect2" title="BonoboArgs">
52
 
<a name="id2979102"></a><h3>BonoboArgs</h3>
 
52
<a name="id2619219"></a><h3>BonoboArgs</h3>
53
53
<p>A bonobo arg contains the value of a property whilst
54
54
                it is 'in flight' between a property and a
55
55
                requestor. The bonobo arg system is designed to make
76
76
</div>
77
77
<hr>
78
78
<div class="refsect2" title="PropertyBag creation">
79
 
<a name="id2979193"></a><h3>PropertyBag creation</h3>
 
79
<a name="id2620409"></a><h3>PropertyBag creation</h3>
80
80
<p>To add properties to an object first we must create
81
81
                a property bag hence:</p>
82
82
<pre class="synopsis">
99
99
</div>
100
100
<hr>
101
101
<div class="refsect2" title="Property Creation">
102
 
<a name="id2980285"></a><h3>Property Creation</h3>
 
102
<a name="id2620447"></a><h3>Property Creation</h3>
103
103
<p> Each basic property is created by this function: </p>
104
104
<pre class="synopsis">
105
105
void bonobo_property_bag_add (BonoboPropertyBag   *pb,
132
132
</div>
133
133
<hr>
134
134
<div class="refsect2" title="Wrapping GObjects">
135
 
<a name="id2980342"></a><h3>Wrapping GObjects</h3>
 
135
<a name="id2620508"></a><h3>Wrapping GObjects</h3>
136
136
<p> If you have already implemented a GObject that
137
137
                has the set of properties that you wish to export as
138
138
                Bonobo properties then it is trivial to add them to
153
153
</div>
154
154
<hr>
155
155
<div class="refsect2" title="Using properties in your client application">
156
 
<a name="id2980365"></a><h3>Using properties in your client application</h3>
 
156
<a name="id2620533"></a><h3>Using properties in your client application</h3>
157
157
<p>There are some fairly typesafe but convenient vararg
158
158
                ways to get remote properties. Example:</p>
159
 
<div class="informalexample"><pre class="programlisting">
160
 
CORBA_double i;
161
 
 
162
 
bonobo_widget_get_property (control, "value",
163
 
                            TC_CORBA_double, &amp;i, NULL);
164
 
i+= 0.37;
165
 
bonobo_widget_set_property (control, "value",
166
 
                            TC_CORBA_double, i, NULL);
167
 
                </pre></div>
 
159
<div class="informalexample">
 
160
  <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
 
161
    <tbody>
 
162
      <tr>
 
163
        <td class="listing_lines" align="right"><pre>1
 
164
2
 
165
3
 
166
4
 
167
5
 
168
6
 
169
7</pre></td>
 
170
        <td class="listing_code"><pre class="programlisting">CORBA_double i;
 
171
 
 
172
bonobo_widget_get_property (control, <span class="number">&quot;value&quot;</span>,
 
173
                            TC_CORBA_double, &amp;i, <span class="number">NULL</span>);
 
174
i+= <span class="number">0.37</span>;
 
175
bonobo_widget_set_property (control, <span class="number">&quot;value&quot;</span>,
 
176
                            TC_CORBA_double, i, <span class="number">NULL</span>);</pre></td>
 
177
      </tr>
 
178
    </tbody>
 
179
  </table>
 
180
</div>
 
181
 
168
182
<p>The alternative being the even more type safe version:</p>
169
183
<pre class="programlisting">
170
184
bonobo_property_bag_client_get_value_gdouble (pb, "value", &amp;i);
174
188
</div>
175
189
<div class="footer">
176
190
<hr>
177
 
          Generated by GTK-Doc V1.11</div>
 
191
          Generated by GTK-Doc V1.14</div>
178
192
</body>
179
 
</html>
 
193
</html>
 
 
b'\\ No newline at end of file'