[gtkmm] Gdk::Window: Wrapped new methods.



commit c13181f0d247cdf7af70dec1331cac90aef1b617
Author: Murray Cumming <murrayc murrayc com>
Date:   Sun Sep 6 18:37:24 2009 +0200

    Gdk::Window: Wrapped new methods.
    
    * gdk/src/gdk_methods.defs: Regenerated.
    * gdk/src/window.[hg|cc]: Added redirect_to_drawable(),
    remove_redirection(), geometry_changed(), get_root_coords(), restack().

 ChangeLog                |    8 +
 configure.ac             |    2 +-
 gdk/src/gdk_docs.xml     |   22 +-
 gdk/src/gdk_methods.defs | 1137 +++++++++++++++++++++++++++++++++++++++++++++-
 gdk/src/window.ccg       |    5 +
 gdk/src/window.hg        |   37 ++-
 6 files changed, 1197 insertions(+), 14 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 60ccaa9..47cabeb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
 2009-09-06  Murray Cumming  <murrayc murrayc com>
 
+	Gdk::Window: Wrapped new methods.
+
+	* gdk/src/gdk_methods.defs: Regenerated.
+	* gdk/src/window.[hg|cc]: Added redirect_to_drawable(), 
+	remove_redirection(), geometry_changed(), get_root_coords(), restack().
+
+2009-09-06  Murray Cumming  <murrayc murrayc com>
+
 	* gtk/src/widget.[hg|ccg]: Put the usual ifdefs around the newly 
 	deprecated methods.
 
diff --git a/configure.ac b/configure.ac
index cc21118..9d78dc3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -54,7 +54,7 @@ AS_IF([test "x$enable_static" = xyes],
 AC_SUBST([ATKMM_MODULES], ['glibmm-2.4 >= 2.21.2 atk >= 1.9.0'])
 
 # gdkmm really does need GTK+, because part of Gdk::DragContext is in GTK+.
-AC_SUBST([GDKMM_MODULES], ['giomm-2.4 >= 2.21.2 pangomm-1.4 >= 2.14.0 gtk+-2.0 >= 2.17.9'])
+AC_SUBST([GDKMM_MODULES], ['giomm-2.4 >= 2.21.2 pangomm-1.4 >= 2.14.0 gtk+-2.0 >= 2.17.11'])
 
 AS_IF([test "x$gtkmm_host_windows" = xyes],
       [GTKMM_MODULES=$GDKMM_MODULES],
diff --git a/gdk/src/gdk_docs.xml b/gdk/src/gdk_docs.xml
index 1ed28ba..c5813c5 100644
--- a/gdk/src/gdk_docs.xml
+++ b/gdk/src/gdk_docs.xml
@@ -12365,8 +12365,8 @@ from inline data as in the below example.
 &lt;programlisting&gt;
 /&lt;!-- --&gt;* This data is in X bitmap format, and can be created with the 'bitmap'
 utility. *&lt;!-- --&gt;/
-&num;define cursor1_width 16
-&num;define cursor1_height 16
+#define cursor1_width 16
+#define cursor1_height 16
 static unsigned char cursor1_bits[] = {
 0x80, 0x01, 0x40, 0x02, 0x20, 0x04, 0x10, 0x08, 0x08, 0x10, 0x04, 0x20,
 0x82, 0x41, 0x41, 0x82, 0x41, 0x82, 0x82, 0x41, 0x04, 0x20, 0x08, 0x10,
@@ -14141,14 +14141,14 @@ symbol is shifted, so when comparing a key press to a
 be masked out.
 &lt;/para&gt;
 &lt;informalexample&gt;&lt;programlisting&gt;
-&sol;* We want to ignore irrelevant modifiers like ScrollLock *&sol;
-&num;define ALL_ACCELS_MASK (GDK_CONTROL_MASK | GDK_SHIFT_MASK | GDK_MOD1_MASK)
+* We want to ignore irrelevant modifiers like ScrollLock *
+#define ALL_ACCELS_MASK (GDK_CONTROL_MASK | GDK_SHIFT_MASK | GDK_MOD1_MASK)
 gdk_keymap_translate_keyboard_state (keymap, event-&gt;hardware_keycode,
 event-&gt;state, event-&gt;group,
 &amp;keyval, NULL, NULL, &amp;consumed);
 if (keyval == GDK_PLUS &amp;&amp;
 (event-&gt;state &amp; ~consumed &amp; ALL_ACCELS_MASK) == GDK_CONTROL_MASK)
-&sol;* Control was pressed *&sol;
+* Control was pressed *
 &lt;/programlisting&gt;&lt;/informalexample&gt;
 &lt;para&gt;
 An older interpretation @consumed_modifiers was that it contained
@@ -14156,10 +14156,10 @@ all modifiers that might affect the translation of the key;
 this allowed accelerators to be stored with irrelevant consumed
 modifiers, by doing:&lt;/para&gt;
 &lt;informalexample&gt;&lt;programlisting&gt;
-&sol;* XXX Don't do this XXX *&sol;
+* XXX Don't do this XXX *
 if (keyval == accel_keyval &amp;&amp;
 (event-&gt;state &amp; ~consumed &amp; ALL_ACCELS_MASK) == (accel_mods &amp; ~consumed))
-&sol;* Accelerator was pressed *&sol;
+* Accelerator was pressed *
 &lt;/programlisting&gt;&lt;/informalexample&gt;
 &lt;para&gt;
 However, this did not work if multi-modifier combinations were
@@ -16945,11 +16945,11 @@ structure. The color is &lt;emphasis&gt;not&lt;/emphasis&gt; allocated, you
 must call gdk_colormap_alloc_color() yourself. The string can
 either one of a large set of standard names. (Taken from the X11
 &lt;filename&gt;rgb.txt&lt;/filename&gt; file), or it can be a hex value in the
-form '&num;rgb' '&num;rrggbb' '&num;rrrgggbbb' or
-'&num;rrrrggggbbbb' where 'r', 'g' and 'b' are hex digits of the
+form '#rgb' '#rrggbb' '#rrrgggbbb' or
+'#rrrrggggbbbb' where 'r', 'g' and 'b' are hex digits of the
 red, green, and blue components of the color, respectively. (White
-in the four forms is '&num;fff' '&num;ffffff' '&num;fffffffff' and
-'&num;ffffffffffff')
+in the four forms is '#fff' '#ffffff' '#fffffffff' and
+'#ffffffffffff')
 
 
 </description>
diff --git a/gdk/src/gdk_methods.defs b/gdk/src/gdk_methods.defs
index 49cd6bc..972200b 100644
--- a/gdk/src/gdk_methods.defs
+++ b/gdk/src/gdk_methods.defs
@@ -62,6 +62,34 @@
   (gtype-id "GDK_TYPE_PANGO_RENDERER")
 )
 
+(define-object Pixbuf
+  (in-module "Gdk")
+  (parent "GObject")
+  (c-name "GdkPixbuf")
+  (gtype-id "GDK_TYPE_PIXBUF")
+)
+
+(define-object PixbufAnimation
+  (in-module "Gdk")
+  (parent "GObject")
+  (c-name "GdkPixbufAnimation")
+  (gtype-id "GDK_TYPE_PIXBUF_ANIMATION")
+)
+
+(define-object PixbufAnimationIter
+  (in-module "Gdk")
+  (parent "GObject")
+  (c-name "GdkPixbufAnimationIter")
+  (gtype-id "GDK_TYPE_PIXBUF_ANIMATION_ITER")
+)
+
+(define-object PixbufLoader
+  (in-module "Gdk")
+  (parent "GObject")
+  (c-name "GdkPixbufLoader")
+  (gtype-id "GDK_TYPE_PIXBUF_LOADER")
+)
+
 (define-object PixmapObject
   (in-module "Gdk")
   (parent "GdkDrawable")
@@ -174,6 +202,7 @@
     '("owner-change" "GDK_OWNER_CHANGE")
     '("grab-broken" "GDK_GRAB_BROKEN")
     '("damage" "GDK_DAMAGE")
+    '("event-last" "GDK_EVENT_LAST")
   )
 )
 
