summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 8403c6d)
raw | patch | inline | side by side (parent: 8403c6d)
author | pjrm <pjrm@users.sourceforge.net> | |
Sun, 16 Sep 2007 14:42:04 +0000 (14:42 +0000) | ||
committer | pjrm <pjrm@users.sourceforge.net> | |
Sun, 16 Sep 2007 14:42:04 +0000 (14:42 +0000) |
src/event-context.h | patch | blob | history | |
src/sp-cursor.cpp | patch | blob | history | |
src/sp-cursor.h | patch | blob | history |
diff --git a/src/event-context.h b/src/event-context.h
index 05e72c76767c0ab845b4629882ea7c396daf8937..8b0b5d128b083045f40b5a8134fc7491ee0852ba 100644 (file)
--- a/src/event-context.h
+++ b/src/event-context.h
unsigned key;
SPDesktop *desktop;
Inkscape::XML::Node *prefs_repr;
- gchar **cursor_shape;
+ gchar const *const *cursor_shape;
gint hot_x, hot_y;
GdkCursor *cursor;
diff --git a/src/sp-cursor.cpp b/src/sp-cursor.cpp
index e20e3bf7996c5473e3d434b0bdc587c7dbe75237..3e9c5ef904060f9cb93ffc3986059e442cbbb5ff 100644 (file)
--- a/src/sp-cursor.cpp
+++ b/src/sp-cursor.cpp
#include <ctype.h>
#include "sp-cursor.h"
-void sp_cursor_bitmap_and_mask_from_xpm (GdkBitmap **bitmap, GdkBitmap **mask, gchar **xpm)
+void
+sp_cursor_bitmap_and_mask_from_xpm(GdkBitmap **bitmap, GdkBitmap **mask, gchar const *const *xpm)
{
int height;
int width;
@@ -65,10 +66,10 @@ void sp_cursor_bitmap_and_mask_from_xpm (GdkBitmap **bitmap, GdkBitmap **mask, g
char maskv = 0;
for (int pix = 0; pix < 8; pix++, x++){
- if (xpm [4+y][x] != transparent_color) {
+ if (xpm[4+y][x] != transparent_color) {
maskv |= 1 << pix;
- if (xpm [4+y][x] == black_color) {
+ if (xpm[4+y][x] == black_color) {
value |= 1 << pix;
}
}
*mask = gdk_bitmap_create_from_data(NULL, mask_buffer, 32, 32);
}
-GdkCursor *sp_cursor_new_from_xpm (gchar **xpm, gint hot_x, gint hot_y)
+GdkCursor *
+sp_cursor_new_from_xpm(gchar const *const *xpm, gint hot_x, gint hot_y)
{
GdkColor const fg = { 0, 0, 0, 0 };
GdkColor const bg = { 0, 65535, 65535, 65535 };
diff --git a/src/sp-cursor.h b/src/sp-cursor.h
index 36468aae89b48258a5dfd3028ef7bc0f1c4d2326..1c40bdc44d053ff1306d7d912e2bbed58ecd1a9d 100644 (file)
--- a/src/sp-cursor.h
+++ b/src/sp-cursor.h
#include <gdk/gdk.h>
-void sp_cursor_bitmap_and_mask_from_xpm(GdkBitmap **bitmap, GdkBitmap **mask, gchar **xpm);
-GdkCursor *sp_cursor_new_from_xpm(gchar **xpm, gint hot_x, gint hot_y);
+void sp_cursor_bitmap_and_mask_from_xpm(GdkBitmap **bitmap, GdkBitmap **mask, gchar const *const *xpm);
+GdkCursor *sp_cursor_new_from_xpm(gchar const *const *xpm, gint hot_x, gint hot_y);
#endif