[gtkmm] Added properties using Gdk::RGBA.



commit 48a16503b2f36d7a5926454590e2a60e23cf86ad
Author: Murray Cumming <murrayc murrayc com>
Date:   Tue Dec 7 13:42:13 2010 +0100

    Added properties using Gdk::RGBA.
    
    * gdk/src/color.hg:
    * gtk/src/cellrenderer.hg:
    * gtk/src/cellrenderertext.hg:
    * gtk/src/cellview.hg:
    * gtk/src/colorbutton.hg:
    * gtk/src/texttag.hg: Added the new properties that take a Gdk::RGBA instead
    of Gdk::Color. We can remove Gdk::Color when it has been deprecated in
    GTK+ 3:
    https://bugzilla.gnome.org/show_bug.cgi?id=636695

 ChangeLog                   |   14 ++++++++++++++
 gdk/src/color.hg            |    2 ++
 gtk/src/cellrenderer.hg     |    1 +
 gtk/src/cellrenderertext.hg |    2 ++
 gtk/src/cellview.hg         |    1 +
 gtk/src/colorbutton.hg      |    3 ++-
 gtk/src/settings.hg         |    2 +-
 gtk/src/texttag.hg          |    1 +
 8 files changed, 24 insertions(+), 2 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index ebd5619..31ece64 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+2010-12-07  Murray Cumming  <murrayc murrayc com>
+
+	Added properties using Gdk::RGBA.
+
+	* gdk/src/color.hg:
+	* gtk/src/cellrenderer.hg:
+	* gtk/src/cellrenderertext.hg:
+	* gtk/src/cellview.hg:
+	* gtk/src/colorbutton.hg:
+	* gtk/src/texttag.hg: Added the new properties that take a Gdk::RGBA instead 
+	of Gdk::Color. We can remove Gdk::Color when it has been deprecated in 
+	GTK+ 3:
+	https://bugzilla.gnome.org/show_bug.cgi?id=636695
+
 2010-12-07  Murray Cumming  <murrayc murrayc com>>
 
 	Fix Gdk::RGBA and fix the demos build (make check)
diff --git a/gdk/src/color.hg b/gdk/src/color.hg
index 4d6d333..50384a3 100644
--- a/gdk/src/color.hg
+++ b/gdk/src/color.hg
@@ -30,6 +30,8 @@ namespace Gdk
 
 class Colormap;
 
+//TODO: Deprecate this? https://bugzilla.gnome.org/show_bug.cgi?id=636695
+
 /** Gdk::Color is used to describe an allocated or unallocated color.
  * It contains the following data:
  *   pixel: For allocated colors, the value used to draw this color on the screen.
diff --git a/gtk/src/cellrenderer.hg b/gtk/src/cellrenderer.hg
index a9e31d5..8813131 100644
--- a/gtk/src/cellrenderer.hg
+++ b/gtk/src/cellrenderer.hg
@@ -142,6 +142,7 @@ public:
   _WRAP_PROPERTY("is-expanded", bool)
   _WRAP_PROPERTY("cell-background", Glib::ustring)
   _WRAP_PROPERTY("cell-background-gdk", Gdk::Color)
+  _WRAP_PROPERTY("cell-background-rgba", Gdk::RGBA)
   _WRAP_PROPERTY("cell-background-set", bool)
   _WRAP_PROPERTY("editing", bool)
 
diff --git a/gtk/src/cellrenderertext.hg b/gtk/src/cellrenderertext.hg
index e40c8b0..975fa30 100644
--- a/gtk/src/cellrenderertext.hg
+++ b/gtk/src/cellrenderertext.hg
@@ -49,6 +49,8 @@ public:
   _WRAP_PROPERTY("foreground", Glib::ustring)
   _WRAP_PROPERTY("background-gdk", Gdk::Color)
   _WRAP_PROPERTY("foreground-gdk", Gdk::Color)
+  _WRAP_PROPERTY("background-rgba", Gdk::RGBA)
+  _WRAP_PROPERTY("foreground-rgba", Gdk::RGBA)
   _WRAP_PROPERTY("font", Glib::ustring)
   _WRAP_PROPERTY("font-desc", Pango::FontDescription)
   _WRAP_PROPERTY("family", Glib::ustring)
diff --git a/gtk/src/cellview.hg b/gtk/src/cellview.hg
index 438331b..3599d49 100644
--- a/gtk/src/cellview.hg
+++ b/gtk/src/cellview.hg
@@ -95,6 +95,7 @@ public:
 
   _WRAP_PROPERTY("background", Glib::ustring)
   _WRAP_PROPERTY("background-gdk", Gdk::Color)
+  _WRAP_PROPERTY("background-rgba", Gdk::RGBA)
   _WRAP_PROPERTY("background-set", bool)
   _WRAP_PROPERTY("model", Glib::RefPtr<TreeModel>)
 };
diff --git a/gtk/src/colorbutton.hg b/gtk/src/colorbutton.hg
index 560852b..7b0c812 100644
--- a/gtk/src/colorbutton.hg
+++ b/gtk/src/colorbutton.hg
@@ -116,7 +116,8 @@ public:
   _WRAP_PROPERTY("use-alpha", bool)
   _WRAP_PROPERTY("title", Glib::ustring)
   _WRAP_PROPERTY("color", Gdk::Color)
-  _WRAP_PROPERTY("alpha", guint16)
+  _WRAP_PROPERTY("rgba", Gdk::RGBA)
+  _WRAP_PROPERTY("alpha", guint16) //Todo: Remove thsi when we remove the "color" property too.
 
   /** The color_set signal is emitted when the user selects a color. When handling this signal,
    * use get_color() and get_alpha() to find out which color
diff --git a/gtk/src/settings.hg b/gtk/src/settings.hg
index 08b10eb..4de0553 100644
--- a/gtk/src/settings.hg
+++ b/gtk/src/settings.hg
@@ -81,7 +81,7 @@ public:
   _WRAP_PROPERTY("gtk-keynav-cursor-only", bool)
   _WRAP_PROPERTY("gtk-keynav-wrap-around", bool)
   _WRAP_PROPERTY("gtk-error-bell", bool)
-  _WRAP_PROPERTY("color-hash", Gdk::Color)
+  _WRAP_PROPERTY("color-hash", Gdk::Color) //This is really a hash table.
   _WRAP_PROPERTY("gtk-file-chooser-backend", Glib::ustring)
   _WRAP_PROPERTY("gtk-print-backends", Glib::ustring)
   _WRAP_PROPERTY("gtk-print-preview-command", Glib::ustring)
diff --git a/gtk/src/texttag.hg b/gtk/src/texttag.hg
index 0ffa459..747f9b5 100644
--- a/gtk/src/texttag.hg
+++ b/gtk/src/texttag.hg
@@ -71,6 +71,7 @@ public:
 
   _WRAP_SIGNAL(bool event(const Glib::RefPtr<Glib::Object>& event_object, GdkEvent* event, const TextIter& iter), "event")
 
+  //TODO: There should be RGBA versions: https://bugzilla.gnome.org/show_bug.cgi?id=636697
   _WRAP_PROPERTY("name", Glib::ustring) //construct-only.
   _WRAP_PROPERTY("background", Glib::ustring)
   _WRAP_PROPERTY("foreground", Glib::ustring)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]