[gtkmm] Gdk, Gtk: Update for the latest gtk4 (add Gtk::DragIcon, etc)



commit f9bd4d2bf57f23fe04edadbbe282586eec97b6d0
Author: Kjell Ahlstedt <kjellahlstedt gmail com>
Date:   Tue Mar 10 09:13:59 2020 +0100

    Gdk, Gtk: Update for the latest gtk4 (add Gtk::DragIcon, etc)
    
    * gtk/src/dragicon.[ccg|hg]:
    * gtk/src/droptargetasync.[ccg|hg]: New files.
    * gtk/src/widget.[ccg|hg]: Remove property_expand() and property_margin().
    Remove modal grab methods.
    
    Many other changes.

 .gitignore                          |   4 ++
 demos/gtk-demo/example_builder.ui   |   3 +-
 demos/gtk-demo/example_flowbox.cc   |   2 +-
 demos/gtk-demo/example_glarea.cc    |   2 +-
 demos/gtk-demo/example_shortcuts.ui |   5 +-
 demos/gtk-demo/example_stack.cc     |   2 +-
 demos/gtk-demo/example_textview.cc  |   2 +-
 gdk/src/applaunchcontext.hg         |   2 +
 gdk/src/contentformats.ccg          |   4 +-
 gdk/src/device.hg                   |  10 ++--
 gdk/src/display.hg                  |   1 +
 gdk/src/drag.hg                     |   6 ++
 gdk/src/drop.ccg                    |  15 ++++-
 gdk/src/drop.hg                     |  11 ++--
 gdk/src/surface.hg                  |   3 +-
 gtk/gtkmm.h                         |   2 +
 gtk/src/dragicon.ccg                |  27 +++++++++
 gtk/src/dragicon.hg                 |  74 +++++++++++++++++++++++
 gtk/src/droptarget.ccg              |  28 +++++++--
 gtk/src/droptarget.hg               | 107 ++++++++++++++++++++-------------
 gtk/src/droptargetasync.ccg         |  37 ++++++++++++
 gtk/src/droptargetasync.hg          | 116 ++++++++++++++++++++++++++++++++++++
 gtk/src/eventcontroller.hg          |   1 -
 gtk/src/filelist.am                 |   2 +
 gtk/src/iconview.hg                 |   6 +-
 gtk/src/popover.hg                  |  15 +----
 gtk/src/popovermenu.ccg             |  13 +---
 gtk/src/popovermenu.hg              |  22 -------
 gtk/src/spinner.hg                  |   4 +-
 gtk/src/stackpage.hg                |   3 +
 gtk/src/statusbar.hg                |   5 --
 gtk/src/widget.ccg                  |  23 ++-----
 gtk/src/widget.hg                   |  22 -------
 gtk/src/windowgroup.hg              |   8 ---
 tools/m4/convert_gdk.m4             |   1 -
 tools/m4/convert_gtk.m4             |   1 +
 36 files changed, 417 insertions(+), 172 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index da574027..8d9ed170 100644
--- a/.gitignore
+++ b/.gitignore
@@ -240,6 +240,8 @@ gtk/gtkmm/csssection.cc
 gtk/gtkmm/csssection.h
 gtk/gtkmm/dialog.cc
 gtk/gtkmm/dialog.h
+gtk/gtkmm/dragicon.cc
+gtk/gtkmm/dragicon.h
 gtk/gtkmm/dragsource.cc
 gtk/gtkmm/dragsource.h
 gtk/gtkmm/drawingarea.cc
@@ -248,6 +250,8 @@ gtk/gtkmm/dropcontrollermotion.cc
 gtk/gtkmm/dropcontrollermotion.h
 gtk/gtkmm/droptarget.cc
 gtk/gtkmm/droptarget.h
+gtk/gtkmm/droptargetasync.cc
+gtk/gtkmm/droptargetasync.h
 gtk/gtkmm/editable.cc
 gtk/gtkmm/editable.h
 gtk/gtkmm/emojichooser.cc
diff --git a/demos/gtk-demo/example_builder.ui b/demos/gtk-demo/example_builder.ui
index 5fd3fa05..ceb26957 100644
--- a/demos/gtk-demo/example_builder.ui
+++ b/demos/gtk-demo/example_builder.ui
@@ -167,7 +167,8 @@
         <child>
           <object class="GtkScrolledWindow" id="scrolledwindow1">
             <property name="shadow-type">in</property>
-            <property name="expand">True</property>
+            <property name="hexpand">True</property>
+            <property name="vexpand">True</property>
             <child>
               <object class="GtkTreeView" id="treeview1">
                 <property name="model">liststore1</property>
diff --git a/demos/gtk-demo/example_flowbox.cc b/demos/gtk-demo/example_flowbox.cc
index fe005810..e1327be6 100644
--- a/demos/gtk-demo/example_flowbox.cc
+++ b/demos/gtk-demo/example_flowbox.cc
@@ -43,7 +43,7 @@ Example_FlowBox::Example_FlowBox()
   set_default_size(600, 400);
 
   // Scrolled window
-  m_scrolled_window.property_margin() = 6;
+  m_scrolled_window.set_margin(6);
   m_scrolled_window.set_policy(Gtk::PolicyType::NEVER, Gtk::PolicyType::AUTOMATIC);
 
   // Flow box
diff --git a/demos/gtk-demo/example_glarea.cc b/demos/gtk-demo/example_glarea.cc
index 08597a29..34c5ab5b 100644
--- a/demos/gtk-demo/example_glarea.cc
+++ b/demos/gtk-demo/example_glarea.cc
@@ -71,7 +71,7 @@ Example_GLArea::Example_GLArea() : m_RotationAngles(N_AXIS, 0.0f)
   set_title("GL Area");
   set_default_size(400, 600);
 
-  m_VBox.property_margin() = 12;
+  m_VBox.set_margin(12);
   m_VBox.set_spacing(6);
   add(m_VBox);
 
diff --git a/demos/gtk-demo/example_shortcuts.ui b/demos/gtk-demo/example_shortcuts.ui
index dbbda69c..83121162 100644
--- a/demos/gtk-demo/example_shortcuts.ui
+++ b/demos/gtk-demo/example_shortcuts.ui
@@ -5,7 +5,10 @@
     <child>
       <object class="GtkBox">
         <property name="orientation">vertical</property>
-        <property name="margin">50</property>
+        <property name="margin-start">50</property>
+        <property name="margin-end">50</property>
+        <property name="margin-top">50</property>
+        <property name="margin-bottom">50</property>
         <property name="spacing">10</property>
         <child>
           <object class="GtkButton" id="button_builder">
diff --git a/demos/gtk-demo/example_stack.cc b/demos/gtk-demo/example_stack.cc
index 2242fbfa..80ec8c1f 100644
--- a/demos/gtk-demo/example_stack.cc
+++ b/demos/gtk-demo/example_stack.cc
@@ -55,7 +55,7 @@ Example_Stack::Example_Stack()
 
   // Page 3
   m_stack.get_page(m_spinner)->property_icon_name() = "face-laugh-symbolic";
-  m_spinner.property_active() = true;
+  m_spinner.set_spinning(true);
 
   // Stack transition
   m_stack.set_transition_type(Gtk::StackTransitionType::CROSSFADE);
diff --git a/demos/gtk-demo/example_textview.cc b/demos/gtk-demo/example_textview.cc
index 5c044421..0d2dc06f 100644
--- a/demos/gtk-demo/example_textview.cc
+++ b/demos/gtk-demo/example_textview.cc
@@ -67,7 +67,7 @@ Example_TextView::Example_TextView()
   set_default_size(450, 450);
   set_title("Text View");
 
