[gtkmm] Update for the latest gtk+4 (use Gdk::Texture)



commit 2a100a4483360f32bff92437ce1929cadb62fd50
Author: Kjell Ahlstedt <kjellahlstedt gmail com>
Date:   Fri Nov 10 19:25:07 2017 +0100

    Update for the latest gtk+4 (use Gdk::Texture)
    
    Cairo::Surface (which lately replaced Gdk::Pixbuf) is now replaced by
    Gdk::Texture in many places.
    Remove enum Gdk::Cursor::Type.

 demos/gtk-demo/example_change_display.cc |    2 +-
 gdk/src/cursor.ccg                       |    3 --
 gdk/src/cursor.hg                        |   31 +++++++++++++++--------------
 gdk/src/window.hg                        |    4 +-
 gtk/src/aboutdialog.ccg                  |    1 -
 gtk/src/aboutdialog.hg                   |   11 ++++-----
 gtk/src/cellrendererpixbuf.hg            |    2 +
 gtk/src/entry.ccg                        |    8 +------
 gtk/src/entry.hg                         |   16 +++++---------
 gtk/src/image.hg                         |   18 ++++++++++------
 gtk/src/stylecontext.ccg                 |    4 +-
 gtk/src/stylecontext.hg                  |    6 +----
 gtk/src/textview.hg                      |    4 ---
 gtk/src/window.hg                        |   28 +++++++++++++-------------
 14 files changed, 61 insertions(+), 77 deletions(-)
