app/appenums.h app/core/core-types.h moved some more types to core-types.h

2001-05-13  Michael Natterer  <mitch@gimp.org>

	* app/appenums.h
	* app/core/core-types.h
	* app/tools/tools-types.h: moved some more types to core-types.h
	and tools-types.h.  Removed AUXILLARY_CHANNEL from the ChannelType
	enum.

	* app/gdisplay.[ch]: removed the "depth" and "color_type" fields
	from the struct. Cleaned up the header.

	* app/selection.c
	* app/gui/info-window.c: use g_visual->depth instead of
	gdisp->depth.

	* app/gimphelp.c: #include "core/core-types.h"

	* tools/pdbgen/Makefile.am: added app/core/core-types.h to the
	list of files to be scanned for enums.

	* libgimp/gimpenums.h
	* plug-ins/script-fu/script-fu-constants.c
	* tools/pdbgen/enums.pl
	* app/pdb/drawable_cmds.c
	* app/pdb/image_cmds.c
	* app/pdb/layer_cmds.c: regenerated.
This commit is contained in:
Michael Natterer 2001-05-13 17:25:12 +00:00 committed by Michael Natterer
parent 1a5a50d956
commit b86ce96ae4
26 changed files with 681 additions and 495 deletions

View File

@ -1,3 +1,30 @@
2001-05-13 Michael Natterer <mitch@gimp.org>
* app/appenums.h
* app/core/core-types.h
* app/tools/tools-types.h: moved some more types to core-types.h
and tools-types.h. Removed AUXILLARY_CHANNEL from the ChannelType
enum.
* app/gdisplay.[ch]: removed the "depth" and "color_type" fields
from the struct. Cleaned up the header.
* app/selection.c
* app/gui/info-window.c: use g_visual->depth instead of
gdisp->depth.
* app/gimphelp.c: #include "core/core-types.h"
* tools/pdbgen/Makefile.am: added app/core/core-types.h to the
list of files to be scanned for enums.
* libgimp/gimpenums.h
* plug-ins/script-fu/script-fu-constants.c
* tools/pdbgen/enums.pl
* app/pdb/drawable_cmds.c
* app/pdb/image_cmds.c
* app/pdb/layer_cmds.c: regenerated.
2001-05-13 Michael Natterer <mitch@gimp.org>
* TODO.xml: some percentage updates.

View File