-  m_VPaned.property_margin() = 5;
+  m_VPaned.set_margin(5);
   add(m_VPaned);
 
   /* For convenience, we just use the autocreated buffer from
diff --git a/gdk/src/applaunchcontext.hg b/gdk/src/applaunchcontext.hg
index 8ec6e376..de948e10 100644
--- a/gdk/src/applaunchcontext.hg
+++ b/gdk/src/applaunchcontext.hg
@@ -41,6 +41,8 @@ protected:
 public:
   _WRAP_CREATE()
 
+  _WRAP_METHOD(Glib::RefPtr<Display> get_display(), gdk_app_launch_context_get_display, refreturn)
+  _WRAP_METHOD(Glib::RefPtr<const Display> get_display() const, gdk_app_launch_context_get_display, 
refreturn, constversion)
   _WRAP_METHOD(void set_desktop(int desktop), gdk_app_launch_context_set_desktop)
   _WRAP_METHOD(void set_timestamp(guint32  timestamp), gdk_app_launch_context_set_timestamp)
   _WRAP_METHOD(void set_icon(const Glib::RefPtr<Gio::Icon>& icon), gdk_app_launch_context_set_icon)
diff --git a/gdk/src/contentformats.ccg b/gdk/src/contentformats.ccg
index 5596c426..a90ec4b2 100644
--- a/gdk/src/contentformats.ccg
+++ b/gdk/src/contentformats.ccg
@@ -33,14 +33,14 @@ Glib::RefPtr<ContentFormats> ContentFormats::create(const Glib::ustring& mime_ty
 std::vector<GType> ContentFormats::get_gtypes() const
 {
   gsize n_gtypes = 0;
-  const GType* gtype_array = gdk_content_formats_get_gtypes(const_cast<GdkContentFormats*>(gobj()), 
&n_gtypes);
+  const GType* gtype_array = gdk_content_formats_get_gtypes(gobj(), &n_gtypes);
   return Glib::ArrayHandler<GType>::array_to_vector(gtype_array, n_gtypes, Glib::OWNERSHIP_NONE);
 }
 
 std::vector<Glib::ustring> ContentFormats::get_mime_types() const
 {
   gsize n_mime_types = 0;
-  const char* const* mime_type_array = 
gdk_content_formats_get_mime_types(const_cast<GdkContentFormats*>(gobj()), &n_mime_types);
+  const char* const* mime_type_array = gdk_content_formats_get_mime_types(gobj(), &n_mime_types);
   return Glib::ArrayHandler<Glib::ustring>::array_to_vector(mime_type_array, n_mime_types, 
Glib::OWNERSHIP_NONE);
 }
 
diff --git a/gdk/src/device.hg b/gdk/src/device.hg
index c0d6b6f0..f5fba3e0 100644
--- a/gdk/src/device.hg
+++ b/gdk/src/device.hg
@@ -32,7 +32,6 @@ namespace Gdk
 {
 
 _WRAP_ENUM(EventMask, GdkEventMask)
-_WRAP_ENUM(InputMode, GdkInputMode)
 _WRAP_ENUM(InputSource, GdkInputSource)
 _WRAP_ENUM(GrabStatus, GdkGrabStatus)
 
@@ -59,8 +58,6 @@ public:
   _WRAP_METHOD(bool get_has_cursor() const, gdk_device_get_has_cursor)
 
   _WRAP_METHOD(InputSource get_source() const, gdk_device_get_source)
-  _WRAP_METHOD(InputMode get_mode() const, gdk_device_get_mode)
-  _WRAP_METHOD(bool set_mode(InputMode mode), gdk_device_set_mode)
   _WRAP_METHOD(int get_n_keys() const, gdk_device_get_n_keys)
   _WRAP_METHOD(bool get_key(guint index_, guint& keyval, ModifierType& modifiers) const, gdk_device_get_key)
   _WRAP_METHOD(void set_key(guint index_, guint keyval, ModifierType modifiers), gdk_device_set_key)
@@ -145,6 +142,10 @@ public:
 
   _WRAP_METHOD(AxisFlags get_axes() const, gdk_device_get_axes)
 
+  _WRAP_METHOD(guint get_num_touches() const, gdk_device_get_num_touches)
+  _WRAP_METHOD(Glib::RefPtr<DeviceTool> get_device_tool(), gdk_device_get_device_tool, refreturn)
+  _WRAP_METHOD(Glib::RefPtr<const DeviceTool> get_device_tool() const, gdk_device_get_device_tool, 
refreturn, constversion)
+
   /** Checks if this %Device instance is a DeviceWithPad.
    *
    * The underlying C object is usually a subclass of GdkDevice. If that subclass
@@ -185,8 +186,7 @@ public:
   _WRAP_PROPERTY("name", Glib::ustring, newin "3,22")
   _WRAP_PROPERTY("type", Type, newin "3,22")
   _WRAP_PROPERTY("associated-device", Glib::RefPtr<Device>, newin "3,22")
-  _WRAP_PROPERTY("input-source", InputSource, newin "3,22")
-  _WRAP_PROPERTY("input-mode", InputMode, newin "3,22")
+  _WRAP_PROPERTY("source", InputSource, newin "3,22")
   _WRAP_PROPERTY("has-cursor", bool, newin "3,22")
   _WRAP_PROPERTY("n-axes", guint, newin "3,22")
   _WRAP_PROPERTY("vendor-id", Glib::ustring, newin "3,22")
diff --git a/gdk/src/display.hg b/gdk/src/display.hg
index 3d40e79a..84bd9ca2 100644
--- a/gdk/src/display.hg
+++ b/gdk/src/display.hg
@@ -90,6 +90,7 @@ public:
   _WRAP_METHOD(bool supports_shapes() const, gdk_display_supports_shapes)
   _WRAP_METHOD(bool supports_input_shapes() const, gdk_display_supports_input_shapes)
   _WRAP_METHOD(void notify_startup_complete(const Glib::ustring& startup_id), 
gdk_display_notify_startup_complete)
+  _WRAP_METHOD(Glib::ustring get_startup_notification_id() const, gdk_display_get_startup_notification_id)
 
 #m4 _CONVERSION(`GdkAppLaunchContext*',`Glib::RefPtr<AppLaunchContext>', `Glib::wrap($3)')
 #m4 _CONVERSION(`GdkAppLaunchContext*',`Glib::RefPtr<const AppLaunchContext>', `Glib::wrap($3)')
diff --git a/gdk/src/drag.hg b/gdk/src/drag.hg
index 065af38b..ae6476fa 100644
--- a/gdk/src/drag.hg
+++ b/gdk/src/drag.hg
@@ -65,6 +65,12 @@ public:
 
   _WRAP_METHOD(void set_hotspot(int hot_x, int hot_y), gdk_drag_set_hotspot)
 
+  _WRAP_METHOD(Glib::RefPtr<ContentProvider> get_content(), gdk_drag_get_content, refreturn)
+  _WRAP_METHOD(Glib::RefPtr<const ContentProvider> get_content() const, gdk_drag_get_content, refreturn, 
constversion)
+
+  _WRAP_METHOD(Glib::RefPtr<Surface> get_surface(), gdk_drag_get_surface, refreturn)
+  _WRAP_METHOD(Glib::RefPtr<const Surface> get_surface() const, gdk_drag_get_surface, refreturn, 
constversion)
+
   _WRAP_PROPERTY("content", Glib::RefPtr<ContentProvider>)
   _WRAP_PROPERTY("device", Glib::RefPtr<Device>)
   _WRAP_PROPERTY("display", Glib::RefPtr<Display>)
diff --git a/gdk/src/drop.ccg b/gdk/src/drop.ccg
index 62f8e39c..0edb4f83 100644
--- a/gdk/src/drop.ccg
+++ b/gdk/src/drop.ccg
@@ -29,7 +29,8 @@ namespace Gdk
 
 void Drop::refuse()
 {
-  gdk_drop_status(gobj(), (static_cast<GdkDragAction>(0)) /* see GDK docs */);
+  // see GDK docs
+  gdk_drop_status(gobj(), static_cast<GdkDragAction>(0), static_cast<GdkDragAction>(0));
 }
 
 void Drop::failed()
