~ubuntu-branches/ubuntu/utopic/evolution-data-server/utopic-proposed

« back to all changes in this revision

Viewing changes to docs/reference/eds/html/eds-EExtensible.html

  • Committer: Package Import Robot
  • Author(s): Robert Ancell
  • Date: 2014-07-14 10:06:08 UTC
  • mfrom: (1.1.117)
  • Revision ID: package-import@ubuntu.com-20140714100608-b8k3z2rk1vx2c7mm
Tags: 3.12.3-0ubuntu1
New upstream release

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
<head>
4
4
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5
5
<title>EExtensible</title>
6
 
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
 
6
<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
7
7
<link rel="home" href="index.html" title="Evolution-Data-Server Reference Manual">
8
8
<link rel="up" href="ch06.html" title="Abstract Classes for Backends">
9
9
<link rel="prev" href="eds-EDBusServer.html" title="EDBusServer">
42
42
 
43
43
struct              <a class="link" href="eds-EExtensible.html#EExtensibleInterface" title="struct EExtensibleInterface">EExtensibleInterface</a>;
44
44
<span class="returnvalue">void</span>                <a class="link" href="eds-EExtensible.html#e-extensible-load-extensions" title="e_extensible_load_extensions ()">e_extensible_load_extensions</a>        (<em class="parameter"><code><span class="type">EExtensible</span> *extensible</code></em>);
45
 
<span class="returnvalue">GList</span> *             <a class="link" href="eds-EExtensible.html#e-extensible-list-extensions" title="e_extensible_list_extensions ()">e_extensible_list_extensions</a>        (<em class="parameter"><code><span class="type">EExtensible</span> *extensible</code></em>,
46
 
                                                         <em class="parameter"><code><span class="type">GType</span> extension_type</code></em>);
 
45
<a href="http://library.gnome.org/devel/glib/unstable/glib-Doubly-Linked-Lists.html#GList"><span class="returnvalue">GList</span></a> *             <a class="link" href="eds-EExtensible.html#e-extensible-list-extensions" title="e_extensible_list_extensions ()">e_extensible_list_extensions</a>        (<em class="parameter"><code><span class="type">EExtensible</span> *extensible</code></em>,
 
46
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/gobject/unstable/gobject-Type-Information.html#GType"><span class="type">GType</span></a> extension_type</code></em>);
47
47
</pre>
48
48
</div>
49
49
<div class="refsect1">
50
50
<a name="eds-EExtensible.description"></a><h2>Description</h2>
51
51
<p>
52
 
<a class="link" href="eds-EExtension.html#EExtension" title="struct EExtension"><span class="type">EExtension</span></a> objects can be tacked on to any <span class="type">GObject</span> instance that
53
 
implements the <span class="type">EExtensible</span> interface.  A <span class="type">GObject</span> type can be made
 
52
<a class="link" href="eds-EExtension.html#EExtension" title="struct EExtension"><span class="type">EExtension</span></a> objects can be tacked on to any <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a> instance that
 
53
implements the <span class="type">EExtensible</span> interface.  A <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a> type can be made
54
54
extensible in two steps:
55
55
</p>
56
56
<p>
57
 
1. Add the <span class="type">EExtensible</span> interface when registering the <span class="type">GType</span>.
 
57
1. Add the <span class="type">EExtensible</span> interface when registering the <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Type-Information.html#GType"><span class="type">GType</span></a>.
58
58
   There are no methods to implement.
59
59
</p>
60
60
<p>
68
68
3
69
69
4
70
70
5</pre></td>
71
 
        <td class="listing_code"><pre class="programlisting"><span class="gtkdoc ppc">#include &lt;libebackend/libebackend.h&gt;</span>
 
71
        <td class="listing_code"><pre class="programlisting"><span class="preproc">#include</span><span class="normal"> </span><span class="string">&lt;libebackend/libebackend.h&gt;</span>
72
72
 
73
 
<span class="function">G_DEFINE_TYPE_WITH_CODE</span> <span class="gtkdoc opt">(</span>
74
 
        ECustomWidget<span class="gtkdoc opt">,</span> e_custom_widget<span class="gtkdoc opt">,</span> GTK_TYPE_WIDGET<span class="gtkdoc opt">,</span>
75
 
        <span class="function">G_IMPLEMENT_INTERFACE</span> <span class="gtkdoc opt">(</span>E_TYPE_EXTENSIBLE<span class="gtkdoc opt">,</span> NULL<span class="gtkdoc opt">))</span></pre></td>
 
73
<span class="function"><a href="http://library.gnome.org/devel/gobject/unstable/gobject-Type-Information.html#G-DEFINE-TYPE-WITH-CODE:CAPS">G_DEFINE_TYPE_WITH_CODE</a></span><span class="normal"> </span><span class="symbol">(</span>
 
74
<span class="normal">        ECustomWidget</span><span class="symbol">,</span><span class="normal"> e_custom_widget</span><span class="symbol">,</span><span class="normal"> GTK_TYPE_WIDGET</span><span class="symbol">,</span>
 
75
<span class="normal">        </span><span class="function"><a href="http://library.gnome.org/devel/gobject/unstable/gobject-Type-Information.html#G-IMPLEMENT-INTERFACE:CAPS">G_IMPLEMENT_INTERFACE</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">E_TYPE_EXTENSIBLE</span><span class="symbol">,</span><span class="normal"> <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS">NULL</a></span><span class="symbol">))</span></pre></td>
76
76
      </tr>