@@ -688,6 +717,7 @@
     '("dialog" "GDK_WINDOW_DIALOG")
     '("temp" "GDK_WINDOW_TEMP")
     '("foreign" "GDK_WINDOW_FOREIGN")
+    '("offscreen" "GDK_WINDOW_OFFSCREEN")
   )
 )
 
@@ -810,6 +840,106 @@
   )
 )
 
+(define-enum PixbufAlphaMode
+  (in-module "Gdk")
+  (c-name "GdkPixbufAlphaMode")
+  (gtype-id "GDK_TYPE_PIXBUF_ALPHA_MODE")
+  (values
+    '("bilevel" "GDK_PIXBUF_ALPHA_BILEVEL")
+    '("full" "GDK_PIXBUF_ALPHA_FULL")
+  )
+)
+
+(define-enum Colorspace
+  (in-module "Gdk")
+  (c-name "GdkColorspace")
+  (gtype-id "GDK_TYPE_COLORSPACE")
+  (values
+    '("rgb" "GDK_COLORSPACE_RGB")
+  )
+)
+
+(define-enum PixbufError
+  (in-module "Gdk")
+  (c-name "GdkPixbufError")
+  (gtype-id "GDK_TYPE_PIXBUF_ERROR")
+  (values
+    '("corrupt-image" "GDK_PIXBUF_ERROR_CORRUPT_IMAGE")
+    '("insufficient-memory" "GDK_PIXBUF_ERROR_INSUFFICIENT_MEMORY")
+    '("bad-option" "GDK_PIXBUF_ERROR_BAD_OPTION")
+    '("unknown-type" "GDK_PIXBUF_ERROR_UNKNOWN_TYPE")
+    '("unsupported-operation" "GDK_PIXBUF_ERROR_UNSUPPORTED_OPERATION")
+    '("failed" "GDK_PIXBUF_ERROR_FAILED")
+  )
+)
+
+(define-flags PixbufFormatFlags
+  (in-module "Gdk")
+  (c-name "GdkPixbufFormatFlags")
+  (gtype-id "GDK_TYPE_PIXBUF_FORMAT_FLAGS")
+  (values
+    '("writable" "GDK_PIXBUF_FORMAT_WRITABLE")
+    '("scalable" "GDK_PIXBUF_FORMAT_SCALABLE")
+    '("threadsafe" "GDK_PIXBUF_FORMAT_THREADSAFE")
+  )
+)
+
+(define-enum InterpType
+  (in-module "Gdk")
+  (c-name "GdkInterpType")
+  (gtype-id "GDK_TYPE_INTERP_TYPE")
+  (values
+    '("nearest" "GDK_INTERP_NEAREST")
+    '("tiles" "GDK_INTERP_TILES")
+    '("bilinear" "GDK_INTERP_BILINEAR")
+    '("hyper" "GDK_INTERP_HYPER")
+  )
+)
+
+(define-enum PixbufRotation
+  (in-module "Gdk")
+  (c-name "GdkPixbufRotation")
+  (gtype-id "GDK_TYPE_PIXBUF_ROTATION")
+  (values
+    '("none" "GDK_PIXBUF_ROTATE_NONE")
+    '("counterclockwise" "GDK_PIXBUF_ROTATE_COUNTERCLOCKWISE")
+    '("upsidedown" "GDK_PIXBUF_ROTATE_UPSIDEDOWN")
+    '("clockwise" "GDK_PIXBUF_ROTATE_CLOCKWISE")
+  )
+)
+
+(define-flags PixdataType
+  (in-module "Gdk")
+  (c-name "GdkPixdataType")
+  (gtype-id "GDK_TYPE_PIXDATA_TYPE")
+  (values
+    '("color-type-rgb" "GDK_PIXDATA_COLOR_TYPE_RGB")
+    '("color-type-rgba" "GDK_PIXDATA_COLOR_TYPE_RGBA")
+    '("color-type-mask" "GDK_PIXDATA_COLOR_TYPE_MASK")
+    '("sample-width-8" "GDK_PIXDATA_SAMPLE_WIDTH_8")
+    '("sample-width-mask" "GDK_PIXDATA_SAMPLE_WIDTH_MASK")
+    '("encoding-raw" "GDK_PIXDATA_ENCODING_RAW")
+    '("encoding-rle" "GDK_PIXDATA_ENCODING_RLE")
+    '("encoding-mask" "GDK_PIXDATA_ENCODING_MASK")
+  )
+)
+
+(define-flags PixdataDumpType
+  (in-module "Gdk")
+  (c-name "GdkPixdataDumpType")
+  (gtype-id "GDK_TYPE_PIXDATA_DUMP_TYPE")
+  (values
+    '("pixdata-stream" "GDK_PIXDATA_DUMP_PIXDATA_STREAM")
+    '("pixdata-struct" "GDK_PIXDATA_DUMP_PIXDATA_STRUCT")
+    '("macros" "GDK_PIXDATA_DUMP_MACROS")
+    '("gtypes" "GDK_PIXDATA_DUMP_GTYPES")
+    '("ctypes" "GDK_PIXDATA_DUMP_CTYPES")
+    '("static" "GDK_PIXDATA_DUMP_STATIC")
+    '("const" "GDK_PIXDATA_DUMP_CONST")
+    '("rle-decoder" "GDK_PIXDATA_DUMP_RLE_DECODER")
+  )
+)
+
 
 ;; From gdkalias.h
 