@ -20,37 +20,6 @@
#define __APPENUMS_H__
/* Base image types */
typedef enum
{
RGB,
GRAY,
INDEXED
} GimpImageBaseType;
/* Image types */
typedef enum
{
RGB_GIMAGE, /*< nick=RGB_IMAGE >*/
RGBA_GIMAGE, /*< nick=RGBA_IMAGE >*/
GRAY_GIMAGE, /*< nick=GRAY_IMAGE >*/
GRAYA_GIMAGE, /*< nick=GRAYA_IMAGE >*/
INDEXED_GIMAGE, /*< nick=INDEXED_IMAGE >*/
INDEXEDA_GIMAGE /*< nick=INDEXEDA_IMAGE >*/
} GimpImageType;
/* Channel types */
typedef enum
{
RED_CHANNEL,
GREEN_CHANNEL,
BLUE_CHANNEL,
GRAY_CHANNEL,
INDEXED_CHANNEL,
ALPHA_CHANNEL,
AUXILLARY_CHANNEL
} ChannelType;
/* Fill types */
typedef enum
{
@ -111,12 +80,6 @@ typedef enum
INCREMENTAL /* convolve, smudge */
} PaintApplicationMode;
typedef enum
{
APPLY,
DISCARD
} MaskApplyMode;
typedef enum /*< chop=ADD_ >*/
{
ADD_WHITE_MASK,
@ -238,44 +201,6 @@ typedef enum
RUN_WITH_LAST_VALS = 2
} RunModeType;
/* The possible states for tools */
typedef enum /*< skip >*/
{
INACTIVE,
ACTIVE,
PAUSED
} ToolState;
/* Tool control actions */
typedef enum /*< skip >*/
{
PAUSE,
RESUME,
HALT,
DESTROY,
RECREATE
} ToolAction;
/* possible transform functions */
typedef enum /*< skip >*/
{
TRANSFORM_CREATING,
TRANSFORM_HANDLE_1,
TRANSFORM_HANDLE_2,
TRANSFORM_HANDLE_3,
TRANSFORM_HANDLE_4,
TRANSFORM_HANDLE_CENTER
} TransformAction;
/* the different states that the transformation function can be called with */
typedef enum /*< skip >*/
{
TRANSFORM_INIT,
TRANSFORM_MOTION,
TRANSFORM_RECALC,
TRANSFORM_FINISH
} TransformState;
typedef enum /*< skip >*/
{
CURSOR_MODE_TOOL_ICON,

View File

@ -23,6 +23,45 @@
#include "apptypes.h"
/* enums */
/* Base image types */
typedef enum
{
RGB,
GRAY,
INDEXED
} GimpImageBaseType;
/* Image types */
typedef enum
{
RGB_GIMAGE, /*< nick=RGB_IMAGE >*/
RGBA_GIMAGE, /*< nick=RGBA_IMAGE >*/
GRAY_GIMAGE, /*< nick=GRAY_IMAGE >*/
GRAYA_GIMAGE, /*< nick=GRAYA_IMAGE >*/
INDEXED_GIMAGE, /*< nick=INDEXED_IMAGE >*/
INDEXEDA_GIMAGE /*< nick=INDEXEDA_IMAGE >*/
} GimpImageType;
/* Channel types */
typedef enum
{
RED_CHANNEL,
GREEN_CHANNEL,
BLUE_CHANNEL,
GRAY_CHANNEL,
INDEXED_CHANNEL,
ALPHA_CHANNEL
} ChannelType;
typedef enum
{
APPLY,
DISCARD
} MaskApplyMode;
/* base objects */
typedef struct _GimpObject GimpObject;

View File

@ -150,7 +150,6 @@ gdisplay_new (GimpImage *gimage,
gdisp->window_info_dialog = NULL;
gdisp->window_nav_dialog = NULL;
gdisp->nav_popup = NULL;
gdisp->depth = g_visual->depth;
gdisp->select = NULL;
gdisp->ID = display_num++;
gdisp->instance = gimage->instance_count;
@ -196,9 +195,6 @@ gdisplay_new (GimpImage *gimage,
/* update the title to correct the initially displayed scale */
gdisplay_update_title (gdisp);
/* set the gdisplay colormap type and install the appropriate colormap */
gdisp->color_type = (gimp_image_base_type (gimage) == GRAY) ? GRAY : RGB;
/* set the qmask buttons */
qmask_buttons_update (gdisp);
@ -934,7 +930,8 @@ gdisplay_update_icon (GDisplay *gdisp)
*/
void
gdisplay_update_icon_scheduler (GimpImage *gimage, gpointer data)
gdisplay_update_icon_scheduler (GimpImage *gimage,
gpointer data)
{
GDisplay *gdisp;
@ -1113,7 +1110,7 @@ gdisplay_draw_guide (GDisplay *gdisp,
}
}
Guide*
Guide *
gdisplay_find_guide (GDisplay *gdisp,
gdouble x,
gdouble y)
@ -1376,11 +1373,11 @@ gdisplay_update_cursor (GDisplay *gdisp,
void
gdisplay_set_dot_for_dot (GDisplay *gdisp,
gboolean value)
gboolean dot_for_dot)
{
if (value != gdisp->dot_for_dot)
if (dot_for_dot != gdisp->dot_for_dot)
{
gdisp->dot_for_dot = value;
gdisp->dot_for_dot = dot_for_dot;
gdisplay_resize_cursor_label (gdisp);
resize_display (gdisp, allow_resize_windows, TRUE);

View File

@ -19,6 +19,7 @@
#ifndef __GDISPLAY_H__
#define __GDISPLAY_H__
typedef enum
{
SelectionOff,
@ -28,10 +29,6 @@ typedef enum
SelectionResume
} SelectionControl;
/*
* Global variables
*
*/
/* some useful macros */
@ -74,20 +71,22 @@ typedef enum
/* maximal length of the format string for the cursor-coordinates */
#define CURSOR_FORMAT_LENGTH 32
typedef 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 */
} IdleRenderStruct;
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 */
};
struct _GDisplay
@ -96,29 +95,30 @@ struct _GDisplay
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, *qmaskon; /* widgets for qmask buttons */
GtkWidget *hrule, *vrule; /* widgets for rulers */
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 */
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 */
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 */
gint color_type; /* is this an RGB or GRAY colormap */
GtkAdjustment *hsbdata; /* horizontal data information */
GtkAdjustment *vsbdata; /* vertical data information */
@ -130,28 +130,27 @@ struct _GDisplay
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 */
gint instance; /* the instance # of this gdisplay as */
/* taken from the gimage at creation */
gint depth; /* depth of our drawables */
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;
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;
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? */
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? */
Selection *select; /* Selection object */
GdkGC *scroll_gc; /* GC for scrolling */
GdkGC *scroll_gc; /* GC for scrolling */
GSList *update_areas; /* Update areas list */
GSList *display_areas; /* Display areas list */
GSList *update_areas; /* Update areas list */
GSList *display_areas; /* Display areas list */
GdkCursorType current_cursor; /* Currently installed main cursor */
GimpToolCursorType tool_cursor; /* Current Tool cursor */
@ -165,9 +164,9 @@ struct _GDisplay
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
GList *cd_list; /* color display conversion stuff */
GtkWidget *cd_ui; /* color display filter dialog */
@ -180,18 +179,44 @@ struct _GDisplay
/* member function declarations */
GDisplay * gdisplay_new (GimpImage *, guint);
void gdisplay_reconnect (GDisplay *, GimpImage *);
void gdisplay_remove_and_delete (GDisplay *);
gint gdisplay_mask_value (GDisplay *, gint, gint);
gint gdisplay_mask_bounds (GDisplay *, gint *, gint *, gint *, gint *);
void gdisplay_transform_coords (GDisplay *, gint, gint, gint *, gint *, gint);
void gdisplay_untransform_coords (GDisplay *, gint, gint, gint *, gint *,
gboolean, gboolean);
void gdisplay_transform_coords_f (GDisplay *, gdouble, gdouble,
gdouble *, gdouble *, gboolean);
void gdisplay_untransform_coords_f (GDisplay *, gdouble, gdouble,
gdouble *, gdouble *, gboolean);
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);
void gdisplay_real_install_tool_cursor (GDisplay *gdisp,
GdkCursorType cursor_type,
@ -207,54 +232,84 @@ void gdisplay_install_override_cursor (GDisplay *gdisp,
GdkCursorType cursor_type);
void gdisplay_remove_override_cursor (GDisplay *gdisp);
void gdisplay_set_menu_sensitivity (GDisplay *);
void gdisplay_expose_area (GDisplay *, gint, gint, gint, gint);
void gdisplay_expose_guide (GDisplay *, Guide *);
void gdisplay_expose_full (GDisplay *);
void gdisplay_flush (GDisplay *);
void gdisplay_flush_now (GDisplay *);
void gdisplay_update_icon (GDisplay *);
gboolean gdisplay_update_icon_timer (gpointer);
gboolean gdisplay_update_icon_invoker (gpointer);
void gdisplay_update_icon_scheduler (GimpImage *, gpointer);
void gdisplay_draw_guides (GDisplay *);
void gdisplay_draw_guide (GDisplay *, Guide *, gboolean);
Guide* gdisplay_find_guide (GDisplay *, gdouble, double);
gboolean gdisplay_snap_point (GDisplay *, gdouble, gdouble,
gdouble *, gdouble *);
void gdisplay_snap_rectangle (GDisplay *, gdouble, gdouble, gdouble, gdouble,
gdouble *, gdouble *);
void gdisplay_update_cursor (GDisplay *, gint, gint);
void gdisplay_set_dot_for_dot (GDisplay *, gboolean);
void gdisplay_resize_cursor_label (GDisplay *);
void gdisplay_update_title (GDisplay *);
void gdisplay_flush_displays_only (GDisplay *gdisp); /* no rerender! */
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);
GDisplay * gdisplay_active (void);
GDisplay * gdisplay_get_by_ID (gint ID);
/* function declarations */
GDisplay * gdisplays_check_valid (GDisplay *, GimpImage *);
void gdisplays_reconnect (GimpImage *old, GimpImage *new);
void gdisplays_update_title (GimpImage *);
void gdisplays_resize_cursor_label (GimpImage *);
void gdisplays_setup_scale (GimpImage *);
void gdisplays_update_area (GimpImage *, gint, gint, gint, gint);
void gdisplays_expose_guides (GimpImage *);
void gdisplays_expose_guide (GimpImage *, Guide *);
void gdisplays_update_full (GimpImage *);
void gdisplays_shrink_wrap (GimpImage *);
void gdisplays_expose_full (void);
void gdisplays_selection_visibility (GimpImage *, SelectionControl);
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);
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);
#endif /* __GDISPLAY_H__ */