@@ -37,4 +38,16 @@ void Drop::failed()
   gdk_drop_finish(gobj(), (static_cast<GdkDragAction>(0)) /* see GDK docs */);
 }
 
+Glib::ValueBase Drop::read_value_finish(const Glib::RefPtr<Gio::AsyncResult>& result)
+{
+  GError* gerror = nullptr;
+  const GValue* gvalue = gdk_drop_read_value_finish(gobj(), Glib::unwrap(result), &gerror);
+  if (gerror)
+    ::Glib::Error::throw_exception(gerror);
+
+  Glib::ValueBase retvalue;
+  retvalue.init(gvalue);
+  return retvalue;
+}
+
 } // namespace Gdk
diff --git a/gdk/src/drop.hg b/gdk/src/drop.hg
index a01b73da..c067d8eb 100644
--- a/gdk/src/drop.hg
+++ b/gdk/src/drop.hg
@@ -62,7 +62,7 @@ public:
   _WRAP_METHOD(Glib::RefPtr<Drag> get_drag(), gdk_drop_get_drag, refreturn)
   _WRAP_METHOD(Glib::RefPtr<const Drag> get_drag() const, gdk_drop_get_drag, refreturn, constversion)
 
-  _WRAP_METHOD(void status(DragAction actions), gdk_drop_status)
+  _WRAP_METHOD(void status(DragAction actions, DragAction preferred), gdk_drop_status)
   /** Indicates that a drop will not be accepted.
    * This function may be called by the drag destination in response to
    * Gdk::Event::Type::DRAG_ENTER or Gdk::Event::Type::DRAG_MOTION events.
@@ -84,10 +84,11 @@ public:
   _WRAP_METHOD(Glib::RefPtr<Gio::InputStream> read_finish(const Glib::RefPtr<Gio::AsyncResult>& result,
     Glib::ustring& out_mime_type{>>}), gdk_drop_read_finish, errthrow)
 
-  _WRAP_METHOD(void read_text_async(const Gio::SlotAsyncReady& slot{callback}, const 
Glib::RefPtr<Gio::Cancellable>& cancellable{.?}),
-    gdk_drop_read_text_async, slot_name slot, slot_callback Gio::SignalProxy_async_callback)
-  _WRAP_METHOD(Glib::ustring read_text_finish(const Glib::RefPtr<Gio::AsyncResult>& result),
-    gdk_drop_read_text_finish, errthrow)
+  _WRAP_METHOD(void read_value_async(GType type, int io_priority,
+    const Gio::SlotAsyncReady& slot{callback}, const Glib::RefPtr<Gio::Cancellable>& cancellable{.?}),
+    gdk_drop_read_value_async, slot_name slot, slot_callback Gio::SignalProxy_async_callback)
+  _WRAP_METHOD_DOCS_ONLY(gdk_drop_read_value_finish)
+  Glib::ValueBase read_value_finish(const Glib::RefPtr<Gio::AsyncResult>& result);
 
   _WRAP_PROPERTY("actions", DragAction)
   _WRAP_PROPERTY("device", Glib::RefPtr<Device>)
diff --git a/gdk/src/surface.hg b/gdk/src/surface.hg
index fc427c54..dc530d60 100644
--- a/gdk/src/surface.hg
+++ b/gdk/src/surface.hg
@@ -114,8 +114,9 @@ public:
 
   _WRAP_METHOD(void input_shape_combine_region(const ::Cairo::RefPtr< ::Cairo::Region>& shape_region, int 
offset_x, int offset_y), gdk_surface_input_shape_combine_region)
 
-  _WRAP_METHOD(bool is_visible() const, gdk_surface_is_visible)
   _WRAP_METHOD(bool is_viewable() const, gdk_surface_is_viewable)
+  _WRAP_METHOD(bool get_mapped() const, gdk_surface_get_mapped)
+  _WRAP_METHOD(bool get_autohide() const, gdk_surface_get_autohide)
   _WRAP_METHOD(State get_state() const, gdk_surface_get_state)
   _WRAP_METHOD(void set_type_hint(TypeHint hint), gdk_surface_set_type_hint)
   _WRAP_METHOD(TypeHint get_type_hint(), gdk_surface_get_type_hint)
diff --git a/gtk/gtkmm.h b/gtk/gtkmm.h
index 2777899a..a20d848f 100644
--- a/gtk/gtkmm.h
+++ b/gtk/gtkmm.h
@@ -137,10 +137,12 @@ extern const int gtkmm_micro_version;
 #include <gtkmm/cssprovider.h>
 #include <gtkmm/csssection.h>
 #include <gtkmm/dialog.h>
+#include <gtkmm/dragicon.h>
 #include <gtkmm/dragsource.h>
 #include <gtkmm/drawingarea.h>
 #include <gtkmm/dropcontrollermotion.h>
 #include <gtkmm/droptarget.h>
+#include <gtkmm/droptargetasync.h>
 #include <gtkmm/editable.h>
 #include <gtkmm/emojichooser.h>
 #include <gtkmm/entry.h>
diff --git a/gtk/src/dragicon.ccg b/gtk/src/dragicon.ccg
new file mode 100644
index 00000000..5c3308f4
--- /dev/null
+++ b/gtk/src/dragicon.ccg
@@ -0,0 +1,27 @@
+/* Copyright (C) 2020 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <gtk/gtk.h>
+
+namespace Gtk
+{
+
+void DragIcon::unset_child()
+{
+  gtk_drag_icon_set_child(gobj(), nullptr);
+}
+
+} // namespace Gtk
diff --git a/gtk/src/dragicon.hg b/gtk/src/dragicon.hg
new file mode 100644
index 00000000..a5cf9284
--- /dev/null
+++ b/gtk/src/dragicon.hg
@@ -0,0 +1,74 @@
+/* Copyright (C) 2020 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <gtkmm/container.h>
+#include <gtkmm/native.h>
+#include <gtkmm/root.h>
+#include <gdkmm/drag.h>
+#include <gdkmm/paintable.h>
+#include <glibmm/value.h>
+
+_DEFS(gtkmm,gtk)
+_PINCLUDE(gtkmm/private/container_p.h)
+
+namespace Gtk
+{
+
+/** A toplevel to use as drag icon.
+ *
+ * %Gtk::DragIcon is a Gtk::Root implementation with the sole purpose
+ * to serve as a drag icon during DND operations. A drag icon moves
+ * with the pointer during a drag operation and is destroyed when
+ * the drag ends.
+ *
+ * To set up a drag icon and associate it with an ongoing drag operation,
+ * use get_for_drag() to get the icon for a drag. You can
+ * then use it like any other widget and use set_child() to
+ * set whatever widget should be used for the drag icon.
+ *
+ * Keep in mind that drag icons do not allow user input.
+ *
+ * @ingroup Widgets
+ * @newin{3,98}
+ */
+class DragIcon : public Container, public Native, public Root
+{
+  _CLASS_GTKOBJECT(DragIcon, GtkDragIcon, GTK_DRAG_ICON, Gtk::Container, GtkContainer)
+  _IMPLEMENTS_INTERFACE(Native)
+  _IMPLEMENTS_INTERFACE(Root)
+  _STRUCT_NOT_HIDDEN
+
+public:
+  _WRAP_METHOD(static DragIcon* get_for_drag(const Glib::RefPtr<Gdk::Drag>& drag), 
gtk_drag_icon_get_for_drag)
+
+  _WRAP_METHOD(void set_child(Widget& child), gtk_drag_icon_set_child)
+  void unset_child();
+  _WRAP_METHOD(Widget* get_child(), gtk_drag_icon_get_child)
+  _WRAP_METHOD(const Widget* get_child() const, gtk_drag_icon_get_child, constversion)
+
+  _WRAP_METHOD(static void set_from_paintable(const Glib::RefPtr<Gdk::Drag>& drag,
+    const Glib::RefPtr<Gdk::Paintable>& paintable, int hot_x, int hot_y),
+    gtk_drag_icon_set_from_paintable)
+
+  //TODO: Is gtk_drag_icon_create_widget_for_value() internal to gtk?
+  // It lacks GDK_AVAILABLE_IN_ALL.
+  //_WRAP_METHOD(static Widget* create_widget_for_value(const Glib::ValueBase& value),
+  //  gtk_drag_icon_create_widget_for_value)
+
+  _WRAP_PROPERTY("child", Widget*)
+};
+
+} // namespace Gtk
diff --git a/gtk/src/droptarget.ccg b/gtk/src/droptarget.ccg
index ee2e7d5e..3f2fe850 100644
--- a/gtk/src/droptarget.ccg
+++ b/gtk/src/droptarget.ccg
@@ -14,13 +14,31 @@
  * License along with this library. If not, see <http://www.gnu.org/licenses/>.
  */
 
