[gtkmm] Gdk, Gtk: Update for the latest gtk4 (remove Gtk::Menu, etc.)



commit 20fce3e50c0e96a1acf88b62504155acf19db61a
Author: Kjell Ahlstedt <kjellahlstedt gmail com>
Date:   Thu Jan 9 15:04:35 2020 +0100

    Gdk, Gtk: Update for the latest gtk4 (remove Gtk::Menu, etc.)
    
    Remove Gtk::CheckMenuItem, Menu, MenuBar, MenuItem, MenuShell,
    RadioMenuItem, SeparatorMenuItem.

 gdk/src/rgba.ccg                 |  85 ++++++++++++-----------
 gdk/src/rgba.hg                  |  26 +++----
 gdk/src/seat.ccg                 |  19 ------
 gdk/src/seat.hg                  |  22 ------
 gtk/gtkmm.h                      |   7 --
 gtk/gtkmm/radiobuttongroup.cc    |   9 ---
 gtk/gtkmm/radiobuttongroup.h     |   4 --
 gtk/src/appchooserdialog.hg      |   1 -
 gtk/src/appchooserwidget.hg      |   3 -
 gtk/src/checkmenuitem.ccg        |  32 ---------
 gtk/src/checkmenuitem.hg         |  60 ----------------
 gtk/src/entry.hg                 |   1 -
 gtk/src/eventcontrollermotion.hg |   6 +-
 gtk/src/filelist.am              |   7 --
 gtk/src/label.ccg                |   1 -
 gtk/src/menu.ccg                 |  51 --------------
 gtk/src/menu.hg                  | 140 --------------------------------------
 gtk/src/menubar.ccg              |  62 -----------------
 gtk/src/menubar.hg               |  69 -------------------
 gtk/src/menubutton.ccg           |   5 --
 gtk/src/menubutton.hg            |  14 ----
 gtk/src/menuitem.ccg             | 102 ----------------------------
 gtk/src/menuitem.hg              | 106 -----------------------------
 gtk/src/menushell.ccg            |  85 -----------------------
 gtk/src/menushell.hg             | 143 ---------------------------------------
 gtk/src/menutoolbutton.ccg       |   5 --
 gtk/src/menutoolbutton.hg        |   9 ---
 gtk/src/radiomenuitem.ccg        |  62 -----------------
 gtk/src/radiomenuitem.hg         |  77 ---------------------
 gtk/src/separatormenuitem.ccg    |  19 ------
 gtk/src/separatormenuitem.hg     |  41 -----------
 gtk/src/toolitem.ccg             |  11 ---
 gtk/src/toolitem.hg              |  20 +-----
 gtk/src/treeview.ccg             |  31 ---------
 gtk/src/treeview.hg              |   5 --
 gtk/src/widget.ccg               |   9 ---
 gtk/src/widget.hg                |   2 -
 tools/m4/convert_gtk.m4          |  12 ----
 38 files changed, 62 insertions(+), 1301 deletions(-)