---
diff --git a/demos/gtk-demo/example_change_display.cc b/demos/gtk-demo/example_change_display.cc
index 60fb3f6..50bcc75 100644
--- a/demos/gtk-demo/example_change_display.cc
+++ b/demos/gtk-demo/example_change_display.cc
@@ -301,7 +301,7 @@ Gtk::Window* Example_ChangeDisplay::query_for_toplevel(const Glib::RefPtr<Gdk::D
 
   m_pPopup->show();
 
-  auto cursor = Gdk::Cursor::create(display, "crosshair");
+  auto cursor = Gdk::Cursor::create("crosshair");
 
   Gtk::Window* toplevel = nullptr;
 
diff --git a/gdk/src/cursor.ccg b/gdk/src/cursor.ccg
index 3395024..ee567b3 100644
--- a/gdk/src/cursor.ccg
+++ b/gdk/src/cursor.ccg
@@ -17,9 +17,6 @@
  */
 
 #include <gdk/gdk.h>
-#include <gdkmm/cairoutils.h>
-
-using Type = Gdk::Cursor::Type;
 
 namespace Gdk
 {
diff --git a/gdk/src/cursor.hg b/gdk/src/cursor.hg
index df1dd06..6387860 100644
--- a/gdk/src/cursor.hg
+++ b/gdk/src/cursor.hg
@@ -16,8 +16,8 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
-#include <gdkmm/display.h>
 #include <gdkmm/pixbuf.h>
+#include <gdkmm/texture.h>
 
 _DEFS(gdkmm,gdk)
 _PINCLUDE(glibmm/private/object_p.h)
@@ -34,31 +34,32 @@ class Cursor : public Glib::Object
 
 protected:
 
-  explicit Cursor(const Glib::RefPtr<Display>& display, const Glib::ustring& name);
-  _IGNORE(gdk_cursor_new_from_name)
-
 public:
-  _WRAP_ENUM(Type, GdkCursorType)
-
   //We use _WRAP_METHOD() instead of _WRAP_CREATE() and constructors,
   //because the gdk_cursor_new_*() functions actually return existing instances sometimes,
   //but constructors assume that they own the instance.
   //And we would have to have to use the gdk_cursor_new_*() functions in the constructors anyway,
   //because they do more than just call g_object_new().
-  _WRAP_METHOD(static Glib::RefPtr<Cursor> create(const Glib::RefPtr<Display>& display, const 
Glib::RefPtr<Pixbuf>& pixbuf, int x, int y), gdk_cursor_new_from_pixbuf)
+  _WRAP_METHOD(static Glib::RefPtr<Cursor> create(const Glib::RefPtr<Pixbuf>& pixbuf, int x, int y, const 
Glib::RefPtr<Cursor>& fallback = {}), gdk_cursor_new_from_pixbuf)
+  _WRAP_METHOD(static Glib::RefPtr<Cursor> create(const Glib::RefPtr<const Texture>& texture, int hotspot_x, 
int hotspot_y, const Glib::RefPtr<Cursor>& fallback = {}), gdk_cursor_new_from_texture)
+  _WRAP_METHOD(static Glib::RefPtr<Cursor> create(const Glib::ustring& name, const Glib::RefPtr<Cursor>& 
fallback = {}), gdk_cursor_new_from_name)
 
-  _WRAP_METHOD(static Glib::RefPtr<Cursor> create(const Glib::RefPtr<Display>& display, const 
::Cairo::RefPtr< ::Cairo::Surface>& surface, double x, double y), gdk_cursor_new_from_surface)
+  _WRAP_METHOD(Glib::RefPtr<Cursor> get_fallback(), gdk_cursor_get_fallback, refreturn)
+  _WRAP_METHOD(Glib::RefPtr<const Cursor> get_fallback() const, gdk_cursor_get_fallback, refreturn, 
constversion)
 
-  _WRAP_METHOD(static Glib::RefPtr<Cursor> create(const Glib::RefPtr<Display>& display, const Glib::ustring& 
name), gdk_cursor_new_from_name)
+  _WRAP_METHOD(Glib::ustring get_name() const, gdk_cursor_get_name)
 
-  _WRAP_METHOD(Glib::RefPtr<Display> get_display(), gdk_cursor_get_display, refreturn)
-  _WRAP_METHOD(Glib::RefPtr<const Display> get_display() const, gdk_cursor_get_display, refreturn, 
constversion)
+  _WRAP_METHOD(Glib::RefPtr<Texture> get_texture(), gdk_cursor_get_texture, refreturn)
+  _WRAP_METHOD(Glib::RefPtr<const Texture> get_texture() const, gdk_cursor_get_texture, refreturn, 
constversion)
 
-  // gdk_cursor_get_image() returns a pointer to a newly created GdkPixbuf, or NULL.
-  _WRAP_METHOD(Glib::RefPtr<Gdk::Pixbuf> get_image() const, gdk_cursor_get_image)
+  _WRAP_METHOD(int get_hotspot_x() const, gdk_cursor_get_hotspot_x)
+  _WRAP_METHOD(int get_hotspot_y() const, gdk_cursor_get_hotspot_y)
 
-  // gdk_cursor_get_surface() returns a pointer to a newly created cairo_surface_t, or NULL.
-  _WRAP_METHOD(::Cairo::RefPtr< ::Cairo::Surface> get_surface(double& x_hot, double& y_hot) const, 
gdk_cursor_get_surface)
+  _WRAP_PROPERTY("fallback", Glib::RefPtr<Cursor>)
+  _WRAP_PROPERTY("hotspot-x", int)
+  _WRAP_PROPERTY("hotspot-y", int)
+  _WRAP_PROPERTY("name", Glib::ustring)
+  _WRAP_PROPERTY("texture", Glib::RefPtr<Texture>)
 };
 
 } //namespace Gdk
diff --git a/gdk/src/window.hg b/gdk/src/window.hg
index bebd9f2..83bc099 100644
--- a/gdk/src/window.hg
+++ b/gdk/src/window.hg
@@ -207,8 +207,8 @@ public:
   _WRAP_METHOD(EventMask get_source_events(InputSource source) const, gdk_window_get_source_events)
   _WRAP_METHOD(void set_source_events(InputSource source, EventMask event_mask), 
gdk_window_set_source_events)
 