View File

@ -552,7 +552,7 @@ info_window_update (GDisplay *gdisp)
g_snprintf (iwd->visual_class_str, MAX_BUF, "%s", gettext (visual_classes[g_visual->type]));
/* visual depth */
g_snprintf (iwd->visual_depth_str, MAX_BUF, "%d", gdisp->depth);
g_snprintf (iwd->visual_depth_str, MAX_BUF, "%d", g_visual->depth);
info_dialog_update (info_win);
}

View File

@ -523,7 +523,7 @@ selection_create (GdkWindow *win,
{
new->cycle = TRUE;
if (!cycled_ants_pixmap)
cycled_ants_pixmap = create_cycled_ants_pixmap (win, gdisp->depth);
cycled_ants_pixmap = create_cycled_ants_pixmap (win, g_visual->depth);
new->cycle_pix = cycled_ants_pixmap;
}

View File

@ -150,7 +150,6 @@ gdisplay_new (GimpImage *gimage,
gdisp->window_info_dialog = NULL;
gdisp->window_nav_dialog = NULL;
gdisp->nav_popup = NULL;
gdisp->depth = g_visual->depth;
gdisp->select = NULL;
gdisp->ID = display_num++;
gdisp->instance = gimage->instance_count;
@ -196,9 +195,6 @@ gdisplay_new (GimpImage *gimage,
/* update the title to correct the initially displayed scale */
gdisplay_update_title (gdisp);
/* set the gdisplay colormap type and install the appropriate colormap */
gdisp->color_type = (gimp_image_base_type (gimage) == GRAY) ? GRAY : RGB;
/* set the qmask buttons */
qmask_buttons_update (gdisp);
@ -934,7 +930,8 @@ gdisplay_update_icon (GDisplay *gdisp)
*/
void
gdisplay_update_icon_scheduler (GimpImage *gimage, gpointer data)
gdisplay_update_icon_scheduler (GimpImage *gimage,
gpointer data)
{
GDisplay *gdisp;
@ -1113,7 +1110,7 @@ gdisplay_draw_guide (GDisplay *gdisp,
}
}
Guide*
Guide *
gdisplay_find_guide (GDisplay *gdisp,
gdouble x,
gdouble y)
@ -1376,11 +1373,11 @@ gdisplay_update_cursor (GDisplay *gdisp,
void
gdisplay_set_dot_for_dot (GDisplay *gdisp,
gboolean value)
gboolean dot_for_dot)
{
if (value != gdisp->dot_for_dot)
if (dot_for_dot != gdisp->dot_for_dot)
{
gdisp->dot_for_dot = value;
gdisp->dot_for_dot = dot_for_dot;
gdisplay_resize_cursor_label (gdisp);
resize_display (gdisp, allow_resize_windows, TRUE);

View File

@ -19,6 +19,7 @@
#ifndef __GDISPLAY_H__
#define __GDISPLAY_H__
typedef enum
{
SelectionOff,
@ -28,10 +29,6 @@ typedef enum
SelectionResume
} SelectionControl;
/*
* Global variables
*
*/
/* some useful macros */
@ -74,20 +71,22 @@ typedef enum
/* maximal length of the format string for the cursor-coordinates */
#define CURSOR_FORMAT_LENGTH 32
typedef 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 */
} IdleRenderStruct;
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 */
};
struct _GDisplay
@ -96,29 +95,30 @@ struct _GDisplay
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, *qmaskon; /* widgets for qmask buttons */
GtkWidget *hrule, *vrule; /* widgets for rulers */
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 */
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 */
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 */
gint color_type; /* is this an RGB or GRAY colormap */
GtkAdjustment *hsbdata; /* horizontal data information */
GtkAdjustment *vsbdata; /* vertical data information */
@ -130,28 +130,27 @@ struct _GDisplay
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 */
gint instance; /* the instance # of this gdisplay as */
/* taken from the gimage at creation */
gint depth; /* depth of our drawables */
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;
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;
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? */
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? */
Selection *select; /* Selection object */
GdkGC *scroll_gc; /* GC for scrolling */
GdkGC *scroll_gc; /* GC for scrolling */
GSList *update_areas; /* Update areas list */
GSList *display_areas; /* Display areas list */
GSList *update_areas; /* Update areas list */
GSList *display_areas; /* Display areas list */
GdkCursorType current_cursor; /* Currently installed main cursor */
GimpToolCursorType tool_cursor; /* Current Tool cursor */
@ -165,9 +164,9 @@ struct _GDisplay
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
GList *cd_list; /* color display conversion stuff */
GtkWidget *cd_ui; /* color display filter dialog */
@ -180,18 +179,44 @@ struct _GDisplay
/* member function declarations */
GDisplay * gdisplay_new (GimpImage *, guint);
void gdisplay_reconnect (GDisplay *, GimpImage *);
void gdisplay_remove_and_delete (GDisplay *);
gint gdisplay_mask_value (GDisplay *, gint, gint);
gint gdisplay_mask_bounds (GDisplay *, gint *, gint *, gint *, gint *);
void gdisplay_transform_coords (GDisplay *, gint, gint, gint *, gint *, gint);
void gdisplay_untransform_coords (GDisplay *, gint, gint, gint *, gint *,
gboolean, gboolean);
void gdisplay_transform_coords_f (GDisplay *, gdouble, gdouble,
gdouble *, gdouble *, gboolean);
void gdisplay_untransform_coords_f (GDisplay *, gdouble, gdouble,
gdouble *, gdouble *, gboolean);
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);
void gdisplay_real_install_tool_cursor (GDisplay *gdisp,
GdkCursorType cursor_type,
@ -207,54 +232,84 @@ void gdisplay_install_override_cursor (GDisplay *gdisp,
GdkCursorType cursor_type);
void gdisplay_remove_override_cursor (GDisplay *gdisp);
void gdisplay_set_menu_sensitivity (GDisplay *);
void gdisplay_expose_area (GDisplay *, gint, gint, gint, gint);
void gdisplay_expose_guide (GDisplay *, Guide *);
void gdisplay_expose_full (GDisplay *);
void gdisplay_flush (GDisplay *);
void gdisplay_flush_now (GDisplay *);
void gdisplay_update_icon (GDisplay *);
gboolean gdisplay_update_icon_timer (gpointer);
gboolean gdisplay_update_icon_invoker (gpointer);
void gdisplay_update_icon_scheduler (GimpImage *, gpointer);
void gdisplay_draw_guides (GDisplay *);
void gdisplay_draw_guide (GDisplay *, Guide *, gboolean);
Guide* gdisplay_find_guide (GDisplay *, gdouble, double);
gboolean gdisplay_snap_point (GDisplay *, gdouble, gdouble,
gdouble *, gdouble *);
void gdisplay_snap_rectangle (GDisplay *, gdouble, gdouble, gdouble, gdouble,
gdouble *, gdouble *);
void gdisplay_update_cursor (GDisplay *, gint, gint);
void gdisplay_set_dot_for_dot (GDisplay *, gboolean);
void gdisplay_resize_cursor_label (GDisplay *);
void gdisplay_update_title (GDisplay *);
void gdisplay_flush_displays_only (GDisplay *gdisp); /* no rerender! */
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);
GDisplay * gdisplay_active (void);
GDisplay * gdisplay_get_by_ID (gint ID);
/* function declarations */
GDisplay * gdisplays_check_valid (GDisplay *, GimpImage *);
void gdisplays_reconnect (GimpImage *old, GimpImage *new);
void gdisplays_update_title (GimpImage *);
void gdisplays_resize_cursor_label (GimpImage *);
void gdisplays_setup_scale (GimpImage *);
void gdisplays_update_area (GimpImage *, gint, gint, gint, gint);
void gdisplays_expose_guides (GimpImage *);
void gdisplays_expose_guide (GimpImage *, Guide *);
void gdisplays_update_full (GimpImage *);
void gdisplays_shrink_wrap (GimpImage *);
void gdisplays_expose_full (void);
void gdisplays_selection_visibility (GimpImage *, SelectionControl);
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);
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);
#endif /* __GDISPLAY_H__ */

