[gtkmm] Add some methods, require pangomm >= 2.43.3
- From: Kjell Ahlstedt <kjellahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtkmm] Add some methods, require pangomm >= 2.43.3
- Date: Wed, 7 Oct 2020 15:21:58 +0000 (UTC)
commit 3465d8d50f974ed4c7315a42b84041489278754d
Author: Kjell Ahlstedt <kjellahlstedt gmail com>
Date: Wed Oct 7 17:20:07 2020 +0200
Add some methods, require pangomm >= 2.43.3
* configure.ac:
* meson.build: Require pangomm >= 2.43.3, which includes Pango::Overline
and Pango::ShowFlags.
* gtk/src/buildable.hg: Remove set_buildable_id().
* gtk/src/colorbutton.hg: Remove property_use_alpha() and property_rgba().
They are inherited from base class ColorChooser.
* gtk/src/gtk_docs_override.xml: Add some enum name substitutions.
* gtk/src/listbox.[ccg|hg]: Replace the hand-coded append() with
a gtk_list_box_append() wrapper.
* gtk/src/passwordentry.hg: Ignore the 'activate' signal.
* gtk/src/printer.hg: Ignore the 'backend' property.
* gtk/src/stack.hg: Add an add() without a 'name' parameter.
Remove the const add() methods. Nothing shall be added to a const Stack.
New methods and properties have been added to several classes.
configure.ac | 2 +-
gdk/src/devicetool.hg | 1 +
gdk/src/frameclock.hg | 1 +
gdk/src/seat.hg | 7 +++++++
gtk/src/buildable.hg | 1 -
gtk/src/colorbutton.hg | 2 --
gtk/src/gtk_docs_override.xml | 2 ++
gtk/src/icontheme.hg | 3 +++
gtk/src/listbox.ccg | 5 -----
gtk/src/listbox.hg | 22 ++++++----------------
gtk/src/mediastream.hg | 4 +---
gtk/src/passwordentry.hg | 2 ++
gtk/src/printer.hg | 5 +----
gtk/src/searchbar.hg | 1 +
gtk/src/spinbutton.hg | 3 +++
gtk/src/stack.hg | 6 +-----
gtk/src/text.hg | 7 +++++++
gtk/src/texttag.hg | 18 ++++++------------
meson.build | 2 +-
19 files changed, 44 insertions(+), 50 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 2b8ee6bc..ab1a10ce 100644
--- a/configure.ac
+++ b/configure.ac
@@ -95,7 +95,7 @@ AS_IF([test "x$enable_static" = xyes],
# gdkmm really does need GTK, because part of Gdk::DragContext is in GTK.
# The extra gdk-pixbuf-2.0 check is because gdkmm requires a newer gdk-pixbuf than gtk4 requires.
# TODO: Remove the mention of cairomm once pangomm needs to depend on such a new version.
-AC_SUBST([GDKMM_MODULES], ['giomm-2.66 >= 2.65.1 pangomm-2.44 >= 2.43.1 cairomm-1.16 >= 1.15.4 gtk4 >=
3.99.0 gdk-pixbuf-2.0 >= 2.35.5'])
+AC_SUBST([GDKMM_MODULES], ['giomm-2.66 >= 2.65.1 pangomm-2.44 >= 2.43.3 cairomm-1.16 >= 1.15.4 gtk4 >=
3.99.0 gdk-pixbuf-2.0 >= 2.35.5'])
AS_IF([test "x$gtkmm_host_windows" = xyes],
[GTKMM_MODULES=$GDKMM_MODULES],
diff --git a/gdk/src/devicetool.hg b/gdk/src/devicetool.hg
index 8cdb75b8..282a979a 100644
--- a/gdk/src/devicetool.hg
+++ b/gdk/src/devicetool.hg
@@ -38,6 +38,7 @@ public:
_WRAP_METHOD(guint64 get_serial() const, gdk_device_tool_get_serial)
_WRAP_METHOD(guint64 get_hardware_id() const, gdk_device_tool_get_hardware_id)
_WRAP_METHOD(Type get_tool_type() const, gdk_device_tool_get_tool_type)
+ _WRAP_METHOD(AxisFlags get_axes() const, gdk_device_tool_get_axes)
_WRAP_PROPERTY("serial", guint64)
_WRAP_PROPERTY("tool-type", Type)
diff --git a/gdk/src/frameclock.hg b/gdk/src/frameclock.hg
index 747ffc7e..9c147d5c 100644
--- a/gdk/src/frameclock.hg
+++ b/gdk/src/frameclock.hg
@@ -83,6 +83,7 @@ public:
_WRAP_METHOD(Glib::RefPtr<const FrameTimings> get_current_timings() const,
gdk_frame_clock_get_current_timings, refreturn, constversion)
_WRAP_METHOD(void get_refresh_info(gint64 base_time, gint64& refresh_interval_return,
gint64& presentation_time_return) const, gdk_frame_clock_get_refresh_info)
+ _WRAP_METHOD(double get_fps() const, gdk_frame_clock_get_fps)
_IGNORE_SIGNAL("flush-events")dnl// Applications should not handle this signal.
_IGNORE_SIGNAL("before-paint")dnl// Applications should generally not handle this signal.
diff --git a/gdk/src/seat.hg b/gdk/src/seat.hg
index c79a0e7a..8bba4697 100644
--- a/gdk/src/seat.hg
+++ b/gdk/src/seat.hg
@@ -53,6 +53,13 @@ public:
#m4 _CONVERSION(`GList*',`std::vector<Glib::RefPtr<const Device>>',`Glib::ListHandler<Glib::RefPtr<const
Device>>::list_to_vector($3, Glib::OWNERSHIP_SHALLOW)')
_WRAP_METHOD(std::vector<Glib::RefPtr<const Device>> get_devices(Capabilities capabilities) const,
gdk_seat_get_devices)
+//TODO: gdk_seat_get_tools() is an internal GTK functions, because it's not declared GDK_AVAILABLE_IN_ALL.
+// That's probably a mistake. Wrap it when the mistake has been fixed.
+//#m4
_CONVERSION(`GList*',`std::vector<Glib::RefPtr<DeviceTool>>',`Glib::ListHandler<Glib::RefPtr<DeviceTool>>::list_to_vector($3,
Glib::OWNERSHIP_SHALLOW)')
+// _WRAP_METHOD(std::vector<Glib::RefPtr<DeviceTool>> get_tools(), gdk_seat_get_tools)
+//#m4 _CONVERSION(`GList*',`std::vector<Glib::RefPtr<const
DeviceTool>>',`Glib::ListHandler<Glib::RefPtr<const DeviceTool>>::list_to_vector($3,
Glib::OWNERSHIP_SHALLOW)')
+// _WRAP_METHOD(std::vector<Glib::RefPtr<const DeviceTool>> get_tools() const, gdk_seat_get_tools)
+
_WRAP_METHOD(Glib::RefPtr<Device> get_pointer(), gdk_seat_get_pointer, refreturn)
_WRAP_METHOD(Glib::RefPtr<const Device> get_pointer() const, gdk_seat_get_pointer, refreturn, constversion)
_WRAP_METHOD(Glib::RefPtr<Device> get_keyboard(), gdk_seat_get_keyboard, refreturn)
diff --git a/gtk/src/buildable.hg b/gtk/src/buildable.hg
index 7961ceb7..f2c3be4d 100644
--- a/gtk/src/buildable.hg
+++ b/gtk/src/buildable.hg
@@ -47,7 +47,6 @@ class GTKMM_API Buildable : public Glib::Interface
_CLASS_INTERFACE(Buildable, GtkBuildable, GTK_BUILDABLE, GtkBuildableIface, , , GTKMM_API)
public:
- _WRAP_METHOD(void set_buildable_id(const Glib::ustring& id), gtk_buildable_set_buildable_id)
_WRAP_METHOD(Glib::ustring get_buildable_id() const, gtk_buildable_get_buildable_id)
//TODO: Properties, signals, vfuncs.
diff --git a/gtk/src/colorbutton.hg b/gtk/src/colorbutton.hg
index ef660bb5..2b8e80e4 100644
--- a/gtk/src/colorbutton.hg
+++ b/gtk/src/colorbutton.hg
@@ -74,9 +74,7 @@ public:
_WRAP_METHOD(void set_modal(bool modal = true), gtk_color_button_set_modal)
_WRAP_METHOD(bool get_modal() const, gtk_color_button_get_modal)
- _WRAP_PROPERTY("use-alpha", bool)
_WRAP_PROPERTY("title", Glib::ustring)
- _WRAP_PROPERTY("rgba", Gdk::RGBA)
_WRAP_PROPERTY("show-editor", bool)
_WRAP_PROPERTY("modal", bool)
diff --git a/gtk/src/gtk_docs_override.xml b/gtk/src/gtk_docs_override.xml
index 5ec6b3f0..2ab20a2a 100644
--- a/gtk/src/gtk_docs_override.xml
+++ b/gtk/src/gtk_docs_override.xml
@@ -96,6 +96,8 @@
<substitute_enumerator_name from_prefix="GTK_SIZE_GROUP_" to_prefix="Gtk::SizeGroup::Mode::" />
<substitute_enumerator_name from_prefix="GTK_TEXT_SEARCH_" to_prefix="Gtk::TextSearchFlags::" />
<substitute_enumerator_name from_prefix="PANGO_UNDERLINE_" to_prefix="Pango::Underline::" />
+<substitute_enumerator_name from_prefix="PANGO_OVERLINE_" to_prefix="Pango::Overline::" />
+<substitute_enumerator_name from_prefix="PANGO_SHOW_" to_prefix="Pango::ShowFlags::" />
<substitute_enumerator_name from_prefix="GTK_TEXT_WINDOW_" to_prefix="Gtk::TextWindowType::" />
<substitute_enumerator_name from_prefix="GTK_TREE_MODEL_" to_prefix="Gtk::TreeModel::Flags::" />
<substitute_enumerator_name from_prefix="GTK_TREE_VIEW_COLUMN_" to_prefix="Gtk::TreeViewColumn::Sizing::" />
diff --git a/gtk/src/icontheme.hg b/gtk/src/icontheme.hg
index 49aed785..04f5f9dc 100644
--- a/gtk/src/icontheme.hg
+++ b/gtk/src/icontheme.hg
@@ -68,6 +68,9 @@ public:
_WRAP_METHOD(static Glib::RefPtr<IconTheme> get_for_display(const Glib::RefPtr<Gdk::Display>& display),
gtk_icon_theme_get_for_display, refreturn)
+ _WRAP_METHOD(Glib::RefPtr<Gdk::Display> get_display(), gtk_icon_theme_get_display, refreturn)
+ _WRAP_METHOD(Glib::RefPtr<const Gdk::Display> get_display() const, gtk_icon_theme_get_display, refreturn,
constversion)
+
#m4 _CONVERSION(`const std::vector<std::string>&',`const
char*-const*',`Glib::ArrayHandler<std::string>::vector_to_array($3).data()')
_WRAP_METHOD(void set_search_path(const std::vector<std::string>& path), gtk_icon_theme_set_search_path)
#m4 _CONVERSION(`char**',`std::vector<std::string>',`Glib::ArrayHandler<std::string>::array_to_vector($3,
Glib::OWNERSHIP_DEEP)')
diff --git a/gtk/src/listbox.ccg b/gtk/src/listbox.ccg
index cf6e141d..36c47376 100644
--- a/gtk/src/listbox.ccg
+++ b/gtk/src/listbox.ccg
@@ -181,11 +181,6 @@ void ListBox::unset_header_func()
gtk_list_box_set_header_func(gobj(), nullptr, nullptr, nullptr);
}
-void ListBox::append(Widget& child)
-{
- insert(child, -1);
-}
-
void ListBox::selected_foreach(const SlotForeach& slot)
{
SlotForeach slot_copy(slot); //TODO: Is this necessary?
diff --git a/gtk/src/listbox.hg b/gtk/src/listbox.hg
index 20a86505..1082a2fa 100644
--- a/gtk/src/listbox.hg
+++ b/gtk/src/listbox.hg
@@ -29,24 +29,24 @@ namespace Gtk
{
class Adjustment;
-/** A ListBox is a vertical container that contains ListBoxRow
+/** A %ListBox is a vertical container that contains ListBoxRow
* children. These rows can by dynamically sorted and filtered, and
* headers can be added dynamically depending on the row content.
* It also allows keyboard and mouse navigation and selection like
* a typical list.
*
- * Using ListBox is often an alternative to TreeView, especially
+ * Using %ListBox is often an alternative to TreeView, especially
* when the list contents have a more complicated layout than what is allowed
* by a CellRenderer, or when the contents are interactive (e.g. contain a
* button).
*
- * Although a ListBox must have only ListBoxRow children you can
- * add any kind of widget to it via prepend() or insert(), and a ListBoxRow
+ * Although a %ListBox must have only ListBoxRow children you can
+ * add any kind of widget to it via prepend(), append() and insert(), and a ListBoxRow
* widget will automatically be inserted between the list and the widget.
*
* Also see FlowBox.
*
- * A ListBox looks like this:
+ * A %ListBox looks like this:
* @image html listbox1.png
*
* @ingroup Widgets
@@ -100,20 +100,10 @@ public:
typedef sigc::slot<void(ListBoxRow*, ListBoxRow*)> SlotUpdateHeader;
_WRAP_METHOD(void prepend(Widget& child), gtk_list_box_prepend)
+ _WRAP_METHOD(void append(Widget& child), gtk_list_box_append)
_WRAP_METHOD(void insert(Widget& child, int position), gtk_list_box_insert)
_WRAP_METHOD(void remove(Widget& child), gtk_list_box_remove)
- //We added this in the gtkmm API, because this is clearer than the magic -1 value for position with
insert().
- //The C API developers disagree: https://bugzilla.gnome.org/show_bug.cgi?id=705558#c12
- /** Append a widget to the list. If a sort function is set, the widget will
- * actually be inserted at the calculated position.
- *
- * @newin{3,10}
- *
- * @param child The Gtk::Widget to add.
- */
- void append(Widget& child);
-
_WRAP_METHOD(ListBoxRow* get_selected_row(), gtk_list_box_get_selected_row)
_WRAP_METHOD(const ListBoxRow* get_selected_row() const, gtk_list_box_get_selected_row, constversion)
_WRAP_METHOD(ListBoxRow* get_row_at_index(int index), gtk_list_box_get_row_at_index)
diff --git a/gtk/src/mediastream.hg b/gtk/src/mediastream.hg
index 3c88a177..30d969ec 100644
--- a/gtk/src/mediastream.hg
+++ b/gtk/src/mediastream.hg
@@ -103,9 +103,7 @@ public:
_WRAP_PROPERTY("seeking", bool)
_WRAP_PROPERTY("loop", bool)
_WRAP_PROPERTY("muted", bool)
- //TODO: Wrap property_volume() when gtkmediastream.c has been corrected.
- // g_param_spec_boolean() is used for PROP_VOLUME there.
- //_WRAP_PROPERTY("volume", double)
+ _WRAP_PROPERTY("volume", double)
protected:
_WRAP_VFUNC(bool play(), play)
diff --git a/gtk/src/passwordentry.hg b/gtk/src/passwordentry.hg
index ee2a3cef..ecec418d 100644
--- a/gtk/src/passwordentry.hg
+++ b/gtk/src/passwordentry.hg
@@ -53,6 +53,8 @@ public:
_WRAP_METHOD(Glib::RefPtr<Gio::MenuModel> get_extra_menu(), gtk_password_entry_get_extra_menu, refreturn)
_WRAP_METHOD(Glib::RefPtr<const Gio::MenuModel> get_extra_menu() const, gtk_password_entry_get_extra_menu,
refreturn, constversion)
+ _IGNORE_SIGNAL(activate)dnl// Action signal
+
_WRAP_PROPERTY("placeholder-text", Glib::ustring)
_WRAP_PROPERTY("activates-default", bool)
_WRAP_PROPERTY("show-peek-icon", bool)
diff --git a/gtk/src/printer.hg b/gtk/src/printer.hg
index 14abbe75..f5cefdd2 100644
--- a/gtk/src/printer.hg
+++ b/gtk/src/printer.hg
@@ -88,10 +88,6 @@ public:
_WRAP_SIGNAL(void details_acquired(bool success), "details_acquired", no_default_handler)
_WRAP_PROPERTY("name", Glib::ustring)
-
- //GtkPrintBackend is in a "semi-private" header:
- //_WRAP_PROPERTY("backend", Glib::RefPtr<PrintBackend>)
-
_WRAP_PROPERTY("is_virtual", bool)
_WRAP_PROPERTY("state_message", Glib::ustring)
_WRAP_PROPERTY("location", Glib::ustring)
@@ -101,6 +97,7 @@ public:
_WRAP_PROPERTY("accepts-ps", bool)
_WRAP_PROPERTY("paused", bool)
_WRAP_PROPERTY("accepting-jobs", bool)
+ _IGNORE_PROPERTY("backend")dnl// GtkPrintBackend is a private class
};
/** @relates Gtk::Printer */
diff --git a/gtk/src/searchbar.hg b/gtk/src/searchbar.hg
index 5a1ce21e..e1b1fc96 100644
--- a/gtk/src/searchbar.hg
+++ b/gtk/src/searchbar.hg
@@ -78,6 +78,7 @@ public:
_WRAP_PROPERTY("search-mode-enabled", bool)
_WRAP_PROPERTY("show-close-button", bool)
_WRAP_PROPERTY("child", Widget*)
+ _WRAP_PROPERTY("key-capture-widget", Widget*)
// Gtk::SearchBar has no signals nor vfuncs as of 3.10.
};
diff --git a/gtk/src/spinbutton.hg b/gtk/src/spinbutton.hg
index 2c42fa04..e9564254 100644
--- a/gtk/src/spinbutton.hg
+++ b/gtk/src/spinbutton.hg
@@ -95,6 +95,9 @@ public:
_WRAP_METHOD(void set_snap_to_ticks(bool snap_to_ticks = true), gtk_spin_button_set_snap_to_ticks)
_WRAP_METHOD(bool get_snap_to_ticks() const, gtk_spin_button_get_snap_to_ticks)
+ _WRAP_METHOD(void set_climb_rate(double climb_rate), gtk_spin_button_set_climb_rate)
+ _WRAP_METHOD(double get_climb_rate() const, gtk_spin_button_get_climb_rate)
+
_WRAP_METHOD(void update(), gtk_spin_button_update)
/** Constant to return from a signal handler for the input
diff --git a/gtk/src/stack.hg b/gtk/src/stack.hg
index 5ec53f65..3ce55092 100644
--- a/gtk/src/stack.hg
+++ b/gtk/src/stack.hg
@@ -49,15 +49,11 @@ class GTKMM_API Stack
public:
_CTOR_DEFAULT
+ _WRAP_METHOD(Glib::RefPtr<StackPage> add(Widget& child), gtk_stack_add_child, refreturn)
_WRAP_METHOD(Glib::RefPtr<StackPage> add(Widget& child, const Glib::ustring& name),
gtk_stack_add_named, refreturn)
- _WRAP_METHOD(Glib::RefPtr<const StackPage> add(Widget& child, const Glib::ustring& name) const,
- gtk_stack_add_named, refreturn, constversion)
-
_WRAP_METHOD(Glib::RefPtr<StackPage> add(Widget& child, const Glib::ustring& name,
const Glib::ustring& title), gtk_stack_add_titled, refreturn)
- _WRAP_METHOD(Glib::RefPtr<const StackPage> add(Widget& child, const Glib::ustring& name,
- const Glib::ustring& title) const, gtk_stack_add_titled, refreturn, constversion)
_WRAP_METHOD(void remove(Widget& child), gtk_stack_remove)
diff --git a/gtk/src/text.hg b/gtk/src/text.hg
index 43221f69..bf52bad3 100644
--- a/gtk/src/text.hg
+++ b/gtk/src/text.hg
@@ -97,6 +97,13 @@ public:
_WRAP_METHOD(Glib::RefPtr<Gio::MenuModel> get_extra_menu(), gtk_text_get_extra_menu, refreturn)
_WRAP_METHOD(Glib::RefPtr<const Gio::MenuModel> get_extra_menu() const, gtk_text_get_extra_menu,
refreturn, constversion)
+ _WRAP_METHOD(void set_enable_emoji_completion(bool enable_emoji_completion = true),
gtk_text_set_enable_emoji_completion)
+ _WRAP_METHOD(bool get_enable_emoji_completion() const, gtk_text_get_enable_emoji_completion)
+ _WRAP_METHOD(void set_propagate_text_width(bool propagate_text_width = true),
gtk_text_set_propagate_text_width)
+ _WRAP_METHOD(bool get_propagate_text_width() const, gtk_text_get_propagate_text_width)
+ _WRAP_METHOD(void set_truncate_multiline(bool truncate_multiline = true), gtk_text_set_truncate_multiline)
+ _WRAP_METHOD(bool get_truncate_multiline() const, gtk_text_get_truncate_multiline)
+
// Action signals
_IGNORE_SIGNAL(activate, move-cursor, insert-at-cursor, delete-from-cursor,
backspace, cut-clipboard, copy-clipboard, paste-clipboard, toggle-overwrite,
diff --git a/gtk/src/texttag.hg b/gtk/src/texttag.hg
index f56f1939..ab90e2c7 100644
--- a/gtk/src/texttag.hg
+++ b/gtk/src/texttag.hg
@@ -94,9 +94,8 @@ 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("overline", Pango::Overline)
+ _WRAP_PROPERTY("overline-rgba", Gdk::RGBA)
_WRAP_PROPERTY("rise", int)
_WRAP_PROPERTY("background-full-height", bool)
_WRAP_PROPERTY("language", Glib::ustring)
@@ -106,8 +105,7 @@ public:
_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("show-spaces", Pango::ShowFlags)
_WRAP_PROPERTY("insert-hyphens", bool)
_WRAP_PROPERTY("accumulative-margin", bool)
_WRAP_PROPERTY("background-set", bool)
@@ -132,9 +130,8 @@ 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("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)
@@ -147,11 +144,8 @@ public:
_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("show-spaces-set", bool)
_WRAP_PROPERTY("insert-hyphens-set", bool)
-
};
} //namespace Gtk
-
diff --git a/meson.build b/meson.build
index 6798b777..116d0c90 100644
--- a/meson.build
+++ b/meson.build
@@ -108,7 +108,7 @@ gtk_dep = dependency('gtk4', version: gtk_req)
cairomm_req = '>= 1.15.4'
cairomm_dep = dependency('cairomm-1.16', version: cairomm_req)
-pangomm_req = '>= 2.43.1'
+pangomm_req = '>= 2.43.3'
pangomm_dep = dependency('pangomm-2.44', version: pangomm_req)
gdk_pixbuf_req = '>= 2.35.5'
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]