[gtk+] Add a migration guide section about GdkDrawable



commit 74f7e08811bb69d27e067b46c815f504b8cc8f13
Author: Matthias Clasen <mclasen redhat com>
Date:   Sun Jan 23 12:26:23 2011 -0500

    Add a migration guide section about GdkDrawable
    
    https://bugzilla.gnome.org/show_bug.cgi?id=640188

 docs/reference/gtk/migrating-2to3.xml |   35 ++++++++++++++++++++++++++++++++-
 1 files changed, 34 insertions(+), 1 deletions(-)
---
diff --git a/docs/reference/gtk/migrating-2to3.xml b/docs/reference/gtk/migrating-2to3.xml
index 6022ce7..40111d0 100644
--- a/docs/reference/gtk/migrating-2to3.xml
+++ b/docs/reference/gtk/migrating-2to3.xml
@@ -606,6 +606,7 @@ gtk_fixed_get_preferred_height (GtkWidget *widget,
       find-and-replace task. Please refer to the following table:
       <table>
         <tgroup cols="2">
+          <title>GdkRegion to cairo_region_t</title>
           <thead>
             <row><entry>GDK</entry><entry>cairo</entry></row>
           </thead>
@@ -697,7 +698,7 @@ g_object_unref (pixbuf);
   </section>
 
   <section>
-    <title>Replace colormaps by visuals</title>
+    <title>Replace GdkColormap by GdkVisual</title>
     <para>
       For drawing with cairo, it is not necessary to allocate colors, and
       a #GdkVisual provides enough information for cairo to handle colors
@@ -747,6 +748,38 @@ on_alpha_screen_changed (GtkWindow *window,
   </section>
 
   <section>
+    <title>GdkDrawable is gone</title>
+
+    <para>
+      #GdkDrawable has been removed in GTK+ 3, together with #GdkPixmap
+      and #GdkImage. The only remaining drawable class is #GdkWindow.
+      For dealing with image data, you should use cairo surfaces or
+      #GdkPixbufs.
+    </para>
+
+    <para>
+      GdkDrawable functions that are useful with windows have been replaced
+      by corresponding GdkWindow functions:
+      <table>
+        <title>GdkDrawable to GdkWindow</title>
+        <tgroup cols="2">
+          <thead>
+            <row><entry>GDK 2.x</entry><entry>GDK 3</entry></row>
+          </thead>
+          <tbody>
+            <row><entry>gdk_drawable_get_visual()</entry><entry>gdk_window_get_visual()</entry></row>
+            <row><entry>gdk_drawable_get_size()</entry><entry>gdk_window_get_width()
+                                                              gdk_window_get_height()</entry></row>
+            <row><entry>gdk_pixbuf_get_from_drawable()</entry><entry>gdk_pixbuf_get_from_window()</entry></row>
+            <row><entry>gdk_drawable_get_clip_region()</entry><entry>gdk_window_get_clip_region()</entry></row>
+            <row><entry>gdk_drawable_get_visible_region()</entry><entry>gdk_window_get_visible_region()</entry></row>
+          </tbody>
+        </tgroup>
+      </table>
+    </para>
+  </section>
+
+  <section>
     <title>Backend-specific code</title>
     <para>
       In GTK+ 2.x, GDK could only be compiled for one backend at a time,



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]