-#include <giomm/slot_async.h>
+#include <glibmm/vectorutils.h>
 #include <gtk/gtk.h>
 
 namespace Gtk
 {
-  Glib::RefPtr<DropTarget> DropTarget::create(Gdk::DragAction actions)
-  {
-    return Glib::make_refptr_for_instance<DropTarget>(new DropTarget(nullptr, actions));
-  }
+void DropTarget::set_gtypes(const std::vector<GType>& types)
+{
+  gtk_drop_target_set_gtypes(gobj(), const_cast<GType*>(types.data()), types.size());
 }
+
+std::vector<GType> DropTarget::get_gtypes() const
+{
+  gsize n_gtypes = 0;
+  const GType* gtype_array = gtk_drop_target_get_gtypes(const_cast<GtkDropTarget*>(gobj()), &n_gtypes);
+  return Glib::ArrayHandler<GType>::array_to_vector(gtype_array, n_gtypes, Glib::OWNERSHIP_NONE);
+}
+
+Glib::ValueBase DropTarget::get_value() const
+{
+  const GValue* gvalue = gtk_drop_target_get_value(const_cast<GtkDropTarget*>(gobj()));
+
+  Glib::ValueBase retvalue;
+  if (gvalue)
+    retvalue.init(gvalue);
+  return retvalue;
+}
+
+} // namesoace Gtk
diff --git a/gtk/src/droptarget.hg b/gtk/src/droptarget.hg
index c33e8e3f..59caeaa0 100644
--- a/gtk/src/droptarget.hg
+++ b/gtk/src/droptarget.hg
@@ -22,41 +22,35 @@
 _DEFS(gtkmm,gtk)
 _PINCLUDE(gtkmm/private/eventcontroller_p.h)
 