View File

@ -523,7 +523,7 @@ selection_create (GdkWindow *win,
{
new->cycle = TRUE;
if (!cycled_ants_pixmap)
cycled_ants_pixmap = create_cycled_ants_pixmap (win, gdisp->depth);
cycled_ants_pixmap = create_cycled_ants_pixmap (win, g_visual->depth);
new->cycle_pix = cycled_ants_pixmap;
}

View File

@ -150,7 +150,6 @@ gdisplay_new (GimpImage *gimage,
gdisp->window_info_dialog = NULL;
gdisp->window_nav_dialog = NULL;
gdisp->nav_popup = NULL;
gdisp->depth = g_visual->depth;
gdisp->select = NULL;
gdisp->ID = display_num++;
gdisp->instance = gimage->instance_count;
@ -196,9 +195,6 @@ gdisplay_new (GimpImage *gimage,
/* update the title to correct the initially displayed scale */
gdisplay_update_title (gdisp);
/* set the gdisplay colormap type and install the appropriate colormap */
gdisp->color_type = (gimp_image_base_type (gimage) == GRAY) ? GRAY : RGB;
/* set the qmask buttons */
qmask_buttons_update (gdisp);
@ -934,7 +930,8 @@ gdisplay_update_icon (GDisplay *gdisp)
*/
void
gdisplay_update_icon_scheduler (GimpImage *gimage, gpointer data)
gdisplay_update_icon_scheduler (GimpImage *gimage,
gpointer data)
{
GDisplay *gdisp;
@ -1113,7 +1110,7 @@ gdisplay_draw_guide (GDisplay *gdisp,
}
}
Guide*
Guide *
gdisplay_find_guide (GDisplay *gdisp,
gdouble x,
gdouble y)
@ -1376,11 +1373,11 @@ gdisplay_update_cursor (GDisplay *gdisp,
void
gdisplay_set_dot_for_dot (GDisplay *gdisp,
gboolean value)
gboolean dot_for_dot)
{
if (value != gdisp->dot_for_dot)
if (dot_for_dot != gdisp->dot_for_dot)
{
gdisp->dot_for_dot = value;
gdisp->dot_for_dot = dot_for_dot;
gdisplay_resize_cursor_label (gdisp);
resize_display (gdisp, allow_resize_windows, TRUE);

View File

@ -19,6 +19,7 @@
#ifndef __GDISPLAY_H__
#define __GDISPLAY_H__
typedef enum
{
SelectionOff,
@ -28,10 +29,6 @@ typedef enum
SelectionResume
} SelectionControl;
/*
* Global variables
*
*/
/* some useful macros */
@ -74,20 +71,22 @@ typedef enum
/* maximal length of the format string for the cursor-coordinates */
#define CURSOR_FORMAT_LENGTH 32
typedef 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 */
} IdleRenderStruct;
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 */
};
struct _GDisplay
@ -96,29 +95,30 @@ struct _GDisplay
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, *qmaskon; /* widgets for qmask buttons */
GtkWidget *hrule, *vrule; /* widgets for rulers */
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 */
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 */
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 */
gint color_type; /* is this an RGB or GRAY colormap */
GtkAdjustment *hsbdata; /* horizontal data information */
GtkAdjustment *vsbdata; /* vertical data information */
@ -130,28 +130,27 @@ struct _GDisplay
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 */
gint instance; /* the instance # of this gdisplay as */
/* taken from the gimage at creation */
gint depth; /* depth of our drawables */
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;
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;
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? */
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? */
Selection *select; /* Selection object */
GdkGC *scroll_gc; /* GC for scrolling */
GdkGC *scroll_gc; /* GC for scrolling */
GSList *update_areas; /* Update areas list */
GSList *display_areas; /* Display areas list */
GSList *update_areas; /* Update areas list */
GSList *display_areas; /* Display areas list */
GdkCursorType current_cursor; /* Currently installed main cursor */
GimpToolCursorType tool_cursor; /* Current Tool cursor */
@ -165,9 +164,9 @@ struct _GDisplay
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
GList *cd_list; /* color display conversion stuff */
GtkWidget *cd_ui; /* color display filter dialog */
@ -180,18 +179,44 @@ struct _GDisplay
/* member function declarations */
GDisplay * gdisplay_new (GimpImage *, guint);
void gdisplay_reconnect (GDisplay *, GimpImage *);
void gdisplay_remove_and_delete (GDisplay *);
gint gdisplay_mask_value (GDisplay *, gint, gint);
gint gdisplay_mask_bounds (GDisplay *, gint *, gint *, gint *, gint *);
void gdisplay_transform_coords (GDisplay *, gint, gint, gint *, gint *, gint);
void gdisplay_untransform_coords (GDisplay *, gint, gint, gint *, gint *,
gboolean, gboolean);
void gdisplay_transform_coords_f (GDisplay *, gdouble, gdouble,
gdouble *, gdouble *, gboolean);
void gdisplay_untransform_coords_f (GDisplay *, gdouble, gdouble,
gdouble *, gdouble *, gboolean);
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);
void gdisplay_real_install_tool_cursor (GDisplay *gdisp,
GdkCursorType cursor_type,
@ -207,54 +232,84 @@ void gdisplay_install_override_cursor (GDisplay *gdisp,
GdkCursorType cursor_type);
void gdisplay_remove_override_cursor (GDisplay *gdisp);
void gdisplay_set_menu_sensitivity (GDisplay *);
void gdisplay_expose_area (GDisplay *, gint, gint, gint, gint);
void gdisplay_expose_guide (GDisplay *, Guide *);
void gdisplay_expose_full (GDisplay *);
void gdisplay_flush (GDisplay *);
void gdisplay_flush_now (GDisplay *);
void gdisplay_update_icon (GDisplay *);
gboolean gdisplay_update_icon_timer (gpointer);
gboolean gdisplay_update_icon_invoker (gpointer);
void gdisplay_update_icon_scheduler (GimpImage *, gpointer);
void gdisplay_draw_guides (GDisplay *);
void gdisplay_draw_guide (GDisplay *, Guide *, gboolean);
Guide* gdisplay_find_guide (GDisplay *, gdouble, double);
gboolean gdisplay_snap_point (GDisplay *, gdouble, gdouble,
gdouble *, gdouble *);
void gdisplay_snap_rectangle (GDisplay *, gdouble, gdouble, gdouble, gdouble,
gdouble *, gdouble *);
void gdisplay_update_cursor (GDisplay *, gint, gint);
void gdisplay_set_dot_for_dot (GDisplay *, gboolean);
void gdisplay_resize_cursor_label (GDisplay *);
void gdisplay_update_title (GDisplay *);
void gdisplay_flush_displays_only (GDisplay *gdisp); /* no rerender! */
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);
GDisplay * gdisplay_active (void);
GDisplay * gdisplay_get_by_ID (gint ID);
/* function declarations */
GDisplay * gdisplays_check_valid (GDisplay *, GimpImage *);
void gdisplays_reconnect (GimpImage *old, GimpImage *new);
void gdisplays_update_title (GimpImage *);
void gdisplays_resize_cursor_label (GimpImage *);
void gdisplays_setup_scale (GimpImage *);
void gdisplays_update_area (GimpImage *, gint, gint, gint, gint);
void gdisplays_expose_guides (GimpImage *);
void gdisplays_expose_guide (GimpImage *, Guide *);
void gdisplays_update_full (GimpImage *);
void gdisplays_shrink_wrap (GimpImage *);
void gdisplays_expose_full (void);
void gdisplays_selection_visibility (GimpImage *, SelectionControl);
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);
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);
#endif /* __GDISPLAY_H__ */

