[gtkmm/gtkmm-2-22] Gdk: RgbCMap: Deprecate.
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtkmm/gtkmm-2-22] Gdk: RgbCMap: Deprecate.
- Date: Sun, 29 Aug 2010 15:58:20 +0000 (UTC)
commit b7e537cc55b629a45613b0cdd97fd1c1237b68e7
Author: Murray Cumming <murrayc murrayc com>
Date: Sun Aug 29 17:58:09 2010 +0200
Gdk: RgbCMap: Deprecate.
* gdk/src/rgbcmap.[hg|ccg]: Deprecate this because it is deprecated in
GTK+. This fixes the build with fatal warnings.
ChangeLog | 7 +++++++
gdk/src/rgbcmap.ccg | 5 ++++-
gdk/src/rgbcmap.hg | 10 ++++++++++
3 files changed, 21 insertions(+), 1 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index f6b18e9..2046b1f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2010-08-29 Murray Cumming <murrayc murrayc com>
+
+ Gdk: RgbCMap: Deprecate.
+
+ * gdk/src/rgbcmap.[hg|ccg]: Deprecate this because it is deprecated in
+ GTK+. This fixes the build with fatal warnings.
+
2010-08-04 Armin Burgmeier <armin arbur net>
Add missing include paths to MSVC property sheets.
diff --git a/gdk/src/rgbcmap.ccg b/gdk/src/rgbcmap.ccg
index bcf1562..89b368e 100644
--- a/gdk/src/rgbcmap.ccg
+++ b/gdk/src/rgbcmap.ccg
@@ -24,6 +24,8 @@
namespace Gdk
{
+#ifndef GTKMM_DISABLE_DEPRECATED
+
RgbCmap::RgbCmap(const Glib::ArrayHandle<guint32>& colors)
: gobject_ (gdk_rgb_cmap_new(const_cast<guint32*>(colors.data()), colors.size()))
{}
@@ -44,11 +46,12 @@ const guint32& RgbCmap::operator[](unsigned long index) const
return gobject_->colors[index];
}
-
unsigned long RgbCmap::size() const
{
return gobject_->n_colors;
}
+#endif //GTKMM_DISABLE_DEPRECATED
+
} // namespace Gdk
diff --git a/gdk/src/rgbcmap.hg b/gdk/src/rgbcmap.hg
index 05db480..707849c 100644
--- a/gdk/src/rgbcmap.hg
+++ b/gdk/src/rgbcmap.hg
@@ -19,8 +19,13 @@
_DEFS(gdkmm,gdk)
+#m4 _PUSH(SECTION_CC_PRE_INCLUDES)
+#undef GDK_DISABLE_DEPRECATED
+#m4 _POP()
+
#include <gdkmmconfig.h>
+#ifndef GTKMM_DISABLE_DEPRECATED
#ifndef DOXYGEN_SHOULD_SKIP_THIS
extern "C" { typedef struct _GdkRgbCmap GdkRgbCmap; }
@@ -29,6 +34,9 @@ extern "C" { typedef struct _GdkRgbCmap GdkRgbCmap; }
namespace Gdk
{
+//TODO: Say why is this deprecated.
+/** @deprecated
+ */
class RgbCmap
{
_CLASS_GENERIC(RgbCmap, GdkRgbCmap)
@@ -61,5 +69,7 @@ private:
RgbCmap& operator=(const RgbCmap&);
};
+#endif //GTKMM_DISABLE_DEPRECATED
+
} // namespace Gdk
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]