[gtkmm] Gdk::Cursor: Make get_image() and get_surface() const-correct
- From: Kjell Ahlstedt <kjellahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtkmm] Gdk::Cursor: Make get_image() and get_surface() const-correct
- Date: Sun, 4 Jun 2017 16:34:11 +0000 (UTC)
commit 311be91903e789884e7f5718fefecf9d1456b47b
Author: Kjell Ahlstedt <kjellahlstedt gmail com>
Date: Sun Jun 4 18:31:33 2017 +0200
Gdk::Cursor: Make get_image() and get_surface() const-correct
gdk_cursor_get_image() returns a pointer to a newly created GdkPixbuf.
gdk_cursor_get_surface() returns a pointer to a newly created cairo_surface_t.
get_image() and get_surface() can be const methods, and return non-const
Gdk::Pixbuf and Cairo::Surface.
gdk/src/cursor.hg | 12 +++++-------
1 files changed, 5 insertions(+), 7 deletions(-)
---
diff --git a/gdk/src/cursor.hg b/gdk/src/cursor.hg
index bb07a8f..bf6f0fc 100644
--- a/gdk/src/cursor.hg
+++ b/gdk/src/cursor.hg
@@ -56,14 +56,12 @@ public:
_WRAP_METHOD(Glib::RefPtr<Display> get_display(), gdk_cursor_get_display, refreturn)
_WRAP_METHOD(Glib::RefPtr<const Display> get_display() const, gdk_cursor_get_display, refreturn,
constversion)
- _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)
+ // gdk_cursor_get_image() returns a pointer to a newly created GdkPixbuf, or NULL.
+ _WRAP_METHOD(Glib::RefPtr<Gdk::Pixbuf> get_image() const, gdk_cursor_get_image)
- //TODO: Should this always be const?
-#m4 _CONVERSION(`cairo_surface_t*',`::Cairo::RefPtr< ::Cairo::Surface>',`::Cairo::make_refptr_for_instance<
::Cairo::Surface>(new ::Cairo::Surface($3, true /* take reference */))')
-#m4 _CONVERSION(`cairo_surface_t*',`::Cairo::RefPtr<const
::Cairo::Surface>',`::Cairo::make_refptr_for_instance< ::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)
+ // gdk_cursor_get_surface() returns a pointer to a newly created cairo_surface_t, or NULL.
+#m4 _CONVERSION(`cairo_surface_t*',`::Cairo::RefPtr<
::Cairo::Surface>',`::Cairo::make_refptr_for_instance(new ::Cairo::Surface($3, true /* has_reference */))')
+ _WRAP_METHOD(::Cairo::RefPtr< ::Cairo::Surface> get_surface(double& x_hot, double& y_hot) const,
gdk_cursor_get_surface)
_WRAP_METHOD(Type get_cursor_type() const, gdk_cursor_get_cursor_type)
};
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]