77
77
    </tbody>
78
78
  </table>
81
81
<p>
82
82
</p>
83
83
<p>
84
 
2. Load extensions for the class at some point during <span class="type">GObject</span>
 
84
2. Load extensions for the class at some point during <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a>
85
85
   initialization.  Generally this should be done toward the end of
86
86
   the initialization code, so extensions get a fully initialized
87
87
   object to work with.
99
99
5
100
100
6
101
101
7</pre></td>
102
 
        <td class="listing_code"><pre class="programlisting"><span class="gtkdoc kwb">static void</span>
103
 
<span class="function">e_custom_widget_constructed</span> <span class="gtkdoc opt">(</span>ECustomWidget <span class="gtkdoc opt">*</span>widget<span class="gtkdoc opt">)</span>
104
 
<span class="gtkdoc opt">{</span>
105
 
        Construction code goes here<span class="gtkdoc opt">,</span> same as call to parent<span class="string">'s '</span>constructed<span class="string">'...</span>
106
 
<span class="string"></span>
 
102
        <td class="listing_code"><pre class="programlisting"><span class="keyword">static</span><span class="normal"> </span><span class="type">void</span>
 
103
<span class="function">e_custom_widget_constructed</span><span class="normal"> </span><span class="symbol">(</span><span class="usertype">ECustomWidget</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">widget</span><span class="symbol">)</span>
 
104
<span class="cbracket">{</span>
 
105
<span class="normal">        Construction code </span><span class="usertype">goes</span><span class="normal"> here</span><span class="symbol">,</span><span class="normal"> same as call </span><span class="usertype">to</span><span class="normal"> parent</span><span class="string">'s '</span><span class="normal">constructed</span><span class="string">'...</span>
 
106
 
107
107
<span class="string">        e_extensible_load_extensions (E_EXTENSIBLE (widget));</span>
108
108
<span class="string">}</span></pre></td>
109
109
      </tr>
133
133
<a class="link" href="eds-EExtension.html#EExtension" title="struct EExtension"><span class="type">EExtension</span></a> objects are bound to <em class="parameter"><code>extensible</code></em> such that they are finalized
134
134
when <em class="parameter"><code>extensible</code></em> is finalized.
135
135
</p>
136
 
<div class="variablelist"><table border="0">
 
136
<div class="variablelist"><table border="0" class="variablelist">
 
137
<colgroup>
137
138
<col align="left" valign="top">
 
139
<col>
 
140
</colgroup>
138
141
<tbody><tr>
139
142
<td><p><span class="term"><em class="parameter"><code>extensible</code></em> :</span></p></td>
140
143
<td>an <span class="type">EExtensible</span>
146
149
<hr>
147
150
<div class="refsect2">
148
151
<a name="e-extensible-list-extensions"></a><h3>e_extensible_list_extensions ()</h3>
149
 
<pre class="programlisting"><span class="returnvalue">GList</span> *             e_extensible_list_extensions        (<em class="parameter"><code><span class="type">EExtensible</span> *extensible</code></em>,
150
 
                                                         <em class="parameter"><code><span class="type">GType</span> extension_type</code></em>);</pre>
 
152
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Doubly-Linked-Lists.html#GList"><span class="returnvalue">GList</span></a> *             e_extensible_list_extensions        (<em class="parameter"><code><span class="type">EExtensible</span> *extensible</code></em>,
 
153
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/gobject/unstable/gobject-Type-Information.html#GType"><span class="type">GType</span></a> extension_type</code></em>);</pre>
151
154
<p>
152
155
Returns a list of <a class="link" href="eds-EExtension.html#EExtension" title="struct EExtension"><span class="type">EExtension</span></a> objects bound to <em class="parameter"><code>extensible</code></em> whose
153
156
types are ancestors of <em class="parameter"><code>extension_type</code></em>.  For a complete list of
154
157
extension objects bound to <em class="parameter"><code>extensible</code></em>, pass <code class="literal">E_TYPE_EXTENSION</code>.
155
158
</p>
156
159
<p>
157
 
The list itself should be freed with <code class="function">g_list_free()</code>.  The extension
 
160
The list itself should be freed with <a href="http://library.gnome.org/devel/glib/unstable/glib-Doubly-Linked-Lists.html#g-list-free"><code class="function">g_list_free()</code></a>.  The extension
158
161
objects are owned by <em class="parameter"><code>extensible</code></em> and should not be unreferenced.
159
162
</p>
160
 
<div class="variablelist"><table border="0">
 
163
<div class="variablelist"><table border="0" class="variablelist">
 
164
<colgroup>
161
165
<col align="left" valign="top">
 
166
<col>
 
167
</colgroup>
162
168
<tbody>
163
169
<tr>
164
170
<td><p><span class="term"><em class="parameter"><code>extensible</code></em> :</span></p></td>