diff options
| author | Peter Moulder <peter.moulder@monash.edu> | 2007-09-16 14:42:04 +0000 |
|---|---|---|
| committer | pjrm <pjrm@users.sourceforge.net> | 2007-09-16 14:42:04 +0000 |
| commit | 93174a1f0cc664abab4becd6a74326eb1ee14bd7 (patch) | |
| tree | 3e47a0c51824fc201c9791eff1dbf547125120be | |
| parent | trivial: Address some g++-4.2 writable-strings warnings. (diff) | |
| download | inkscape-93174a1f0cc664abab4becd6a74326eb1ee14bd7.tar.gz inkscape-93174a1f0cc664abab4becd6a74326eb1ee14bd7.zip | |
(struct SPEventContext, sp-cursor.*): Change xpm arguments from gchar** to gchar const *const *.
(bzr r3760)
| -rw-r--r-- | src/event-context.h | 2 | ||||
| -rw-r--r-- | src/sp-cursor.cpp | 10 | ||||
| -rw-r--r-- | src/sp-cursor.h | 4 |
3 files changed, 9 insertions, 7 deletions
diff --git a/src/event-context.h b/src/event-context.h index 05e72c767..8b0b5d128 100644 --- a/src/event-context.h +++ b/src/event-context.h @@ -50,7 +50,7 @@ struct SPEventContext : public GObject { 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 e20e3bf79..3e9c5ef90 100644 --- a/src/sp-cursor.cpp +++ b/src/sp-cursor.cpp @@ -17,7 +17,8 @@ #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; } } @@ -83,7 +84,8 @@ void sp_cursor_bitmap_and_mask_from_xpm (GdkBitmap **bitmap, GdkBitmap **mask, g *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 36468aae8..1c40bdc44 100644 --- a/src/sp-cursor.h +++ b/src/sp-cursor.h @@ -3,8 +3,8 @@ #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 |