View File

@ -32,16 +32,15 @@
#include <gtk/gtk.h>
#include "libgimpwidgets/gimpwidgets.h"
#include "libgimp/gimpenv.h"
#include "apptypes.h"
#include "core/core-types.h"
#include "gimphelp.h"
#include "gimprc.h"
#include "gimpui.h"
#include "plug_in.h"
#include "libgimp/gimpenv.h"
#include "libgimp/gimpintl.h"

View File

@ -552,7 +552,7 @@ info_window_update (GDisplay *gdisp)
g_snprintf (iwd->visual_class_str, MAX_BUF, "%s", gettext (visual_classes[g_visual->type]));
/* visual depth */
g_snprintf (iwd->visual_depth_str, MAX_BUF, "%d", gdisp->depth);
g_snprintf (iwd->visual_depth_str, MAX_BUF, "%d", g_visual->depth);
info_dialog_update (info_win);
}

View File

@ -28,6 +28,7 @@
#include "procedural_db.h"
#include "appenums.h"
#include "core/core-types.h"
#include "core/gimpchannel.h"
#include "core/gimpdrawable-offset.h"
#include "core/gimpdrawable.h"

View File

@ -27,8 +27,8 @@
#include "core/core-types.h"
#include "procedural_db.h"
#include "appenums.h"
#include "context_manager.h"
#include "core/core-types.h"
#include "core/gimpchannel.h"
#include "core/gimpcontainer.h"
#include "core/gimpimage-duplicate.h"
@ -3068,7 +3068,7 @@ image_get_component_active_invoker (Argument *args)
success = FALSE;
component = args[1].value.pdb_int;
if (component < RED_CHANNEL || component > ALPHA_CHANNEL)
if (component < GREEN_CHANNEL || component > ALPHA_CHANNEL)
success = FALSE;
if (success)
@ -3141,7 +3141,7 @@ image_set_component_active_invoker (Argument *args)
success = FALSE;
component = args[1].value.pdb_int;
if (component < RED_CHANNEL || component > ALPHA_CHANNEL)
if (component < GREEN_CHANNEL || component > ALPHA_CHANNEL)
success = FALSE;
active = args[2].value.pdb_int ? TRUE : FALSE;
@ -3210,7 +3210,7 @@ image_get_component_visible_invoker (Argument *args)
success = FALSE;
component = args[1].value.pdb_int;
if (component < RED_CHANNEL || component > ALPHA_CHANNEL)
if (component < GREEN_CHANNEL || component > ALPHA_CHANNEL)
success = FALSE;
if (success)
@ -3283,7 +3283,7 @@ image_set_component_visible_invoker (Argument *args)
success = FALSE;
component = args[1].value.pdb_int;
if (component < RED_CHANNEL || component > ALPHA_CHANNEL)
if (component < GREEN_CHANNEL || component > ALPHA_CHANNEL)
success = FALSE;
visible = args[2].value.pdb_int ? TRUE : FALSE;