@@ -894,6 +1024,15 @@
   )
 )
 
+(define-function gdk_cairo_reset_clip
+  (c-name "gdk_cairo_reset_clip")
+  (return-type "none")
+  (parameters
+    '("cairo_t*" "cr")
+    '("GdkDrawable*" "drawable")
+  )
+)
+
 (define-function gdk_cairo_set_source_color
   (c-name "gdk_cairo_set_source_color")
   (return-type "none")
@@ -3689,6 +3828,11 @@
   )
 )
 
+(define-function gdk_offscreen_window_get_type
+  (c-name "gdk_offscreen_window_get_type")
+  (return-type "GType")
+)
+
 
 
 ;; From gdkintl.h
@@ -4549,6 +4693,15 @@
   )
 )
 
+(define-method rect_equal
+  (of-object "GdkRegion")
+  (c-name "gdk_region_rect_equal")
+  (return-type "gboolean")
+  (parameters
+    '("const-GdkRectangle*" "rectangle")
+  )
+)
+
 (define-method point_in
   (of-object "GdkRegion")
   (c-name "gdk_region_point_in")
@@ -5165,7 +5318,7 @@
 
 (define-function gdk_selection_property_get
   (c-name "gdk_selection_property_get")
-  (return-type "gboolean")
+  (return-type "gint")
   (parameters
     '("GdkWindow*" "requestor")
     '("guchar**" "data")
@@ -5404,6 +5557,12 @@
   (return-type "GdkWindowType")
 )
 
+(define-method is_destroyed
+  (of-object "GdkWindow")
+  (c-name "gdk_window_is_destroyed")
+  (return-type "gboolean")
+)
+
 (define-function gdk_window_at_pointer
   (c-name "gdk_window_at_pointer")
   (return-type "GdkWindow*")
@@ -5522,6 +5681,16 @@
   (return-type "none")
 )
 
+(define-method restack
+  (of-object "GdkWindow")
+  (c-name "gdk_window_restack")
+  (return-type "none")
+  (parameters
+    '("GdkWindow*" "sibling")
+    '("gboolean" "above")
+  )
+)
+
 (define-method focus
   (of-object "GdkWindow")
   (c-name "gdk_window_focus")
@@ -5608,6 +5777,12 @@
   )
 )
 
+(define-method ensure_native
+  (of-object "GdkWindow")
+  (c-name "gdk_window_ensure_native")
+  (return-type "gboolean")
+)
+
 (define-method shape_combine_mask
   (of-object "GdkWindow")
   (c-name "gdk_window_shape_combine_mask")
@@ -5919,6 +6094,12 @@
   )
 )
 
+(define-method get_cursor
+  (of-object "GdkWindow")
+  (c-name "gdk_window_get_cursor")
+  (return-type "GdkCursor*")
+)
+
 (define-method get_user_data
   (of-object "GdkWindow")
   (c-name "gdk_window_get_user_data")
@@ -5961,6 +6142,18 @@
   )
 )
 
+(define-method get_root_coords
+  (of-object "GdkWindow")
+  (c-name "gdk_window_get_root_coords")
+  (return-type "none")
+  (parameters
+    '("gint" "x")
+    '("gint" "y")
+    '("gint*" "root_x")
+    '("gint*" "root_y")
+  )
+)
+
 (define-method get_deskrelative_origin
   (of-object "GdkWindow")
   (c-name "gdk_window_get_deskrelative_origin")
@@ -6248,6 +6441,16 @@
   )
 )
 
+(define-method invalidate_maybe_recurse
+  (of-object "GdkWindow")
+  (c-name "gdk_window_invalidate_maybe_recurse")
+  (return-type "none")
+  (parameters
+    '("const-GdkRegion*" "region")
+    '("gboolean-(*" "child_func")
+  )
+)
+
 (define-method get_update_area
   (of-object "GdkWindow")
   (c-name "gdk_window_get_update_area")
@@ -6349,6 +6552,37 @@
   (return-type "GdkWindow*")
 )
 
+(define-function gdk_offscreen_window_get_pixmap
+  (c-name "gdk_offscreen_window_get_pixmap")
+  (return-type "GdkPixmap*")
+  (parameters
+    '("GdkWindow*" "window")
+  )
+)
+
+(define-function gdk_offscreen_window_set_embedder
+  (c-name "gdk_offscreen_window_set_embedder")
+  (return-type "none")
+  (parameters
+    '("GdkWindow*" "window")
+    '("GdkWindow*" "embedder")
+  )
+)
+
+(define-function gdk_offscreen_window_get_embedder
+  (c-name "gdk_offscreen_window_get_embedder")
+  (return-type "GdkWindow*")
+  (parameters
+    '("GdkWindow*" "window")
+  )
+)
+
+(define-method geometry_changed
+  (of-object "GdkWindow")
+  (c-name "gdk_window_geometry_changed")
+  (return-type "none")
+)
+
 (define-method redirect_to_drawable
   (of-object "GdkWindow")
   (c-name "gdk_window_redirect_to_drawable")
@@ -6380,3 +6614,904 @@
 )
 
 