-#m4 _CONVERSION(`const 
std::vector<::Cairo::RefPtr<::Cairo::Surface>>&',`GList*',`Glib::ListHandler<::Cairo::RefPtr<::Cairo::Surface>>::vector_to_list($3).data()')
-  _WRAP_METHOD(void set_icon_list(const std::vector<::Cairo::RefPtr<::Cairo::Surface>>& surfaces), 
gdk_window_set_icon_list)
+#m4 _CONVERSION(`const 
std::vector<Glib::RefPtr<Texture>>&',`GList*',`Glib::ListHandler<Glib::RefPtr<Texture>>::vector_to_list($3).data()')
+  _WRAP_METHOD(void set_icon_list(const std::vector<Glib::RefPtr<Texture>>& textures), 
gdk_window_set_icon_list)
   void unset_icon();
   _WRAP_METHOD(void set_icon_name(const Glib::ustring& name), gdk_window_set_icon_name)
 
diff --git a/gtk/src/aboutdialog.ccg b/gtk/src/aboutdialog.ccg
index 5088569..6382f3c 100644
--- a/gtk/src/aboutdialog.ccg
+++ b/gtk/src/aboutdialog.ccg
@@ -17,7 +17,6 @@
  */
 
 #include <glibmm/vectorutils.h>
-#include <gdkmm/cairoutils.h>
 
 #include <gtk/gtk.h>
 
diff --git a/gtk/src/aboutdialog.hg b/gtk/src/aboutdialog.hg
index 379e931..018bbf9 100644
--- a/gtk/src/aboutdialog.hg
+++ b/gtk/src/aboutdialog.hg
@@ -21,7 +21,7 @@ _CONFIGINCLUDE(gtkmmconfig.h)
 #include <vector>
 
 #include <gtkmm/dialog.h>
-#include <gdkmm/value_cairo.h>
+#include <gdkmm/texture.h>
 
 _DEFS(gtkmm,gtk)
 _PINCLUDE(gtkmm/private/dialog_p.h)
@@ -101,10 +101,9 @@ public:
   _WRAP_METHOD(Glib::ustring get_translator_credits() const, gtk_about_dialog_get_translator_credits)
   _WRAP_METHOD(void set_translator_credits(const Glib::ustring& translator_credits), 
gtk_about_dialog_set_translator_credits)
 
-  _WRAP_METHOD(Cairo::RefPtr<Cairo::Surface> get_logo(), gtk_about_dialog_get_logo, refreturn)
-  _WRAP_METHOD(Cairo::RefPtr<const Cairo::Surface> get_logo() const, gtk_about_dialog_get_logo, 
constversion, refreturn)
-
-  _WRAP_METHOD(void set_logo(const Cairo::RefPtr<Cairo::Surface>& logo), gtk_about_dialog_set_logo)
+  _WRAP_METHOD(Glib::RefPtr<Gdk::Texture> get_logo(), gtk_about_dialog_get_logo, refreturn)
+  _WRAP_METHOD(Glib::RefPtr<const Gdk::Texture> get_logo() const, gtk_about_dialog_get_logo, refreturn, 
constversion)
+  _WRAP_METHOD(void set_logo(const Glib::RefPtr<const Gdk::Texture>& logo), gtk_about_dialog_set_logo)
 
   /** Sets the surface to be displayed as logo in the about dialog.
    * The logo is set to the default window icon set with
@@ -135,7 +134,7 @@ public:
   _WRAP_PROPERTY("documenters", std::vector<Glib::ustring>)
   _WRAP_PROPERTY("translator_credits", std::vector<Glib::ustring>)
   _WRAP_PROPERTY("artists", std::vector<Glib::ustring>)
-  _WRAP_PROPERTY("logo", Cairo::RefPtr<Cairo::Surface>)
+  _WRAP_PROPERTY("logo", Glib::RefPtr<Gdk::Texture>)
   _WRAP_PROPERTY("logo_icon_name", Glib::ustring)
   _WRAP_PROPERTY("wrap_license", bool)
 
diff --git a/gtk/src/cellrendererpixbuf.hg b/gtk/src/cellrendererpixbuf.hg
index 0b4bb55..a8c3cb2 100644
--- a/gtk/src/cellrendererpixbuf.hg
+++ b/gtk/src/cellrendererpixbuf.hg
@@ -17,6 +17,7 @@
  */
 
 #include <gtkmm/cellrenderer.h>
+#include <gdkmm/texture.h>
 #include <gdkmm/value_cairo.h>
 #include <giomm/icon.h>
 _DEFS(gtkmm,gtk)
@@ -52,6 +53,7 @@ public:
   _WRAP_PROPERTY("icon-name", Glib::ustring)
   _WRAP_PROPERTY("gicon", Glib::RefPtr<Gio::Icon>)
   _WRAP_PROPERTY("surface", Cairo::RefPtr<Cairo::Surface>)
+  _WRAP_PROPERTY("texture", Glib::RefPtr<Gdk::Texture>)
 
   Glib::PropertyProxy_Base _property_renderable() override;
 };
diff --git a/gtk/src/entry.ccg b/gtk/src/entry.ccg
index fb6f642..a82fcef 100644
--- a/gtk/src/entry.ccg
+++ b/gtk/src/entry.ccg
@@ -17,18 +17,12 @@
  */
 
 #include <gtk/gtk.h>
-#include <gdkmm/cairoutils.h>
 
 using IconPosition = Gtk::Entry::IconPosition;
 
 namespace Gtk
 {
 
-void Entry::set_icon_from_surface(const Cairo::RefPtr<Cairo::Surface>& surface, IconPosition icon_pos)
-{
-  gtk_entry_set_icon_from_surface(gobj(), static_cast<GtkEntryIconPosition>(icon_pos), surface ? 
surface->cobj() : nullptr);
-}
-
 void Entry::set_icon_from_icon_name(const Glib::ustring& icon_name, IconPosition icon_pos)
 {
   gtk_entry_set_icon_from_icon_name(gobj(), static_cast<GtkEntryIconPosition>(icon_pos), icon_name.c_str());
@@ -42,7 +36,7 @@ void Entry::set_icon_from_gicon(const Glib::RefPtr<Gio::Icon>& icon, IconPositio
 void Entry::unset_icon(IconPosition icon_pos)
 {
   //We could use any one of these set_icon_from_* functions:
-  gtk_entry_set_icon_from_surface(gobj(), static_cast<GtkEntryIconPosition>(icon_pos), nullptr);
+  gtk_entry_set_icon_from_texture(gobj(), static_cast<GtkEntryIconPosition>(icon_pos), nullptr);
 }
 
 void Entry::set_icon_activatable(bool activatable, IconPosition icon_pos)
diff --git a/gtk/src/entry.hg b/gtk/src/entry.hg
index 6a97c33..2b5a636 100644
--- a/gtk/src/entry.hg
+++ b/gtk/src/entry.hg
@@ -25,7 +25,6 @@
 #include <gtkmm/image.h> //For Image::Type.
 #include <gtkmm/border.h>
 #include <gtkmm/entrybuffer.h>
-#include <gdkmm/value_cairo.h>
 #include <pangomm/attrlist.h>
 #include <pangomm/tabarray.h>
 
@@ -114,10 +113,7 @@ public:
   _WRAP_METHOD(Glib::ustring get_placeholder_text() const, gtk_entry_get_placeholder_text)
   _WRAP_METHOD(void set_placeholder_text(const Glib::ustring& text), gtk_entry_set_placeholder_text)
 
-  //We hand-code these so we can change the parameter order, so we can have a default parameter value:
-  _WRAP_METHOD_DOCS_ONLY(gtk_entry_set_icon_from_surface)
-  void set_icon_from_surface(const Cairo::RefPtr<Cairo::Surface>& surface, IconPosition icon_pos = 
IconPosition::PRIMARY);
-  _IGNORE(gtk_entry_set_icon_from_surface)
+  _WRAP_METHOD(void set_icon_from_texture(const Glib::RefPtr<Gdk::Texture>& texture{.}, IconPosition 
icon_pos{.} = IconPosition::PRIMARY), gtk_entry_set_icon_from_texture)
 
   _WRAP_METHOD_DOCS_ONLY(gtk_entry_set_icon_from_icon_name)
   void set_icon_from_icon_name(const Glib::ustring& icon_name, IconPosition icon_pos = 
IconPosition::PRIMARY);
@@ -128,7 +124,7 @@ public:
   _IGNORE(gtk_entry_set_icon_from_gicon)
 
   /** Do not show any icon in the specified position.
-   * See set_icon_from_surface(), set_icon_from_icon_name(), and set_icon_from_gicon().
+   * See set_icon_from_texture(), set_icon_from_icon_name(), and set_icon_from_gicon().
    *
    * @param icon_pos The icon position.
    *
@@ -137,8 +133,8 @@ public:
   void unset_icon(IconPosition icon_pos = IconPosition::PRIMARY);
 
   _WRAP_METHOD(Image::Type get_icon_storage_type(IconPosition icon_pos = IconPosition::PRIMARY) const, 
gtk_entry_get_icon_storage_type)
-  _WRAP_METHOD(Cairo::RefPtr<Cairo::Surface> get_icon_surface(IconPosition icon_pos = 
IconPosition::PRIMARY), gtk_entry_get_icon_surface, refreturn)
-  _WRAP_METHOD(Cairo::RefPtr<const Cairo::Surface> get_icon_surface(IconPosition icon_pos = 
IconPosition::PRIMARY) const, gtk_entry_get_icon_surface, refreturn, constversion)
+  _WRAP_METHOD(Glib::RefPtr<Gdk::Texture> get_icon_texture(IconPosition icon_pos = IconPosition::PRIMARY), 
gtk_entry_get_icon_texture, refreturn)
+  _WRAP_METHOD(Glib::RefPtr<const Gdk::Texture> get_icon_texture(IconPosition icon_pos = 
IconPosition::PRIMARY) const, gtk_entry_get_icon_texture, refreturn, constversion)
   _WRAP_METHOD(Glib::ustring get_icon_name(IconPosition icon_pos = IconPosition::PRIMARY) const, 
gtk_entry_get_icon_name)
   _WRAP_METHOD(Glib::RefPtr<Gio::Icon> get_icon_gicon(IconPosition icon_pos = IconPosition::PRIMARY), 
gtk_entry_get_icon_gicon, refreturn)
   _WRAP_METHOD(Glib::RefPtr<const Gio::Icon> get_icon_gicon(IconPosition icon_pos = IconPosition::PRIMARY) 
const, gtk_entry_get_icon_gicon, refreturn, constversion)
@@ -243,8 +239,8 @@ public:
   _WRAP_PROPERTY("caps-lock-warning", bool)
   _WRAP_PROPERTY("progress-fraction", double)
   _WRAP_PROPERTY("progress-pulse-step", double)
-  _WRAP_PROPERTY("primary-icon-surface", Cairo::RefPtr<Cairo::Surface>)
-  _WRAP_PROPERTY("secondary-icon-surface", Cairo::RefPtr<Cairo::Surface>)
+  _WRAP_PROPERTY("primary-icon-texture", Glib::RefPtr<Gdk::Texture>)
+  _WRAP_PROPERTY("secondary-icon-texture", Glib::RefPtr<Gdk::Texture>)
   _WRAP_PROPERTY("primary-icon-name", Glib::ustring)
   _WRAP_PROPERTY("secondary-icon-name", Glib::ustring)
   _WRAP_PROPERTY("primary-icon-gicon", Glib::RefPtr<Gio::Icon>)
diff --git a/gtk/src/image.hg b/gtk/src/image.hg
index 9465ff7..290031c 100644
--- a/gtk/src/image.hg
+++ b/gtk/src/image.hg
@@ -74,13 +74,13 @@ public:
   _WRAP_METHOD(void set(const std::string& filename), gtk_image_set_from_file)
   _WRAP_METHOD(void set_from_resource(const std::string& resource_path), gtk_image_set_from_resource)
   _WRAP_METHOD(void set(const Glib::RefPtr<Gdk::Pixbuf>& pixbuf), gtk_image_set_from_pixbuf)
+  _WRAP_METHOD(void set(const Glib::RefPtr<Gdk::Texture>& pixbuf), gtk_image_set_from_texture)
   _WRAP_METHOD(void set(const Glib::RefPtr<const Gio::Icon>& icon, IconSize size), gtk_image_set_from_gicon)
 
   _WRAP_METHOD(void set(const Cairo::RefPtr<Cairo::Surface>& surface), gtk_image_set_from_surface)
 
   _WRAP_METHOD(void set_from_icon_name(const Glib::ustring& icon_name, IconSize size), 
gtk_image_set_from_icon_name)
 
-
   _WRAP_METHOD(void clear(), gtk_image_clear)
 
   _WRAP_METHOD(Type get_storage_type() const, gtk_image_get_storage_type)
@@ -88,21 +88,24 @@ public:
   _WRAP_METHOD(Cairo::RefPtr<Cairo::Surface> get_surface(), gtk_image_get_surface, refreturn)
   _WRAP_METHOD(Cairo::RefPtr<const Cairo::Surface> get_surface() const, gtk_image_get_surface, refreturn, 
constversion)
 
+  _WRAP_METHOD(Glib::RefPtr<Gdk::Texture> get_texture(), gtk_image_get_texture, refreturn)
+  _WRAP_METHOD(Glib::RefPtr<const Gdk::Texture> get_texture() const, gtk_image_get_texture, refreturn, 
constversion)
+
  /** Gets the Gio::Icon and size being displayed by the Gtk::Image.
-  * The storage type of the image must be IMAGE_EMPTY or
-  * IMAGE_GICON (see get_storage_type()).
+  * The storage type of the image must be Image::Type::EMPTY or
+  * Image::Type::GICON (see get_storage_type()).
   *
-  * @param icon_size A place to store an icon size.
+  * @param[out] icon_size A place to store an icon size.
   *
   * @newin{2,14}
   */
   Glib::RefPtr<Gio::Icon> get_gicon(Gtk::IconSize& icon_size);
 
  /** Gets the Gio::Icon and size being displayed by the Gtk::Image.
-  * The storage type of the image must be IMAGE_EMPTY or
-  * IMAGE_GICON (see get_storage_type()).
+  * The storage type of the image must be Image::Type::EMPTY or
+  * Image::Type::GICON (see get_storage_type()).
   *
-  * @param icon_size A place to store an icon size.
+  * @param[out] icon_size A place to store an icon size.
   *
   * @newin{2,14}
   */
@@ -125,6 +128,7 @@ public:
   _WRAP_PROPERTY("use-fallback", bool)
   _WRAP_PROPERTY("resource", std::string)
   _WRAP_PROPERTY("surface", Cairo::RefPtr<Cairo::Surface>)
+  _WRAP_PROPERTY("texture", Glib::RefPtr<Gdk::Texture>)
 };
 
 } //namespace Gtk
diff --git a/gtk/src/stylecontext.ccg b/gtk/src/stylecontext.ccg
index 08cf3f5..5e3fb20 100644
--- a/gtk/src/stylecontext.ccg
+++ b/gtk/src/stylecontext.ccg
@@ -29,10 +29,10 @@ Gdk::RGBA StyleContext::get_color() const
   return Gdk::RGBA(&crgba, true);
 }
 
-Pango::FontDescription StyleContext::get_font(StateFlags state) const
+Pango::FontDescription StyleContext::get_font() const
 {
   PangoFontDescription* description = nullptr;
-  gtk_style_context_get(const_cast<GtkStyleContext*>(gobj()), (GtkStateFlags)state, "font", &description, 
NULL);
+  gtk_style_context_get(const_cast<GtkStyleContext*>(gobj()), "font", &description, NULL);
   // gtk_style_context_get() returns a newly allocated font description, owned by the caller.
   return Glib::wrap(description, false);
 }
diff --git a/gtk/src/stylecontext.hg b/gtk/src/stylecontext.hg
index 955db1d..dbb1df5 100644
--- a/gtk/src/stylecontext.hg
+++ b/gtk/src/stylecontext.hg
@@ -116,13 +116,10 @@ public:
 /* TODO:
   _WRAP_METHOD(void get_property (
                                      const Glib::ustring& property,
-                                     StateFlags    state,
                                      GValue          *value), gtk_style_context_get_property)
   _WRAP_METHOD(void get_valist   (
-                                     StateFlags    state,
                                      va_list          args), gtk_style_context_get_valist)
   _WRAP_METHOD(void get          (
-                                     StateFlags    state,
                                      ...) G_GNUC_NULL_TERMINATED;
 */
 
@@ -171,10 +168,9 @@ public:
    *
    * @newin{3,0}
    *
-   * @param state State to retrieve the font for.
    * @return The Pango::FontDescription for the given state.
    */
-  Pango::FontDescription get_font(StateFlags state =  (StateFlags)0) const;
+  Pango::FontDescription get_font() const;
 
   Border get_border() const;
   _IGNORE(gtk_style_context_get_border)
diff --git a/gtk/src/textview.hg b/gtk/src/textview.hg
index 001d954..2d1a971 100644
--- a/gtk/src/textview.hg
+++ b/gtk/src/textview.hg
@@ -141,10 +141,6 @@ public:
                                             int window_x, int window_y,
                                             int& buffer_x, int& buffer_y) const, 
gtk_text_view_window_to_buffer_coords)
 
-  _WRAP_METHOD(Glib::RefPtr<Gdk::Window> get_window(TextWindowType win), gtk_text_view_get_window, refreturn)
-  _WRAP_METHOD(Glib::RefPtr<const Gdk::Window> get_window(TextWindowType win) const, 
gtk_text_view_get_window, refreturn, constversion)
-  _WRAP_METHOD(TextWindowType get_window_type(const Glib::RefPtr<Gdk::Window>& window), 
gtk_text_view_get_window_type)
-
   _WRAP_METHOD(void set_border_window_size(TextWindowType type, int size), 
gtk_text_view_set_border_window_size)
   _WRAP_METHOD(int get_border_window_size(TextWindowType type) const, gtk_text_view_get_border_window_size)
 
diff --git a/gtk/src/window.hg b/gtk/src/window.hg
index 708d159..4bbdb71 100644
--- a/gtk/src/window.hg
+++ b/gtk/src/window.hg
@@ -19,7 +19,7 @@
 #include <vector>
 
 #include <glibmm/object.h>
-#include <gdkmm/value_cairo.h>
+#include <gdkmm/texture.h>
 #include <gtkmm/bin.h>
 #include <gtkmm/application.h>
 #include <gtkmm/windowgroup.h>
@@ -62,7 +62,7 @@ public:
   _WRAP_PROPERTY("default_width", int)
   _WRAP_PROPERTY("default_height", int)
   _WRAP_PROPERTY("destroy_with_parent", bool)
-  _WRAP_PROPERTY("icon", Cairo::RefPtr<Cairo::Surface>)
+  _WRAP_PROPERTY("icon", Glib::RefPtr<Gdk::Texture>)
   _WRAP_PROPERTY("mnemonics-visible", bool)
   _WRAP_PROPERTY("icon-name", Glib::ustring)
   _WRAP_PROPERTY("display", Glib::RefPtr<Gdk::Display>)
@@ -212,33 +212,33 @@ dnl
   _WRAP_METHOD(void set_deletable(bool setting = true), gtk_window_set_deletable)
   _WRAP_METHOD(bool get_deletable() const, gtk_window_get_deletable)
 
-#m4 
_CONVERSION(`GList*',`std::vector<Cairo::RefPtr<Cairo::Surface>>',`Glib::ListHandler<Cairo::RefPtr<Cairo::Surface>>::list_to_vector($3,
 Glib::OWNERSHIP_SHALLOW)')
-  _WRAP_METHOD(std::vector<Cairo::RefPtr<Cairo::Surface>> get_icon_list(), gtk_window_get_icon_list)
-#m4 _CONVERSION(`GList*',`std::vector<Cairo::RefPtr<const 
Cairo::Surface>>',`Glib::ListHandler<Cairo::RefPtr<const Cairo::Surface>>::list_to_vector($3, 
Glib::OWNERSHIP_SHALLOW)')
-  _WRAP_METHOD(std::vector<Cairo::RefPtr<const Cairo::Surface>> get_icon_list() const, 
gtk_window_get_icon_list)
+#m4 
_CONVERSION(`GList*',`std::vector<Glib::RefPtr<Gdk::Texture>>',`Glib::ListHandler<Glib::RefPtr<Gdk::Texture>>::list_to_vector($3,
 Glib::OWNERSHIP_SHALLOW)')
