[gtkmm] Fix the build with latest GTK+ 3.
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtkmm] Fix the build with latest GTK+ 3.
- Date: Mon, 29 Nov 2010 09:46:11 +0000 (UTC)
commit 93be43a0dcb399482f4dbe3e4f3ad6b1c7469a78
Author: Murray Cumming <murrayc murrayc com>
Date: Mon Nov 29 10:45:55 2010 +0100
Fix the build with latest GTK+ 3.
* gdk/src/gdk_methods.defs: Regenerated with h2defs.py.
* gdk/src/device.hg: get_n_axes() now returns an int instead of a guint.
* gdk/src/rgba.[hg|ccg]: gdk_rgba_parse() now has a sensible parameter order,
so we can now use _WRAP_METHOD() instead of hard-coding it.
ChangeLog | 9 +++++++++
gdk/src/device.hg | 2 +-
gdk/src/gdk_methods.defs | 19 ++++++++++++++++---
gdk/src/rgba.ccg | 5 -----
gdk/src/rgba.hg | 9 +--------
5 files changed, 27 insertions(+), 17 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index fc04297..eb1df1b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,14 @@
2010-11-29 Murray Cumming <murrayc murrayc com>
+ Fix the build with latest GTK+ 3.
+
+ * gdk/src/gdk_methods.defs: Regenerated with h2defs.py.
+ * gdk/src/device.hg: get_n_axes() now returns an int instead of a guint.
+ * gdk/src/rgba.[hg|ccg]: gdk_rgba_parse() now has a sensible parameter order,
+ so we can now use _WRAP_METHOD() instead of hard-coding it.
+
+2010-11-29 Murray Cumming <murrayc murrayc com>
+
Scrollable, ScrolledWindow: Fix Adjustment reference counting.
* gtk/src/scrollable.hg:get_hadjustment(), get_vadjustment():
diff --git a/gdk/src/device.hg b/gdk/src/device.hg
index 86f4271..4b5ec29 100644
--- a/gdk/src/device.hg
+++ b/gdk/src/device.hg
@@ -64,7 +64,7 @@ public:
//TODO: Return a list instead because this is ugly and C-like:
_WRAP_METHOD(bool get_history(const Glib::RefPtr<Window>& window, guint32 start, guint32 stop, GdkTimeCoord**& events, int& n_events), gdk_device_get_history)
- _WRAP_METHOD(guint get_n_axes() const, gdk_device_get_n_axes)
+ _WRAP_METHOD(int get_n_axes() const, gdk_device_get_n_axes)
//TODO: A list of GdkAtom, which we should show as strings: _WRAP_METHOD(GList * gdk_device_list_axes () const, gdk_device_list_axes)
//TODO: Use a string instead of a GdkAtom:
diff --git a/gdk/src/gdk_methods.defs b/gdk/src/gdk_methods.defs
index 5f1fe34..c689d2c 100644
--- a/gdk/src/gdk_methods.defs
+++ b/gdk/src/gdk_methods.defs
@@ -14,6 +14,13 @@
(gtype-id "GDK_TYPE_DISPLAY")
)
+(define-object DisplayManager
+ (in-module "Gdk")
+ (parent "GObject")
+ (c-name "GdkDisplayManager")
+ (gtype-id "GDK_TYPE_DISPLAY_MANAGER")
+)
+
(define-object DragContext
(in-module "Gdk")
(parent "GObject")
@@ -911,6 +918,12 @@
)
)
+(define-method get_n_keys
+ (of-object "GdkDevice")
+ (c-name "gdk_device_get_n_keys")
+ (return-type "gint")
+)
+
(define-method get_key
(of-object "GdkDevice")
(c-name "gdk_device_get_key")
@@ -988,7 +1001,7 @@
(define-method get_n_axes
(of-object "GdkDevice")
(c-name "gdk_device_get_n_axes")
- (return-type "guint")
+ (return-type "gint")
)
(define-method list_axes
@@ -2915,12 +2928,12 @@
(return-type "none")
)
-(define-function gdk_rgba_parse
+(define-method parse
+ (of-object "GdkRGBA")
(c-name "gdk_rgba_parse")
(return-type "gboolean")
(parameters
'("const-gchar*" "spec")
- '("GdkRGBA*" "rgba")
)
)
diff --git a/gdk/src/rgba.ccg b/gdk/src/rgba.ccg
index 5ad8545..6d72b13 100644
--- a/gdk/src/rgba.ccg
+++ b/gdk/src/rgba.ccg
@@ -136,11 +136,6 @@ void RGBA::set_hsl(double h, double s, double l)
}
}
-bool RGBA::set(const Glib::ustring& value)
-{
- return gdk_rgba_parse(value.c_str(), gobj());
-}
-
gushort RGBA::get_red() const
{
return gobject_->red;
diff --git a/gdk/src/rgba.hg b/gdk/src/rgba.hg
index 5aa0120..4b15422 100644
--- a/gdk/src/rgba.hg
+++ b/gdk/src/rgba.hg
@@ -67,14 +67,7 @@ public:
void set_hsv(double h, double s, double v);
void set_hsl(double h, double s, double l);
- /** Parses a textual specification of a color and fills in the red, green, and blue values.
- * The text string can be in any of the forms accepted by XParseRGBA; these include names for a color from rgb.txt,
- * such as DarkSlateGray, or a hex specification such as 305050.
- *
- * @param value the string specifying the color.
- * @result true if the parsing succeeded.
- */
- bool set(const Glib::ustring& value);
+ _WRAP_METHOD(bool set(const Glib::ustring& value), gdk_rgba_parse)
/** Get the red component of the color.
* @result The red component of the color.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]