[gtkmm/use-dllexport: 27/60] Gdk, Gtk: Update for the latest gtk4 (remove Gtk::AccelGroup, etc.)
- From: Chun-wei Fan <fanchunwei src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtkmm/use-dllexport: 27/60] Gdk, Gtk: Update for the latest gtk4 (remove Gtk::AccelGroup, etc.)
- Date: Mon, 8 Jun 2020 02:44:16 +0000 (UTC)
commit e7145b720618c0645a58d9218788545e5d9b8206
Author: Kjell Ahlstedt <kjellahlstedt gmail com>
Date: Sat Apr 11 12:29:18 2020 +0200
Gdk, Gtk: Update for the latest gtk4 (remove Gtk::AccelGroup, etc.)
Remove namespace AccelMap. Remove class AccelGroup and move remaining
static functions to namespace Accelerator.
Gtk::ScaleButton inherits from Widget (was from Button).
Many minor updates.
.gitignore | 2 -
gdk/src/device.hg | 18 ++++--
gdk/src/display.hg | 3 -
gdk/src/event.hg | 10 +++-
gdk/src/toplevel.hg | 5 ++
gdk/src/types.hg | 1 -
gtk/gtkmm.h | 3 +-
gtk/gtkmm/accelerator.cc | 65 ++++++++++++++++++++++
gtk/gtkmm/accelerator.h | 107 +++++++++++++++++++++++++++++++++++
gtk/gtkmm/accelkey.cc | 14 ++---
gtk/gtkmm/accelmap.cc | 85 ----------------------------
gtk/gtkmm/accelmap.h | 142 -----------------------------------------------
gtk/gtkmm/filelist.am | 4 +-
gtk/src/accelgroup.ccg | 55 ------------------
gtk/src/accelgroup.hg | 120 ---------------------------------------
gtk/src/accellabel.ccg | 6 --
gtk/src/accellabel.hg | 11 ----
gtk/src/enums.hg | 1 -
gtk/src/filelist.am | 1 -
gtk/src/iconview.hg | 2 +-
gtk/src/menubutton.hg | 4 ++
gtk/src/popover.hg | 4 ++
gtk/src/root.hg | 2 -
gtk/src/scalebutton.hg | 6 +-
gtk/src/settings.hg | 1 +
gtk/src/stylecontext.hg | 2 -
gtk/src/texttag.hg | 15 +++++
gtk/src/treeview.hg | 5 +-
gtk/src/volumebutton.hg | 8 +--
gtk/src/widget.ccg | 2 -
gtk/src/widget.hg | 25 +--------
gtk/src/window.ccg | 9 ---
gtk/src/window.hg | 31 +----------
tools/m4/convert_gdk.m4 | 3 +-
tools/m4/convert_gtk.m4 | 7 ---
35 files changed, 243 insertions(+), 536 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 7f2faa96..86d5ec38 100644
--- a/.gitignore
+++ b/.gitignore
@@ -139,8 +139,6 @@ gdk/stamp-h2
gtk/gtkmm-*.pc
gtk/gtkmm/aboutdialog.cc
gtk/gtkmm/aboutdialog.h
-gtk/gtkmm/accelgroup.cc
-gtk/gtkmm/accelgroup.h
gtk/gtkmm/accellabel.cc
gtk/gtkmm/accellabel.h
gtk/gtkmm/actionable.cc
diff --git a/gdk/src/device.hg b/gdk/src/device.hg
index f5fba3e0..2679bafe 100644
--- a/gdk/src/device.hg
+++ b/gdk/src/device.hg
@@ -16,24 +16,21 @@
*/
#include <vector>
-
+#include <pangomm/context.h>
#include <gdkmm/cursor.h>
#include <gdkmm/enums.h>
#include <gdkmm/timecoord.h>
#include <gdkmm/types.h>
#include <gdk/gdk.h>
-
_DEFS(gdkmm,gdk)
_PINCLUDE(glibmm/private/object_p.h)
-
namespace Gdk
{
_WRAP_ENUM(EventMask, GdkEventMask)
_WRAP_ENUM(InputSource, GdkInputSource)
-_WRAP_ENUM(GrabStatus, GdkGrabStatus)
class DeviceTool;
class DeviceWithPad;
@@ -146,6 +143,13 @@ public:
_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)
+ _WRAP_METHOD(bool get_caps_lock_state() const, gdk_device_get_caps_lock_state)
+ _WRAP_METHOD(bool get_num_lock_state() const, gdk_device_get_num_lock_state)
+ _WRAP_METHOD(bool get_scroll_lock_state() const, gdk_device_get_scroll_lock_state)
+ _WRAP_METHOD(ModifierType get_modifier_state() const, gdk_device_get_modifier_state)
+ _WRAP_METHOD(Pango::Direction get_direction() const, gdk_device_get_direction)
+ _WRAP_METHOD(bool has_bidi_layouts() const, gdk_device_has_bidi_layouts)
+
/** Checks if this %Device instance is a DeviceWithPad.
*
* The underlying C object is usually a subclass of GdkDevice. If that subclass
@@ -195,6 +199,12 @@ public:
_WRAP_PROPERTY("num-touches", guint, newin "3,22")
_WRAP_PROPERTY("axes", AxisFlags)
_WRAP_PROPERTY("tool", Glib::RefPtr<DeviceTool>, newin "3,94")
+ _WRAP_PROPERTY("direction", Pango::Direction)
+ _WRAP_PROPERTY("has-bidi-layouts", bool)
+ _WRAP_PROPERTY("caps-lock-state", bool)
+ _WRAP_PROPERTY("num-lock-state", bool)
+ _WRAP_PROPERTY("scroll-lock-state", bool)
+ _WRAP_PROPERTY("modifier-state", ModifierType)
};
} // namespace Gdk
diff --git a/gdk/src/display.hg b/gdk/src/display.hg
index 84bd9ca2..70eecad9 100644
--- a/gdk/src/display.hg
+++ b/gdk/src/display.hg
@@ -74,9 +74,6 @@ public:
_WRAP_METHOD(static Glib::RefPtr<Display> get_default(), gdk_display_get_default, refreturn)
- _WRAP_METHOD(GdkKeymap* get_keymap(), gdk_display_get_keymap)
- _WRAP_METHOD(const GdkKeymap* get_keymap() const, gdk_display_get_keymap, constversion)
-
_WRAP_METHOD(void flush(), gdk_display_flush)
_WRAP_METHOD(Glib::RefPtr<Surface> get_default_group(), gdk_display_get_default_group, refreturn)
diff --git a/gdk/src/event.hg b/gdk/src/event.hg
index a93b60d2..686d5fdd 100644
--- a/gdk/src/event.hg
+++ b/gdk/src/event.hg
@@ -42,6 +42,8 @@ class Display;
class Drop;
class Surface;
+_WRAP_ENUM(KeyMatch, GdkKeyMatch)
+
/** Representing an event sequence.
* Used to differentiate between multiple touches on multitouch touchscreens.
* It's a hidden struct. You can test %EventSequence pointers for equality,
@@ -103,8 +105,9 @@ public:
_WRAP_METHOD(bool is_scroll_stop() const, gdk_scroll_event_is_stop)
_WRAP_METHOD(guint get_keyval() const, gdk_key_event_get_keyval)
_WRAP_METHOD(guint get_keycode() const, gdk_key_event_get_keycode)
- _WRAP_METHOD(guint get_scancode() const, gdk_key_event_get_scancode)
- _WRAP_METHOD(guint get_group() const, gdk_key_event_get_group)
+ _WRAP_METHOD(ModifierType get_consumed_modifiers() const, gdk_key_event_get_consumed_modifiers)
+ _WRAP_METHOD(guint get_layout() const, gdk_key_event_get_layout)
+ _WRAP_METHOD(guint get_level() const, gdk_key_event_get_level)
_WRAP_METHOD(bool is_modifier() const, gdk_key_event_is_modifier)
_WRAP_METHOD(bool get_focus_in() const, gdk_focus_event_get_in)
_WRAP_METHOD(bool get_touch_emulating_pointer() const, gdk_touch_event_get_emulating_pointer)
@@ -133,6 +136,9 @@ public:
_WRAP_METHOD(bool get_distance(const Glib::RefPtr<const Event>& event2, double& distance) const,
gdk_events_get_distance)
_WRAP_METHOD(bool get_angle(const Glib::RefPtr<const Event>& event2, double& angle) const,
gdk_events_get_angle)
_WRAP_METHOD(bool get_center(const Glib::RefPtr<const Event>& event2, double& x, double& y) const,
gdk_events_get_center)
+
+ _WRAP_METHOD(KeyMatch matches(guint keyval, ModifierType modifiers) const, gdk_key_event_matches)
+ _WRAP_METHOD(bool get_match(guint& keyval, ModifierType& modifiers) const, gdk_key_event_get_match)
};
} // namespace Gdk
diff --git a/gdk/src/toplevel.hg b/gdk/src/toplevel.hg
index a6ee28bc..4b0b2268 100644
--- a/gdk/src/toplevel.hg
+++ b/gdk/src/toplevel.hg
@@ -67,6 +67,10 @@ public:
_WRAP_METHOD(void set_deletable(bool deletable = true), gdk_toplevel_set_deletable)
_WRAP_METHOD(bool supports_edge_constraints() const, gdk_toplevel_supports_edge_constraints)
+ _WRAP_METHOD(void inhibit_system_shortcuts(const Glib::RefPtr<Event>& event),
+ gdk_toplevel_inhibit_system_shortcuts)
+ _WRAP_METHOD(void restore_system_shortcuts(), gdk_toplevel_restore_system_shortcuts)
+
_WRAP_PROPERTY("state", Surface::State)
_WRAP_PROPERTY("title", Glib::ustring)
_WRAP_PROPERTY("startup-id", Glib::ustring)
@@ -76,6 +80,7 @@ public:
_WRAP_PROPERTY("decorated", bool)
_WRAP_PROPERTY("deletable", bool)
_WRAP_PROPERTY("fullscreen-mode", FullscreenMode)
+ _WRAP_PROPERTY("shortcuts-inhibited", bool)
// There are no signals or public vfuncs.
};
diff --git a/gdk/src/types.hg b/gdk/src/types.hg
index 244bd469..2a876a3b 100644
--- a/gdk/src/types.hg
+++ b/gdk/src/types.hg
@@ -38,7 +38,6 @@ class Window;
_WRAP_ENUM(ByteOrder, GdkByteOrder)
_WRAP_ENUM(ModifierType, GdkModifierType)
-_WRAP_ENUM(ModifierIntent, GdkModifierIntent)
typedef GdkGeometry Geometry; //It's not used enough to justify having a wrapper.
diff --git a/gtk/gtkmm.h b/gtk/gtkmm.h
index a20d848f..aaeb3a9c 100644
--- a/gtk/gtkmm.h
+++ b/gtk/gtkmm.h
@@ -91,9 +91,8 @@ extern const int gtkmm_micro_version;
#include <gtkmm/object.h>
#include <gtkmm/aboutdialog.h>
+#include <gtkmm/accelerator.h>
#include <gtkmm/accelkey.h>
-#include <gtkmm/accelmap.h>
-#include <gtkmm/accelgroup.h>
#include <gtkmm/actionable.h>
#include <gtkmm/actionbar.h>
#include <gtkmm/adjustment.h>
diff --git a/gtk/gtkmm/accelerator.cc b/gtk/gtkmm/accelerator.cc
new file mode 100644
index 00000000..8184c74d
--- /dev/null
+++ b/gtk/gtkmm/accelerator.cc
@@ -0,0 +1,65 @@
+/* Copyright 1998-2002 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, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include <glibmm/utility.h>
+#include <gtkmm/accelerator.h>
+#include <gtk/gtk.h>
+
+// The corresponding gtk functions are defined in gtkaccelgroup.c.
+
+namespace Gtk
+{
+
+namespace Accelerator
+{
+
+bool valid(guint keyval, Gdk::ModifierType modifiers)
+{
+ return gtk_accelerator_valid(keyval, (GdkModifierType) modifiers);
+}
+
+bool parse(const Glib::ustring& accelerator,
+ guint& accelerator_key,
+ Gdk::ModifierType& accelerator_mods)
+{
+ auto mods = GdkModifierType(0);
+ const auto result = gtk_accelerator_parse(accelerator.c_str(), &accelerator_key, &mods);
+
+ accelerator_mods = static_cast<Gdk::ModifierType>(mods);
+ return result;
+}
+
+Glib::ustring name(guint accelerator_key, Gdk::ModifierType accelerator_mods)
+{
+ return Glib::convert_return_gchar_ptr_to_ustring(gtk_accelerator_name(
+ accelerator_key, static_cast<GdkModifierType>(accelerator_mods)));
+}
+
+Glib::ustring get_label(guint accelerator_key, Gdk::ModifierType accelerator_mods)
+{
+ return Glib::convert_return_gchar_ptr_to_ustring(gtk_accelerator_get_label(
+ accelerator_key, static_cast<GdkModifierType>(accelerator_mods)));
+}
+
+Gdk::ModifierType get_default_mod_mask()
+{
+ return static_cast<Gdk::ModifierType>(gtk_accelerator_get_default_mod_mask());
+}
+
+} // namespace Accelerator
+
+} // namespace Gtk
diff --git a/gtk/gtkmm/accelerator.h b/gtk/gtkmm/accelerator.h
new file mode 100644
index 00000000..df9d2ef0
--- /dev/null
+++ b/gtk/gtkmm/accelerator.h
@@ -0,0 +1,107 @@
+#ifndef _GTKMM_ACCELERATOR_H
+#define _GTKMM_ACCELERATOR_H
+/* Copyright (C) 1998-2002 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, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include <glibmm/ustring.h>
+#include <gdkmm/types.h>
+
+// The corresponding gtk functions are declared in gtkaccelgroup.h.
+
+namespace Gtk
+{
+
+/** Utilities for keyboard accelerators.
+ *
+ * We have various utility functions to parse and generate
+ * textual representations of keyboard accelerators.
+ *
+ * If you want to set up keyboard accelerators for widgets,
+ * Gtk::ShortcutTrigger is probably more convenient than the
+ * functions in this namespace.
+ */
+namespace Accelerator
+{
+ /** Determines whether a given keyval and modifier mask constitute
+ * a valid keyboard accelerator.
+ *
+ * For example, the 'a' keyval plus Gdk::ModifierType::CONTROL_MASK is valid -
+ * this is a "Ctrl+a" accelerator. But you can't, for instance, use the
+ * GDK_KEY_Control_L keyval as an accelerator.
+ *
+ * @return <tt>true</tt> if the accelerator is valid.
+ */
+ bool valid(guint keyval, Gdk::ModifierType modifiers);
+
+ /** Parses a string representing an accelerator.
+ *
+ * The format looks like “<Control>a” or “<Shift><Alt>F1”.
+ *
+ * The parser is fairly liberal and allows lower or upper case, and also
+ * abbreviations such as “<Ctl>” and “<Ctrl>”. Key names are parsed using
+ * gdk_keyval_from_name(). For character keys the name is not the symbol,
+ * but the lowercase name, e.g. one would use “<Ctrl>minus” instead of
+ * “<Ctrl>-”.
+ *
+ * If the parse fails, @a accelerator_key and @a accelerator_mods will
+ * be set to 0 (zero).
+ *
+ * @param accelerator See the Gtk::AccelKey constructor for the format.
+ * @param[out] accelerator_key Accelerator keyval.
+ * @param[out] accelerator_mods Accelerator modifier mask.
+ * @return <tt>true</tt> if parsing succeeded.
+ */
+ bool parse(const Glib::ustring& accelerator, guint& accelerator_key,
+ Gdk::ModifierType& accelerator_mods);
+
+ /** Converts an accelerator keyval and modifier mask
+ * into a string parseable by parse().
+ *
+ * For example, if you pass in 'q' and Gdk::ModifierType::CONTROL_MASK,
+ * it returns "<Control>q".
+ *
+ * If you need to display accelerators in the user interface, see get_label().
+ *
+ * @param accelerator_key Accelerator keyval.
+ * @param accelerator_mods Accelerator modifier mask.
+ * @return The accelerator name.
+ */
+ Glib::ustring name(guint accelerator_key, Gdk::ModifierType accelerator_mods);
+
+ /** Converts an accelerator keyval and modifier mask into a string
+ * which can be used to represent the accelerator to the user.
+ *
+ * @param accelerator_key Accelerator keyval.
+ * @param accelerator_mods Accelerator modifier mask.
+ * @return A string representing the accelerator.
+ */
+ Glib::ustring get_label(guint accelerator_key, Gdk::ModifierType accelerator_mods);
+
+ /** Gets the modifier mask.
+ *
+ * The modifier mask determines which modifiers are considered significant
+ * for keyboard accelerators. This includes all keyboard modifiers except
+ * for %GDK_LOCK_MASK.
+ *
+ * @return The modifier mask for accelerators
+ */
+ Gdk::ModifierType get_default_mod_mask();
+
+} // namespace Accelerator
+
+} // namespace Gtk
+#endif /* _GTKMM_ACCELERATOR_H */
diff --git a/gtk/gtkmm/accelkey.cc b/gtk/gtkmm/accelkey.cc
index f45c4e36..aaaca525 100644
--- a/gtk/gtkmm/accelkey.cc
+++ b/gtk/gtkmm/accelkey.cc
@@ -1,8 +1,4 @@
-// -*- c++ -*-
-/* $Id$ */
-
/*
- *
* Copyright 1998-2002 The gtkmm Development Team
*
* This library is free software; you can redistribute it and/or
@@ -21,7 +17,7 @@
*/
#include <gtkmm/accelkey.h>
-#include <gtkmm/accelgroup.h>
+#include <gtkmm/accelerator.h>
namespace Gtk
{
@@ -44,7 +40,7 @@ AccelKey::AccelKey(const Glib::ustring& accelerator, const Glib::ustring& accel_
: path_(accel_path)
{
//Get the key and mod by parsing the accelerator string:
- AccelGroup::parse (accelerator, key_, mod_);
+ Accelerator::parse (accelerator, key_, mod_);
}
AccelKey::AccelKey(const AccelKey& src)
@@ -85,9 +81,7 @@ bool AccelKey::is_null() const
Glib::ustring AccelKey::get_abbrev() const
{
- return AccelGroup::name (key_, mod_);
+ return Accelerator::name(key_, mod_);
}
-
-} // namespace
-
+} // namespace Gtk
diff --git a/gtk/gtkmm/filelist.am b/gtk/gtkmm/filelist.am
index 7c0d8185..1e0760e5 100644
--- a/gtk/gtkmm/filelist.am
+++ b/gtk/gtkmm/filelist.am
@@ -4,8 +4,8 @@ gtkmm_files_built_cc = $(gtkmm_files_used_hg:.hg=.cc) wrap_init.cc
gtkmm_files_built_h = $(gtkmm_files_used_hg:.hg=.h)
gtkmm_files_extra_any_cc = \
+ accelerator.cc \
accelkey.cc \
- accelmap.cc \
cellrenderer_generation.cc \
listviewtext.cc \
object.cc \
@@ -16,8 +16,8 @@ gtkmm_files_extra_any_cc = \
gtkmm_files_extra_deprecated_cc =
gtkmm_files_extra_any_h = \
+ accelerator.h \
accelkey.h \
- accelmap.h \
border.h \
cellrenderer_generation.h \
listviewtext.h \
diff --git a/gtk/src/accellabel.ccg b/gtk/src/accellabel.ccg
index e3c43e3b..1a42fd96 100644
--- a/gtk/src/accellabel.ccg
+++ b/gtk/src/accellabel.ccg
@@ -27,10 +27,4 @@ AccelLabel::AccelLabel(const Glib::ustring& label, bool mnemonic)
_CONSTRUCT("label", label.c_str(), "use_underline", gboolean(mnemonic))
{}
-void AccelLabel::unset_accel_widget()
-{
- //Not documented, at the moment, but this is what the source does:
- gtk_accel_label_set_accel_widget(gobj(), nullptr);
-}
-
} // namespace Gtk
diff --git a/gtk/src/accellabel.hg b/gtk/src/accellabel.hg
index e1dab011..8a513605 100644
--- a/gtk/src/accellabel.hg
+++ b/gtk/src/accellabel.hg
@@ -33,7 +33,6 @@ namespace Gtk
class AccelLabel : public Widget
{
_CLASS_GTKOBJECT(AccelLabel, GtkAccelLabel, GTK_ACCEL_LABEL, Gtk::Widget, GtkWidget)
- _IGNORE(gtk_accel_label_set_accel_closure)
public:
//The default ctor doesn't correspond to any _new function, but gtkmenuitem.c does a simple g_object_new()
with no properties.
@@ -47,13 +46,6 @@ public:
*/
explicit AccelLabel(const Glib::ustring& label, bool mnemonic = false);
- _WRAP_METHOD(void set_accel_widget(const Widget& accel_widget), gtk_accel_label_set_accel_widget)
- /// Forget the accel widget previously set by set_accel_widget().
- void unset_accel_widget();
-
- _WRAP_METHOD(Widget* get_accel_widget(), gtk_accel_label_get_accel_widget)
- _WRAP_METHOD(const Widget* get_accel_widget() const, gtk_accel_label_get_accel_widget, constversion)
-
_WRAP_METHOD(guint get_accel_width() const, gtk_accel_label_get_accel_width)
_WRAP_METHOD(bool refetch(), gtk_accel_label_refetch)
@@ -67,9 +59,6 @@ public:
_WRAP_METHOD(void set_use_underline(bool setting = true), gtk_accel_label_set_use_underline)
_WRAP_METHOD(bool get_use_underline() const, gtk_accel_label_get_use_underline)
- //_WRAP_PROPERTY("accel-closure", Glib::Object) //GClosure
- _IGNORE_PROPERTY(accel-closure)
- _WRAP_PROPERTY("accel-widget", Gtk::Widget*)
_WRAP_PROPERTY("label", Glib::ustring)
_WRAP_PROPERTY("use-underline", bool)
};
diff --git a/gtk/src/enums.hg b/gtk/src/enums.hg
index fe33e6f3..2eb47509 100644
--- a/gtk/src/enums.hg
+++ b/gtk/src/enums.hg
@@ -26,7 +26,6 @@ namespace Gtk
_CC_INCLUDE(gtk/gtk.h)
-_WRAP_ENUM(AccelFlags, GtkAccelFlags)
_WRAP_ENUM(Align, GtkAlign)
_WRAP_ENUM(ArrowType, GtkArrowType)
_WRAP_ENUM(DeleteType, GtkDeleteType)
diff --git a/gtk/src/filelist.am b/gtk/src/filelist.am
index e77f4419..142d1a5b 100644
--- a/gtk/src/filelist.am
+++ b/gtk/src/filelist.am
@@ -12,7 +12,6 @@ gtkmm_files_defs = \
gtkmm_files_any_hg = \
aboutdialog.hg \
- accelgroup.hg \
accellabel.hg \
actionable.hg \
actionbar.hg \
diff --git a/gtk/src/iconview.hg b/gtk/src/iconview.hg
index b08ae8cf..e6a0808b 100644
--- a/gtk/src/iconview.hg
+++ b/gtk/src/iconview.hg
@@ -227,7 +227,7 @@ public:
// in input parameters. No one can change it.
_WRAP_METHOD(void enable_model_drag_source(const Glib::RefPtr<const Gdk::ContentFormats>& formats{.},
- Gdk::ModifierType start_button_mask{.} = Gdk::ModifierType::MODIFIER_MASK,
+ Gdk::ModifierType start_button_mask{.} = static_cast<Gdk::ModifierType>(GDK_MODIFIER_MASK),
Gdk::DragAction actions{.} = Gdk::DragAction::COPY | Gdk::DragAction::MOVE),
gtk_icon_view_enable_model_drag_source)
diff --git a/gtk/src/menubutton.hg b/gtk/src/menubutton.hg
index 76e1d885..974ddba5 100644
--- a/gtk/src/menubutton.hg
+++ b/gtk/src/menubutton.hg
@@ -76,6 +76,9 @@ public:
_WRAP_METHOD(void set_label(const Glib::ustring& label), gtk_menu_button_set_label)
_WRAP_METHOD(Glib::ustring get_label() const, gtk_menu_button_get_label)
+ _WRAP_METHOD(void set_use_underline(bool use_underline = true), gtk_menu_button_set_use_underline)
+ _WRAP_METHOD(bool get_use_underline() const, gtk_menu_button_get_use_underline)
+
_WRAP_METHOD(void set_relief(ReliefStyle relief), gtk_menu_button_set_relief)
_WRAP_METHOD(ReliefStyle get_relief() const, gtk_menu_button_get_relief)
@@ -120,6 +123,7 @@ public:
_WRAP_PROPERTY("popover", Popover*)
_WRAP_PROPERTY("icon-name", Glib::ustring)
_WRAP_PROPERTY("label", Glib::ustring)
+ _WRAP_PROPERTY("use-underline", bool)
_WRAP_PROPERTY("relief", ReliefStyle)
};
diff --git a/gtk/src/popover.hg b/gtk/src/popover.hg
index 4575f992..976c2111 100644
--- a/gtk/src/popover.hg
+++ b/gtk/src/popover.hg
@@ -70,6 +70,9 @@ public:
_WRAP_METHOD(void set_has_arrow(bool has_arrow = true), gtk_popover_set_has_arrow)
_WRAP_METHOD(bool get_has_arrow() const, gtk_popover_get_has_arrow)
+ _WRAP_METHOD(void set_mnemonics_visible(bool mnemonics_visible = true), gtk_popover_set_mnemonics_visible)
+ _WRAP_METHOD(bool get_mnemonics_visible() const, gtk_popover_get_mnemonics_visible)
+
_WRAP_METHOD(void set_default_widget(Widget& widget), gtk_popover_set_default_widget)
_WRAP_METHOD(void popup(), gtk_popover_popup)
@@ -80,6 +83,7 @@ public:
_WRAP_PROPERTY("autohide", bool)
_WRAP_PROPERTY("has-arrow", bool)
_WRAP_PROPERTY("default-widget", Widget*)
+ _WRAP_PROPERTY("mnemonics-visible", bool)
_WRAP_SIGNAL(void closed(), "closed")
_IGNORE_SIGNAL("activate-default")dnl// action signal
diff --git a/gtk/src/root.hg b/gtk/src/root.hg
index 884182a5..ef5318b8 100644
--- a/gtk/src/root.hg
+++ b/gtk/src/root.hg
@@ -73,8 +73,6 @@ public:
_WRAP_METHOD(Widget* get_focus(), gtk_root_get_focus)
_WRAP_METHOD(const Widget* get_focus() const, gtk_root_get_focus, constversion)
-
- _WRAP_PROPERTY("focus-widget", Widget*)
};
} // namespace Gtk
diff --git a/gtk/src/scalebutton.hg b/gtk/src/scalebutton.hg
index 960bbe60..8bf86ada 100644
--- a/gtk/src/scalebutton.hg
+++ b/gtk/src/scalebutton.hg
@@ -25,7 +25,7 @@ _CONFIGINCLUDE(gtkmmconfig.h)
#include <gtkmm/orientable.h>
#include <gtkmm/enums.h>
_DEFS(gtkmm,gtk)
-_PINCLUDE(gtkmm/private/button_p.h)
+_PINCLUDE(gtkmm/private/widget_p.h)
namespace Gtk
{
@@ -40,10 +40,10 @@ namespace Gtk
* @newin{2,12}
*/
class ScaleButton
- : public Button,
+ : public Widget,
public Orientable
{
- _CLASS_GTKOBJECT(ScaleButton, GtkScaleButton, GTK_SCALE_BUTTON, Gtk::Button, GtkButton)
+ _CLASS_GTKOBJECT(ScaleButton, GtkScaleButton, GTK_SCALE_BUTTON, Gtk::Widget, GtkWidget)
_IMPLEMENTS_INTERFACE(Orientable)
public:
diff --git a/gtk/src/settings.hg b/gtk/src/settings.hg
index b2ef9557..60aeea68 100644
--- a/gtk/src/settings.hg
+++ b/gtk/src/settings.hg
@@ -47,6 +47,7 @@ public:
_WRAP_PROPERTY("gtk-cursor-blink-time", int)
_WRAP_PROPERTY("gtk-cursor-blink-timeout", int) //since 3.4
_WRAP_PROPERTY("gtk-split-cursor", bool)
+ _WRAP_PROPERTY("gtk-cursor-aspect-ratio", float)
_WRAP_PROPERTY("gtk-theme-name", Glib::ustring)
_WRAP_PROPERTY("gtk-dnd-drag-threshold", int)
_WRAP_PROPERTY("gtk-font-name", Glib::ustring)
diff --git a/gtk/src/stylecontext.hg b/gtk/src/stylecontext.hg
index d9003996..8f4d1338 100644
--- a/gtk/src/stylecontext.hg
+++ b/gtk/src/stylecontext.hg
@@ -144,8 +144,6 @@ public:
Border get_margin() const;
_IGNORE(gtk_style_context_get_margin)
- //TODO: _WRAP_METHOD(void reset_widgets(const Glib::RefPtr<Gdk::Display>& display),
gtk_style_context_reset_widgets)
-
_WRAP_METHOD(void render_check(const Cairo::RefPtr<Cairo::Context>& cr, double x, double y, double width,
double height), gtk_render_check)
_WRAP_METHOD(void render_option(const Cairo::RefPtr<Cairo::Context>& cr, double x, double y, double width,
double height), gtk_render_option)
_WRAP_METHOD(void render_arrow(const Cairo::RefPtr<Cairo::Context>& cr, double angle, double x, double y,
double size), gtk_render_arrow)
diff --git a/gtk/src/texttag.hg b/gtk/src/texttag.hg
index c27532af..05758434 100644
--- a/gtk/src/texttag.hg
+++ b/gtk/src/texttag.hg
@@ -94,6 +94,9 @@ public:
_WRAP_PROPERTY("right-margin", int)
_WRAP_PROPERTY("underline", Pango::Underline)
_WRAP_PROPERTY("underline-rgba", Gdk::RGBA, newin "3,20")
+ //TODO: PangoOverline is not wrapped in pangomm.
+ //_WRAP_PROPERTY("overline", Pango::Overline)
+ //_WRAP_PROPERTY("overline-rgba", Gdk::RGBA)
_WRAP_PROPERTY("rise", int)
_WRAP_PROPERTY("background-full-height", bool)
_WRAP_PROPERTY("language", Glib::ustring)
@@ -102,6 +105,10 @@ public:
_WRAP_PROPERTY("paragraph-background", Glib::ustring)
_WRAP_PROPERTY("paragraph-background-rgba", Gdk::RGBA)
_WRAP_PROPERTY("font-features", Glib::ustring, newin "3,20")
+ _WRAP_PROPERTY("allow-breaks", bool)
+ //TODO: PangoShowFlags is not wrapped in pangomm.
+ //_WRAP_PROPERTY("show-spaces", Pango::ShowFlags)
+ _WRAP_PROPERTY("insert-hyphens", bool)
_WRAP_PROPERTY("accumulative-margin", bool)
_WRAP_PROPERTY("background-set", bool)
_WRAP_PROPERTY("foreground-set", bool)
@@ -125,6 +132,9 @@ public:
_WRAP_PROPERTY("right-margin-set", bool)
_WRAP_PROPERTY("underline-set", bool)
_WRAP_PROPERTY("underline-rgba-set", bool, newin "3,20")
+ //TODO: PangoOverline is not wrapped in pangomm.
+ //_WRAP_PROPERTY("overline-set", bool)
+ //_WRAP_PROPERTY("overline-rgba-set", bool)
_WRAP_PROPERTY("rise-set", bool)
_WRAP_PROPERTY("background-full-height-set", bool)
_WRAP_PROPERTY("language-set", bool)
@@ -136,6 +146,11 @@ public:
_WRAP_PROPERTY("letter-spacing", int)
_WRAP_PROPERTY("letter-spacing-set", bool)
_WRAP_PROPERTY("font-features-set", bool, newin "3,20")
+ _WRAP_PROPERTY("allow-breaks-set", bool)
+ //TODO: PangoShowFlags is not wrapped in pangomm.
+ //_WRAP_PROPERTY("show-spaces-set", bool)
+ _WRAP_PROPERTY("insert-hyphens-set", bool)
+
};
} //namespace Gtk
diff --git a/gtk/src/treeview.hg b/gtk/src/treeview.hg
index d5f15177..12813511 100644
--- a/gtk/src/treeview.hg
+++ b/gtk/src/treeview.hg
@@ -573,18 +573,17 @@ public:
// in input parameters. No one can change it.
_WRAP_METHOD(void enable_model_drag_source(const Glib::RefPtr<const Gdk::ContentFormats>& formats{.},
- Gdk::ModifierType start_button_mask{.} = Gdk::ModifierType::MODIFIER_MASK,
+ Gdk::ModifierType start_button_mask{.} = static_cast<Gdk::ModifierType>(GDK_MODIFIER_MASK),
Gdk::DragAction actions{.} = Gdk::DragAction::COPY | Gdk::DragAction::MOVE),
gtk_tree_view_enable_model_drag_source)
-
/** Turns the TreeView into a drag source for automatic DND.
* Uses the default "GTK_TREE_MODEL_ROW" target, which the TreeView can handle automatically.
*
* @param start_button_mask Mask of allowed buttons to start drag.
* @param actions The bitmask of possible actions for a drag from this widget.
*/
- void enable_model_drag_source(Gdk::ModifierType start_button_mask = Gdk::ModifierType::MODIFIER_MASK,
+ void enable_model_drag_source(Gdk::ModifierType start_button_mask =
static_cast<Gdk::ModifierType>(GDK_MODIFIER_MASK),
Gdk::DragAction actions = Gdk::DragAction::COPY | Gdk::DragAction::MOVE);
_WRAP_METHOD(void enable_model_drag_dest(const Glib::RefPtr<const Gdk::ContentFormats>& formats,
diff --git a/gtk/src/volumebutton.hg b/gtk/src/volumebutton.hg
index 6b45543b..a30d11e2 100644
--- a/gtk/src/volumebutton.hg
+++ b/gtk/src/volumebutton.hg
@@ -17,16 +17,16 @@
*/
#include <gtkmm/scalebutton.h>
+
_DEFS(gtkmm,gtk)
_PINCLUDE(gtkmm/private/scalebutton_p.h)
-
namespace Gtk
{
/** A button which pops up a volume control.
*
- * Gtk::VolumeButton is a subclass of Gtk::ScaleButton that has been tailored
+ * %Gtk::VolumeButton is a subclass of Gtk::ScaleButton that has been tailored
* for use as a volume control widget with suitable icons, tooltips and
* accessible labels.
*
@@ -44,8 +44,8 @@ public:
*/
_CTOR_DEFAULT()
_IGNORE(gtk_volume_button_new)
-};
+ _WRAP_PROPERTY("use-symbolic", bool)
+};
} // namespace Gtk
-
diff --git a/gtk/src/widget.ccg b/gtk/src/widget.ccg
index 94393cf7..1bac06ca 100644
--- a/gtk/src/widget.ccg
+++ b/gtk/src/widget.ccg
@@ -24,7 +24,6 @@
#include <gtkmm/window.h>
#include <gtkmm/root.h>
#include <gtkmm/native.h>
-#include <gtkmm/accelgroup.h>
#include <gtkmm/settings.h>
#include <gtkmm/container.h>
#include <gtkmm/eventcontroller.h>
@@ -33,7 +32,6 @@
#include <gtkmm/layoutmanager.h>
#include <gtk/gtk.h>
-
namespace //anonymous
{
diff --git a/gtk/src/widget.hg b/gtk/src/widget.hg
index 5f47790c..15a20a26 100644
--- a/gtk/src/widget.hg
+++ b/gtk/src/widget.hg
@@ -60,7 +60,6 @@ namespace Gtk
_CC_INCLUDE(gtk/gtk.h)
-class AccelGroup;
class Adjustment;
class Window;
class Root;
@@ -109,7 +108,7 @@ class Widget
_IMPLEMENTS_INTERFACE(ConstraintTarget)
_IMPLEMENTS_INTERFACE(Atk::Implementor, ifdef GTKMM_ATKMM_ENABLED)
- _IGNORE(gtk_widget_destroy, gtk_widget_destroyed, gtk_widget_list_accel_closures)
+ _IGNORE(gtk_widget_destroy, gtk_widget_destroyed)
_IGNORE(gtk_widget_paintable_new)
public:
@@ -152,17 +151,6 @@ public:
_WRAP_METHOD(Glib::RefPtr<const LayoutManager> get_layout_manager() const,
gtk_widget_get_layout_manager, refreturn, constversion)
- _WRAP_METHOD(void add_accelerator(const Glib::ustring& accel_signal, const Glib::RefPtr<AccelGroup>&
accel_group,
- guint accel_key, Gdk::ModifierType accel_mods, AccelFlags accel_flags),
gtk_widget_add_accelerator)
-
- _WRAP_METHOD(bool remove_accelerator(const Glib::RefPtr<AccelGroup>& accel_group,
- guint accel_key, Gdk::ModifierType accel_mods), gtk_widget_remove_accelerator)
- _WRAP_METHOD(void set_accel_path(const Glib::ustring& accel_path,
- const Glib::RefPtr<AccelGroup>& accel_group),
- gtk_widget_set_accel_path)
-
- //GList* gtk_widget_list_accel_closures();
-
_WRAP_METHOD(bool mnemonic_activate(bool group_cycling), gtk_widget_mnemonic_activate)
_IGNORE(gtk_widget_can_activate_accel)
@@ -411,8 +399,6 @@ public:
_WRAP_METHOD(Glib::RefPtr<StyleContext> get_style_context(), gtk_widget_get_style_context, refreturn)
_WRAP_METHOD(Glib::RefPtr<const StyleContext> get_style_context() const, gtk_widget_get_style_context,
refreturn, constversion)
- _WRAP_METHOD(Gdk::ModifierType get_modifier_mask(Gdk::ModifierIntent intent), gtk_widget_get_modifier_mask)
-
/** Callback type for adding a function to update animations. See add_tick_callback().
*
* For instance:
@@ -616,14 +602,6 @@ dnl
_POP()
#m4end
- // The accel_closures_changed signal can't have a default handler because the wrapped C signal has no
default handler.
- _WRAP_SIGNAL(void accel_closures_changed(), "accel_closures_changed", no_default_handler)
-
-//TODO: The signal_id is very C-like here:
- //_WRAP_SIGNAL(bool can_activate_accel(guint signal_id), "can_activate_accel")
-
- _WRAP_SIGNAL(bool popup_menu(), "popup_menu") //Note that popup-menu is a keybinding signal, but is really
meant to be wrapped.
-
_IGNORE_SIGNAL("move-focus")dnl // Action signal
//Keybinding signals:
@@ -641,7 +619,6 @@ dnl
_WRAP_PROPERTY("sensitive", bool)
_WRAP_PROPERTY("can_focus", bool)
_WRAP_PROPERTY("has_focus", bool)
- _WRAP_PROPERTY("is_focus", bool)
_WRAP_PROPERTY("can_target", bool)
_WRAP_PROPERTY("focus_on_click", bool)
_WRAP_PROPERTY("has_default", bool)
diff --git a/gtk/src/window.ccg b/gtk/src/window.ccg
index acc559c1..bf30075f 100644
--- a/gtk/src/window.ccg
+++ b/gtk/src/window.ccg
@@ -18,12 +18,9 @@
#include <glibmm/vectorutils.h>
#include <giomm/listmodel.h>
-
-#include <gtkmm/accelgroup.h>
#include <gdkmm/monitor.h>
#include <gtk/gtk.h>
-
namespace Gtk
{
@@ -90,12 +87,6 @@ void Window::on_window_hide()
}
}
-std::vector< Glib::RefPtr<AccelGroup> > Window::get_accel_groups()
-{
- return Glib::SListHandler< Glib::RefPtr<AccelGroup> >::slist_to_vector(
- gtk_accel_groups_from_object(G_OBJECT(gobj())), Glib::OWNERSHIP_NONE);
-}
-
void Window::set_manage()
{
g_warning("gtkmm: Attempt to call Gtk::manage() on a Gtk::Window, but a Gtk::Window has no parent
container to manage its lifetime.\n");
diff --git a/gtk/src/window.hg b/gtk/src/window.hg
index 030c6e10..12f69ebb 100644
--- a/gtk/src/window.hg
+++ b/gtk/src/window.hg
@@ -38,7 +38,6 @@ class ListModel;
namespace Gtk
{
-class AccelGroup;
class WindowGroup;
/** Toplevel %Window.
@@ -100,6 +99,7 @@ public:
_WRAP_PROPERTY("focus-visible", bool)
_WRAP_PROPERTY("is-maximized", bool)
_WRAP_PROPERTY("default-widget", Widget*)
+ _WRAP_PROPERTY("focus-widget", Widget*)
_WRAP_SIGNAL(void keys_changed(), "keys_changed")
_WRAP_SIGNAL(bool close_request(), "close-request")
@@ -129,13 +129,6 @@ dnl
_WRAP_METHOD(void set_startup_id(const Glib::ustring& startup_id), gtk_window_set_startup_id)
-
- _WRAP_METHOD(void add_accel_group(const Glib::RefPtr<AccelGroup>& accel_group),
- gtk_window_add_accel_group)
-
- _WRAP_METHOD(void remove_accel_group(const Glib::RefPtr<AccelGroup>& accel_group),
- gtk_window_remove_accel_group)
-
_WRAP_METHOD(void set_focus(Gtk::Widget& focus), gtk_window_set_focus)
void unset_focus();
@@ -203,22 +196,6 @@ dnl
#m4 _CONVERSION(`GList*',`std::vector<Window*>',`Glib::ListHandler<Window*>::list_to_vector($3,
Glib::OWNERSHIP_SHALLOW)')
_WRAP_METHOD(static std::vector<Window*> list_toplevels(), gtk_window_list_toplevels)
- _WRAP_METHOD(void add_mnemonic(guint keyval, Widget& target),
- gtk_window_add_mnemonic)
-
- _WRAP_METHOD(void remove_mnemonic(guint keyval, Widget& target),
- gtk_window_remove_mnemonic)
-
- _WRAP_METHOD(bool mnemonic_activate(guint keyval, Gdk::ModifierType modifier),
- gtk_window_mnemonic_activate)
-
- _WRAP_METHOD(void set_mnemonic_modifier(Gdk::ModifierType modifier),
- gtk_window_set_mnemonic_modifier)
-
- _WRAP_METHOD(Gdk::ModifierType get_mnemonic_modifier(),
- gtk_window_get_mnemonic_modifier)
-
-
_WRAP_METHOD(void present(), gtk_window_present)
_WRAP_METHOD(void present(guint32 timestamp), gtk_window_present_with_time)
@@ -291,12 +268,6 @@ dnl
// from gtk/gtkshow.h:
_WRAP_METHOD(void show_uri(const Glib::ustring& uri, guint32 timestamp), gtk_show_uri_on_window, errthrow,
newin "3,24")
- /** Gets a vector containing each Gtk::AccelGroup associated with the window.
- * @newin{3,24}
- * @return A vector of Gtk::AccelGroup.
- */
- std::vector< Glib::RefPtr<AccelGroup> > get_accel_groups();
-
///Overriden to warn that it doesn't make sense to use Gtk::manage() on this class because it has no
parent container.
void set_manage() override;
diff --git a/tools/m4/convert_gdk.m4 b/tools/m4/convert_gdk.m4
index d79be965..f4c6fb36 100644
--- a/tools/m4/convert_gdk.m4
+++ b/tools/m4/convert_gdk.m4
@@ -50,9 +50,9 @@ _CONV_ENUM(Gdk,InputCondition)
_CONV_ENUM(Gdk,InputSource)
_CONV_ENUM(Gdk,InterpType)
_CONV_ENUM(Gdk,JoinStyle)
+_CONV_ENUM(Gdk,KeyMatch)
_CONV_ENUM(Gdk,LineStyle)
_CONV_ENUM(Gdk,ModifierType)
-_CONV_ENUM(Gdk,ModifierIntent)
_CONV_ENUM(Gdk,NotifyType)
_CONV_ENUM(Gdk,OverlapType)
_CONV_ENUM(Gdk,OwnerChange)
@@ -68,7 +68,6 @@ _CONV_INCLASS_ENUM(Gdk,Surface,Hints)
_CONV_INCLASS_ENUM(Gdk,Surface,State)
_CONV_INCLASS_ENUM(Gdk,Surface,TypeHint)
_CONV_ENUM(Gdk,TouchpadGesturePhase)
-_CONV_ENUM(Gdk,GrabStatus)
_CONV_INCLASS_ENUM(Gdk,Pixbuf,AlphaMode)
_CONV_INCLASS_ENUM(Gdk,Pixbuf,Rotation)
_CONV_ENUM(Gdk,GLError)
diff --git a/tools/m4/convert_gtk.m4 b/tools/m4/convert_gtk.m4
index e58c199a..2196032d 100644
--- a/tools/m4/convert_gtk.m4
+++ b/tools/m4/convert_gtk.m4
@@ -29,7 +29,6 @@ _CONVERSION(`ui_merge_id',`guint',`$3')
_CONVERSION(`guint',`ui_merge_id',`$3')
# Enums: TODO: It would be nice if gmmproc knew about these automatically.
-_CONV_ENUM(Gtk,AccelFlags)
_CONV_ENUM(Gtk,Align)
_CONV_ENUM(Gtk,ArrowType)
_CONV_INCLASS_ENUM(Gtk,AssistantPage,Type)
@@ -174,12 +173,6 @@ _CONVERSION(`GtkCssSection*',`Glib::RefPtr<CssSection>',`Glib::wrap($3)')
_CONVERSION(`const CssLocation&',`const GtkCssLocation*',__FR2P)
_CONVERSION(`const GtkCssLocation*',`CssLocation',`Glib::wrap($3)')
-# AccelGroup:
-_CONVERSION(`GtkAccelGroup*',`Glib::RefPtr<AccelGroup>',`Glib::wrap($3)')
-_CONVERSION(`GtkAccelGroup*',`Glib::RefPtr<const AccelGroup>',`Glib::wrap($3)')
-_CONVERSION(`const Glib::RefPtr<AccelGroup>&',`GtkAccelGroup*',__CONVERT_REFPTR_TO_P)
-_CONVERSION(`Gtk::Object&',`GObject*', `($3).Glib::Object::gobj()')
-
_CONVERSION(`GtkAssistantPage*',`Glib::RefPtr<AssistantPage>',`Glib::wrap($3)')
_CONVERSION(`GtkNotebookPage*',`Glib::RefPtr<NotebookPage>',`Glib::wrap($3)')
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]