[gtkmm] Gtk: Add some methods and properties
- From: Kjell Ahlstedt <kjellahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtkmm] Gtk: Add some methods and properties
- Date: Thu, 18 Feb 2016 19:13:07 +0000 (UTC)
commit 3fd3eb86a9ba3b1618f5489fec97d67063808849
Author: Kjell Ahlstedt <kjell ahlstedt bredband net>
Date: Thu Feb 18 20:10:12 2016 +0100
Gtk: Add some methods and properties
* gtk/src/accellabel.hg: Add get_accel().
* gtk/src/applicationwindow.hg: Don't _IGNORE(gtk_application_window_new).
If it's ignored, gmmproc erroneously lists many methods as unwrapped.
* gtk/src/gesturelongpress.hg: Add property_delay_factor().
* gtk/src/popover.hg: Add enum PopoverConstraint and
set/get/property_constrain_to().
* gtk/src/settings.hg: Add reset_property() and property_gtk_titlebar_
double_click/middle_click/right_click().
* gtk/src/stack.hg: Add set/get/property_interpolate_size().
* gtk/src/stackswitcher.hg: Add property_icon_size().
* gtk/src/texttag.hg: Add tag_changed() and property_strikethrough_rgba/
strikethrough_rgba_set/underline_rgba/underline_rgba_set/font_features/
font_features_set().
* gtk/src/textview.hg: Add set/get/property_top_margin() and
set/get/property_bottom_margin().
* tools/m4/convert_gtk.m4: Add _CONV_ENUM(Gtk,PopoverConstraint).
gtk/src/accellabel.hg | 2 ++
gtk/src/applicationwindow.hg | 4 +++-
gtk/src/gesturelongpress.hg | 4 +++-
gtk/src/popover.hg | 5 +++++
gtk/src/settings.hg | 5 +++++
gtk/src/stack.hg | 4 ++++
gtk/src/stackswitcher.hg | 1 +
gtk/src/texttag.hg | 7 +++++++
gtk/src/textview.hg | 6 ++++++
tools/m4/convert_gtk.m4 | 1 +
10 files changed, 37 insertions(+), 2 deletions(-)
---
diff --git a/gtk/src/accellabel.hg b/gtk/src/accellabel.hg
index a5e8cd8..0341020 100644
--- a/gtk/src/accellabel.hg
+++ b/gtk/src/accellabel.hg
@@ -58,6 +58,8 @@ public:
_WRAP_METHOD(bool refetch(), gtk_accel_label_refetch)
_WRAP_METHOD(void set_accel(guint accelerator_key, Gdk::ModifierType accelerator_mods),
gtk_accel_label_set_accel)
+#m4 _INITIALIZATION(`Gdk::ModifierType&', `GdkModifierType', `$3 = ($1)$4')
+ _WRAP_METHOD(void get_accel(guint& accelerator_key, Gdk::ModifierType& accelerator_mods{>>}),
gtk_accel_label_get_accel)
//_WRAP_PROPERTY("accel-closure", Glib::Object) //GClosure
_WRAP_PROPERTY("accel-widget", Gtk::Widget*)
diff --git a/gtk/src/applicationwindow.hg b/gtk/src/applicationwindow.hg
index 48f51d7..a9fe625 100644
--- a/gtk/src/applicationwindow.hg
+++ b/gtk/src/applicationwindow.hg
@@ -79,7 +79,9 @@ class ApplicationWindow
public:
_CTOR_DEFAULT
explicit ApplicationWindow(const Glib::RefPtr<Application>& application);
- _IGNORE(gtk_application_window_new)
+dnl // Don't ignore gtk_application_window_new(). h2def.py erroneously classifies
+dnl // it as a GtkApplication method, because its first parameter is a GtkApplication*.
+dnl //_IGNORE(gtk_application_window_new)
_WRAP_METHOD(void set_show_menubar(bool show_menubar = true), gtk_application_window_set_show_menubar)
_WRAP_METHOD(bool get_show_menubar() const, gtk_application_window_get_show_menubar)
diff --git a/gtk/src/gesturelongpress.hg b/gtk/src/gesturelongpress.hg
index d8b576c..0f238b5 100644
--- a/gtk/src/gesturelongpress.hg
+++ b/gtk/src/gesturelongpress.hg
@@ -62,7 +62,9 @@ public:
_WRAP_SIGNAL(void pressed(double x, double y), "pressed", no_default_handler)
_WRAP_SIGNAL(void cancelled(), "cancelled", no_default_handler)
- // GestureLongPress has no properties and no methods
+ _WRAP_PROPERTY("delay-factor", double, newin "3,20")
+
+ // GestureLongPress has no methods
};
} // namespace Gtk
diff --git a/gtk/src/popover.hg b/gtk/src/popover.hg
index a0d5647..a409469 100644
--- a/gtk/src/popover.hg
+++ b/gtk/src/popover.hg
@@ -24,6 +24,7 @@ _PINCLUDE(gtkmm/private/bin_p.h)
namespace Gtk
{
+_WRAP_ENUM(PopoverConstraint, GtkPopoverConstraint)
/** Context dependent bubbles.
*
@@ -127,11 +128,15 @@ public:
_WRAP_METHOD(Widget* get_default_widget(), gtk_popover_get_default_widget)
_WRAP_METHOD(const Widget* get_default_widget() const, gtk_popover_get_default_widget, constversion)
+ _WRAP_METHOD(void set_constrain_to(PopoverConstraint constraint), gtk_popover_set_constrain_to)
+ _WRAP_METHOD(PopoverConstraint get_constrain_to() const, gtk_popover_get_constrain_to)
+
_WRAP_PROPERTY("relative-to", Widget*)
_WRAP_PROPERTY("pointing-to", Gdk::Rectangle)
_WRAP_PROPERTY("position", PositionType)
_WRAP_PROPERTY("modal", bool)
_WRAP_PROPERTY("transitions-enabled", bool)
+ _WRAP_PROPERTY("constrain-to", PopoverConstraint)
_WRAP_SIGNAL(void closed(), "closed")
};
diff --git a/gtk/src/settings.hg b/gtk/src/settings.hg
index 87ca71c..75829e2 100644
--- a/gtk/src/settings.hg
+++ b/gtk/src/settings.hg
@@ -46,6 +46,8 @@ public:
_WRAP_METHOD(static Glib::RefPtr<Settings> get_for_screen(const Glib::RefPtr<Gdk::Screen>& screen),
gtk_settings_get_for_screen, refreturn)
+ _WRAP_METHOD(void reset_property(const Glib::ustring& name), gtk_settings_reset_property)
+
_WRAP_PROPERTY("gtk-double-click-time", int)
_WRAP_PROPERTY("gtk-double-click-distance", int)
_WRAP_PROPERTY("gtk-cursor-blink", bool, deprecated "This setting is ignored.")
@@ -135,6 +137,9 @@ public:
_WRAP_PROPERTY("gtk-primary-button-warps-slider", bool)
_WRAP_PROPERTY("gtk-decoration-layout", Glib::ustring) // since 3.12
+ _WRAP_PROPERTY("gtk-titlebar-double-click", Glib::ustring, newin "3,20")
+ _WRAP_PROPERTY("gtk-titlebar-middle-click", Glib::ustring, newin "3,20")
+ _WRAP_PROPERTY("gtk-titlebar-right-click", Glib::ustring, newin "3,20")
_WRAP_PROPERTY("gtk-dialogs-use-header", bool) // since 3.12
_WRAP_PROPERTY("gtk-long-press-time", guint) // since 3.14
diff --git a/gtk/src/stack.hg b/gtk/src/stack.hg
index fd6fe4e..220e279 100644
--- a/gtk/src/stack.hg
+++ b/gtk/src/stack.hg
@@ -89,6 +89,9 @@ public:
_WRAP_METHOD(Widget* get_child_by_name(const Glib::ustring& name), gtk_stack_get_child_by_name)
_WRAP_METHOD(const Widget* get_child_by_name(const Glib::ustring& name) const,
gtk_stack_get_child_by_name, constversion)
+ _WRAP_METHOD(void set_interpolate_size(bool interpolate_size), gtk_stack_set_interpolate_size, newin
"3,20")
+ _WRAP_METHOD(bool get_interpolate_size() const, gtk_stack_get_interpolate_size, newin "3,20")
+
_WRAP_PROPERTY("homogeneous", bool)
_WRAP_PROPERTY("hhomogeneous", bool)
_WRAP_PROPERTY("transition-duration", unsigned int)
@@ -97,6 +100,7 @@ public:
_WRAP_PROPERTY("vhomogeneous", bool)
_WRAP_PROPERTY("visible-child", Widget*)
_WRAP_PROPERTY("visible-child-name", Glib::ustring)
+ _WRAP_PROPERTY("interpolate-size", bool, newin "3,20")
_WRAP_CHILD_PROPERTY("name", Glib::ustring)
_WRAP_CHILD_PROPERTY("title", Glib::ustring)
diff --git a/gtk/src/stackswitcher.hg b/gtk/src/stackswitcher.hg
index 93f463a..cc50d39 100644
--- a/gtk/src/stackswitcher.hg
+++ b/gtk/src/stackswitcher.hg
@@ -59,6 +59,7 @@ public:
_WRAP_METHOD(Stack* get_stack(), gtk_stack_switcher_get_stack)
_WRAP_METHOD(const Stack* get_stack() const, gtk_stack_switcher_get_stack, constversion)
+ _WRAP_PROPERTY("icon-size", IconSize)
_WRAP_PROPERTY("stack", Stack*)
// There are no signals or vfuncs.
diff --git a/gtk/src/texttag.hg b/gtk/src/texttag.hg
index ec530aa..fbe8d9f 100644
--- a/gtk/src/texttag.hg
+++ b/gtk/src/texttag.hg
@@ -67,6 +67,7 @@ public:
_WRAP_METHOD(int get_priority() const, gtk_text_tag_get_priority)
_WRAP_METHOD(void set_priority(int priority), gtk_text_tag_set_priority)
_WRAP_METHOD(bool event(const Glib::RefPtr<Glib::Object>& event_object, GdkEvent* gdk_event, const
TextIter& iter), gtk_text_tag_event)
+ _WRAP_METHOD(void tag_changed(bool size_changed), gtk_text_tag_changed)
#m4 _CONVERSION(`GObject*',`const Glib::RefPtr<Glib::Object>&',`Glib::wrap($3, true)')
_WRAP_SIGNAL(bool event(const Glib::RefPtr<Glib::Object>& event_object, GdkEvent* gdk_event, const
TextIter& iter), "event")
@@ -98,8 +99,10 @@ public:
_WRAP_PROPERTY("left-margin", int)
_WRAP_PROPERTY("indent", int)
_WRAP_PROPERTY("strikethrough", bool)
+ _WRAP_PROPERTY("strikethrough-rgba", Gdk::RGBA, newin "3,20")
_WRAP_PROPERTY("right-margin", int)
_WRAP_PROPERTY("underline", Pango::Underline)
+ _WRAP_PROPERTY("underline-rgba", Gdk::RGBA, newin "3,20")
_WRAP_PROPERTY("rise", int)
_WRAP_PROPERTY("background-full-height", bool)
_WRAP_PROPERTY("language", Glib::ustring)
@@ -108,6 +111,7 @@ public:
_WRAP_PROPERTY("paragraph-background", Glib::ustring)
_WRAP_PROPERTY("paragraph-background-gdk", Gdk::Color, deprecated "Use
property_paragraph_background_rgba() instead.")
_WRAP_PROPERTY("paragraph-background-rgba", Gdk::RGBA)
+ _WRAP_PROPERTY("font-features", Glib::ustring, newin "3,20")
_WRAP_PROPERTY("accumulative-margin", bool)
_WRAP_PROPERTY("background-set", bool)
_WRAP_PROPERTY("foreground-set", bool)
@@ -127,8 +131,10 @@ public:
_WRAP_PROPERTY("left-margin-set", bool)
_WRAP_PROPERTY("indent-set", bool)
_WRAP_PROPERTY("strikethrough-set", bool)
+ _WRAP_PROPERTY("strikethrough-rgba-set", bool, newin "3,20")
_WRAP_PROPERTY("right-margin-set", bool)
_WRAP_PROPERTY("underline-set", bool)
+ _WRAP_PROPERTY("underline-rgba-set", bool, newin "3,20")
_WRAP_PROPERTY("rise-set", bool)
_WRAP_PROPERTY("background-full-height-set", bool)
_WRAP_PROPERTY("language-set", bool)
@@ -139,6 +145,7 @@ public:
_WRAP_PROPERTY("fallback-set", bool)
_WRAP_PROPERTY("letter-spacing", int)
_WRAP_PROPERTY("letter-spacing-set", bool)
+ _WRAP_PROPERTY("font-features-set", bool, newin "3,20")
};
} //namespace Gtk
diff --git a/gtk/src/textview.hg b/gtk/src/textview.hg
index fb5ca54..6e9bd2a 100644
--- a/gtk/src/textview.hg
+++ b/gtk/src/textview.hg
@@ -180,6 +180,10 @@ public:
_WRAP_METHOD(int get_left_margin() const, gtk_text_view_get_left_margin)
_WRAP_METHOD(void set_right_margin(int right_margin), gtk_text_view_set_right_margin)
_WRAP_METHOD(int get_right_margin() const, gtk_text_view_get_right_margin)
+ _WRAP_METHOD(void set_top_margin(int top_margin), gtk_text_view_set_top_margin, newin "3,20")
+ _WRAP_METHOD(int get_top_margin() const, gtk_text_view_get_top_margin, newin "3,20")
+ _WRAP_METHOD(void set_bottom_margin(int bottom_margin), gtk_text_view_set_bottom_margin, newin "3,20")
+ _WRAP_METHOD(int get_bottom_margin() const, gtk_text_view_get_bottom_margin, newin "3,20")
_WRAP_METHOD(void set_indent(int indent), gtk_text_view_set_indent)
_WRAP_METHOD(int get_indent() const, gtk_text_view_get_indent)
_WRAP_METHOD(void set_tabs(Pango::TabArray& tabs), gtk_text_view_set_tabs)
@@ -234,6 +238,8 @@ public:
_WRAP_PROPERTY("justification", Justification)
_WRAP_PROPERTY("left-margin", int)
_WRAP_PROPERTY("right-margin", int)
+ _WRAP_PROPERTY("top-margin", int, newin "2,30")
+ _WRAP_PROPERTY("bottom-margin", int, newin "2,30")
_WRAP_PROPERTY("indent", int)
_WRAP_PROPERTY("tabs", Pango::TabArray)
_WRAP_PROPERTY("cursor-visible", bool)
diff --git a/tools/m4/convert_gtk.m4 b/tools/m4/convert_gtk.m4
index a36ca1b..c2bcb64 100644
--- a/tools/m4/convert_gtk.m4
+++ b/tools/m4/convert_gtk.m4
@@ -97,6 +97,7 @@ _CONV_ENUM(Gtk,PackDirection)
_CONV_ENUM(Gtk,PanDirection)
_CONV_ENUM(Gtk,PlacesOpenFlags)
_CONV_ENUM(Gtk,PolicyType)
+_CONV_ENUM(Gtk,PopoverConstraint)
_CONV_ENUM(Gtk,PositionType)
_CONV_ENUM(Gtk,PreviewType)
_CONV_ENUM(Gtk,ProgressBarOrientation)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]