1997-11-25 06:05:25 +08:00
|
|
|
/* The GIMP -- an image manipulation program
|
|
|
|
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
1998-04-13 13:44:11 +08:00
|
|
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
1997-11-25 06:05:25 +08:00
|
|
|
*/
|
|
|
|
#ifndef __CURSORUTIL_H__
|
|
|
|
#define __CURSORUTIL_H__
|
|
|
|
|
2000-02-29 03:25:42 +08:00
|
|
|
#include <glib.h>
|
|
|
|
|
1999-04-27 12:57:59 +08:00
|
|
|
#include <gdk/gdktypes.h>
|
1999-10-03 08:43:05 +08:00
|
|
|
#if defined (GDK_WINDOWING_WIN32) || defined (GDK_WINDOWING_X11)
|
|
|
|
/* Stopgap measure to detect build with current CVS GTk+ */
|
1999-10-26 03:20:41 +08:00
|
|
|
#include <gdk/gdkcursor.h>
|
1999-10-03 08:43:05 +08:00
|
|
|
#endif
|
1999-04-27 12:57:59 +08:00
|
|
|
|
2000-02-29 03:25:42 +08:00
|
|
|
#include <gtk/gtk.h>
|
|
|
|
|
2000-06-09 20:31:19 +08:00
|
|
|
#include "toolsF.h"
|
|
|
|
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
guchar *bits;
|
|
|
|
guchar *mask_bits;
|
|
|
|
gint width, height;
|
|
|
|
gint x_hot, y_hot;
|
|
|
|
GdkBitmap *bitmap;
|
|
|
|
GdkBitmap *mask;
|
|
|
|
GdkCursor *cursor;
|
|
|
|
} BitmapCursor;
|
|
|
|
|
|
|
|
typedef enum
|
2000-06-06 08:28:28 +08:00
|
|
|
{
|
|
|
|
CURSOR_MODE_TOOL_ICON,
|
|
|
|
CURSOR_MODE_TOOL_CROSSHAIR,
|
|
|
|
CURSOR_MODE_CROSSHAIR
|
2000-06-09 20:31:19 +08:00
|
|
|
} CursorMode;
|
|
|
|
|
|
|
|
typedef enum
|
|
|
|
{
|
|
|
|
CURSOR_MODIFIER_NONE,
|
|
|
|
CURSOR_MODIFIER_PLUS,
|
|
|
|
CURSOR_MODIFIER_MINUS,
|
|
|
|
CURSOR_MODIFIER_INTERSECT,
|
2000-06-14 18:59:16 +08:00
|
|
|
CURSOR_MODIFIER_MOVE,
|
|
|
|
CURSOR_MODIFIER_RESIZE,
|
|
|
|
CURSOR_MODIFIER_CONTROL,
|
2000-06-14 21:57:17 +08:00
|
|
|
CURSOR_MODIFIER_ANCHOR,
|
2000-07-30 00:12:40 +08:00
|
|
|
CURSOR_MODIFIER_FOREGROUND,
|
|
|
|
CURSOR_MODIFIER_BACKGROUND,
|
|
|
|
CURSOR_MODIFIER_PATTERN,
|
2000-06-14 18:59:16 +08:00
|
|
|
CURSOR_MODIFIER_HAND
|
2000-06-09 20:31:19 +08:00
|
|
|
} CursorModifier;
|
2000-06-06 08:28:28 +08:00
|
|
|
|
1999-05-05 17:10:35 +08:00
|
|
|
typedef enum
|
|
|
|
{
|
2000-03-02 03:32:41 +08:00
|
|
|
GIMP_MOUSE_CURSOR = (GDK_LAST_CURSOR + 2),
|
2000-06-06 08:28:28 +08:00
|
|
|
GIMP_CROSSHAIR_CURSOR,
|
2000-06-09 20:31:19 +08:00
|
|
|
GIMP_CROSSHAIR_SMALL_CURSOR,
|
1999-07-27 16:47:31 +08:00
|
|
|
GIMP_BAD_CURSOR,
|
2000-06-14 18:59:16 +08:00
|
|
|
GIMP_ZOOM_CURSOR,
|
2000-03-02 03:32:41 +08:00
|
|
|
GIMP_COLOR_PICKER_CURSOR,
|
1999-05-05 17:10:35 +08:00
|
|
|
GIMP_LAST_CURSOR_ENTRY
|
|
|
|
} GimpCursorType;
|
|
|
|
|
2000-06-14 18:59:16 +08:00
|
|
|
/* FIXME: gimp_busy HACK */
|
|
|
|
extern gboolean gimp_busy;
|
|
|
|
|
2000-06-09 20:31:19 +08:00
|
|
|
void change_win_cursor (GdkWindow *win,
|
|
|
|
GdkCursorType curtype,
|
|
|
|
ToolType tool_type,
|
|
|
|
CursorModifier modifier,
|
|
|
|
gboolean toggle_cursor);
|
|
|
|
void unset_win_cursor (GdkWindow *win);
|
1999-01-11 07:36:29 +08:00
|
|
|
|
2000-03-02 03:32:41 +08:00
|
|
|
void gimp_add_busy_cursors_until_idle (void);
|
|
|
|
void gimp_add_busy_cursors (void);
|
2000-06-09 20:31:19 +08:00
|
|
|
gint gimp_remove_busy_cursors (gpointer data);
|
2000-02-29 03:25:42 +08:00
|
|
|
|
2000-06-09 20:31:19 +08:00
|
|
|
gboolean gtkutil_compress_motion (GtkWidget *widget,
|
|
|
|
gdouble *lastmotion_x,
|
|
|
|
gdouble *lastmotion_y);
|
1997-11-25 06:05:25 +08:00
|
|
|
|
|
|
|
#endif /* __CURSORUTIL_H__ */
|