-// The underlying C code can be found in gtkdragdest.h,.c
-
 namespace Gtk
 {
 /** Event controller to receive DND drops.
  *
- * %Gtk::DropTarget is an auxiliary object that is used to receive
- * Drag-and-Drop operations.
+ * %Gtk::DropTarget is an event controller implementing a simple way to
+ * receive Drag-and-Drop operations.
  *
- * To use a %Gtk::DropTarget to receive drops on a widget, you create
- * a %Gtk::DropTarget object, configure which data formats and actions
- * you support, connect to its signals, and then attach
- * it to the widget with Gtk::Widget::add_controller().
+ * The most basic way to use a %Gtk::DropTarget to receive drops on a
+ * widget is to create it via create() passing in the
+ * GType of the data you want to receive and connect to signal_drop()
+ * to receive the data.
  *
- * During a drag operation, the first signal that a %Gtk::DropTarget
- * emits is signal_accept(), which is meant to determine
- * whether the target is a possible drop site for the ongoing drag.
- * The default handler for the accept signal accepts the drag
- * if it finds a compatible data format and an action that is supported
- * on both sides.
+ * %Gtk::DropTarget supports more options, such as:
  *
- * If it is, and the widget becomes the current target, you will
- * receive a signal_drag_enter(), followed by
- * signal_drag_motion() signals as the pointer moves, and
- * finally either a signal_drag_leave() when the pointer
- * moves off the widget, or a signal_drag_drop() when a drop happens.
+ *  * rejecting potential drops via signal_accept() and the reject() method
+ *    to let other drop targets handle the drop
+ *  * tracking an ongoing drag operation before the drop via
+ *    signal_enter(), signal_motion() and signal_leave()
+ *  * configuring how to receive data by setting property_preload() and
+ *    listening for its availability via property_value()
  *
- * The signal_drag_enter() and signal_drag_motion() handler can call Gdk::Drop::status()
- * to update the status of the ongoing operation. The signal_drag_drop() handler
- * should initiate the data transfer and finish the operation by calling
- * Gdk::Drop::finish().
+ * However, %Gtk::DropTarget is ultimately modeled in a synchronous way
+ * and only supports data transferred via GType.  
+ * If you want full control over an ongoing drop, the Gtk::DropTargetAsync
+ * object gives you this ability.
  *
- * Between the drag-enter and drag-leave signals the widget is the
- * current drop target, and will receive the Gtk::StateFlags::DROP_ACTIVE
- * state, which can be used to style the widget as a drop target.
+ * While a pointer is dragged over the drop target's widget and the drop
+ * has not been rejected, that widget will receive the
+ * Gtk::StateFlags::DROP_ACTIVE state, which can be used to style the widget.
  *
  * @newin{3,96}
  *
@@ -66,44 +60,73 @@ class DropTarget : public EventController
 {
   _CLASS_GOBJECT(DropTarget, GtkDropTarget, GTK_DROP_TARGET, EventController, GtkEventController)
 
-protected:
-  // Gdk::ContentFormats is an immutable object. It can be declared const
-  // in input parameters. No one can change it.
-  _WRAP_CTOR(DropTarget(const Glib::RefPtr<const Gdk::ContentFormats>& formats, Gdk::DragAction actions), 
gtk_drop_target_new)
-
 public:
-  _WRAP_CREATE(const Glib::RefPtr<const Gdk::ContentFormats>& formats, Gdk::DragAction actions = 
static_cast<Gdk::DragAction>(0))
-  static Glib::RefPtr<DropTarget> create(Gdk::DragAction actions = static_cast<Gdk::DragAction>(0));
+  // gtk_drop_target_new() does more than call g_object_new().
+  // GdkDropTarget has no "type" property.
+  _WRAP_METHOD(static Glib::RefPtr<DropTarget> create(GType type, Gdk::DragAction actions), 
gtk_drop_target_new)
+
+  /** Sets the supported Types for this drop target.
+   *
+   * @param types All supported Types that can be dropped.
+   */
+  void set_gtypes(const std::vector<GType>& types);
+  _IGNORE(gtk_drop_target_set_gtypes)
+
+  /** Gets a vector of supported Types. If no type have been set,
+   * an empty vector will be returned.
+   *
+   * @return Vector of types.
+   */
+  std::vector<GType> get_gtypes() const;
+  _IGNORE(gtk_drop_target_get_gtypes)
 
-  _WRAP_METHOD(void set_formats(const Glib::RefPtr<const Gdk::ContentFormats>& formats), 
gtk_drop_target_set_formats)
   _WRAP_METHOD(Glib::RefPtr<Gdk::ContentFormats> get_formats(), gtk_drop_target_get_formats, refreturn)
   _WRAP_METHOD(Glib::RefPtr<const Gdk::ContentFormats> get_formats() const, gtk_drop_target_get_formats, 
refreturn, constversion)
 
   _WRAP_METHOD(void set_actions(Gdk::DragAction actions), gtk_drop_target_set_actions)
   _WRAP_METHOD(Gdk::DragAction get_actions() const, gtk_drop_target_get_actions)
 
+  _WRAP_METHOD(void set_preload(bool preload = true), gtk_drop_target_set_preload)
+  _WRAP_METHOD(bool get_preload() const, gtk_drop_target_get_preload)
+
   _WRAP_METHOD(Glib::RefPtr<Gdk::Drop> get_drop(), gtk_drop_target_get_drop, refreturn)
   _WRAP_METHOD(Glib::RefPtr<const Gdk::Drop> get_drop() const, gtk_drop_target_get_drop, refreturn, 
constversion)
 
-  _WRAP_METHOD(Glib::ustring find_mimetype() const, gtk_drop_target_find_mimetype)
+  _WRAP_METHOD_DOCS_ONLY(gtk_drop_target_get_value)
+  Glib::ValueBase get_value() const;
 
-  _WRAP_METHOD(void deny_drop(const Glib::RefPtr<Gdk::Drop>& drop), gtk_drop_target_deny_drop)
+  _WRAP_METHOD(void reject(), gtk_drop_target_reject)
 
-  _WRAP_PROPERTY("formats", Glib::RefPtr<Gdk::ContentFormats>)
   _WRAP_PROPERTY("actions", Gdk::DragAction)
-  _WRAP_PROPERTY("contains", bool)
+  _WRAP_PROPERTY("drop", Glib::RefPtr<Gdk::Drop>)
+  _WRAP_PROPERTY("formats", Glib::RefPtr<Gdk::ContentFormats>)
+  _WRAP_PROPERTY("preload", bool)
+  _WRAP_PROPERTY("value", GValue*)
 
 #m4 _CONVERSION(`GdkDrop*',`const Glib::RefPtr<Gdk::Drop>&',`Glib::wrap($3, true)')
   // no_default_handler because GtkDropTargetClass is private.
+  // All C signals except "leave" use g_signal_accumulator_first_wins().
   /** Only one signal handler is called. If you connect a handler, it must be
    * called before (instead of) the default handler, otherwise it won't be called.
    * Set the @a after parameter in connect() to <tt>false</tt>.
    */
   _WRAP_SIGNAL(bool accept(const Glib::RefPtr<Gdk::Drop>& drop), "accept", no_default_handler)
-  _WRAP_SIGNAL(void drag_enter(const Glib::RefPtr<Gdk::Drop>& drop), "drag-enter", no_default_handler)
-  _WRAP_SIGNAL(void drag_motion(const Glib::RefPtr<Gdk::Drop>& drop, int x, int y), "drag-motion", 
no_default_handler)
-  _WRAP_SIGNAL(void drag_leave(const Glib::RefPtr<Gdk::Drop>& drop), "drag-leave", no_default_handler)
-  _WRAP_SIGNAL(bool drag_drop(const Glib::RefPtr<Gdk::Drop>& drop, int x, int y), "drag-drop", 
no_default_handler)
+  /** Only one signal handler is called. If you connect a handler, it must be
+   * called before (instead of) the default handler, otherwise it won't be called.
+   * Set the @a after parameter in connect() to <tt>false</tt>.
+   */
+  _WRAP_SIGNAL(Gdk::DragAction enter(double x, double y), "enter", no_default_handler)
+  /** Only one signal handler is called. If you connect a handler, it must be
+   * called before (instead of) the default handler, otherwise it won't be called.
+   * Set the @a after parameter in connect() to <tt>false</tt>.
+   */
+  _WRAP_SIGNAL(Gdk::DragAction motion(double x, double y), "motion", no_default_handler)
+  _WRAP_SIGNAL(void leave(), "leave", no_default_handler)
+  /** Only one signal handler is called. If you connect a handler, it must be
+   * called before (instead of) the default handler, otherwise it won't be called.
+   * Set the @a after parameter in connect() to <tt>false</tt>.
+   */
+  _WRAP_SIGNAL(bool drop(const Glib::ValueBase& value, double x, double y), "drop", no_default_handler)
 };
 
 } // namespace Gtk