+  _WRAP_METHOD(std::vector<Glib::RefPtr<Gdk::Texture>> get_icon_list(), gtk_window_get_icon_list)
+#m4 _CONVERSION(`GList*',`std::vector<Glib::RefPtr<const 
Gdk::Texture>>',`Glib::ListHandler<Glib::RefPtr<const Gdk::Texture>>::list_to_vector($3, 
Glib::OWNERSHIP_SHALLOW)')
+  _WRAP_METHOD(std::vector<Glib::RefPtr<const Gdk::Texture>> get_icon_list() const, gtk_window_get_icon_list)
 
-#m4 _CONVERSION(`const 
std::vector<Cairo::RefPtr<Cairo::Surface>>&',`GList*',`Glib::ListHandler<Cairo::RefPtr<Cairo::Surface>>::vector_to_list($3).data()')
-  _WRAP_METHOD(void set_icon_list(const std::vector<Cairo::RefPtr<Cairo::Surface>>& list),
+#m4 _CONVERSION(`const 
std::vector<Glib::RefPtr<Gdk::Texture>>&',`GList*',`Glib::ListHandler<Glib::RefPtr<Gdk::Texture>>::vector_to_list($3).data()')
+  _WRAP_METHOD(void set_icon_list(const std::vector<Glib::RefPtr<Gdk::Texture>>& list),
                gtk_window_set_icon_list)
 
-  _WRAP_METHOD(void set_icon(const Cairo::RefPtr<Cairo::Surface>& icon),
+  _WRAP_METHOD(void set_icon(const Glib::RefPtr<Gdk::Texture>& icon),
                gtk_window_set_icon)
 
   _WRAP_METHOD(void set_icon_name(const Glib::ustring& name), gtk_window_set_icon_name, newin "2,18")
   _WRAP_METHOD(bool set_icon_from_file(const std::string& filename), gtk_window_set_icon_from_file, errthrow)
 
-  _WRAP_METHOD(Cairo::RefPtr<Cairo::Surface> get_icon(), gtk_window_get_icon, refreturn)
-  _WRAP_METHOD(Cairo::RefPtr<const Cairo::Surface> get_icon() const, gtk_window_get_icon, refreturn, 
constversion)
+  _WRAP_METHOD(Glib::RefPtr<Gdk::Texture> get_icon(), gtk_window_get_icon, refreturn)
+  _WRAP_METHOD(Glib::RefPtr<const Gdk::Texture> get_icon() const, gtk_window_get_icon, refreturn, 
constversion)
 
   _WRAP_METHOD(Glib::ustring get_icon_name() const, gtk_window_get_icon_name)
 
  _WRAP_METHOD(static void set_default_icon_list(
-              const std::vector<Cairo::RefPtr<Cairo::Surface>>& list),
+              const std::vector<Glib::RefPtr<Gdk::Texture>>& list),
               gtk_window_set_default_icon_list)
 
-  _WRAP_METHOD(static std::vector<Cairo::RefPtr<Cairo::Surface>> get_default_icon_list(), 
gtk_window_get_default_icon_list)
+  _WRAP_METHOD(static std::vector<Glib::RefPtr<Gdk::Texture>> get_default_icon_list(), 
gtk_window_get_default_icon_list)
 
-  _WRAP_METHOD(static void set_default_icon(const Cairo::RefPtr<Cairo::Surface>& icon), 
gtk_window_set_default_icon)
+  _WRAP_METHOD(static void set_default_icon(const Glib::RefPtr<Gdk::Texture>& icon), 
gtk_window_set_default_icon)
   _WRAP_METHOD(static void set_default_icon_name(const Glib::ustring& name), 
gtk_window_set_default_icon_name)
   _WRAP_METHOD(static bool set_default_icon_from_file(const std::string& filename), 
gtk_window_set_default_icon_from_file, errthrow)
   _WRAP_METHOD(static void set_auto_startup_notification(bool setting = true), 
gtk_window_set_auto_startup_notification)


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