---
diff --git a/gdk/src/rgba.ccg b/gdk/src/rgba.ccg
index d5f26a35..7e5d31bb 100644
--- a/gdk/src/rgba.ccg
+++ b/gdk/src/rgba.ccg
@@ -21,7 +21,7 @@
 namespace Gdk
 {
 
- const double MULTIPLIER = 65535.0;
+ const float MULTIPLIER = 65535.0f;
 
 RGBA::RGBA()
 {
@@ -35,7 +35,7 @@ RGBA::RGBA(const Glib::ustring& value)
   set(value);
 }
 
-RGBA::RGBA(double red_, double green_, double blue_, double alpha_)
+RGBA::RGBA(float red_, float green_, float blue_, float alpha_)
 {
   GdkRGBA tmp = { red_, green_, blue_, alpha_, };
   gobject_ = gdk_rgba_copy(&tmp);
@@ -47,7 +47,7 @@ void RGBA::set_grey_u(gushort value, gushort alpha)
   gobject_->alpha = alpha / MULTIPLIER;
 }
 
-void RGBA::set_grey(double g, double alpha)
+void RGBA::set_grey(float g, float alpha)
 {
   gobject_->red = gobject_->green = gobject_->blue = g;
   gobject_->alpha = alpha;
@@ -61,7 +61,7 @@ void RGBA::set_rgba_u(gushort red_, gushort green_, gushort blue_, gushort alpha
   gobject_->alpha = alpha_/ MULTIPLIER;
 }
 
-void RGBA::set_rgba(double red_, double green_, double blue_, double alpha_)
+void RGBA::set_rgba(float red_, float green_, float blue_, float alpha_)
 {
   gobject_->red = red_;
   gobject_->green = green_;
@@ -69,7 +69,7 @@ void RGBA::set_rgba(double red_, double green_, double blue_, double alpha_)
   gobject_->alpha = alpha_;
 }
 
-void RGBA::set_hsv(double h, double s, double v, double alpha)
+void RGBA::set_hsv(float h, float s, float v, float alpha)
 {
   // The HSV color space is described in a long Wikipedia article,
   // http://en.wikipedia.org/wiki/HSV_color_space
@@ -84,11 +84,11 @@ void RGBA::set_hsv(double h, double s, double v, double alpha)
   // When i is even: X + m = V - C * abs(H' mod 2 - 1)
   //                       = v - vs * (1 - (h - i)) = t
 
-  h /= 60.0;
+  h /= 60.0f;
   int i = (int)h;
-  double p = v * (1 - s);
-  double q = v * (1 - s * (h - i));
-  double t = v * (1 - s * (1 - h + i));
+  float p = v * (1 - s);
+  float q = v * (1 - s * (h - i));
+  float t = v * (1 - s * (1 - h + i));
 
   switch(i)
   {
@@ -112,7 +112,7 @@ void RGBA::set_hsv(double h, double s, double v, double alpha)
   }
 }
 
-void RGBA::set_hsl(double h, double s, double l, double alpha)
+void RGBA::set_hsl(float h, float s, float l, float alpha)
 {
   // The HSL color space is described in a long Wikipedia article,
   // http://en.wikipedia.org/wiki/HSV_color_space
@@ -127,44 +127,44 @@ void RGBA::set_hsl(double h, double s, double l, double alpha)
   // The conversion algorithm used here is shown at
   // http://www.w3.org/TR/css3-color/#hsl-color
 
-  if(s == 0.0)
+  if(s == 0.0f)
     set_grey(l, alpha);
   else
   {
-    double t2 = (l < 0.5) ? l * (1.0 + s) : l + s - l * s;
-    double t1 = 2*l-t2;
-    h /= 360.0;
+    float t2 = (l < 0.5f) ? l * (1.0f + s) : l + s - l * s;
+    float t1 = 2*l-t2;
+    h /= 360.0f;
 
-    double tr = h + 1.0/3.0;
-    double tg = h;
-    double tb = h - 1.0/3.0;
-    if (tr > 1.0) tr -= 1.0;
-    if (tb < 0.0) tb += 1.0;
+    float tr = h + 1.0f/3.0f;
+    float tg = h;
+    float tb = h - 1.0f/3.0f;
+    if (tr > 1.0f) tr -= 1.0f;
+    if (tb < 0.0f) tb += 1.0f;
 
-    double r = t1;
-    double g = t1;
-    double b = t1;
+    float r = t1;
+    float g = t1;
+    float b = t1;
 
-    if (tr < 1.0/6.0)
+    if (tr < 1.0f/6.0f)
       r = t1 +(t2-t1) * 6 * tr;
-    else if (tr < 1.0/2.0)
+    else if (tr < 1.0f/2.0f)
       r = t2;
-    else if (tr < 2.0/3.0)
-      r = t1+(t2-t1)*(2.0/3.0 - tr) * 6.0;
+    else if (tr < 2.0f/3.0f)
+      r = t1+(t2-t1)*(2.0f/3.0f - tr) * 6.0f;
 
-    if (tg < 1.0/6.0)
+    if (tg < 1.0f/6.0f)
       g = t1 + (t2 - t1) * 6 * tg;
-    else if (tg < 1.0/2.0)
+    else if (tg < 1.0f/2.0f)
       g = t2;
-    else if (tg < 2.0/3.0)
-      g = t1+(t2-t1)*(2.0/3.0 - tg) * 6.0;
+    else if (tg < 2.0f/3.0f)
+      g = t1+(t2-t1)*(2.0f/3.0f - tg) * 6.0f;
 
-    if (tb < 1.0/6.0)
+    if (tb < 1.0f/6.0f)
       b = t1 +(t2-t1) * 6 * tb;
-    else if (tb < 1.0/2.0)
+    else if (tb < 1.0f/2.0f)
       b = t2;
-    else if (tb < 2.0/3.0)
-      b = t1+(t2-t1)*(2.0/3.0 - tb) * 6.0;
+    else if (tb < 2.0f/3.0f)
+      b = t1+(t2-t1)*(2.0f/3.0f - tb) * 6.0f;
 
     set_rgba(r, g, b, alpha);
   }
@@ -211,43 +211,42 @@ void RGBA::set_alpha_u(gushort value)
   gobject_->alpha = value / MULTIPLIER;
 }
 
-void RGBA::set_red(double value)
+void RGBA::set_red(float value)
 {
   gobject_->red = value;
 }
 
-void RGBA::set_green(double value)
+void RGBA::set_green(float value)
 {
   gobject_->green = value;
 }
 
-void RGBA::set_blue(double value)
+void RGBA::set_blue(float value)
 {
   gobject_->blue = value;
 }
 
-void RGBA::set_alpha(double value)
+void RGBA::set_alpha(float value)
 {
   gobject_->alpha = value;
 }
 
-
-double RGBA::get_red() const
+float RGBA::get_red() const
 {
   return gobject_->red;
 }
 
-double RGBA::get_green() const
+float RGBA::get_green() const
 {
   return gobject_->green;
 }
 
-double RGBA::get_blue() const
+float RGBA::get_blue() const
 {
   return gobject_->blue;
 }
 
-double RGBA::get_alpha() const
+float RGBA::get_alpha() const
 {
   return gobject_->alpha;
 }
diff --git a/gdk/src/rgba.hg b/gdk/src/rgba.hg
index e9f8c8fd..a0dfe30e 100644
--- a/gdk/src/rgba.hg
+++ b/gdk/src/rgba.hg
@@ -74,7 +74,7 @@ public:
    * @param blue_ The blue component of the color, as a fraction.
    * @param alpha_ The alpha component of the color, as a fraction.
    */
-  RGBA(double red_, double green_, double blue_, double alpha_ = 1.0);
+  RGBA(float red_, float green_, float blue_, float alpha_ = 1.0);
 
   /** Set a grey color, by using the same value for all color components.
    * @param value The value to be used for the red, green, and blue components, in the range 0..65535.
@@ -86,7 +86,7 @@ public:
    * @param g The value to be used for the red, green, and blue components, as a fraction.
    * @param alpha The alpha component of the color, as a fraction.
    */
-  void set_grey(double g, double alpha = 1.0);
+  void set_grey(float g, float alpha = 1.0);
 
   /** Set the color, by specifying red, green, and blue color component values.
    * @param red_ The red component of the color, in the range 0..65535.
@@ -102,7 +102,7 @@ public:
    * @param blue_ The blue component of the color, as a fraction.
    * @param alpha_ The alpha component of the color, as a fraction.
    */
-  void set_rgba(double red_, double green_, double blue_, double alpha_ = 1.0);
+  void set_rgba(float red_, float green_, float blue_, float alpha_ = 1.0);
 
   /** Set the color, by specifying hue, saturation, and value (brightness).
    * @param h Hue, in the range 0..360 degrees.
@@ -110,7 +110,7 @@ public:
    * @param v Value (a.k.a. brightness), in the range 0..1.
    * @param alpha The alpha component of the color, in the range 0..1.
    */
-  void set_hsv(double h, double s, double v, double alpha = 1.0);
+  void set_hsv(float h, float s, float v, float alpha = 1.0);
 
   /** Set the color, by specifying hue, saturation, and lightness.
    * @param h Hue, in the range 0..360 degrees.
@@ -118,7 +118,7 @@ public:
    * @param l Lightness, in the range 0..1.
    * @param alpha The alpha component of the color, in the range 0..1.
    */
-  void set_hsl(double h, double s, double l, double alpha = 1.0);
+  void set_hsl(float h, float s, float l, float alpha = 1.0);
 
   _WRAP_METHOD(bool set(const Glib::ustring& spec), gdk_rgba_parse)
 
@@ -166,42 +166,42 @@ public:
   /** Get the red component of the color, as a fraction.
    * @result The red component of the color, as a fraction.
    */
-  double get_red() const;
+  float get_red() const;
 
   /** Get the green component of the color, as a fraction.
    * @result The green component of the color, as a fraction.
    */
-  double get_green() const;
+  float get_green() const;
 
   /** Get the blue component of the color, as a fraction.
    * @result The blue component of the color, as a fraction.
    */
-  double get_blue() const;
+  float get_blue() const;
 
   /** Get the alpha component of the color, as a fraction.
    * @result The alpha component of the color, as a fraction.
    */
-  double get_alpha() const;
+  float get_alpha() const;
 
   /** Set the red component of the color, as a fraction.
    * @param value The red component of the color, as a fraction.
    */
-  void set_red(double value);
+  void set_red(float value);
 
   /** Set the green component of the color, as a fraction.
    * @param value The green component of the color, as a fraction.
    */
-  void set_green(double value);
+  void set_green(float value);
 
   /** Set the blue component of the color, as a fraction.
    * @param value The blue component of the color, as a fraction.
    */
-  void set_blue(double value);
+  void set_blue(float value);
 
   /** Set the alpha component of the color, as a fraction.
    * @param value The alpha component of the color, as a fraction.
    */
-  void set_alpha(double value);
+  void set_alpha(float value);
 
   _WRAP_METHOD(Glib::ustring to_string() const, gdk_rgba_to_string)
 
diff --git a/gdk/src/seat.ccg b/gdk/src/seat.ccg
index d88e0a6f..6ad6f554 100644
--- a/gdk/src/seat.ccg
+++ b/gdk/src/seat.ccg
@@ -19,22 +19,3 @@
 #include <gdkmm/surface.h>
 
 using Capabilities = Gdk::Seat::Capabilities;
-
-namespace
-{
-
-void Seat_grab_callback(GdkSeat*, GdkSurface* surface, gpointer user_data)
-{
-  auto slot = static_cast<Gdk::Seat::SlotGrabPrepare*>(user_data);
-
-  try
-  {
-    (*slot)(Glib::wrap(surface, true));
-  }
-  catch(...)
-  {
-     Glib::exception_handlers_invoke();
-  }
-}
-
-} // anonymous namespace
diff --git a/gdk/src/seat.hg b/gdk/src/seat.hg
index 1e623658..268cb0c7 100644
--- a/gdk/src/seat.hg
+++ b/gdk/src/seat.hg
@@ -44,28 +44,6 @@ protected:
 public:
   _WRAP_ENUM(Capabilities, GdkSeatCapabilities)
 
-  /** For instance,<br>
-   *   void on_grab_prepare(const Glib::RefPtr<Gdk::Surface>& surface);
-   *
-   * Type of the callback used to set up @a surface so it can be
-   * grabbed. A typical action would be ensuring the surface is
-   * visible, although there's room for other initialization actions.
-   *
-   * @param surface The Gdk::Surface being grabbed.
-   *
-   * @newin{3,20}
-   */
-  typedef sigc::slot<void(const Glib::RefPtr<Surface>&)> SlotGrabPrepare;
-
-  _WRAP_METHOD(GrabStatus grab(const Glib::RefPtr<Surface>& surface,
-               Capabilities capabilities,
-               bool owner_events,
-               const Glib::RefPtr<Cursor>& cursor = {},
-               const Glib::RefPtr<const Event>& event = {},
-               const SlotGrabPrepare& slot = {}),
-               gdk_seat_grab, slot_name slot, slot_callback Seat_grab_callback, no_slot_copy)
-
-  _WRAP_METHOD(void ungrab(), gdk_seat_ungrab)
   _WRAP_METHOD(Glib::RefPtr<Display> get_display(), gdk_seat_get_display, refreturn)
   _WRAP_METHOD(Glib::RefPtr<const Display> get_display() const, gdk_seat_get_display, refreturn, 
constversion)
   _WRAP_METHOD(Capabilities get_capabilities() const, gdk_seat_get_capabilities)
diff --git a/gtk/gtkmm.h b/gtk/gtkmm.h
index dfbb84e6..89437aee 100644
--- a/gtk/gtkmm.h
+++ b/gtk/gtkmm.h
@@ -116,7 +116,6 @@ extern const int gtkmm_micro_version;
 #include <gtkmm/cellareacontext.h>
 #include <gtkmm/cellview.h>
 #include <gtkmm/checkbutton.h>
-#include <gtkmm/checkmenuitem.h>
 #include <gtkmm/cellrenderer.h>
 #include <gtkmm/cellrendereraccel.h>
 #include <gtkmm/cellrenderercombo.h>
@@ -194,11 +193,7 @@ extern const int gtkmm_micro_version;
 #include <gtkmm/main.h>
 #include <gtkmm/mediacontrols.h>
 #include <gtkmm/mediafile.h>
-#include <gtkmm/menu.h>
-#include <gtkmm/menubar.h>
 #include <gtkmm/menubutton.h>
-#include <gtkmm/menuitem.h>
-#include <gtkmm/menushell.h>
 #include <gtkmm/messagedialog.h>
 #include <gtkmm/noselection.h>
 #include <gtkmm/notebook.h>
@@ -228,7 +223,6 @@ extern const int gtkmm_micro_version;
 #endif
 #include <gtkmm/progressbar.h>
 #include <gtkmm/radiobutton.h>
-#include <gtkmm/radiomenuitem.h>
 #include <gtkmm/radiotoolbutton.h>
 #include <gtkmm/range.h>
 #include <gtkmm/recentinfo.h>
@@ -241,7 +235,6 @@ extern const int gtkmm_micro_version;
 #include <gtkmm/searchbar.h>
 #include <gtkmm/searchentry.h>
 #include <gtkmm/separator.h>
-#include <gtkmm/separatormenuitem.h>
 #include <gtkmm/separatortoolitem.h>
 #include <gtkmm/settings.h>
 #include <gtkmm/shortcutlabel.h>
diff --git a/gtk/gtkmm/radiobuttongroup.cc b/gtk/gtkmm/radiobuttongroup.cc
index 1ac3d041..be0532dc 100644
--- a/gtk/gtkmm/radiobuttongroup.cc
+++ b/gtk/gtkmm/radiobuttongroup.cc
@@ -21,7 +21,6 @@
 #include <gtkmm/radiobuttongroup.h>
 
 #include <gtkmm/radiobutton.h>
-#include <gtkmm/radiomenuitem.h>
 #include <gtkmm/radiotoolbutton.h>
 #include <gtk/gtk.h>
 
@@ -56,14 +55,6 @@ void RadioButtonGroup::add(RadioButton& item)
   group_ = gtk_radio_button_get_group(item.gobj());
 }
 
-void RadioButtonGroup::add(RadioMenuItem& item)
-{
-  item.set_group(*this);
-
-  //probably not necessary:
-  group_ = gtk_radio_menu_item_get_group(item.gobj());
-}
-
 void RadioButtonGroup::add(RadioToolButton& item)
 {
   item.set_group(*this);
diff --git a/gtk/gtkmm/radiobuttongroup.h b/gtk/gtkmm/radiobuttongroup.h
index 8220ba3e..7bbdb538 100644
--- a/gtk/gtkmm/radiobuttongroup.h
+++ b/gtk/gtkmm/radiobuttongroup.h
@@ -34,7 +34,6 @@ namespace Gtk
 {
 
 class RadioButton;
-class RadioMenuItem;
 class RadioToolButton;
 
 /** RadioButtonGroup, identifier for RadioButtons.
@@ -55,7 +54,6 @@ protected:
   explicit RadioButtonGroup(GSList* group);
 
   friend class Gtk::RadioButton;
-  friend class Gtk::RadioMenuItem;
   friend class Gtk::RadioToolButton;
 
 
@@ -63,7 +61,6 @@ protected:
   //TODO: Add a common multiply-inherited base class, with set_group()=0?
   //      Would that anything useful other than being tidy? murrayc
   void add(RadioButton& item);
-  void add(RadioMenuItem& item);
   void add(RadioToolButton& item);
 
   void* operator new(std::size_t); // not implemented
@@ -73,5 +70,4 @@ protected:
 
 } // namespace Gtk
 
-
 #endif /* _GTKMM_RADIOBUTTONGROUP_H */
diff --git a/gtk/src/appchooserdialog.hg b/gtk/src/appchooserdialog.hg
index 6079978b..84fc778b 100644
--- a/gtk/src/appchooserdialog.hg
+++ b/gtk/src/appchooserdialog.hg
@@ -17,7 +17,6 @@
 
 #include <gtkmm/appchooser.h>
 #include <gtkmm/dialog.h>
-#include <gtkmm/menu.h>
 #include <giomm/file.h>
 _DEFS(gtkmm,gtk)
 _PINCLUDE(gtkmm/private/dialog_p.h)
diff --git a/gtk/src/appchooserwidget.hg b/gtk/src/appchooserwidget.hg
index 8bcd1b64..d3262dbf 100644
--- a/gtk/src/appchooserwidget.hg
+++ b/gtk/src/appchooserwidget.hg
@@ -17,11 +17,9 @@
 
 #include <gtkmm/appchooser.h>
 #include <gtkmm/widget.h>
-#include <gtkmm/menu.h>
 _DEFS(gtkmm,gtk)
 _PINCLUDE(gtkmm/private/widget_p.h)
 
-
 namespace Gtk
 {
 
@@ -80,7 +78,6 @@ public:
 #m4 _CONVERSION(`GAppInfo*',`const Glib::RefPtr<Gio::AppInfo>&',`Glib::wrap($3, true)')
   _WRAP_SIGNAL(void application_selected(const Glib::RefPtr<Gio::AppInfo>& app_info), 
"application-selected", no_default_handler)
   _WRAP_SIGNAL(void application_activated(const Glib::RefPtr<Gio::AppInfo>& app_info), 
"application-activated", no_default_handler)
-  _WRAP_SIGNAL(void populate_popup(Menu* menu, const Glib::RefPtr<Gio::AppInfo>& app_info), 
"populate-popup", no_default_handler)
 
   _WRAP_PROPERTY("show-default", bool)
   _WRAP_PROPERTY("show-recommended", bool)
diff --git a/gtk/src/entry.hg b/gtk/src/entry.hg
index 6e5b5415..a963246d 100644
--- a/gtk/src/entry.hg
+++ b/gtk/src/entry.hg
@@ -18,7 +18,6 @@
 
 #include <gtkmm/widget.h>
 #include <gtkmm/editable.h>
-#include <gtkmm/menu.h>
 #include <gtkmm/celleditable.h>
 #include <gtkmm/entrycompletion.h>
 #include <gtkmm/image.h> //For Image::Type.
diff --git a/gtk/src/eventcontrollermotion.hg b/gtk/src/eventcontrollermotion.hg
index b3d73f26..2462072d 100644
--- a/gtk/src/eventcontrollermotion.hg
+++ b/gtk/src/eventcontrollermotion.hg
@@ -47,6 +47,8 @@ public:
   _WRAP_METHOD(const Widget* get_pointer_origin() const, gtk_event_controller_motion_get_pointer_origin, 
constversion)
   _WRAP_METHOD(Widget* get_pointer_target(), gtk_event_controller_motion_get_pointer_target)
   _WRAP_METHOD(const Widget* get_pointer_target() const, gtk_event_controller_motion_get_pointer_target, 
constversion)
+  _WRAP_METHOD(bool contains_pointer() const, gtk_event_controller_motion_contains_pointer)
+  _WRAP_METHOD(bool is_pointer() const, gtk_event_controller_motion_is_pointer)
 
   // no_default_handler because GtkEventControllerMotionClass is private.
   _WRAP_SIGNAL(void enter(double x, double y, Gdk::CrossingMode mode, Gdk::NotifyType detail),
@@ -55,8 +57,8 @@ public:
     "leave", no_default_handler)
   _WRAP_SIGNAL(void motion(double x, double y), "motion", no_default_handler)
 
-  _WRAP_PROPERTY("is-pointer-focus", bool)
-  _WRAP_PROPERTY("contains-pointer-focus", bool)
+  _WRAP_PROPERTY("is-pointer", bool)
+  _WRAP_PROPERTY("contains-pointer", bool)
 };
 
 } // namespace Gtk
diff --git a/gtk/src/filelist.am b/gtk/src/filelist.am
index 972e7dff..c262cefc 100644
--- a/gtk/src/filelist.am
+++ b/gtk/src/filelist.am
@@ -53,7 +53,6 @@ gtkmm_files_any_hg =          \
        centerbox.hg            \
        centerlayout.hg \
        checkbutton.hg          \
-       checkmenuitem.hg        \
        colorbutton.hg          \
        colorchooser.hg         \
        colorchooserdialog.hg   \
@@ -126,11 +125,7 @@ gtkmm_files_any_hg =               \
        mediacontrols.hg \
        mediafile.hg \
        mediastream.hg \
-       menu.hg                 \
-       menubar.hg              \
        menubutton.hg           \
-       menuitem.hg             \
-       menushell.hg            \
        menutoolbutton.hg       \
        messagedialog.hg        \
        native.hg \
@@ -155,7 +150,6 @@ gtkmm_files_any_hg =                \
        printsettings.hg        \
        progressbar.hg          \
        radiobutton.hg          \
-       radiomenuitem.hg        \
        radiotoolbutton.hg      \
        range.hg                \
        recentinfo.hg           \
@@ -173,7 +167,6 @@ gtkmm_files_any_hg =                \
        selectiondata.hg        \
        selectionmodel.hg \
        separator.hg            \
-       separatormenuitem.hg    \
        separatortoolitem.hg    \
        settings.hg             \
        shortcutlabel.hg                \
diff --git a/gtk/src/label.ccg b/gtk/src/label.ccg
index f784f128..40694f0f 100644
--- a/gtk/src/label.ccg
+++ b/gtk/src/label.ccg
@@ -16,7 +16,6 @@
  */
 
 #include <gtk/gtk.h>
-#include <gtkmm/menu.h>
 
 namespace Gtk
 {
diff --git a/gtk/src/menubutton.ccg b/gtk/src/menubutton.ccg
index 01da7c61..51898e66 100644
--- a/gtk/src/menubutton.ccg
+++ b/gtk/src/menubutton.ccg
@@ -41,11 +41,6 @@ void SignalProxy_MenuButton_create_popup_callback(
 namespace Gtk
 {
 
-void MenuButton::unset_popup()
-{
-  gtk_menu_button_set_popup(gobj(), nullptr);
-}
-
 void MenuButton::unset_popover()
 {
   gtk_menu_button_set_popover(gobj(), nullptr);
diff --git a/gtk/src/menubutton.hg b/gtk/src/menubutton.hg
index 8641c78c..76e1d885 100644
--- a/gtk/src/menubutton.hg
+++ b/gtk/src/menubutton.hg
@@ -16,7 +16,6 @@
  */
 
 #include <gtkmm/widget.h>
-#include <gtkmm/menu.h>
 #include <gtkmm/popover.h>
 #include <giomm/menumodel.h>
 _DEFS(gtkmm,gtk)
@@ -46,14 +45,6 @@ public:
 
   _CTOR_DEFAULT
 
-  _WRAP_METHOD(void set_popup(Menu& menu), gtk_menu_button_set_popup)
-  /** Disables the button.
-   */
-  void unset_popup();
-
-  _WRAP_METHOD(Menu* get_popup(), gtk_menu_button_get_popup)
-  _WRAP_METHOD(const Menu* get_popup() const, gtk_menu_button_get_popup, constversion)
-
   _WRAP_METHOD(void set_popover(Popover& popover), gtk_menu_button_set_popover)
 
   /** Disables the button.
@@ -63,9 +54,6 @@ public:
   _WRAP_METHOD(Popover* get_popover(), gtk_menu_button_get_popover)
   _WRAP_METHOD(const Popover* get_popover() const, gtk_menu_button_get_popover, constversion)
 
-  _WRAP_METHOD(void set_use_popover(bool use_popover = true), gtk_menu_button_set_use_popover)
-  _WRAP_METHOD(bool get_use_popover() const, gtk_menu_button_get_use_popover)
-
   _WRAP_METHOD(void set_direction(ArrowType direction), gtk_menu_button_set_direction)
   _WRAP_METHOD(ArrowType get_direction() const, gtk_menu_button_get_direction)
 
@@ -126,11 +114,9 @@ public:
    */
   void unset_create_popup_func();
 
-  _WRAP_PROPERTY("popup", Menu*)
   _WRAP_PROPERTY("menu-model", Glib::RefPtr<Gio::MenuModel>)
   _WRAP_PROPERTY("align-widget", Widget*)
   _WRAP_PROPERTY("direction", ArrowType)
-  _WRAP_PROPERTY("use-popover", bool)
   _WRAP_PROPERTY("popover", Popover*)
   _WRAP_PROPERTY("icon-name", Glib::ustring)
   _WRAP_PROPERTY("label", Glib::ustring)
diff --git a/gtk/src/menutoolbutton.ccg b/gtk/src/menutoolbutton.ccg
index 52a53d3a..b709ad98 100644
--- a/gtk/src/menutoolbutton.ccg
+++ b/gtk/src/menutoolbutton.ccg
@@ -35,11 +35,6 @@ MenuToolButton::MenuToolButton(Widget& icon_widget, const Glib::ustring& label)
 {
 }
 
-void MenuToolButton::unset_menu()
-{
-  gtk_menu_tool_button_set_menu(gobj(), nullptr);
-}
-
 void MenuToolButton::unset_popover()
 {
   gtk_menu_tool_button_set_popover(gobj(), nullptr);
diff --git a/gtk/src/menutoolbutton.hg b/gtk/src/menutoolbutton.hg
index 7752c697..5a407da9 100644
--- a/gtk/src/menutoolbutton.hg
+++ b/gtk/src/menutoolbutton.hg
@@ -19,7 +19,6 @@
 _CONFIGINCLUDE(gtkmmconfig.h)
 
 #include <gtkmm/toolbutton.h>
-#include <gtkmm/menu.h>
 #include <gtkmm/popover.h>
 
 _DEFS(gtkmm,gtk)
@@ -59,13 +58,6 @@ public:
    */
   explicit MenuToolButton(Widget& icon_widget, const Glib::ustring& label = {});
 
-  _WRAP_METHOD(void set_menu(Menu& menu), gtk_menu_tool_button_set_menu)
-  _WRAP_METHOD(Menu* get_menu(), gtk_menu_tool_button_get_menu)
-  _WRAP_METHOD(const Menu* get_menu() const, gtk_menu_tool_button_get_menu, constversion)
-  /** Insensitizes the arrow button.
-   */
-  void unset_menu();
-
   _WRAP_METHOD(void set_popover(Popover& popover), gtk_menu_tool_button_set_popover)
   _WRAP_METHOD(Popover* get_popover(), gtk_menu_tool_button_get_popover)
   _WRAP_METHOD(const Popover* get_popover() const, gtk_menu_tool_button_get_popover, constversion)
@@ -79,7 +71,6 @@ public:
   // no_default_handler because GtkMenuToolButtonClass is private.
   _WRAP_SIGNAL(void show_menu(), show_menu, no_default_handler)
 
-  _WRAP_PROPERTY("menu", Menu*)
   _WRAP_PROPERTY("popover", Popover*)
 };
 
diff --git a/gtk/src/toolitem.ccg b/gtk/src/toolitem.ccg
index 86ec7838..e6c59e3b 100644
--- a/gtk/src/toolitem.ccg
+++ b/gtk/src/toolitem.ccg
@@ -17,14 +17,3 @@
  */
 
 #include <gtk/gtk.h>
-
-namespace Gtk
-{
-
-void ToolItem::unset_proxy_menu_item(const Glib::ustring& menu_item_id)
-{
-  gtk_tool_item_set_proxy_menu_item(gobj(), menu_item_id.c_str(), nullptr);
-}
-
-} // namespace Gtk
-
diff --git a/gtk/src/toolitem.hg b/gtk/src/toolitem.hg
index 2cba1596..9aa6999d 100644
--- a/gtk/src/toolitem.hg
+++ b/gtk/src/toolitem.hg
@@ -75,28 +75,13 @@ public:
   _WRAP_METHOD(Glib::RefPtr<SizeGroup> get_text_size_group(), gtk_tool_item_get_text_size_group, refreturn)
   _WRAP_METHOD(Glib::RefPtr<const SizeGroup> get_text_size_group() const, gtk_tool_item_get_text_size_group, 
refreturn, constversion)
 
-  _WRAP_METHOD(Widget* retrieve_proxy_menu_item(), gtk_tool_item_retrieve_proxy_menu_item)
-  _WRAP_METHOD(const Widget* retrieve_proxy_menu_item() const, gtk_tool_item_retrieve_proxy_menu_item, 
constversion)
-  _WRAP_METHOD(Widget* get_proxy_menu_item(const Glib::ustring& menu_item_id), 
gtk_tool_item_get_proxy_menu_item)
-  _WRAP_METHOD(const Widget* get_proxy_menu_item(const Glib::ustring& menu_item_id) const, 
gtk_tool_item_get_proxy_menu_item, constversion)
-  _WRAP_METHOD(void set_proxy_menu_item(const Glib::ustring& menu_item_id, Widget& menu_item), 
gtk_tool_item_set_proxy_menu_item)
-
-  /** Removes the MenuItem used in the toolbar overflow menu, if any.
-   * The @a menu_item_id is used to identify the caller of this function and
-   * should also be used with get_proxy_menu_item().
-   *
-   * @newin{3,12}
-   *
-   * @param menu_item_id A string used to identify the MenuItem.
-   */
-  void unset_proxy_menu_item(const Glib::ustring& menu_item_id);
+  _WRAP_METHOD(Glib::ustring get_overflow_text() const, gtk_tool_item_get_overflow_text)
+  _WRAP_METHOD(void set_overflow_text(const Glib::ustring& overflow_text), gtk_tool_item_set_overflow_text)
 
   _WRAP_METHOD(void rebuild_menu(), gtk_tool_item_rebuild_menu)
 
   _WRAP_METHOD(void toolbar_reconfigured(), gtk_tool_item_toolbar_reconfigured)
 
-  _WRAP_SIGNAL(bool create_menu_proxy(), create_menu_proxy)
-
   _WRAP_SIGNAL(void toolbar_reconfigured(), toolbar_reconfigured)
 
   _WRAP_PROPERTY("visible_horizontal", bool)
@@ -104,6 +89,7 @@ public:
   _WRAP_PROPERTY("is_important", bool)
   _WRAP_PROPERTY("expand-item", bool)
   _WRAP_PROPERTY("homogeneous", bool)
+  _WRAP_PROPERTY("overflow-text", Glib::ustring)
 };
 
 } // namespace Gtk
diff --git a/gtk/src/treeview.ccg b/gtk/src/treeview.ccg
index eecbf750..abfcb178 100644
--- a/gtk/src/treeview.ccg
+++ b/gtk/src/treeview.ccg
@@ -97,26 +97,6 @@ static void SignalProxy_ColumnDrop_gtk_callback_destroy(void* data)
   delete static_cast<Gtk::TreeView::SlotColumnDrop*>(data);
 }
 
-
-static void SignalProxy_SearchPosition_gtk_callback(GtkTreeView* /* tree_view */, GtkWidget* search_dialog, 
gpointer user_data)
-{
-  auto the_slot = static_cast<Gtk::TreeView::SlotSearchPosition*>(user_data);
-
-  try
-  {
-    (*the_slot)(Glib::wrap(search_dialog));
-  }
-  catch(...)
-  {
-    Glib::exception_handlers_invoke();
-  }
-}
-
-static void SignalProxy_SearchPosition_gtk_callback_destroy(void* data)
-{
-  delete static_cast<Gtk::TreeView::SlotSearchPosition*>(data);
-}
-
 namespace Gtk
 {
 
@@ -355,17 +335,6 @@ void TreeView::set_row_separator_func(const SlotRowSeparator& slot)
       &TreeView_Private::SignalProxy_RowSeparator_gtk_callback_destroy);
 }
 
-void TreeView::set_search_position_func(const SlotSearchPosition& slot)
-{
-  //Create a copy of the slot. A pointer to this will be passed through the callback's data parameter.
-  //It will be deleted when SignalProxy_SearchPosition_gtk_callback_destroy() is called.
-  auto slot_copy = new SlotSearchPosition(slot);
-
-  gtk_tree_view_set_search_position_func(gobj(),
-      &SignalProxy_SearchPosition_gtk_callback, slot_copy,
-      &SignalProxy_SearchPosition_gtk_callback_destroy);
-}
-
 bool TreeView::get_visible_range(TreeModel::Path& start_path, TreeModel::Path& end_path) const
 {
   GtkTreePath* pTreePathStart = nullptr;
diff --git a/gtk/src/treeview.hg b/gtk/src/treeview.hg
index e8c9a39e..c99ef809 100644
--- a/gtk/src/treeview.hg
+++ b/gtk/src/treeview.hg
@@ -654,11 +654,6 @@ public:
   _WRAP_METHOD(const Editable* get_search_entry() const, gtk_tree_view_get_search_entry, constversion)
   _WRAP_METHOD(void set_search_entry(Editable& entry), gtk_tree_view_set_search_entry)
 
-  ///void on_search_position(Gtk::Widget* search_dialog)
-  typedef sigc::slot<void(Gtk::Widget* /* search_dialog */)> SlotSearchPosition;
-  void set_search_position_func(const SlotSearchPosition& slot);
-  _IGNORE(gtk_tree_view_get_search_position_func, gtk_tree_view_set_search_position_func)
-
   _WRAP_METHOD(void convert_widget_to_tree_coords(int wx, int wy, int& tx, int& ty) const, 
gtk_tree_view_convert_widget_to_tree_coords)
   _WRAP_METHOD(void convert_tree_to_widget_coords(int tx, int ty, int& wx, int& wy) const, 
gtk_tree_view_convert_tree_to_widget_coords)
   _WRAP_METHOD(void convert_widget_to_bin_window_coords(int wx, int wy, int& bx, int& by) const, 
gtk_tree_view_convert_widget_to_bin_window_coords)
diff --git a/gtk/src/widget.ccg b/gtk/src/widget.ccg
index f20d12eb..f578b35b 100644
--- a/gtk/src/widget.ccg
+++ b/gtk/src/widget.ccg
@@ -440,15 +440,6 @@ void Widget_Class::dispose_vfunc_callback(GObject* self)
         g_warning("Widget_Class::dispose_vfunc_callback(): after removing from parent.");
         #endif
       }
-      // Special case for GtkMenu because gtk_menu_attach_to_widget does
-      // not set widget->parent but gtk_menu_item_destroy() destroys the menu
-      // like gtk_container_destroy()
-      // Gtk::Menu does not use a parent widget because it must
-      // be contained in its Gtk::Window so that it can be displayed as a popup.
-      else if (GTK_IS_MENU(pWidget) && GTK_IS_MENU_ITEM(gtk_menu_get_attach_widget(GTK_MENU(pWidget))))
-      {
-         gtk_menu_detach(GTK_MENU(pWidget));
-      }
 
       #ifdef GLIBMM_DEBUG_REFCOUNTING
       g_warning("Widget_Class::dispose_vfunc_callback(): before gtk_widget_hide().");
diff --git a/gtk/src/widget.hg b/gtk/src/widget.hg
index b44fc244..673ab561 100644
--- a/gtk/src/widget.hg
+++ b/gtk/src/widget.hg
@@ -489,8 +489,6 @@ public:
   _WRAP_METHOD(void unmap(), gtk_widget_unmap)
 
   // Gtk+ 2.12 tooltip API
-  _WRAP_METHOD(void set_tooltip_window(Window& custom_window), gtk_widget_set_tooltip_window)
-  _WRAP_METHOD(Window* get_tooltip_window(), gtk_widget_get_tooltip_window)
   _WRAP_METHOD(void trigger_tooltip_query(), gtk_widget_trigger_tooltip_query)
   _WRAP_METHOD(void set_tooltip_text(const Glib::ustring& text), gtk_widget_set_tooltip_text)
   _WRAP_METHOD(Glib::ustring get_tooltip_text() const, gtk_widget_get_tooltip_text)
diff --git a/tools/m4/convert_gtk.m4 b/tools/m4/convert_gtk.m4
index c7530a18..1e2c13bc 100644
--- a/tools/m4/convert_gtk.m4
+++ b/tools/m4/convert_gtk.m4
@@ -160,8 +160,6 @@ _CONVERSION(`GtkAdjustment*',`Glib::RefPtr<const Adjustment>',`Glib::wrap($3)')
 _CONVERSION(`GtkWidget*',`Gtk::Widget*',__RP2P)
 _CONVERSION(`GtkWidget*',`Widget*',__RP2P)
 _CONVERSION(`GtkWindow*',`Window*',__RP2P)
-_CONVERSION(`GtkMenu*',`Menu*',__RP2P)
-_CONVERSION(`GtkMenu*',`Gtk::Menu*',__RP2P)
 _CONVERSION(`GtkPopover*',`Popover*',__RP2P)
 _CONVERSION(`GtkToolItem*',`ToolItem*',__RP2P)
 _CONVERSION(`GtkToolItemGroup*',`ToolItemGroup*',__RP2P)
@@ -210,7 +208,6 @@ _CONVERSION(`const Glib::RefPtr<Adjustment>&',`GtkAdjustment*',__CONVERT_REFPTR_
 _CONVERSION(`Gtk::Widget*',`GtkWidget*',__FP2P)
 _CONVERSION(`Widget*',`GtkWidget*',__FP2P)
 _CONVERSION(`Window*',`GtkWindow*',__FP2P)
-_CONVERSION(`Menu*',`GtkMenu*',__FP2P)
 
 #
 # Ptr (gtk+) -> Ptr (gtkmm) (downcast)
@@ -221,9 +218,6 @@ _CONVERSION(`GtkWidget*',`Container*',`Glib::wrap((GtkContainer*)($3))')
 _CONVERSION(`GtkWidget*',`Entry*',`Glib::wrap((GtkEntry*)($3))')
 _CONVERSION(`GtkWidget*',`HeaderBar*',`Glib::wrap((GtkHeaderBar*)($3))')
 _CONVERSION(`GtkWidget*',`Label*',`Glib::wrap((GtkLabel*)($3))')
-_CONVERSION(`GtkWidget*',`Menu*',`Glib::wrap((GtkMenu*)($3))')
-_CONVERSION(`GtkWidget*',`MenuItem*',`Glib::wrap((GtkMenuItem*)($3))')
-_CONVERSION(`GtkWidget*',`OptionMenu*',`Glib::wrap((GtkOptionMenu*)($3))')
 _CONVERSION(`GtkWidget*',`Popover*',`Glib::wrap((GtkPopover*)($3))')
 _CONVERSION(`GtkWidget*',`RadioButton*',`Glib::wrap((GtkRadioButton*)($3))')
 _CONVERSION(`GtkWidget*',`Gtk::Scrollbar*',__RP2PD)
@@ -242,9 +236,6 @@ _CONVERSION(`GtkWidget*',`const Gtk::CheckButton*',__RP2CPD)
 _CONVERSION(`GtkWidget*',`const Container*',`Glib::wrap((GtkContainer*)($3))')
 _CONVERSION(`GtkWidget*',`const Entry*',`Glib::wrap((GtkEntry*)($3))')
 _CONVERSION(`GtkWidget*',`const Label*',`Glib::wrap((GtkLabel*)($3))')
-_CONVERSION(`GtkWidget*',`const Menu*',`Glib::wrap((GtkMenu*)($3))')
-_CONVERSION(`GtkWidget*',`const MenuItem*',`Glib::wrap((GtkMenuItem*)($3))')
-_CONVERSION(`GtkWidget*',`const OptionMenu*',`Glib::wrap((GtkOptionMenu*)($3))')
 _CONVERSION(`GtkWidget*',`const Popover*',`Glib::wrap((GtkPopover*)($3))')
 _CONVERSION(`GtkWidget*',`const RadioButton*',`Glib::wrap((GtkRadioButton*)($3))')
 _CONVERSION(`GtkWidget*',`const Gtk::Scrollbar*',__RP2CPD)
@@ -262,9 +253,6 @@ _CONVERSION(`GtkWidget*', `const Widget&', `*Glib::wrap($3)')
 
 # Ref (Gtkmm) -> GtkWidget* Ptr (gtk+)
 define(`__FR2PD',`($`'3).Gtk::Widget::gobj()')
-_CONVERSION(`MenuShell&',`GtkWidget*',__FR2PD)
-_CONVERSION(`MenuItem&',`GtkWidget*',__FR2PD)
-_CONVERSION(`Menu&',`GtkWidget*',__FR2PD)
 _CONVERSION(`Popover&',`GtkWidget*',__FR2PD)
 _CONVERSION(`Gtk::TreeItem&',`GtkWidget*',__FR2PD)
 _CONVERSION(`FileChooserDialog&',`GtkWidget*',__FR2PD)


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