[gtkmm] Gdk, Gtk: Move signal_popup_layout_changed() and other updates



commit f18b2158112f8f856c93b5c14df4d8adf1e17ee3
Author: Kjell Ahlstedt <kjellahlstedt gmail com>
Date:   Sun Aug 16 13:40:25 2020 +0200

    Gdk, Gtk: Move signal_popup_layout_changed() and other updates
    
    Update for the latest gtk4.
    * gdk/src/popup.hg:
    * gdk/src/surface.hg: Move signal_popup_layout_changed() from
    Surface to Popup. Add Surface::property_[width,height]().
    * gtk/src/gtk_vfuncs.defs: Remove Native vfuncs.
    * gtk/src/popover.hg: Add set/get_offset().

 gdk/src/popup.hg        |  5 +++--
 gdk/src/surface.hg      |  3 ++-
 gtk/src/gtk_vfuncs.defs | 26 --------------------------
 gtk/src/popover.hg      |  3 +++
 4 files changed, 8 insertions(+), 29 deletions(-)
---
diff --git a/gdk/src/popup.hg b/gdk/src/popup.hg
index 289df73e..6fd27636 100644
--- a/gdk/src/popup.hg
+++ b/gdk/src/popup.hg
@@ -56,10 +56,11 @@ public:
   _WRAP_METHOD(int get_position_y() const, gdk_popup_get_position_y)
   _WRAP_METHOD(bool get_autohide() const, gdk_popup_get_autohide)
 
+  // no_default_handler because the wrapped C signal has no default handlers.
+  _WRAP_SIGNAL(void popup_layout_changed(), "popup-layout-changed", no_default_handler)
+
   _WRAP_PROPERTY("parent", Glib::RefPtr<Surface>)
   _WRAP_PROPERTY("autohide", bool)
-
-  // There are no signals or public vfuncs.
 };
 
 } // namespace Gdk
diff --git a/gdk/src/surface.hg b/gdk/src/surface.hg
index fc4cfc62..2dc53783 100644
--- a/gdk/src/surface.hg
+++ b/gdk/src/surface.hg
@@ -170,7 +170,6 @@ public:
   _WRAP_METHOD(Glib::RefPtr<Gdk::CairoContext> create_cairo_context(), gdk_surface_create_cairo_context)
 
   // no_default_handler because the wrapped C signals have no default handlers.
-  _WRAP_SIGNAL(void popup_layout_changed(), "popup-layout-changed", no_default_handler)
   _WRAP_SIGNAL(void size_changed(int width, int height), "size-changed", no_default_handler)
 #m4 _CONVERSION(`CairoRegion*',`const ::Cairo::RefPtr<const ::Cairo::Region>&',`Gdk::Cairo::wrap($3)')
   _WRAP_SIGNAL(bool render(const ::Cairo::RefPtr<const ::Cairo::Region>& expose_region),
@@ -185,6 +184,8 @@ public:
   _WRAP_PROPERTY("display", Glib::RefPtr<Display>)
   _WRAP_PROPERTY("frame-clock", Glib::RefPtr<FrameClock>)
   _WRAP_PROPERTY("mapped", bool)
+  _WRAP_PROPERTY("width", int)
+  _WRAP_PROPERTY("height", int)
 };
 
 } // namespace Gdk
diff --git a/gtk/src/gtk_vfuncs.defs b/gtk/src/gtk_vfuncs.defs
index 02f4b433..b882c630 100644
--- a/gtk/src/gtk_vfuncs.defs
+++ b/gtk/src/gtk_vfuncs.defs
@@ -449,32 +449,6 @@
   )
 )
 
-; GtkNative
-
-(define-vfunc get_surface
-  (of-object "GtkNative")
-  (return-type "GdkSurface*")
-)
-
-(define-vfunc get_renderer
-  (of-object "GtkNative")
-  (return-type "GskRenderer*")
-)
-
-(define-vfunc get_surface_transform
-  (of-object "GtkNative")
-  (return-type "none")
-  (parameters
-    '("double*" "x")
-    '("double*" "y")
-  )
-)
-
-(define-vfunc check_resize
-  (of-object "GtkNative")
-  (return-type "none")
-)
-
 ; GtkRange
 
 (define-vfunc get_range_border
diff --git a/gtk/src/popover.hg b/gtk/src/popover.hg
index fcfefc57..55680adc 100644
--- a/gtk/src/popover.hg
+++ b/gtk/src/popover.hg
@@ -85,6 +85,9 @@ public:
   _WRAP_METHOD(void popup(), gtk_popover_popup)
   _WRAP_METHOD(void popdown(), gtk_popover_popdown)
 
+  _WRAP_METHOD(void set_offset(int x_offset, int y_offset), gtk_popover_set_offset)
+  _WRAP_METHOD(void get_offset(int& x_offset, int& y_offset) const, gtk_popover_get_offset)
+
   _WRAP_PROPERTY("pointing-to", Gdk::Rectangle)
   _WRAP_PROPERTY("position", PositionType)
   _WRAP_PROPERTY("autohide", bool)


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