<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Changes from 1.2 to 2.0: GTK+ 2 Reference Manual</title>
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
<link rel="home" href="index.html" title="GTK+ 2 Reference Manual">
<link rel="up" href="migrating.html" title="Part IV. Migrating from Previous Versions of GTK+">
<link rel="prev" href="gtk-changes-1-2.html" title="Changes from 1.0 to 1.2">
<link rel="next" href="gtk-migrating-GtkFileChooser.html" title="Migrating from GtkFileSelection to GtkFileChooser">
<meta name="generator" content="GTK-Doc V1.26.1 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
<td width="100%" align="left" class="shortcuts"></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
<td><a accesskey="u" href="migrating.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="gtk-changes-1-2.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="gtk-migrating-GtkFileChooser.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry">
<a name="gtk-changes-2-0"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle">Changes from 1.2 to 2.0</span></h2>
<p>Changes from 1.2 to 2.0 —
Incompatible changes made between version 1.2 and version 2.0
</p>
</td>
<td class="gallery_image" valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="id-1.5.5.3"></a><h2>Incompatible changes from 1.2 to 2.0</h2>
<p>
The <a class="ulink" href="http://developer.gnome.org/dotplan/porting/" target="_top">GNOME 2.0
porting guide</a> on <a class="ulink" href="http://developer.gnome.org" target="_top">http://developer.gnome.org</a>
has some more detailed discussion of porting from 1.2 to 2.0.
See the sections on GLib and GTK+.
</p>
<p>
GTK+ changed fairly substantially from version 1.2 to 2.0, much more
so than from 1.0 to 1.2. Subsequent updates (possibilities are 2.0 to
2.2, 2.2 to 2.4, then to 3.0) will almost certainly be much, much
smaller. Nonetheless, most programs written for 1.2 compile against
2.0 with few changes. The bulk of changes listed below are to obscure
features or very specialized features, and compatibility interfaces
exist whenever possible.
</p>
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem"><p>
<code class="function">gtk_container_get_toplevels()</code> was removed and replaced
with <code class="function">gtk_window_list_toplevels()</code>, which has different
memory management on the return value
(<code class="function">gtk_window_list_toplevels()</code> copies the
<span class="structname">GList</span> and also references each widget in the list,
so you have to <code class="function">g_list_free()</code> the list after first
unref'ing each list member).
</p></li>
<li class="listitem"><p>
The <code class="function">gdk_time*</code> functions have been removed. This
functionality has been unused since the main loop was moved into GLib
prior to 1.2.
</p></li>
<li class="listitem"><p>
The signature for <code class="function">GtkPrintFunc</code> (used for
<code class="function">gtk_item_factory_dump_items()</code>)
has been changed to take a <span class="type">const gchar *</span> instead of
<span class="type">gchar *</span>, to match what we do for GLib, and other similar cases.
</p></li>
<li class="listitem"><p>
The detail arguments in the <span class="structname">GtkStyleClass</span> structure
are now <span class="type">const gchar *</span>.
</p></li>
<li class="listitem"><p>
<code class="function">gtk_paned_set_gutter_size()</code> has been removed, since the
small handle tab has been changed to include the entire area previously
occupied by the gutter.
</p></li>
<li class="listitem"><p>
<code class="function">gtk_paned_set_handle_size()</code> has been removed, in favor of
a style property, since this is an option that only makes sense for themes
to adjust.
</p></li>
<li class="listitem"><p>
GDK no longer selects OwnerGrabButtonMask for button presses. This means
that the automatic grab that occurs when the user presses a button
will have <code class="literal">owner_events = FALSE</code>, so all events are
redirected to the grab window, even events that would normally go to
other windows of the window's owner.
</p></li>
<li class="listitem"><p>
<span class="structname">GtkColorSelectionDialog</span> has now been moved into it's
own set of files, <code class="filename">gtkcolorseldialog.c</code> and
<code class="filename">gtkcolorseldialog.h</code>.
</p></li>
<li class="listitem"><p>
<code class="function">gtk_widget_shape_combine_mask()</code> now keeps a reference
count on the mask pixmap that is passed in.
</p></li>
<li class="listitem"><p>
The <span class="structname">GtkPatternSpec</span> has been moved to GLib as
<span class="structname">GPatternSpec</span>, the pattern
arguments to <code class="function">gtk_item_factory_dump_items()</code> and
<code class="function">gtk_item_factory_dump_rc()</code>
have thusly been changed to take a <span class="structname">GPatternSpec</span>
instead of a <span class="structname">GtkPatternSpec</span>.
</p></li>
<li class="listitem">
<p>
Type system changes:
</p>
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: circle; ">
<li class="listitem"><p>
<code class="literal">GTK_TYPE_OBJECT</code> is not a fundamental type anymore. Type checks of the
style <code class="literal">(GTK_FUNDAMENTAL_TYPE (some_type) == GTK_TYPE_OBJECT)</code>
will not work anymore. As a replacement, <code class="literal">(GTK_TYPE_IS_OBJECT (some_type))</code>
can be used now.
</p></li>
<li class="listitem"><p>
The following types vanished: <code class="literal">GTK_TYPE_ARGS</code>, <code class="literal">GTK_TYPE_CALLBACK</code>,
<code class="literal">GTK_TYPE_C_CALLBACK</code>, <code class="literal">GTK_TYPE_FOREIGN</code>. The corresponding <span class="structname">GtkArg</span>
fields and field access macros are also gone.
</p></li>
<li class="listitem"><p>
The following type aliases vanished: <code class="literal">GTK_TYPE_FLAT_FIRST</code>,
<code class="literal">GTK_TYPE_FLAT_LAST</code>, <code class="literal">GTK_TYPE_STRUCTURED_FIRST</code>,
<code class="literal">GTK_TYPE_STRUCTURED_LAST</code>.
</p></li>
<li class="listitem"><p>
The type macros <code class="function">GTK_TYPE_MAKE()</code> and <code class="function">GTK_TYPE_SEQNO()</code> vanished, use of
<code class="function">GTK_FUNDAMENTAL_TYPE()</code> is discouraged. Instead, the corresponding <span class="structname">GType</span>
API should be used: <code class="function">G_TYPE_FUNDAMENTAL()</code>, <code class="function">G_TYPE_DERIVE_ID()</code>,
<code class="function">G_TYPE_BRANCH_SEQNO()</code>. Note that the GLib type system doesn't build new
type ids based on a global incremental sequential number anymore, but
numbers new type ids sequentially per fundamental type branch.
</p></li>
<li class="listitem">
<p>
The following type functions vanished/were replaced:
</p>
<div class="informaltable"><table class="informaltable" border="1">
<colgroup>
<col>
<col>
</colgroup>
<thead><tr>
<th>Old Function</th>
<th>Replacement</th>
</tr></thead>
<tbody>
<tr>
<td><code class="function">gtk_type_query()</code></td>
<td>being investigated</td>
</tr>
<tr>
<td><code class="function">gtk_type_set_varargs_type()</code></td>
<td>-</td>
</tr>
<tr>
<td><code class="function">gtk_type_get_varargs_type()</code></td>
<td>-</td>
</tr>
<tr>
<td><code class="function">gtk_type_check_object_cast()</code></td>
<td><code class="function">g_type_check_instance_cast()</code></td>
</tr>
<tr>
<td><code class="function">gtk_type_check_class_cast()</code></td>
<td><code class="function">g_type_check_class_cast()</code></td>
</tr>
<tr>
<td><code class="function">gtk_type_describe_tree()</code></td>
<td>-</td>
</tr>
<tr>
<td><code class="function">gtk_type_describe_heritage()</code></td>
<td>-</td>
</tr>
<tr>
<td><code class="function">gtk_type_free()</code></td>
<td>-</td>
</tr>
<tr>
<td><code class="function">gtk_type_children_types()</code></td>
<td><code class="function">g_type_children()</code></td>
</tr>
<tr>
<td><code class="function">gtk_type_set_chunk_alloc()</code></td>
<td><em class="structfield"><code>GTypeInfo.n_preallocs</code></em></td>
</tr>
<tr>
<td><code class="function">gtk_type_register_enum()</code></td>
<td><code class="function">g_enum_register_static()</code></td>
</tr>
<tr>
<td><code class="function">gtk_type_register_flags()</code></td>
<td><code class="function">g_flags_register_static()</code></td>
</tr>
<tr>
<td><code class="function">gtk_type_parent_class()</code></td>
<td>
<code class="function">g_type_parent()</code>/<code class="function">g_type_class_peek_parent()</code>
</td>
</tr>
</tbody>
</table></div>
<p>
Use of <code class="function">g_type_class_ref()</code>/<code class="function">g_type_class_unref()</code> and <code class="function">g_type_class_peek()</code>
is recommended over usage of <code class="function">gtk_type_class()</code>.
Use of <code class="function">g_type_register_static()</code>/<code class="function">g_type_register_dynamic()</code> is recommended
over usage of <code class="function">gtk_type_unique()</code>.
</p>
</li>
</ul></div>
<p>
</p>
</li>
<li class="listitem">
<p>
Object system changes:
<span class="structname">GtkObject</span> derives from <span class="structname">GObject</span>, so is not the basic object type anymore.
This imposes the following source incompatible changes:
</p>
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: circle; ">
<li class="listitem"><p>
<span class="structname">GtkObject</span> has no <em class="structfield"><code>klass</code></em> field anymore, an object's class can be retrieved
with the object's coresponding <code class="literal">GTK_<OBJECT>_GET_CLASS (object)</code>
macro.
</p></li>
<li class="listitem"><p>
<span class="structname">GtkObjectClass</span> has no <em class="structfield"><code>type</code></em> field anymore, a class's type can be retrived
with the <code class="literal">GTK_CLASS_TYPE (class)</code> macro.
</p></li>
<li class="listitem">
<p>
<span class="structname">GtkObjectClass</span> does not introduce the <code class="function">finalize()</code> and <code class="function">shutdown()</code> methods
anymore. While <code class="function">shutdown()</code> is intended for GTK+ internal use only, <code class="function">finalize()</code>
is required by a variety of object implementations. <code class="function">GObjectClass.finalize</code>
should be overriden here, e.g.:
</p>
<div class="informalexample">
<table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td class="listing_lines" align="right"><pre>1
2
3
4
5
6
7
8
9
10
11
12</pre></td>
<td class="listing_code"><pre class="programlisting"><span class="gtkdoc kwb">static void</span> <span class="function">gtk_label_finalize</span> <span class="gtkdoc opt">(</span>GObject <span class="gtkdoc opt">*</span>gobject<span class="gtkdoc opt">)</span>
<span class="gtkdoc opt">{</span>
GtkLabel <span class="gtkdoc opt">*</span>label <span class="gtkdoc opt">=</span> <span class="function">GTK_LABEL</span> <span class="gtkdoc opt">(</span>gobject<span class="gtkdoc opt">);</span>
<span class="function"><a href="../gobject/gobject-The-Base-Object-Type.html#G-OBJECT-CLASS:CAPS">G_OBJECT_CLASS</a></span> <span class="gtkdoc opt">(</span>parent_class<span class="gtkdoc opt">)-></span><span class="function">finalize</span> <span class="gtkdoc opt">(</span>object<span class="gtkdoc opt">);</span>
<span class="gtkdoc opt">}</span>
<span class="gtkdoc kwb">static void</span> <span class="function">gtk_label_class_init</span> <span class="gtkdoc opt">(</span>GtkLabelClass <span class="gtkdoc opt">*</span><span class="gtkdoc kwc">class</span><span class="gtkdoc opt">)</span>
<span class="gtkdoc opt">{</span>
GObjectClass <span class="gtkdoc opt">*</span>gobject_class <span class="gtkdoc opt">=</span> <span class="function"><a href="../gobject/gobject-The-Base-Object-Type.html#G-OBJECT-CLASS:CAPS">G_OBJECT_CLASS</a></span> <span class="gtkdoc opt">(</span><span class="gtkdoc kwc">class</span><span class="gtkdoc opt">);</span>
gobject_class<span class="gtkdoc opt">-></span>finalize <span class="gtkdoc opt">=</span> gtk_label_finalize<span class="gtkdoc opt">;</span>
<span class="gtkdoc opt">}</span></pre></td>
</tr>
</tbody>
</table>
</div>
<p>
</p>
</li>
</ul></div>
<p>
</p>
</li>
<li class="listitem">
<p>
The GtkObject::destroy signal can now be emitted multiple times on an object.
::destroy implementations should check that make sure that they take this
into account, by checking to make sure that resources are there before
freeing them. For example:
</p>
<div class="informalexample">
<table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td class="listing_lines" align="right"><pre>1
2
3
4
5</pre></td>
<td class="listing_code"><pre class="programlisting"><span class="keyword">if</span> <span class="gtkdoc opt">(</span>object<span class="gtkdoc opt">-></span>foo_data<span class="gtkdoc opt">)</span>
<span class="gtkdoc opt">{</span>
<span class="function"><a href="../glib/glib-Memory-Allocation.html#g-free">g_free</a></span> <span class="gtkdoc opt">(</span>object<span class="gtkdoc opt">-></span>foo_data<span class="gtkdoc opt">);</span>
object<span class="gtkdoc opt">-></span>foo_data <span class="gtkdoc opt">=</span> NULL<span class="gtkdoc opt">;</span>
<span class="gtkdoc opt">}</span></pre></td>
</tr>
</tbody>
</table>
</div>
<p>
Also, ::destroy implementations have to release object references that
the object holds. Code in finalize implementations such as:
</p>
<div class="informalexample">
<table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td class="listing_lines" align="right"><pre>1
2
3
4
5</pre></td>
<td class="listing_code"><pre class="programlisting"><span class="keyword">if</span> <span class="gtkdoc opt">(</span>object<span class="gtkdoc opt">-></span>adjustment<span class="gtkdoc opt">)</span>
<span class="gtkdoc opt">{</span>
<span class="function"><a href="GtkObject.html#gtk-object-unref">gtk_object_unref</a></span> <span class="gtkdoc opt">(</span>object<span class="gtkdoc opt">-></span>adjustment<span class="gtkdoc opt">);</span>
object<span class="gtkdoc opt">-></span>adjustment <span class="gtkdoc opt">=</span> NULL<span class="gtkdoc opt">;</span>
<span class="gtkdoc opt">}</span></pre></td>
</tr>
</tbody>
</table>
</div>
<p>
have to be moved into the ::destroy implementations. The reason for doing
this is that all object reference cycles should be broken at destruction
time.
Because the ::destroy signal can be emitted multiple times, it no longer
makes sense to check if a widget has been destroyed using the
<code class="function">GTK_OBJECT_DESTROYED()</code> macro, and this macro has been
removed. If catching destruction is still needed, it can be done with a
signal connection to ::destroy.
</p>
</li>
<li class="listitem">
<p>
Signal system changes:
The GTK+ 2.0 signal system merely proxies the <span class="structname">GSignal</span>
system now. For future usage, direct use of the
<span class="structname">GSignal</span> API is recommended,
this avoids significant performance hits where <span class="structname">GtkArg</span>
structures have to be converted into <span class="structname">GValue</span>s. For
language bindings, <span class="structname">GSignal</span>+<span class="structname">GClosure</span>
provide a much more flexible and convenient mechanism to hook into signal
emissions or install class default handlers, so the old
<span class="structname">GtkSignal</span> API for language bindings is not
supported anymore.
</p>
<p>
Functions that got removed in the GTK+ signal API:
<code class="function">gtk_signal_n_emissions()</code>,
<code class="function">gtk_signal_n_emissions_by_name()</code>,
<code class="function">gtk_signal_set_funcs()</code>,
<code class="function">gtk_signal_handler_pending_by_id()</code>,
<code class="function">gtk_signal_add_emission_hook()</code>,
<code class="function">gtk_signal_add_emission_hook_full()</code>,
<code class="function">gtk_signal_remove_emission_hook()</code>,
<code class="function">gtk_signal_query()</code>.
Also, the <span class="structname">GtkCallbackMarshal</span> argument to
<code class="function">gtk_signal_connect_full()</code> is
not supported anymore.
For many of the removed functions, similar variants are available
in the <code class="function">g_signal_*</code> namespace.
The <span class="structname">GSignal</span> system performs emissions in a
slightly different manner than the old <span class="structname">GtkSignal</span>
code. Signal handlers that are connected to signal "foo"
on object "bar" while "foo" is being emitted, will not be called anymore
during the emission they were connected within.
</p>
</li>
<li class="listitem"><p>
Inserting and deleting text in <span class="structname">GtkEntry</span> though
functions such as <code class="function">gtk_entry_insert_text()</code> now leave
the cursor at its original position in the text instead of moving it to
the location of the insertion/deletion.
</p></li>
<li class="listitem"><p>
The <em class="structfield"><code>label</code></em> field of <span class="structname">GtkFrame</span>
widgets has been removed (as part of a change to allow arbitrary widgets
in the title position). The text can now be retrieved with the new function
<code class="function">gtk_frame_get_text()</code>.
</p></li>
<li class="listitem"><p>
The 'font' and 'font_set' declarations in RC files are now ignored. There
is a new 'font_name' field that holds the string form of a Pango font.
</p></li>
<li class="listitem"><p>
A number of types in GDK have become subclasses of
<span class="structname">GObject</span>. For the most part, this should not break
anyone's code. However, it's now possible/encouraged to use
<code class="function">g_object_ref()</code>/<code class="function">g_object_unref()</code> and
other <span class="structname">GObject</span> features with these GDK types. The
converted types are:
<span class="structname">GdkWindow</span>, <span class="structname">GdkDrawable</span>,
<span class="structname">GdkPixmap</span>, <span class="structname">GdkImage</span>,
<span class="structname">GdkGC</span>, <span class="structname">GdkDragContext</span>,
<span class="structname">GdkColormap</span>.
</p></li>
<li class="listitem"><p>
All drawables including pixmaps used to have a type tag, the
<span class="structname">GdkWindowType</span> enumeration, which included
<code class="literal">GDK_WINDOW_PIXMAP</code>.
<span class="structname">GdkWindowType</span> is now a property of
<span class="structname">GdkWindow</span> <span class="emphasis"><em>only</em></span>, and there is
no <code class="literal">GDK_WINDOW_PIXMAP</code>. You can use the
<code class="function">GDK_IS_PIXMAP()</code> macro to see if you have a pixmap, if
you need to know that.
</p></li>
<li class="listitem"><p>
<span class="structname">GtkStyle</span> and <span class="structname">GtkRcStyle</span> are
now subclasses of <span class="structname">GObject</span> as well. This
requires fairly extensive changes to theme engines, but
shouldn't affect most other code.
</p></li>
<li class="listitem"><p>
<em class="structfield"><code>xthickness</code></em> and <em class="structfield"><code>ythickness</code></em> have moved from
<span class="structname">GtkStyleClass</span> to <span class="structname">GtkStyle</span>
(from class to instance). This gives themes a bit more flexibility
and is generally more of the Right Thing. You can trivially fix
your code with <code class="literal">s/style->klass->xthickness/style->xthickness/g</code> and
same for <code class="literal">ythickness</code>.
</p></li>
<li class="listitem"><p>
Some <span class="structname">GtkStyle</span> <code class="function">draw_*</code> methods
have been removed (cross, oval, ramp)
and others have been added (expander, layout). This will require
changes to theme engines.
</p></li>
<li class="listitem"><p>
If you were using private GDK types, they have been rearranged
significantly. You shouldn't use private types. ;-)
</p></li>
<li class="listitem"><p>
The visual for a widget, and also the default visual is now derived
from the colormap for the widget and the default colormap.
<code class="function">gtk_widget_set_visual()</code>,
<code class="function">gtk_widget_set_default_visual()</code>,
<code class="function">gtk_widget_push_visual()</code> and
<code class="function">gtk_widget_pop_visual()</code> now do
nothing. Since the visual always had to match that of the colormap,
it is safe to simply delete all references to these functions.
</p></li>
<li class="listitem">
<p>
A number of functions in GDK have been renamed for consistency and
clarity. #defines to provide backwards compatibility have been
included, but can be disabled by defining <code class="literal">GDK_DISABLE_DEPRECATED</code>.
</p>
<div class="informaltable"><table class="informaltable" border="1">
<colgroup>
<col>
<col>
</colgroup>
<thead><tr>
<th>Old function</th>
<th>Defined As</th>
</tr></thead>
<tbody>
<tr>
<td><code class="function">gdk_draw_pixmap</code></td>
<td><code class="function">gdk_draw_drawable</code></td>
</tr>
<tr>
<td><code class="function">gdk_draw_bitmap</code></td>
<td><code class="function">gdk_draw_drawable</code></td>
</tr>
<tr>
<td><code class="function">gdk_window_get_size</code></td>
<td><code class="function">gdk_drawable_get_size</code></td>
</tr>
<tr>
<td><code class="function">gdk_window_get_type</code></td>
<td><code class="function">gdk_window_get_window_type</code></td>
</tr>
<tr>
<td><code class="function">gdk_window_get_colormap</code></td>
<td><code class="function">gdk_drawable_get_colormap</code></td>
</tr>
<tr>
<td><code class="function">gdk_window_set_colormap</code></td>
<td><code class="function">gdk_drawable_set_colormap</code></td>
</tr>
<tr>
<td><code class="function">gdk_window_get_visual</code></td>
<td><code class="function">gdk_drawable_get_visual</code></td>
</tr>
<tr>
<td><code class="function">gdk_window_ref</code></td>
<td><code class="function">gdk_drawable_ref</code></td>
</tr>
<tr>
<td><code class="function">gdk_window_unref</code></td>
<td><code class="function">gdk_drawable_unref</code></td>
</tr>
<tr>
<td><code class="function">gdk_bitmap_ref</code></td>
<td><code class="function">gdk_drawable_ref</code></td>
</tr>
<tr>
<td><code class="function">gdk_bitmap_unref</code></td>
<td><code class="function">gdk_drawable_unref</code></td>
</tr>
<tr>
<td><code class="function">gdk_pixmap_ref</code></td>
<td><code class="function">gdk_drawable_ref</code></td>
</tr>
<tr>
<td><code class="function">gdk_pixmap_unref</code></td>
<td><code class="function">gdk_drawable_unref</code></td>
</tr>
<tr>
<td><code class="function">gdk_gc_destroy</code></td>
<td><code class="function">gdk_gc_unref</code></td>
</tr>
<tr>
<td><code class="function">gdk_image_destroy</code></td>
<td><code class="function">gdk_image_unref</code></td>
</tr>
<tr>
<td><code class="function">gdk_cursor_destroy</code></td>
<td><code class="function">gdk_cursor_unref</code></td>
</tr>
<tr>
<td><code class="function">gdk_window_copy_area(drawable,gc,x,y,source_drawable,source_x,source_y,width,height)</code></td>
<td><code class="function">gdk_draw_pixmap(drawable,gc,source_drawable,source_x,source_y,x,y,width,height)</code></td>
</tr>
<tr>
<td><code class="function">gdk_rgb_get_cmap</code></td>
<td><code class="function">gdk_rgb_get_colormap</code></td>
</tr>
</tbody>
</table></div>
<p>
(Note that <code class="function">g_object_ref()</code> and
<code class="function">g_object_unref()</code> may be used for all of the above ref
and unref functions.)
<code class="function">gtk_widget_popup()</code> was removed, it was only usable
for <span class="structname">GtkWindow</span>s, and there the same effect can be
achieved by <code class="function">gtk_window_move()</code> and
<code class="function">gtk_widget_show()</code>.
</p>
</li>
<li class="listitem"><p>
<code class="function">gdk_pixmap_foreign_new()</code> no longer calls
<code class="function">XFreePixmap()</code> on the pixmap when the
<span class="structname">GdkPixmap</span> is finalized. This change corresponds
to the behavior of <code class="function">gdk_window_foreign_new()</code>, and fixes
a lot of problems with code where the pixmap wasn't supposed to be freed.
If <code class="function">XFreePixmap()</code> is needed, it can be done using the
destroy-notification facilities of <code class="function">g_object_set_data()</code>.
</p></li>
<li class="listitem">
<p>
<span class="structname">GtkProgress</span>/<span class="structname">GtkProgressBar</span>
had serious problems in GTK+ 1.2.
</p>
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: circle; ">
<li class="listitem"><p>
Only 3 or 4 functions are really needed for 95% of progress interfaces;
<span class="structname">GtkProgress</span>/<span class="structname">GtkProgressBar</span>
had about 25 functions, and didn't even include these 3 or 4.
</p></li>
<li class="listitem"><p>
In activity mode, the API involves setting the adjustment
to any random value, just to have the side effect of
calling the progress bar update function - the adjustment
is totally ignored in activity mode.
</p></li>
<li class="listitem"><p>
You set the activity step as a pixel value, which means to
set the activity step you basically need to connect to
size_allocate.
</p></li>
<li class="listitem"><p>
There are <code class="function">ctree_set_expander_style()</code>-functions, to
randomly change look-and-feel for no good reason.
</p></li>
<li class="listitem"><p>
The split between <span class="structname">GtkProgress</span> and
<span class="structname">GtkProgressBar</span> makes no sense to me whatsoever.
</p></li>
</ul></div>
<p>
This was a big wart on GTK+ and made people waste lots of time,
both learning and using the interface.
So, we have added what we feel is the correct API, and marked all the
rest deprecated. However, the changes are 100% backward-compatible and
should break no existing code.
The following 5 functions are the new programming interface and you
should consider changing your code to use them:
</p>
<pre class="programlisting">
void gtk_progress_bar_pulse (GtkProgressBar *pbar);
void gtk_progress_bar_set_text (GtkProgressBar *pbar,
const gchar *text);
void gtk_progress_bar_set_fraction (GtkProgressBar *pbar,
gfloat fraction);
void gtk_progress_bar_set_pulse_step (GtkProgressBar *pbar,
gfloat fraction);
void gtk_progress_bar_set_orientation (GtkProgressBar *pbar,
GtkProgressBarOrientation orientation);
</pre>
<p>
</p>
</li>
<li class="listitem"><p>
The <span class="structname">GtkNotebookPage</span> structure has been removed from
the public header files;
this was never meant to be a public structure, and all functionality that
could be done by accessing the struct fields of this structure should be
accessible otherwise.
</p></li>
<li class="listitem"><p>
Negative values of the <em class="parameter"><code>position</code></em> parameter to
<code class="function">gtk_notebook_reorder_child()</code> now cause the page to be appended, not
inserted at the beginning. (This gives consistency with
<code class="function">gtk_box_reorder_child()</code>, <code class="function">gtk_menu_reorder_child()</code>.)
</p></li>
<li class="listitem">
<p>
<code class="function">GtkMenuPositionFunc</code> has a new parameter
<code class="literal">push_in</code> which controls how menus placed outside the
screen is handled. If this is set to <code class="literal">TRUE</code> and
part of the menu is outside the screen then GTK+ pushes it into the visible
area. Otherwise the menu is cut of at the end of the visible screen area.
</p>
<p>
Regardless of what happens to the size of the menu, the result is always
that the items are placed in the same place as if the menu was placed
outside the screen, using menu scrolling if necessary.
</p>
</li>
<li class="listitem"><p>
The "draw" signal and virtual method on <span class="structname">GtkWidget</span>
has been removed.
All drawing should now occur by invalidating a region of the widget
(call <code class="function">gdk_window_invalidate_rect()</code> or
<code class="function">gtk_widget_queue_draw()</code> for example to invalidate
a region). GTK+ merges all invalid regions, and sends expose events to
the widget in an idle handler for the invalid regions.
<code class="function">gtk_widget_draw()</code> is deprecated but still works; it
adds the passed-in area to the invalid region and immediately sends
expose events for the current invalid region.
Most widgets will work fine if you just delete their "draw"
implementation, since they will already have working expose_event
implementations. The draw method was rarely called in practice
anyway.
</p></li>
<li class="listitem"><p>
The <span class="structname">GdkExposeEvent</span> has a new <em class="structfield"><code>region</code></em>
field. This can be used instead of the <em class="structfield"><code>area</code></em> field if you
want a more exact representation of the area to update.
</p></li>
<li class="listitem"><p>
Sending synthetic exposes using <code class="function">gtk_widget_event()</code> is no
longer allowed. If you just need an expose call you should use
<code class="function">gdk_window_invalidate_rect()</code> or
<code class="function">gdk_window_invalidate_region()</code> instead. For the case
of container widgets that need to propagate expose events to
<code class="literal">NO_WINDOW</code> children you can either use
<code class="function">gtk_container_propagate_expose()</code>, or chain to the
default container expose handler.
</p></li>
<li class="listitem"><p>
The draw_default and draw_focus methods/signals on
<span class="structname">GtkWidget</span> are gone; simply draw things in your
expose handler. <code class="function">gtk_widget_draw_focus()</code> and
<code class="function">gtk_widget_draw_default()</code> wrapper
functions are also gone; just queue a draw on the widget,
or the part affected by the focus/default anyway.
Also, <span class="structname">GtkWidget</span> now has default implementations for
focus_in_event and focus_out_event. These set/unset
<code class="literal">GTK_HAS_FOCUS</code>, and queue a draw. So if your focus in/out
handler just does that, you can delete it.
</p></li>
<li class="listitem"><p>
<span class="structname">GtkText</span> and <span class="structname">GtkTree</span> are
buggy and broken. We don't recommend using them, and changing old code to
avoid them is a good idea. The recommended alternatives are
<span class="structname">GtkTextView</span> and <span class="structname">GtkTreeView</span>.
The broken widgets are not declared in the headers by default; to use
them, define the symbol <code class="literal">GTK_ENABLE_BROKEN</code> during
compilation. In some future release, these widgets will be removed from GTK+.
</p></li>
<li class="listitem"><p>
<span class="structname">GdkColorContext</span> is gone; you probably weren't using
it anyway. Use <span class="structname">GdkColormap</span> and the
<code class="function">gdk_rgb_*</code> functions instead.
</p></li>
<li class="listitem"><p>
<span class="structname">GtkMenuBar</span> now draws the <em class="structfield"><code>GtkContainer::border_width</code></em>
space outside the frame, not inside the frame.
</p></li>
<li class="listitem"><p>
In GTK+ 1.2, if an event handler returned <code class="literal">TRUE</code> it prevented
propagation of that event to parent widgets. That is, the
event signal would not be emitted on parent widgets. In
GTK+ 2.0, if an event handler returns <code class="literal">TRUE</code>, the current
signal emission on the current widget is immediately stopped. That is,
other callbacks connected to the signal will not be invoked.
</p></li>
<li class="listitem">
<p>
<code class="function">gtk_toolbar_new()</code> no longer has arguments. This function
was broken because the default <code class="literal">GtkToolbarStyle</code> (icons,
text, both) is now a user preference, which is overridden when you call
<code class="function">gtk_toolbar_set_style()</code>. The constructor forced everyone
to override the preference, which was undesirable. So to port
your app, decide if you want to force the toolbar style
or conform to the user's global defaults; if you want to force
it, call <code class="function">gtk_toolbar_set_style()</code>.
</p>
<p>
The orientation arg was removed from <code class="function">gtk_toolbar_new()</code>
as well, just because it wasn't very useful and we were breaking the function
anyway so had an opportunity to lose it. Call
<code class="function">gtk_toolbar_set_orientation()</code> to set toolbar orientation.
</p>
</li>
<li class="listitem">
<p>
<span class="structname">GtkRange</span>/<span class="structname">GtkScrollbar</span>/<span class="structname">GtkScale</span> were rewritten; this means that most
theme engines won't draw them properly, and any custom subclasses of
these widgets will need a rewrite (though if you could figure out
how to subclass the old version of <span class="structname">GtkRange</span>, you
have our respect). Also, <code class="literal">GtkTroughType</code> is gone.
</p>
<p>
Here are some notable changes:
</p>
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: circle; ">
<li class="listitem"><p>
<code class="literal">stepper_size</code> style property is the height for
vertical ranges, width for horizontal; the other dimension matches
the trough size.
</p></li>
<li class="listitem"><p>
Added the ability to do NeXT-style steppers (and several other styles
that don't make any sense).
</p></li>
<li class="listitem"><p>
Added <code class="literal">min_slider_length</code>,
<code class="literal">fixed_slider_length</code> properties to
<span class="structname">GtkScrollbar</span>.
</p></li>
<li class="listitem"><p>
Cleaned some private (or at least useless) functions out of
<code class="filename">gtkscale.h</code>, e.g.
<code class="function">gtk_scale_value_width</code>.
</p></li>
<li class="listitem"><p>
Moved bindings from subclasses to <span class="structname">GtkScale</span>,
even arrow keys, since blind users don't know scale orientation.
</p></li>
<li class="listitem"><p>
Changed <code class="literal">move_slider</code> action signal to use new
<span class="structname">GtkScrollType</span>, remove
<span class="structname">GtkTroughType</span> argument.
</p></li>
<li class="listitem"><p>
Digits rounds the values a range will input to the given
number of decimals, but will not try to force adjustment
values set by other controllers. That is, we no longer
modify <code class="literal">adjustment->value</code> inside a
<code class="literal">value_changed</code> handler.
</p></li>
<li class="listitem"><p>
Added getters for <span class="structname">GtkScale</span> setters.
</p></li>
<li class="listitem"><p>
Middle-click begins a slider drag.
</p></li>
</ul></div>
<p>
</p>
</li>
<li class="listitem">
<p>
The GtkContainer::focus signal/virtual function and
<code class="function">gtk_container_focus()</code> call were replaced by
GtkWidget::focus and <code class="function">gtk_widget_child_focus()</code>.
The semantics are the same, so you should be able to just
replace <code class="literal">container_class->focus = mywidget_focus</code> with
<code class="literal">widget_class->focus = mywidget_focus</code> and replace
<code class="function">gtk_container_focus()</code> calls with
<code class="function">gtk_widget_child_focus()</code> calls.
</p>
<p>
The purpose of this change was to allow non-containers to have
focusable elements.
</p>
</li>
<li class="listitem"><p>
<code class="function">gtk_rc_set_image_loader()</code> and
<code class="function">gtk_rc_load_image()</code> have been removed, now
that GTK+ includes decent image loading capabilities itself.
</p></li>
<li class="listitem"><p>
An extra <span class="structname">GtkSettings</span> argument has been added to
<code class="function">gtk_rc_find_pixmap_in_path()</code>. This function is only
actually useful from a theme engine during parsing, at which point the
<span class="structname">GtkSettings</span> is provided.
</p></li>
<li class="listitem"><p>
The child argument facility in <code class="filename">gtkcontainer.c</code> has been
converted to a child property facility using
<span class="structname">GParamSpec</span> and other facilities
for <span class="structname">GObject</span>.
</p></li>
<li class="listitem"><p>
The <code class="function">set_child_arg()</code> and <code class="function">get_child_arg()</code>
virtual methods have been replaced with <code class="function">set_child_property()</code>/<code class="function">get_child_property()</code>, which
work similar to GObject->set_property/get_property.
</p></li>
<li class="listitem">
<p>
Other removed <span class="structname">GtkContainer</span> functions with the replacements:
</p>
<div class="informaltable"><table class="informaltable" border="1">
<colgroup>
<col>
<col>
</colgroup>
<thead><tr>
<th>Old function</th>
<th>Replacement</th>
</tr></thead>
<tbody>
<tr>
<td><code class="function">gtk_container_add_child_arg_type</code></td>
<td><code class="function">gtk_container_class_install_child_property</code></td>
</tr>
<tr>
<td><code class="function">gtk_container_query_child_args</code></td>
<td><code class="function">gtk_container_class_list_child_properties</code></td>
</tr>
<tr>
<td><code class="function">gtk_container_child_getv</code></td>
<td><code class="function">gtk_container_child_set_property</code></td>
</tr>
<tr>
<td><code class="function">gtk_container_child_setv</code></td>
<td><code class="function">gtk_container_child_get_property</code></td>
</tr>
<tr>
<td><code class="function">gtk_container_add_with_args</code></td>
<td><code class="function">gtk_container_add_with_properties</code></td>
</tr>
<tr>
<td><code class="function">gtk_container_addv</code></td>
<td>
<code class="function">gtk_container_add</code>/<code class="function">gtk_container_child_set_property</code>
</td>
</tr>
</tbody>
</table></div>
<p>
</p>
</li>
<li class="listitem"><p>
<code class="function">gdk_image_get()</code> (or rather its replacement,
<code class="function">gdk_drawable_get_image()</code>) now handles errors properly
by returning <code class="literal">NULL</code>, previously it would crash. Also, a
window being offscreen is no longer considered an error; instead, the area
contains undefined contents for the offscreen areas. In most cases, code
using <code class="function">gdk_image_get()</code> should really be ported to
<code class="function">gdk_pixbuf_get_from_drawable()</code>.
</p></li>
<li class="listitem"><p>
<code class="function">gtk_widget_set_usize()</code> has been renamed to
<code class="function">gtk_widget_set_size_request()</code>, however the old name
still exists unless you define <code class="literal">GTK_DISABLE_DEPRECATED</code>.
</p></li>
<li class="listitem"><p>
<code class="function">gtk_widget_set_uposition()</code> is deprecated; use
<code class="function">gtk_window_move()</code>,
<code class="function">gtk_fixed_put()</code>, or <code class="function">gtk_layout_put()</code>
instead.
</p></li>
<li class="listitem"><p>
<code class="function">gtk_window_set_policy()</code> is deprecated. To get the effect of
"allow_shrink", call
<code class="literal">gtk_widget_set_size_request (window, 0, 0)</code>. To get the
effect of "allow_grow", call
<code class="literal">gtk_window_set_resizable (window, TRUE)</code>. You didn't want
the effect of "auto_shrink", it made no sense. But maybe if you were using
it you want to use <code class="literal">gtk_window_resize (window, 1, 1)</code> to
snap a window back to its minimum size (the 1, 1 will be rounded up to the
minimum window size).
</p></li>
<li class="listitem"><p>
The core GTK+ now takes care of handling mapping, unmapping and
realizing the child widgets of containers in
<code class="function">gtk_widget_set_parent()</code>. In most cases, this allows
container implementations to be simplified by removing the code in
<code class="function">add()</code> methods to map and realize children. However,
there are a couple of things to watch out for here:
</p></li>
<li class="listitem"><p>
If the parent is realized before the <code class="function">add()</code> happens,
<code class="function">gtk_widget_set_parent_window()</code> must be called before
<code class="function">gtk_widget_set_parent()</code>, since
<code class="function">gtk_widget_set_parent()</code> will realize the child.
</p></li>
<li class="listitem">
<p>
If a container depended on its children not being mapped
unless it did so itself (for example, <span class="structname">GtkNotebook</span>
only mapped the current page), then the new function
<code class="function">gtk_widget_set_child_visible()</code> must be called to keep
widgets that should not be mapped not mapped.
</p>
<p>
As part of this change, most containers also will no longer need custom
implementations of the <code class="function">map()</code> and
<code class="function">unmap()</code> virtual functions. The only cases where this
is necessary are:
</p>
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: circle; ">
<li class="listitem"><p>
For <code class="literal">!NO_WINDOW</code> widgets, if you create children of
<code class="literal">widget->window</code>
and don't map them in <code class="function">realize()</code> then you must map them
in <code class="function">map()</code>. [ In almost all cases, you can simply map the
windows in <code class="function">realize()</code>. ]
</p></li>
<li class="listitem"><p>
For <code class="literal">NO_WINDOW</code> widgets, if you create windows in your
<code class="function">realize()</code> method, you must map then in
<code class="function">map()</code> and unmap them in <code class="function">unmap()</code>.
</p></li>
</ul></div>
<p>
</p>
</li>
<li class="listitem"><p>
<code class="function">gtk_widget_set_default_style()</code>,
<code class="function">gtk_widget_push_style()</code>,
and <code class="function">gtk_widget_pop_style()</code> have been removed, since they
did not work properly with themes and there were better
alternatives for modifying the appearance of widgets.
You should generally use <code class="function">gtk_widget_modify_*()</code>
instead.
</p></li>
<li class="listitem"><p>
<code class="function">gtk_image_new()</code> now takes no arguments and creates an
empty <span class="structname">GtkImage</span> widget. To create a
<span class="structname">GtkImage</span> widget from a
<span class="structname">GdkImage</span> (the least
common usage of <span class="structname">GdkImage</span>), use
<code class="function">gtk_image_new_from_image()</code>.
</p></li>
<li class="listitem"><p>
<code class="literal">GTK_SELECTION_EXTENDED</code> is now deprecated, and neither the
<span class="structname">GtkList</span>/<span class="structname">GtkTree</span> nor the
<span class="structname">GtkCList</span>/<span class="structname">GtkCTree</span> support
<code class="literal">GTK_SELECTION_EXTENDED</code> anymore. However, the old extended
behavior replaces <code class="literal">MULTIPLE</code> behavior.
</p></li>
<li class="listitem">
<p>
The following variables are no longer exported from GDK. (Other variables
are also no longer exported; the following are the ones found used
externally in a large sample of GTK+ code.)
</p>
<div class="informaltable"><table class="informaltable" border="1">
<colgroup>
<col>
<col>
</colgroup>
<thead><tr>
<th>Variable</th>
<th>Replacement</th>
</tr></thead>
<tbody>
<tr>
<td><code class="literal">gdk_null_window_warnings</code></td>
<td>None - did nothing in GTK+ 1.2</td>
</tr>
<tr>
<td><code class="literal">gdk_leader_window</code></td>
<td>None - private variable</td>
</tr>
<tr>
<td><code class="literal">gdk_screen</code></td>
<td><code class="function">gdk_x11_get_default_screen ()</code></td>
</tr>
<tr>
<td><code class="literal">gdk_root_window</code></td>
<td><code class="function">gdk_x11_get_default_root_xwindow ()</code></td>
</tr>
<tr>
<td><code class="literal">gdk_root_parent</code></td>
<td><code class="function">gdk_get_default_root_window ()</code></td>
</tr>
<tr>
<td><code class="literal">gdk_error_code</code></td>
<td><code class="function">gdk_error_trap_push ()/pop ()</code></td>
</tr>
<tr>
<td><code class="literal">gdk_error_warnings</code></td>
<td><code class="function">gdk_error_trap_push ()/pop ()</code></td>
</tr>
<tr>
<td><code class="literal">gdk_display_name</code></td>
<td><code class="function">gdk_get_display ()</code></td>
</tr>
<tr>
<td><code class="literal">gdk_wm_delete_window</code></td>
<td><code class="literal">gdk_atom_intern ("WM_DELETE_WINDOW", FALSE)</code></td>
</tr>
<tr>
<td><code class="literal">gdk_wm_take_focus</code></td>
<td><code class="literal">gdk_atom_intern ("WM_TAKE_FOCUS", FALSE)</code></td>
</tr>
<tr>
<td><code class="literal">gdk_wm_protocols</code></td>
<td><code class="literal">gdk_atom_intern ("WM_PROTOCOLS", FALSE)</code></td>
</tr>
</tbody>
</table></div>
<p>
</p>
</li>
<li class="listitem">
<p>
The handling of colormaps and widgets has been changed:
</p>
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: circle; ">
<li class="listitem"><p>
The default colormap for widgets is now the <span class="structname">GdkRGB</span>
colormap, not the system default colormap. If you try to use resources
created for a widget (e.g., <code class="literal">widget->style</code>) with
a window using the system colormap, errors will result on some machines.
</p></li>
<li class="listitem"><p>
<code class="function">gtk_widget_push()</code>/<code class="function">gtk_widget_pop_colormap()</code>
only cause the colormap to be explicitly set on toplevel widgets, not on
all widgets. The colormap for other widgets (when not set using
<code class="function">gtk_widget_set_colormap()</code>), is determined by finding
the nearest ancestor with a colormap set on it explicitly, or if that
fails, the default colormap.
</p></li>
</ul></div>
<p>
</p>
</li>
<li class="listitem"><p>
The default selected day for <span class="structname">GtkCalendar</span> is now the
current day in the month, not the first day in the month. The current month
and year were already used.
</p></li>
<li class="listitem"><p>
GDK is no longer put into threaded mode automatically when
<code class="function">g_thread_init()</code> has been called. In order to use the
global GDK thread mutex with <code class="function">gdk_threads_enter()</code> and
<code class="function">gdk_threads_leave()</code>, you must call
<code class="function">gdk_threads_init()</code> explicitly.
If you aren't using GDK and GTK+ functions from multiple threads,
there is no reason to call <code class="function">gdk_threads_init()</code>.
</p></li>
<li class="listitem"><p>
The <span class="structname">GtkPreviewInfo</span> struct has had its visual and
colormap fields removed. Also, <code class="function">gtk_preview_get_cmap()</code>
and <code class="function">gtk_preview_get_visual()</code> are deprecated, as
<span class="structname">GdkRGB</span> works on any colormap and visual. You no
longer need to
<code class="literal">gtk_widget_push_cmap (gtk_preview_get_cmap ())</code> in
your code.
</p></li>
<li class="listitem"><p>
The <span class="structname">GtkBox</span>, <span class="structname">GtkTable</span>, and
<span class="structname">GtkAlignment</span> widgets now call
<code class="literal">gtk_widget_set_redraw_on_allocate (widget, FALSE);</code> on
themselves. If you want to actually draw contents in a widget derived from
one of these widgets, you'll probably want to change this
in your <code class="function">init()</code> function.
</p></li>
<li class="listitem">
<p>
A number of widgets are now <code class="literal">NO_WINDOW</code> widgets (most
importantly <span class="structname">GtkButton</span>, but also
<span class="structname">GtkRange</span> and <span class="structname">GtkNotebook</span>)
This has a couple of effects:
</p>
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: circle; ">
<li class="listitem"><p>
If you are deriving from one of these widgets, you need to
adapt your code appropriately -- for instance, drawing coordinates
start from <code class="literal">widget->allocation.x, widget->allocation.y</code>.
</p></li>
<li class="listitem"><p>
If you are embedding one of these widgets in a custom widget,
you must make sure you call <code class="function">gtk_container_propagate_expose()</code>
correctly, as you must for any <code class="literal">NO_WINDOW</code> widgets.
</p></li>
</ul></div>
<p>
</p>
<p>
<span class="structname">GtkFixed</span> is a little special; it is now created by
default as a <code class="literal">NO_WINDOW</code> widget, but if you do
</p>
<pre class="programlisting">
gtk_fixed_set_has_window (fixed, TRUE);
</pre>
<p>
after creating a fixed widget, it will create a window and
handle it properly.
</p>
</li>
<li class="listitem"><p>
<span class="structname">GtkLayout</span> no longer has the <em class="structfield"><code>xoffset</code></em>,
<em class="structfield"><code>yoffset</code></em> fields, which used to store the difference between
world and window coordinates for <code class="literal">layout->bin_window</code>.
These coordinate systems are now always the same.
</p></li>
<li class="listitem">
<p>
<code class="function">gtk_paint_focus()</code>, <code class="function">gtk_draw_focus()</code>
and <code class="function">GtkStyle::draw_focus()</code>
have been changed a bit:
</p>
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: circle; ">
<li class="listitem"><p>
A <code class="literal">GtkStateType</code> argument has been added to <code class="function">gtk_paint_focus()</code>.
</p></li>
<li class="listitem"><p>
The default implementation of the <code class="function">GtkStyle::draw_focus()</code>
virtual function now draws a focus rectangle whose width is
determined by the GtkWidget::focus-width style property.
</p></li>
<li class="listitem"><p>
The rectangle passed in is the bounding box, instead of
the rectangle used in the <code class="function">gdk_draw_rectangle()</code> call,
so it is no longer necessary to subtract 1 from the width and height.
</p></li>
</ul></div>
<p>
</p>
</li>
</ul></div>
</div>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.26.1</div>
</body>
</html>