[gtkmm] Gdk: Cursor: Wrap some new functions.
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtkmm] Gdk: Cursor: Wrap some new functions.
- Date: Wed, 28 Aug 2013 10:56:19 +0000 (UTC)
commit a651d4c2ca025de4cc2c8600f24f04e6a88d352b
Author: Murray Cumming <murrayc murrayc com>
Date: Wed Aug 28 12:36:26 2013 +0200
Gdk: Cursor: Wrap some new functions.
* gdk/src/cursor.hg: Add create() that takes a Surface,
and get_surface().
gdk/src/cursor.hg | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/gdk/src/cursor.hg b/gdk/src/cursor.hg
index 244a794..8d081a7 100644
--- a/gdk/src/cursor.hg
+++ b/gdk/src/cursor.hg
@@ -51,6 +51,10 @@ public:
_WRAP_METHOD(static Glib::RefPtr<Cursor> create(CursorType cursor_type), gdk_cursor_new)
_WRAP_METHOD(static Glib::RefPtr<Cursor> create(const Glib::RefPtr<Display>& display, CursorType
cursor_type), gdk_cursor_new_for_display)
_WRAP_METHOD(static Glib::RefPtr<Cursor> create(const Glib::RefPtr<Display>& display, const
Glib::RefPtr<Pixbuf>& pixbuf, int x, int y), gdk_cursor_new_from_pixbuf)
+
+#m4 _CONVERSION(`const ::Cairo::RefPtr< ::Cairo::Surface>&',`cairo_surface_t*',`($3) ?
const_cast<cairo_surface_t*>(($3)->cobj()) : 0')
+ _WRAP_METHOD(static Glib::RefPtr<Cursor> create(const Glib::RefPtr<Display>& display, const
::Cairo::RefPtr< ::Cairo::Surface>& surface, double x, double y), gdk_cursor_new_from_surface)
+
_WRAP_METHOD(static Glib::RefPtr<Cursor> create(const Glib::RefPtr<Display>& display, const Glib::ustring&
name), gdk_cursor_new_from_name)
_WRAP_METHOD(Glib::RefPtr<Display> get_display(), gdk_cursor_get_display, refreturn)
@@ -59,6 +63,12 @@ public:
_WRAP_METHOD(Glib::RefPtr<Gdk::Pixbuf> get_image(), gdk_cursor_get_image)
_WRAP_METHOD(Glib::RefPtr<const Gdk::Pixbuf> get_image() const, gdk_cursor_get_image, constversion)
+ //TODO: Should this always be const?
+#m4 _CONVERSION(`cairo_surface_t*',`Cairo::RefPtr<Cairo::Surface>',`Cairo::RefPtr<Cairo::Surface>(new
Cairo::Surface($3, true /* take reference */))')
+#m4 _CONVERSION(`cairo_surface_t*',`Cairo::RefPtr<const Cairo::Surface>',`Cairo::RefPtr<Cairo::Surface>(new
Cairo::Surface($3, true /* take reference */))')
+ _WRAP_METHOD(Cairo::RefPtr<Cairo::Surface> get_surface(double& x_hot, double& y_hot),
gdk_cursor_get_surface)
+ _WRAP_METHOD(Cairo::RefPtr<const Cairo::Surface> get_surface(double& x_hot, double& y_hot) const,
gdk_cursor_get_surface, constversion)
+
_WRAP_METHOD(CursorType get_cursor_type() const, gdk_cursor_get_cursor_type)
};
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]