diff --git a/gtk/src/droptargetasync.ccg b/gtk/src/droptargetasync.ccg
new file mode 100644
index 00000000..681db344
--- /dev/null
+++ b/gtk/src/droptargetasync.ccg
@@ -0,0 +1,37 @@
+/* Copyright (C) 2020 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <giomm/slot_async.h>
+#include <gtk/gtk.h>
+
+namespace Gtk
+{
+Glib::RefPtr<DropTargetAsync> DropTargetAsync::create(
+  const Glib::RefPtr<const Gdk::ContentFormats>& formats, Gdk::DragAction actions)
+{
+  // gtk_drop_target_async_new() drops our reference from formats. (transfer full)
+  if (formats)
+    formats->reference();
+  return Glib::wrap(gtk_drop_target_async_new(
+    const_cast<GdkContentFormats*>(Glib::unwrap(formats)),
+    static_cast<GdkDragAction>(actions)));
+}
+
+Glib::RefPtr<DropTargetAsync> DropTargetAsync::create(Gdk::DragAction actions)
+{
+  return Glib::wrap(gtk_drop_target_async_new(nullptr, static_cast<GdkDragAction>(actions)));
+}
+}
diff --git a/gtk/src/droptargetasync.hg b/gtk/src/droptargetasync.hg
new file mode 100644
index 00000000..efe1d82c
--- /dev/null
+++ b/gtk/src/droptargetasync.hg
@@ -0,0 +1,116 @@
+/* Copyright (C) 2020 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <gdkmm/contentformats.h>
+#include <gdkmm/drop.h>
+#include <gdkmm/enums.h>
+#include <gtkmm/eventcontroller.h>
+
+_DEFS(gtkmm,gtk)
+_PINCLUDE(gtkmm/private/eventcontroller_p.h)
+
+namespace Gtk
+{
+/** Event controller to receive DND drops.
+ *
+ * %Gtk::DropTargetAsync is an auxiliary object that can be used to receive
+ * Drag-and-Drop operations.  
+ * It is the more complete but also more complex method of handling drop
+ * operations compared to Gtk::DropTarget and you should only use it if
+ * Gtk::DropTarget doesn't provide all the features you need.
+ *
+ * To use a %Gtk::DropTargetAsync to receive drops on a widget, you create
+ * a %Gtk::DropTargetAsync object, configure which data formats and actions
+ * you support, connect to its signals, and then attach
+ * it to the widget with Gtk::Widget::add_controller().
+ *
+ * During a drag operation, the first signal that a %Gtk::DropTargetAsync
+ * emits is signal_accept(), which is meant to determine
+ * whether the target is a possible drop site for the ongoing drop.
+ * The default handler for the accept signal accepts the drop
+ * if it finds a compatible data format and an action that is supported
+ * on both sides.
+ *
+ * If it is, and the widget becomes a target, you will receive a
+ * signal_drag_enter(), followed by signal_drag_motion() as the pointer moves,
+ * optionally a signal_drop() when a drop happens, and finally a
+ * signal_drag_leave() when the pointer moves off the widget.
+ *
+ * The ::drag-enter and ::drag-motion handler return a Gdk::DragAction
+ * to update the status of the ongoing operation. The ::drop handler
+ * should decide if it ultimately accepts the drop and if it does, it
+ * should initiate the data transfer and finish the operation by calling
+ * Gdk::Drop::finish().
+ *
+ * Between the ::drag-enter and ::drag-leave signals the widget is a
+ * current drop target, and will receive the Gtk::StateFlags::DROP_ACTIVE
+ * state, which can be used by themes to style the widget as a drop target.
+ *
+ * @newin{3,98}
+ *
+ * @ingroup Gestures
+ */
+class DropTargetAsync : public EventController
+{
+  _CLASS_GOBJECT(DropTargetAsync, GtkDropTargetAsync, GTK_DROP_TARGET_ASYNC, EventController, 
GtkEventController)
+
+public:
+  // Gdk::ContentFormats is an immutable object. It can be declared const
+  // in input parameters. No one can change it.
+  static Glib::RefPtr<DropTargetAsync> create(const Glib::RefPtr<const Gdk::ContentFormats>& formats,
+    Gdk::DragAction actions = static_cast<Gdk::DragAction>(0));
+  static Glib::RefPtr<DropTargetAsync> create(Gdk::DragAction actions = static_cast<Gdk::DragAction>(0));
+  _IGNORE(gtk_drop_target_async_new)
+
+  _WRAP_METHOD(void set_formats(const Glib::RefPtr<const Gdk::ContentFormats>& formats), 
gtk_drop_target_async_set_formats)
+  _WRAP_METHOD(Glib::RefPtr<Gdk::ContentFormats> get_formats(), gtk_drop_target_async_get_formats, refreturn)
+  _WRAP_METHOD(Glib::RefPtr<const Gdk::ContentFormats> get_formats() const, 
gtk_drop_target_async_get_formats, refreturn, constversion)
+
+  _WRAP_METHOD(void set_actions(Gdk::DragAction actions), gtk_drop_target_async_set_actions)
+  _WRAP_METHOD(Gdk::DragAction get_actions() const, gtk_drop_target_async_get_actions)
+
+  _WRAP_METHOD(void reject_drop(const Glib::RefPtr<Gdk::Drop>& drop), gtk_drop_target_async_reject_drop)
+
+  _WRAP_PROPERTY("actions", Gdk::DragAction)
+  _WRAP_PROPERTY("formats", Glib::RefPtr<Gdk::ContentFormats>)
+
+#m4 _CONVERSION(`GdkDrop*',`const Glib::RefPtr<Gdk::Drop>&',`Glib::wrap($3, true)')
+  // no_default_handler because GtkDropTargetAsyncClass is private.
+  // All C signals except "drag-leave" use g_signal_accumulator_first_wins().
+  /** Only one signal handler is called. If you connect a handler, it must be
+   * called before (instead of) the default handler, otherwise it won't be called.
+   * Set the @a after parameter in connect() to <tt>false</tt>.
+   */
+  _WRAP_SIGNAL(bool accept(const Glib::RefPtr<Gdk::Drop>& drop), "accept", no_default_handler)
+  /** Only one signal handler is called. If you connect a handler, it must be
+   * called before (instead of) the default handler, otherwise it won't be called.
+   * Set the @a after parameter in connect() to <tt>false</tt>.
+   */
+  _WRAP_SIGNAL(Gdk::DragAction drag_enter(const Glib::RefPtr<Gdk::Drop>& drop, double x, double y), 
"drag-enter", no_default_handler)
+  /** Only one signal handler is called. If you connect a handler, it must be
+   * called before (instead of) the default handler, otherwise it won't be called.
+   * Set the @a after parameter in connect() to <tt>false</tt>.
+   */
+  _WRAP_SIGNAL(Gdk::DragAction drag_motion(const Glib::RefPtr<Gdk::Drop>& drop, double x, double y), 
"drag-motion", no_default_handler)
+  _WRAP_SIGNAL(void drag_leave(const Glib::RefPtr<Gdk::Drop>& drop), "drag-leave", no_default_handler)
+  /** Only one signal handler is called. If you connect a handler, it must be
+   * called before (instead of) the default handler, otherwise it won't be called.
+   * Set the @a after parameter in connect() to <tt>false</tt>.
+   */
+  _WRAP_SIGNAL(bool drop(const Glib::RefPtr<Gdk::Drop>& drop, double x, double y), "drop", 
no_default_handler)
+};
+
+} // namespace Gtk
diff --git a/gtk/src/eventcontroller.hg b/gtk/src/eventcontroller.hg
index 7942480f..a4efdf12 100644
--- a/gtk/src/eventcontroller.hg
+++ b/gtk/src/eventcontroller.hg
@@ -70,7 +70,6 @@ public:
 
   _WRAP_METHOD(Widget* get_widget(), gtk_event_controller_get_widget)
   _WRAP_METHOD(const Widget* get_widget() const, gtk_event_controller_get_widget, constversion)
-  _WRAP_METHOD(bool handle_event(const Glib::RefPtr<const Gdk::Event>& event), 
gtk_event_controller_handle_event)
   _WRAP_METHOD(void reset(), gtk_event_controller_reset)
   _WRAP_METHOD(PropagationPhase get_propagation_phase() const, gtk_event_controller_get_propagation_phase)
   _WRAP_METHOD(void set_propagation_phase(PropagationPhase phase), 
gtk_event_controller_set_propagation_phase)
diff --git a/gtk/src/filelist.am b/gtk/src/filelist.am
index 27019ee5..e77f4419 100644
--- a/gtk/src/filelist.am
+++ b/gtk/src/filelist.am
@@ -67,10 +67,12 @@ gtkmm_files_any_hg =                \
        cssprovider.hg          \
        csssection.hg           \
        dialog.hg               \
+       dragicon.hg \
        dragsource.hg \
        drawingarea.hg \
        dropcontrollermotion.hg \
        droptarget.hg \
+       droptargetasync.hg \
        editable.hg             \
        emojichooser.hg \
        entry.hg                \
diff --git a/gtk/src/iconview.hg b/gtk/src/iconview.hg
index 0db4ece8..b08ae8cf 100644
--- a/gtk/src/iconview.hg
+++ b/gtk/src/iconview.hg
@@ -24,7 +24,6 @@
 #include <gtkmm/celllayout.h>
 #include <gtkmm/cellarea.h>
 #include <gtkmm/cellrenderer.h>
-#include <gtkmm/droptarget.h>
 #include <gtkmm/scrollable.h>
 #include <gtkmm/tooltip.h>
 
@@ -232,10 +231,10 @@ public:
      Gdk::DragAction actions{.} = Gdk::DragAction::COPY | Gdk::DragAction::MOVE),
      gtk_icon_view_enable_model_drag_source)
 
