home *** CD-ROM | disk | FTP | other *** search
/ PC Pro 2002 April / pcpro0402.iso / essentials / graphics / Gimp / gimp-src-20001226.exe / src / gimp / app / cursorutil.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-12-17  |  2.7 KB  |  97 lines

  1. /* The GIMP -- an image manipulation program
  2.  * Copyright (C) 1995 Spencer Kimball and Peter Mattis
  3.  *
  4.  * This program is free software; you can redistribute it and/or modify
  5.  * it under the terms of the GNU General Public License as published by
  6.  * the Free Software Foundation; either version 2 of the License, or
  7.  * (at your option) any later version.
  8.  *
  9.  * This program is distributed in the hope that it will be useful,
  10.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  12.  * GNU General Public License for more details.
  13.  *
  14.  * You should have received a copy of the GNU General Public License
  15.  * along with this program; if not, write to the Free Software
  16.  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  17.  */
  18. #ifndef __CURSORUTIL_H__
  19. #define __CURSORUTIL_H__
  20.  
  21.  
  22. #include <gtk/gtk.h>
  23.  
  24. #include <gdk/gdktypes.h>
  25. #if defined (GDK_WINDOWING_WIN32) || defined (GDK_WINDOWING_X11)
  26. /* Stopgap measure to detect build with current CVS GTk+ */
  27. #include <gdk/gdkcursor.h>
  28. #endif
  29.  
  30. #include "toolsF.h"
  31.  
  32.  
  33. typedef struct
  34. {
  35.   guchar    *bits;
  36.   guchar    *mask_bits;
  37.   gint       width, height;
  38.   gint       x_hot, y_hot;
  39.   GdkBitmap *bitmap;
  40.   GdkBitmap *mask;
  41.   GdkCursor *cursor;
  42. } BitmapCursor;
  43.  
  44. typedef enum
  45. {
  46.   CURSOR_MODE_TOOL_ICON,
  47.   CURSOR_MODE_TOOL_CROSSHAIR,
  48.   CURSOR_MODE_CROSSHAIR
  49. } CursorMode;
  50.  
  51. typedef enum
  52. {
  53.   CURSOR_MODIFIER_NONE,
  54.   CURSOR_MODIFIER_PLUS,
  55.   CURSOR_MODIFIER_MINUS,
  56.   CURSOR_MODIFIER_INTERSECT,
  57.   CURSOR_MODIFIER_MOVE,
  58.   CURSOR_MODIFIER_RESIZE,
  59.   CURSOR_MODIFIER_CONTROL,
  60.   CURSOR_MODIFIER_ANCHOR,
  61.   CURSOR_MODIFIER_FOREGROUND,
  62.   CURSOR_MODIFIER_BACKGROUND,
  63.   CURSOR_MODIFIER_PATTERN,
  64.   CURSOR_MODIFIER_HAND
  65. } CursorModifier;
  66.  
  67. typedef enum
  68. {
  69.   GIMP_MOUSE_CURSOR = (GDK_LAST_CURSOR + 2),
  70.   GIMP_CROSSHAIR_CURSOR,
  71.   GIMP_CROSSHAIR_SMALL_CURSOR,
  72.   GIMP_BAD_CURSOR,
  73.   GIMP_ZOOM_CURSOR,
  74.   GIMP_COLOR_PICKER_CURSOR,
  75.   GIMP_LAST_CURSOR_ENTRY
  76. } GimpCursorType;
  77.  
  78. /* FIXME: gimp_busy HACK */
  79. extern gboolean gimp_busy;
  80.  
  81. void       change_win_cursor                (GdkWindow      *win,
  82.                          GdkCursorType   curtype,
  83.                          ToolType        tool_type,
  84.                          CursorModifier  modifier,
  85.                          gboolean        toggle_cursor);
  86. void       unset_win_cursor                 (GdkWindow      *win);
  87.  
  88. void       gimp_add_busy_cursors_until_idle (void);
  89. void       gimp_add_busy_cursors            (void);
  90. gint       gimp_remove_busy_cursors         (gpointer        data);
  91.  
  92. gboolean   gtkutil_compress_motion          (GtkWidget      *widget,
  93.                          gdouble        *lastmotion_x,
  94.                          gdouble        *lastmotion_y);
  95.  
  96. #endif /*  __CURSORUTIL_H__  */
  97.