View File

@ -27,6 +27,7 @@
#include "procedural_db.h"
#include "appenums.h"
#include "core/core-types.h"
#include "core/gimpimage.h"
#include "core/gimplayer.h"
#include "core/gimplayermask.h"

View File

@ -523,7 +523,7 @@ selection_create (GdkWindow *win,
{
new->cycle = TRUE;
if (!cycled_ants_pixmap)
cycled_ants_pixmap = create_cycled_ants_pixmap (win, gdisp->depth);
cycled_ants_pixmap = create_cycled_ants_pixmap (win, g_visual->depth);
new->cycle_pix = cycled_ants_pixmap;
}

View File

@ -51,4 +51,45 @@ typedef void (* ToolOptionsResetFunc) (ToolOptions *tool_options);
typedef struct _Tool Tool;
/* enums */
/* The possible states for tools */
typedef enum /*< skip >*/
{
INACTIVE,
ACTIVE,
PAUSED
} ToolState;
/* Tool control actions */
typedef enum /*< skip >*/
{
PAUSE,
RESUME,
HALT,
DESTROY,
RECREATE
} ToolAction;
/* possible transform functions */
typedef enum /*< skip >*/
{
TRANSFORM_CREATING,
TRANSFORM_HANDLE_1,
TRANSFORM_HANDLE_2,
TRANSFORM_HANDLE_3,
TRANSFORM_HANDLE_4,
TRANSFORM_HANDLE_CENTER
} TransformAction;
/* the different states that the transformation function can be called with */
typedef enum /*< skip >*/
{
TRANSFORM_INIT,
TRANSFORM_MOTION,
TRANSFORM_RECALC,
TRANSFORM_FINISH
} TransformState;
#endif /* __TOOLS_TYPES_H__ */

View File

@ -32,16 +32,15 @@
#include <gtk/gtk.h>
#include "libgimpwidgets/gimpwidgets.h"
#include "libgimp/gimpenv.h"
#include "apptypes.h"
#include "core/core-types.h"
#include "gimphelp.h"
#include "gimprc.h"
#include "gimpui.h"
#include "plug_in.h"
#include "libgimp/gimpenv.h"
#include "libgimp/gimpintl.h"

View File

@ -81,8 +81,7 @@ typedef enum
GIMP_BLUE_CHANNEL,
GIMP_GRAY_CHANNEL,
GIMP_INDEXED_CHANNEL,
GIMP_ALPHA_CHANNEL,
GIMP_AUXILLARY_CHANNEL
GIMP_ALPHA_CHANNEL
} GimpChannelType;
typedef enum

