[gtkmm] Gtk::Widget: Add get/set_opacity().
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtkmm] Gtk::Widget: Add get/set_opacity().
- Date: Thu, 21 Feb 2013 12:52:19 +0000 (UTC)
commit b8c9e346b8fa5f95fc308658a8d1126119ef6dda
Author: Murray Cumming <murrayc murrayc com>
Date: Thu Feb 21 13:52:04 2013 +0100
Gtk::Widget: Add get/set_opacity().
* gtk/src/widget.[hg|ccg]: Wrap gtk_widget_get_opacity()
and gtk_Widget_set_opacity() and add the opacity
property.
* gtk/src/window.[hg|ccg]: Deprecate get_opacity(),
set_opacity() and the opacity property.
This fixes the build with --enable-warnings=fatal
ChangeLog | 12 ++++++++++++
gtk/src/widget.hg | 4 ++++
gtk/src/window.hg | 14 ++++++++++----
3 files changed, 26 insertions(+), 4 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 2c2c2be..0322cf0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,17 @@
2013-02-21 Murray Cumming <murrayc murrayc com>
+ Gtk::Widget: Add get/set_opacity().
+
+ * gtk/src/widget.[hg|ccg]: Wrap gtk_widget_get_opacity()
+ and gtk_Widget_set_opacity() and add the opacity
+ property.
+ * gtk/src/window.[hg|ccg]: Deprecate get_opacity(),
+ set_opacity() and the opacity property.
+
+ This fixes the build with --enable-warnings=fatal
+
+2013-02-21 Murray Cumming <murrayc murrayc com>
+
Gtk::ScrolledWindow: Do not use a deprecated function.
* gtk/src/iconinfo.[hg|ccg]: We no longer need to call
diff --git a/gtk/src/widget.hg b/gtk/src/widget.hg
index 8648acc..6bfadf8 100644
--- a/gtk/src/widget.hg
+++ b/gtk/src/widget.hg
@@ -301,6 +301,9 @@ public:
_WRAP_METHOD(void set_device_events(const Glib::RefPtr<const Gdk::Device>& device, Gdk::EventMask events),
gtk_widget_set_device_events)
_WRAP_METHOD(void add_device_events(const Glib::RefPtr<const Gdk::Device>& device, Gdk::EventMask events),
gtk_widget_add_device_events)
+ _WRAP_METHOD(void set_opacity(double opacity), gtk_widget_set_opacity)
+ _WRAP_METHOD(double get_opacity() const, gtk_widget_get_opacity)
+
_WRAP_METHOD(void set_device_enabled(const Glib::RefPtr<Gdk::Device>& device, bool enabled = true),
gtk_widget_set_device_enabled)
_WRAP_METHOD(bool get_device_enabled(const Glib::RefPtr<const Gdk::Device>& device) const,
gtk_widget_get_device_enabled)
@@ -745,6 +748,7 @@ dnl
_WRAP_PROPERTY("vexpand", bool)
_WRAP_PROPERTY("vexpand-set", bool)
_WRAP_PROPERTY("expand", bool)
+ _WRAP_PROPERTY("opacity", double)
protected:
diff --git a/gtk/src/window.hg b/gtk/src/window.hg
index e93b6df..6a12ad8 100644
--- a/gtk/src/window.hg
+++ b/gtk/src/window.hg
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 1998-2002 The gtkmm Development Team
+ * Copyright (C) 1998-2013 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
@@ -25,6 +25,12 @@
_DEFS(gtkmm,gtk)
_PINCLUDE(gtkmm/private/bin_p.h)
+#m4 _PUSH(SECTION_CC_PRE_INCLUDES)
+//So we can use deprecated GTK+ API in our deprecated C++ API:
+#undef GDK_DISABLE_DEPRECATED
+#define GDK_DISABLE_DEPRECATION_WARNINGS 1
+#m4 _POP()
+
namespace Gtk
{
@@ -101,7 +107,7 @@ public:
_WRAP_PROPERTY("decorated", bool)
_WRAP_PROPERTY("gravity", Gdk::Gravity)
_WRAP_PROPERTY("transient_for", Window*)
- _WRAP_PROPERTY("opacity", double)
+ _WRAP_PROPERTY("opacity", double, deprecated "Use the opacity property in the Widget base class instead.")
_WRAP_PROPERTY("has-resize-grip", bool)
_WRAP_PROPERTY("resize-grip-visible", bool)
_WRAP_PROPERTY("urgency_hint", bool)
@@ -194,8 +200,8 @@ dnl
_WRAP_METHOD(Widget* get_attached_to(), gtk_window_get_attached_to)
_WRAP_METHOD(const Widget* get_attached_to() const, gtk_window_get_attached_to, constversion)
- _WRAP_METHOD(void set_opacity(double opacity), gtk_window_set_opacity)
- _WRAP_METHOD(double get_opacity() const, gtk_window_get_opacity)
+ _WRAP_METHOD(void set_opacity(double opacity), gtk_window_set_opacity, deprecated "Use
Widget::set_opacity() instead.")
+ _WRAP_METHOD(double get_opacity() const, gtk_window_get_opacity, deprecated "Use Widget::get_opacity()
instead.")
_WRAP_METHOD(void set_type_hint(Gdk::WindowTypeHint hint), gtk_window_set_type_hint)
_WRAP_METHOD(Gdk::WindowTypeHint get_type_hint() const, gtk_window_get_type_hint)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]