[gtkmm] Gdk::EventType, Gtk::MenuButton, Window: Adapt to the updated .defs files.
- From: Kjell Ahlstedt <kjellahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtkmm] Gdk::EventType, Gtk::MenuButton, Window: Adapt to the updated .defs files.
- Date: Fri, 1 Mar 2013 15:57:46 +0000 (UTC)
commit 8e67e4a8446d7c18163ecc4ee99b7bc153640746
Author: Kjell Ahlstedt <kjell ahlstedt bredband net>
Date: Fri Mar 1 16:41:21 2013 +0100
Gdk::EventType, Gtk::MenuButton, Window: Adapt to the updated .defs files.
* gdk/src/event.hg: Substitute empty strings for [DOUBLE|TRIPLE]_BUTTON_PRESS
in _WRAP_ENUM(EventType...).
* gtk/src/menubutton.[hg|ccg]: Hand-code the "menu" property, deleted in gtk+.
* gtk/src/window.[hg|ccg]: Hand-code the "opacity" property, moved to
GtkWidget in gtk+.
ChangeLog | 10 ++++++++++
gdk/src/event.hg | 6 ++++--
gtk/src/menubutton.ccg | 13 ++++++++++++-
gtk/src/menubutton.hg | 25 ++++++++++++++++++++++++-
gtk/src/window.ccg | 15 +++++++++++++++
gtk/src/window.hg | 26 +++++++++++++++++++++++++-
6 files changed, 90 insertions(+), 5 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index d40f548..13c1181 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,15 @@
2013-03-01 Kjell Ahlstedt <kjell ahlstedt bredband net>
+ Gdk::EventType, Gtk::MenuButton, Window: Adapt to the updated .defs files.
+
+ * gdk/src/event.hg: Substitute empty strings for [DOUBLE|TRIPLE]_BUTTON_PRESS
+ in _WRAP_ENUM(EventType...).
+ * gtk/src/menubutton.[hg|ccg]: Hand-code the "menu" property, deleted in gtk+.
+ * gtk/src/window.[hg|ccg]: Hand-code the "opacity" property, moved to
+ GtkWidget in gtk+.
+
+2013-03-01 Kjell Ahlstedt <kjell ahlstedt bredband net>
+
Update the .defs files.
* gdk/src/gdk_enums.defs:
diff --git a/gdk/src/event.hg b/gdk/src/event.hg
index 386c4b8..56d9380 100644
--- a/gdk/src/event.hg
+++ b/gdk/src/event.hg
@@ -40,8 +40,10 @@ namespace Gdk
{
_WRAP_ENUM(EventType, GdkEventType,
- s#^2BUTTON_PRESS#DOUBLE_BUTTON_PRESS#,
- s#^3BUTTON_PRESS#TRIPLE_BUTTON_PRESS#
+ s#^DOUBLE_BUTTON_PRESS$##,
+ s#^2BUTTON_PRESS#DOUBLE_BUTTON_PRESS#,
+ s#^TRIPLE_BUTTON_PRESS$##,
+ s#^3BUTTON_PRESS#TRIPLE_BUTTON_PRESS#
)
_WRAP_ENUM(AxisUse, GdkAxisUse)
diff --git a/gtk/src/menubutton.ccg b/gtk/src/menubutton.ccg
index 3f29214..dfc969c 100644
--- a/gtk/src/menubutton.ccg
+++ b/gtk/src/menubutton.ccg
@@ -37,7 +37,18 @@ void MenuButton::unset_menu_model()
gtk_menu_button_set_menu_model(gobj(), 0);
}
+#ifndef GTKMM_DISABLE_DEPRECATED
+#ifdef GLIBMM_PROPERTIES_ENABLED
+Glib::PropertyProxy< Menu* > MenuButton::property_menu()
+{
+ return property_popup();
+}
-
+Glib::PropertyProxy_ReadOnly< Menu* > MenuButton::property_menu() const
+{
+ return property_popup();
+}
+#endif //GLIBMM_PROPERTIES_ENABLED
+#endif // GTKMM_DISABLE_DEPRECATED
} //namespace Gtk
diff --git a/gtk/src/menubutton.hg b/gtk/src/menubutton.hg
index d11dd35..395145b 100644
--- a/gtk/src/menubutton.hg
+++ b/gtk/src/menubutton.hg
@@ -85,7 +85,30 @@ _DEPRECATE_IFDEF_END
_WRAP_METHOD(Widget* get_align_widget(), gtk_menu_button_get_align_widget)
_WRAP_METHOD(const Widget* get_align_widget() const, gtk_menu_button_get_align_widget)
- _WRAP_PROPERTY("menu", Menu*, deprecated "Use popup instead.")
+#ifndef GTKMM_DISABLE_DEPRECATED
+#ifdef GLIBMM_PROPERTIES_ENABLED
+// _WRAP_PROPERTY("menu", Menu*, deprecated "Use popup instead.")
+// The GtkMenuButton::menu property does not exist in gtk+ 3.7.0 and later. Must hand-code to avoid an
API/ABI break.
+/** The dropdown menu.
+ * @deprecated Use popup instead.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the value of the property,
+ * or receive notification when the value of the property changes.
+ */
+ Glib::PropertyProxy< Menu* > property_menu() ;
+
+/** The dropdown menu.
+ * @deprecated Use popup instead.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy_ReadOnly that allows you to get the value of the property,
+ * or receive notification when the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly< Menu* > property_menu() const;
+#endif //#GLIBMM_PROPERTIES_ENABLED
+#endif // GTKMM_DISABLE_DEPRECATED
+
_WRAP_PROPERTY("popup", Menu*)
_WRAP_PROPERTY("menu-model", Glib::RefPtr<Gio::MenuModel>)
_WRAP_PROPERTY("align-widget", Widget*)
diff --git a/gtk/src/window.ccg b/gtk/src/window.ccg
index 0cc0240..86d5311 100644
--- a/gtk/src/window.ccg
+++ b/gtk/src/window.ccg
@@ -203,4 +203,19 @@ void Window::unset_application()
gtk_window_set_application(gobj(), 0 /* See GTK+ docs */);
}
+#ifndef GTKMM_DISABLE_DEPRECATED
+#ifdef GLIBMM_PROPERTIES_ENABLED
+// This works. The base class GtkWidget contains the opacity property.
+Glib::PropertyProxy< double > Window::property_opacity()
+{
+ return Glib::PropertyProxy< double >(this, "opacity");
+}
+
+Glib::PropertyProxy_ReadOnly< double > Window::property_opacity() const
+{
+ return Glib::PropertyProxy_ReadOnly< double >(this, "opacity");
+}
+#endif //GLIBMM_PROPERTIES_ENABLED
+#endif // GTKMM_DISABLE_DEPRECATED
+
} // namespace Gtk
diff --git a/gtk/src/window.hg b/gtk/src/window.hg
index 6a12ad8..a52356d 100644
--- a/gtk/src/window.hg
+++ b/gtk/src/window.hg
@@ -107,7 +107,31 @@ public:
_WRAP_PROPERTY("decorated", bool)
_WRAP_PROPERTY("gravity", Gdk::Gravity)
_WRAP_PROPERTY("transient_for", Window*)
- _WRAP_PROPERTY("opacity", double, deprecated "Use the opacity property in the Widget base class instead.")
+
+#ifndef GTKMM_DISABLE_DEPRECATED
+#ifdef GLIBMM_PROPERTIES_ENABLED
+// _WRAP_PROPERTY("opacity", double, deprecated "Use the opacity property in the Widget base class instead.")
+// The GtkWindow::opacity property does not exist in gtk+ 3.7.10 and later. Must hand-code to avoid an ABI
break.
+/** The opacity of the window, from 0 to 1.
+ * @deprecated Use the opacity property in the Widget base class instead.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the value of the property,
+ * or receive notification when the value of the property changes.
+ */
+ Glib::PropertyProxy< double > property_opacity() ;
+
+/** The opacity of the window, from 0 to 1.
+ * @deprecated Use the opacity property in the Widget base class instead.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy_ReadOnly that allows you to get the value of the property,
+ * or receive notification when the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly< double > property_opacity() const;
+#endif //#GLIBMM_PROPERTIES_ENABLED
+#endif // GTKMM_DISABLE_DEPRECATED
+
_WRAP_PROPERTY("has-resize-grip", bool)
_WRAP_PROPERTY("resize-grip-visible", bool)
_WRAP_PROPERTY("urgency_hint", bool)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]