[gimp] app: get rid of using gdk_draw to construct bitmap cursors
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: get rid of using gdk_draw to construct bitmap cursors
- Date: Fri, 10 Sep 2010 17:15:56 +0000 (UTC)
commit 7f9a4d51f742df8446dc17adca9859837ed5ed72
Author: Michael Natterer <mitch gimp org>
Date: Fri Sep 10 19:12:52 2010 +0200
app: get rid of using gdk_draw to construct bitmap cursors
At the same time, get rid of bitmap cursors alltogether. Instead
(because it looks ugly to have GDK convert RGBA cursors into bitmaps
for old X servers), add the bitmaps as proper PNGs and simply use them
as RGBA cursors.
app/widgets/gimpcursor.c | 792 +++++------------------
cursors/Makefile.am | 317 ++++------
cursors/cursor-bad-bw.png | Bin 0 -> 211 bytes
cursors/cursor-color-picker-bw.png | Bin 0 -> 222 bytes
cursors/cursor-corner-bottom-left-bw.png | Bin 0 -> 198 bytes
cursors/cursor-corner-bottom-right-bw.png | Bin 0 -> 158 bytes
cursors/cursor-corner-top-left-bw.png | Bin 0 -> 268 bytes
cursors/cursor-corner-top-right-bw.png | Bin 0 -> 207 bytes
cursors/cursor-crosshair-bw.png | Bin 0 -> 156 bytes
cursors/cursor-crosshair-small-bw.png | Bin 0 -> 146 bytes
cursors/cursor-mouse-bw.png | Bin 0 -> 180 bytes
cursors/cursor-move-bw.png | Bin 0 -> 196 bytes
cursors/cursor-none-bw.png | Bin 0 -> 96 bytes
cursors/cursor-side-bottom-bw.png | Bin 0 -> 166 bytes
cursors/cursor-side-left-bw.png | Bin 0 -> 181 bytes
cursors/cursor-side-right-bw.png | Bin 0 -> 182 bytes
cursors/cursor-side-top-bw.png | Bin 0 -> 171 bytes
cursors/cursor-zoom-bw.png | Bin 0 -> 203 bytes
cursors/tool-airbrush-bw.png | Bin 0 -> 220 bytes
cursors/tool-blend-bw.png | Bin 0 -> 179 bytes
cursors/tool-blur-bw.png | Bin 0 -> 204 bytes
cursors/tool-bucket-fill-bw.png | Bin 0 -> 214 bytes
cursors/tool-burn-bw.png | Bin 0 -> 189 bytes
cursors/tool-clone-bw.png | Bin 0 -> 207 bytes
cursors/tool-color-picker-bw.png | Bin 0 -> 213 bytes
cursors/tool-crop-bw.png | Bin 0 -> 184 bytes
cursors/tool-dodge-bw.png | Bin 0 -> 189 bytes
cursors/tool-ellipse-select-bw.png | Bin 0 -> 188 bytes
cursors/tool-eraser-bw.png | Bin 0 -> 190 bytes
cursors/tool-flip-horizontal-bw.png | Bin 0 -> 155 bytes
cursors/tool-flip-vertical-bw.png | Bin 0 -> 174 bytes
cursors/tool-free-select-bw.png | Bin 0 -> 210 bytes
cursors/tool-fuzzy-select-bw.png | Bin 0 -> 227 bytes
cursors/tool-hand-bw.png | Bin 0 -> 218 bytes
cursors/tool-heal-bw.png | Bin 0 -> 883 bytes
cursors/tool-ink-bw.png | Bin 0 -> 238 bytes
cursors/tool-iscissors-bw.png | Bin 0 -> 245 bytes
cursors/tool-measure-bw.png | Bin 0 -> 206 bytes
cursors/tool-move-bw.png | Bin 0 -> 192 bytes
cursors/tool-paintbrush-bw.png | Bin 0 -> 206 bytes
cursors/tool-paths-anchor-bw.png | Bin 0 -> 245 bytes
cursors/tool-paths-bw.png | Bin 0 -> 241 bytes
cursors/tool-paths-control-bw.png | Bin 0 -> 256 bytes
cursors/tool-paths-segment-bw.png | Bin 0 -> 258 bytes
cursors/tool-pencil-bw.png | Bin 0 -> 165 bytes
cursors/tool-perspective-bw.png | Bin 0 -> 174 bytes
cursors/tool-polygon-select-bw.png | Bin 0 -> 219 bytes
cursors/tool-rect-select-bw.png | Bin 0 -> 172 bytes
cursors/tool-resize-bw.png | Bin 0 -> 193 bytes
cursors/tool-rotate-bw.png | Bin 0 -> 255 bytes
cursors/tool-shear-bw.png | Bin 0 -> 173 bytes
cursors/tool-smudge-bw.png | Bin 0 -> 236 bytes
cursors/tool-text-bw.png | Bin 0 -> 191 bytes
cursors/tool-zoom-bw.png | Bin 0 -> 190 bytes
cursors/xbm/cursor-bad-mask.xbm | 17 -
cursors/xbm/cursor-bad.xbm | 17 -
cursors/xbm/cursor-color-picker-mask.xbm | 16 -
cursors/xbm/cursor-color-picker.xbm | 16 -
cursors/xbm/cursor-corner-bottom-left-mask.xbm | 16 -
cursors/xbm/cursor-corner-bottom-left.xbm | 16 -
cursors/xbm/cursor-corner-bottom-right-mask.xbm | 16 -
cursors/xbm/cursor-corner-bottom-right.xbm | 16 -
cursors/xbm/cursor-corner-top-left-mask.xbm | 16 -
cursors/xbm/cursor-corner-top-left.xbm | 16 -
cursors/xbm/cursor-corner-top-right-mask.xbm | 16 -
cursors/xbm/cursor-corner-top-right.xbm | 16 -
cursors/xbm/cursor-crosshair-mask.xbm | 17 -
cursors/xbm/cursor-crosshair-small-mask.xbm | 17 -
cursors/xbm/cursor-crosshair-small.xbm | 17 -
cursors/xbm/cursor-crosshair.xbm | 17 -
cursors/xbm/cursor-mouse-mask.xbm | 17 -
cursors/xbm/cursor-mouse.xbm | 17 -
cursors/xbm/cursor-move-mask.xbm | 16 -
cursors/xbm/cursor-move.xbm | 16 -
cursors/xbm/cursor-none.xbm | 16 -
cursors/xbm/cursor-side-bottom-mask.xbm | 16 -
cursors/xbm/cursor-side-bottom.xbm | 16 -
cursors/xbm/cursor-side-left-mask.xbm | 16 -
cursors/xbm/cursor-side-left.xbm | 16 -
cursors/xbm/cursor-side-right-mask.xbm | 16 -
cursors/xbm/cursor-side-right.xbm | 16 -
cursors/xbm/cursor-side-top-mask.xbm | 16 -
cursors/xbm/cursor-side-top.xbm | 16 -
cursors/xbm/cursor-zoom-mask.xbm | 17 -
cursors/xbm/cursor-zoom.xbm | 17 -
cursors/xbm/modifier-anchor-mask.xbm | 15 -
cursors/xbm/modifier-anchor.xbm | 15 -
cursors/xbm/modifier-background-mask.xbm | 14 -
cursors/xbm/modifier-background.xbm | 14 -
cursors/xbm/modifier-bad-mask.xbm | 14 -
cursors/xbm/modifier-bad.xbm | 14 -
cursors/xbm/modifier-control-mask.xbm | 15 -
cursors/xbm/modifier-control.xbm | 15 -
cursors/xbm/modifier-foreground-mask.xbm | 14 -
cursors/xbm/modifier-foreground.xbm | 14 -
cursors/xbm/modifier-intersect-mask.xbm | 15 -
cursors/xbm/modifier-intersect.xbm | 15 -
cursors/xbm/modifier-join-mask.xbm | 14 -
cursors/xbm/modifier-join.xbm | 14 -
cursors/xbm/modifier-minus-mask.xbm | 15 -
cursors/xbm/modifier-minus.xbm | 15 -
cursors/xbm/modifier-move-mask.xbm | 15 -
cursors/xbm/modifier-move.xbm | 15 -
cursors/xbm/modifier-pattern-mask.xbm | 14 -
cursors/xbm/modifier-pattern.xbm | 14 -
cursors/xbm/modifier-plus-mask.xbm | 15 -
cursors/xbm/modifier-plus.xbm | 15 -
cursors/xbm/modifier-resize-mask.xbm | 15 -
cursors/xbm/modifier-resize.xbm | 15 -
cursors/xbm/modifier-select-mask.xbm | 14 -
cursors/xbm/modifier-select.xbm | 14 -
cursors/xbm/tool-airbrush-mask.xbm | 14 -
cursors/xbm/tool-airbrush.xbm | 14 -
cursors/xbm/tool-blend-mask.xbm | 14 -
cursors/xbm/tool-blend.xbm | 14 -
cursors/xbm/tool-blur-mask.xbm | 14 -
cursors/xbm/tool-blur.xbm | 14 -
cursors/xbm/tool-bucket-fill-mask.xbm | 14 -
cursors/xbm/tool-bucket-fill.xbm | 14 -
cursors/xbm/tool-burn-mask.xbm | 14 -
cursors/xbm/tool-burn.xbm | 14 -
cursors/xbm/tool-clone-mask.xbm | 14 -
cursors/xbm/tool-clone.xbm | 14 -
cursors/xbm/tool-color-picker-mask.xbm | 14 -
cursors/xbm/tool-color-picker.xbm | 14 -
cursors/xbm/tool-crop-mask.xbm | 14 -
cursors/xbm/tool-crop.xbm | 14 -
cursors/xbm/tool-dodge-mask.xbm | 14 -
cursors/xbm/tool-dodge.xbm | 14 -
cursors/xbm/tool-ellipse-select-mask.xbm | 14 -
cursors/xbm/tool-ellipse-select.xbm | 14 -
cursors/xbm/tool-eraser-mask.xbm | 14 -
cursors/xbm/tool-eraser.xbm | 14 -
cursors/xbm/tool-flip-horizontal-mask.xbm | 14 -
cursors/xbm/tool-flip-horizontal.xbm | 14 -
cursors/xbm/tool-flip-vertical-mask.xbm | 14 -
cursors/xbm/tool-flip-vertical.xbm | 14 -
cursors/xbm/tool-free-select-mask.xbm | 14 -
cursors/xbm/tool-free-select.xbm | 14 -
cursors/xbm/tool-fuzzy-select-mask.xbm | 14 -
cursors/xbm/tool-fuzzy-select.xbm | 14 -
cursors/xbm/tool-hand-mask.xbm | 14 -
cursors/xbm/tool-hand.xbm | 14 -
cursors/xbm/tool-heal-mask.xbm | 14 -
cursors/xbm/tool-heal.xbm | 14 -
cursors/xbm/tool-ink-mask.xbm | 14 -
cursors/xbm/tool-ink.xbm | 14 -
cursors/xbm/tool-iscissors-mask.xbm | 14 -
cursors/xbm/tool-iscissors.xbm | 14 -
cursors/xbm/tool-measure-mask.xbm | 14 -
cursors/xbm/tool-measure.xbm | 14 -
cursors/xbm/tool-move-mask.xbm | 14 -
cursors/xbm/tool-move.xbm | 14 -
cursors/xbm/tool-paintbrush-mask.xbm | 14 -
cursors/xbm/tool-paintbrush.xbm | 14 -
cursors/xbm/tool-paths-anchor-mask.xbm | 14 -
cursors/xbm/tool-paths-anchor.xbm | 14 -
cursors/xbm/tool-paths-control-mask.xbm | 14 -
cursors/xbm/tool-paths-control.xbm | 14 -
cursors/xbm/tool-paths-mask.xbm | 14 -
cursors/xbm/tool-paths-segment-mask.xbm | 14 -
cursors/xbm/tool-paths-segment.xbm | 14 -
cursors/xbm/tool-paths.xbm | 14 -
cursors/xbm/tool-pencil-mask.xbm | 14 -
cursors/xbm/tool-pencil.xbm | 14 -
cursors/xbm/tool-perspective-mask.xbm | 14 -
cursors/xbm/tool-perspective.xbm | 14 -
cursors/xbm/tool-polygon-select-mask.xbm | 14 -
cursors/xbm/tool-polygon-select.xbm | 14 -
cursors/xbm/tool-rect-select-mask.xbm | 14 -
cursors/xbm/tool-rect-select.xbm | 14 -
cursors/xbm/tool-resize-mask.xbm | 14 -
cursors/xbm/tool-resize.xbm | 14 -
cursors/xbm/tool-rotate-mask.xbm | 14 -
cursors/xbm/tool-rotate.xbm | 14 -
cursors/xbm/tool-shear-mask.xbm | 14 -
cursors/xbm/tool-shear.xbm | 14 -
cursors/xbm/tool-smudge-mask.xbm | 14 -
cursors/xbm/tool-smudge.xbm | 14 -
cursors/xbm/tool-text-mask.xbm | 14 -
cursors/xbm/tool-text.xbm | 14 -
cursors/xbm/tool-zoom-mask.xbm | 14 -
cursors/xbm/tool-zoom.xbm | 14 -
183 files changed, 291 insertions(+), 2710 deletions(-)
---
diff --git a/app/widgets/gimpcursor.c b/app/widgets/gimpcursor.c
index b82adad..e2170b1 100644
--- a/app/widgets/gimpcursor.c
+++ b/app/widgets/gimpcursor.c
@@ -25,155 +25,51 @@
#include "cursors/gimp-tool-cursors.h"
-/* standard gimp cursors */
-#include "cursors/xbm/cursor-none.xbm"
-#include "cursors/xbm/cursor-mouse.xbm"
-#include "cursors/xbm/cursor-mouse-mask.xbm"
-#include "cursors/xbm/cursor-move.xbm"
-#include "cursors/xbm/cursor-move-mask.xbm"
-#include "cursors/xbm/cursor-crosshair.xbm"
-#include "cursors/xbm/cursor-crosshair-mask.xbm"
-#include "cursors/xbm/cursor-crosshair-small.xbm"
-#include "cursors/xbm/cursor-crosshair-small-mask.xbm"
-#include "cursors/xbm/cursor-bad.xbm"
-#include "cursors/xbm/cursor-bad-mask.xbm"
-#include "cursors/xbm/cursor-zoom.xbm"
-#include "cursors/xbm/cursor-zoom-mask.xbm"
-#include "cursors/xbm/cursor-color-picker.xbm"
-#include "cursors/xbm/cursor-color-picker-mask.xbm"
-#include "cursors/xbm/cursor-corner-top-left.xbm"
-#include "cursors/xbm/cursor-corner-top-left-mask.xbm"
-#include "cursors/xbm/cursor-corner-top-right.xbm"
-#include "cursors/xbm/cursor-corner-top-right-mask.xbm"
-#include "cursors/xbm/cursor-corner-bottom-left.xbm"
-#include "cursors/xbm/cursor-corner-bottom-left-mask.xbm"
-#include "cursors/xbm/cursor-corner-bottom-right.xbm"
-#include "cursors/xbm/cursor-corner-bottom-right-mask.xbm"
-#include "cursors/xbm/cursor-side-top.xbm"
-#include "cursors/xbm/cursor-side-top-mask.xbm"
-#include "cursors/xbm/cursor-side-left.xbm"
-#include "cursors/xbm/cursor-side-left-mask.xbm"
-#include "cursors/xbm/cursor-side-right.xbm"
-#include "cursors/xbm/cursor-side-right-mask.xbm"
-#include "cursors/xbm/cursor-side-bottom.xbm"
-#include "cursors/xbm/cursor-side-bottom-mask.xbm"
-
-/* tool cursors */
-#include "cursors/xbm/tool-rect-select.xbm"
-#include "cursors/xbm/tool-rect-select-mask.xbm"
-#include "cursors/xbm/tool-ellipse-select.xbm"
-#include "cursors/xbm/tool-ellipse-select-mask.xbm"
-#include "cursors/xbm/tool-free-select.xbm"
-#include "cursors/xbm/tool-free-select-mask.xbm"
-#include "cursors/xbm/tool-polygon-select.xbm"
-#include "cursors/xbm/tool-polygon-select-mask.xbm"
-#include "cursors/xbm/tool-fuzzy-select.xbm"
-#include "cursors/xbm/tool-fuzzy-select-mask.xbm"
-#include "cursors/xbm/tool-paths.xbm"
-#include "cursors/xbm/tool-paths-mask.xbm"
-#include "cursors/xbm/tool-paths-anchor.xbm"
-#include "cursors/xbm/tool-paths-anchor-mask.xbm"
-#include "cursors/xbm/tool-paths-control.xbm"
-#include "cursors/xbm/tool-paths-control-mask.xbm"
-#include "cursors/xbm/tool-paths-segment.xbm"
-#include "cursors/xbm/tool-paths-segment-mask.xbm"
-#include "cursors/xbm/tool-iscissors.xbm"
-#include "cursors/xbm/tool-iscissors-mask.xbm"
-#include "cursors/xbm/tool-move.xbm"
-#include "cursors/xbm/tool-move-mask.xbm"
-#include "cursors/xbm/tool-zoom.xbm"
-#include "cursors/xbm/tool-zoom-mask.xbm"
-#include "cursors/xbm/tool-crop.xbm"
-#include "cursors/xbm/tool-crop-mask.xbm"
-#include "cursors/xbm/tool-resize.xbm"
-#include "cursors/xbm/tool-resize-mask.xbm"
-#include "cursors/xbm/tool-rotate.xbm"
-#include "cursors/xbm/tool-rotate-mask.xbm"
-#include "cursors/xbm/tool-shear.xbm"
-#include "cursors/xbm/tool-shear-mask.xbm"
-#include "cursors/xbm/tool-perspective.xbm"
-#include "cursors/xbm/tool-perspective-mask.xbm"
-#include "cursors/xbm/tool-flip-horizontal.xbm"
-#include "cursors/xbm/tool-flip-horizontal-mask.xbm"
-#include "cursors/xbm/tool-flip-vertical.xbm"
-#include "cursors/xbm/tool-flip-vertical-mask.xbm"
-#include "cursors/xbm/tool-text.xbm"
-#include "cursors/xbm/tool-text-mask.xbm"
-#include "cursors/xbm/tool-color-picker.xbm"
-#include "cursors/xbm/tool-color-picker-mask.xbm"
-#include "cursors/xbm/tool-bucket-fill.xbm"
-#include "cursors/xbm/tool-bucket-fill-mask.xbm"
-#include "cursors/xbm/tool-blend.xbm"
-#include "cursors/xbm/tool-blend-mask.xbm"
-#include "cursors/xbm/tool-pencil.xbm"
-#include "cursors/xbm/tool-pencil-mask.xbm"
-#include "cursors/xbm/tool-paintbrush.xbm"
-#include "cursors/xbm/tool-paintbrush-mask.xbm"
-#include "cursors/xbm/tool-eraser.xbm"
-#include "cursors/xbm/tool-eraser-mask.xbm"
-#include "cursors/xbm/tool-airbrush.xbm"
-#include "cursors/xbm/tool-airbrush-mask.xbm"
-#include "cursors/xbm/tool-clone.xbm"
-#include "cursors/xbm/tool-clone-mask.xbm"
-#include "cursors/xbm/tool-heal.xbm"
-#include "cursors/xbm/tool-heal-mask.xbm"
-#include "cursors/xbm/tool-blur.xbm"
-#include "cursors/xbm/tool-blur-mask.xbm"
-#include "cursors/xbm/tool-ink.xbm"
-#include "cursors/xbm/tool-ink-mask.xbm"
-#include "cursors/xbm/tool-dodge.xbm"
-#include "cursors/xbm/tool-dodge-mask.xbm"
-#include "cursors/xbm/tool-burn.xbm"
-#include "cursors/xbm/tool-burn-mask.xbm"
-#include "cursors/xbm/tool-smudge.xbm"
-#include "cursors/xbm/tool-smudge-mask.xbm"
-#include "cursors/xbm/tool-measure.xbm"
-#include "cursors/xbm/tool-measure-mask.xbm"
-#include "cursors/xbm/tool-hand.xbm"
-#include "cursors/xbm/tool-hand-mask.xbm"
-
-/* cursor modifiers */
-#include "cursors/xbm/modifier-bad.xbm"
-#include "cursors/xbm/modifier-bad-mask.xbm"
-#include "cursors/xbm/modifier-plus.xbm"
-#include "cursors/xbm/modifier-plus-mask.xbm"
-#include "cursors/xbm/modifier-minus.xbm"
-#include "cursors/xbm/modifier-minus-mask.xbm"
-#include "cursors/xbm/modifier-intersect.xbm"
-#include "cursors/xbm/modifier-intersect-mask.xbm"
-#include "cursors/xbm/modifier-move.xbm"
-#include "cursors/xbm/modifier-move-mask.xbm"
-#include "cursors/xbm/modifier-resize.xbm"
-#include "cursors/xbm/modifier-resize-mask.xbm"
-#include "cursors/xbm/modifier-control.xbm"
-#include "cursors/xbm/modifier-control-mask.xbm"
-#include "cursors/xbm/modifier-anchor.xbm"
-#include "cursors/xbm/modifier-anchor-mask.xbm"
-#include "cursors/xbm/modifier-foreground.xbm"
-#include "cursors/xbm/modifier-foreground-mask.xbm"
-#include "cursors/xbm/modifier-background.xbm"
-#include "cursors/xbm/modifier-background-mask.xbm"
-#include "cursors/xbm/modifier-pattern.xbm"
-#include "cursors/xbm/modifier-pattern-mask.xbm"
-#include "cursors/xbm/modifier-join.xbm"
-#include "cursors/xbm/modifier-join-mask.xbm"
-#include "cursors/xbm/modifier-select.xbm"
-#include "cursors/xbm/modifier-select-mask.xbm"
+
+#define cursor_none_x_hot 10
+#define cursor_none_y_hot 10
+#define cursor_mouse_x_hot 3
+#define cursor_mouse_y_hot 2
+#define cursor_crosshair_x_hot 15
+#define cursor_crosshair_y_hot 15
+#define cursor_crosshair_small_x_hot 10
+#define cursor_crosshair_small_y_hot 10
+#define cursor_bad_x_hot 10
+#define cursor_bad_y_hot 10
+#define cursor_move_x_hot 10
+#define cursor_move_y_hot 10
+#define cursor_zoom_x_hot 8
+#define cursor_zoom_y_hot 8
+#define cursor_color_picker_x_hot 1
+#define cursor_color_picker_y_hot 30
+#define cursor_corner_top_left_x_hot 10
+#define cursor_corner_top_left_y_hot 10
+#define cursor_corner_top_right_x_hot 10
+#define cursor_corner_top_right_y_hot 10
+#define cursor_corner_bottom_left_x_hot 10
+#define cursor_corner_bottom_left_y_hot 10
+#define cursor_corner_bottom_right_x_hot 10
+#define cursor_corner_bottom_right_y_hot 10
+#define cursor_side_top_x_hot 10
+#define cursor_side_top_y_hot 10
+#define cursor_side_left_x_hot 10
+#define cursor_side_left_y_hot 10
+#define cursor_side_right_x_hot 10
+#define cursor_side_right_y_hot 10
+#define cursor_side_bottom_x_hot 10
+#define cursor_side_bottom_y_hot 10
typedef struct _GimpCursor GimpCursor;
struct _GimpCursor
{
- const guchar *bits;
- const guchar *mask_bits;
- const gint width, height;
- const gint x_hot, y_hot;
const guint8 *pixbuf_data;
+ const guint8 *pixbuf_data_bw;
+ const gint x_hot, y_hot;
- GdkBitmap *bitmap;
- GdkBitmap *mask;
GdkPixbuf *pixbuf;
+ GdkPixbuf *pixbuf_bw;
};
@@ -182,100 +78,84 @@ static GimpCursor gimp_cursors[] =
/* these have to match up with enum GimpCursorType in widgets-enums.h */
{
- cursor_none_bits, cursor_none_bits,
- cursor_none_width, cursor_none_height,
- cursor_none_x_hot, cursor_none_y_hot,
- cursor_none, NULL, NULL, NULL
+ cursor_none,
+ cursor_none_bw,
+ cursor_none_x_hot, cursor_none_y_hot
},
{
- cursor_mouse_bits, cursor_mouse_mask_bits,
- cursor_mouse_width, cursor_mouse_height,
- cursor_mouse_x_hot, cursor_mouse_y_hot,
- cursor_mouse, NULL, NULL, NULL
+ cursor_mouse,
+ cursor_mouse_bw,
+ cursor_mouse_x_hot, cursor_mouse_y_hot
},
{
- cursor_crosshair_bits, cursor_crosshair_mask_bits,
- cursor_crosshair_width, cursor_crosshair_height,
- cursor_crosshair_x_hot, cursor_crosshair_y_hot,
- cursor_crosshair, NULL, NULL, NULL
+ cursor_crosshair,
+ cursor_crosshair_bw,
+ cursor_crosshair_x_hot, cursor_crosshair_y_hot
},
{
- cursor_crosshair_small_bits, cursor_crosshair_small_mask_bits,
- cursor_crosshair_small_width, cursor_crosshair_small_height,
- cursor_crosshair_small_x_hot, cursor_crosshair_small_y_hot,
- cursor_crosshair_small, NULL, NULL, NULL
+ cursor_crosshair_small,
+ cursor_crosshair_small_bw,
+ cursor_crosshair_small_x_hot, cursor_crosshair_small_y_hot
},
{
- cursor_bad_bits, cursor_bad_mask_bits,
- cursor_bad_width, cursor_bad_height,
- cursor_bad_x_hot, cursor_bad_y_hot,
- cursor_bad, NULL, NULL, NULL
+ cursor_bad,
+ cursor_bad_bw,
+ cursor_bad_x_hot, cursor_bad_y_hot
},
{
- cursor_move_bits, cursor_move_mask_bits,
- cursor_move_width, cursor_move_height,
- cursor_move_x_hot, cursor_move_y_hot,
- cursor_move, NULL, NULL, NULL
+ cursor_move,
+ cursor_move_bw,
+ cursor_move_x_hot, cursor_move_y_hot
},
{
- cursor_zoom_bits, cursor_zoom_mask_bits,
- cursor_zoom_width, cursor_zoom_height,
- cursor_zoom_x_hot, cursor_zoom_y_hot,
- cursor_zoom, NULL, NULL, NULL
+ cursor_zoom,
+ cursor_zoom_bw,
+ cursor_zoom_x_hot, cursor_zoom_y_hot
},
{
- cursor_color_picker_bits, cursor_color_picker_mask_bits,
- cursor_color_picker_width, cursor_color_picker_height,
- cursor_color_picker_x_hot, cursor_color_picker_y_hot,
- cursor_color_picker, NULL, NULL, NULL
+ cursor_color_picker,
+ cursor_color_picker_bw,
+ cursor_color_picker_x_hot, cursor_color_picker_y_hot
},
{
- cursor_corner_top_left_bits, cursor_corner_top_left_mask_bits,
- cursor_corner_top_left_width, cursor_corner_top_left_height,
- cursor_corner_top_left_x_hot, cursor_corner_top_left_y_hot,
- cursor_corner_top_left, NULL, NULL, NULL
+ cursor_corner_top_left,
+ cursor_corner_top_left_bw,
+ cursor_corner_top_left_x_hot, cursor_corner_top_left_y_hot
},
{
- cursor_corner_top_right_bits, cursor_corner_top_right_mask_bits,
- cursor_corner_top_right_width, cursor_corner_top_right_height,
- cursor_corner_top_right_x_hot, cursor_corner_top_right_y_hot,
- cursor_corner_top_right, NULL, NULL, NULL
+ cursor_corner_top_right,
+ cursor_corner_top_right_bw,
+ cursor_corner_top_right_x_hot, cursor_corner_top_right_y_hot
},
{
- cursor_corner_bottom_left_bits, cursor_corner_bottom_left_mask_bits,
- cursor_corner_bottom_left_width, cursor_corner_bottom_left_height,
- cursor_corner_bottom_left_x_hot, cursor_corner_bottom_left_y_hot,
- cursor_corner_bottom_left, NULL, NULL, NULL
+ cursor_corner_bottom_left,
+ cursor_corner_bottom_left_bw,
+ cursor_corner_bottom_left_x_hot, cursor_corner_bottom_left_y_hot
},
{
- cursor_corner_bottom_right_bits, cursor_corner_bottom_right_mask_bits,
- cursor_corner_bottom_right_width, cursor_corner_bottom_right_height,
- cursor_corner_bottom_right_x_hot, cursor_corner_bottom_right_y_hot,
- cursor_corner_bottom_right, NULL, NULL, NULL
+ cursor_corner_bottom_right,
+ cursor_corner_bottom_right_bw,
+ cursor_corner_bottom_right_x_hot, cursor_corner_bottom_right_y_hot
},
{
- cursor_side_top_bits, cursor_side_top_mask_bits,
- cursor_side_top_width, cursor_side_top_height,
- cursor_side_top_x_hot, cursor_side_top_y_hot,
- cursor_side_top, NULL, NULL, NULL
+ cursor_side_top,
+ cursor_side_top_bw,
+ cursor_side_top_x_hot, cursor_side_top_y_hot
},
{
- cursor_side_left_bits, cursor_side_left_mask_bits,
- cursor_side_left_width, cursor_side_left_height,
- cursor_side_left_x_hot, cursor_side_left_y_hot,
- cursor_side_left, NULL, NULL, NULL
+ cursor_side_left,
+ cursor_side_left_bw,
+ cursor_side_left_x_hot, cursor_side_left_y_hot
},
{
- cursor_side_right_bits, cursor_side_right_mask_bits,
- cursor_side_right_width, cursor_side_right_height,
- cursor_side_right_x_hot, cursor_side_right_y_hot,
- cursor_side_right, NULL, NULL, NULL
+ cursor_side_right,
+ cursor_side_right_bw,
+ cursor_side_right_x_hot, cursor_side_right_y_hot
},
{
- cursor_side_bottom_bits, cursor_side_bottom_mask_bits,
- cursor_side_bottom_width, cursor_side_bottom_height,
- cursor_side_bottom_x_hot, cursor_side_bottom_y_hot,
- cursor_side_bottom, NULL, NULL, NULL
+ cursor_side_bottom,
+ cursor_side_bottom_bw,
+ cursor_side_bottom_x_hot, cursor_side_bottom_y_hot
}
};
@@ -283,355 +163,85 @@ static GimpCursor gimp_tool_cursors[] =
{
/* these have to match up with enum GimpToolCursorType in widgets-enums.h */
- {
- NULL, NULL,
- 0, 0,
- 0, 0,
- NULL, NULL, NULL, NULL
- },
- {
- tool_rect_select_bits, tool_rect_select_mask_bits,
- tool_rect_select_width, tool_rect_select_height,
- 0, 0,
- tool_rect_select, NULL, NULL, NULL
- },
- {
- tool_ellipse_select_bits, tool_ellipse_select_mask_bits,
- tool_ellipse_select_width, tool_ellipse_select_height,
- 0, 0,
- tool_ellipse_select, NULL, NULL, NULL
- },
- {
- tool_free_select_bits, tool_free_select_mask_bits,
- tool_free_select_width, tool_free_select_height,
- 0, 0,
- tool_free_select, NULL, NULL, NULL
- },
- {
- tool_polygon_select_bits, tool_polygon_select_mask_bits,
- tool_polygon_select_width, tool_polygon_select_height,
- 0, 0,
- tool_polygon_select, NULL, NULL, NULL
- },
- {
- tool_fuzzy_select_bits, tool_fuzzy_select_mask_bits,
- tool_fuzzy_select_width, tool_fuzzy_select_height,
- 0, 0,
- tool_fuzzy_select, NULL, NULL, NULL
- },
- {
- tool_paths_bits, tool_paths_mask_bits,
- tool_paths_width, tool_paths_height,
- 0, 0,
- tool_paths, NULL, NULL, NULL
- },
- {
- tool_paths_anchor_bits, tool_paths_anchor_mask_bits,
- tool_paths_anchor_width, tool_paths_anchor_height,
- 0, 0,
- tool_paths_anchor, NULL, NULL, NULL
- },
- {
- tool_paths_control_bits, tool_paths_control_mask_bits,
- tool_paths_control_width, tool_paths_control_height,
- 0, 0,
- tool_paths_control, NULL, NULL, NULL
- },
- {
- tool_paths_segment_bits, tool_paths_segment_mask_bits,
- tool_paths_segment_width, tool_paths_segment_height,
- 0, 0,
- tool_paths_segment, NULL, NULL, NULL
- },
- {
- tool_iscissors_bits, tool_iscissors_mask_bits,
- tool_iscissors_width, tool_iscissors_height,
- 0, 0,
- tool_iscissors, NULL, NULL, NULL
- },
- {
- tool_move_bits, tool_move_mask_bits,
- tool_move_width, tool_move_height,
- 0, 0,
- tool_move, NULL, NULL, NULL
- },
- {
- tool_zoom_bits, tool_zoom_mask_bits,
- tool_zoom_width, tool_zoom_height,
- 0, 0,
- tool_zoom, NULL, NULL, NULL
- },
- {
- tool_crop_bits, tool_crop_mask_bits,
- tool_crop_width, tool_crop_height,
- 0, 0,
- tool_crop, NULL, NULL, NULL
- },
- {
- tool_resize_bits, tool_resize_mask_bits,
- tool_resize_width, tool_resize_height,
- 0, 0,
- tool_resize, NULL, NULL, NULL
- },
- {
- tool_rotate_bits, tool_rotate_mask_bits,
- tool_rotate_width, tool_rotate_height,
- 0, 0,
- tool_rotate, NULL, NULL, NULL
- },
- {
- tool_shear_bits, tool_shear_mask_bits,
- tool_shear_width, tool_shear_height,
- 0, 0,
- tool_shear, NULL, NULL, NULL
- },
- {
- tool_perspective_bits, tool_perspective_mask_bits,
- tool_perspective_width, tool_perspective_height,
- 0, 0,
- tool_perspective, NULL, NULL, NULL
- },
- {
- tool_flip_horizontal_bits, tool_flip_horizontal_mask_bits,
- tool_flip_horizontal_width, tool_flip_horizontal_height,
- 0, 0,
- tool_flip_horizontal, NULL, NULL, NULL
- },
- {
- tool_flip_vertical_bits, tool_flip_vertical_mask_bits,
- tool_flip_vertical_width, tool_flip_vertical_height,
- 0, 0,
- tool_flip_vertical, NULL, NULL, NULL
- },
- {
- tool_text_bits, tool_text_mask_bits,
- tool_text_width, tool_text_height,
- 0, 0,
- tool_text, NULL, NULL, NULL
- },
- {
- tool_color_picker_bits, tool_color_picker_mask_bits,
- tool_color_picker_width, tool_color_picker_height,
- 0, 0,
- tool_color_picker, NULL, NULL, NULL
- },
- {
- tool_bucket_fill_bits, tool_bucket_fill_mask_bits,
- tool_bucket_fill_width, tool_bucket_fill_height,
- 0, 0,
- tool_bucket_fill, NULL, NULL, NULL
- },
- {
- tool_blend_bits, tool_blend_mask_bits,
- tool_blend_width, tool_blend_height,
- 0, 0,
- tool_blend, NULL, NULL, NULL
- },
- {
- tool_pencil_bits, tool_pencil_mask_bits,
- tool_pencil_width, tool_pencil_height,
- 0, 0,
- tool_pencil, NULL, NULL, NULL
- },
- {
- tool_paintbrush_bits, tool_paintbrush_mask_bits,
- tool_paintbrush_width, tool_paintbrush_height,
- 0, 0,
- tool_paintbrush, NULL, NULL, NULL
- },
- {
- tool_airbrush_bits, tool_airbrush_mask_bits,
- tool_airbrush_width, tool_airbrush_height,
- 0, 0,
- tool_airbrush, NULL, NULL, NULL
- },
- {
- tool_ink_bits, tool_ink_mask_bits,
- tool_ink_width, tool_ink_height,
- 0, 0,
- tool_ink, NULL, NULL, NULL
- },
- {
- tool_clone_bits, tool_clone_mask_bits,
- tool_clone_width, tool_clone_height,
- 0, 0,
- tool_clone, NULL, NULL, NULL
- },
- {
- tool_heal_bits, tool_heal_mask_bits,
- tool_heal_width, tool_heal_height,
- 0, 0,
- tool_heal, NULL, NULL, NULL
- },
- {
- tool_eraser_bits, tool_eraser_mask_bits,
- tool_eraser_width, tool_eraser_height,
- 0, 0,
- tool_eraser, NULL, NULL, NULL
- },
- {
- tool_smudge_bits, tool_smudge_mask_bits,
- tool_smudge_width, tool_smudge_height,
- 0, 0,
- tool_smudge, NULL, NULL, NULL
- },
- {
- tool_blur_bits, tool_blur_mask_bits,
- tool_blur_width, tool_blur_height,
- 0, 0,
- tool_blur, NULL, NULL, NULL
- },
- {
- tool_dodge_bits, tool_dodge_mask_bits,
- tool_dodge_width, tool_dodge_height,
- 0, 0,
- tool_dodge, NULL, NULL, NULL
- },
- {
- tool_burn_bits, tool_burn_mask_bits,
- tool_burn_width, tool_burn_height,
- 0, 0,
- tool_burn, NULL, NULL, NULL
- },
- {
- tool_measure_bits, tool_measure_mask_bits,
- tool_measure_width, tool_measure_height,
- 0, 0,
- tool_measure, NULL, NULL, NULL
- },
- {
- tool_hand_bits, tool_hand_mask_bits,
- tool_hand_width, tool_hand_height,
- 0, 0,
- tool_hand, NULL, NULL, NULL
- }
+ { NULL },
+ { tool_rect_select, tool_rect_select_bw },
+ { tool_ellipse_select, tool_ellipse_select_bw },
+ { tool_free_select, tool_free_select_bw },
+ { tool_polygon_select, tool_polygon_select_bw },
+ { tool_fuzzy_select, tool_fuzzy_select_bw },
+ { tool_paths, tool_paths_bw },
+ { tool_paths_anchor, tool_paths_anchor_bw },
+ { tool_paths_control, tool_paths_control_bw },
+ { tool_paths_segment, tool_paths_segment_bw },
+ { tool_iscissors, tool_iscissors_bw },
+ { tool_move, tool_move_bw },
+ { tool_zoom, tool_zoom_bw },
+ { tool_crop, tool_crop_bw },
+ { tool_resize, tool_resize_bw },
+ { tool_rotate, tool_rotate_bw },
+ { tool_shear, tool_shear_bw },
+ { tool_perspective, tool_perspective_bw },
+ { tool_flip_horizontal, tool_flip_horizontal_bw },
+ { tool_flip_vertical, tool_flip_vertical_bw },
+ { tool_text, tool_text_bw },
+ { tool_color_picker, tool_color_picker_bw },
+ { tool_bucket_fill, tool_bucket_fill_bw },
+ { tool_blend, tool_blend_bw },
+ { tool_pencil, tool_pencil_bw },
+ { tool_paintbrush, tool_paintbrush_bw },
+ { tool_airbrush, tool_airbrush_bw },
+ { tool_ink, tool_ink_bw },
+ { tool_clone, tool_clone_bw },
+ { tool_heal, tool_heal_bw },
+ { tool_eraser, tool_eraser_bw },
+ { tool_smudge, tool_smudge_bw },
+ { tool_blur, tool_blur_bw },
+ { tool_dodge, tool_dodge_bw },
+ { tool_burn, tool_burn_bw },
+ { tool_measure, tool_measure_bw },
+ { tool_hand, tool_hand_bw }
};
static GimpCursor gimp_cursor_modifiers[] =
{
/* these have to match up with enum GimpCursorModifier in widgets-enums.h */
- {
- NULL, NULL,
- 0, 0,
- 0, 0,
- NULL, NULL, NULL, NULL
- },
- {
- modifier_bad_bits, modifier_bad_mask_bits,
- modifier_bad_width, modifier_bad_height,
- 0, 0,
- modifier_bad, NULL, NULL, NULL
- },
- {
- modifier_plus_bits, modifier_plus_mask_bits,
- modifier_plus_width, modifier_plus_height,
- 0, 0,
- modifier_plus, NULL, NULL, NULL
- },
- {
- modifier_minus_bits, modifier_minus_mask_bits,
- modifier_minus_width, modifier_minus_height,
- 0, 0,
- modifier_minus, NULL, NULL, NULL
- },
- {
- modifier_intersect_bits, modifier_intersect_mask_bits,
- modifier_intersect_width, modifier_intersect_height,
- 0, 0,
- modifier_intersect, NULL, NULL, NULL
- },
- {
- modifier_move_bits, modifier_move_mask_bits,
- modifier_move_width, modifier_move_height,
- 0, 0,
- modifier_move, NULL, NULL, NULL
- },
- {
- modifier_resize_bits, modifier_resize_mask_bits,
- modifier_resize_width, modifier_resize_height,
- 0, 0,
- modifier_resize, NULL, NULL, NULL
- },
- {
- modifier_control_bits, modifier_control_mask_bits,
- modifier_control_width, modifier_control_height,
- 0, 0,
- modifier_control, NULL, NULL, NULL
- },
- {
- modifier_anchor_bits, modifier_anchor_mask_bits,
- modifier_anchor_width, modifier_anchor_height,
- 0, 0,
- modifier_anchor, NULL, NULL, NULL
- },
- {
- modifier_foreground_bits, modifier_foreground_mask_bits,
- modifier_foreground_width, modifier_foreground_height,
- 0, 0,
- modifier_foreground, NULL, NULL, NULL
- },
- {
- modifier_background_bits, modifier_background_mask_bits,
- modifier_background_width, modifier_background_height,
- 0, 0,
- modifier_background, NULL, NULL, NULL
- },
- {
- modifier_pattern_bits, modifier_pattern_mask_bits,
- modifier_pattern_width, modifier_pattern_height,
- 0, 0,
- modifier_pattern, NULL, NULL, NULL
- },
- {
- modifier_join_bits, modifier_join_mask_bits,
- modifier_join_width, modifier_join_height,
- 0, 0,
- modifier_join, NULL, NULL, NULL
- },
- {
- modifier_select_bits, modifier_select_mask_bits,
- modifier_select_width, modifier_select_height,
- 0, 0,
- modifier_select, NULL, NULL, NULL
- }
+ { NULL },
+ { modifier_bad, modifier_bad },
+ { modifier_plus, modifier_plus },
+ { modifier_minus, modifier_minus },
+ { modifier_intersect, modifier_intersect },
+ { modifier_move, modifier_move },
+ { modifier_resize, modifier_resize },
+ { modifier_control, modifier_control },
+ { modifier_anchor, modifier_anchor },
+ { modifier_foreground, modifier_foreground },
+ { modifier_background, modifier_background },
+ { modifier_pattern, modifier_pattern },
+ { modifier_join, modifier_join },
+ { modifier_select, modifier_select }
};
-static GdkBitmap *
-get_cursor_bitmap (GimpCursor *cursor)
+static const GdkPixbuf *
+get_cursor_pixbuf (GimpCursor *cursor,
+ gboolean bw)
{
- if (! cursor->bitmap)
- cursor->bitmap = gdk_bitmap_create_from_data (NULL,
- (const gchar *) cursor->bits,
- cursor->width,
- cursor->height);
- g_return_val_if_fail (cursor->bitmap != NULL, NULL);
-
- return cursor->bitmap;
-}
+ GdkPixbuf **pixbuf;
-static GdkBitmap *
-get_cursor_mask (GimpCursor *cursor)
-{
- if (! cursor->mask)
- cursor->mask = gdk_bitmap_create_from_data (NULL,
- (const gchar *) cursor->mask_bits,
- cursor->width,
- cursor->height);
- g_return_val_if_fail (cursor->mask != NULL, NULL);
-
- return cursor->mask;
-}
+ if (bw)
+ pixbuf = &cursor->pixbuf_bw;
+ else
+ pixbuf = &cursor->pixbuf;
-static const GdkPixbuf *
-get_cursor_pixbuf (GimpCursor *cursor)
-{
- if (! cursor->pixbuf)
- cursor->pixbuf = gdk_pixbuf_new_from_inline (-1, cursor->pixbuf_data,
- FALSE, NULL);
- g_return_val_if_fail (cursor->pixbuf != NULL, NULL);
+ if (! *pixbuf)
+ *pixbuf = gdk_pixbuf_new_from_inline (-1,
+ bw ?
+ cursor->pixbuf_data_bw :
+ cursor->pixbuf_data,
+ FALSE, NULL);
+ g_return_val_if_fail (*pixbuf != NULL, NULL);
- return cursor->pixbuf;
+ return *pixbuf;
}
GdkCursor *
@@ -641,12 +251,12 @@ gimp_cursor_new (GdkDisplay *display,
GimpToolCursorType tool_cursor,
GimpCursorModifier modifier)
{
- GdkCursor *cursor;
- gint width;
- gint height;
GimpCursor *bmcursor = NULL;
GimpCursor *bmmodifier = NULL;
GimpCursor *bmtool = NULL;
+ GdkCursor *cursor;
+ GdkPixbuf *pixbuf;
+ gboolean bw;
g_return_val_if_fail (GDK_IS_DISPLAY (display), NULL);
g_return_val_if_fail (cursor_type < GIMP_CURSOR_LAST, NULL);
@@ -708,93 +318,37 @@ gimp_cursor_new (GdkDisplay *display,
gdk_display_supports_cursor_alpha (display) &&
gdk_display_supports_cursor_color (display))
{
- GdkPixbuf *pixbuf;
+ bw = FALSE;
+ }
+ else
+ {
+ bw = TRUE;
+ }
- pixbuf = gdk_pixbuf_copy (get_cursor_pixbuf (bmcursor));
+ pixbuf = gdk_pixbuf_copy (get_cursor_pixbuf (bmcursor, bw));
- width = gdk_pixbuf_get_width (pixbuf);
- height = gdk_pixbuf_get_height (pixbuf);
+ if (bmmodifier || bmtool)
+ {
+ gint width = gdk_pixbuf_get_width (pixbuf);
+ gint height = gdk_pixbuf_get_height (pixbuf);
if (bmmodifier)
- gdk_pixbuf_composite (get_cursor_pixbuf (bmmodifier), pixbuf,
+ gdk_pixbuf_composite (get_cursor_pixbuf (bmmodifier, bw), pixbuf,
0, 0, width, height,
0.0, 0.0, 1.0, 1.0,
- GDK_INTERP_NEAREST, 200);
+ GDK_INTERP_NEAREST, bw ? 255 : 200);
if (bmtool)
- gdk_pixbuf_composite (get_cursor_pixbuf (bmtool), pixbuf,
+ gdk_pixbuf_composite (get_cursor_pixbuf (bmtool, bw), pixbuf,
0, 0, width, height,
0.0, 0.0, 1.0, 1.0,
- GDK_INTERP_NEAREST, 200);
-
- cursor = gdk_cursor_new_from_pixbuf (display, pixbuf,
- bmcursor->x_hot,
- bmcursor->y_hot);
- g_object_unref (pixbuf);
+ GDK_INTERP_NEAREST, bw ? 255 : 200);
}
- else
- {
- GdkBitmap *bitmap;
- GdkBitmap *mask;
- static GdkGC *gc = NULL;
- static GdkColor fg, bg;
-
- if (! gc)
- {
- GdkColor color;
-
- gc = gdk_gc_new (get_cursor_bitmap (bmcursor));
-
- color.pixel = 1;
- gdk_gc_set_foreground (gc, &color);
-
- /* should have a way to configure the mouse colors */
- gdk_color_parse ("#FFFFFF", &bg);
- gdk_color_parse ("#000000", &fg);
- }
- gdk_drawable_get_size (get_cursor_bitmap (bmcursor), &width, &height);
-
- bitmap = gdk_pixmap_new (NULL, width, height, 1);
- mask = gdk_pixmap_new (NULL, width, height, 1);
-
- gdk_draw_drawable (bitmap, gc, get_cursor_bitmap (bmcursor),
- 0, 0, 0, 0, width, height);
- gdk_draw_drawable (mask, gc, get_cursor_mask (bmcursor),
- 0, 0, 0, 0, width, height);
-
- if (bmmodifier)
- {
- gdk_gc_set_clip_mask (gc, get_cursor_bitmap (bmmodifier));
- gdk_draw_drawable (bitmap, gc, get_cursor_bitmap (bmmodifier),
- 0, 0, 0, 0, width, height);
-
- gdk_gc_set_clip_mask (gc, get_cursor_mask (bmmodifier));
- gdk_draw_drawable (mask, gc, get_cursor_mask (bmmodifier),
- 0, 0, 0, 0, width, height);
- }
-
- if (bmtool)
- {
- gdk_gc_set_clip_mask (gc, get_cursor_bitmap (bmtool));
- gdk_draw_drawable (bitmap, gc, get_cursor_bitmap (bmtool),
- 0, 0, 0, 0, width, height);
-
- gdk_gc_set_clip_mask (gc, get_cursor_mask (bmtool));
- gdk_draw_drawable (mask, gc, get_cursor_mask (bmtool),
- 0, 0, 0, 0, width, height);
- }
-
- if (bmmodifier || bmtool)
- gdk_gc_set_clip_mask (gc, NULL);
-
- cursor = gdk_cursor_new_from_pixmap (bitmap, mask,
- &fg, &bg,
- bmcursor->x_hot,
- bmcursor->y_hot);
- g_object_unref (bitmap);
- g_object_unref (mask);
- }
+ cursor = gdk_cursor_new_from_pixbuf (display, pixbuf,
+ bmcursor->x_hot,
+ bmcursor->y_hot);
+ g_object_unref (pixbuf);
return cursor;
}
diff --git a/cursors/Makefile.am b/cursors/Makefile.am
index 609380f..5970a15 100644
--- a/cursors/Makefile.am
+++ b/cursors/Makefile.am
@@ -1,211 +1,130 @@
## Process this file with automake to produce Makefile.in
CURSOR_IMAGES = \
- cursor-bad.png \
- cursor-color-picker.png \
- cursor-corner-top-left.png \
- cursor-corner-top-right.png \
- cursor-corner-bottom-left.png \
- cursor-corner-bottom-right.png \
- cursor-crosshair.png \
- cursor-crosshair-small.png \
- cursor-mouse.png \
- cursor-move.png \
- cursor-none.png \
- cursor-side-top.png \
- cursor-side-left.png \
- cursor-side-right.png \
- cursor-side-bottom.png \
- cursor-zoom.png \
+ cursor-bad.png \
+ cursor-bad-bw.png \
+ cursor-color-picker.png \
+ cursor-color-picker-bw.png \
+ cursor-corner-bottom-left.png \
+ cursor-corner-bottom-left-bw.png \
+ cursor-corner-bottom-right.png \
+ cursor-corner-bottom-right-bw.png \
+ cursor-corner-top-left.png \
+ cursor-corner-top-left-bw.png \
+ cursor-corner-top-right.png \
+ cursor-corner-top-right-bw.png \
+ cursor-crosshair.png \
+ cursor-crosshair-bw.png \
+ cursor-crosshair-small.png \
+ cursor-crosshair-small-bw.png \
+ cursor-mouse.png \
+ cursor-mouse-bw.png \
+ cursor-move.png \
+ cursor-move-bw.png \
+ cursor-none.png \
+ cursor-none-bw.png \
+ cursor-side-bottom.png \
+ cursor-side-bottom-bw.png \
+ cursor-side-left.png \
+ cursor-side-left-bw.png \
+ cursor-side-right.png \
+ cursor-side-right-bw.png \
+ cursor-side-top.png \
+ cursor-side-top-bw.png \
+ cursor-zoom.png \
+ cursor-zoom-bw.png \
\
- modifier-anchor.png \
- modifier-bad.png \
- modifier-background.png \
- modifier-control.png \
- modifier-foreground.png \
- modifier-intersect.png \
- modifier-join.png \
- modifier-minus.png \
- modifier-move.png \
- modifier-pattern.png \
- modifier-plus.png \
- modifier-resize.png \
- modifier-select.png \
+ modifier-anchor.png \
+ modifier-bad.png \
+ modifier-background.png \
+ modifier-control.png \
+ modifier-foreground.png \
+ modifier-intersect.png \
+ modifier-join.png \
+ modifier-minus.png \
+ modifier-move.png \
+ modifier-pattern.png \
+ modifier-plus.png \
+ modifier-resize.png \
+ modifier-select.png \
\
- tool-airbrush.png \
- tool-blend.png \
- tool-blur.png \
- tool-bucket-fill.png \
- tool-burn.png \
- tool-clone.png \
- tool-color-picker.png \
- tool-crop.png \
- tool-dodge.png \
- tool-ellipse-select.png \
- tool-eraser.png \
- tool-flip-horizontal.png \
- tool-flip-vertical.png \
- tool-free-select.png \
- tool-fuzzy-select.png \
- tool-hand.png \
- tool-heal.png \
- tool-ink.png \
- tool-iscissors.png \
- tool-measure.png \
- tool-move.png \
- tool-paintbrush.png \
- tool-paths.png \
- tool-paths-anchor.png \
- tool-paths-control.png \
- tool-paths-segment.png \
- tool-pencil.png \
- tool-perspective.png \
- tool-polygon-select.png \
- tool-rect-select.png \
- tool-resize.png \
- tool-rotate.png \
- tool-shear.png \
- tool-smudge.png \
- tool-text.png \
- tool-zoom.png
+ tool-airbrush.png \
+ tool-airbrush-bw.png \
+ tool-blend.png \
+ tool-blend-bw.png \
+ tool-blur.png \
+ tool-blur-bw.png \
+ tool-bucket-fill.png \
+ tool-bucket-fill-bw.png \
+ tool-burn.png \
+ tool-burn-bw.png \
+ tool-clone.png \
+ tool-clone-bw.png \
+ tool-color-picker.png \
+ tool-color-picker-bw.png \
+ tool-crop.png \
+ tool-crop-bw.png \
+ tool-dodge.png \
+ tool-dodge-bw.png \
+ tool-ellipse-select.png \
+ tool-ellipse-select-bw.png \
+ tool-eraser.png \
+ tool-eraser-bw.png \
+ tool-flip-horizontal.png \
+ tool-flip-horizontal-bw.png \
+ tool-flip-vertical.png \
+ tool-flip-vertical-bw.png \
+ tool-free-select.png \
+ tool-free-select-bw.png \
+ tool-fuzzy-select.png \
+ tool-fuzzy-select-bw.png \
+ tool-hand.png \
+ tool-hand-bw.png \
+ tool-heal.png \
+ tool-heal-bw.png \
+ tool-ink.png \
+ tool-ink-bw.png \
+ tool-iscissors.png \
+ tool-iscissors-bw.png \
+ tool-measure.png \
+ tool-measure-bw.png \
+ tool-move.png \
+ tool-move-bw.png \
+ tool-paintbrush.png \
+ tool-paintbrush-bw.png \
+ tool-paths.png \
+ tool-paths-bw.png \
+ tool-paths-anchor.png \
+ tool-paths-anchor-bw.png \
+ tool-paths-control.png \
+ tool-paths-control-bw.png \
+ tool-paths-segment.png \
+ tool-paths-segment-bw.png \
+ tool-pencil.png \
+ tool-pencil-bw.png \
+ tool-perspective.png \
+ tool-perspective-bw.png \
+ tool-polygon-select.png \
+ tool-polygon-select-bw.png \
+ tool-rect-select.png \
+ tool-rect-select-bw.png \
+ tool-resize.png \
+ tool-resize-bw.png \
+ tool-rotate.png \
+ tool-rotate-bw.png \
+ tool-shear.png \
+ tool-shear-bw.png \
+ tool-smudge.png \
+ tool-smudge-bw.png \
+ tool-text.png \
+ tool-text-bw.png \
+ tool-zoom.png \
+ tool-zoom-bw.png
EXTRA_DIST = \
$(CURSOR_IMAGES) \
gimp-tool-cursors.xcf \
- \
- makefile.msc \
- \
- xbm/cursor-none.xbm \
- xbm/cursor-mouse.xbm \
- xbm/cursor-mouse-mask.xbm \
- xbm/cursor-move.xbm \
- xbm/cursor-move-mask.xbm \
- xbm/cursor-crosshair.xbm \
- xbm/cursor-crosshair-mask.xbm \
- xbm/cursor-crosshair-small.xbm \
- xbm/cursor-crosshair-small-mask.xbm \
- xbm/cursor-bad.xbm \
- xbm/cursor-bad-mask.xbm \
- xbm/cursor-zoom.xbm \
- xbm/cursor-zoom-mask.xbm \
- xbm/cursor-color-picker.xbm \
- xbm/cursor-color-picker-mask.xbm \
- xbm/cursor-corner-top-left.xbm \
- xbm/cursor-corner-top-left-mask.xbm \
- xbm/cursor-corner-top-right.xbm \
- xbm/cursor-corner-top-right-mask.xbm \
- xbm/cursor-corner-bottom-left.xbm \
- xbm/cursor-corner-bottom-left-mask.xbm \
- xbm/cursor-corner-bottom-right.xbm \
- xbm/cursor-corner-bottom-right-mask.xbm \
- xbm/cursor-side-top.xbm \
- xbm/cursor-side-top-mask.xbm \
- xbm/cursor-side-left.xbm \
- xbm/cursor-side-left-mask.xbm \
- xbm/cursor-side-right.xbm \
- xbm/cursor-side-right-mask.xbm \
- xbm/cursor-side-bottom.xbm \
- xbm/cursor-side-bottom-mask.xbm \
- \
- xbm/modifier-bad.xbm \
- xbm/modifier-bad-mask.xbm \
- xbm/modifier-plus.xbm \
- xbm/modifier-plus-mask.xbm \
- xbm/modifier-minus.xbm \
- xbm/modifier-minus-mask.xbm \
- xbm/modifier-intersect.xbm \
- xbm/modifier-intersect-mask.xbm \
- xbm/modifier-move.xbm \
- xbm/modifier-move-mask.xbm \
- xbm/modifier-resize.xbm \
- xbm/modifier-resize-mask.xbm \
- xbm/modifier-control.xbm \
- xbm/modifier-control-mask.xbm \
- xbm/modifier-anchor.xbm \
- xbm/modifier-anchor-mask.xbm \
- xbm/modifier-foreground.xbm \
- xbm/modifier-foreground-mask.xbm \
- xbm/modifier-background.xbm \
- xbm/modifier-background-mask.xbm \
- xbm/modifier-pattern.xbm \
- xbm/modifier-pattern-mask.xbm \
- xbm/modifier-join.xbm \
- xbm/modifier-join-mask.xbm \
- xbm/modifier-select.xbm \
- xbm/modifier-select-mask.xbm \
- \
- xbm/tool-rect-select.xbm \
- xbm/tool-rect-select-mask.xbm \
- xbm/tool-ellipse-select.xbm \
- xbm/tool-ellipse-select-mask.xbm \
- xbm/tool-free-select.xbm \
- xbm/tool-free-select-mask.xbm \
- xbm/tool-polygon-select.xbm \
- xbm/tool-polygon-select-mask.xbm \
- xbm/tool-fuzzy-select.xbm \
- xbm/tool-fuzzy-select-mask.xbm \
- xbm/tool-paths-anchor.xbm \
- xbm/tool-paths-anchor-mask.xbm \
- xbm/tool-paths-control.xbm \
- xbm/tool-paths-control-mask.xbm \
- xbm/tool-paths-segment.xbm \
- xbm/tool-paths-segment-mask.xbm \
- xbm/tool-paths.xbm \
- xbm/tool-paths-mask.xbm \
- xbm/tool-iscissors.xbm \
- xbm/tool-iscissors-mask.xbm \
- xbm/tool-move.xbm \
- xbm/tool-move-mask.xbm \
- xbm/tool-zoom.xbm \
- xbm/tool-zoom-mask.xbm \
- xbm/tool-crop.xbm \
- xbm/tool-crop-mask.xbm \
- xbm/tool-resize.xbm \
- xbm/tool-resize-mask.xbm \
- xbm/tool-rotate.xbm \
- xbm/tool-rotate-mask.xbm \
- xbm/tool-shear.xbm \
- xbm/tool-shear-mask.xbm \
- xbm/tool-perspective.xbm \
- xbm/tool-perspective-mask.xbm \
- xbm/tool-flip-horizontal.xbm \
- xbm/tool-flip-horizontal-mask.xbm \
- xbm/tool-flip-vertical.xbm \
- xbm/tool-flip-vertical-mask.xbm \
- xbm/tool-text.xbm \
- xbm/tool-text-mask.xbm \
- xbm/tool-color-picker.xbm \
- xbm/tool-color-picker-mask.xbm \
- xbm/tool-bucket-fill.xbm \
- xbm/tool-bucket-fill-mask.xbm \
- xbm/tool-blend.xbm \
- xbm/tool-blend-mask.xbm \
- xbm/tool-pencil.xbm \
- xbm/tool-pencil-mask.xbm \
- xbm/tool-paintbrush.xbm \
- xbm/tool-paintbrush-mask.xbm \
- xbm/tool-eraser.xbm \
- xbm/tool-eraser-mask.xbm \
- xbm/tool-airbrush.xbm \
- xbm/tool-airbrush-mask.xbm \
- xbm/tool-clone.xbm \
- xbm/tool-clone-mask.xbm \
- xbm/tool-blur.xbm \
- xbm/tool-blur-mask.xbm \
- xbm/tool-ink.xbm \
- xbm/tool-ink-mask.xbm \
- xbm/tool-dodge.xbm \
- xbm/tool-dodge-mask.xbm \
- xbm/tool-burn.xbm \
- xbm/tool-burn-mask.xbm \
- xbm/tool-smudge.xbm \
- xbm/tool-smudge-mask.xbm \
- xbm/tool-measure.xbm \
- xbm/tool-measure-mask.xbm \
- xbm/tool-hand.xbm \
- xbm/tool-hand-mask.xbm \
- xbm/tool-heal.xbm \
- xbm/tool-heal-mask.xbm
+ makefile.msc
noinst_DATA = gimp-tool-cursors.h
diff --git a/cursors/cursor-bad-bw.png b/cursors/cursor-bad-bw.png
new file mode 100644
index 0000000..70ed957
Binary files /dev/null and b/cursors/cursor-bad-bw.png differ
diff --git a/cursors/cursor-color-picker-bw.png b/cursors/cursor-color-picker-bw.png
new file mode 100644
index 0000000..d9f3984
Binary files /dev/null and b/cursors/cursor-color-picker-bw.png differ
diff --git a/cursors/cursor-corner-bottom-left-bw.png b/cursors/cursor-corner-bottom-left-bw.png
new file mode 100644
index 0000000..2f3145b
Binary files /dev/null and b/cursors/cursor-corner-bottom-left-bw.png differ
diff --git a/cursors/cursor-corner-bottom-right-bw.png b/cursors/cursor-corner-bottom-right-bw.png
new file mode 100644
index 0000000..43997bd
Binary files /dev/null and b/cursors/cursor-corner-bottom-right-bw.png differ
diff --git a/cursors/cursor-corner-top-left-bw.png b/cursors/cursor-corner-top-left-bw.png
new file mode 100644
index 0000000..171990e
Binary files /dev/null and b/cursors/cursor-corner-top-left-bw.png differ
diff --git a/cursors/cursor-corner-top-right-bw.png b/cursors/cursor-corner-top-right-bw.png
new file mode 100644
index 0000000..b056233
Binary files /dev/null and b/cursors/cursor-corner-top-right-bw.png differ
diff --git a/cursors/cursor-crosshair-bw.png b/cursors/cursor-crosshair-bw.png
new file mode 100644
index 0000000..481d5cf
Binary files /dev/null and b/cursors/cursor-crosshair-bw.png differ
diff --git a/cursors/cursor-crosshair-small-bw.png b/cursors/cursor-crosshair-small-bw.png
new file mode 100644
index 0000000..f0468b4
Binary files /dev/null and b/cursors/cursor-crosshair-small-bw.png differ
diff --git a/cursors/cursor-mouse-bw.png b/cursors/cursor-mouse-bw.png
new file mode 100644
index 0000000..f0fa4e5
Binary files /dev/null and b/cursors/cursor-mouse-bw.png differ
diff --git a/cursors/cursor-move-bw.png b/cursors/cursor-move-bw.png
new file mode 100644
index 0000000..570ab2b
Binary files /dev/null and b/cursors/cursor-move-bw.png differ
diff --git a/cursors/cursor-none-bw.png b/cursors/cursor-none-bw.png
new file mode 100644
index 0000000..62b1906
Binary files /dev/null and b/cursors/cursor-none-bw.png differ
diff --git a/cursors/cursor-side-bottom-bw.png b/cursors/cursor-side-bottom-bw.png
new file mode 100644
index 0000000..5a5b6b9
Binary files /dev/null and b/cursors/cursor-side-bottom-bw.png differ
diff --git a/cursors/cursor-side-left-bw.png b/cursors/cursor-side-left-bw.png
new file mode 100644
index 0000000..c692594
Binary files /dev/null and b/cursors/cursor-side-left-bw.png differ
diff --git a/cursors/cursor-side-right-bw.png b/cursors/cursor-side-right-bw.png
new file mode 100644
index 0000000..233e856
Binary files /dev/null and b/cursors/cursor-side-right-bw.png differ
diff --git a/cursors/cursor-side-top-bw.png b/cursors/cursor-side-top-bw.png
new file mode 100644
index 0000000..20cff2b
Binary files /dev/null and b/cursors/cursor-side-top-bw.png differ
diff --git a/cursors/cursor-zoom-bw.png b/cursors/cursor-zoom-bw.png
new file mode 100644
index 0000000..3ab00b2
Binary files /dev/null and b/cursors/cursor-zoom-bw.png differ
diff --git a/cursors/tool-airbrush-bw.png b/cursors/tool-airbrush-bw.png
new file mode 100644
index 0000000..740e193
Binary files /dev/null and b/cursors/tool-airbrush-bw.png differ
diff --git a/cursors/tool-blend-bw.png b/cursors/tool-blend-bw.png
new file mode 100644
index 0000000..0d03141
Binary files /dev/null and b/cursors/tool-blend-bw.png differ
diff --git a/cursors/tool-blur-bw.png b/cursors/tool-blur-bw.png
new file mode 100644
index 0000000..1f581f4
Binary files /dev/null and b/cursors/tool-blur-bw.png differ
diff --git a/cursors/tool-bucket-fill-bw.png b/cursors/tool-bucket-fill-bw.png
new file mode 100644
index 0000000..eff908d
Binary files /dev/null and b/cursors/tool-bucket-fill-bw.png differ
diff --git a/cursors/tool-burn-bw.png b/cursors/tool-burn-bw.png
new file mode 100644
index 0000000..160b414
Binary files /dev/null and b/cursors/tool-burn-bw.png differ
diff --git a/cursors/tool-clone-bw.png b/cursors/tool-clone-bw.png
new file mode 100644
index 0000000..afa955c
Binary files /dev/null and b/cursors/tool-clone-bw.png differ
diff --git a/cursors/tool-color-picker-bw.png b/cursors/tool-color-picker-bw.png
new file mode 100644
index 0000000..786d666
Binary files /dev/null and b/cursors/tool-color-picker-bw.png differ
diff --git a/cursors/tool-crop-bw.png b/cursors/tool-crop-bw.png
new file mode 100644
index 0000000..bb2ada8
Binary files /dev/null and b/cursors/tool-crop-bw.png differ
diff --git a/cursors/tool-dodge-bw.png b/cursors/tool-dodge-bw.png
new file mode 100644
index 0000000..1d70789
Binary files /dev/null and b/cursors/tool-dodge-bw.png differ
diff --git a/cursors/tool-ellipse-select-bw.png b/cursors/tool-ellipse-select-bw.png
new file mode 100644
index 0000000..99e0011
Binary files /dev/null and b/cursors/tool-ellipse-select-bw.png differ
diff --git a/cursors/tool-eraser-bw.png b/cursors/tool-eraser-bw.png
new file mode 100644
index 0000000..2d8c24d
Binary files /dev/null and b/cursors/tool-eraser-bw.png differ
diff --git a/cursors/tool-flip-horizontal-bw.png b/cursors/tool-flip-horizontal-bw.png
new file mode 100644
index 0000000..23aaa4b
Binary files /dev/null and b/cursors/tool-flip-horizontal-bw.png differ
diff --git a/cursors/tool-flip-vertical-bw.png b/cursors/tool-flip-vertical-bw.png
new file mode 100644
index 0000000..76edbbf
Binary files /dev/null and b/cursors/tool-flip-vertical-bw.png differ
diff --git a/cursors/tool-free-select-bw.png b/cursors/tool-free-select-bw.png
new file mode 100644
index 0000000..681234e
Binary files /dev/null and b/cursors/tool-free-select-bw.png differ
diff --git a/cursors/tool-fuzzy-select-bw.png b/cursors/tool-fuzzy-select-bw.png
new file mode 100644
index 0000000..15314fe
Binary files /dev/null and b/cursors/tool-fuzzy-select-bw.png differ
diff --git a/cursors/tool-hand-bw.png b/cursors/tool-hand-bw.png
new file mode 100644
index 0000000..35a8d17
Binary files /dev/null and b/cursors/tool-hand-bw.png differ
diff --git a/cursors/tool-heal-bw.png b/cursors/tool-heal-bw.png
new file mode 100644
index 0000000..4d24690
Binary files /dev/null and b/cursors/tool-heal-bw.png differ
diff --git a/cursors/tool-ink-bw.png b/cursors/tool-ink-bw.png
new file mode 100644
index 0000000..ec1a819
Binary files /dev/null and b/cursors/tool-ink-bw.png differ
diff --git a/cursors/tool-iscissors-bw.png b/cursors/tool-iscissors-bw.png
new file mode 100644
index 0000000..4cd486c
Binary files /dev/null and b/cursors/tool-iscissors-bw.png differ
diff --git a/cursors/tool-measure-bw.png b/cursors/tool-measure-bw.png
new file mode 100644
index 0000000..4557f5a
Binary files /dev/null and b/cursors/tool-measure-bw.png differ
diff --git a/cursors/tool-move-bw.png b/cursors/tool-move-bw.png
new file mode 100644
index 0000000..3e69035
Binary files /dev/null and b/cursors/tool-move-bw.png differ
diff --git a/cursors/tool-paintbrush-bw.png b/cursors/tool-paintbrush-bw.png
new file mode 100644
index 0000000..87d99d7
Binary files /dev/null and b/cursors/tool-paintbrush-bw.png differ
diff --git a/cursors/tool-paths-anchor-bw.png b/cursors/tool-paths-anchor-bw.png
new file mode 100644
index 0000000..0f1de52
Binary files /dev/null and b/cursors/tool-paths-anchor-bw.png differ
diff --git a/cursors/tool-paths-bw.png b/cursors/tool-paths-bw.png
new file mode 100644
index 0000000..d03adf8
Binary files /dev/null and b/cursors/tool-paths-bw.png differ
diff --git a/cursors/tool-paths-control-bw.png b/cursors/tool-paths-control-bw.png
new file mode 100644
index 0000000..f634e6f
Binary files /dev/null and b/cursors/tool-paths-control-bw.png differ
diff --git a/cursors/tool-paths-segment-bw.png b/cursors/tool-paths-segment-bw.png
new file mode 100644
index 0000000..e8f7f07
Binary files /dev/null and b/cursors/tool-paths-segment-bw.png differ
diff --git a/cursors/tool-pencil-bw.png b/cursors/tool-pencil-bw.png
new file mode 100644
index 0000000..fde4a14
Binary files /dev/null and b/cursors/tool-pencil-bw.png differ
diff --git a/cursors/tool-perspective-bw.png b/cursors/tool-perspective-bw.png
new file mode 100644
index 0000000..1c33974
Binary files /dev/null and b/cursors/tool-perspective-bw.png differ
diff --git a/cursors/tool-polygon-select-bw.png b/cursors/tool-polygon-select-bw.png
new file mode 100644
index 0000000..5e4d4ef
Binary files /dev/null and b/cursors/tool-polygon-select-bw.png differ
diff --git a/cursors/tool-rect-select-bw.png b/cursors/tool-rect-select-bw.png
new file mode 100644
index 0000000..45547f5
Binary files /dev/null and b/cursors/tool-rect-select-bw.png differ
diff --git a/cursors/tool-resize-bw.png b/cursors/tool-resize-bw.png
new file mode 100644
index 0000000..0d5892f
Binary files /dev/null and b/cursors/tool-resize-bw.png differ
diff --git a/cursors/tool-rotate-bw.png b/cursors/tool-rotate-bw.png
new file mode 100644
index 0000000..d62dcb6
Binary files /dev/null and b/cursors/tool-rotate-bw.png differ
diff --git a/cursors/tool-shear-bw.png b/cursors/tool-shear-bw.png
new file mode 100644
index 0000000..88d2514
Binary files /dev/null and b/cursors/tool-shear-bw.png differ
diff --git a/cursors/tool-smudge-bw.png b/cursors/tool-smudge-bw.png
new file mode 100644
index 0000000..9cf220b
Binary files /dev/null and b/cursors/tool-smudge-bw.png differ
diff --git a/cursors/tool-text-bw.png b/cursors/tool-text-bw.png
new file mode 100644
index 0000000..83a9560
Binary files /dev/null and b/cursors/tool-text-bw.png differ
diff --git a/cursors/tool-zoom-bw.png b/cursors/tool-zoom-bw.png
new file mode 100644
index 0000000..46281d8
Binary files /dev/null and b/cursors/tool-zoom-bw.png differ
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]