+
+;; From gdk-pixbuf-alias.h
+
+
+
+;; From gdk-pixbuf-animation.h
+
+(define-function gdk_pixbuf_animation_get_type
+  (c-name "gdk_pixbuf_animation_get_type")
+  (return-type "GType")
+)
+
+(define-function gdk_pixbuf_animation_new_from_file
+  (c-name "gdk_pixbuf_animation_new_from_file")
+  (return-type "GdkPixbufAnimation*")
+  (parameters
+    '("const-char*" "filename")
+    '("GError**" "error")
+  )
+)
+
+(define-method ref
+  (of-object "GdkPixbufAnimation")
+  (c-name "gdk_pixbuf_animation_ref")
+  (return-type "GdkPixbufAnimation*")
+)
+
+(define-method unref
+  (of-object "GdkPixbufAnimation")
+  (c-name "gdk_pixbuf_animation_unref")
+  (return-type "none")
+)
+
+(define-method get_width
+  (of-object "GdkPixbufAnimation")
+  (c-name "gdk_pixbuf_animation_get_width")
+  (return-type "int")
+)
+
+(define-method get_height
+  (of-object "GdkPixbufAnimation")
+  (c-name "gdk_pixbuf_animation_get_height")
+  (return-type "int")
+)
+
+(define-method is_static_image
+  (of-object "GdkPixbufAnimation")
+  (c-name "gdk_pixbuf_animation_is_static_image")
+  (return-type "gboolean")
+)
+
+(define-method get_static_image
+  (of-object "GdkPixbufAnimation")
+  (c-name "gdk_pixbuf_animation_get_static_image")
+  (return-type "GdkPixbuf*")
+)
+
+(define-method get_iter
+  (of-object "GdkPixbufAnimation")
+  (c-name "gdk_pixbuf_animation_get_iter")
+  (return-type "GdkPixbufAnimationIter*")
+  (parameters
+    '("const-GTimeVal*" "start_time")
+  )
+)
+
+(define-function gdk_pixbuf_animation_iter_get_type
+  (c-name "gdk_pixbuf_animation_iter_get_type")
+  (return-type "GType")
+)
+
+(define-method get_delay_time
+  (of-object "GdkPixbufAnimationIter")
+  (c-name "gdk_pixbuf_animation_iter_get_delay_time")
+  (return-type "int")
+)
+
+(define-method get_pixbuf
+  (of-object "GdkPixbufAnimationIter")
+  (c-name "gdk_pixbuf_animation_iter_get_pixbuf")
+  (return-type "GdkPixbuf*")
+)
+
+(define-method on_currently_loading_frame
+  (of-object "GdkPixbufAnimationIter")
+  (c-name "gdk_pixbuf_animation_iter_on_currently_loading_frame")
+  (return-type "gboolean")
+)
+
+(define-method advance
+  (of-object "GdkPixbufAnimationIter")
+  (c-name "gdk_pixbuf_animation_iter_advance")
+  (return-type "gboolean")
+  (parameters
+    '("const-GTimeVal*" "current_time")
+  )
+)
+
+(define-function gdk_pixbuf_non_anim_get_type
+  (c-name "gdk_pixbuf_non_anim_get_type")
+  (return-type "GType")
+)
+
+(define-method non_anim_new
+  (of-object "GdkPixbuf")
+  (c-name "gdk_pixbuf_non_anim_new")
+  (return-type "GdkPixbufAnimation*")
+)
+
+
+
+;; From gdk-pixbuf-core.h
+
+(define-function gdk_pixbuf_error_quark
+  (c-name "gdk_pixbuf_error_quark")
+  (return-type "GQuark")
+)
+
+(define-function gdk_pixbuf_get_type
+  (c-name "gdk_pixbuf_get_type")
+  (return-type "GType")
+)
+
+(define-method ref
+  (of-object "GdkPixbuf")
+  (c-name "gdk_pixbuf_ref")
+  (return-type "GdkPixbuf*")
+)
+
+(define-method unref
+  (of-object "GdkPixbuf")
+  (c-name "gdk_pixbuf_unref")
+  (return-type "none")
+)
+
+(define-method get_colorspace
+  (of-object "GdkPixbuf")
+  (c-name "gdk_pixbuf_get_colorspace")
+  (return-type "GdkColorspace")
+)
+
+(define-method get_n_channels
+  (of-object "GdkPixbuf")
+  (c-name "gdk_pixbuf_get_n_channels")
+  (return-type "int")
+)
+
+(define-method get_has_alpha
+  (of-object "GdkPixbuf")
+  (c-name "gdk_pixbuf_get_has_alpha")
+  (return-type "gboolean")
+)
+
+(define-method get_bits_per_sample
+  (of-object "GdkPixbuf")
+  (c-name "gdk_pixbuf_get_bits_per_sample")
+  (return-type "int")
+)
+
+(define-method get_pixels
+  (of-object "GdkPixbuf")
+  (c-name "gdk_pixbuf_get_pixels")
+  (return-type "guchar*")
+)
+
+(define-method get_width
+  (of-object "GdkPixbuf")
+  (c-name "gdk_pixbuf_get_width")
+  (return-type "int")
+)
+
+(define-method get_height
+  (of-object "GdkPixbuf")
+  (c-name "gdk_pixbuf_get_height")
+  (return-type "int")
+)
+
+(define-method get_rowstride
+  (of-object "GdkPixbuf")
+  (c-name "gdk_pixbuf_get_rowstride")
+  (return-type "int")
+)
+
+(define-function gdk_pixbuf_new
+  (c-name "gdk_pixbuf_new")
+  (is-constructor-of "GdkPixbuf")
+  (return-type "GdkPixbuf*")
+  (parameters
+    '("GdkColorspace" "colorspace")
+    '("gboolean" "has_alpha")
+    '("int" "bits_per_sample")
+    '("int" "width")
+    '("int" "height")
+  )
+)
+
+(define-method copy
+  (of-object "GdkPixbuf")
+  (c-name "gdk_pixbuf_copy")
+  (return-type "GdkPixbuf*")
+)
+
+(define-method new_subpixbuf
+  (of-object "GdkPixbuf")
+  (c-name "gdk_pixbuf_new_subpixbuf")
+  (return-type "GdkPixbuf*")
+  (parameters
+    '("int" "src_x")
+    '("int" "src_y")
+    '("int" "width")
+    '("int" "height")
+  )
+)
+
+(define-function gdk_pixbuf_new_from_file
+  (c-name "gdk_pixbuf_new_from_file")
+  (return-type "GdkPixbuf*")
+  (parameters
+    '("const-char*" "filename")
+    '("GError**" "error")
+  )
+)
+
+(define-function gdk_pixbuf_new_from_file_at_size
+  (c-name "gdk_pixbuf_new_from_file_at_size")
+  (return-type "GdkPixbuf*")
+  (parameters
+    '("const-char*" "filename")
+    '("int" "width")
+    '("int" "height")
+    '("GError**" "error")
+  )
+)
+
+(define-function gdk_pixbuf_new_from_file_at_scale
+  (c-name "gdk_pixbuf_new_from_file_at_scale")
+  (return-type "GdkPixbuf*")
+  (parameters
+    '("const-char*" "filename")
+    '("int" "width")
+    '("int" "height")
+    '("gboolean" "preserve_aspect_ratio")
+    '("GError**" "error")
+  )
+)
+
+(define-function gdk_pixbuf_new_from_data
+  (c-name "gdk_pixbuf_new_from_data")
+  (return-type "GdkPixbuf*")
+  (parameters
+    '("const-guchar*" "data")
+    '("GdkColorspace" "colorspace")
+    '("gboolean" "has_alpha")
+    '("int" "bits_per_sample")
+    '("int" "width")
+    '("int" "height")
+    '("int" "rowstride")
+    '("GdkPixbufDestroyNotify" "destroy_fn")
+    '("gpointer" "destroy_fn_data")
+  )
+)
+
+(define-function gdk_pixbuf_new_from_xpm_data
+  (c-name "gdk_pixbuf_new_from_xpm_data")
+  (return-type "GdkPixbuf*")
+  (parameters
+    '("const-char**" "data")
+  )
+)
+
+(define-function gdk_pixbuf_new_from_inline
+  (c-name "gdk_pixbuf_new_from_inline")
+  (return-type "GdkPixbuf*")
+  (parameters
+    '("gint" "data_length")
+    '("const-guint8*" "data")
+    '("gboolean" "copy_pixels")
+    '("GError**" "error")
+  )
+)
+
+(define-method fill
+  (of-object "GdkPixbuf")
+  (c-name "gdk_pixbuf_fill")
+  (return-type "none")
+  (parameters
+    '("guint32" "pixel")
+  )
+)
+
+(define-method save
+  (of-object "GdkPixbuf")
+  (c-name "gdk_pixbuf_save")
+  (return-type "gboolean")
+  (parameters
+    '("const-char*" "filename")
+    '("const-char*" "type")
+    '("GError**" "error")
+  )
+  (varargs #t)
+)
+
+(define-method savev
+  (of-object "GdkPixbuf")
+  (c-name "gdk_pixbuf_savev")
+  (return-type "gboolean")
+  (parameters
+    '("const-char*" "filename")
+    '("const-char*" "type")
+    '("char**" "option_keys")
+    '("char**" "option_values")
+    '("GError**" "error")
+  )
+)
+
+(define-method save_to_callback
+  (of-object "GdkPixbuf")
+  (c-name "gdk_pixbuf_save_to_callback")
+  (return-type "gboolean")
+  (parameters
+    '("GdkPixbufSaveFunc" "save_func")
+    '("gpointer" "user_data")
+    '("const-char*" "type")
+    '("GError**" "error")
+  )
+  (varargs #t)
+)
+
+(define-method save_to_callbackv
+  (of-object "GdkPixbuf")
+  (c-name "gdk_pixbuf_save_to_callbackv")
+  (return-type "gboolean")
+  (parameters
+    '("GdkPixbufSaveFunc" "save_func")
+    '("gpointer" "user_data")
+    '("const-char*" "type")
+    '("char**" "option_keys")
+    '("char**" "option_values")
+    '("GError**" "error")
+  )
+)
+
+(define-method save_to_buffer
+  (of-object "GdkPixbuf")
+  (c-name "gdk_pixbuf_save_to_buffer")
+  (return-type "gboolean")
+  (parameters
+    '("gchar**" "buffer")
+    '("gsize*" "buffer_size")
+    '("const-char*" "type")
+    '("GError**" "error")
+  )
+  (varargs #t)
+)
+
+(define-method save_to_bufferv
+  (of-object "GdkPixbuf")
+  (c-name "gdk_pixbuf_save_to_bufferv")
+  (return-type "gboolean")
+  (parameters
+    '("gchar**" "buffer")
+    '("gsize*" "buffer_size")
+    '("const-char*" "type")
+    '("char**" "option_keys")
+    '("char**" "option_values")
+    '("GError**" "error")
+  )
+)
+
+(define-function gdk_pixbuf_new_from_stream
+  (c-name "gdk_pixbuf_new_from_stream")
+  (return-type "GdkPixbuf*")
+  (parameters
+    '("GInputStream*" "stream")
+    '("GCancellable*" "cancellable")
+    '("GError**" "error")
+  )
+)
+
+(define-function gdk_pixbuf_new_from_stream_at_scale
+  (c-name "gdk_pixbuf_new_from_stream_at_scale")
+  (return-type "GdkPixbuf*")
+  (parameters
+    '("GInputStream*" "stream")
+    '("gint" "width")
+    '("gint" "height")
+    '("gboolean" "preserve_aspect_ratio")
+    '("GCancellable*" "cancellable")
+    '("GError**" "error")
+  )
+)
+
+(define-method save_to_stream
+  (of-object "GdkPixbuf")
+  (c-name "gdk_pixbuf_save_to_stream")
+  (return-type "gboolean")
+  (parameters
+    '("GOutputStream*" "stream")
+    '("const-char*" "type")
+    '("GCancellable*" "cancellable")
+    '("GError**" "error")
+  )
+  (varargs #t)
+)
+
+(define-method add_alpha
+  (of-object "GdkPixbuf")
+  (c-name "gdk_pixbuf_add_alpha")
+  (return-type "GdkPixbuf*")
+  (parameters
+    '("gboolean" "substitute_color")
+    '("guchar" "r")
+    '("guchar" "g")
+    '("guchar" "b")
+  )
+)
+
+(define-method copy_area
+  (of-object "GdkPixbuf")
+  (c-name "gdk_pixbuf_copy_area")
+  (return-type "none")
+  (parameters
+    '("int" "src_x")
+    '("int" "src_y")
+    '("int" "width")
+    '("int" "height")
+    '("GdkPixbuf*" "dest_pixbuf")
+    '("int" "dest_x")
+    '("int" "dest_y")
+  )
+)
+
+(define-method saturate_and_pixelate
+  (of-object "GdkPixbuf")
+  (c-name "gdk_pixbuf_saturate_and_pixelate")
+  (return-type "none")
+  (parameters
+    '("GdkPixbuf*" "dest")
+    '("gfloat" "saturation")
+    '("gboolean" "pixelate")
+  )
+)
+
+(define-method apply_embedded_orientation
+  (of-object "GdkPixbuf")
+  (c-name "gdk_pixbuf_apply_embedded_orientation")
+  (return-type "GdkPixbuf*")
+)
+
+(define-method get_option
+  (of-object "GdkPixbuf")
+  (c-name "gdk_pixbuf_get_option")
+  (return-type "const-gchar*")
+  (parameters
+    '("const-gchar*" "key")
+  )
+)
+
+
+
+;; From gdk-pixbuf-enum-types.h
+
+(define-function gdk_pixbuf_alpha_mode_get_type
+  (c-name "gdk_pixbuf_alpha_mode_get_type")
+  (return-type "GType")
+)
+
+(define-function gdk_colorspace_get_type
+  (c-name "gdk_colorspace_get_type")
+  (return-type "GType")
+)
+
+(define-function gdk_pixbuf_error_get_type
+  (c-name "gdk_pixbuf_error_get_type")
+  (return-type "GType")
+)
+
+(define-function gdk_interp_type_get_type
+  (c-name "gdk_interp_type_get_type")
+  (return-type "GType")
+)
+
+(define-function gdk_pixbuf_rotation_get_type
+  (c-name "gdk_pixbuf_rotation_get_type")
+  (return-type "GType")
+)
+
+
+
+;; From gdk-pixbuf-features.h
+
+
+
+;; From gdk-pixbuf.h
+
+
+
+;; From gdk-pixbuf-i18n.h
+
+
+
+;; From gdk-pixbuf-io.h
+
+(define-function gdk_pixbuf_get_formats
+  (c-name "gdk_pixbuf_get_formats")
+  (return-type "GSList*")
+)
+
+(define-method get_name
+  (of-object "GdkPixbufFormat")
+  (c-name "gdk_pixbuf_format_get_name")
+  (return-type "gchar*")
+)
+
+(define-method get_description
+  (of-object "GdkPixbufFormat")
+  (c-name "gdk_pixbuf_format_get_description")
+  (return-type "gchar*")
+)
+
+(define-method get_mime_types
+  (of-object "GdkPixbufFormat")
+  (c-name "gdk_pixbuf_format_get_mime_types")
+  (return-type "gchar**")
+)
+
+(define-method get_extensions
+  (of-object "GdkPixbufFormat")
+  (c-name "gdk_pixbuf_format_get_extensions")
+  (return-type "gchar**")
+)
+
+(define-method is_writable
+  (of-object "GdkPixbufFormat")
+  (c-name "gdk_pixbuf_format_is_writable")
+  (return-type "gboolean")
+)
+
+(define-method is_scalable
+  (of-object "GdkPixbufFormat")
+  (c-name "gdk_pixbuf_format_is_scalable")
+  (return-type "gboolean")
+)
+
+(define-method is_disabled
+  (of-object "GdkPixbufFormat")
+  (c-name "gdk_pixbuf_format_is_disabled")
+  (return-type "gboolean")
+)
+
+(define-method set_disabled
+  (of-object "GdkPixbufFormat")
+  (c-name "gdk_pixbuf_format_set_disabled")
+  (return-type "none")
+  (parameters
+    '("gboolean" "disabled")
+  )
+)
+
+(define-method get_license
+  (of-object "GdkPixbufFormat")
+  (c-name "gdk_pixbuf_format_get_license")
+  (return-type "gchar*")
+)
+
+(define-function gdk_pixbuf_get_file_info
+  (c-name "gdk_pixbuf_get_file_info")
+  (return-type "GdkPixbufFormat*")
+  (parameters
+    '("const-gchar*" "filename")
+    '("gint*" "width")
+    '("gint*" "height")
+  )
+)
+
+(define-method set_option
+  (of-object "GdkPixbuf")
+  (c-name "gdk_pixbuf_set_option")
+  (return-type "gboolean")
+  (parameters
+    '("const-gchar*" "key")
+    '("const-gchar*" "value")
+  )
+)
+
+
+
+;; From gdk-pixbuf-loader.h
+
+(define-function gdk_pixbuf_loader_get_type
+  (c-name "gdk_pixbuf_loader_get_type")
+  (return-type "GType")
+)
+
+(define-function gdk_pixbuf_loader_new
+  (c-name "gdk_pixbuf_loader_new")
+  (is-constructor-of "GdkPixbufLoader")
+  (return-type "GdkPixbufLoader*")
+)
+
+(define-function gdk_pixbuf_loader_new_with_type
+  (c-name "gdk_pixbuf_loader_new_with_type")
+  (return-type "GdkPixbufLoader*")
+  (parameters
+    '("const-char*" "image_type")
+    '("GError**" "error")
+  )
+)
+
+(define-function gdk_pixbuf_loader_new_with_mime_type
+  (c-name "gdk_pixbuf_loader_new_with_mime_type")
+  (return-type "GdkPixbufLoader*")
+  (parameters
+    '("const-char*" "mime_type")
+    '("GError**" "error")
+  )
+)
+
+(define-method set_size
+  (of-object "GdkPixbufLoader")
+  (c-name "gdk_pixbuf_loader_set_size")
+  (return-type "none")
+  (parameters
+    '("int" "width")
+    '("int" "height")
+  )
+)
+
+(define-method write
+  (of-object "GdkPixbufLoader")
+  (c-name "gdk_pixbuf_loader_write")
+  (return-type "gboolean")
+  (parameters
+    '("const-guchar*" "buf")
+    '("gsize" "count")
+    '("GError**" "error")
+  )
+)
+
+(define-method get_pixbuf
+  (of-object "GdkPixbufLoader")
+  (c-name "gdk_pixbuf_loader_get_pixbuf")
+  (return-type "GdkPixbuf*")
+)
+
+(define-method get_animation
+  (of-object "GdkPixbufLoader")
+  (c-name "gdk_pixbuf_loader_get_animation")
+  (return-type "GdkPixbufAnimation*")
+)
+
+(define-method close
+  (of-object "GdkPixbufLoader")
+  (c-name "gdk_pixbuf_loader_close")
+  (return-type "gboolean")
+  (parameters
+    '("GError**" "error")
+  )
+)
+
+(define-method get_format
+  (of-object "GdkPixbufLoader")
+  (c-name "gdk_pixbuf_loader_get_format")
+  (return-type "GdkPixbufFormat*")
+)
+
+
+
+;; From gdk-pixbuf-marshal.h
+
+
+
+;; From gdk-pixbuf-private.h
+
+
+
+;; From gdk-pixbuf-scaled-anim.h
+
+(define-function gdk_pixbuf_scaled_anim_get_type
+  (c-name "gdk_pixbuf_scaled_anim_get_type")
+  (return-type "GType")
+)
+
+(define-function gdk_pixbuf_scaled_anim_iter_get_type
+  (c-name "gdk_pixbuf_scaled_anim_iter_get_type")
+  (return-type "GType")
+)
+
+
+
+;; From gdk-pixbuf-simple-anim.h
+
+(define-function gdk_pixbuf_simple_anim_get_type
+  (c-name "gdk_pixbuf_simple_anim_get_type")
+  (return-type "GType")
+)
+
+(define-function gdk_pixbuf_simple_anim_iter_get_type
+  (c-name "gdk_pixbuf_simple_anim_iter_get_type")
+  (return-type "GType")
+)
+
+(define-function gdk_pixbuf_simple_anim_new
+  (c-name "gdk_pixbuf_simple_anim_new")
+  (is-constructor-of "GdkPixbufSimpleAnim")
+  (return-type "GdkPixbufSimpleAnim*")
+  (parameters
+    '("gint" "width")
+    '("gint" "height")
+    '("gfloat" "rate")
+  )
+)
+
+(define-method add_frame
+  (of-object "GdkPixbufSimpleAnim")
+  (c-name "gdk_pixbuf_simple_anim_add_frame")
+  (return-type "none")
+  (parameters
+    '("GdkPixbuf*" "pixbuf")
+  )
+)
+
+(define-method set_loop
+  (of-object "GdkPixbufSimpleAnim")
+  (c-name "gdk_pixbuf_simple_anim_set_loop")
+  (return-type "none")
+  (parameters
+    '("gboolean" "loop")
+  )
+)
+
+(define-method get_loop
+  (of-object "GdkPixbufSimpleAnim")
+  (c-name "gdk_pixbuf_simple_anim_get_loop")
+  (return-type "gboolean")
+)
+
+
+
+;; From gdk-pixbuf-transform.h
+
+(define-method scale
+  (of-object "GdkPixbuf")
+  (c-name "gdk_pixbuf_scale")
+  (return-type "none")
+  (parameters
+    '("GdkPixbuf*" "dest")
+    '("int" "dest_x")
+    '("int" "dest_y")
+    '("int" "dest_width")
+    '("int" "dest_height")
+    '("double" "offset_x")
+    '("double" "offset_y")
+    '("double" "scale_x")
+    '("double" "scale_y")
+    '("GdkInterpType" "interp_type")
+  )
+)
+
+(define-method composite
+  (of-object "GdkPixbuf")
+  (c-name "gdk_pixbuf_composite")
+  (return-type "none")
+  (parameters
+    '("GdkPixbuf*" "dest")
+    '("int" "dest_x")
+    '("int" "dest_y")
+    '("int" "dest_width")
+    '("int" "dest_height")
+    '("double" "offset_x")
+    '("double" "offset_y")
+    '("double" "scale_x")
+    '("double" "scale_y")
+    '("GdkInterpType" "interp_type")
+    '("int" "overall_alpha")
+  )
+)
+
+(define-method composite_color
+  (of-object "GdkPixbuf")
+  (c-name "gdk_pixbuf_composite_color")
+  (return-type "none")
+  (parameters
+    '("GdkPixbuf*" "dest")
+    '("int" "dest_x")
+    '("int" "dest_y")
+    '("int" "dest_width")
+    '("int" "dest_height")
+    '("double" "offset_x")
+    '("double" "offset_y")
+    '("double" "scale_x")
+    '("double" "scale_y")
+    '("GdkInterpType" "interp_type")
+    '("int" "overall_alpha")
+    '("int" "check_x")
+    '("int" "check_y")
+    '("int" "check_size")
+    '("guint32" "color1")
+    '("guint32" "color2")
+  )
+)
+
+(define-method scale_simple
+  (of-object "GdkPixbuf")
+  (c-name "gdk_pixbuf_scale_simple")
+  (return-type "GdkPixbuf*")
+  (parameters
+    '("int" "dest_width")
+    '("int" "dest_height")
+    '("GdkInterpType" "interp_type")
+  )
+)
+
+(define-method composite_color_simple
+  (of-object "GdkPixbuf")
+  (c-name "gdk_pixbuf_composite_color_simple")
+  (return-type "GdkPixbuf*")
+  (parameters
+    '("int" "dest_width")
+    '("int" "dest_height")
+    '("GdkInterpType" "interp_type")
+    '("int" "overall_alpha")
+    '("int" "check_size")
+    '("guint32" "color1")
+    '("guint32" "color2")
+  )
+)
+
+(define-method rotate_simple
+  (of-object "GdkPixbuf")
+  (c-name "gdk_pixbuf_rotate_simple")
+  (return-type "GdkPixbuf*")
+  (parameters
+    '("GdkPixbufRotation" "angle")
+  )
+)
+
+(define-method flip
+  (of-object "GdkPixbuf")
+  (c-name "gdk_pixbuf_flip")
+  (return-type "GdkPixbuf*")
+  (parameters
+    '("gboolean" "horizontal")
+  )
+)
+
+
+
+;; From gdk-pixdata.h
+
+(define-method serialize
+  (of-object "GdkPixdata")
+  (c-name "gdk_pixdata_serialize")
+  (return-type "guint8*")
+  (parameters
+    '("guint*" "stream_length_p")
+  )
+)
+
+(define-method deserialize
+  (of-object "GdkPixdata")
+  (c-name "gdk_pixdata_deserialize")
+  (return-type "gboolean")
+  (parameters
+    '("guint" "stream_length")
+    '("const-guint8*" "stream")
+    '("GError**" "error")
+  )
+)
+
+(define-method from_pixbuf
+  (of-object "GdkPixdata")
+  (c-name "gdk_pixdata_from_pixbuf")
+  (return-type "gpointer")
+  (parameters
+    '("const-GdkPixbuf*" "pixbuf")
+    '("gboolean" "use_rle")
+  )
+)
+
+(define-function gdk_pixbuf_from_pixdata
+  (c-name "gdk_pixbuf_from_pixdata")
+  (return-type "GdkPixbuf*")
+  (parameters
+    '("const-GdkPixdata*" "pixdata")
+    '("gboolean" "copy_pixels")
+    '("GError**" "error")
+  )
+)
+
+(define-method to_csource
+  (of-object "GdkPixdata")
+  (c-name "gdk_pixdata_to_csource")
+  (return-type "GString*")
+  (parameters
+    '("const-gchar*" "name")
+    '("GdkPixdataDumpType" "dump_type")
+  )
+)
+
+
diff --git a/gdk/src/window.ccg b/gdk/src/window.ccg
index ffb2bac..c048e9a 100644
--- a/gdk/src/window.ccg
+++ b/gdk/src/window.ccg
@@ -87,5 +87,10 @@ void Window::invalidate(bool invalidate_children)
   gdk_window_invalidate_rect(gobj(), NULL, invalidate_children);
 }
 
+void Window::restack(bool above)
+{
+  gdk_window_restack(gobj(), NULL, above);
+}
+
 } // namespace Gdk
 
diff --git a/gdk/src/window.hg b/gdk/src/window.hg
index 8539ae4..04e0d16 100644
--- a/gdk/src/window.hg
+++ b/gdk/src/window.hg
@@ -64,7 +64,7 @@ class Window : public Gdk::Drawable
   _CLASS_GOBJECT(Window, GdkWindow, GDK_WINDOW_OBJECT, Gdk::Drawable, GdkDrawable, GdkWindowObject)
   _STRUCT_NOT_HIDDEN
   _IGNORE(gdk_window_set_hints, gdk_window_destroy, gdk_window_new, gdk_window_get_deskrelative_origin, gdk_window_get_internal_paint_info)
-  _IGNORE(gdk_window_destroy_notify)
+  _IGNORE(gdk_window_destroy_notify, gdk_window_is_destroyed)
 
 
 protected:
@@ -87,6 +87,22 @@ public:
   _WRAP_METHOD(void clear_area_e(int x, int y, int width, int height), gdk_window_clear_area_e)
   _WRAP_METHOD(void raise(), gdk_window_raise)
   _WRAP_METHOD(void lower(), gdk_window_lower)
+
+  _WRAP_METHOD(void restack(const Glib::RefPtr<Window>& sibling, bool above), gdk_window_restack)
+
+  /** Changes the position of this window in the Z-order (stacking order). This 
+   * either raises (if @a above is true) or lowers the window.
+   *
+   * If this is a toplevel, the window manager may choose to deny the
+   * request to move the window in the Z-order. restack() only
+   * requests the restack but does not guarantee it.
+   *
+   * @param above Whether to raise or lower the window.
+   *
+   * @newin{2,18}
+   */
+  void restack(bool above);
+
   _WRAP_METHOD(void focus(guint32 timestamp), gdk_window_focus)
   _WRAP_METHOD(void set_user_data(gpointer user_data), gdk_window_set_user_data)
   _WRAP_METHOD(void set_override_redirect(bool override_redirect = true), gdk_window_set_override_redirect)
@@ -97,6 +113,7 @@ public:
   
   _WRAP_METHOD(void scroll(int dx, int dy), gdk_window_scroll)
   _WRAP_METHOD(void move_region(const Region& region, int dx, int dy), gdk_window_move_region)
+  _WRAP_METHOD(bool ensure_native(), gdk_window_ensure_native)
 
   _WRAP_METHOD(void shape_combine_mask(const Glib::RefPtr<Bitmap>& mask, int x, int y), gdk_window_shape_combine_mask)
   void unset_shape_combine_mask();
@@ -153,11 +170,14 @@ public:
    * For top-level windows this means that it will use the default cursor for the ROOT window.
    */
   void set_cursor();
+
+  //TODO:_WRAP_METHOD(Cursor get_cursor(), gdk_window_get_cursor)
   
   _WRAP_METHOD(void get_user_data(gpointer* data), gdk_window_get_user_data)
   _WRAP_METHOD(void get_geometry(int& x, int& y, int& width, int& height, int& depth) const, gdk_window_get_geometry)
   _WRAP_METHOD(void get_position(int& x, int& y) const, gdk_window_get_position)
   _WRAP_METHOD(int get_origin(int& x, int& y) const, gdk_window_get_origin)
+  _WRAP_METHOD(void get_root_coords(int x, int y, int& root_x, int& root_y), gdk_window_get_root_coords)
   _IGNORE(gdk_window_get_deskrelative_origin)
   _WRAP_METHOD(void get_root_origin(int& x, int& y) const, gdk_window_get_root_origin)
   _WRAP_METHOD(void get_frame_extents(Rectangle& rect), gdk_window_get_frame_extents)
@@ -269,6 +289,21 @@ public:
   _WRAP_METHOD(void set_accept_focus(bool accept_focus = true), gdk_window_set_accept_focus)
   
   _WRAP_METHOD(void set_focus_on_map(bool focus_on_map), gdk_window_set_focus_on_map)
+
+  _WRAP_METHOD(static Glib::RefPtr<Window> get_default_root_window(), gdk_get_default_root_window)
+
+//TODO: Wrap these?
+/*
+GdkPixmap *gdk_offscreen_window_get_pixmap     (GdkWindow     *window);
+void       gdk_offscreen_window_set_embedder   (GdkWindow     *window,
+						GdkWindow     *embedder);
+GdkWindow *gdk_offscreen_window_get_embedder   (GdkWindow     *window);
+*/
+
+  _WRAP_METHOD(void redirect_to_drawable(const Glib::RefPtr<Drawable>& drawable, int src_x, int src_y, int dest_x, int dest_y, int width, int height), gdk_window_redirect_to_drawable)
+  _WRAP_METHOD(void remove_redirection(), gdk_window_remove_redirection)
+
+  _WRAP_METHOD(void geometry_changed(), gdk_window_geometry_changed)
 };
 
 } /* namespace Gdk */



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