[gtkmm] Gtk: Update for the latest gtk4 (add PopoverMenu::add_child(), etc.)
- From: Kjell Ahlstedt <kjellahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtkmm] Gtk: Update for the latest gtk4 (add PopoverMenu::add_child(), etc.)
- Date: Wed, 28 Oct 2020 17:39:20 +0000 (UTC)
commit fddb81b25c48b7845de9f892ffa4a5be0c4d783f
Author: Kjell Ahlstedt <kjellahlstedt gmail com>
Date: Wed Oct 28 18:36:15 2020 +0100
Gtk: Update for the latest gtk4 (add PopoverMenu::add_child(), etc.)
* gtk/src/popover.hg: Add set/get/property_cascade_popdown().
* gtk/src/popovermenu.hg:
* gtk/src/popovermenubar.hg: Add add_child() and remove_child().
plus a few other minor modifications.
gdk/src/display.hg | 2 ++
gtk/src/editable.hg | 4 ++--
gtk/src/popover.hg | 4 ++++
gtk/src/popovermenu.hg | 3 +++
gtk/src/popovermenubar.hg | 3 +++
gtk/src/snapshot.hg | 4 ++++
6 files changed, 18 insertions(+), 2 deletions(-)
---
diff --git a/gdk/src/display.hg b/gdk/src/display.hg
index 77adb82e..1ef5b178 100644
--- a/gdk/src/display.hg
+++ b/gdk/src/display.hg
@@ -103,6 +103,8 @@ public:
_WRAP_METHOD(Glib::RefPtr<Monitor> get_monitor_at_surface(const Glib::RefPtr<Surface>& surface),
gdk_display_get_monitor_at_surface, refreturn)
_WRAP_METHOD(Glib::RefPtr<const Monitor> get_monitor_at_surface(const Glib::RefPtr<Surface>& surface)
const, gdk_display_get_monitor_at_surface, refreturn, constversion)
+ _IGNORE(gdk_display_translate_key)dnl// "This function should rarely be needed"
+
template <class ValueType>
bool get_setting(const Glib::ustring& name, ValueType& value) const;
_IGNORE(gdk_display_get_setting)
diff --git a/gtk/src/editable.hg b/gtk/src/editable.hg
index 2936173e..f6a4fb50 100644
--- a/gtk/src/editable.hg
+++ b/gtk/src/editable.hg
@@ -76,8 +76,8 @@ public:
_WRAP_METHOD(void set_enable_undo(bool enable_undo = true), gtk_editable_set_enable_undo)
// Don't wrap API for implementations. Should it be wrapped?
- _IGNORE(gtk_editable_install_properties, gtk_editable_init_delegate, gtk_editable_finish_delegate,
- gtk_editable_delegate_set_property, gtk_editable_delegate_get_property)
+ _IGNORE(gtk_editable_install_properties, gtk_editable_get_delegate, gtk_editable_init_delegate,
+ gtk_editable_finish_delegate, gtk_editable_delegate_set_property, gtk_editable_delegate_get_property)
_IGNORE_SIGNAL(insert_text)
diff --git a/gtk/src/popover.hg b/gtk/src/popover.hg
index 55680adc..a1c45a31 100644
--- a/gtk/src/popover.hg
+++ b/gtk/src/popover.hg
@@ -88,6 +88,9 @@ public:
_WRAP_METHOD(void set_offset(int x_offset, int y_offset), gtk_popover_set_offset)
_WRAP_METHOD(void get_offset(int& x_offset, int& y_offset) const, gtk_popover_get_offset)
+ _WRAP_METHOD(void set_cascade_popdown(bool cascade_popdown = true), gtk_popover_set_cascade_popdown)
+ _WRAP_METHOD(bool get_cascade_popdown() const, gtk_popover_get_cascade_popdown)
+
_WRAP_PROPERTY("pointing-to", Gdk::Rectangle)
_WRAP_PROPERTY("position", PositionType)
_WRAP_PROPERTY("autohide", bool)
@@ -95,6 +98,7 @@ public:
_WRAP_PROPERTY("default-widget", Widget*)
_WRAP_PROPERTY("mnemonics-visible", bool)
_WRAP_PROPERTY("child", Widget*)
+ _WRAP_PROPERTY("cascade-popdown", bool)
_WRAP_SIGNAL(void closed(), "closed")
_IGNORE_SIGNAL("activate-default")dnl// action signal
diff --git a/gtk/src/popovermenu.hg b/gtk/src/popovermenu.hg
index 166e1474..695d5346 100644
--- a/gtk/src/popovermenu.hg
+++ b/gtk/src/popovermenu.hg
@@ -85,6 +85,9 @@ public:
_WRAP_METHOD(Glib::RefPtr<Gio::MenuModel> get_menu_model(), gtk_popover_menu_get_menu_model, refreturn)
_WRAP_METHOD(Glib::RefPtr<const Gio::MenuModel> get_menu_model() const, gtk_popover_menu_get_menu_model,
refreturn, constversion)
+ _WRAP_METHOD(bool add_child(Widget& child, const Glib::ustring& id), gtk_popover_menu_add_child)
+ _WRAP_METHOD(bool remove_child(Widget& child), gtk_popover_menu_remove_child)
+
_WRAP_PROPERTY("visible-submenu", Glib::ustring)
_WRAP_PROPERTY("menu-model", Glib::RefPtr<Gio::MenuModel>)
diff --git a/gtk/src/popovermenubar.hg b/gtk/src/popovermenubar.hg
index add7b941..098f49d9 100644
--- a/gtk/src/popovermenubar.hg
+++ b/gtk/src/popovermenubar.hg
@@ -48,6 +48,9 @@ public:
_WRAP_METHOD(Glib::RefPtr<Gio::MenuModel> get_menu_model(), gtk_popover_menu_bar_get_menu_model, refreturn)
_WRAP_METHOD(Glib::RefPtr<const Gio::MenuModel> get_menu_model() const,
gtk_popover_menu_bar_get_menu_model, refreturn, constversion)
+ _WRAP_METHOD(bool add_child(Widget& child, const Glib::ustring& id), gtk_popover_menu_bar_add_child)
+ _WRAP_METHOD(bool remove_child(Widget& child), gtk_popover_menu_bar_remove_child)
+
_WRAP_PROPERTY("menu-model", Glib::RefPtr<Gio::MenuModel>)
// PopoverMenuBar has no signals nor vfuncs.
diff --git a/gtk/src/snapshot.hg b/gtk/src/snapshot.hg
index 4d0b28fb..56f875f8 100644
--- a/gtk/src/snapshot.hg
+++ b/gtk/src/snapshot.hg
@@ -75,11 +75,15 @@ public:
_WRAP_METHOD(void push_blur(double radius), gtk_snapshot_push_blur)
#m4 _CONVERSION(`const Gdk::Rectangle&',`const graphene_rect_t*', `gdk_rect_to_graphene_rect($3).get()')
+ _WRAP_METHOD(void push_repeat(const graphene_rect_t* bounds, const graphene_rect_t* child_bounds),
gtk_snapshot_push_repeat)
+ _WRAP_METHOD(void push_repeat(const Gdk::Rectangle& bounds, const Gdk::Rectangle& child_bounds{?}),
gtk_snapshot_push_repeat)
+
_WRAP_METHOD(void push_clip(const graphene_rect_t* bounds), gtk_snapshot_push_clip)
_WRAP_METHOD(void push_clip(const Gdk::Rectangle& bounds), gtk_snapshot_push_clip)
_WRAP_METHOD(void push_cross_fade(double progress), gtk_snapshot_push_cross_fade)
+ _WRAP_METHOD(void gl_shader_pop_texture(), gtk_snapshot_gl_shader_pop_texture)
_WRAP_METHOD(void pop(), gtk_snapshot_pop)
_WRAP_METHOD(void save(), gtk_snapshot_save)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]