summaryrefslogtreecommitdiffstats
path: root/src/sp-cursor.cpp
diff options
context:
space:
mode:
authorLiam P. White <inkscapebrony@gmail.com>2014-08-31 18:17:26 +0000
committerLiam P. White <inkscapebrony@gmail.com>2014-08-31 18:17:26 +0000
commit1f2d8bc4ce99e970cead4ca96c1859c383a9c043 (patch)
tree07731605bc486145ce5817c5f98a27b0136c7074 /src/sp-cursor.cpp
parentMinor pass of header cleanup (diff)
downloadinkscape-1f2d8bc4ce99e970cead4ca96c1859c383a9c043.tar.gz
inkscape-1f2d8bc4ce99e970cead4ca96c1859c383a9c043.zip
Header cleanup: stop using Glib types where they aren't truly needed. Eases GThread deprecation errors.
(bzr r13341.1.190)
Diffstat (limited to 'src/sp-cursor.cpp')
-rw-r--r--src/sp-cursor.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/sp-cursor.cpp b/src/sp-cursor.cpp
index ea73da00c..16659d1cf 100644
--- a/src/sp-cursor.cpp
+++ b/src/sp-cursor.cpp
@@ -17,13 +17,14 @@
*/
#include <cstring>
+#include <gdk/gdk.h>
#include <map>
#include <sstream>
#include "color.h"
#include "sp-cursor.h"
-static void free_cursor_data(guchar *pixels, gpointer /*data*/) {
+static void free_cursor_data(unsigned char *pixels, void* /*data*/) {
delete [] reinterpret_cast<guint32*>(pixels);
}
@@ -53,7 +54,7 @@ struct RGBA {
}
};
-GdkPixbuf *sp_cursor_pixbuf_from_xpm(gchar const *const *xpm, GdkColor const& black, GdkColor const& white, guint32 fill, guint32 stroke)
+GdkPixbuf *sp_cursor_pixbuf_from_xpm(char const *const *xpm, GdkColor const& black, GdkColor const& white, guint32 fill, guint32 stroke)
{
int height = 0;
int width = 0;
@@ -72,7 +73,7 @@ GdkPixbuf *sp_cursor_pixbuf_from_xpm(gchar const *const *xpm, GdkColor const& bl
char const *p = xpm[1 + i];
g_assert(*p >=0);
- guchar const ccode = (guchar) *p;
+ unsigned char const ccode = (guchar) *p;
p++;
while (isspace(*p)) {
@@ -110,7 +111,7 @@ GdkPixbuf *sp_cursor_pixbuf_from_xpm(gchar const *const *xpm, GdkColor const& bl
return gdk_pixbuf_new_from_data(reinterpret_cast<guchar*>(pixmap_buffer), GDK_COLORSPACE_RGB, TRUE, 8, width, height, width * sizeof(guint32), free_cursor_data, NULL);
}
-GdkCursor *sp_cursor_new_from_xpm(gchar const *const *xpm, gint hot_x, gint hot_y)
+GdkCursor *sp_cursor_new_from_xpm(char const *const *xpm, int hot_x, int hot_y)
{
GdkCursor *cursor = 0;
GdkPixbuf *pixbuf = gdk_pixbuf_new_from_xpm_data((const gchar **)xpm);