View File

@ -59,7 +59,6 @@ init_generated_constants (void)
setvar (cintern ("GRAY-CHANNEL"), flocons (3), NIL);
setvar (cintern ("INDEXED-CHANNEL"), flocons (4), NIL);
setvar (cintern ("ALPHA-CHANNEL"), flocons (5), NIL);
setvar (cintern ("AUXILLARY-CHANNEL"), flocons (6), NIL);
setvar (cintern ("IMAGE-CLONE"), flocons (0), NIL);
setvar (cintern ("PATTERN-CLONE"), flocons (1), NIL);

View File

@ -1,3 +1,7 @@
2001-05-13 Michael Natterer <mitch@gimp.org>
* POTFILES.in: removed some files.
2001-05-08 Valek Filippov <frob@df.ru>
* ru.po: Updated russian translation.

View File

@ -19,7 +19,6 @@ app/gimpunit.c
app/global_edit.c
app/image_new.c
app/interface.c
app/lc_dialog.c
app/main.c
app/module_db.c
app/nav_window.c
@ -51,7 +50,6 @@ app/gui/about-dialog.c
app/gui/brush-editor.c
app/gui/brush-select.c
app/gui/channels-commands.c
app/gui/channels-dialog.c
app/gui/color-area.c
app/gui/color-notebook.c
app/gui/color-select.c
@ -70,7 +68,6 @@ app/gui/info-dialog.c
app/gui/info-window.c
app/gui/layer-select.c
app/gui/layers-commands.c
app/gui/layers-dialog.c
app/gui/menus.c
app/gui/offset-dialog.c
app/gui/palette-editor.c