-  _WRAP_METHOD(Glib::RefPtr<DropTarget> enable_model_drag_dest(
+  _WRAP_METHOD(void enable_model_drag_dest(
     const Glib::RefPtr<const Gdk::ContentFormats>& formats,
     Gdk::DragAction actions = Gdk::DragAction::COPY | Gdk::DragAction::MOVE),
-    gtk_icon_view_enable_model_drag_dest, refreturn)
+    gtk_icon_view_enable_model_drag_dest)
 
   _WRAP_METHOD(void unset_model_drag_source(), gtk_icon_view_unset_model_drag_source)
   _WRAP_METHOD(void unset_model_drag_dest(), gtk_icon_view_unset_model_drag_dest)
@@ -243,7 +242,6 @@ public:
   _WRAP_METHOD(void set_reorderable(bool reorderable = true), gtk_icon_view_set_reorderable)
   _WRAP_METHOD(bool get_reorderable() const, gtk_icon_view_get_reorderable)
 
-
 /* These are useful to implement your own custom stuff. */
   _WRAP_METHOD(void set_drag_dest_item(const TreeModel::Path& path, DropPosition pos), 
gtk_icon_view_set_drag_dest_item)
 
diff --git a/gtk/src/popover.hg b/gtk/src/popover.hg
index 9bec0865..4575f992 100644
--- a/gtk/src/popover.hg
+++ b/gtk/src/popover.hg
@@ -29,8 +29,7 @@ namespace Gtk
  *
  * %Gtk::Popover is a bubble-like context window, primarily meant to
  * provide context-dependent information or options. Popovers are
- * attached to a widget, passed at construction time on %Gtk::Popover(),
- * or updated afterwards through Gtk::Popover::set_relative_to(), by
+ * attached to a widget, set with Gtk::Widget::set_parent(). By
  * default they will point to the whole widget area, although this
  * behavior can be changed through Gtk::Popover::set_pointing_to().
  *
@@ -54,16 +53,7 @@ class Popover : public Bin, public Native
 public:
   _WRAP_ENUM(Constraint, GtkPopoverConstraint)
 
-  /** Creates a new popover to point to @a relative_to
-   *
-   * @param relative_to The Gtk::Widget the popover is related to
-   */
-  _WRAP_CTOR(Popover(const Widget& relative_to{?}), gtk_popover_new)
-
-  _WRAP_METHOD(void set_relative_to(const Widget& relative_to), gtk_popover_set_relative_to)
-  // transfer none
-  _WRAP_METHOD(Widget* get_relative_to(), gtk_popover_get_relative_to)
-  _WRAP_METHOD(const Widget* get_relative_to() const, gtk_popover_get_relative_to, constversion)
+  _CTOR_DEFAULT
 
   //This cannot take NULL to mean unset.
 #m4 _CONVERSION(`const GdkRectangle*',`const Gdk::Rectangle&',`Glib::wrap($3)')
@@ -85,7 +75,6 @@ public:
   _WRAP_METHOD(void popup(), gtk_popover_popup)
   _WRAP_METHOD(void popdown(), gtk_popover_popdown)
 
-  _WRAP_PROPERTY("relative-to", Widget*)
   _WRAP_PROPERTY("pointing-to", Gdk::Rectangle)
   _WRAP_PROPERTY("position", PositionType)
   _WRAP_PROPERTY("autohide", bool)
diff --git a/gtk/src/popovermenu.ccg b/gtk/src/popovermenu.ccg
index 272ef9f9..98af514c 100644
--- a/gtk/src/popovermenu.ccg
+++ b/gtk/src/popovermenu.ccg
@@ -18,20 +18,11 @@
 
 namespace Gtk
 {
-// Delegating constructors.
-PopoverMenu::PopoverMenu(const Widget& relative_to,
-  const Glib::RefPtr<Gio::MenuModel>& model, Flags flags)
-:
-  PopoverMenu((GtkPopoverMenu*)gtk_popover_menu_new_from_model_full(
-    const_cast<GtkWidget*>(relative_to.gobj()), Glib::unwrap(model),
-    static_cast<GtkPopoverMenuFlags>(flags)))
-{
-}
-
+// Delegating constructor.
 PopoverMenu::PopoverMenu(const Glib::RefPtr<Gio::MenuModel>& model, Flags flags)
 :
   PopoverMenu((GtkPopoverMenu*)gtk_popover_menu_new_from_model_full(
-    nullptr, Glib::unwrap(model), static_cast<GtkPopoverMenuFlags>(flags)))
+    Glib::unwrap(model), static_cast<GtkPopoverMenuFlags>(flags)))
 {
 }
 
diff --git a/gtk/src/popovermenu.hg b/gtk/src/popovermenu.hg
index 48babb16..887aaf65 100644
--- a/gtk/src/popovermenu.hg
+++ b/gtk/src/popovermenu.hg
@@ -60,28 +60,6 @@ public:
   //This is custom-implemented because the gtk_popover_menu_new_from_model() does more
   //than just call g_object_new().
   //See https://bugzilla.gnome.org/show_bug.cgi?id=704671
-  /** Creates a %PopoverMenu and populates it according to @a model.
-   * The popover menu is pointed to the @a relative_to widget.
-   *
-   * The created buttons are connected to actions found in the
-   * ApplicationWindow to which the popover menu belongs - typically
-   * by means of being attached to a widget that is contained within
-   * the ApplicationWindow widget hierarchy.
-   *
-   * Actions can also be added using Widget::insert_action_group()
-   * on the menu's attached widget or on any of its parent widgets.
-   *
-   * The only flag that is supported currently is
-   * Gtk::PopoverMenu::Flags::NESTED, which makes GTK create traditional,
-   * nested submenus instead of the default sliding submenus.
-   *
-   * @param relative_to Widget the popover menu is related to
-   * @param model A Gio::MenuModel or an empty Glib::RefPtr
-   * @param flags Flags that affect how the menu is created
-   */
-  explicit PopoverMenu(const Widget& relative_to,
-    const Glib::RefPtr<Gio::MenuModel>& model = {}, Flags flags = static_cast<Flags>(0));
-
   /** Creates a %PopoverMenu and populates it according to @a model.
    *
    * The created buttons are connected to actions found in the
diff --git a/gtk/src/spinner.hg b/gtk/src/spinner.hg
index e5847bd1..0baae7a1 100644
--- a/gtk/src/spinner.hg
+++ b/gtk/src/spinner.hg
@@ -40,8 +40,10 @@ public:
 
   _WRAP_METHOD(void start(), gtk_spinner_start)
   _WRAP_METHOD(void stop(), gtk_spinner_stop)
+  _WRAP_METHOD(void set_spinning(bool spinning = true), gtk_spinner_set_spinning)
+  _WRAP_METHOD(bool get_spinning() const, gtk_spinner_get_spinning)
 
-  _WRAP_PROPERTY("active", bool)
+  _WRAP_PROPERTY("spinning", bool)
 };
 
 } //namespace Gtk
diff --git a/gtk/src/stackpage.hg b/gtk/src/stackpage.hg
index 7258d2cf..073d4c66 100644
--- a/gtk/src/stackpage.hg
+++ b/gtk/src/stackpage.hg
@@ -39,6 +39,9 @@ public:
   _WRAP_METHOD(Widget* get_child(), gtk_stack_page_get_child)
   _WRAP_METHOD(const Widget* get_child() const, gtk_stack_page_get_child, constversion)
 
+  _WRAP_METHOD(bool get_visible() const, gtk_stack_page_get_visible)
+  _WRAP_METHOD(void set_visible(bool visible = true), gtk_stack_page_set_visible)
+
   _WRAP_PROPERTY("child", Widget*)
   _WRAP_PROPERTY("name", Glib::ustring)
   _WRAP_PROPERTY("title", Glib::ustring)
diff --git a/gtk/src/statusbar.hg b/gtk/src/statusbar.hg
index 996e9ab0..c29ecdce 100644
--- a/gtk/src/statusbar.hg
+++ b/gtk/src/statusbar.hg
@@ -66,11 +66,6 @@ public:
 
   _WRAP_METHOD(void remove_all_messages(guint context_id = 0), gtk_statusbar_remove_all)
 
-  //This actually returns a GtkFrame, though the documentation describes it as "box".
-  //I'm not generally happy about API that returns an unknown type. murrayc.
-  _WRAP_METHOD(Gtk::Widget* get_message_area(), gtk_statusbar_get_message_area)
-  _WRAP_METHOD(const Gtk::Widget* get_message_area() const, gtk_statusbar_get_message_area, constversion)
-
   // no_default_handler because GtkStatusbarClass is private.
 #m4 _CONVERSION(`const char*',`const Glib::ustring&',__GCHARP_TO_USTRING)
   _WRAP_SIGNAL(void text_pushed(guint context_id, const Glib::ustring& text), "text_pushed", 
no_default_handler)
diff --git a/gtk/src/widget.ccg b/gtk/src/widget.ccg
index cf5e3b80..94393cf7 100644
--- a/gtk/src/widget.ccg
+++ b/gtk/src/widget.ccg
@@ -299,21 +299,6 @@ void Widget::unset_focus_child()
   gtk_widget_set_focus_child(gobj(), nullptr);
 }
 
-void Widget::add_modal_grab()
-{
-  gtk_grab_add(gobj());
-}
-
-void Widget::remove_modal_grab()
-{
-  gtk_grab_remove(gobj());
-}
-
-Widget* Widget::get_current_modal_grab()
-{
-  return Glib::wrap(gtk_grab_get_current());
-}
-
 Allocation Widget::get_allocation() const
 {
   Allocation allocation;
@@ -429,12 +414,16 @@ void Widget::remove_action_group(const Glib::ustring& name)
 
 void Widget::set_margin(int margin)
 {
-  property_margin() = margin;
+  set_margin_start(margin);
+  set_margin_end(margin);
+  set_margin_top(margin);
+  set_margin_bottom(margin);
 }
 
 void Widget::set_expand(bool expand)
 {
-  property_expand() = expand;
+  set_hexpand(expand);
+  set_vexpand(expand);
 }
 
 void Widget::add_controller(const Glib::RefPtr<EventController>& controller)
diff --git a/gtk/src/widget.hg b/gtk/src/widget.hg
index f6f9cbe9..5f47790c 100644
--- a/gtk/src/widget.hg
+++ b/gtk/src/widget.hg
@@ -195,24 +195,6 @@ public:
   _WRAP_METHOD(bool has_grab() const, gtk_widget_has_grab)
   _WRAP_METHOD(bool device_is_shadowed(const Glib::RefPtr<const Gdk::Device>& device), 
gtk_widget_device_is_shadowed)
 
-
-  /** Block events to everything else than this widget and its children. This
-   * way you can get modal behaviour (usually not recommended). One practical
-   * example could be when implementing a key-binding widget that needs
-   * exclusive access to the key combination that the user presses next.
-   *
-   * Calls to add_modal_grab should be paired with calls to remove_modal_grab.
-   */
-  void add_modal_grab();
-
-  /** Remove the modal grab of the widget in case it was previously grabbed.
-   */
-  void remove_modal_grab();
-
-  /** Retrieve the widget which is currently grabbing all events.
-   */
-  static Widget* get_current_modal_grab();
-
   _WRAP_METHOD(void set_name(const Glib::ustring& name), gtk_widget_set_name)
   void unset_name();
   _WRAP_METHOD(Glib::ustring get_name() const, gtk_widget_get_name)
