~attente/glib/gicon-upstream

« back to all changes in this revision

Viewing changes to docs/reference/gobject/html/gobject-The-Base-Object-Type.html

  • Committer: Package Import Robot
  • Author(s): Iain Lane, Josselin Mouette, Iain Lane
  • Date: 2012-10-17 11:51:14 UTC
  • mfrom: (172.1.3 experimental)
  • Revision ID: package-import@ubuntu.com-20121017115114-gqog9lavags5afi1
Tags: 2.34.1-1
[ Josselin Mouette ]
* Require libelfg0-dev, not libelf-dev which has nothing to do with 
  it.

[ Iain Lane ]
* New upstream release
  + GTimeZone support for zoneinfo version 1
  + Leak in glib-compile-resources
  + g_settings_bind: use canonical property name
  + Port gio tests from pygobject to pygi
* Switch python-gobject-2 BD to python-gi, folowing porting of tests. 
* debian/patches/50_git_gmenuexporter_allow_null_bus_on_name_vanished.patch:
  Cherry-pick upstream patch to fix crash when GBusNameVanishedCallback is
  called with a NULL GDBusConnection. (LP: #1044322)

Show diffs side-by-side

added added

removed removed

Lines of Context:
8
8
<link rel="up" href="rn01.html" title="API Reference">
9
9
<link rel="prev" href="GTypeModule.html" title="GTypeModule">
10
10
<link rel="next" href="gobject-Enumeration-and-Flag-Types.html" title="Enumeration and Flag Types">
11
 
<meta name="generator" content="GTK-Doc V1.18.1 (XML mode)">
 
11
<meta name="generator" content="GTK-Doc V1.18 (XML mode)">
12
12
<link rel="stylesheet" href="style.css" type="text/css">
13
13
</head>
14
14
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
300
300
</p>
301
301
<p>
302
302
Some object implementations may need to save an objects floating state
303
 
across certain code portions (an example is <a href="http://library.gnome.org/devel/gtk3/GtkMenu.html"><span class="type">GtkMenu</span></a>), to achieve this,
 
303
across certain code portions (an example is <a href="http://developer.gnome.org/gtk2/GtkMenu.html"><span class="type">GtkMenu</span></a>), to achieve this,
304
304
the following sequence can be used:
305
305
</p>
306
306
<p>
384
384
<p>
385
385
</p>
386
386
<div class="example">
387
 
<a name="idp14087248"></a><p class="title"><b>Example 1. Implementing singletons using a constructor</b></p>
 
387
<a name="idp14115408"></a><p class="title"><b>Example 1. Implementing singletons using a constructor</b></p>
388
388
<div class="example-contents">
389
389
  <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
390
390
    <tbody>
1368
1368
<tr>
1369
1369
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1370
1370
<td>a new instance of
1371
 
<em class="parameter"><code>object_type</code></em>. <span class="annotation">[<acronym title="Override the parsed C type with given type."><span class="acronym">type</span></acronym> GObject.Object][<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
 
1371
<em class="parameter"><code>object_type</code></em>. <span class="annotation">[<acronym title="Override the parsed C type with given type"><span class="acronym">type</span></acronym> GObject.Object][<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
1372
1372
</td>
1373
1373
</tr>
1374
1374
</tbody>
1418
1418
<tbody>
1419
1419
<tr>
1420
1420
<td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
1421
 
<td>a <a class="link" href="gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a>. <span class="annotation">[<acronym title="Override the parsed C type with given type."><span class="acronym">type</span></acronym> GObject.Object]</span>
 
1421
<td>a <a class="link" href="gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a>. <span class="annotation">[<acronym title="Override the parsed C type with given type"><span class="acronym">type</span></acronym> GObject.Object]</span>
1422
1422
</td>
1423
1423
</tr>
1424
1424
<tr>
1425
1425
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1426
 
<td>the same <em class="parameter"><code>object</code></em>. <span class="annotation">[<acronym title="Override the parsed C type with given type."><span class="acronym">type</span></acronym> GObject.Object][<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
 
1426
<td>the same <em class="parameter"><code>object</code></em>. <span class="annotation">[<acronym title="Override the parsed C type with given type"><span class="acronym">type</span></acronym> GObject.Object][<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
1427
1427
</td>
1428
1428
</tr>
1429
1429
</tbody>
1444
1444
</colgroup>
1445
1445
<tbody><tr>
1446
1446
<td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
1447
 
<td>a <a class="link" href="gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a>. <span class="annotation">[<acronym title="Override the parsed C type with given type."><span class="acronym">type</span></acronym> GObject.Object]</span>
 
1447
<td>a <a class="link" href="gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a>. <span class="annotation">[<acronym title="Override the parsed C type with given type"><span class="acronym">type</span></acronym> GObject.Object]</span>
1448
1448
</td>
1449
1449
</tr></tbody>
1450
1450
</table></div>
1473
1473
<tbody>
1474
1474
<tr>
1475
1475
<td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
1476
 
<td>a <a class="link" href="gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a>. <span class="annotation">[<acronym title="Override the parsed C type with given type."><span class="acronym">type</span></acronym> GObject.Object]</span>
 
1476
<td>a <a class="link" href="gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a>. <span class="annotation">[<acronym title="Override the parsed C type with given type"><span class="acronym">type</span></acronym> GObject.Object]</span>
1477
1477
</td>
1478
1478
</tr>
1479
1479
<tr>
1480
1480
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1481
1481
<td>
1482
 
<em class="parameter"><code>object</code></em>. <span class="annotation">[<acronym title="Override the parsed C type with given type."><span class="acronym">type</span></acronym> GObject.Object][<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
 
1482
<em class="parameter"><code>object</code></em>. <span class="annotation">[<acronym title="Override the parsed C type with given type"><span class="acronym">type</span></acronym> GObject.Object][<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
1483
1483
</td>
1484
1484
</tr>
1485
1485
</tbody>
1566
1566
<tbody>
1567
1567
<tr>
1568
1568
<td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
1569
 
<td>a <a class="link" href="gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a>. <span class="annotation">[<acronym title="Override the parsed C type with given type."><span class="acronym">type</span></acronym> GObject.Object]</span>
 
1569
<td>a <a class="link" href="gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a>. <span class="annotation">[<acronym title="Override the parsed C type with given type"><span class="acronym">type</span></acronym> GObject.Object]</span>
1570
1570
</td>
1571
1571
</tr>
1572
1572
<tr>
1989
1989
7
1990
1990
8</pre></td>
1991
1991
        <td class="listing_code"><pre class="programlisting"><span class="normal">menu</span><span class="symbol">-&gt;</span><span class="normal">toplevel </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="gobject-The-Base-Object-Type.html#g-object-connect">g_object_connect</a></span><span class="normal"> </span><span class="symbol">(</span><span class="function"><a href="gobject-The-Base-Object-Type.html#g-object-new">g_object_new</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">GTK_TYPE_WINDOW</span><span class="symbol">,</span>
1992
 
<span class="normal">                           </span><span class="string">"type"</span><span class="symbol">,</span><span class="normal"> <a href="http://library.gnome.org/devel/gtk3/gtk-Standard-Enumerations.html#GTK-WINDOW-POPUP:CAPS">GTK_WINDOW_POPUP</a></span><span class="symbol">,</span>
 
1992
<span class="normal">                           </span><span class="string">"type"</span><span class="symbol">,</span><span class="normal"> <a href="http://developer.gnome.org/gtk2/gtk3-Standard-Enumerations.html#GTK-WINDOW-POPUP:CAPS">GTK_WINDOW_POPUP</a></span><span class="symbol">,</span>
1993
1993
<span class="normal">                           </span><span class="string">"child"</span><span class="symbol">,</span><span class="normal"> menu</span><span class="symbol">,</span>
1994
1994
<span class="normal">                           <a href="./../glib/glib/glib-Standard-Macros.html#NULL:CAPS">NULL</a></span><span class="symbol">),</span>
1995
1995
<span class="normal">                     </span><span class="string">"signal::event"</span><span class="symbol">,</span><span class="normal"> gtk_menu_window_event</span><span class="symbol">,</span><span class="normal"> menu</span><span class="symbol">,</span>
1996
1996
<span class="normal">                     </span><span class="string">"signal::size_request"</span><span class="symbol">,</span><span class="normal"> gtk_menu_window_size_request</span><span class="symbol">,</span><span class="normal"> menu</span><span class="symbol">,</span>
1997
 
<span class="normal">                     </span><span class="string">"signal::destroy"</span><span class="symbol">,</span><span class="normal"> <a href="http://library.gnome.org/devel/gtk3/GtkWidget.html#gtk-widget-destroyed">gtk_widget_destroyed</a></span><span class="symbol">,</span><span class="normal"> </span><span class="symbol">&amp;</span><span class="normal">menu</span><span class="symbol">-&gt;</span><span class="normal">toplevel</span><span class="symbol">,</span>
 
1997
<span class="normal">                     </span><span class="string">"signal::destroy"</span><span class="symbol">,</span><span class="normal"> <a href="http://developer.gnome.org/gtk2/GtkWidget.html#gtk-widget-destroyed">gtk_widget_destroyed</a></span><span class="symbol">,</span><span class="normal"> </span><span class="symbol">&amp;</span><span class="normal">menu</span><span class="symbol">-&gt;</span><span class="normal">toplevel</span><span class="symbol">,</span>
1998
1998
<span class="normal">                     <a href="./../glib/glib/glib-Standard-Macros.html#NULL:CAPS">NULL</a></span><span class="symbol">);</span></pre></td>
1999
1999
      </tr>
2000
2000
    </tbody>
2126
2126
<p>
2127
2127
</p>
2128
2128
<div class="example">
2129
 
<a name="idp17931088"></a><p class="title"><b>Example 2. Using g_object_get()</b></p>
 
2129
<a name="idp18074528"></a><p class="title"><b>Example 2. Using g_object_get()</b></p>
2130
2130
<div class="example-contents">
2131
2131
An example of using <a class="link" href="gobject-The-Base-Object-Type.html#g-object-get" title="g_object_get ()"><code class="function">g_object_get()</code></a> to get the contents
2132
2132
of three properties - one of type <a class="link" href="gobject-Type-Information.html#G-TYPE-INT:CAPS" title="G_TYPE_INT"><span class="type">G_TYPE_INT</span></a>,
3373
3373
<tr>
3374
3374
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
3375
3375
<td>the object pointed to
3376
 
by <em class="parameter"><code>weak_ref</code></em>, or <a href="./../glib/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if it was empty. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>][<acronym title="Override the parsed C type with given type."><span class="acronym">type</span></acronym> GObject.Object]</span>
 
3376
by <em class="parameter"><code>weak_ref</code></em>, or <a href="./../glib/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if it was empty. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>][<acronym title="Override the parsed C type with given type"><span class="acronym">type</span></acronym> GObject.Object]</span>
3377
3377
</td>
3378
3378
</tr>
3379
3379
</tbody>
3481
3481
</div>
3482
3482
<div class="footer">
3483
3483
<hr>
3484
 
          Generated by GTK-Doc V1.18.1</div>
 
3484
          Generated by GTK-Doc V1.18</div>
3485
3485
</body>
3486
3486
</html>
 
 
b'\\ No newline at end of file'