View File

@ -53,6 +53,7 @@ enum_headers = \
../../app/errors.h \
../../app/lut_funcs.h \
../../app/paint-funcs/paint-funcs.h \
../../app/core/core-types.h \
../../app/core/gimpdrawable-offset.h \
../../app/core/gimpimage.h \
../../app/core/gimpimage-convert.h \

View File

@ -20,46 +20,6 @@
package Gimp::CodeGen::enums;
%enums = (
GimpImageBaseType =>
{ contig => 1,
header => 'appenums.h',
symbols => [ qw(RGB GRAY INDEXED) ],
mapping => { RGB => '0',
GRAY => '1',
INDEXED => '2' }
},
GimpImageType =>
{ contig => 1,
header => 'appenums.h',
symbols => [ qw(RGB_GIMAGE RGBA_GIMAGE GRAY_GIMAGE GRAYA_GIMAGE
INDEXED_GIMAGE INDEXEDA_GIMAGE) ],
mapping => { RGB_GIMAGE => '0',
RGBA_GIMAGE => '1',
GRAY_GIMAGE => '2',
GRAYA_GIMAGE => '3',
INDEXED_GIMAGE => '4',
INDEXEDA_GIMAGE => '5' },
nicks => { RGB_GIMAGE => 'RGB_IMAGE',
RGBA_GIMAGE => 'RGBA_IMAGE',
GRAY_GIMAGE => 'GRAY_IMAGE',
GRAYA_GIMAGE => 'GRAYA_IMAGE',
INDEXED_GIMAGE => 'INDEXED_IMAGE',
INDEXEDA_GIMAGE => 'INDEXEDA_IMAGE' }
},
ChannelType =>
{ contig => 1,
header => 'appenums.h',
symbols => [ qw(RED_CHANNEL GREEN_CHANNEL BLUE_CHANNEL
GRAY_CHANNEL INDEXED_CHANNEL ALPHA_CHANNEL
AUXILLARY_CHANNEL) ],
mapping => { RED_CHANNEL => '0',
GREEN_CHANNEL => '1',
BLUE_CHANNEL => '2',
GRAY_CHANNEL => '3',
INDEXED_CHANNEL => '4',
ALPHA_CHANNEL => '5',
AUXILLARY_CHANNEL => '6' }
},
GimpFillType =>
{ contig => 1,
header => 'appenums.h',
@ -129,13 +89,6 @@ package Gimp::CodeGen::enums;
INCREMENTAL => '1' },
nicks => { CONSTANT => 'CONTINUOUS' }
},
MaskApplyMode =>
{ contig => 1,
header => 'appenums.h',
symbols => [ qw(APPLY DISCARD) ],
mapping => { APPLY => '0',
DISCARD => '1' }
},
AddMaskType =>
{ contig => 1,
header => 'appenums.h',
@ -289,6 +242,51 @@ package Gimp::CodeGen::enums;
BLUE_LUT => '3',
ALPHA_LUT => '4' }
},
GimpImageBaseType =>
{ contig => 1,
header => 'core/core-types.h',
symbols => [ qw(RGB GRAY INDEXED) ],
mapping => { RGB => '0',
GRAY => '1',
INDEXED => '2' }
},
GimpImageType =>
{ contig => 1,
header => 'core/core-types.h',
symbols => [ qw(RGB_GIMAGE RGBA_GIMAGE GRAY_GIMAGE GRAYA_GIMAGE
INDEXED_GIMAGE INDEXEDA_GIMAGE) ],
mapping => { RGB_GIMAGE => '0',
RGBA_GIMAGE => '1',
GRAY_GIMAGE => '2',
GRAYA_GIMAGE => '3',
INDEXED_GIMAGE => '4',
INDEXEDA_GIMAGE => '5' },
nicks => { RGB_GIMAGE => 'RGB_IMAGE',
RGBA_GIMAGE => 'RGBA_IMAGE',
GRAY_GIMAGE => 'GRAY_IMAGE',
GRAYA_GIMAGE => 'GRAYA_IMAGE',
INDEXED_GIMAGE => 'INDEXED_IMAGE',
INDEXEDA_GIMAGE => 'INDEXEDA_IMAGE' }
},
ChannelType =>
{ contig => 1,
header => 'core/core-types.h',
symbols => [ qw(RED_CHANNEL GREEN_CHANNEL BLUE_CHANNEL
GRAY_CHANNEL INDEXED_CHANNEL ALPHA_CHANNEL) ],
mapping => { RED_CHANNEL => '0',
GREEN_CHANNEL => '1',
BLUE_CHANNEL => '2',
GRAY_CHANNEL => '3',
INDEXED_CHANNEL => '4',
ALPHA_CHANNEL => '5' }
},
MaskApplyMode =>
{ contig => 1,
header => 'core/core-types.h',
symbols => [ qw(APPLY DISCARD) ],
mapping => { APPLY => '0',
DISCARD => '1' }
},
GimpOffsetType =>
{ contig => 1,
header => 'core/gimpdrawable-offset.h',