gimp/app/display/gimpdisplay.h

316 lines
14 KiB
C
Raw Normal View History

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
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
1997-11-25 06:05:25 +08:00
*/
app/Makefile.am app/channel_pvt.h app/drawable_pvt.h app/gdisplayF.h 2000-12-29 Michael Natterer <mitch@gimp.org> * app/Makefile.am * app/channel_pvt.h * app/drawable_pvt.h * app/gdisplayF.h * app/gimpdrawableP.h * app/gimpimageP.h * app/layer_pvt.h * app/toolsF.h: removed these files. * app/apptypes.h * tools/pdbgen/enums.pl: added tons of opaque typedefs and enums. * tools/pdbgen/pdb/brush_select.pdb * tools/pdbgen/pdb/brushes.pdb * tools/pdbgen/pdb/channel.pdb * tools/pdbgen/pdb/color.pdb * tools/pdbgen/pdb/convert.pdb * tools/pdbgen/pdb/display.pdb * tools/pdbgen/pdb/drawable.pdb * tools/pdbgen/pdb/fileops.pdb * tools/pdbgen/pdb/gradient_select.pdb * tools/pdbgen/pdb/gradients.pdb * tools/pdbgen/pdb/help.pdb * tools/pdbgen/pdb/image.pdb * tools/pdbgen/pdb/layer.pdb * tools/pdbgen/pdb/pattern_select.pdb * tools/pdbgen/pdb/patterns.pdb * tools/pdbgen/pdb/selection.pdb * tools/pdbgen/pdb/tools.pdb * app/*: chainsaw #include cleanup: - Never (never!!) include stuff in header files except where we need access to structures' contents (like derived objects). - Added prototypes and proper formating in many files. - The #include order in *all* *.c files is as follows: #include "config.h" #include <system stuff> #include <gtk/gtk.h> #include "apptypes.h" #include "gimp stuff" #include "libgimp stuff" #include "libgimp/gimpintl.h" By following this scheme we can easily see a file's dependencies from it's #include's and can grep for the inclusion to find out where a file is used. * tools/pdbgen/app.pl: changed to follow the include scheme above. * libgimp/Makefile.am * libgimp/gimpuitypes.h: new file, included from libgimp/gimpui.h and from app/apptypes.h. * libgimp/gimpcolorbutton.[ch] * libgimp/gimpdialog.[ch] * libgimp/gimphelpui.[ch] * libgimp/gimpparasite.[ch] * libgimp/gimppatheditor.[ch] * libgimp/gimpprotocol.c * libgimp/gimpquerybox.[ch] * libgimp/gimpsizeentry.[ch] * libgimp/gimptypes.h * libgimp/gimpui.h * libgimp/gimpunit.h * libgimp/gimpunitmenu.[ch] * libgimp/gimpwidgets.[ch]: changed accordingly. * plug-ins/FractalExplorer/Dialogs.c * plug-ins/gdyntext/message_window.c * plug-ins/imagemap/imap_default_dialog.c * plug-ins/imagemap/imap_file.c: these files used to include "libgimp/gimpui.h" without including "libgimp/gimp.h". This is no longer possible because the libgimpui headers don't inlcude "libgimp/gimpunit.h" any more.
2000-12-29 23:22:01 +08:00
1997-11-25 06:05:25 +08:00
#ifndef __GDISPLAY_H__
#define __GDISPLAY_H__
app/Makefile.am app/channel_pvt.h app/drawable_pvt.h app/gdisplayF.h 2000-12-29 Michael Natterer <mitch@gimp.org> * app/Makefile.am * app/channel_pvt.h * app/drawable_pvt.h * app/gdisplayF.h * app/gimpdrawableP.h * app/gimpimageP.h * app/layer_pvt.h * app/toolsF.h: removed these files. * app/apptypes.h * tools/pdbgen/enums.pl: added tons of opaque typedefs and enums. * tools/pdbgen/pdb/brush_select.pdb * tools/pdbgen/pdb/brushes.pdb * tools/pdbgen/pdb/channel.pdb * tools/pdbgen/pdb/color.pdb * tools/pdbgen/pdb/convert.pdb * tools/pdbgen/pdb/display.pdb * tools/pdbgen/pdb/drawable.pdb * tools/pdbgen/pdb/fileops.pdb * tools/pdbgen/pdb/gradient_select.pdb * tools/pdbgen/pdb/gradients.pdb * tools/pdbgen/pdb/help.pdb * tools/pdbgen/pdb/image.pdb * tools/pdbgen/pdb/layer.pdb * tools/pdbgen/pdb/pattern_select.pdb * tools/pdbgen/pdb/patterns.pdb * tools/pdbgen/pdb/selection.pdb * tools/pdbgen/pdb/tools.pdb * app/*: chainsaw #include cleanup: - Never (never!!) include stuff in header files except where we need access to structures' contents (like derived objects). - Added prototypes and proper formating in many files. - The #include order in *all* *.c files is as follows: #include "config.h" #include <system stuff> #include <gtk/gtk.h> #include "apptypes.h" #include "gimp stuff" #include "libgimp stuff" #include "libgimp/gimpintl.h" By following this scheme we can easily see a file's dependencies from it's #include's and can grep for the inclusion to find out where a file is used. * tools/pdbgen/app.pl: changed to follow the include scheme above. * libgimp/Makefile.am * libgimp/gimpuitypes.h: new file, included from libgimp/gimpui.h and from app/apptypes.h. * libgimp/gimpcolorbutton.[ch] * libgimp/gimpdialog.[ch] * libgimp/gimphelpui.[ch] * libgimp/gimpparasite.[ch] * libgimp/gimppatheditor.[ch] * libgimp/gimpprotocol.c * libgimp/gimpquerybox.[ch] * libgimp/gimpsizeentry.[ch] * libgimp/gimptypes.h * libgimp/gimpui.h * libgimp/gimpunit.h * libgimp/gimpunitmenu.[ch] * libgimp/gimpwidgets.[ch]: changed accordingly. * plug-ins/FractalExplorer/Dialogs.c * plug-ins/gdyntext/message_window.c * plug-ins/imagemap/imap_default_dialog.c * plug-ins/imagemap/imap_file.c: these files used to include "libgimp/gimpui.h" without including "libgimp/gimp.h". This is no longer possible because the libgimpui headers don't inlcude "libgimp/gimpunit.h" any more.
2000-12-29 23:22:01 +08:00
typedef enum
{
SelectionOff,
SelectionLayerOff,
SelectionOn,
SelectionPause,
SelectionResume
} SelectionControl;
1997-11-25 06:05:25 +08:00
/* some useful macros */
/* unpacking the user scale level (char) */
1997-11-25 06:05:25 +08:00
#define SCALESRC(g) (g->scale & 0x00ff)
#define SCALEDEST(g) (g->scale >> 8)
/* finding the effective screen resolution (double) */
#define SCREEN_XRES(g) (g->dot_for_dot? g->gimage->xresolution : monitor_xres)
#define SCREEN_YRES(g) (g->dot_for_dot? g->gimage->yresolution : monitor_yres)
/* calculate scale factors (double) */
#define SCALEFACTOR_X(g) ((SCALEDEST(g) * SCREEN_XRES(g)) / \
(SCALESRC(g) * g->gimage->xresolution))
#define SCALEFACTOR_Y(g) ((SCALEDEST(g) * SCREEN_YRES(g)) / \
(SCALESRC(g) * g->gimage->yresolution))
/* scale values */
#define SCALEX(g,x) ((int)(x * SCALEFACTOR_X(g)))
#define SCALEY(g,y) ((int)(y * SCALEFACTOR_Y(g)))
/* unscale values */
#define UNSCALEX(g,x) ((int)(x / SCALEFACTOR_X(g)))
#define UNSCALEY(g,y) ((int)(y / SCALEFACTOR_Y(g)))
/* (and float-returning versions) */
#define FUNSCALEX(g,x) ((x / SCALEFACTOR_X(g)))
#define FUNSCALEY(g,y) ((y / SCALEFACTOR_Y(g)))
1997-11-25 06:05:25 +08:00
#define LOWPASS(x) ((x>0) ? x : 0)
/* #define HIGHPASS(x,y) ((x>y) ? y : x) */ /* unused - == MIN */
1997-11-25 06:05:25 +08:00
/* maximal width of the string holding the cursor-coordinates for
the status line */
#define CURSOR_STR_LENGTH 256
/* maximal length of the format string for the cursor-coordinates */
#define CURSOR_FORMAT_LENGTH 32
typedef struct _IdleRenderStruct IdleRenderStruct;
struct _IdleRenderStruct
{
gint width;
gint height;
gint x;
gint y;
gint basex;
gint basey;
guint idleid;
/*guint handlerid;*/
gboolean active;
GSList *update_areas; /* flushed update areas */
};
1997-11-25 06:05:25 +08:00
struct _GDisplay
{
gint ID; /* unique identifier for this gdisplay */
1997-11-25 06:05:25 +08:00
GtkItemFactory *ifactory; /* factory for popup menu */
GtkWidget *shell; /* shell widget for this gdisplay */
GtkWidget *canvas; /* canvas widget for this gdisplay */
GtkWidget *hsb, *vsb; /* widgets for scroll bars */
GtkWidget *qmaskoff; /* widgets for qmask buttons */
GtkWidget *qmaskon;
GtkWidget *hrule; /* widgets for rulers */
GtkWidget *vrule;
GtkWidget *origin; /* widgets for rulers */
GtkWidget *statusarea; /* hbox holding the statusbar and stuff */
GtkWidget *statusbar; /* widget for statusbar */
GtkWidget *progressbar; /* widget for progressbar */
GtkWidget *cursor_label; /* widget for cursor position */
gchar cursor_format_str[CURSOR_FORMAT_LENGTH];
/* we need a variable format string because
* different units have different number
* of decimals
*/
GtkWidget *cancelbutton; /* widget for cancel button */
guint progressid; /* id of statusbar message for progress */
1997-11-25 06:05:25 +08:00
InfoDialog *window_info_dialog; /* dialog box for image information */
InfoDialog *window_nav_dialog; /* dialog box for image navigation */
GtkWidget *nav_popup; /* widget for the popup navigation window */
1997-11-25 06:05:25 +08:00
GtkAdjustment *hsbdata; /* horizontal data information */
GtkAdjustment *vsbdata; /* vertical data information */
GdkPixmap *icon; /* Pixmap for the icon */
GdkBitmap *iconmask; /* Bitmap for the icon mask */
guint iconsize; /* The size of the icon pixmap */
guint icon_needs_update; /* Do we need to render a new icon? */
gint icon_timeout_id; /* The ID of the timeout-function */
gint icon_idle_id; /* The ID of the idle-function */
GimpImage *gimage; /* pointer to the associated gimage struct */
gint instance; /* the instance # of this gdisplay as */
1997-11-25 06:05:25 +08:00
/* taken from the gimage at creation */
gint disp_width; /* width of drawing area in the window */
gint disp_height; /* height of drawing area in the window */
gint disp_xoffset;
gint disp_yoffset;
1997-11-25 06:05:25 +08:00
gint offset_x; /* offset of display image into raw image */
gint offset_y;
gint scale; /* scale factor from original raw image */
gboolean dot_for_dot; /* is monitor resolution being ignored? */
gboolean draw_guides; /* should the guides be drawn? */
gboolean snap_to_guides; /* should the guides be snapped to? */
1997-11-25 06:05:25 +08:00
Selection *select; /* Selection object */
GdkGC *scroll_gc; /* GC for scrolling */
GSList *update_areas; /* Update areas list */
GSList *display_areas; /* Display areas list */
1997-11-25 06:05:25 +08:00
updated. 2001-02-24 Michael Natterer <mitch@gimp.org> * TODO.xml: updated. * app/appenums.h * app/apptypes.h: prefixed the cursor stuff with "Gimp", added the new stock tool cursor enum. Removed the old ToolType enum. * app/cursorutil.[ch] * app/gdisplay.[ch]: removed the old ToolType enum and prefixed the functions with "gimp_". Also stripped all "toggle cursor" stuff from the cursor code, so the new API is easier and not depending on the tool system. All existing tool cursors can be used via the new stock tool cursor enum, so no tool has to fiddle around with bitmap cursors. There will be an cursorutil function for registering stock tool cursor types on the fly. * app/disp_callbacks.c * app/scroll.[ch]: moved the display scrollbar callbacks from scroll.[ch] to disp_callbacks.c. Removed some crap from scroll.h * app/tools/tool.[ch]: removed the BitmapCursor pointers from the tool class struct and add cursor and toggle cursor IDs to the GimpTool struct. Work in progress. * app/dialog_handler.c * app/tools/bezier_select.c * app/tools/blend.c * app/tools/bucket_fill.c * app/tools/by_color_select.c * app/tools/clone.c * app/tools/color_picker.c * app/tools/convolve.c * app/tools/crop.c * app/tools/dodgeburn.c * app/tools/edit_selection.c * app/tools/ellipse_select.c * app/tools/flip_tool.c * app/tools/free_select.c * app/tools/fuzzy_select.c * app/tools/ink.c * app/tools/iscissors.c * app/tools/magnify.c * app/tools/measure.c * app/tools/move.c * app/tools/paint_core.[ch] * app/tools/perspective_tool.c * app/tools/rect_select.c * app/tools/rotate_tool.c * app/tools/scale_tool.c * app/tools/shear_tool.c * app/tools/text_tool.c * app/tools/transform_core.[ch]: changed accordingly. Did this "blind" for most tools because they don't compile. The changes are minimal, so there should be no conflicts.
2001-02-25 03:29:47 +08:00
GdkCursorType current_cursor; /* Currently installed main cursor */
GimpToolCursorType tool_cursor; /* Current Tool cursor */
GimpCursorModifier cursor_modifier; /* Cursor modifier (plus, minus, ...) */
GdkCursorType override_cursor; /* Overriding cursor (ie. hourglass) */
Cursor patch II: This is only the logic inside the cursor system and not 2000-06-09 Michael Natterer <mitch@gimp.org> Cursor patch II: This is only the logic inside the cursor system and not yet used. * app/cursorutil.[ch]: [gimp]_change_win_cursor() take lots of parameters now and compose cursors from up to three cursor bitmaps/masks. * app/gdisplay.[ch]: As a test, create a hardcoded example cursor if "Cursor Mode" is set to "Tool Icon with Crosshair" in prefs. * app/curves.c * app/dialog_handler.c * app/scroll.c: changed the calls to the win_cursor function. * app/tools.[ch]: added a cursor and a toggle cursor to the ToolInfo structure of all tools. * app/toolsF.h: new ToolType TOOL_TYPE_NONE. * app/gimpdnd.c * app/interface.c: check for silly filenames in the file dnd callback. Closes #13733. * Makefile.am * cursors/bucket_fill_small.xbm * cursors/bucket_fill_small_mask.xbm * cursors/crop_small.xbm * cursors/crop_small_mask.xbm * cursors/crosshair_small.xbm * cursors/crosshair_small_mask.xbm * cursors/ellipse_select_small.xbm * cursors/ellipse_select_small_mask.xbm * cursors/eraser_small.xbm * cursors/eraser_small_mask.xbm * cursors/free_select_small.xbm * cursors/free_select_small_mask.xbm * cursors/fuzzy_select_small.xbm * cursors/fuzzy_select_small_mask.xbm * cursors/intersect.xbm * cursors/intersect_mask.xbm * cursors/minus.xbm * cursors/minus_mask.xbm * cursors/move.xbm * cursors/move_mask.xbm * cursors/paintbrush_small.xbm * cursors/paintbrush_small_mask.xbm * cursors/pencil_small.xbm * cursors/pencil_small_mask.xbm * cursors/plus.xbm * cursors/plus_mask.xbm * cursors/rect_select_small.xbm * cursors/rect_select_small_mask.xbm * cursors/resize_small.xbm * cursors/resize_small_mask.xbm * cursors/zoom.xbm * cursors/zoom_mask.xbm * cursors/zoom_small.xbm * cursors/zoom_small_mask.xbm: new files extracted from Tigert's gimp-tool-cursors.xcf created at GimpCon. Tigert, I'll commit the xcf as soon as I've added empty layers with the names of the cursors that are missing. * cursors/mouse.xbm * cursors/mouse_mask.xbm: made it 32x32 to allow for cursor composition.
2000-06-09 20:31:19 +08:00
gboolean using_override_cursor; /* is the cursor overridden? (ie. hourglass)*/
gboolean draw_cursor; /* should we draw software cursor ? */
updated. 2001-02-24 Michael Natterer <mitch@gimp.org> * TODO.xml: updated. * app/appenums.h * app/apptypes.h: prefixed the cursor stuff with "Gimp", added the new stock tool cursor enum. Removed the old ToolType enum. * app/cursorutil.[ch] * app/gdisplay.[ch]: removed the old ToolType enum and prefixed the functions with "gimp_". Also stripped all "toggle cursor" stuff from the cursor code, so the new API is easier and not depending on the tool system. All existing tool cursors can be used via the new stock tool cursor enum, so no tool has to fiddle around with bitmap cursors. There will be an cursorutil function for registering stock tool cursor types on the fly. * app/disp_callbacks.c * app/scroll.[ch]: moved the display scrollbar callbacks from scroll.[ch] to disp_callbacks.c. Removed some crap from scroll.h * app/tools/tool.[ch]: removed the BitmapCursor pointers from the tool class struct and add cursor and toggle cursor IDs to the GimpTool struct. Work in progress. * app/dialog_handler.c * app/tools/bezier_select.c * app/tools/blend.c * app/tools/bucket_fill.c * app/tools/by_color_select.c * app/tools/clone.c * app/tools/color_picker.c * app/tools/convolve.c * app/tools/crop.c * app/tools/dodgeburn.c * app/tools/edit_selection.c * app/tools/ellipse_select.c * app/tools/flip_tool.c * app/tools/free_select.c * app/tools/fuzzy_select.c * app/tools/ink.c * app/tools/iscissors.c * app/tools/magnify.c * app/tools/measure.c * app/tools/move.c * app/tools/paint_core.[ch] * app/tools/perspective_tool.c * app/tools/rect_select.c * app/tools/rotate_tool.c * app/tools/scale_tool.c * app/tools/shear_tool.c * app/tools/text_tool.c * app/tools/transform_core.[ch]: changed accordingly. Did this "blind" for most tools because they don't compile. The changes are minimal, so there should be no conflicts.
2001-02-25 03:29:47 +08:00
gint cursor_x; /* software cursor X value */
gint cursor_y; /* software cursor Y value */
gboolean proximity; /* is a device in proximity of gdisplay ? */
gboolean have_cursor; /* is cursor currently drawn ? */
IdleRenderStruct idle_render; /* state of this gdisplay's render thread */
#ifdef DISPLAY_FILTERS
Cursor patch II: This is only the logic inside the cursor system and not 2000-06-09 Michael Natterer <mitch@gimp.org> Cursor patch II: This is only the logic inside the cursor system and not yet used. * app/cursorutil.[ch]: [gimp]_change_win_cursor() take lots of parameters now and compose cursors from up to three cursor bitmaps/masks. * app/gdisplay.[ch]: As a test, create a hardcoded example cursor if "Cursor Mode" is set to "Tool Icon with Crosshair" in prefs. * app/curves.c * app/dialog_handler.c * app/scroll.c: changed the calls to the win_cursor function. * app/tools.[ch]: added a cursor and a toggle cursor to the ToolInfo structure of all tools. * app/toolsF.h: new ToolType TOOL_TYPE_NONE. * app/gimpdnd.c * app/interface.c: check for silly filenames in the file dnd callback. Closes #13733. * Makefile.am * cursors/bucket_fill_small.xbm * cursors/bucket_fill_small_mask.xbm * cursors/crop_small.xbm * cursors/crop_small_mask.xbm * cursors/crosshair_small.xbm * cursors/crosshair_small_mask.xbm * cursors/ellipse_select_small.xbm * cursors/ellipse_select_small_mask.xbm * cursors/eraser_small.xbm * cursors/eraser_small_mask.xbm * cursors/free_select_small.xbm * cursors/free_select_small_mask.xbm * cursors/fuzzy_select_small.xbm * cursors/fuzzy_select_small_mask.xbm * cursors/intersect.xbm * cursors/intersect_mask.xbm * cursors/minus.xbm * cursors/minus_mask.xbm * cursors/move.xbm * cursors/move_mask.xbm * cursors/paintbrush_small.xbm * cursors/paintbrush_small_mask.xbm * cursors/pencil_small.xbm * cursors/pencil_small_mask.xbm * cursors/plus.xbm * cursors/plus_mask.xbm * cursors/rect_select_small.xbm * cursors/rect_select_small_mask.xbm * cursors/resize_small.xbm * cursors/resize_small_mask.xbm * cursors/zoom.xbm * cursors/zoom_mask.xbm * cursors/zoom_small.xbm * cursors/zoom_small_mask.xbm: new files extracted from Tigert's gimp-tool-cursors.xcf created at GimpCon. Tigert, I'll commit the xcf as soon as I've added empty layers with the names of the cursors that are missing. * cursors/mouse.xbm * cursors/mouse_mask.xbm: made it 32x32 to allow for cursor composition.
2000-06-09 20:31:19 +08:00
GList *cd_list; /* color display conversion stuff */
GtkWidget *cd_ui; /* color display filter dialog */
#endif /* DISPLAY_FILTERS */
GtkWidget *warning_dialog; /* "Changes were made to %s. Close anyway?" */
1997-11-25 06:05:25 +08:00
};
/* member function declarations */
GDisplay * gdisplay_new (GimpImage *gimage,
guint scale);
void gdisplay_reconnect (GDisplay *gdisp,
GimpImage *gimage);
void gdisplay_remove_and_delete (GDisplay *gdisp);
gint gdisplay_mask_value (GDisplay *gdisp,
gint x,
gint y);
gint gdisplay_mask_bounds (GDisplay *gdisp,
gint *x1,
gint *y1,
gint *x2,
gint *y2);
void gdisplay_transform_coords (GDisplay *gdisp,
gint x,
gint y,
gint *nx,
gint *ny,
gboolean use_offsets);
void gdisplay_untransform_coords (GDisplay *gdisp,
gint x,
gint y,
gint *nx,
gint *ny,
gboolean round,
gboolean use_offsets);
void gdisplay_transform_coords_f (GDisplay *gdisp,
gdouble x,
gdouble y,
gdouble *nx,
gdouble *ny,
gboolean use_offsets);
void gdisplay_untransform_coords_f (GDisplay *gdisp,
gdouble x,
gdouble y,
gdouble *nx,
gdouble *ny,
gboolean use_offsets);
Cursor patch II: This is only the logic inside the cursor system and not 2000-06-09 Michael Natterer <mitch@gimp.org> Cursor patch II: This is only the logic inside the cursor system and not yet used. * app/cursorutil.[ch]: [gimp]_change_win_cursor() take lots of parameters now and compose cursors from up to three cursor bitmaps/masks. * app/gdisplay.[ch]: As a test, create a hardcoded example cursor if "Cursor Mode" is set to "Tool Icon with Crosshair" in prefs. * app/curves.c * app/dialog_handler.c * app/scroll.c: changed the calls to the win_cursor function. * app/tools.[ch]: added a cursor and a toggle cursor to the ToolInfo structure of all tools. * app/toolsF.h: new ToolType TOOL_TYPE_NONE. * app/gimpdnd.c * app/interface.c: check for silly filenames in the file dnd callback. Closes #13733. * Makefile.am * cursors/bucket_fill_small.xbm * cursors/bucket_fill_small_mask.xbm * cursors/crop_small.xbm * cursors/crop_small_mask.xbm * cursors/crosshair_small.xbm * cursors/crosshair_small_mask.xbm * cursors/ellipse_select_small.xbm * cursors/ellipse_select_small_mask.xbm * cursors/eraser_small.xbm * cursors/eraser_small_mask.xbm * cursors/free_select_small.xbm * cursors/free_select_small_mask.xbm * cursors/fuzzy_select_small.xbm * cursors/fuzzy_select_small_mask.xbm * cursors/intersect.xbm * cursors/intersect_mask.xbm * cursors/minus.xbm * cursors/minus_mask.xbm * cursors/move.xbm * cursors/move_mask.xbm * cursors/paintbrush_small.xbm * cursors/paintbrush_small_mask.xbm * cursors/pencil_small.xbm * cursors/pencil_small_mask.xbm * cursors/plus.xbm * cursors/plus_mask.xbm * cursors/rect_select_small.xbm * cursors/rect_select_small_mask.xbm * cursors/resize_small.xbm * cursors/resize_small_mask.xbm * cursors/zoom.xbm * cursors/zoom_mask.xbm * cursors/zoom_small.xbm * cursors/zoom_small_mask.xbm: new files extracted from Tigert's gimp-tool-cursors.xcf created at GimpCon. Tigert, I'll commit the xcf as soon as I've added empty layers with the names of the cursors that are missing. * cursors/mouse.xbm * cursors/mouse_mask.xbm: made it 32x32 to allow for cursor composition.
2000-06-09 20:31:19 +08:00
updated. 2001-02-24 Michael Natterer <mitch@gimp.org> * TODO.xml: updated. * app/appenums.h * app/apptypes.h: prefixed the cursor stuff with "Gimp", added the new stock tool cursor enum. Removed the old ToolType enum. * app/cursorutil.[ch] * app/gdisplay.[ch]: removed the old ToolType enum and prefixed the functions with "gimp_". Also stripped all "toggle cursor" stuff from the cursor code, so the new API is easier and not depending on the tool system. All existing tool cursors can be used via the new stock tool cursor enum, so no tool has to fiddle around with bitmap cursors. There will be an cursorutil function for registering stock tool cursor types on the fly. * app/disp_callbacks.c * app/scroll.[ch]: moved the display scrollbar callbacks from scroll.[ch] to disp_callbacks.c. Removed some crap from scroll.h * app/tools/tool.[ch]: removed the BitmapCursor pointers from the tool class struct and add cursor and toggle cursor IDs to the GimpTool struct. Work in progress. * app/dialog_handler.c * app/tools/bezier_select.c * app/tools/blend.c * app/tools/bucket_fill.c * app/tools/by_color_select.c * app/tools/clone.c * app/tools/color_picker.c * app/tools/convolve.c * app/tools/crop.c * app/tools/dodgeburn.c * app/tools/edit_selection.c * app/tools/ellipse_select.c * app/tools/flip_tool.c * app/tools/free_select.c * app/tools/fuzzy_select.c * app/tools/ink.c * app/tools/iscissors.c * app/tools/magnify.c * app/tools/measure.c * app/tools/move.c * app/tools/paint_core.[ch] * app/tools/perspective_tool.c * app/tools/rect_select.c * app/tools/rotate_tool.c * app/tools/scale_tool.c * app/tools/shear_tool.c * app/tools/text_tool.c * app/tools/transform_core.[ch]: changed accordingly. Did this "blind" for most tools because they don't compile. The changes are minimal, so there should be no conflicts.
2001-02-25 03:29:47 +08:00
void gdisplay_real_install_tool_cursor (GDisplay *gdisp,
GdkCursorType cursor_type,
GimpToolCursorType tool_cursor,
GimpCursorModifier modifier,
gboolean always_install);
void gdisplay_install_tool_cursor (GDisplay *gdisp,
GdkCursorType cursor_type,
GimpToolCursorType tool_cursor,
GimpCursorModifier modifier);
void gdisplay_remove_tool_cursor (GDisplay *gdisp);
void gdisplay_install_override_cursor (GDisplay *gdisp,
GdkCursorType cursor_type);
void gdisplay_remove_override_cursor (GDisplay *gdisp);
Cursor patch II: This is only the logic inside the cursor system and not 2000-06-09 Michael Natterer <mitch@gimp.org> Cursor patch II: This is only the logic inside the cursor system and not yet used. * app/cursorutil.[ch]: [gimp]_change_win_cursor() take lots of parameters now and compose cursors from up to three cursor bitmaps/masks. * app/gdisplay.[ch]: As a test, create a hardcoded example cursor if "Cursor Mode" is set to "Tool Icon with Crosshair" in prefs. * app/curves.c * app/dialog_handler.c * app/scroll.c: changed the calls to the win_cursor function. * app/tools.[ch]: added a cursor and a toggle cursor to the ToolInfo structure of all tools. * app/toolsF.h: new ToolType TOOL_TYPE_NONE. * app/gimpdnd.c * app/interface.c: check for silly filenames in the file dnd callback. Closes #13733. * Makefile.am * cursors/bucket_fill_small.xbm * cursors/bucket_fill_small_mask.xbm * cursors/crop_small.xbm * cursors/crop_small_mask.xbm * cursors/crosshair_small.xbm * cursors/crosshair_small_mask.xbm * cursors/ellipse_select_small.xbm * cursors/ellipse_select_small_mask.xbm * cursors/eraser_small.xbm * cursors/eraser_small_mask.xbm * cursors/free_select_small.xbm * cursors/free_select_small_mask.xbm * cursors/fuzzy_select_small.xbm * cursors/fuzzy_select_small_mask.xbm * cursors/intersect.xbm * cursors/intersect_mask.xbm * cursors/minus.xbm * cursors/minus_mask.xbm * cursors/move.xbm * cursors/move_mask.xbm * cursors/paintbrush_small.xbm * cursors/paintbrush_small_mask.xbm * cursors/pencil_small.xbm * cursors/pencil_small_mask.xbm * cursors/plus.xbm * cursors/plus_mask.xbm * cursors/rect_select_small.xbm * cursors/rect_select_small_mask.xbm * cursors/resize_small.xbm * cursors/resize_small_mask.xbm * cursors/zoom.xbm * cursors/zoom_mask.xbm * cursors/zoom_small.xbm * cursors/zoom_small_mask.xbm: new files extracted from Tigert's gimp-tool-cursors.xcf created at GimpCon. Tigert, I'll commit the xcf as soon as I've added empty layers with the names of the cursors that are missing. * cursors/mouse.xbm * cursors/mouse_mask.xbm: made it 32x32 to allow for cursor composition.
2000-06-09 20:31:19 +08:00
void gdisplay_set_menu_sensitivity (GDisplay *gdisp);
void gdisplay_expose_area (GDisplay *gdisp,
gint x,
gint y,
gint w,
gint h);
void gdisplay_expose_guide (GDisplay *gdisp,
Guide *guide);
void gdisplay_expose_full (GDisplay *gdisp);
void gdisplay_flush (GDisplay *gdisp);
void gdisplay_flush_now (GDisplay *gdisp);
void gdisplay_update_icon (GDisplay *gdisp);
gboolean gdisplay_update_icon_timer (gpointer data);
gboolean gdisplay_update_icon_invoker (gpointer data);
void gdisplay_update_icon_scheduler (GimpImage *gimage,
gpointer data);
void gdisplay_draw_guides (GDisplay *gdisp);
void gdisplay_draw_guide (GDisplay *gdisp,
Guide *guide,
gboolean active);
Guide * gdisplay_find_guide (GDisplay *gdisp,
gdouble x,
double y);
gboolean gdisplay_snap_point (GDisplay *gdisp,
gdouble x,
gdouble y,
gdouble *tx,
gdouble *ty);
void gdisplay_snap_rectangle (GDisplay *gdisp,
gdouble x1,
gdouble y1,
gdouble x2,
gdouble y2,
gdouble *tx1,
gdouble *ty1);
void gdisplay_update_cursor (GDisplay *gdisp,
gint x,
gint y);
void gdisplay_set_dot_for_dot (GDisplay *gdisp,
gboolean dot_for_dot);
void gdisplay_resize_cursor_label (GDisplay *gdisp);
void gdisplay_update_title (GDisplay *gdisp);
void gdisplay_flush_displays_only (GDisplay *gdisp); /* no rerender! */
GDisplay * gdisplay_active (void);
GDisplay * gdisplay_get_by_ID (gint ID);
/* function declarations */
GDisplay * gdisplays_check_valid (GDisplay *gdisp,
GimpImage *gimage);
void gdisplays_reconnect (GimpImage *old,
GimpImage *new);
void gdisplays_update_title (GimpImage *gimage);
void gdisplays_resize_cursor_label (GimpImage *gimage);
void gdisplays_setup_scale (GimpImage *gimage);
void gdisplays_update_area (GimpImage *gimage,
gint x,
gint y,
gint w,
gint h);
void gdisplays_expose_guides (GimpImage *gimage);
void gdisplays_expose_guide (GimpImage *gimage,
Guide *guide);
void gdisplays_update_full (GimpImage *gimage);
void gdisplays_shrink_wrap (GimpImage *gimage);
void gdisplays_expose_full (void);
void gdisplays_selection_visibility (GimpImage *gimage,
SelectionControl function);
gboolean gdisplays_dirty (void);
void gdisplays_delete (void);
void gdisplays_flush (void);
void gdisplays_flush_now (void);
void gdisplays_finish_draw (void);
void gdisplays_nav_preview_resized (void);
void gdisplays_foreach (GFunc func,
gpointer user_data);
1997-11-25 06:05:25 +08:00
#endif /* __GDISPLAY_H__ */