@@ -376,8 +358,6 @@ public:
   _WRAP_METHOD(static void set_default_direction(TextDirection dir), gtk_widget_set_default_direction)
   _WRAP_METHOD(static TextDirection get_default_direction(), gtk_widget_get_default_direction)
 
-  _WRAP_METHOD(void input_shape_combine_region(const Cairo::RefPtr<const Cairo::Region>& region), 
gtk_widget_input_shape_combine_region)
-
   _WRAP_METHOD(void set_cursor(const Glib::RefPtr<Gdk::Cursor>& cursor), gtk_widget_set_cursor)
 
   /** Sets a named cursor to be shown when pointer devices point towards the widget.
@@ -677,12 +657,10 @@ dnl
   _WRAP_PROPERTY("margin-end", int)
   _WRAP_PROPERTY("margin-top", int)
   _WRAP_PROPERTY("margin-bottom", int)
-  _WRAP_PROPERTY("margin", int)
   _WRAP_PROPERTY("hexpand", bool)
   _WRAP_PROPERTY("hexpand-set", bool)
   _WRAP_PROPERTY("vexpand", bool)
   _WRAP_PROPERTY("vexpand-set", bool)
-  _WRAP_PROPERTY("expand", bool)
   _WRAP_PROPERTY("opacity", double)
   _WRAP_PROPERTY("overflow", Overflow, newin "3,96")
   _WRAP_PROPERTY("scale-factor", int)
diff --git a/gtk/src/windowgroup.hg b/gtk/src/windowgroup.hg
index ebab528b..b1e5174d 100644
--- a/gtk/src/windowgroup.hg
+++ b/gtk/src/windowgroup.hg
@@ -43,19 +43,11 @@ public:
   _WRAP_METHOD(void add_window(Window& window), gtk_window_group_add_window)
   _WRAP_METHOD(void remove_window(Window& window), gtk_window_group_remove_window)
 
-
 #m4 _CONVERSION(`GList*',`std::vector<Window*>',`Glib::ListHandler<Window*>::list_to_vector($3, 
Glib::OWNERSHIP_SHALLOW)')
   _WRAP_METHOD(std::vector<Window*> list_windows(), gtk_window_group_list_windows)
 
 #m4 _CONVERSION(`GList*',`std::vector<const Window*>',`Glib::ListHandler<const Window*>::list_to_vector($3, 
Glib::OWNERSHIP_SHALLOW)')
   _WRAP_METHOD(std::vector<const Window*> list_windows() const, gtk_window_group_list_windows)
-
-  _WRAP_METHOD(Widget* get_current_grab(), gtk_window_group_get_current_grab)
-  _WRAP_METHOD(const Widget* get_current_grab() const, gtk_window_group_get_current_grab, constversion)
-
-  _WRAP_METHOD(Widget* get_current_grab(const Glib::RefPtr<const Gdk::Device>& device), 
gtk_window_group_get_current_device_grab)
-  _WRAP_METHOD(const Widget* get_current_grab(const Glib::RefPtr<const Gdk::Device>& device) const, 
gtk_window_group_get_current_device_grab, constversion)
 };
 
-
 } // namespace Gtk
diff --git a/tools/m4/convert_gdk.m4 b/tools/m4/convert_gdk.m4
index d8b401ef..fc42187e 100644
--- a/tools/m4/convert_gdk.m4
+++ b/tools/m4/convert_gdk.m4
@@ -47,7 +47,6 @@ _CONV_ENUM(Gdk,FullscreenMode)
 _CONV_ENUM(Gdk,Function)
 _CONV_ENUM(Gdk,Gravity)
 _CONV_ENUM(Gdk,InputCondition)
-_CONV_ENUM(Gdk,InputMode)
 _CONV_ENUM(Gdk,InputSource)
 _CONV_ENUM(Gdk,InterpType)
 _CONV_ENUM(Gdk,JoinStyle)
diff --git a/tools/m4/convert_gtk.m4 b/tools/m4/convert_gtk.m4
index e8c7d13e..e58c199a 100644
--- a/tools/m4/convert_gtk.m4
+++ b/tools/m4/convert_gtk.m4
@@ -217,6 +217,7 @@ _CONVERSION(`GtkWidget*',`Window*',`Glib::wrap((GtkWindow*)($3))')
 _CONVERSION(`GtkWidget*',`TreeView*',`Glib::wrap((GtkTreeView*)($3))')
 _CONVERSION(`GtkWidget*',`Image*',`Glib::wrap((GtkImage*)($3))')
 _CONVERSION(`GtkWidget*',`FileChooserDialog*',`Glib::wrap((GtkFileChooserDialog*)($3))')
+_CONVERSION(`GtkWidget*',`DragIcon*',`Glib::wrap((GtkDragIcon*)($3))')
 
 # Ptr (gtk+) -> const Ptr (gtkmm) (downcast)
 _CONVERSION(`GtkWidget*',`const Button*',`Glib::wrap((GtkButton*)($3))')


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