include the new "paint-funcs/paint-funcs-types.h".

2001-11-28  Michael Natterer  <mitch@gimp.org>

	* app/base/base-types.h: include the new
	"paint-funcs/paint-funcs-types.h".

	* app/paint-funcs/Makefile.am
	* app/paint-funcs/paint-funcs-types.h: new file. Includes
	"base/base-types.h".

	* app/paint-funcs/paint-funcs.[ch]: removed the enums here,
	include "paint-funcs-types.h".

	* app/widgets/widgets-types.h: include "display/display-types.h"

	* app/display/display-types.h: include "widgets/widgets-types.h".

	* app/tools/tools-types.h: include "display/display-types.h"

	* app/gui/gui-types.h: include "tools/tools-types.h".

	The order of namespaces/dependencies should be (but is not):

	(base, paint-funcs) -> (core, file, xcf, pdb) ->
	(widgets, display) -> tools -> gui

	* app/path.c: include "tools/tools-types.h".

	* app/core/Makefile.am
	* app/core/gimpimage-guides.[ch]
	* app/core/gimpimage-merge.[ch]
	* app/core/gimpimage-resize.[ch]
	* app/core/gimpimage-scale.[ch]: new files.

	* app/core/gimpimage.[ch]: removed the stuff which is in the new
	files. Reordered all functions in both the .h and .c files,
	commented the groups of functions.

	* app/core/gimpcontainer.c: create the handler_id using a counter,
	not the address of a pointer, because the address *may* be the
	same twice, added debugging output.

	* app/core/gimpviewable.[ch]: added primitive support for getting
	a preview GdkPixbuf.

	* app/nav_window.c
	* app/undo.c
	* app/undo_history.c
	* app/core/gimpimage-duplicate.c
	* app/core/gimpimage-mask.[ch]
	* app/display/gimpdisplay.c
	* app/display/gimpdisplayshell-callbacks.c
	* app/display/gimpdisplayshell-dnd.c
	* app/display/gimpdisplayshell-render.c
	* app/display/gimpdisplayshell-scale.c
	* app/display/gimpdisplayshell-scroll.c
	* app/gui/image-commands.c
	* app/gui/info-window.c
	* app/gui/layers-commands.c
	* app/gui/palette-import-dialog.c
	* app/tools/gimpbycolorselecttool.c
	* app/tools/gimpeditselectiontool.c
	* app/tools/gimpmeasuretool.c
	* app/tools/gimpmovetool.c
	* app/widgets/gimpcontainerview-utils.c
	* app/xcf/xcf-load.c: changed accordingly, some cleanup.

	* tools/pdbgen/pdb/guides.pdb
	* tools/pdbgen/pdb/image.pdb: changed accordingly, reordered functions.

	* app/plug_in.c: set the labels of the "Repeat" and "Re-Show" menu
	items to the name of the last plug-in (Fixes #50986).

	* app/display/gimpdisplayshell.[ch]: set the labels of "Undo" and
	"Redo" to the resp. undo names. Much simplified the WM icon stuff
	by removing most code and using gimp_viewable_get_new_preview_pixbuf().

	* app/widgets/gimpbrushfactoryview.c: forgot to assign the GQuark
	returned by gimp_container_add_handler().

	* app/pdb/guides_cmds.c
	* app/pdb/image_cmds.c
	* libgimp/gimpimage_pdb.[ch]: regenerated.
This commit is contained in:
Michael Natterer 2001-11-28 17:51:06 +00:00 committed by Michael Natterer
parent 36efb12be7
commit 6cf34005af
86 changed files with 3695 additions and 20227 deletions

View File

@ -1,3 +1,86 @@
2001-11-28 Michael Natterer <mitch@gimp.org>
* app/base/base-types.h: include the new
"paint-funcs/paint-funcs-types.h".
* app/paint-funcs/Makefile.am
* app/paint-funcs/paint-funcs-types.h: new file. Includes
"base/base-types.h".
* app/paint-funcs/paint-funcs.[ch]: removed the enums here,
include "paint-funcs-types.h".
* app/widgets/widgets-types.h: include "display/display-types.h"
* app/display/display-types.h: include "widgets/widgets-types.h".
* app/tools/tools-types.h: include "display/display-types.h"
* app/gui/gui-types.h: include "tools/tools-types.h".
The order of namespaces/dependencies should be (but is not):
(base, paint-funcs) -> (core, file, xcf, pdb) ->
(widgets, display) -> tools -> gui
* app/path.c: include "tools/tools-types.h".
* app/core/Makefile.am
* app/core/gimpimage-guides.[ch]
* app/core/gimpimage-merge.[ch]
* app/core/gimpimage-resize.[ch]
* app/core/gimpimage-scale.[ch]: new files.
* app/core/gimpimage.[ch]: removed the stuff which is in the new
files. Reordered all functions in both the .h and .c files,
commented the groups of functions.
* app/core/gimpcontainer.c: create the handler_id using a counter,
not the address of a pointer, because the address *may* be the
same twice, added debugging output.
* app/core/gimpviewable.[ch]: added primitive support for getting
a preview GdkPixbuf.
* app/nav_window.c
* app/undo.c
* app/undo_history.c
* app/core/gimpimage-duplicate.c
* app/core/gimpimage-mask.[ch]
* app/display/gimpdisplay.c
* app/display/gimpdisplayshell-callbacks.c
* app/display/gimpdisplayshell-dnd.c
* app/display/gimpdisplayshell-render.c
* app/display/gimpdisplayshell-scale.c
* app/display/gimpdisplayshell-scroll.c
* app/gui/image-commands.c
* app/gui/info-window.c
* app/gui/layers-commands.c
* app/gui/palette-import-dialog.c
* app/tools/gimpbycolorselecttool.c
* app/tools/gimpeditselectiontool.c
* app/tools/gimpmeasuretool.c
* app/tools/gimpmovetool.c
* app/widgets/gimpcontainerview-utils.c
* app/xcf/xcf-load.c: changed accordingly, some cleanup.
* tools/pdbgen/pdb/guides.pdb
* tools/pdbgen/pdb/image.pdb: changed accordingly, reordered functions.
* app/plug_in.c: set the labels of the "Repeat" and "Re-Show" menu
items to the name of the last plug-in (Fixes #50986).
* app/display/gimpdisplayshell.[ch]: set the labels of "Undo" and
"Redo" to the resp. undo names. Much simplified the WM icon stuff
by removing most code and using gimp_viewable_get_new_preview_pixbuf().
* app/widgets/gimpbrushfactoryview.c: forgot to assign the GQuark
returned by gimp_container_add_handler().
* app/pdb/guides_cmds.c
* app/pdb/image_cmds.c
* libgimp/gimpimage_pdb.[ch]: regenerated.
2001-11-28 Kelly Martin <kmartin@pyrzqxgl.org>
* app/undo.c: Fixed evil<tm> double casting of enum to glong to
@ -17,7 +100,7 @@
names to be consistent.
* app/core/gimpimage.[ch]: removed the projection stuff
here. Removed the gimp_image_composite_blah() functions becauee
here. Removed the gimp_image_composite_blah() functions because
they were just calling the resp. gimp_image_projection ones.
* app/core/gimpimage-contiguous-region.c

View File

@ -31,6 +31,8 @@
#include "core/gimpdrawable-equalize.h"
#include "core/gimpimage.h"
#include "core/gimpimage-duplicate.h"
#include "core/gimpimage-resize.h"
#include "core/gimpimage-scale.h"
#include "pdb/procedural_db.h"

View File

@ -33,6 +33,7 @@
#include "core/gimp.h"
#include "core/gimpimage.h"
#include "core/gimpimage-mask.h"
#include "core/gimpimage-merge.h"
#include "core/gimplayer.h"
#include "core/gimplayermask.h"
#include "core/gimplist.h"

View File

@ -1485,6 +1485,23 @@ plug_in_set_menu_sensitivity (GimpImageType type)
if (last_plug_in && (last_plug_in == &(proc_def->db_info)))
{
gchar *basename;
gchar *repeat;
gchar *reshow;
basename = g_path_get_basename (proc_def->menu_path);
repeat = g_strdup_printf (_("Repeat \"%s\""), basename);
reshow = g_strdup_printf (_("Re-show \"%s\""), basename);
g_free (basename);
gimp_menu_item_set_label ("<Image>/Filters/Repeat Last", repeat);
gimp_menu_item_set_label ("<Image>/Filters/Re-Show Last", reshow);
g_free (repeat);
g_free (reshow);
gimp_menu_item_set_sensitive ("<Image>/Filters/Repeat Last",
sensitive);
gimp_menu_item_set_sensitive ("<Image>/Filters/Re-Show Last",
@ -1493,8 +1510,13 @@ plug_in_set_menu_sensitivity (GimpImageType type)
}
}
if (!last_plug_in)
if (! last_plug_in)
{
gimp_menu_item_set_label ("<Image>/Filters/Repeat Last",
_("Repeat Last"));
gimp_menu_item_set_label ("<Image>/Filters/Re-Show Last",
_("Re-Show Last"));
gimp_menu_item_set_sensitive ("<Image>/Filters/Repeat Last", FALSE);
gimp_menu_item_set_sensitive ("<Image>/Filters/Re-Show Last", FALSE);
}

View File

@ -20,6 +20,9 @@
#define __BASE_TYPES_H__
#include "paint-funcs/paint-funcs-types.h"
/* magic constants */
#define MAX_CHANNELS 4

View File

@ -85,14 +85,22 @@ libappcore_a_sources = @STRIP_BEGIN@ \
gimpimage-crop.h \
gimpimage-duplicate.c \
gimpimage-duplicate.h \
gimpimage-guides.c \
gimpimage-guides.h \
gimpimage-mask.c \
gimpimage-mask.h \
gimpimage-mask-select.c \
gimpimage-mask-select.h \
gimpimage-merge.c \
gimpimage-merge.h \
gimpimage-new.c \
gimpimage-new.h \
gimpimage-projection.c \
gimpimage-projection.h \
gimpimage-resize.c \
gimpimage-resize.h \
gimpimage-scale.c \
gimpimage-scale.h \
gimpimage-undo.c \
gimpimage-undo.h \
gimpimagefile.c \

View File

@ -623,6 +623,8 @@ gimp_container_add_handler (GimpContainer *container,
GimpContainerHandler *handler;
gchar *key;
static gint handler_id = 0;
g_return_val_if_fail (GIMP_IS_CONTAINER (container), 0);
g_return_val_if_fail (signame != NULL, 0);
@ -632,13 +634,15 @@ gimp_container_add_handler (GimpContainer *container,
handler = g_new0 (GimpContainerHandler, 1);
/* create a unique key for this handler */
key = g_strdup_printf ("%s-%p", signame, handler);
key = g_strdup_printf ("%s-%d", signame, handler_id++);
handler->signame = g_strdup (signame);
handler->callback = callback;
handler->callback_data = callback_data;
handler->quark = g_quark_from_string (key);
g_print ("%s: key = %s, id = %d\n", G_GNUC_FUNCTION, key, handler->quark);
g_free (key);
container->handlers = g_list_prepend (container->handlers, handler);
@ -688,10 +692,13 @@ gimp_container_remove_handler (GimpContainer *container,
if (! list)
{
g_warning ("tried to disconnect handler which is not connected");
g_warning ("%s: tried to unhandler which id %d",
G_STRLOC, id);
return;
}
g_print ("%s: id = %d\n", G_GNUC_FUNCTION, handler->quark);
gimp_container_foreach (container,
(GFunc) gimp_container_remove_handler_foreach_func,
handler);

View File

@ -36,6 +36,7 @@
#include "gimpcontext.h"
#include "gimpimage.h"
#include "gimpimage-duplicate.h"
#include "gimpimage-guides.h"
#include "gimpimage-new.h"
#include "gimplayer.h"
#include "gimplist.h"

File diff suppressed because it is too large Load Diff

View File

@ -16,425 +16,37 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#ifndef __GIMP_IMAGE_H__
#define __GIMP_IMAGE_H__
#ifndef __GIMP_IMAGE_GUIDES_H__
#define __GIMP_IMAGE_GUIDES_H__
#include "gimpviewable.h"
GimpGuide * gimp_image_add_hguide (GimpImage *gimage);
GimpGuide * gimp_image_add_vguide (GimpImage *gimage);
void gimp_image_add_guide (GimpImage *gimage,
GimpGuide *guide);
void gimp_image_remove_guide (GimpImage *gimage,
GimpGuide *guide);
#define COLORMAP_SIZE 768
void gimp_image_delete_guide (GimpImage *gimage,
GimpGuide *guide);
#define GIMP_IMAGE_TYPE_HAS_ALPHA(t) ((t) == RGBA_GIMAGE || \
(t) == GRAYA_GIMAGE || \
(t) == INDEXEDA_GIMAGE)
GimpGuide * gimp_image_find_guide (GimpImage *gimage,
gdouble x,
gdouble y);
gboolean gimp_image_snap_point (GimpImage *gimage,
gdouble x,
gdouble y,
gint *tx,
gint *ty);
gboolean gimp_image_snap_rectangle (GimpImage *gimage,
gdouble x1,
gdouble y1,
gdouble x2,
gdouble y2,
gint *tx1,
gint *ty1);
struct _GimpGuide
{
gint ref_count;
gint position;
InternalOrientationType orientation;
guint32 guide_ID;
};
#define GIMP_TYPE_IMAGE (gimp_image_get_type ())
#define GIMP_IMAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_IMAGE, GimpImage))
#define GIMP_IMAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_IMAGE, GimpImageClass))
#define GIMP_IS_IMAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_IMAGE))
#define GIMP_IS_IMAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_IMAGE))
#define GIMP_IMAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_IMAGE, GimpImageClass))
typedef struct _GimpImageClass GimpImageClass;
struct _GimpImage
{
GimpViewable parent_instance;
Gimp *gimp; /* the GIMP the image belongs to*/
gint ID; /* provides a unique ID */
PlugInProcDef *save_proc; /* last PDB save proc used */
gint width, height; /* width and height attributes */
gdouble xresolution; /* image x-res, in dpi */
gdouble yresolution; /* image y-res, in dpi */
GimpUnit unit; /* image unit */
GimpImageBaseType base_type; /* base gimp_image type */
guchar *cmap; /* colormap--for indexed */
gint num_cols; /* number of cols--for indexed */
gint dirty; /* dirty flag -- # of ops */
gboolean undo_on; /* Is undo enabled? */
gint instance_count; /* number of instances */
gint disp_count; /* number of displays */
GimpTattoo tattoo_state; /* the next unique tattoo to use*/
TileManager *shadow; /* shadow buffer tiles */
/* Projection attributes */
gboolean construct_flag; /* flag for construction */
GimpImageType proj_type; /* type of the projection image */
gint proj_bytes; /* bpp in projection image */
gint proj_level; /* projection level */
TileManager *projection; /* The projection--layers & */
/* channels */
GList *guides; /* guides */
/* Layer/Channel attributes */
GimpContainer *layers; /* the list of layers */
GimpContainer *channels; /* the list of masks */
GSList *layer_stack; /* the layers in MRU order */
GimpLayer *active_layer; /* the active layer */
GimpChannel *active_channel; /* the active channel */
GimpLayer *floating_sel; /* the FS layer */
GimpChannel *selection_mask; /* the selection mask channel */
GimpParasiteList *parasites; /* Plug-in parasite data */
PathList *paths; /* Paths data for this image */
gboolean visible[MAX_CHANNELS]; /* visible channels */
gboolean active[MAX_CHANNELS]; /* active channels */
gboolean qmask_state; /* TRUE if qmask is on */
GimpRGB qmask_color; /* rgba triplet of the color */
/* Old undo apparatus */
GSList *undo_stack; /* stack for undo operations */
GSList *redo_stack; /* stack for redo operations */
gint undo_bytes; /* bytes in undo stack */
gint undo_levels; /* levels in undo stack */
gint group_count; /* nested undo groups */
UndoType pushing_undo_group; /* undo group status flag */
/* New undo apparatus */
GimpUndoStack *new_undo_stack; /* stack for undo operations */
GimpUndoStack *new_redo_stack; /* stack for redo operations */
/* Composite preview */
TempBuf *comp_preview; /* the composite preview */
gboolean comp_preview_valid; /* preview valid-1/channel */
};
struct _GimpImageClass
{
GimpViewableClass parent_class;
void (* mode_changed) (GimpImage *gimage);
void (* alpha_changed) (GimpImage *gimage);
void (* floating_selection_changed) (GimpImage *gimage);
void (* active_layer_changed) (GimpImage *gimage);
void (* active_channel_changed) (GimpImage *gimage);
void (* component_visibility_changed) (GimpImage *gimage,
ChannelType channel);
void (* component_active_changed) (GimpImage *gimage,
ChannelType channel);
void (* mask_changed) (GimpImage *gimage);
void (* resolution_changed) (GimpImage *gimage);
void (* unit_changed) (GimpImage *gimage);
void (* qmask_changed) (GimpImage *gimage);
void (* selection_control) (GimpImage *gimage,
GimpSelectionControl control);
void (* clean) (GimpImage *gimage);
void (* dirty) (GimpImage *gimage);
void (* update) (GimpImage *gimage,
gint x,
gint y,
gint width,
gint height);
void (* update_guide) (GimpImage *gimage,
GimpGuide *guide);
void (* colormap_changed) (GimpImage *gimage,
gint color_index);
void (* undo_event) (GimpImage *gimage,
gint event);
void (* undo) (GimpImage *gimage);
void (* redo) (GimpImage *gimage);
};
/* function declarations */
GType gimp_image_get_type (void) G_GNUC_CONST;
GimpImage * gimp_image_new (Gimp *gimp,
gint width,
gint height,
GimpImageBaseType base_type);
gint gimp_image_get_ID (GimpImage *gimage);
GimpImage * gimp_image_get_by_ID (Gimp *gimp,
gint id);
void gimp_image_set_filename (GimpImage *gimage,
const gchar *filename);
void gimp_image_set_resolution (GimpImage *gimage,
gdouble xres,
gdouble yres);
void gimp_image_get_resolution (const GimpImage *gimage,
gdouble *xresolution,
gdouble *yresolution);
void gimp_image_set_unit (GimpImage *gimage,
GimpUnit unit);
GimpUnit gimp_image_get_unit (const GimpImage *gimage);
void gimp_image_set_qmask_state (GimpImage *gimage,
gboolean qmask_state);
gboolean gimp_image_get_qmask_state (const GimpImage *gimage);
void gimp_image_set_save_proc (GimpImage *gimage,
PlugInProcDef *proc);
PlugInProcDef * gimp_image_get_save_proc (const GimpImage *gimage);
gint gimp_image_get_width (const GimpImage *gimage);
gint gimp_image_get_height (const GimpImage *gimage);
void gimp_image_resize (GimpImage *gimage,
gint new_width,
gint new_height,
gint offset_x,
gint offset_y);
void gimp_image_scale (GimpImage *gimage,
gint new_width,
gint new_height,
GimpProgressFunc progress_func,
gpointer progress_data);
gboolean gimp_image_check_scaling (const GimpImage *gimage,
gint new_width,
gint new_height);
TileManager * gimp_image_shadow (GimpImage *gimage,
gint width,
gint height,
gint bpp);
void gimp_image_free_shadow (GimpImage *gimage);
void gimp_image_apply_image (GimpImage *gimage,
GimpDrawable *drawable,
PixelRegion *src2PR,
gboolean undo,
gint opacity,
LayerModeEffects mode,
TileManager *src1_tiles,
gint x,
gint y);
void gimp_image_replace_image (GimpImage *gimage,
GimpDrawable *drawable,
PixelRegion *src2PR,
gboolean undo,
gint opacity,
PixelRegion *maskPR,
gint x,
gint y);
void gimp_image_get_foreground (const GimpImage *gimage,
const GimpDrawable *drawable,
guchar *fg);
void gimp_image_get_background (const GimpImage *gimage,
const GimpDrawable *drawable,
guchar *bg);
void gimp_image_get_color (const GimpImage *gimage,
GimpImageType d_type,
guchar *rgb,
guchar *src);
void gimp_image_transform_color (const GimpImage *gimage,
const GimpDrawable *drawable,
guchar *src,
guchar *dest,
GimpImageBaseType type);
GimpGuide * gimp_image_add_hguide (GimpImage *gimage);
GimpGuide * gimp_image_add_vguide (GimpImage *gimage);
void gimp_image_add_guide (GimpImage *gimage,
GimpGuide *guide);
void gimp_image_remove_guide (GimpImage *gimage,
GimpGuide *guide);
void gimp_image_delete_guide (GimpImage *gimage,
GimpGuide *guide);
GimpGuide * gimp_image_find_guide (GimpImage *gimage,
gint x,
gint y);
gboolean gimp_image_snap_point (GimpImage *gimage,
gint x,
gint y,
gint *tx,
gint *ty);
gboolean gimp_image_snap_rectangle (GimpImage *gimage,
gint x1,
gint y1,
gint x2,
gint y2,
gint *tx1,
gint *ty1);
GimpParasite * gimp_image_parasite_find (const GimpImage *gimage,
const gchar *name);
gchar ** gimp_image_parasite_list (const GimpImage *gimage,
gint *count);
void gimp_image_parasite_attach (GimpImage *gimage,
GimpParasite *parasite);
void gimp_image_parasite_detach (GimpImage *gimage,
const gchar *parasite);
GimpTattoo gimp_image_get_new_tattoo (GimpImage *gimage);
gboolean gimp_image_set_tattoo_state (GimpImage *gimage,
GimpTattoo val);
GimpTattoo gimp_image_get_tattoo_state (GimpImage *gimage);
void gimp_image_set_paths (GimpImage *gimage,
PathList *paths);
PathList * gimp_image_get_paths (const GimpImage *gimage);
/* Temporary hack till colormap manipulation is encapsulated in functions.
* Call this whenever you modify an image's colormap. The col argument
* specifies which color has changed, or negative if there's a bigger change.
* Currently, use this also when the image's base type is changed to/from
* indexed.
*/
void gimp_image_colormap_changed (GimpImage *gimage,
gint col);
void gimp_image_mode_changed (GimpImage *gimage);
void gimp_image_alpha_changed (GimpImage *gimage);
void gimp_image_floating_selection_changed (GimpImage *gimage);
void gimp_image_mask_changed (GimpImage *gimage);
void gimp_image_resolution_changed (GimpImage *gimage);
void gimp_image_unit_changed (GimpImage *gimage);
void gimp_image_qmask_changed (GimpImage *gimage);
void gimp_image_update (GimpImage *gimage,
gint x,
gint y,
gint width,
gint height);
void gimp_image_update_guide (GimpImage *gimage,
GimpGuide *guide);
void gimp_image_selection_control (GimpImage *gimage,
GimpSelectionControl control);
/* layer/channel functions */
GimpContainer * gimp_image_get_layers (const GimpImage *gimage);
GimpContainer * gimp_image_get_channels (const GimpImage *gimage);
gint gimp_image_get_layer_index (const GimpImage *gimage,
const GimpLayer *layer);
gint gimp_image_get_channel_index (const GimpImage *gimage,
const GimpChannel *channel);
GimpLayer * gimp_image_get_active_layer (const GimpImage *gimage);
GimpChannel * gimp_image_get_active_channel (const GimpImage *gimage);
GimpLayer * gimp_image_get_layer_by_tattoo (const GimpImage *gimage,
GimpTattoo tatoo);
GimpChannel * gimp_image_get_channel_by_tattoo (const GimpImage *gimage,
GimpTattoo tatoo);
GimpChannel * gimp_image_get_channel_by_name (const GimpImage *gimage,
const gchar *name);
GimpChannel * gimp_image_get_mask (const GimpImage *gimage);
void gimp_image_set_component_active (GimpImage *gimage,
ChannelType type,
gboolean active);
gboolean gimp_image_get_component_active (const GimpImage *gimage,
ChannelType type);
void gimp_image_get_active_components (GimpImage *gimage,
GimpDrawable *drawable,
gint *active);
void gimp_image_set_component_visible (GimpImage *gimage,
ChannelType type,
gboolean visible);
gboolean gimp_image_get_component_visible (const GimpImage *gimage,
ChannelType type);
gboolean gimp_image_layer_boundary (const GimpImage *gimage,
BoundSeg **segs,
gint *n_segs);
GimpLayer * gimp_image_set_active_layer (GimpImage *gimage,
GimpLayer *layer);
GimpChannel * gimp_image_set_active_channel (GimpImage *gimage,
GimpChannel *channel);
GimpChannel * gimp_image_unset_active_channel (GimpImage *gimage);
GimpLayer * gimp_image_pick_correlate_layer (const GimpImage *gimage,
gint x,
gint y);
gboolean gimp_image_raise_layer (GimpImage *gimage,
GimpLayer *layer);
gboolean gimp_image_lower_layer (GimpImage *gimage,
GimpLayer *layer);
gboolean gimp_image_raise_layer_to_top (GimpImage *gimage,
GimpLayer *layer);
gboolean gimp_image_lower_layer_to_bottom (GimpImage *gimage,
GimpLayer *layer);
gboolean gimp_image_position_layer (GimpImage *gimage,
GimpLayer *layer,
gint new_index,
gboolean push_undo);
GimpLayer * gimp_image_merge_visible_layers (GimpImage *gimage,
MergeType merge_type);
GimpLayer * gimp_image_merge_down (GimpImage *gimage,
GimpLayer *current_layer,
MergeType merge_type);
GimpLayer * gimp_image_flatten (GimpImage *gimage);
GimpLayer * gimp_image_merge_layers (GimpImage *gimage,
GSList *merge_list,
MergeType merge_type);
gboolean gimp_image_add_layer (GimpImage *gimage,
GimpLayer *layer,
gint position);
void gimp_image_remove_layer (GimpImage *gimage,
GimpLayer *layer);
gboolean gimp_image_raise_channel (GimpImage *gimage,
GimpChannel *channel);
gboolean gimp_image_lower_channel (GimpImage *gimage,
GimpChannel *channel);
gboolean gimp_image_position_channel (GimpImage *gimage,
GimpChannel *channel,
gint new_index,
gboolean push_undo);
gboolean gimp_image_add_channel (GimpImage *gimage,
GimpChannel *channel,
gint position);
void gimp_image_remove_channel (GimpImage *gimage,
GimpChannel *channel);
void gimp_image_invalidate_layer_previews (GimpImage *gimage);
void gimp_image_invalidate_channel_previews (GimpImage *gimage);
/* Access functions */
gboolean gimp_image_is_empty (const GimpImage *gimage);
GimpDrawable * gimp_image_active_drawable (const GimpImage *gimage);
GimpImageBaseType gimp_image_base_type (const GimpImage *gimage);
GimpImageType gimp_image_base_type_with_alpha (const GimpImage *gimage);
const gchar * gimp_image_filename (const GimpImage *gimage);
gboolean gimp_image_undo_is_enabled (const GimpImage *gimage);
gboolean gimp_image_undo_enable (GimpImage *gimage);
gboolean gimp_image_undo_disable (GimpImage *gimage);
gboolean gimp_image_undo_freeze (GimpImage *gimage);
gboolean gimp_image_undo_thaw (GimpImage *gimage);
void gimp_image_undo_event (GimpImage *gimage,
gint event);
gint gimp_image_dirty (GimpImage *gimage);
gint gimp_image_clean (GimpImage *gimage);
void gimp_image_clean_all (GimpImage *gimage);
GimpLayer * gimp_image_floating_sel (const GimpImage *gimage);
guchar * gimp_image_cmap (const GimpImage *gimage);
gboolean gimp_image_preview_valid (const GimpImage *gimage);
#endif /* __GIMP_IMAGE_H__ */
#endif /* __GIMP_IMAGE_GUIDES_H__ */

View File

@ -20,8 +20,6 @@
#include <glib-object.h>
#include <glib-object.h>
#include "core-types.h"
#include "pdb/pdb-types.h"
@ -31,6 +29,8 @@
#include "paint-funcs/paint-funcs.h"
#include "pdb/procedural_db.h"
#include "gimpchannel.h"
#include "gimpcontext.h"
#include "gimpimage.h"
@ -42,16 +42,16 @@
#include "floating_sel.h"
#include "undo.h"
#include "pdb/procedural_db.h"
#include "libgimp/gimpintl.h"
/* local variables */
static gboolean gimage_mask_stroking = FALSE;
/* functions */
/* public functions */
gboolean
gimage_mask_boundary (GimpImage *gimage,
BoundSeg **segs_in,

View File

@ -16,83 +16,83 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#ifndef __GIMAGE_MASK_H__
#define __GIMAGE_MASK_H__
#ifndef __GIMP_IMAGE_MASK_H__
#define __GIMP_IMAGE_MASK_H__
gboolean gimage_mask_boundary (GimpImage *gimage,
BoundSeg **segs_in,
BoundSeg **segs_out,
gint *num_segs_in,
gint *num_segs_out);
gboolean gimage_mask_boundary (GimpImage *gimage,
BoundSeg **segs_in,
BoundSeg **segs_out,
gint *num_segs_in,
gint *num_segs_out);
gboolean gimage_mask_bounds (GimpImage *gimage,
gint *x1,
gint *y1,
gint *x2,
gint *y2);
gboolean gimage_mask_bounds (GimpImage *gimage,
gint *x1,
gint *y1,
gint *x2,
gint *y2);
void gimage_mask_invalidate (GimpImage *gimage);
void gimage_mask_invalidate (GimpImage *gimage);
gint gimage_mask_value (GimpImage *gimage,
gint x,
gint y);
gint gimage_mask_value (GimpImage *gimage,
gint x,
gint y);
gboolean gimage_mask_is_empty (GimpImage *gimage);
gboolean gimage_mask_is_empty (GimpImage *gimage);
void gimage_mask_translate (GimpImage *gimage,
gint off_x,
gint off_y);
void gimage_mask_translate (GimpImage *gimage,
gint off_x,
gint off_y);
TileManager * gimage_mask_extract (GimpImage *gimage,
GimpDrawable *drawable,
gboolean cut_gimage,
gboolean keep_indexed,
gboolean add_alpha);
TileManager * gimage_mask_extract (GimpImage *gimage,
GimpDrawable *drawable,
gboolean cut_gimage,
gboolean keep_indexed,
gboolean add_alpha);
GimpLayer * gimage_mask_float (GimpImage *gimage,
GimpDrawable *drawable,
gint off_x,
gint off_y);
GimpLayer * gimage_mask_float (GimpImage *gimage,
GimpDrawable *drawable,
gint off_x,
gint off_y);
void gimage_mask_clear (GimpImage *gimage);
void gimage_mask_undo (GimpImage *gimage);
void gimage_mask_invert (GimpImage *gimage);
void gimage_mask_sharpen (GimpImage *gimage);
void gimage_mask_all (GimpImage *gimage);
void gimage_mask_none (GimpImage *gimage);
void gimage_mask_clear (GimpImage *gimage);
void gimage_mask_undo (GimpImage *gimage);
void gimage_mask_invert (GimpImage *gimage);
void gimage_mask_sharpen (GimpImage *gimage);
void gimage_mask_all (GimpImage *gimage);
void gimage_mask_none (GimpImage *gimage);
void gimage_mask_feather (GimpImage *gimage,
gdouble feather_radius_x,
gdouble feather_radius_y);
void gimage_mask_feather (GimpImage *gimage,
gdouble feather_radius_x,
gdouble feather_radius_y);
void gimage_mask_border (GimpImage *gimage,
gint border_radius_x,
gint border_radius_y);
void gimage_mask_border (GimpImage *gimage,
gint border_radius_x,
gint border_radius_y);
void gimage_mask_grow (GimpImage *gimage,
gint grow_pixels_x,
gint grow_pixels_y);
void gimage_mask_grow (GimpImage *gimage,
gint grow_pixels_x,
gint grow_pixels_y);
void gimage_mask_shrink (GimpImage *gimage,
gint shrink_pixels_x,
gint shrink_pixels_y,
gboolean edge_lock);
void gimage_mask_shrink (GimpImage *gimage,
gint shrink_pixels_x,
gint shrink_pixels_y,
gboolean edge_lock);
void gimage_mask_layer_alpha (GimpImage *gimage,
GimpLayer *layer);
void gimage_mask_layer_alpha (GimpImage *gimage,
GimpLayer *layer);
void gimage_mask_layer_mask (GimpImage *gimage,
GimpLayer *layer);
void gimage_mask_layer_mask (GimpImage *gimage,
GimpLayer *layer);
void gimage_mask_load (GimpImage *gimage,
GimpChannel *channel);
void gimage_mask_load (GimpImage *gimage,
GimpChannel *channel);
GimpChannel * gimage_mask_save (GimpImage *gimage);
GimpChannel * gimage_mask_save (GimpImage *gimage);
gboolean gimage_mask_stroke (GimpImage *gimage,
GimpDrawable *drawable,
GimpContext *context);
gboolean gimage_mask_stroke (GimpImage *gimage,
GimpDrawable *drawable,
GimpContext *context);
#endif /* __GIMAGE_MASK_H__ */
#endif /* __GIMP_IMAGE_MASK_H__ */

File diff suppressed because it is too large Load Diff

View File

@ -16,370 +16,10 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#ifndef __GIMP_IMAGE_H__
#define __GIMP_IMAGE_H__
#ifndef __GIMP_IMAGE_MERGE_H__
#define __GIMP_IMAGE_MERGE_H__
#include "gimpviewable.h"
#define COLORMAP_SIZE 768
#define GIMP_IMAGE_TYPE_HAS_ALPHA(t) ((t) == RGBA_GIMAGE || \
(t) == GRAYA_GIMAGE || \
(t) == INDEXEDA_GIMAGE)
struct _GimpGuide
{
gint ref_count;
gint position;
InternalOrientationType orientation;
guint32 guide_ID;
};
#define GIMP_TYPE_IMAGE (gimp_image_get_type ())
#define GIMP_IMAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_IMAGE, GimpImage))
#define GIMP_IMAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_IMAGE, GimpImageClass))
#define GIMP_IS_IMAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_IMAGE))
#define GIMP_IS_IMAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_IMAGE))
#define GIMP_IMAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_IMAGE, GimpImageClass))
typedef struct _GimpImageClass GimpImageClass;
struct _GimpImage
{
GimpViewable parent_instance;
Gimp *gimp; /* the GIMP the image belongs to*/
gint ID; /* provides a unique ID */
PlugInProcDef *save_proc; /* last PDB save proc used */
gint width, height; /* width and height attributes */
gdouble xresolution; /* image x-res, in dpi */
gdouble yresolution; /* image y-res, in dpi */
GimpUnit unit; /* image unit */
GimpImageBaseType base_type; /* base gimp_image type */
guchar *cmap; /* colormap--for indexed */
gint num_cols; /* number of cols--for indexed */
gint dirty; /* dirty flag -- # of ops */
gboolean undo_on; /* Is undo enabled? */
gint instance_count; /* number of instances */
gint disp_count; /* number of displays */
GimpTattoo tattoo_state; /* the next unique tattoo to use*/
TileManager *shadow; /* shadow buffer tiles */
/* Projection attributes */
gboolean construct_flag; /* flag for construction */
GimpImageType proj_type; /* type of the projection image */
gint proj_bytes; /* bpp in projection image */
gint proj_level; /* projection level */
TileManager *projection; /* The projection--layers & */
/* channels */
GList *guides; /* guides */
/* Layer/Channel attributes */
GimpContainer *layers; /* the list of layers */
GimpContainer *channels; /* the list of masks */
GSList *layer_stack; /* the layers in MRU order */
GimpLayer *active_layer; /* the active layer */
GimpChannel *active_channel; /* the active channel */
GimpLayer *floating_sel; /* the FS layer */
GimpChannel *selection_mask; /* the selection mask channel */
GimpParasiteList *parasites; /* Plug-in parasite data */
PathList *paths; /* Paths data for this image */
gboolean visible[MAX_CHANNELS]; /* visible channels */
gboolean active[MAX_CHANNELS]; /* active channels */
gboolean qmask_state; /* TRUE if qmask is on */
GimpRGB qmask_color; /* rgba triplet of the color */
/* Old undo apparatus */
GSList *undo_stack; /* stack for undo operations */
GSList *redo_stack; /* stack for redo operations */
gint undo_bytes; /* bytes in undo stack */
gint undo_levels; /* levels in undo stack */
gint group_count; /* nested undo groups */
UndoType pushing_undo_group; /* undo group status flag */
/* New undo apparatus */
GimpUndoStack *new_undo_stack; /* stack for undo operations */
GimpUndoStack *new_redo_stack; /* stack for redo operations */
/* Composite preview */
TempBuf *comp_preview; /* the composite preview */
gboolean comp_preview_valid; /* preview valid-1/channel */
};
struct _GimpImageClass
{
GimpViewableClass parent_class;
void (* mode_changed) (GimpImage *gimage);
void (* alpha_changed) (GimpImage *gimage);
void (* floating_selection_changed) (GimpImage *gimage);
void (* active_layer_changed) (GimpImage *gimage);
void (* active_channel_changed) (GimpImage *gimage);
void (* component_visibility_changed) (GimpImage *gimage,
ChannelType channel);
void (* component_active_changed) (GimpImage *gimage,
ChannelType channel);
void (* mask_changed) (GimpImage *gimage);
void (* resolution_changed) (GimpImage *gimage);
void (* unit_changed) (GimpImage *gimage);
void (* qmask_changed) (GimpImage *gimage);
void (* selection_control) (GimpImage *gimage,
GimpSelectionControl control);
void (* clean) (GimpImage *gimage);
void (* dirty) (GimpImage *gimage);
void (* update) (GimpImage *gimage,
gint x,
gint y,
gint width,
gint height);
void (* update_guide) (GimpImage *gimage,
GimpGuide *guide);
void (* colormap_changed) (GimpImage *gimage,
gint color_index);
void (* undo_event) (GimpImage *gimage,
gint event);
void (* undo) (GimpImage *gimage);
void (* redo) (GimpImage *gimage);
};
/* function declarations */
GType gimp_image_get_type (void) G_GNUC_CONST;
GimpImage * gimp_image_new (Gimp *gimp,
gint width,
gint height,
GimpImageBaseType base_type);
gint gimp_image_get_ID (GimpImage *gimage);
GimpImage * gimp_image_get_by_ID (Gimp *gimp,
gint id);
void gimp_image_set_filename (GimpImage *gimage,
const gchar *filename);
void gimp_image_set_resolution (GimpImage *gimage,
gdouble xres,
gdouble yres);
void gimp_image_get_resolution (const GimpImage *gimage,
gdouble *xresolution,
gdouble *yresolution);
void gimp_image_set_unit (GimpImage *gimage,
GimpUnit unit);
GimpUnit gimp_image_get_unit (const GimpImage *gimage);
void gimp_image_set_qmask_state (GimpImage *gimage,
gboolean qmask_state);
gboolean gimp_image_get_qmask_state (const GimpImage *gimage);
void gimp_image_set_save_proc (GimpImage *gimage,
PlugInProcDef *proc);
PlugInProcDef * gimp_image_get_save_proc (const GimpImage *gimage);
gint gimp_image_get_width (const GimpImage *gimage);
gint gimp_image_get_height (const GimpImage *gimage);
void gimp_image_resize (GimpImage *gimage,
gint new_width,
gint new_height,
gint offset_x,
gint offset_y);
void gimp_image_scale (GimpImage *gimage,
gint new_width,
gint new_height,
GimpProgressFunc progress_func,
gpointer progress_data);
gboolean gimp_image_check_scaling (const GimpImage *gimage,
gint new_width,
gint new_height);
TileManager * gimp_image_shadow (GimpImage *gimage,
gint width,
gint height,
gint bpp);
void gimp_image_free_shadow (GimpImage *gimage);
void gimp_image_apply_image (GimpImage *gimage,
GimpDrawable *drawable,
PixelRegion *src2PR,
gboolean undo,
gint opacity,
LayerModeEffects mode,
TileManager *src1_tiles,
gint x,
gint y);
void gimp_image_replace_image (GimpImage *gimage,
GimpDrawable *drawable,
PixelRegion *src2PR,
gboolean undo,
gint opacity,
PixelRegion *maskPR,
gint x,
gint y);
void gimp_image_get_foreground (const GimpImage *gimage,
const GimpDrawable *drawable,
guchar *fg);
void gimp_image_get_background (const GimpImage *gimage,
const GimpDrawable *drawable,
guchar *bg);
void gimp_image_get_color (const GimpImage *gimage,
GimpImageType d_type,
guchar *rgb,
guchar *src);
void gimp_image_transform_color (const GimpImage *gimage,
const GimpDrawable *drawable,
guchar *src,
guchar *dest,
GimpImageBaseType type);
GimpGuide * gimp_image_add_hguide (GimpImage *gimage);
GimpGuide * gimp_image_add_vguide (GimpImage *gimage);
void gimp_image_add_guide (GimpImage *gimage,
GimpGuide *guide);
void gimp_image_remove_guide (GimpImage *gimage,
GimpGuide *guide);
void gimp_image_delete_guide (GimpImage *gimage,
GimpGuide *guide);
GimpGuide * gimp_image_find_guide (GimpImage *gimage,
gint x,
gint y);
gboolean gimp_image_snap_point (GimpImage *gimage,
gint x,
gint y,
gint *tx,
gint *ty);
gboolean gimp_image_snap_rectangle (GimpImage *gimage,
gint x1,
gint y1,
gint x2,
gint y2,
gint *tx1,
gint *ty1);
GimpParasite * gimp_image_parasite_find (const GimpImage *gimage,
const gchar *name);
gchar ** gimp_image_parasite_list (const GimpImage *gimage,
gint *count);
void gimp_image_parasite_attach (GimpImage *gimage,
GimpParasite *parasite);
void gimp_image_parasite_detach (GimpImage *gimage,
const gchar *parasite);
GimpTattoo gimp_image_get_new_tattoo (GimpImage *gimage);
gboolean gimp_image_set_tattoo_state (GimpImage *gimage,
GimpTattoo val);
GimpTattoo gimp_image_get_tattoo_state (GimpImage *gimage);
void gimp_image_set_paths (GimpImage *gimage,
PathList *paths);
PathList * gimp_image_get_paths (const GimpImage *gimage);
/* Temporary hack till colormap manipulation is encapsulated in functions.
* Call this whenever you modify an image's colormap. The col argument
* specifies which color has changed, or negative if there's a bigger change.
* Currently, use this also when the image's base type is changed to/from
* indexed.
*/
void gimp_image_colormap_changed (GimpImage *gimage,
gint col);
void gimp_image_mode_changed (GimpImage *gimage);
void gimp_image_alpha_changed (GimpImage *gimage);
void gimp_image_floating_selection_changed (GimpImage *gimage);
void gimp_image_mask_changed (GimpImage *gimage);
void gimp_image_resolution_changed (GimpImage *gimage);
void gimp_image_unit_changed (GimpImage *gimage);
void gimp_image_qmask_changed (GimpImage *gimage);
void gimp_image_update (GimpImage *gimage,
gint x,
gint y,
gint width,
gint height);
void gimp_image_update_guide (GimpImage *gimage,
GimpGuide *guide);
void gimp_image_selection_control (GimpImage *gimage,
GimpSelectionControl control);
/* layer/channel functions */
GimpContainer * gimp_image_get_layers (const GimpImage *gimage);
GimpContainer * gimp_image_get_channels (const GimpImage *gimage);
gint gimp_image_get_layer_index (const GimpImage *gimage,
const GimpLayer *layer);
gint gimp_image_get_channel_index (const GimpImage *gimage,
const GimpChannel *channel);
GimpLayer * gimp_image_get_active_layer (const GimpImage *gimage);
GimpChannel * gimp_image_get_active_channel (const GimpImage *gimage);
GimpLayer * gimp_image_get_layer_by_tattoo (const GimpImage *gimage,
GimpTattoo tatoo);
GimpChannel * gimp_image_get_channel_by_tattoo (const GimpImage *gimage,
GimpTattoo tatoo);
GimpChannel * gimp_image_get_channel_by_name (const GimpImage *gimage,
const gchar *name);
GimpChannel * gimp_image_get_mask (const GimpImage *gimage);
void gimp_image_set_component_active (GimpImage *gimage,
ChannelType type,
gboolean active);
gboolean gimp_image_get_component_active (const GimpImage *gimage,
ChannelType type);
void gimp_image_get_active_components (GimpImage *gimage,
GimpDrawable *drawable,
gint *active);
void gimp_image_set_component_visible (GimpImage *gimage,
ChannelType type,
gboolean visible);
gboolean gimp_image_get_component_visible (const GimpImage *gimage,
ChannelType type);
gboolean gimp_image_layer_boundary (const GimpImage *gimage,
BoundSeg **segs,
gint *n_segs);
GimpLayer * gimp_image_set_active_layer (GimpImage *gimage,
GimpLayer *layer);
GimpChannel * gimp_image_set_active_channel (GimpImage *gimage,
GimpChannel *channel);
GimpChannel * gimp_image_unset_active_channel (GimpImage *gimage);
GimpLayer * gimp_image_pick_correlate_layer (const GimpImage *gimage,
gint x,
gint y);
gboolean gimp_image_raise_layer (GimpImage *gimage,
GimpLayer *layer);
gboolean gimp_image_lower_layer (GimpImage *gimage,
GimpLayer *layer);
gboolean gimp_image_raise_layer_to_top (GimpImage *gimage,
GimpLayer *layer);
gboolean gimp_image_lower_layer_to_bottom (GimpImage *gimage,
GimpLayer *layer);
gboolean gimp_image_position_layer (GimpImage *gimage,
GimpLayer *layer,
gint new_index,
gboolean push_undo);
GimpLayer * gimp_image_merge_visible_layers (GimpImage *gimage,
MergeType merge_type);
GimpLayer * gimp_image_merge_down (GimpImage *gimage,
@ -389,52 +29,6 @@ GimpLayer * gimp_image_flatten (GimpImage *gimage);
GimpLayer * gimp_image_merge_layers (GimpImage *gimage,
GSList *merge_list,
MergeType merge_type);
gboolean gimp_image_add_layer (GimpImage *gimage,
GimpLayer *layer,
gint position);
void gimp_image_remove_layer (GimpImage *gimage,
GimpLayer *layer);
gboolean gimp_image_raise_channel (GimpImage *gimage,
GimpChannel *channel);
gboolean gimp_image_lower_channel (GimpImage *gimage,
GimpChannel *channel);
gboolean gimp_image_position_channel (GimpImage *gimage,
GimpChannel *channel,
gint new_index,
gboolean push_undo);
gboolean gimp_image_add_channel (GimpImage *gimage,
GimpChannel *channel,
gint position);
void gimp_image_remove_channel (GimpImage *gimage,
GimpChannel *channel);
void gimp_image_invalidate_layer_previews (GimpImage *gimage);
void gimp_image_invalidate_channel_previews (GimpImage *gimage);
/* Access functions */
gboolean gimp_image_is_empty (const GimpImage *gimage);
GimpDrawable * gimp_image_active_drawable (const GimpImage *gimage);
GimpImageBaseType gimp_image_base_type (const GimpImage *gimage);
GimpImageType gimp_image_base_type_with_alpha (const GimpImage *gimage);
const gchar * gimp_image_filename (const GimpImage *gimage);
gboolean gimp_image_undo_is_enabled (const GimpImage *gimage);
gboolean gimp_image_undo_enable (GimpImage *gimage);
gboolean gimp_image_undo_disable (GimpImage *gimage);
gboolean gimp_image_undo_freeze (GimpImage *gimage);
gboolean gimp_image_undo_thaw (GimpImage *gimage);
void gimp_image_undo_event (GimpImage *gimage,
gint event);
gint gimp_image_dirty (GimpImage *gimage);
gint gimp_image_clean (GimpImage *gimage);
void gimp_image_clean_all (GimpImage *gimage);
GimpLayer * gimp_image_floating_sel (const GimpImage *gimage);
guchar * gimp_image_cmap (const GimpImage *gimage);
gboolean gimp_image_preview_valid (const GimpImage *gimage);
#endif /* __GIMP_IMAGE_H__ */
#endif /* __GIMP_IMAGE_MERGE_H__ */

File diff suppressed because it is too large Load Diff

View File

@ -16,425 +16,15 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#ifndef __GIMP_IMAGE_H__
#define __GIMP_IMAGE_H__
#ifndef __GIMP_IMAGE_RESIZE_H__
#define __GIMP_IMAGE_RESIZE_H__
#include "gimpviewable.h"
void gimp_image_resize (GimpImage *gimage,
gint new_width,
gint new_height,
gint offset_x,
gint offset_y);
#define COLORMAP_SIZE 768
#define GIMP_IMAGE_TYPE_HAS_ALPHA(t) ((t) == RGBA_GIMAGE || \
(t) == GRAYA_GIMAGE || \
(t) == INDEXEDA_GIMAGE)
struct _GimpGuide
{
gint ref_count;
gint position;
InternalOrientationType orientation;
guint32 guide_ID;
};
#define GIMP_TYPE_IMAGE (gimp_image_get_type ())
#define GIMP_IMAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_IMAGE, GimpImage))
#define GIMP_IMAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_IMAGE, GimpImageClass))
#define GIMP_IS_IMAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_IMAGE))
#define GIMP_IS_IMAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_IMAGE))
#define GIMP_IMAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_IMAGE, GimpImageClass))
typedef struct _GimpImageClass GimpImageClass;
struct _GimpImage
{
GimpViewable parent_instance;
Gimp *gimp; /* the GIMP the image belongs to*/
gint ID; /* provides a unique ID */
PlugInProcDef *save_proc; /* last PDB save proc used */
gint width, height; /* width and height attributes */
gdouble xresolution; /* image x-res, in dpi */
gdouble yresolution; /* image y-res, in dpi */
GimpUnit unit; /* image unit */
GimpImageBaseType base_type; /* base gimp_image type */
guchar *cmap; /* colormap--for indexed */
gint num_cols; /* number of cols--for indexed */
gint dirty; /* dirty flag -- # of ops */
gboolean undo_on; /* Is undo enabled? */
gint instance_count; /* number of instances */
gint disp_count; /* number of displays */
GimpTattoo tattoo_state; /* the next unique tattoo to use*/
TileManager *shadow; /* shadow buffer tiles */
/* Projection attributes */
gboolean construct_flag; /* flag for construction */
GimpImageType proj_type; /* type of the projection image */
gint proj_bytes; /* bpp in projection image */
gint proj_level; /* projection level */
TileManager *projection; /* The projection--layers & */
/* channels */
GList *guides; /* guides */
/* Layer/Channel attributes */
GimpContainer *layers; /* the list of layers */
GimpContainer *channels; /* the list of masks */
GSList *layer_stack; /* the layers in MRU order */
GimpLayer *active_layer; /* the active layer */
GimpChannel *active_channel; /* the active channel */
GimpLayer *floating_sel; /* the FS layer */
GimpChannel *selection_mask; /* the selection mask channel */
GimpParasiteList *parasites; /* Plug-in parasite data */
PathList *paths; /* Paths data for this image */
gboolean visible[MAX_CHANNELS]; /* visible channels */
gboolean active[MAX_CHANNELS]; /* active channels */
gboolean qmask_state; /* TRUE if qmask is on */
GimpRGB qmask_color; /* rgba triplet of the color */
/* Old undo apparatus */
GSList *undo_stack; /* stack for undo operations */
GSList *redo_stack; /* stack for redo operations */
gint undo_bytes; /* bytes in undo stack */
gint undo_levels; /* levels in undo stack */
gint group_count; /* nested undo groups */
UndoType pushing_undo_group; /* undo group status flag */
/* New undo apparatus */
GimpUndoStack *new_undo_stack; /* stack for undo operations */
GimpUndoStack *new_redo_stack; /* stack for redo operations */
/* Composite preview */
TempBuf *comp_preview; /* the composite preview */
gboolean comp_preview_valid; /* preview valid-1/channel */
};
struct _GimpImageClass
{
GimpViewableClass parent_class;
void (* mode_changed) (GimpImage *gimage);
void (* alpha_changed) (GimpImage *gimage);
void (* floating_selection_changed) (GimpImage *gimage);
void (* active_layer_changed) (GimpImage *gimage);
void (* active_channel_changed) (GimpImage *gimage);
void (* component_visibility_changed) (GimpImage *gimage,
ChannelType channel);
void (* component_active_changed) (GimpImage *gimage,
ChannelType channel);
void (* mask_changed) (GimpImage *gimage);
void (* resolution_changed) (GimpImage *gimage);
void (* unit_changed) (GimpImage *gimage);
void (* qmask_changed) (GimpImage *gimage);
void (* selection_control) (GimpImage *gimage,
GimpSelectionControl control);
void (* clean) (GimpImage *gimage);
void (* dirty) (GimpImage *gimage);
void (* update) (GimpImage *gimage,
gint x,
gint y,
gint width,
gint height);
void (* update_guide) (GimpImage *gimage,
GimpGuide *guide);
void (* colormap_changed) (GimpImage *gimage,
gint color_index);
void (* undo_event) (GimpImage *gimage,
gint event);
void (* undo) (GimpImage *gimage);
void (* redo) (GimpImage *gimage);
};
/* function declarations */
GType gimp_image_get_type (void) G_GNUC_CONST;
GimpImage * gimp_image_new (Gimp *gimp,
gint width,
gint height,
GimpImageBaseType base_type);
gint gimp_image_get_ID (GimpImage *gimage);
GimpImage * gimp_image_get_by_ID (Gimp *gimp,
gint id);
void gimp_image_set_filename (GimpImage *gimage,
const gchar *filename);
void gimp_image_set_resolution (GimpImage *gimage,
gdouble xres,
gdouble yres);
void gimp_image_get_resolution (const GimpImage *gimage,
gdouble *xresolution,
gdouble *yresolution);
void gimp_image_set_unit (GimpImage *gimage,
GimpUnit unit);
GimpUnit gimp_image_get_unit (const GimpImage *gimage);
void gimp_image_set_qmask_state (GimpImage *gimage,
gboolean qmask_state);
gboolean gimp_image_get_qmask_state (const GimpImage *gimage);
void gimp_image_set_save_proc (GimpImage *gimage,
PlugInProcDef *proc);
PlugInProcDef * gimp_image_get_save_proc (const GimpImage *gimage);
gint gimp_image_get_width (const GimpImage *gimage);
gint gimp_image_get_height (const GimpImage *gimage);
void gimp_image_resize (GimpImage *gimage,
gint new_width,
gint new_height,
gint offset_x,
gint offset_y);
void gimp_image_scale (GimpImage *gimage,
gint new_width,
gint new_height,
GimpProgressFunc progress_func,
gpointer progress_data);
gboolean gimp_image_check_scaling (const GimpImage *gimage,
gint new_width,
gint new_height);
TileManager * gimp_image_shadow (GimpImage *gimage,
gint width,
gint height,
gint bpp);
void gimp_image_free_shadow (GimpImage *gimage);
void gimp_image_apply_image (GimpImage *gimage,
GimpDrawable *drawable,
PixelRegion *src2PR,
gboolean undo,
gint opacity,
LayerModeEffects mode,
TileManager *src1_tiles,
gint x,
gint y);
void gimp_image_replace_image (GimpImage *gimage,
GimpDrawable *drawable,
PixelRegion *src2PR,
gboolean undo,
gint opacity,
PixelRegion *maskPR,
gint x,
gint y);
void gimp_image_get_foreground (const GimpImage *gimage,
const GimpDrawable *drawable,
guchar *fg);
void gimp_image_get_background (const GimpImage *gimage,
const GimpDrawable *drawable,
guchar *bg);
void gimp_image_get_color (const GimpImage *gimage,
GimpImageType d_type,
guchar *rgb,
guchar *src);
void gimp_image_transform_color (const GimpImage *gimage,
const GimpDrawable *drawable,
guchar *src,
guchar *dest,
GimpImageBaseType type);
GimpGuide * gimp_image_add_hguide (GimpImage *gimage);
GimpGuide * gimp_image_add_vguide (GimpImage *gimage);
void gimp_image_add_guide (GimpImage *gimage,
GimpGuide *guide);
void gimp_image_remove_guide (GimpImage *gimage,
GimpGuide *guide);
void gimp_image_delete_guide (GimpImage *gimage,
GimpGuide *guide);
GimpGuide * gimp_image_find_guide (GimpImage *gimage,
gint x,
gint y);
gboolean gimp_image_snap_point (GimpImage *gimage,
gint x,
gint y,
gint *tx,
gint *ty);
gboolean gimp_image_snap_rectangle (GimpImage *gimage,
gint x1,
gint y1,
gint x2,
gint y2,
gint *tx1,
gint *ty1);
GimpParasite * gimp_image_parasite_find (const GimpImage *gimage,
const gchar *name);
gchar ** gimp_image_parasite_list (const GimpImage *gimage,
gint *count);
void gimp_image_parasite_attach (GimpImage *gimage,
GimpParasite *parasite);
void gimp_image_parasite_detach (GimpImage *gimage,
const gchar *parasite);
GimpTattoo gimp_image_get_new_tattoo (GimpImage *gimage);
gboolean gimp_image_set_tattoo_state (GimpImage *gimage,
GimpTattoo val);
GimpTattoo gimp_image_get_tattoo_state (GimpImage *gimage);
void gimp_image_set_paths (GimpImage *gimage,
PathList *paths);
PathList * gimp_image_get_paths (const GimpImage *gimage);
/* Temporary hack till colormap manipulation is encapsulated in functions.
* Call this whenever you modify an image's colormap. The col argument
* specifies which color has changed, or negative if there's a bigger change.
* Currently, use this also when the image's base type is changed to/from
* indexed.
*/
void gimp_image_colormap_changed (GimpImage *gimage,
gint col);
void gimp_image_mode_changed (GimpImage *gimage);
void gimp_image_alpha_changed (GimpImage *gimage);
void gimp_image_floating_selection_changed (GimpImage *gimage);
void gimp_image_mask_changed (GimpImage *gimage);
void gimp_image_resolution_changed (GimpImage *gimage);
void gimp_image_unit_changed (GimpImage *gimage);
void gimp_image_qmask_changed (GimpImage *gimage);
void gimp_image_update (GimpImage *gimage,
gint x,
gint y,
gint width,
gint height);
void gimp_image_update_guide (GimpImage *gimage,
GimpGuide *guide);
void gimp_image_selection_control (GimpImage *gimage,
GimpSelectionControl control);
/* layer/channel functions */
GimpContainer * gimp_image_get_layers (const GimpImage *gimage);
GimpContainer * gimp_image_get_channels (const GimpImage *gimage);
gint gimp_image_get_layer_index (const GimpImage *gimage,
const GimpLayer *layer);
gint gimp_image_get_channel_index (const GimpImage *gimage,
const GimpChannel *channel);
GimpLayer * gimp_image_get_active_layer (const GimpImage *gimage);
GimpChannel * gimp_image_get_active_channel (const GimpImage *gimage);
GimpLayer * gimp_image_get_layer_by_tattoo (const GimpImage *gimage,
GimpTattoo tatoo);
GimpChannel * gimp_image_get_channel_by_tattoo (const GimpImage *gimage,
GimpTattoo tatoo);
GimpChannel * gimp_image_get_channel_by_name (const GimpImage *gimage,
const gchar *name);
GimpChannel * gimp_image_get_mask (const GimpImage *gimage);
void gimp_image_set_component_active (GimpImage *gimage,
ChannelType type,
gboolean active);
gboolean gimp_image_get_component_active (const GimpImage *gimage,
ChannelType type);
void gimp_image_get_active_components (GimpImage *gimage,
GimpDrawable *drawable,
gint *active);
void gimp_image_set_component_visible (GimpImage *gimage,
ChannelType type,
gboolean visible);
gboolean gimp_image_get_component_visible (const GimpImage *gimage,
ChannelType type);
gboolean gimp_image_layer_boundary (const GimpImage *gimage,
BoundSeg **segs,
gint *n_segs);
GimpLayer * gimp_image_set_active_layer (GimpImage *gimage,
GimpLayer *layer);
GimpChannel * gimp_image_set_active_channel (GimpImage *gimage,
GimpChannel *channel);
GimpChannel * gimp_image_unset_active_channel (GimpImage *gimage);
GimpLayer * gimp_image_pick_correlate_layer (const GimpImage *gimage,
gint x,
gint y);
gboolean gimp_image_raise_layer (GimpImage *gimage,
GimpLayer *layer);
gboolean gimp_image_lower_layer (GimpImage *gimage,
GimpLayer *layer);
gboolean gimp_image_raise_layer_to_top (GimpImage *gimage,
GimpLayer *layer);
gboolean gimp_image_lower_layer_to_bottom (GimpImage *gimage,
GimpLayer *layer);
gboolean gimp_image_position_layer (GimpImage *gimage,
GimpLayer *layer,
gint new_index,
gboolean push_undo);
GimpLayer * gimp_image_merge_visible_layers (GimpImage *gimage,
MergeType merge_type);
GimpLayer * gimp_image_merge_down (GimpImage *gimage,
GimpLayer *current_layer,
MergeType merge_type);
GimpLayer * gimp_image_flatten (GimpImage *gimage);
GimpLayer * gimp_image_merge_layers (GimpImage *gimage,
GSList *merge_list,
MergeType merge_type);
gboolean gimp_image_add_layer (GimpImage *gimage,
GimpLayer *layer,
gint position);
void gimp_image_remove_layer (GimpImage *gimage,
GimpLayer *layer);
gboolean gimp_image_raise_channel (GimpImage *gimage,
GimpChannel *channel);
gboolean gimp_image_lower_channel (GimpImage *gimage,
GimpChannel *channel);
gboolean gimp_image_position_channel (GimpImage *gimage,
GimpChannel *channel,
gint new_index,
gboolean push_undo);
gboolean gimp_image_add_channel (GimpImage *gimage,
GimpChannel *channel,
gint position);
void gimp_image_remove_channel (GimpImage *gimage,
GimpChannel *channel);
void gimp_image_invalidate_layer_previews (GimpImage *gimage);
void gimp_image_invalidate_channel_previews (GimpImage *gimage);
/* Access functions */
gboolean gimp_image_is_empty (const GimpImage *gimage);
GimpDrawable * gimp_image_active_drawable (const GimpImage *gimage);
GimpImageBaseType gimp_image_base_type (const GimpImage *gimage);
GimpImageType gimp_image_base_type_with_alpha (const GimpImage *gimage);
const gchar * gimp_image_filename (const GimpImage *gimage);
gboolean gimp_image_undo_is_enabled (const GimpImage *gimage);
gboolean gimp_image_undo_enable (GimpImage *gimage);
gboolean gimp_image_undo_disable (GimpImage *gimage);
gboolean gimp_image_undo_freeze (GimpImage *gimage);
gboolean gimp_image_undo_thaw (GimpImage *gimage);
void gimp_image_undo_event (GimpImage *gimage,
gint event);
gint gimp_image_dirty (GimpImage *gimage);
gint gimp_image_clean (GimpImage *gimage);
void gimp_image_clean_all (GimpImage *gimage);
GimpLayer * gimp_image_floating_sel (const GimpImage *gimage);
guchar * gimp_image_cmap (const GimpImage *gimage);
gboolean gimp_image_preview_valid (const GimpImage *gimage);
#endif /* __GIMP_IMAGE_H__ */
#endif /* __GIMP_IMAGE_RESIZE_H__ */

File diff suppressed because it is too large Load Diff

View File

@ -16,425 +16,19 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#ifndef __GIMP_IMAGE_H__
#define __GIMP_IMAGE_H__
#ifndef __GIMP_IMAGE_SCALE_H__
#define __GIMP_IMAGE_SCALE_H__
#include "gimpviewable.h"
void gimp_image_scale (GimpImage *gimage,
gint new_width,
gint new_height,
GimpProgressFunc progress_func,
gpointer progress_data);
gboolean gimp_image_check_scaling (const GimpImage *gimage,
gint new_width,
gint new_height);
#define COLORMAP_SIZE 768
#define GIMP_IMAGE_TYPE_HAS_ALPHA(t) ((t) == RGBA_GIMAGE || \
(t) == GRAYA_GIMAGE || \
(t) == INDEXEDA_GIMAGE)
struct _GimpGuide
{
gint ref_count;
gint position;
InternalOrientationType orientation;
guint32 guide_ID;
};
#define GIMP_TYPE_IMAGE (gimp_image_get_type ())
#define GIMP_IMAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_IMAGE, GimpImage))
#define GIMP_IMAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_IMAGE, GimpImageClass))
#define GIMP_IS_IMAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_IMAGE))
#define GIMP_IS_IMAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_IMAGE))
#define GIMP_IMAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_IMAGE, GimpImageClass))
typedef struct _GimpImageClass GimpImageClass;
struct _GimpImage
{
GimpViewable parent_instance;
Gimp *gimp; /* the GIMP the image belongs to*/
gint ID; /* provides a unique ID */
PlugInProcDef *save_proc; /* last PDB save proc used */
gint width, height; /* width and height attributes */
gdouble xresolution; /* image x-res, in dpi */
gdouble yresolution; /* image y-res, in dpi */
GimpUnit unit; /* image unit */
GimpImageBaseType base_type; /* base gimp_image type */
guchar *cmap; /* colormap--for indexed */
gint num_cols; /* number of cols--for indexed */
gint dirty; /* dirty flag -- # of ops */
gboolean undo_on; /* Is undo enabled? */
gint instance_count; /* number of instances */
gint disp_count; /* number of displays */
GimpTattoo tattoo_state; /* the next unique tattoo to use*/
TileManager *shadow; /* shadow buffer tiles */
/* Projection attributes */
gboolean construct_flag; /* flag for construction */
GimpImageType proj_type; /* type of the projection image */
gint proj_bytes; /* bpp in projection image */
gint proj_level; /* projection level */
TileManager *projection; /* The projection--layers & */
/* channels */
GList *guides; /* guides */
/* Layer/Channel attributes */
GimpContainer *layers; /* the list of layers */
GimpContainer *channels; /* the list of masks */
GSList *layer_stack; /* the layers in MRU order */
GimpLayer *active_layer; /* the active layer */
GimpChannel *active_channel; /* the active channel */
GimpLayer *floating_sel; /* the FS layer */
GimpChannel *selection_mask; /* the selection mask channel */
GimpParasiteList *parasites; /* Plug-in parasite data */
PathList *paths; /* Paths data for this image */
gboolean visible[MAX_CHANNELS]; /* visible channels */
gboolean active[MAX_CHANNELS]; /* active channels */
gboolean qmask_state; /* TRUE if qmask is on */
GimpRGB qmask_color; /* rgba triplet of the color */
/* Old undo apparatus */
GSList *undo_stack; /* stack for undo operations */
GSList *redo_stack; /* stack for redo operations */
gint undo_bytes; /* bytes in undo stack */
gint undo_levels; /* levels in undo stack */
gint group_count; /* nested undo groups */
UndoType pushing_undo_group; /* undo group status flag */
/* New undo apparatus */
GimpUndoStack *new_undo_stack; /* stack for undo operations */
GimpUndoStack *new_redo_stack; /* stack for redo operations */
/* Composite preview */
TempBuf *comp_preview; /* the composite preview */
gboolean comp_preview_valid; /* preview valid-1/channel */
};
struct _GimpImageClass
{
GimpViewableClass parent_class;
void (* mode_changed) (GimpImage *gimage);
void (* alpha_changed) (GimpImage *gimage);
void (* floating_selection_changed) (GimpImage *gimage);
void (* active_layer_changed) (GimpImage *gimage);
void (* active_channel_changed) (GimpImage *gimage);
void (* component_visibility_changed) (GimpImage *gimage,
ChannelType channel);
void (* component_active_changed) (GimpImage *gimage,
ChannelType channel);
void (* mask_changed) (GimpImage *gimage);
void (* resolution_changed) (GimpImage *gimage);
void (* unit_changed) (GimpImage *gimage);
void (* qmask_changed) (GimpImage *gimage);
void (* selection_control) (GimpImage *gimage,
GimpSelectionControl control);
void (* clean) (GimpImage *gimage);
void (* dirty) (GimpImage *gimage);
void (* update) (GimpImage *gimage,
gint x,
gint y,
gint width,
gint height);
void (* update_guide) (GimpImage *gimage,
GimpGuide *guide);
void (* colormap_changed) (GimpImage *gimage,
gint color_index);
void (* undo_event) (GimpImage *gimage,
gint event);
void (* undo) (GimpImage *gimage);
void (* redo) (GimpImage *gimage);
};
/* function declarations */
GType gimp_image_get_type (void) G_GNUC_CONST;
GimpImage * gimp_image_new (Gimp *gimp,
gint width,
gint height,
GimpImageBaseType base_type);
gint gimp_image_get_ID (GimpImage *gimage);
GimpImage * gimp_image_get_by_ID (Gimp *gimp,
gint id);
void gimp_image_set_filename (GimpImage *gimage,
const gchar *filename);
void gimp_image_set_resolution (GimpImage *gimage,
gdouble xres,
gdouble yres);
void gimp_image_get_resolution (const GimpImage *gimage,
gdouble *xresolution,
gdouble *yresolution);
void gimp_image_set_unit (GimpImage *gimage,
GimpUnit unit);
GimpUnit gimp_image_get_unit (const GimpImage *gimage);
void gimp_image_set_qmask_state (GimpImage *gimage,
gboolean qmask_state);
gboolean gimp_image_get_qmask_state (const GimpImage *gimage);
void gimp_image_set_save_proc (GimpImage *gimage,
PlugInProcDef *proc);
PlugInProcDef * gimp_image_get_save_proc (const GimpImage *gimage);
gint gimp_image_get_width (const GimpImage *gimage);
gint gimp_image_get_height (const GimpImage *gimage);
void gimp_image_resize (GimpImage *gimage,
gint new_width,
gint new_height,
gint offset_x,
gint offset_y);
void gimp_image_scale (GimpImage *gimage,
gint new_width,
gint new_height,
GimpProgressFunc progress_func,
gpointer progress_data);
gboolean gimp_image_check_scaling (const GimpImage *gimage,
gint new_width,
gint new_height);
TileManager * gimp_image_shadow (GimpImage *gimage,
gint width,
gint height,
gint bpp);
void gimp_image_free_shadow (GimpImage *gimage);
void gimp_image_apply_image (GimpImage *gimage,
GimpDrawable *drawable,
PixelRegion *src2PR,
gboolean undo,
gint opacity,
LayerModeEffects mode,
TileManager *src1_tiles,
gint x,
gint y);
void gimp_image_replace_image (GimpImage *gimage,
GimpDrawable *drawable,
PixelRegion *src2PR,
gboolean undo,
gint opacity,
PixelRegion *maskPR,
gint x,
gint y);
void gimp_image_get_foreground (const GimpImage *gimage,
const GimpDrawable *drawable,
guchar *fg);
void gimp_image_get_background (const GimpImage *gimage,
const GimpDrawable *drawable,
guchar *bg);
void gimp_image_get_color (const GimpImage *gimage,
GimpImageType d_type,
guchar *rgb,
guchar *src);
void gimp_image_transform_color (const GimpImage *gimage,
const GimpDrawable *drawable,
guchar *src,
guchar *dest,
GimpImageBaseType type);
GimpGuide * gimp_image_add_hguide (GimpImage *gimage);
GimpGuide * gimp_image_add_vguide (GimpImage *gimage);
void gimp_image_add_guide (GimpImage *gimage,
GimpGuide *guide);
void gimp_image_remove_guide (GimpImage *gimage,
GimpGuide *guide);
void gimp_image_delete_guide (GimpImage *gimage,
GimpGuide *guide);
GimpGuide * gimp_image_find_guide (GimpImage *gimage,
gint x,
gint y);
gboolean gimp_image_snap_point (GimpImage *gimage,
gint x,
gint y,
gint *tx,
gint *ty);
gboolean gimp_image_snap_rectangle (GimpImage *gimage,
gint x1,
gint y1,
gint x2,
gint y2,
gint *tx1,
gint *ty1);
GimpParasite * gimp_image_parasite_find (const GimpImage *gimage,
const gchar *name);
gchar ** gimp_image_parasite_list (const GimpImage *gimage,
gint *count);
void gimp_image_parasite_attach (GimpImage *gimage,
GimpParasite *parasite);
void gimp_image_parasite_detach (GimpImage *gimage,
const gchar *parasite);
GimpTattoo gimp_image_get_new_tattoo (GimpImage *gimage);
gboolean gimp_image_set_tattoo_state (GimpImage *gimage,
GimpTattoo val);
GimpTattoo gimp_image_get_tattoo_state (GimpImage *gimage);
void gimp_image_set_paths (GimpImage *gimage,
PathList *paths);
PathList * gimp_image_get_paths (const GimpImage *gimage);
/* Temporary hack till colormap manipulation is encapsulated in functions.
* Call this whenever you modify an image's colormap. The col argument
* specifies which color has changed, or negative if there's a bigger change.
* Currently, use this also when the image's base type is changed to/from
* indexed.
*/
void gimp_image_colormap_changed (GimpImage *gimage,
gint col);
void gimp_image_mode_changed (GimpImage *gimage);
void gimp_image_alpha_changed (GimpImage *gimage);
void gimp_image_floating_selection_changed (GimpImage *gimage);
void gimp_image_mask_changed (GimpImage *gimage);
void gimp_image_resolution_changed (GimpImage *gimage);
void gimp_image_unit_changed (GimpImage *gimage);
void gimp_image_qmask_changed (GimpImage *gimage);
void gimp_image_update (GimpImage *gimage,
gint x,
gint y,
gint width,
gint height);
void gimp_image_update_guide (GimpImage *gimage,
GimpGuide *guide);
void gimp_image_selection_control (GimpImage *gimage,
GimpSelectionControl control);
/* layer/channel functions */
GimpContainer * gimp_image_get_layers (const GimpImage *gimage);
GimpContainer * gimp_image_get_channels (const GimpImage *gimage);
gint gimp_image_get_layer_index (const GimpImage *gimage,
const GimpLayer *layer);
gint gimp_image_get_channel_index (const GimpImage *gimage,
const GimpChannel *channel);
GimpLayer * gimp_image_get_active_layer (const GimpImage *gimage);
GimpChannel * gimp_image_get_active_channel (const GimpImage *gimage);
GimpLayer * gimp_image_get_layer_by_tattoo (const GimpImage *gimage,
GimpTattoo tatoo);
GimpChannel * gimp_image_get_channel_by_tattoo (const GimpImage *gimage,
GimpTattoo tatoo);
GimpChannel * gimp_image_get_channel_by_name (const GimpImage *gimage,
const gchar *name);
GimpChannel * gimp_image_get_mask (const GimpImage *gimage);
void gimp_image_set_component_active (GimpImage *gimage,
ChannelType type,
gboolean active);
gboolean gimp_image_get_component_active (const GimpImage *gimage,
ChannelType type);
void gimp_image_get_active_components (GimpImage *gimage,
GimpDrawable *drawable,
gint *active);
void gimp_image_set_component_visible (GimpImage *gimage,
ChannelType type,
gboolean visible);
gboolean gimp_image_get_component_visible (const GimpImage *gimage,
ChannelType type);
gboolean gimp_image_layer_boundary (const GimpImage *gimage,
BoundSeg **segs,
gint *n_segs);
GimpLayer * gimp_image_set_active_layer (GimpImage *gimage,
GimpLayer *layer);
GimpChannel * gimp_image_set_active_channel (GimpImage *gimage,
GimpChannel *channel);
GimpChannel * gimp_image_unset_active_channel (GimpImage *gimage);
GimpLayer * gimp_image_pick_correlate_layer (const GimpImage *gimage,
gint x,
gint y);
gboolean gimp_image_raise_layer (GimpImage *gimage,
GimpLayer *layer);
gboolean gimp_image_lower_layer (GimpImage *gimage,
GimpLayer *layer);
gboolean gimp_image_raise_layer_to_top (GimpImage *gimage,
GimpLayer *layer);
gboolean gimp_image_lower_layer_to_bottom (GimpImage *gimage,
GimpLayer *layer);
gboolean gimp_image_position_layer (GimpImage *gimage,
GimpLayer *layer,
gint new_index,
gboolean push_undo);
GimpLayer * gimp_image_merge_visible_layers (GimpImage *gimage,
MergeType merge_type);
GimpLayer * gimp_image_merge_down (GimpImage *gimage,
GimpLayer *current_layer,
MergeType merge_type);
GimpLayer * gimp_image_flatten (GimpImage *gimage);
GimpLayer * gimp_image_merge_layers (GimpImage *gimage,
GSList *merge_list,
MergeType merge_type);
gboolean gimp_image_add_layer (GimpImage *gimage,
GimpLayer *layer,
gint position);
void gimp_image_remove_layer (GimpImage *gimage,
GimpLayer *layer);
gboolean gimp_image_raise_channel (GimpImage *gimage,
GimpChannel *channel);
gboolean gimp_image_lower_channel (GimpImage *gimage,
GimpChannel *channel);
gboolean gimp_image_position_channel (GimpImage *gimage,
GimpChannel *channel,
gint new_index,
gboolean push_undo);
gboolean gimp_image_add_channel (GimpImage *gimage,
GimpChannel *channel,
gint position);
void gimp_image_remove_channel (GimpImage *gimage,
GimpChannel *channel);
void gimp_image_invalidate_layer_previews (GimpImage *gimage);
void gimp_image_invalidate_channel_previews (GimpImage *gimage);
/* Access functions */
gboolean gimp_image_is_empty (const GimpImage *gimage);
GimpDrawable * gimp_image_active_drawable (const GimpImage *gimage);
GimpImageBaseType gimp_image_base_type (const GimpImage *gimage);
GimpImageType gimp_image_base_type_with_alpha (const GimpImage *gimage);
const gchar * gimp_image_filename (const GimpImage *gimage);
gboolean gimp_image_undo_is_enabled (const GimpImage *gimage);
gboolean gimp_image_undo_enable (GimpImage *gimage);
gboolean gimp_image_undo_disable (GimpImage *gimage);
gboolean gimp_image_undo_freeze (GimpImage *gimage);
gboolean gimp_image_undo_thaw (GimpImage *gimage);
void gimp_image_undo_event (GimpImage *gimage,
gint event);
gint gimp_image_dirty (GimpImage *gimage);
gint gimp_image_clean (GimpImage *gimage);
void gimp_image_clean_all (GimpImage *gimage);
GimpLayer * gimp_image_floating_sel (const GimpImage *gimage);
guchar * gimp_image_cmap (const GimpImage *gimage);
gboolean gimp_image_preview_valid (const GimpImage *gimage);
#endif /* __GIMP_IMAGE_H__ */
#endif /* __GIMP_IMAGE_SCALE_H__ */

View File

@ -39,6 +39,7 @@
#include "core/gimpcontext.h"
#include "core/gimpcoreconfig.h"
#include "core/gimpimage.h"
#include "core/gimpimage-guides.h"
#include "core/gimpimage-mask.h"
#include "core/gimpimage-projection.h"
#include "core/gimplayer.h"

File diff suppressed because it is too large Load Diff

View File

@ -164,277 +164,247 @@ struct _GimpImageClass
};
/* function declarations */
GType gimp_image_get_type (void) G_GNUC_CONST;
GType gimp_image_get_type (void) G_GNUC_CONST;
GimpImage * gimp_image_new (Gimp *gimp,
gint width,
gint height,
GimpImageBaseType base_type);
GimpImage * gimp_image_new (Gimp *gimp,
gint width,
gint height,
GimpImageBaseType base_type);
gint gimp_image_get_ID (GimpImage *gimage);
GimpImage * gimp_image_get_by_ID (Gimp *gimp,
gint id);
GimpImageBaseType gimp_image_base_type (const GimpImage *gimage);
GimpImageType gimp_image_base_type_with_alpha (const GimpImage *gimage);
CombinationMode gimp_image_get_combination_mode (GimpImageType dest_type,
gint src_bytes);
void gimp_image_set_filename (GimpImage *gimage,
const gchar *filename);
void gimp_image_set_resolution (GimpImage *gimage,
gdouble xres,
gdouble yres);
void gimp_image_get_resolution (const GimpImage *gimage,
gdouble *xresolution,
gdouble *yresolution);
void gimp_image_set_unit (GimpImage *gimage,
GimpUnit unit);
GimpUnit gimp_image_get_unit (const GimpImage *gimage);
gint gimp_image_get_ID (GimpImage *gimage);
GimpImage * gimp_image_get_by_ID (Gimp *gimp,
gint id);
void gimp_image_set_qmask_state (GimpImage *gimage,
gboolean qmask_state);
gboolean gimp_image_get_qmask_state (const GimpImage *gimage);
void gimp_image_set_filename (GimpImage *gimage,
const gchar *filename);
const gchar * gimp_image_get_filename (const GimpImage *gimage);
void gimp_image_set_save_proc (GimpImage *gimage,
PlugInProcDef *proc);
PlugInProcDef * gimp_image_get_save_proc (const GimpImage *gimage);
void gimp_image_set_save_proc (GimpImage *gimage,
PlugInProcDef *proc);
PlugInProcDef * gimp_image_get_save_proc (const GimpImage *gimage);
gint gimp_image_get_width (const GimpImage *gimage);
gint gimp_image_get_height (const GimpImage *gimage);
void gimp_image_set_resolution (GimpImage *gimage,
gdouble xres,
gdouble yres);
void gimp_image_get_resolution (const GimpImage *gimage,
gdouble *xres,
gdouble *yres);
void gimp_image_resolution_changed (GimpImage *gimage);
void gimp_image_resize (GimpImage *gimage,
gint new_width,
gint new_height,
gint offset_x,
gint offset_y);
void gimp_image_scale (GimpImage *gimage,
gint new_width,
gint new_height,
GimpProgressFunc progress_func,
gpointer progress_data);
gboolean gimp_image_check_scaling (const GimpImage *gimage,
gint new_width,
gint new_height);
void gimp_image_set_unit (GimpImage *gimage,
GimpUnit unit);
GimpUnit gimp_image_get_unit (const GimpImage *gimage);
void gimp_image_unit_changed (GimpImage *gimage);
TileManager * gimp_image_shadow (GimpImage *gimage,
gint width,
gint height,
gint bpp);
void gimp_image_free_shadow (GimpImage *gimage);
void gimp_image_set_qmask_state (GimpImage *gimage,
gboolean qmask_state);
gboolean gimp_image_get_qmask_state (const GimpImage *gimage);
void gimp_image_qmask_changed (GimpImage *gimage);
void gimp_image_apply_image (GimpImage *gimage,
GimpDrawable *drawable,
PixelRegion *src2PR,
gboolean undo,
gint opacity,
LayerModeEffects mode,
TileManager *src1_tiles,
gint x,
gint y);
void gimp_image_replace_image (GimpImage *gimage,
GimpDrawable *drawable,
PixelRegion *src2PR,
gboolean undo,
gint opacity,
PixelRegion *maskPR,
gint x,
gint y);
gint gimp_image_get_width (const GimpImage *gimage);
gint gimp_image_get_height (const GimpImage *gimage);
void gimp_image_get_foreground (const GimpImage *gimage,
const GimpDrawable *drawable,
guchar *fg);
void gimp_image_get_background (const GimpImage *gimage,
const GimpDrawable *drawable,
guchar *bg);
void gimp_image_get_color (const GimpImage *gimage,
GimpImageType d_type,
guchar *rgb,
guchar *src);
void gimp_image_transform_color (const GimpImage *gimage,
const GimpDrawable *drawable,
guchar *src,
guchar *dest,
GimpImageBaseType type);
gboolean gimp_image_is_empty (const GimpImage *gimage);
GimpGuide * gimp_image_add_hguide (GimpImage *gimage);
GimpGuide * gimp_image_add_vguide (GimpImage *gimage);
void gimp_image_add_guide (GimpImage *gimage,
GimpGuide *guide);
void gimp_image_remove_guide (GimpImage *gimage,
GimpGuide *guide);
void gimp_image_delete_guide (GimpImage *gimage,
GimpGuide *guide);
GimpGuide * gimp_image_find_guide (GimpImage *gimage,
gint x,
gint y);
gboolean gimp_image_snap_point (GimpImage *gimage,
gint x,
gint y,
gint *tx,
gint *ty);
gboolean gimp_image_snap_rectangle (GimpImage *gimage,
gint x1,
gint y1,
gint x2,
gint y2,
gint *tx1,
gint *ty1);
GimpLayer * gimp_image_floating_sel (const GimpImage *gimage);
void gimp_image_floating_selection_changed (GimpImage *gimage);
GimpParasite * gimp_image_parasite_find (const GimpImage *gimage,
const gchar *name);
gchar ** gimp_image_parasite_list (const GimpImage *gimage,
gint *count);
void gimp_image_parasite_attach (GimpImage *gimage,
GimpParasite *parasite);
void gimp_image_parasite_detach (GimpImage *gimage,
const gchar *parasite);
guchar * gimp_image_get_colormap (const GimpImage *gimage);
void gimp_image_colormap_changed (GimpImage *gimage,
gint col);
GimpTattoo gimp_image_get_new_tattoo (GimpImage *gimage);
gboolean gimp_image_set_tattoo_state (GimpImage *gimage,
GimpTattoo val);
GimpTattoo gimp_image_get_tattoo_state (GimpImage *gimage);
GimpChannel * gimp_image_get_mask (const GimpImage *gimage);
void gimp_image_mask_changed (GimpImage *gimage);
void gimp_image_set_paths (GimpImage *gimage,
PathList *paths);
PathList * gimp_image_get_paths (const GimpImage *gimage);
void gimp_image_set_component_active (GimpImage *gimage,
ChannelType type,
gboolean active);
gboolean gimp_image_get_component_active (const GimpImage *gimage,
ChannelType type);
void gimp_image_get_active_components (GimpImage *gimage,
GimpDrawable *drawable,
gint *active);
/* Temporary hack till colormap manipulation is encapsulated in functions.
* Call this whenever you modify an image's colormap. The col argument
* specifies which color has changed, or negative if there's a bigger change.
* Currently, use this also when the image's base type is changed to/from
* indexed.
*/
void gimp_image_colormap_changed (GimpImage *gimage,
gint col);
void gimp_image_set_component_visible (GimpImage *gimage,
ChannelType type,
gboolean visible);
gboolean gimp_image_get_component_visible (const GimpImage *gimage,
ChannelType type);
void gimp_image_mode_changed (GimpImage *gimage);
void gimp_image_alpha_changed (GimpImage *gimage);
void gimp_image_floating_selection_changed (GimpImage *gimage);
void gimp_image_mask_changed (GimpImage *gimage);
void gimp_image_resolution_changed (GimpImage *gimage);
void gimp_image_unit_changed (GimpImage *gimage);
void gimp_image_qmask_changed (GimpImage *gimage);
void gimp_image_update (GimpImage *gimage,
gint x,
gint y,
gint width,
gint height);
void gimp_image_update_guide (GimpImage *gimage,
GimpGuide *guide);
void gimp_image_selection_control (GimpImage *gimage,
GimpSelectionControl control);
void gimp_image_mode_changed (GimpImage *gimage);
void gimp_image_alpha_changed (GimpImage *gimage);
void gimp_image_update (GimpImage *gimage,
gint x,
gint y,
gint width,
gint height);
void gimp_image_update_guide (GimpImage *gimage,
GimpGuide *guide);
void gimp_image_selection_control (GimpImage *gimage,
GimpSelectionControl control);
/* layer/channel functions */
/* undo */
GimpContainer * gimp_image_get_layers (const GimpImage *gimage);
GimpContainer * gimp_image_get_channels (const GimpImage *gimage);
gint gimp_image_get_layer_index (const GimpImage *gimage,
const GimpLayer *layer);
gint gimp_image_get_channel_index (const GimpImage *gimage,
const GimpChannel *channel);
GimpLayer * gimp_image_get_active_layer (const GimpImage *gimage);
GimpChannel * gimp_image_get_active_channel (const GimpImage *gimage);
GimpLayer * gimp_image_get_layer_by_tattoo (const GimpImage *gimage,
GimpTattoo tatoo);
GimpChannel * gimp_image_get_channel_by_tattoo (const GimpImage *gimage,
GimpTattoo tatoo);
GimpChannel * gimp_image_get_channel_by_name (const GimpImage *gimage,
const gchar *name);
GimpChannel * gimp_image_get_mask (const GimpImage *gimage);
void gimp_image_set_component_active (GimpImage *gimage,
ChannelType type,
gboolean active);
gboolean gimp_image_get_component_active (const GimpImage *gimage,
ChannelType type);
void gimp_image_get_active_components (GimpImage *gimage,
GimpDrawable *drawable,
gint *active);
void gimp_image_set_component_visible (GimpImage *gimage,
ChannelType type,
gboolean visible);
gboolean gimp_image_get_component_visible (const GimpImage *gimage,
ChannelType type);
gboolean gimp_image_layer_boundary (const GimpImage *gimage,
BoundSeg **segs,
gint *n_segs);
GimpLayer * gimp_image_set_active_layer (GimpImage *gimage,
GimpLayer *layer);
GimpChannel * gimp_image_set_active_channel (GimpImage *gimage,
GimpChannel *channel);
GimpChannel * gimp_image_unset_active_channel (GimpImage *gimage);
GimpLayer * gimp_image_pick_correlate_layer (const GimpImage *gimage,
gint x,
gint y);
gboolean gimp_image_raise_layer (GimpImage *gimage,
GimpLayer *layer);
gboolean gimp_image_lower_layer (GimpImage *gimage,
GimpLayer *layer);
gboolean gimp_image_raise_layer_to_top (GimpImage *gimage,
GimpLayer *layer);
gboolean gimp_image_lower_layer_to_bottom (GimpImage *gimage,
GimpLayer *layer);
gboolean gimp_image_position_layer (GimpImage *gimage,
GimpLayer *layer,
gint new_index,
gboolean push_undo);
GimpLayer * gimp_image_merge_visible_layers (GimpImage *gimage,
MergeType merge_type);
GimpLayer * gimp_image_merge_down (GimpImage *gimage,
GimpLayer *current_layer,
MergeType merge_type);
GimpLayer * gimp_image_flatten (GimpImage *gimage);
GimpLayer * gimp_image_merge_layers (GimpImage *gimage,
GSList *merge_list,
MergeType merge_type);
gboolean gimp_image_add_layer (GimpImage *gimage,
GimpLayer *layer,
gint position);
void gimp_image_remove_layer (GimpImage *gimage,
GimpLayer *layer);
gboolean gimp_image_raise_channel (GimpImage *gimage,
GimpChannel *channel);
gboolean gimp_image_lower_channel (GimpImage *gimage,
GimpChannel *channel);
gboolean gimp_image_position_channel (GimpImage *gimage,
GimpChannel *channel,
gint new_index,
gboolean push_undo);
gboolean gimp_image_add_channel (GimpImage *gimage,
GimpChannel *channel,
gint position);
void gimp_image_remove_channel (GimpImage *gimage,
GimpChannel *channel);
void gimp_image_invalidate_layer_previews (GimpImage *gimage);
void gimp_image_invalidate_channel_previews (GimpImage *gimage);
gboolean gimp_image_undo_is_enabled (const GimpImage *gimage);
gboolean gimp_image_undo_enable (GimpImage *gimage);
gboolean gimp_image_undo_disable (GimpImage *gimage);
gboolean gimp_image_undo_freeze (GimpImage *gimage);
gboolean gimp_image_undo_thaw (GimpImage *gimage);
void gimp_image_undo_event (GimpImage *gimage,
gint event);
gint gimp_image_dirty (GimpImage *gimage);
gint gimp_image_clean (GimpImage *gimage);
void gimp_image_clean_all (GimpImage *gimage);
/* Access functions */
/* color transforms / utilities */
gboolean gimp_image_is_empty (const GimpImage *gimage);
GimpDrawable * gimp_image_active_drawable (const GimpImage *gimage);
void gimp_image_get_foreground (const GimpImage *gimage,
const GimpDrawable *drawable,
guchar *fg);
void gimp_image_get_background (const GimpImage *gimage,
const GimpDrawable *drawable,
guchar *bg);
void gimp_image_get_color (const GimpImage *gimage,
GimpImageType d_type,
guchar *rgb,
guchar *src);
void gimp_image_transform_color (const GimpImage *gimage,
const GimpDrawable *drawable,
guchar *src,
guchar *dest,
GimpImageBaseType type);
GimpImageBaseType gimp_image_base_type (const GimpImage *gimage);
GimpImageType gimp_image_base_type_with_alpha (const GimpImage *gimage);
const gchar * gimp_image_filename (const GimpImage *gimage);
gboolean gimp_image_undo_is_enabled (const GimpImage *gimage);
gboolean gimp_image_undo_enable (GimpImage *gimage);
gboolean gimp_image_undo_disable (GimpImage *gimage);
gboolean gimp_image_undo_freeze (GimpImage *gimage);
gboolean gimp_image_undo_thaw (GimpImage *gimage);
void gimp_image_undo_event (GimpImage *gimage,
gint event);
gint gimp_image_dirty (GimpImage *gimage);
gint gimp_image_clean (GimpImage *gimage);
void gimp_image_clean_all (GimpImage *gimage);
GimpLayer * gimp_image_floating_sel (const GimpImage *gimage);
guchar * gimp_image_cmap (const GimpImage *gimage);
/* shadow tiles */
gboolean gimp_image_preview_valid (const GimpImage *gimage);
TileManager * gimp_image_shadow (GimpImage *gimage,
gint width,
gint height,
gint bpp);
void gimp_image_free_shadow (GimpImage *gimage);
/* combine functions */
void gimp_image_apply_image (GimpImage *gimage,
GimpDrawable *drawable,
PixelRegion *src2PR,
gboolean undo,
gint opacity,
LayerModeEffects mode,
TileManager *src1_tiles,
gint x,
gint y);
void gimp_image_replace_image (GimpImage *gimage,
GimpDrawable *drawable,
PixelRegion *src2PR,
gboolean undo,
gint opacity,
PixelRegion *maskPR,
gint x,
gint y);
/* parasites */
GimpParasite * gimp_image_parasite_find (const GimpImage *gimage,
const gchar *name);
gchar ** gimp_image_parasite_list (const GimpImage *gimage,
gint *count);
void gimp_image_parasite_attach (GimpImage *gimage,
GimpParasite *parasite);
void gimp_image_parasite_detach (GimpImage *gimage,
const gchar *parasite);
/* tattoos */
GimpTattoo gimp_image_get_new_tattoo (GimpImage *gimage);
gboolean gimp_image_set_tattoo_state (GimpImage *gimage,
GimpTattoo val);
GimpTattoo gimp_image_get_tattoo_state (GimpImage *gimage);
/* layers / channels / paths */
GimpContainer * gimp_image_get_layers (const GimpImage *gimage);
GimpContainer * gimp_image_get_channels (const GimpImage *gimage);
void gimp_image_set_paths (GimpImage *gimage,
PathList *paths);
PathList * gimp_image_get_paths (const GimpImage *gimage);
GimpDrawable * gimp_image_active_drawable (const GimpImage *gimage);
GimpLayer * gimp_image_get_active_layer (const GimpImage *gimage);
GimpChannel * gimp_image_get_active_channel (const GimpImage *gimage);
GimpLayer * gimp_image_set_active_layer (GimpImage *gimage,
GimpLayer *layer);
GimpChannel * gimp_image_set_active_channel (GimpImage *gimage,
GimpChannel *channel);
GimpChannel * gimp_image_unset_active_channel (GimpImage *gimage);
gint gimp_image_get_layer_index (const GimpImage *gimage,
const GimpLayer *layer);
gint gimp_image_get_channel_index (const GimpImage *gimage,
const GimpChannel *channel);
GimpLayer * gimp_image_get_layer_by_tattoo (const GimpImage *gimage,
GimpTattoo tatoo);
GimpChannel * gimp_image_get_channel_by_tattoo (const GimpImage *gimage,
GimpTattoo tatoo);
GimpChannel * gimp_image_get_channel_by_name (const GimpImage *gimage,
const gchar *name);
gboolean gimp_image_add_layer (GimpImage *gimage,
GimpLayer *layer,
gint position);
void gimp_image_remove_layer (GimpImage *gimage,
GimpLayer *layer);
gboolean gimp_image_raise_layer (GimpImage *gimage,
GimpLayer *layer);
gboolean gimp_image_lower_layer (GimpImage *gimage,
GimpLayer *layer);
gboolean gimp_image_raise_layer_to_top (GimpImage *gimage,
GimpLayer *layer);
gboolean gimp_image_lower_layer_to_bottom (GimpImage *gimage,
GimpLayer *layer);
gboolean gimp_image_position_layer (GimpImage *gimage,
GimpLayer *layer,
gint new_index,
gboolean push_undo);
gboolean gimp_image_add_channel (GimpImage *gimage,
GimpChannel *channel,
gint position);
void gimp_image_remove_channel (GimpImage *gimage,
GimpChannel *channel);
gboolean gimp_image_raise_channel (GimpImage *gimage,
GimpChannel *channel);
gboolean gimp_image_lower_channel (GimpImage *gimage,
GimpChannel *channel);
gboolean gimp_image_position_channel (GimpImage *gimage,
GimpChannel *channel,
gint new_index,
gboolean push_undo);
gboolean gimp_image_layer_boundary (const GimpImage *gimage,
BoundSeg **segs,
gint *n_segs);
GimpLayer * gimp_image_pick_correlate_layer (const GimpImage *gimage,
gint x,
gint y);
void gimp_image_invalidate_layer_previews (GimpImage *gimage);
void gimp_image_invalidate_channel_previews (GimpImage *gimage);
#endif /* __GIMP_IMAGE_H__ */

View File

@ -29,6 +29,8 @@
#include "core/gimpimage.h"
#include "core/gimpimage-projection.h"
#include "tools/tools-types.h"
#include "tools/gimptool.h"
#include "tools/tool_manager.h"

View File

@ -205,3 +205,70 @@ gimp_viewable_get_new_preview (GimpViewable *viewable,
return NULL;
}
GdkPixbuf *
gimp_viewable_get_preview_pixbuf (GimpViewable *viewable,
gint width,
gint height)
{
GdkPixbuf *pixbuf;
g_return_val_if_fail (GIMP_IS_VIEWABLE (viewable), NULL);
g_return_val_if_fail (width > 0, NULL);
g_return_val_if_fail (height > 0, NULL);
pixbuf = g_object_get_data (G_OBJECT (viewable),
"static-viewable-preview-pixbuf");
if (pixbuf &&
gdk_pixbuf_get_width (pixbuf) == width &&
gdk_pixbuf_get_height (pixbuf) == height)
{
return pixbuf;
}
pixbuf = gimp_viewable_get_new_preview_pixbuf (viewable, width, height);
g_object_set_data_full (G_OBJECT (viewable), "static-viewable-preview-pixbuf",
pixbuf,
(GDestroyNotify) g_object_unref);
return pixbuf;
}
GdkPixbuf *
gimp_viewable_get_new_preview_pixbuf (GimpViewable *viewable,
gint width,
gint height)
{
TempBuf *temp_buf;
GdkPixbuf *pixbuf = NULL;
g_return_val_if_fail (GIMP_IS_VIEWABLE (viewable), NULL);
g_return_val_if_fail (width > 0, NULL);
g_return_val_if_fail (height > 0, NULL);
temp_buf = gimp_viewable_get_preview (viewable, width, height);
if (temp_buf)
{
gint width;
gint height;
gint bytes;
bytes = temp_buf->bytes;
width = temp_buf->width;
height = temp_buf->height;
pixbuf = gdk_pixbuf_new_from_data (temp_buf_data (temp_buf),
GDK_COLORSPACE_RGB,
(bytes == 2) || (bytes == 4),
8,
width,
height,
width * bytes,
NULL, NULL);
}
return pixbuf;
}

View File

@ -25,6 +25,8 @@
#include "gimpobject.h"
#include <gdk-pixbuf/gdk-pixbuf.h>
#define GIMP_TYPE_VIEWABLE (gimp_viewable_get_type ())
#define GIMP_VIEWABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_VIEWABLE, GimpViewable))
@ -59,17 +61,24 @@ struct _GimpViewableClass
};
GType gimp_viewable_get_type (void) G_GNUC_CONST;
GType gimp_viewable_get_type (void) G_GNUC_CONST;
void gimp_viewable_invalidate_preview (GimpViewable *viewable);
void gimp_viewable_size_changed (GimpViewable *viewable);
void gimp_viewable_invalidate_preview (GimpViewable *viewable);
void gimp_viewable_size_changed (GimpViewable *viewable);
TempBuf * gimp_viewable_get_preview (GimpViewable *viewable,
gint width,
gint height);
TempBuf * gimp_viewable_get_new_preview (GimpViewable *viewable,
gint width,
gint height);
TempBuf * gimp_viewable_get_preview (GimpViewable *viewable,
gint width,
gint height);
TempBuf * gimp_viewable_get_new_preview (GimpViewable *viewable,
gint width,
gint height);
GdkPixbuf * gimp_viewable_get_preview_pixbuf (GimpViewable *viewable,
gint width,
gint height);
GdkPixbuf * gimp_viewable_get_new_preview_pixbuf (GimpViewable *viewable,
gint width,
gint height);
#endif /* __GIMP_VIEWABLE_H__ */

View File

@ -374,7 +374,7 @@ info_window_title (GimpDisplay *gdisp)
gchar *basename;
gchar *title;
basename = g_path_get_basename (gimp_image_filename (gdisp->gimage));
basename = g_path_get_basename (gimp_image_get_filename (gdisp->gimage));
title = g_strdup_printf (_("Info: %s-%d.%d"),
basename,

View File

@ -258,7 +258,8 @@ palette_import_image_sel_callback (GtkWidget *widget,
gimage = GIMP_IMAGE (data);
palette_import_update_image_preview (gimage);
basename = g_path_get_basename (gimp_image_filename (import_dialog->gimage));
basename =
g_path_get_basename (gimp_image_get_filename (import_dialog->gimage));
lab = g_strdup_printf ("%s-%d",
basename,
@ -278,7 +279,7 @@ palette_import_image_menu_add (GimpImage *gimage)
gchar *basename;
gchar *lab;
basename = g_path_get_basename (gimp_image_filename (gimage));
basename = g_path_get_basename (gimp_image_get_filename (gimage));
lab = g_strdup_printf ("%s-%d",
basename,
@ -389,7 +390,7 @@ palette_import_image_menu_activate (ImportDialog *import_dialog,
gchar *lab;
basename =
g_path_get_basename (gimp_image_filename (import_dialog->gimage));
g_path_get_basename (gimp_image_get_filename (import_dialog->gimage));
lab = g_strdup_printf ("%s-%d",
basename,
@ -405,7 +406,7 @@ palette_import_image_menu_activate (ImportDialog *import_dialog,
}
g_slist_free (list);
basename = g_path_get_basename (gimp_image_filename (import_dialog->gimage));
basename = g_path_get_basename (gimp_image_get_filename (import_dialog->gimage));
lab = g_strdup_printf ("%s-%d",
basename,

View File

@ -20,7 +20,7 @@
#define __DISPLAY_TYPES_H__
#include "tools/tools-types.h"
#include "widgets/widgets-types.h"
typedef enum /*< skip >*/

View File

@ -29,6 +29,8 @@
#include "core/gimpimage.h"
#include "core/gimpimage-projection.h"
#include "tools/tools-types.h"
#include "tools/gimptool.h"
#include "tools/tool_manager.h"

View File

@ -34,6 +34,8 @@
#include "core/gimplayer.h"
#include "core/gimptoolinfo.h"
#include "tools/tools-types.h"
#include "tools/gimpfuzzyselecttool.h"
#include "tools/gimpmovetool.h"
#include "tools/tool_manager.h"

View File

@ -27,6 +27,7 @@
#include "core/gimp.h"
#include "core/gimpbuffer.h"
#include "core/gimpcontainer.h"
#include "core/gimpcontext.h"
#include "core/gimpdrawable.h"
#include "core/gimpdrawable-bucket-fill.h"
@ -38,9 +39,6 @@
#include "paint-funcs/paint-funcs.h"
#include "tools/gimpbucketfilltool.h"
#include "tools/tool_manager.h"
#include "gimpdisplay.h"
#include "gimpdisplayshell.h"
#include "gimpdisplayshell-dnd.h"
@ -178,8 +176,9 @@ gimp_display_shell_bucket_fill (GimpImage *gimage,
return;
/* Get the bucket fill context */
tool_info = tool_manager_get_info_by_type (gimage->gimp,
GIMP_TYPE_BUCKET_FILL_TOOL);
tool_info = (GimpToolInfo *)
gimp_container_get_child_by_name (gimage->gimp->tool_info_list,
"gimp:bucket_fill_tool");
if (tool_info && tool_info->context)
{

View File

@ -34,6 +34,7 @@
#include "core/gimpcontext.h"
#include "core/gimpcontainer.h"
#include "core/gimpimage.h"
#include "core/gimpimage-guides.h"
#include "core/gimpimage-mask.h"
#include "core/gimplayer.h"
#include "core/gimplayermask.h"
@ -47,6 +48,8 @@
#include "gui/info-window.h"
#include "tools/tools-types.h"
#include "tools/tool_manager.h"
#include "gimpdisplay.h"
@ -99,7 +102,6 @@ static void gimp_display_shell_format_title (GimpDisplayShell *gdisp,
gint title_len);
static void gimp_display_shell_update_icon (GimpDisplayShell *gdisp);
static gboolean gimp_display_shell_update_icon_timer (gpointer data);
static gboolean gimp_display_shell_update_icon_invoker (gpointer data);
static void gimp_display_shell_update_icon_scheduler (GimpImage *gimage,
gpointer data);
@ -210,11 +212,7 @@ gimp_display_shell_init (GimpDisplayShell *shell)
shell->scroll_gc = NULL;
shell->icon = NULL;
shell->iconmask = NULL;
shell->iconsize = 32;
shell->icon_needs_update = FALSE;
shell->icon_timeout_id = 0;
shell->icon_size = 32;
shell->icon_idle_id = 0;
shell->current_cursor = (GdkCursorType) -1;
@ -275,30 +273,12 @@ gimp_display_shell_destroy (GtkObject *object)
shell->scroll_gc = NULL;
}
if (shell->icon_timeout_id)
{
g_source_remove (shell->icon_timeout_id);
shell->icon_timeout_id = 0;
}
if (shell->icon_idle_id)
{
g_source_remove (shell->icon_idle_id);
shell->icon_idle_id = 0;
}
if (shell->icon)
{
gdk_drawable_unref (shell->icon);
shell->icon = NULL;
}
if (shell->iconmask)
{
gdk_drawable_unref (shell->iconmask);
shell->iconmask = NULL;
}
if (shell->padding_gc)
{
g_object_unref (G_OBJECT (shell->padding_gc));
@ -830,7 +810,7 @@ gimp_display_shell_close (GimpDisplayShell *shell,
{
gchar *basename;
basename = g_path_get_basename (gimp_image_filename (gimage));
basename = g_path_get_basename (gimp_image_get_filename (gimage));
gimp_display_shell_close_warning_dialog (shell, basename);
@ -960,6 +940,8 @@ gimp_display_shell_set_menu_sensitivity (GimpDisplayShell *shell)
#define SET_ACTIVE(menu,condition) \
gimp_menu_item_set_active ("<Image>/" menu, (condition) != 0)
#define SET_LABEL(menu,label) \
gimp_menu_item_set_label ("<Image>/" menu, (label))
#define SET_SENSITIVE(menu,condition) \
gimp_menu_item_set_sensitive ("<Image>/" menu, (condition) != 0)
@ -973,21 +955,30 @@ gimp_display_shell_set_menu_sensitivity (GimpDisplayShell *shell)
SET_SENSITIVE ("Edit/Buffer", gdisp);
if (gdisp)
{
/* Interactive tools such as CURVES, COLOR_BALANCE, LEVELS disable */
/* undo to fake some kind of atomic behaviour. G. R. Osgood #14072 */
gchar *undo_name = NULL;
gchar *redo_name = NULL;
if (gimp_image_undo_is_enabled (gimage))
{
/* If undo/redo stacks are empty, disable respective menu */
{
undo_name = (gchar *) undo_get_undo_name (gimage);
redo_name = (gchar *) undo_get_redo_name (gimage);
}
if (undo_name)
undo_name = g_strdup_printf (_("Undo %s"), gettext (undo_name));
if (redo_name)
redo_name = g_strdup_printf (_("Redo %s"), gettext (redo_name));
SET_LABEL ("Edit/Undo", undo_name ? undo_name : _("Undo"));
SET_LABEL ("Edit/Redo", redo_name ? redo_name : _("Redo"));
SET_SENSITIVE ("Edit/Undo", undo_name);
SET_SENSITIVE ("Edit/Redo", redo_name);
g_free (undo_name);
g_free (redo_name);
SET_SENSITIVE ("Edit/Undo", undo_get_undo_name (gimage));
SET_SENSITIVE ("Edit/Redo", undo_get_redo_name (gimage));
}
else
{
SET_SENSITIVE ("Edit/Undo", FALSE);
SET_SENSITIVE ("Edit/Redo", FALSE);
}
SET_SENSITIVE ("Edit/Cut", lp);
SET_SENSITIVE ("Edit/Copy", lp);
SET_SENSITIVE ("Edit/Buffer/Cut Named...", lp);
@ -1081,6 +1072,7 @@ gimp_display_shell_set_menu_sensitivity (GimpDisplayShell *shell)
SET_SENSITIVE ("Script-Fu", gdisp && lp);
#undef SET_ACTIVE
#undef SET_LABEL
#undef SET_SENSITIVE
plug_in_set_menu_sensitivity (type);
@ -2123,161 +2115,32 @@ gimp_display_shell_draw_cursor (GimpDisplayShell *shell)
static void
gimp_display_shell_update_icon (GimpDisplayShell *shell)
{
GtkStyle *style;
GdkGC *icongc, *iconmaskgc;
GdkColormap *colormap;
GdkColor black, white;
gboolean success;
TempBuf *icondata;
guchar *data;
gint width, height;
gdouble factor;
GdkPixbuf *pixbuf;
gint width, height;
gdouble factor;
g_return_if_fail (GIMP_IS_DISPLAY_SHELL (shell));
if (! shell->icon)
{
shell->icon = gdk_pixmap_new (GTK_WIDGET (shell)->window,
shell->iconsize,
shell->iconsize,
-1);
shell->iconmask = gdk_pixmap_new (NULL,
shell->iconsize,
shell->iconsize,
1);
}
icongc = gdk_gc_new (shell->icon);
iconmaskgc = gdk_gc_new (shell->iconmask);
colormap = gdk_colormap_get_system (); /* or gdk_rgb_get_colormap () */
white.red = 255;
white.green = 255;
white.blue = 255;
gdk_colormap_alloc_colors (colormap, &white, 1, FALSE, TRUE, &success);
black.red = 0;
black.green = 0;
black.blue = 0;
gdk_colormap_alloc_colors (colormap, &black, 1, FALSE, TRUE, &success);
if (! shell->icon_needs_update)
return;
style = gtk_widget_get_style (GTK_WIDGET (shell));
factor = ((gfloat) gimp_image_get_height (shell->gdisp->gimage)) /
gimp_image_get_width (shell->gdisp->gimage);
factor = ((gdouble) gimp_image_get_height (shell->gdisp->gimage) /
(gdouble) gimp_image_get_width (shell->gdisp->gimage));
if (factor >= 1)
{
height = MAX (shell->iconsize, 1);
width = MAX (((gfloat) shell->iconsize) / factor, 1);
height = MAX (shell->icon_size, 1);
width = MAX (((gdouble) shell->icon_size) / factor, 1);
}
else
{
height = MAX (((gfloat) shell->iconsize) * factor, 1);
width = MAX (shell->iconsize, 1);
height = MAX (((gdouble) shell->icon_size) * factor, 1);
width = MAX (shell->icon_size, 1);
}
icondata = gimp_viewable_get_new_preview (GIMP_VIEWABLE (shell->gdisp->gimage),
width, height);
data = temp_buf_data (icondata);
pixbuf = gimp_viewable_get_new_preview_pixbuf (GIMP_VIEWABLE (shell->gdisp->gimage),
width, height);
/* Set up an icon mask */
gdk_gc_set_foreground (iconmaskgc, &black);
gdk_draw_rectangle (shell->iconmask, iconmaskgc, TRUE, 0, 0,
shell->iconsize,
shell->iconsize);
gdk_gc_set_foreground (iconmaskgc, &white);
gdk_draw_rectangle (shell->iconmask, iconmaskgc, TRUE,
(shell->iconsize - icondata->width) / 2,
(shell->iconsize - icondata->height) / 2,
icondata->width,
icondata->height);
gtk_window_set_icon (GTK_WINDOW (shell), pixbuf);
/* This is an ugly bad hack. There should be a clean way to get
* a preview in a specified depth with a nicely rendered
* checkerboard if no alpha channel is requested.
* We ignore the alpha channel for now. Also the aspect ratio is
* incorrect.
*
* Currently the icons are updated when you press the "menu" button in
* the top left corner of the window. Of course this should go in an
* idle routine.
*/
if (icondata->bytes == 1)
{
gdk_draw_gray_image (shell->icon,
icongc,
(shell->iconsize - icondata->width) / 2,
(shell->iconsize - icondata->height) / 2,
icondata->width,
icondata->height,
GDK_RGB_DITHER_MAX,
data,
icondata->width * icondata->bytes);
gdk_window_set_icon (GTK_WIDGET (shell)->window,
NULL, shell->icon, shell->iconmask);
}
else if (icondata->bytes == 3)
{
gdk_draw_rgb_image (shell->icon,
icongc,
(shell->iconsize - icondata->width) / 2,
(shell->iconsize - icondata->height) / 2,
icondata->width,
icondata->height,
GDK_RGB_DITHER_MAX,
data,
icondata->width * icondata->bytes);
gdk_window_set_icon (GTK_WIDGET (shell)->window,
NULL, shell->icon, shell->iconmask);
}
else if (icondata->bytes == 4)
{
gdk_draw_rgb_32_image (shell->icon,
icongc,
(shell->iconsize - icondata->width) / 2,
(shell->iconsize - icondata->height) / 2,
icondata->width,
icondata->height,
GDK_RGB_DITHER_MAX,
data,
icondata->width * icondata->bytes);
gdk_window_set_icon (GTK_WIDGET (shell)->window,
NULL, shell->icon, shell->iconmask);
}
else
{
g_printerr ("%s: falling back to default", G_STRLOC);
}
shell->icon_needs_update = FALSE;
gdk_gc_unref (icongc);
gdk_gc_unref (iconmaskgc);
temp_buf_free (icondata);
}
/* this timer is necessary to check if the icon is invalid and if yes
* adds the update function to the idle loop
*/
static gboolean
gimp_display_shell_update_icon_timer (gpointer data)
{
GimpDisplayShell *shell;
shell = GIMP_DISPLAY_SHELL (data);
if (shell->icon_needs_update && ! shell->icon_idle_id)
shell->icon_idle_id = g_idle_add (gimp_display_shell_update_icon_invoker,
shell);
return TRUE;
g_object_unref (G_OBJECT (pixbuf));
}
/* Just a dumb invoker for gdisplay_update_icon ()
@ -2289,10 +2152,10 @@ gimp_display_shell_update_icon_invoker (gpointer data)
shell = GIMP_DISPLAY_SHELL (data);
gimp_display_shell_update_icon (shell);
shell->icon_idle_id = 0;
gimp_display_shell_update_icon (shell);
return FALSE;
}
@ -2307,20 +2170,15 @@ gimp_display_shell_update_icon_scheduler (GimpImage *gimage,
shell = GIMP_DISPLAY_SHELL (data);
shell->icon_needs_update = TRUE;
if (! shell->icon_timeout_id)
if (shell->icon_idle_id)
{
shell->icon_timeout_id = g_timeout_add (7500,
gimp_display_shell_update_icon_timer,
shell);
if (! shell->icon_idle_id)
{
shell->icon_idle_id = g_idle_add (gimp_display_shell_update_icon_invoker,
shell);
}
g_source_remove (shell->icon_idle_id);
}
shell->icon_idle_id = g_idle_add_full (G_PRIORITY_LOW,
gimp_display_shell_update_icon_invoker,
shell,
NULL);
}
static int print (char *, int, int, const char *, ...) G_GNUC_PRINTF (4, 5);
@ -2398,7 +2256,8 @@ gimp_display_shell_format_title (GimpDisplayShell *shell,
{
gchar *basename;
basename = g_path_get_basename (gimp_image_filename (gimage));
basename =
g_path_get_basename (gimp_image_get_filename (gimage));
i += print (title, title_len, i, "%s", basename);
@ -2407,7 +2266,7 @@ gimp_display_shell_format_title (GimpDisplayShell *shell,
break;
case 'F': /* full filename */
i += print (title, title_len, i, "%s", gimp_image_filename (gimage));
i += print (title, title_len, i, "%s", gimp_image_get_filename (gimage));
break;
case 'p': /* PDB id */

View File

@ -80,6 +80,7 @@ struct _GimpDisplayShell
GtkWidget *hrule; /* rulers */
GtkWidget *vrule;
GtkWidget *origin; /* origin button */
GtkWidget *statusarea; /* status area hbox */
GtkWidget *statusbar; /* statusbar */
GtkWidget *progressbar; /* progressbar */
@ -90,11 +91,7 @@ struct _GimpDisplayShell
GdkGC *scroll_gc; /* GC for scrolling */
GdkPixmap *icon; /* Pixmap for the icon */
GdkBitmap *iconmask; /* Bitmap for the icon mask */
guint iconsize; /* size of the icon pixmap */
gboolean icon_needs_update; /* Do we need to render a new icon? */
guint icon_timeout_id; /* ID of the timeout-function */
gint icon_size; /* size of the icon pixmap */
guint icon_idle_id; /* ID of the idle-function */
GdkCursorType current_cursor; /* Currently installed main cursor */

View File

@ -281,7 +281,7 @@ render_image_indexed (RenderInfo *info)
gfloat error;
gfloat step;
cmap = gimp_image_cmap (info->gdisp->gimage);
cmap = gimp_image_get_colormap (info->gdisp->gimage);
y = info->y;
ye = info->y + info->h;
@ -355,7 +355,7 @@ render_image_indexed_a (RenderInfo *info)
gfloat error;
gfloat step;
cmap = gimp_image_cmap (info->gdisp->gimage);
cmap = gimp_image_get_colormap (info->gdisp->gimage);
alpha = info->alpha;
y = info->y;

View File

@ -28,7 +28,8 @@
#include "core/gimpimage.h"
#include "tools/gimptool.h"
#include "tools/tools-types.h"
#include "tools/tool_manager.h"
#include "gimpdisplay.h"

View File

@ -26,7 +26,8 @@
#include "core/gimpimage.h"
#include "tools/gimptool.h"
#include "tools/tools-types.h"
#include "tools/tool_manager.h"
#include "gimpdisplay.h"

View File

@ -34,6 +34,7 @@
#include "core/gimpcontext.h"
#include "core/gimpcontainer.h"
#include "core/gimpimage.h"
#include "core/gimpimage-guides.h"
#include "core/gimpimage-mask.h"
#include "core/gimplayer.h"
#include "core/gimplayermask.h"
@ -47,6 +48,8 @@
#include "gui/info-window.h"
#include "tools/tools-types.h"
#include "tools/tool_manager.h"
#include "gimpdisplay.h"
@ -99,7 +102,6 @@ static void gimp_display_shell_format_title (GimpDisplayShell *gdisp,
gint title_len);
static void gimp_display_shell_update_icon (GimpDisplayShell *gdisp);
static gboolean gimp_display_shell_update_icon_timer (gpointer data);
static gboolean gimp_display_shell_update_icon_invoker (gpointer data);
static void gimp_display_shell_update_icon_scheduler (GimpImage *gimage,
gpointer data);
@ -210,11 +212,7 @@ gimp_display_shell_init (GimpDisplayShell *shell)
shell->scroll_gc = NULL;
shell->icon = NULL;
shell->iconmask = NULL;
shell->iconsize = 32;
shell->icon_needs_update = FALSE;
shell->icon_timeout_id = 0;
shell->icon_size = 32;
shell->icon_idle_id = 0;
shell->current_cursor = (GdkCursorType) -1;
@ -275,30 +273,12 @@ gimp_display_shell_destroy (GtkObject *object)
shell->scroll_gc = NULL;
}
if (shell->icon_timeout_id)
{
g_source_remove (shell->icon_timeout_id);
shell->icon_timeout_id = 0;
}
if (shell->icon_idle_id)
{
g_source_remove (shell->icon_idle_id);
shell->icon_idle_id = 0;
}
if (shell->icon)
{
gdk_drawable_unref (shell->icon);
shell->icon = NULL;
}
if (shell->iconmask)
{
gdk_drawable_unref (shell->iconmask);
shell->iconmask = NULL;
}
if (shell->padding_gc)
{
g_object_unref (G_OBJECT (shell->padding_gc));
@ -830,7 +810,7 @@ gimp_display_shell_close (GimpDisplayShell *shell,
{
gchar *basename;
basename = g_path_get_basename (gimp_image_filename (gimage));
basename = g_path_get_basename (gimp_image_get_filename (gimage));
gimp_display_shell_close_warning_dialog (shell, basename);
@ -960,6 +940,8 @@ gimp_display_shell_set_menu_sensitivity (GimpDisplayShell *shell)
#define SET_ACTIVE(menu,condition) \
gimp_menu_item_set_active ("<Image>/" menu, (condition) != 0)
#define SET_LABEL(menu,label) \
gimp_menu_item_set_label ("<Image>/" menu, (label))
#define SET_SENSITIVE(menu,condition) \
gimp_menu_item_set_sensitive ("<Image>/" menu, (condition) != 0)
@ -973,21 +955,30 @@ gimp_display_shell_set_menu_sensitivity (GimpDisplayShell *shell)
SET_SENSITIVE ("Edit/Buffer", gdisp);
if (gdisp)
{
/* Interactive tools such as CURVES, COLOR_BALANCE, LEVELS disable */
/* undo to fake some kind of atomic behaviour. G. R. Osgood #14072 */
gchar *undo_name = NULL;
gchar *redo_name = NULL;
if (gimp_image_undo_is_enabled (gimage))
{
/* If undo/redo stacks are empty, disable respective menu */
{
undo_name = (gchar *) undo_get_undo_name (gimage);
redo_name = (gchar *) undo_get_redo_name (gimage);
}
if (undo_name)
undo_name = g_strdup_printf (_("Undo %s"), gettext (undo_name));
if (redo_name)
redo_name = g_strdup_printf (_("Redo %s"), gettext (redo_name));
SET_LABEL ("Edit/Undo", undo_name ? undo_name : _("Undo"));
SET_LABEL ("Edit/Redo", redo_name ? redo_name : _("Redo"));
SET_SENSITIVE ("Edit/Undo", undo_name);
SET_SENSITIVE ("Edit/Redo", redo_name);
g_free (undo_name);
g_free (redo_name);
SET_SENSITIVE ("Edit/Undo", undo_get_undo_name (gimage));
SET_SENSITIVE ("Edit/Redo", undo_get_redo_name (gimage));
}
else
{
SET_SENSITIVE ("Edit/Undo", FALSE);
SET_SENSITIVE ("Edit/Redo", FALSE);
}
SET_SENSITIVE ("Edit/Cut", lp);
SET_SENSITIVE ("Edit/Copy", lp);
SET_SENSITIVE ("Edit/Buffer/Cut Named...", lp);
@ -1081,6 +1072,7 @@ gimp_display_shell_set_menu_sensitivity (GimpDisplayShell *shell)
SET_SENSITIVE ("Script-Fu", gdisp && lp);
#undef SET_ACTIVE
#undef SET_LABEL
#undef SET_SENSITIVE
plug_in_set_menu_sensitivity (type);
@ -2123,161 +2115,32 @@ gimp_display_shell_draw_cursor (GimpDisplayShell *shell)
static void
gimp_display_shell_update_icon (GimpDisplayShell *shell)
{
GtkStyle *style;
GdkGC *icongc, *iconmaskgc;
GdkColormap *colormap;
GdkColor black, white;
gboolean success;
TempBuf *icondata;
guchar *data;
gint width, height;
gdouble factor;
GdkPixbuf *pixbuf;
gint width, height;
gdouble factor;
g_return_if_fail (GIMP_IS_DISPLAY_SHELL (shell));
if (! shell->icon)
{
shell->icon = gdk_pixmap_new (GTK_WIDGET (shell)->window,
shell->iconsize,
shell->iconsize,
-1);
shell->iconmask = gdk_pixmap_new (NULL,
shell->iconsize,
shell->iconsize,
1);
}
icongc = gdk_gc_new (shell->icon);
iconmaskgc = gdk_gc_new (shell->iconmask);
colormap = gdk_colormap_get_system (); /* or gdk_rgb_get_colormap () */
white.red = 255;
white.green = 255;
white.blue = 255;
gdk_colormap_alloc_colors (colormap, &white, 1, FALSE, TRUE, &success);
black.red = 0;
black.green = 0;
black.blue = 0;
gdk_colormap_alloc_colors (colormap, &black, 1, FALSE, TRUE, &success);
if (! shell->icon_needs_update)
return;
style = gtk_widget_get_style (GTK_WIDGET (shell));
factor = ((gfloat) gimp_image_get_height (shell->gdisp->gimage)) /
gimp_image_get_width (shell->gdisp->gimage);
factor = ((gdouble) gimp_image_get_height (shell->gdisp->gimage) /
(gdouble) gimp_image_get_width (shell->gdisp->gimage));
if (factor >= 1)
{
height = MAX (shell->iconsize, 1);
width = MAX (((gfloat) shell->iconsize) / factor, 1);
height = MAX (shell->icon_size, 1);
width = MAX (((gdouble) shell->icon_size) / factor, 1);
}
else
{
height = MAX (((gfloat) shell->iconsize) * factor, 1);
width = MAX (shell->iconsize, 1);
height = MAX (((gdouble) shell->icon_size) * factor, 1);
width = MAX (shell->icon_size, 1);
}
icondata = gimp_viewable_get_new_preview (GIMP_VIEWABLE (shell->gdisp->gimage),
width, height);
data = temp_buf_data (icondata);
pixbuf = gimp_viewable_get_new_preview_pixbuf (GIMP_VIEWABLE (shell->gdisp->gimage),
width, height);
/* Set up an icon mask */
gdk_gc_set_foreground (iconmaskgc, &black);
gdk_draw_rectangle (shell->iconmask, iconmaskgc, TRUE, 0, 0,
shell->iconsize,
shell->iconsize);
gdk_gc_set_foreground (iconmaskgc, &white);
gdk_draw_rectangle (shell->iconmask, iconmaskgc, TRUE,
(shell->iconsize - icondata->width) / 2,
(shell->iconsize - icondata->height) / 2,
icondata->width,
icondata->height);
gtk_window_set_icon (GTK_WINDOW (shell), pixbuf);
/* This is an ugly bad hack. There should be a clean way to get
* a preview in a specified depth with a nicely rendered
* checkerboard if no alpha channel is requested.
* We ignore the alpha channel for now. Also the aspect ratio is
* incorrect.
*
* Currently the icons are updated when you press the "menu" button in
* the top left corner of the window. Of course this should go in an
* idle routine.
*/
if (icondata->bytes == 1)
{
gdk_draw_gray_image (shell->icon,
icongc,
(shell->iconsize - icondata->width) / 2,
(shell->iconsize - icondata->height) / 2,
icondata->width,
icondata->height,
GDK_RGB_DITHER_MAX,
data,
icondata->width * icondata->bytes);
gdk_window_set_icon (GTK_WIDGET (shell)->window,
NULL, shell->icon, shell->iconmask);
}
else if (icondata->bytes == 3)
{
gdk_draw_rgb_image (shell->icon,
icongc,
(shell->iconsize - icondata->width) / 2,
(shell->iconsize - icondata->height) / 2,
icondata->width,
icondata->height,
GDK_RGB_DITHER_MAX,
data,
icondata->width * icondata->bytes);
gdk_window_set_icon (GTK_WIDGET (shell)->window,
NULL, shell->icon, shell->iconmask);
}
else if (icondata->bytes == 4)
{
gdk_draw_rgb_32_image (shell->icon,
icongc,
(shell->iconsize - icondata->width) / 2,
(shell->iconsize - icondata->height) / 2,
icondata->width,
icondata->height,
GDK_RGB_DITHER_MAX,
data,
icondata->width * icondata->bytes);
gdk_window_set_icon (GTK_WIDGET (shell)->window,
NULL, shell->icon, shell->iconmask);
}
else
{
g_printerr ("%s: falling back to default", G_STRLOC);
}
shell->icon_needs_update = FALSE;
gdk_gc_unref (icongc);
gdk_gc_unref (iconmaskgc);
temp_buf_free (icondata);
}
/* this timer is necessary to check if the icon is invalid and if yes
* adds the update function to the idle loop
*/
static gboolean
gimp_display_shell_update_icon_timer (gpointer data)
{
GimpDisplayShell *shell;
shell = GIMP_DISPLAY_SHELL (data);
if (shell->icon_needs_update && ! shell->icon_idle_id)
shell->icon_idle_id = g_idle_add (gimp_display_shell_update_icon_invoker,
shell);
return TRUE;
g_object_unref (G_OBJECT (pixbuf));
}
/* Just a dumb invoker for gdisplay_update_icon ()
@ -2289,10 +2152,10 @@ gimp_display_shell_update_icon_invoker (gpointer data)
shell = GIMP_DISPLAY_SHELL (data);
gimp_display_shell_update_icon (shell);
shell->icon_idle_id = 0;
gimp_display_shell_update_icon (shell);
return FALSE;
}
@ -2307,20 +2170,15 @@ gimp_display_shell_update_icon_scheduler (GimpImage *gimage,
shell = GIMP_DISPLAY_SHELL (data);
shell->icon_needs_update = TRUE;
if (! shell->icon_timeout_id)
if (shell->icon_idle_id)
{
shell->icon_timeout_id = g_timeout_add (7500,
gimp_display_shell_update_icon_timer,
shell);
if (! shell->icon_idle_id)
{
shell->icon_idle_id = g_idle_add (gimp_display_shell_update_icon_invoker,
shell);
}
g_source_remove (shell->icon_idle_id);
}
shell->icon_idle_id = g_idle_add_full (G_PRIORITY_LOW,
gimp_display_shell_update_icon_invoker,
shell,
NULL);
}
static int print (char *, int, int, const char *, ...) G_GNUC_PRINTF (4, 5);
@ -2398,7 +2256,8 @@ gimp_display_shell_format_title (GimpDisplayShell *shell,
{
gchar *basename;
basename = g_path_get_basename (gimp_image_filename (gimage));
basename =
g_path_get_basename (gimp_image_get_filename (gimage));
i += print (title, title_len, i, "%s", basename);
@ -2407,7 +2266,7 @@ gimp_display_shell_format_title (GimpDisplayShell *shell,
break;
case 'F': /* full filename */
i += print (title, title_len, i, "%s", gimp_image_filename (gimage));
i += print (title, title_len, i, "%s", gimp_image_get_filename (gimage));
break;
case 'p': /* PDB id */

View File

@ -80,6 +80,7 @@ struct _GimpDisplayShell
GtkWidget *hrule; /* rulers */
GtkWidget *vrule;
GtkWidget *origin; /* origin button */
GtkWidget *statusarea; /* status area hbox */
GtkWidget *statusbar; /* statusbar */
GtkWidget *progressbar; /* progressbar */
@ -90,11 +91,7 @@ struct _GimpDisplayShell
GdkGC *scroll_gc; /* GC for scrolling */
GdkPixmap *icon; /* Pixmap for the icon */
GdkBitmap *iconmask; /* Bitmap for the icon mask */
guint iconsize; /* size of the icon pixmap */
gboolean icon_needs_update; /* Do we need to render a new icon? */
guint icon_timeout_id; /* ID of the timeout-function */
gint icon_size; /* size of the icon pixmap */
guint icon_idle_id; /* ID of the idle-function */
GdkCursorType current_cursor; /* Currently installed main cursor */

View File

@ -662,7 +662,7 @@ nav_dialog_title (GimpDisplay *gdisp)
gchar *basename;
gchar *title;
basename = g_path_get_basename (gimp_image_filename (gdisp->gimage));
basename = g_path_get_basename (gimp_image_get_filename (gdisp->gimage));
title = g_strdup_printf (_("Navigation: %s-%d.%d"),
basename,

View File

@ -662,7 +662,7 @@ nav_dialog_title (GimpDisplay *gdisp)
gchar *basename;
gchar *title;
basename = g_path_get_basename (gimp_image_filename (gdisp->gimage));
basename = g_path_get_basename (gimp_image_get_filename (gdisp->gimage));
title = g_strdup_printf (_("Navigation: %s-%d.%d"),
basename,

View File

@ -20,8 +20,7 @@
#define __GUI_TYPES_H__
#include "widgets/widgets-types.h"
#include "display/display-types.h"
#include "tools/tools-types.h"
typedef struct _ColorNotebook ColorNotebook;

View File

@ -31,6 +31,8 @@
#include "core/gimpdrawable-equalize.h"
#include "core/gimpimage.h"
#include "core/gimpimage-duplicate.h"
#include "core/gimpimage-resize.h"
#include "core/gimpimage-scale.h"
#include "pdb/procedural_db.h"

View File

@ -374,7 +374,7 @@ info_window_title (GimpDisplay *gdisp)
gchar *basename;
gchar *title;
basename = g_path_get_basename (gimp_image_filename (gdisp->gimage));
basename = g_path_get_basename (gimp_image_get_filename (gdisp->gimage));
title = g_strdup_printf (_("Info: %s-%d.%d"),
basename,

View File

@ -33,6 +33,7 @@
#include "core/gimp.h"
#include "core/gimpimage.h"
#include "core/gimpimage-mask.h"
#include "core/gimpimage-merge.h"
#include "core/gimplayer.h"
#include "core/gimplayermask.h"
#include "core/gimplist.h"

View File

@ -258,7 +258,8 @@ palette_import_image_sel_callback (GtkWidget *widget,
gimage = GIMP_IMAGE (data);
palette_import_update_image_preview (gimage);
basename = g_path_get_basename (gimp_image_filename (import_dialog->gimage));
basename =
g_path_get_basename (gimp_image_get_filename (import_dialog->gimage));
lab = g_strdup_printf ("%s-%d",
basename,
@ -278,7 +279,7 @@ palette_import_image_menu_add (GimpImage *gimage)
gchar *basename;
gchar *lab;
basename = g_path_get_basename (gimp_image_filename (gimage));
basename = g_path_get_basename (gimp_image_get_filename (gimage));
lab = g_strdup_printf ("%s-%d",
basename,
@ -389,7 +390,7 @@ palette_import_image_menu_activate (ImportDialog *import_dialog,
gchar *lab;
basename =
g_path_get_basename (gimp_image_filename (import_dialog->gimage));
g_path_get_basename (gimp_image_get_filename (import_dialog->gimage));
lab = g_strdup_printf ("%s-%d",
basename,
@ -405,7 +406,7 @@ palette_import_image_menu_activate (ImportDialog *import_dialog,
}
g_slist_free (list);
basename = g_path_get_basename (gimp_image_filename (import_dialog->gimage));
basename = g_path_get_basename (gimp_image_get_filename (import_dialog->gimage));
lab = g_strdup_printf ("%s-%d",
basename,

View File

@ -1485,6 +1485,23 @@ plug_in_set_menu_sensitivity (GimpImageType type)
if (last_plug_in && (last_plug_in == &(proc_def->db_info)))
{
gchar *basename;
gchar *repeat;
gchar *reshow;
basename = g_path_get_basename (proc_def->menu_path);
repeat = g_strdup_printf (_("Repeat \"%s\""), basename);
reshow = g_strdup_printf (_("Re-show \"%s\""), basename);
g_free (basename);
gimp_menu_item_set_label ("<Image>/Filters/Repeat Last", repeat);
gimp_menu_item_set_label ("<Image>/Filters/Re-Show Last", reshow);
g_free (repeat);
g_free (reshow);
gimp_menu_item_set_sensitive ("<Image>/Filters/Repeat Last",
sensitive);
gimp_menu_item_set_sensitive ("<Image>/Filters/Re-Show Last",
@ -1493,8 +1510,13 @@ plug_in_set_menu_sensitivity (GimpImageType type)
}
}
if (!last_plug_in)
if (! last_plug_in)
{
gimp_menu_item_set_label ("<Image>/Filters/Repeat Last",
_("Repeat Last"));
gimp_menu_item_set_label ("<Image>/Filters/Re-Show Last",
_("Re-Show Last"));
gimp_menu_item_set_sensitive ("<Image>/Filters/Repeat Last", FALSE);
gimp_menu_item_set_sensitive ("<Image>/Filters/Re-Show Last", FALSE);
}

View File

@ -1485,6 +1485,23 @@ plug_in_set_menu_sensitivity (GimpImageType type)
if (last_plug_in && (last_plug_in == &(proc_def->db_info)))
{
gchar *basename;
gchar *repeat;
gchar *reshow;
basename = g_path_get_basename (proc_def->menu_path);
repeat = g_strdup_printf (_("Repeat \"%s\""), basename);
reshow = g_strdup_printf (_("Re-show \"%s\""), basename);
g_free (basename);
gimp_menu_item_set_label ("<Image>/Filters/Repeat Last", repeat);
gimp_menu_item_set_label ("<Image>/Filters/Re-Show Last", reshow);
g_free (repeat);
g_free (reshow);
gimp_menu_item_set_sensitive ("<Image>/Filters/Repeat Last",
sensitive);
gimp_menu_item_set_sensitive ("<Image>/Filters/Re-Show Last",
@ -1493,8 +1510,13 @@ plug_in_set_menu_sensitivity (GimpImageType type)
}
}
if (!last_plug_in)
if (! last_plug_in)
{
gimp_menu_item_set_label ("<Image>/Filters/Repeat Last",
_("Repeat Last"));
gimp_menu_item_set_label ("<Image>/Filters/Re-Show Last",
_("Re-Show Last"));
gimp_menu_item_set_sensitive ("<Image>/Filters/Repeat Last", FALSE);
gimp_menu_item_set_sensitive ("<Image>/Filters/Re-Show Last", FALSE);
}

View File

@ -1485,6 +1485,23 @@ plug_in_set_menu_sensitivity (GimpImageType type)
if (last_plug_in && (last_plug_in == &(proc_def->db_info)))
{
gchar *basename;
gchar *repeat;
gchar *reshow;
basename = g_path_get_basename (proc_def->menu_path);
repeat = g_strdup_printf (_("Repeat \"%s\""), basename);
reshow = g_strdup_printf (_("Re-show \"%s\""), basename);
g_free (basename);
gimp_menu_item_set_label ("<Image>/Filters/Repeat Last", repeat);
gimp_menu_item_set_label ("<Image>/Filters/Re-Show Last", reshow);
g_free (repeat);
g_free (reshow);
gimp_menu_item_set_sensitive ("<Image>/Filters/Repeat Last",
sensitive);
gimp_menu_item_set_sensitive ("<Image>/Filters/Re-Show Last",
@ -1493,8 +1510,13 @@ plug_in_set_menu_sensitivity (GimpImageType type)
}
}
if (!last_plug_in)
if (! last_plug_in)
{
gimp_menu_item_set_label ("<Image>/Filters/Repeat Last",
_("Repeat Last"));
gimp_menu_item_set_label ("<Image>/Filters/Re-Show Last",
_("Re-Show Last"));
gimp_menu_item_set_sensitive ("<Image>/Filters/Repeat Last", FALSE);
gimp_menu_item_set_sensitive ("<Image>/Filters/Re-Show Last", FALSE);
}

View File

@ -662,7 +662,7 @@ nav_dialog_title (GimpDisplay *gdisp)
gchar *basename;
gchar *title;
basename = g_path_get_basename (gimp_image_filename (gdisp->gimage));
basename = g_path_get_basename (gimp_image_get_filename (gdisp->gimage));
title = g_strdup_printf (_("Navigation: %s-%d.%d"),
basename,

View File

@ -10,6 +10,7 @@ mmx_sources =
endif
libapppaint_funcs_a_SOURCES = @STRIP_BEGIN@ \
paint-funcs-types.h \
paint-funcs.c \
paint-funcs.h \
paint-funcs-generic.h \

View File

@ -0,0 +1,77 @@
/* 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.
*/
#ifndef __PAINT_FUNCS_TYPES_H__
#define __PAINT_FUNCS_TYPES_H__
#include "base/base-types.h"
/* Opacities */
#define TRANSPARENT_OPACITY 0
#define OPAQUE_OPACITY 255
/* Lay down the groundwork for layer construction...
* This includes background images for indexed or non-alpha
* images, floating selections, selective display of intensity
* channels, and display of arbitrary mask channels
*/
typedef enum /*< skip >*/
{
INITIAL_CHANNEL_MASK = 0,
INITIAL_CHANNEL_SELECTION,
INITIAL_INDEXED,
INITIAL_INDEXED_ALPHA,
INITIAL_INTENSITY,
INITIAL_INTENSITY_ALPHA,
} InitialMode;
/* Combine two source regions with the help of an optional mask
* region into a destination region. This is used for constructing
* layer projections, and for applying image patches to an image
*/
typedef enum /*< skip >*/
{
NO_COMBINATION = 0,
COMBINE_INDEXED_INDEXED,
COMBINE_INDEXED_INDEXED_A,
COMBINE_INDEXED_A_INDEXED_A,
COMBINE_INTEN_A_INDEXED_A,
COMBINE_INTEN_A_CHANNEL_MASK,
COMBINE_INTEN_A_CHANNEL_SELECTION,
COMBINE_INTEN_INTEN,
COMBINE_INTEN_INTEN_A,
COMBINE_INTEN_A_INTEN,
COMBINE_INTEN_A_INTEN_A,
/* Non-conventional combination modes */
BEHIND_INTEN,
BEHIND_INDEXED,
REPLACE_INTEN,
REPLACE_INDEXED,
ERASE_INTEN,
ERASE_INDEXED,
ANTI_ERASE_INTEN,
ANTI_ERASE_INDEXED,
COLOR_ERASE_INTEN,
} CombinationMode;
#endif /* __PAINT_FUNCS_TYPES_H__ */

View File

@ -27,7 +27,7 @@
#include "libgimpcolor/gimpcolor.h"
#include "libgimpmath/gimpmath.h"
#include "base/base-types.h"
#include "paint-funcs-types.h"
#include "base/base-config.h"
#include "base/pixel-processor.h"

View File

@ -341,54 +341,6 @@ void combine_mask_and_region (PixelRegion *, PixelRegion *, guint);
/* Copy a gray image to an intensity-alpha region */
void copy_gray_to_region (PixelRegion *, PixelRegion *);
/* Lay down the groundwork for layer construction...
* This includes background images for indexed or non-alpha
* images, floating selections, selective display of intensity
* channels, and display of arbitrary mask channels
*/
typedef enum /*< skip >*/
{
INITIAL_CHANNEL_MASK = 0,
INITIAL_CHANNEL_SELECTION,
INITIAL_INDEXED,
INITIAL_INDEXED_ALPHA,
INITIAL_INTENSITY,
INITIAL_INTENSITY_ALPHA,
} InitialMode;
/* Combine two source regions with the help of an optional mask
* region into a destination region. This is used for constructing
* layer projections, and for applying image patches to an image
*/
typedef enum /*< skip >*/
{
NO_COMBINATION = 0,
COMBINE_INDEXED_INDEXED,
COMBINE_INDEXED_INDEXED_A,
COMBINE_INDEXED_A_INDEXED_A,
COMBINE_INTEN_A_INDEXED_A,
COMBINE_INTEN_A_CHANNEL_MASK,
COMBINE_INTEN_A_CHANNEL_SELECTION,
COMBINE_INTEN_INTEN,
COMBINE_INTEN_INTEN_A,
COMBINE_INTEN_A_INTEN,
COMBINE_INTEN_A_INTEN_A,
/* Non-conventional combination modes */
BEHIND_INTEN,
BEHIND_INDEXED,
REPLACE_INTEN,
REPLACE_INDEXED,
ERASE_INTEN,
ERASE_INDEXED,
ANTI_ERASE_INTEN,
ANTI_ERASE_INDEXED,
COLOR_ERASE_INTEN,
} CombinationMode;
/* Opacities */
#define TRANSPARENT_OPACITY 0
#define OPAQUE_OPACITY 255
void initial_region (PixelRegion *, PixelRegion *,
PixelRegion *, guchar *,

View File

@ -26,7 +26,7 @@
#include "libgimpmath/gimpmath.h"
#include "display/display-types.h"
#include "tools/tools-types.h"
#include "core/gimpimage.h"

View File

@ -29,6 +29,7 @@
#include "procedural_db.h"
#include "core/core-types.h"
#include "core/gimpimage-guides.h"
#include "core/gimpimage.h"
#include "undo.h"

View File

@ -37,6 +37,9 @@
#include "core/gimpdrawable.h"
#include "core/gimpimage-crop.h"
#include "core/gimpimage-duplicate.h"
#include "core/gimpimage-merge.h"
#include "core/gimpimage-resize.h"
#include "core/gimpimage-scale.h"
#include "core/gimpimage.h"
#include "core/gimplayer.h"
#include "core/gimplayermask.h"
@ -49,13 +52,15 @@
static ProcRecord image_list_proc;
static ProcRecord image_new_proc;
static ProcRecord image_delete_proc;
static ProcRecord image_base_type_proc;
static ProcRecord image_resize_proc;
static ProcRecord image_scale_proc;
static ProcRecord image_crop_proc;
static ProcRecord image_delete_proc;
static ProcRecord image_free_shadow_proc;
static ProcRecord image_get_layers_proc;
static ProcRecord image_get_channels_proc;
static ProcRecord image_active_drawable_proc;
static ProcRecord image_unset_active_channel_proc;
static ProcRecord image_pick_correlate_layer_proc;
static ProcRecord image_raise_layer_proc;
@ -73,8 +78,6 @@ static ProcRecord image_raise_channel_proc;
static ProcRecord image_lower_channel_proc;
static ProcRecord image_add_channel_proc;
static ProcRecord image_remove_channel_proc;
static ProcRecord image_active_drawable_proc;
static ProcRecord image_base_type_proc;
static ProcRecord image_get_cmap_proc;
static ProcRecord image_set_cmap_proc;
static ProcRecord image_undo_is_enabled_proc;
@ -114,13 +117,15 @@ register_image_procs (Gimp *gimp)
{
procedural_db_register (gimp, &image_list_proc);
procedural_db_register (gimp, &image_new_proc);
procedural_db_register (gimp, &image_delete_proc);
procedural_db_register (gimp, &image_base_type_proc);
procedural_db_register (gimp, &image_resize_proc);
procedural_db_register (gimp, &image_scale_proc);
procedural_db_register (gimp, &image_crop_proc);
procedural_db_register (gimp, &image_delete_proc);
procedural_db_register (gimp, &image_free_shadow_proc);
procedural_db_register (gimp, &image_get_layers_proc);
procedural_db_register (gimp, &image_get_channels_proc);
procedural_db_register (gimp, &image_active_drawable_proc);
procedural_db_register (gimp, &image_unset_active_channel_proc);
procedural_db_register (gimp, &image_pick_correlate_layer_proc);
procedural_db_register (gimp, &image_raise_layer_proc);
@ -138,8 +143,6 @@ register_image_procs (Gimp *gimp)
procedural_db_register (gimp, &image_lower_channel_proc);
procedural_db_register (gimp, &image_add_channel_proc);
procedural_db_register (gimp, &image_remove_channel_proc);
procedural_db_register (gimp, &image_active_drawable_proc);
procedural_db_register (gimp, &image_base_type_proc);
procedural_db_register (gimp, &image_get_cmap_proc);
procedural_db_register (gimp, &image_set_cmap_proc);
procedural_db_register (gimp, &image_undo_is_enabled_proc);
@ -321,6 +324,112 @@ static ProcRecord image_new_proc =
{ { image_new_invoker } }
};
static Argument *
image_delete_invoker (Gimp *gimp,
Argument *args)
{
gboolean success = TRUE;
GimpImage *gimage;
gimage = gimp_image_get_by_ID (gimp, args[0].value.pdb_int);
if (gimage == NULL)
success = FALSE;
if (success)
{
if (gimage->disp_count == 0)
{
g_object_unref (G_OBJECT (gimage));
success = TRUE;
}
}
return procedural_db_return_args (&image_delete_proc, success);
}
static ProcArg image_delete_inargs[] =
{
{
GIMP_PDB_IMAGE,
"image",
"The image"
}
};
static ProcRecord image_delete_proc =
{
"gimp_image_delete",
"Delete the specified image.",
"If there are no displays associated with this image it will be deleted. This means that you can not delete an image through the PDB that was created by the user. If the associated display was however created through the PDB and you know the display ID, you may delete the display. Removal of the last associated display will then delete the image.",
"Spencer Kimball & Peter Mattis",
"Spencer Kimball & Peter Mattis",
"1995-1996",
GIMP_INTERNAL,
1,
image_delete_inargs,
0,
NULL,
{ { image_delete_invoker } }
};
static Argument *
image_base_type_invoker (Gimp *gimp,
Argument *args)
{
gboolean success = TRUE;
Argument *return_args;
GimpImage *gimage;
gint32 base_type = 0;
gimage = gimp_image_get_by_ID (gimp, args[0].value.pdb_int);
if (gimage == NULL)
success = FALSE;
if (success)
base_type = gimp_image_base_type (gimage);
return_args = procedural_db_return_args (&image_base_type_proc, success);
if (success)
return_args[1].value.pdb_int = base_type;
return return_args;
}
static ProcArg image_base_type_inargs[] =
{
{
GIMP_PDB_IMAGE,
"image",
"The image"
}
};
static ProcArg image_base_type_outargs[] =
{
{
GIMP_PDB_INT32,
"base_type",
"The image's base type: { RGB (0), GRAY (1), INDEXED (2) }"
}
};
static ProcRecord image_base_type_proc =
{
"gimp_image_base_type",
"Get the base type of the image.",
"This procedure returns the image's base type. Layers in the image must be of this subtype, but can have an optional alpha channel.",
"Spencer Kimball & Peter Mattis",
"Spencer Kimball & Peter Mattis",
"1995-1996",
GIMP_INTERNAL,
1,
image_base_type_inargs,
1,
image_base_type_outargs,
{ { image_base_type_invoker } }
};
static Argument *
image_resize_invoker (Gimp *gimp,
Argument *args)
@ -555,54 +664,6 @@ static ProcRecord image_crop_proc =
{ { image_crop_invoker } }
};
static Argument *
image_delete_invoker (Gimp *gimp,
Argument *args)
{
gboolean success = TRUE;
GimpImage *gimage;
gimage = gimp_image_get_by_ID (gimp, args[0].value.pdb_int);
if (gimage == NULL)
success = FALSE;
if (success)
{
if (gimage->disp_count == 0)
{
g_object_unref (G_OBJECT (gimage));
success = TRUE;
}
}
return procedural_db_return_args (&image_delete_proc, success);
}
static ProcArg image_delete_inargs[] =
{
{
GIMP_PDB_IMAGE,
"image",
"The image"
}
};
static ProcRecord image_delete_proc =
{
"gimp_image_delete",
"Delete the specified image.",
"If there are no displays associated with this image it will be deleted. This means that you can not delete an image through the PDB that was created by the user. If the associated display was however created through the PDB and you know the display ID, you may delete the display. Removal of the last associated display will then delete the image.",
"Spencer Kimball & Peter Mattis",
"Spencer Kimball & Peter Mattis",
"1995-1996",
GIMP_INTERNAL,
1,
image_delete_inargs,
0,
NULL,
{ { image_delete_invoker } }
};
static Argument *
image_free_shadow_invoker (Gimp *gimp,
Argument *args)
@ -803,6 +864,64 @@ static ProcRecord image_get_channels_proc =
{ { image_get_channels_invoker } }
};
static Argument *
image_active_drawable_invoker (Gimp *gimp,
Argument *args)
{
gboolean success = TRUE;
Argument *return_args;
GimpImage *gimage;
GimpDrawable *drawable = NULL;
gimage = gimp_image_get_by_ID (gimp, args[0].value.pdb_int);
if (gimage == NULL)
success = FALSE;
if (success)
success = (drawable = gimp_image_active_drawable (gimage)) != NULL;
return_args = procedural_db_return_args (&image_active_drawable_proc, success);
if (success)
return_args[1].value.pdb_int = gimp_drawable_get_ID (GIMP_DRAWABLE (drawable));
return return_args;
}
static ProcArg image_active_drawable_inargs[] =
{
{
GIMP_PDB_IMAGE,
"image",
"The image"
}
};
static ProcArg image_active_drawable_outargs[] =
{
{
GIMP_PDB_DRAWABLE,
"drawable",
"The active drawable"
}
};
static ProcRecord image_active_drawable_proc =
{
"gimp_image_active_drawable",
"Get the image's active drawable",
"This procedure returns the ID of the image's active drawable. This can be either a layer, a channel, or a layer mask. The active drawable is specified by the active image channel. If that is -1, then by the active image layer. If the active image layer has a layer mask and the layer mask is in edit mode, then the layer mask is the active drawable.",
"Spencer Kimball & Peter Mattis",
"Spencer Kimball & Peter Mattis",
"1995-1996",
GIMP_INTERNAL,
1,
image_active_drawable_inargs,
1,
image_active_drawable_outargs,
{ { image_active_drawable_invoker } }
};
static Argument *
image_unset_active_channel_invoker (Gimp *gimp,
Argument *args)
@ -1796,122 +1915,6 @@ static ProcRecord image_remove_channel_proc =
{ { image_remove_channel_invoker } }
};
static Argument *
image_active_drawable_invoker (Gimp *gimp,
Argument *args)
{
gboolean success = TRUE;
Argument *return_args;
GimpImage *gimage;
GimpDrawable *drawable = NULL;
gimage = gimp_image_get_by_ID (gimp, args[0].value.pdb_int);
if (gimage == NULL)
success = FALSE;
if (success)
success = (drawable = gimp_image_active_drawable (gimage)) != NULL;
return_args = procedural_db_return_args (&image_active_drawable_proc, success);
if (success)
return_args[1].value.pdb_int = gimp_drawable_get_ID (GIMP_DRAWABLE (drawable));
return return_args;
}
static ProcArg image_active_drawable_inargs[] =
{
{
GIMP_PDB_IMAGE,
"image",
"The image"
}
};
static ProcArg image_active_drawable_outargs[] =
{
{
GIMP_PDB_DRAWABLE,
"drawable",
"The active drawable"
}
};
static ProcRecord image_active_drawable_proc =
{
"gimp_image_active_drawable",
"Get the image's active drawable",
"This procedure returns the ID of the image's active drawable. This can be either a layer, a channel, or a layer mask. The active drawable is specified by the active image channel. If that is -1, then by the active image layer. If the active image layer has a layer mask and the layer mask is in edit mode, then the layer mask is the active drawable.",
"Spencer Kimball & Peter Mattis",
"Spencer Kimball & Peter Mattis",
"1995-1996",
GIMP_INTERNAL,
1,
image_active_drawable_inargs,
1,
image_active_drawable_outargs,
{ { image_active_drawable_invoker } }
};
static Argument *
image_base_type_invoker (Gimp *gimp,
Argument *args)
{
gboolean success = TRUE;
Argument *return_args;
GimpImage *gimage;
gint32 base_type = 0;
gimage = gimp_image_get_by_ID (gimp, args[0].value.pdb_int);
if (gimage == NULL)
success = FALSE;
if (success)
base_type = gimp_image_base_type (gimage);
return_args = procedural_db_return_args (&image_base_type_proc, success);
if (success)
return_args[1].value.pdb_int = base_type;
return return_args;
}
static ProcArg image_base_type_inargs[] =
{
{
GIMP_PDB_IMAGE,
"image",
"The image"
}
};
static ProcArg image_base_type_outargs[] =
{
{
GIMP_PDB_INT32,
"base_type",
"The image's base type: { RGB (0), GRAY (1), INDEXED (2) }"
}
};
static ProcRecord image_base_type_proc =
{
"gimp_image_base_type",
"Get the base type of the image.",
"This procedure returns the image's base type. Layers in the image must be of this subtype, but can have an optional alpha channel.",
"Spencer Kimball & Peter Mattis",
"Spencer Kimball & Peter Mattis",
"1995-1996",
GIMP_INTERNAL,
1,
image_base_type_inargs,
1,
image_base_type_outargs,
{ { image_base_type_invoker } }
};
static Argument *
image_get_cmap_invoker (Gimp *gimp,
Argument *args)
@ -1930,7 +1933,7 @@ image_get_cmap_invoker (Gimp *gimp,
{
num_bytes = gimage->num_cols * 3;
cmap = g_new (guint8, num_bytes);
memcpy (cmap, gimp_image_cmap (gimage), num_bytes);
memcpy (cmap, gimp_image_get_colormap (gimage), num_bytes);
}
return_args = procedural_db_return_args (&image_get_cmap_proc, success);
@ -2012,8 +2015,7 @@ image_set_cmap_invoker (Gimp *gimp,
gimage->num_cols = num_bytes / 3;
/* A colormap alteration affects the whole image */
gimp_image_update (gimage, 0, 0, gimage->width, gimage->height);
gimp_image_colormap_changed (gimage, -1);
}
return procedural_db_return_args (&image_set_cmap_proc, success);
@ -3499,7 +3501,7 @@ image_get_filename_invoker (Gimp *gimp,
return_args = procedural_db_return_args (&image_get_filename_proc, success);
if (success)
return_args[1].value.pdb_pointer = g_strdup (gimp_image_filename (gimage));
return_args[1].value.pdb_pointer = g_strdup (gimp_image_get_filename (gimage));
return return_args;
}

View File

@ -1485,6 +1485,23 @@ plug_in_set_menu_sensitivity (GimpImageType type)
if (last_plug_in && (last_plug_in == &(proc_def->db_info)))
{
gchar *basename;
gchar *repeat;
gchar *reshow;
basename = g_path_get_basename (proc_def->menu_path);
repeat = g_strdup_printf (_("Repeat \"%s\""), basename);
reshow = g_strdup_printf (_("Re-show \"%s\""), basename);
g_free (basename);
gimp_menu_item_set_label ("<Image>/Filters/Repeat Last", repeat);
gimp_menu_item_set_label ("<Image>/Filters/Re-Show Last", reshow);
g_free (repeat);
g_free (reshow);
gimp_menu_item_set_sensitive ("<Image>/Filters/Repeat Last",
sensitive);
gimp_menu_item_set_sensitive ("<Image>/Filters/Re-Show Last",
@ -1493,8 +1510,13 @@ plug_in_set_menu_sensitivity (GimpImageType type)
}
}
if (!last_plug_in)
if (! last_plug_in)
{
gimp_menu_item_set_label ("<Image>/Filters/Repeat Last",
_("Repeat Last"));
gimp_menu_item_set_label ("<Image>/Filters/Re-Show Last",
_("Re-Show Last"));
gimp_menu_item_set_sensitive ("<Image>/Filters/Repeat Last", FALSE);
gimp_menu_item_set_sensitive ("<Image>/Filters/Re-Show Last", FALSE);
}

View File

@ -1485,6 +1485,23 @@ plug_in_set_menu_sensitivity (GimpImageType type)
if (last_plug_in && (last_plug_in == &(proc_def->db_info)))
{
gchar *basename;
gchar *repeat;
gchar *reshow;
basename = g_path_get_basename (proc_def->menu_path);
repeat = g_strdup_printf (_("Repeat \"%s\""), basename);
reshow = g_strdup_printf (_("Re-show \"%s\""), basename);
g_free (basename);
gimp_menu_item_set_label ("<Image>/Filters/Repeat Last", repeat);
gimp_menu_item_set_label ("<Image>/Filters/Re-Show Last", reshow);
g_free (repeat);
g_free (reshow);
gimp_menu_item_set_sensitive ("<Image>/Filters/Repeat Last",
sensitive);
gimp_menu_item_set_sensitive ("<Image>/Filters/Re-Show Last",
@ -1493,8 +1510,13 @@ plug_in_set_menu_sensitivity (GimpImageType type)
}
}
if (!last_plug_in)
if (! last_plug_in)
{
gimp_menu_item_set_label ("<Image>/Filters/Repeat Last",
_("Repeat Last"));
gimp_menu_item_set_label ("<Image>/Filters/Re-Show Last",
_("Re-Show Last"));
gimp_menu_item_set_sensitive ("<Image>/Filters/Repeat Last", FALSE);
gimp_menu_item_set_sensitive ("<Image>/Filters/Re-Show Last", FALSE);
}

View File

@ -1485,6 +1485,23 @@ plug_in_set_menu_sensitivity (GimpImageType type)
if (last_plug_in && (last_plug_in == &(proc_def->db_info)))
{
gchar *basename;
gchar *repeat;
gchar *reshow;
basename = g_path_get_basename (proc_def->menu_path);
repeat = g_strdup_printf (_("Repeat \"%s\""), basename);
reshow = g_strdup_printf (_("Re-show \"%s\""), basename);
g_free (basename);
gimp_menu_item_set_label ("<Image>/Filters/Repeat Last", repeat);
gimp_menu_item_set_label ("<Image>/Filters/Re-Show Last", reshow);
g_free (repeat);
g_free (reshow);
gimp_menu_item_set_sensitive ("<Image>/Filters/Repeat Last",
sensitive);
gimp_menu_item_set_sensitive ("<Image>/Filters/Re-Show Last",
@ -1493,8 +1510,13 @@ plug_in_set_menu_sensitivity (GimpImageType type)
}
}
if (!last_plug_in)
if (! last_plug_in)
{
gimp_menu_item_set_label ("<Image>/Filters/Repeat Last",
_("Repeat Last"));
gimp_menu_item_set_label ("<Image>/Filters/Re-Show Last",
_("Re-Show Last"));
gimp_menu_item_set_sensitive ("<Image>/Filters/Repeat Last", FALSE);
gimp_menu_item_set_sensitive ("<Image>/Filters/Re-Show Last", FALSE);
}

View File

@ -1485,6 +1485,23 @@ plug_in_set_menu_sensitivity (GimpImageType type)
if (last_plug_in && (last_plug_in == &(proc_def->db_info)))
{
gchar *basename;
gchar *repeat;
gchar *reshow;
basename = g_path_get_basename (proc_def->menu_path);
repeat = g_strdup_printf (_("Repeat \"%s\""), basename);
reshow = g_strdup_printf (_("Re-show \"%s\""), basename);
g_free (basename);
gimp_menu_item_set_label ("<Image>/Filters/Repeat Last", repeat);
gimp_menu_item_set_label ("<Image>/Filters/Re-Show Last", reshow);
g_free (repeat);
g_free (reshow);
gimp_menu_item_set_sensitive ("<Image>/Filters/Repeat Last",
sensitive);
gimp_menu_item_set_sensitive ("<Image>/Filters/Re-Show Last",
@ -1493,8 +1510,13 @@ plug_in_set_menu_sensitivity (GimpImageType type)
}
}
if (!last_plug_in)
if (! last_plug_in)
{
gimp_menu_item_set_label ("<Image>/Filters/Repeat Last",
_("Repeat Last"));
gimp_menu_item_set_label ("<Image>/Filters/Re-Show Last",
_("Re-Show Last"));
gimp_menu_item_set_sensitive ("<Image>/Filters/Repeat Last", FALSE);
gimp_menu_item_set_sensitive ("<Image>/Filters/Re-Show Last", FALSE);
}

View File

@ -1485,6 +1485,23 @@ plug_in_set_menu_sensitivity (GimpImageType type)
if (last_plug_in && (last_plug_in == &(proc_def->db_info)))
{
gchar *basename;
gchar *repeat;
gchar *reshow;
basename = g_path_get_basename (proc_def->menu_path);
repeat = g_strdup_printf (_("Repeat \"%s\""), basename);
reshow = g_strdup_printf (_("Re-show \"%s\""), basename);
g_free (basename);
gimp_menu_item_set_label ("<Image>/Filters/Repeat Last", repeat);
gimp_menu_item_set_label ("<Image>/Filters/Re-Show Last", reshow);
g_free (repeat);
g_free (reshow);
gimp_menu_item_set_sensitive ("<Image>/Filters/Repeat Last",
sensitive);
gimp_menu_item_set_sensitive ("<Image>/Filters/Re-Show Last",
@ -1493,8 +1510,13 @@ plug_in_set_menu_sensitivity (GimpImageType type)
}
}
if (!last_plug_in)
if (! last_plug_in)
{
gimp_menu_item_set_label ("<Image>/Filters/Repeat Last",
_("Repeat Last"));
gimp_menu_item_set_label ("<Image>/Filters/Re-Show Last",
_("Re-Show Last"));
gimp_menu_item_set_sensitive ("<Image>/Filters/Repeat Last", FALSE);
gimp_menu_item_set_sensitive ("<Image>/Filters/Re-Show Last", FALSE);
}

View File

@ -1485,6 +1485,23 @@ plug_in_set_menu_sensitivity (GimpImageType type)
if (last_plug_in && (last_plug_in == &(proc_def->db_info)))
{
gchar *basename;
gchar *repeat;
gchar *reshow;
basename = g_path_get_basename (proc_def->menu_path);
repeat = g_strdup_printf (_("Repeat \"%s\""), basename);
reshow = g_strdup_printf (_("Re-show \"%s\""), basename);
g_free (basename);
gimp_menu_item_set_label ("<Image>/Filters/Repeat Last", repeat);
gimp_menu_item_set_label ("<Image>/Filters/Re-Show Last", reshow);
g_free (repeat);
g_free (reshow);
gimp_menu_item_set_sensitive ("<Image>/Filters/Repeat Last",
sensitive);
gimp_menu_item_set_sensitive ("<Image>/Filters/Re-Show Last",
@ -1493,8 +1510,13 @@ plug_in_set_menu_sensitivity (GimpImageType type)
}
}
if (!last_plug_in)
if (! last_plug_in)
{
gimp_menu_item_set_label ("<Image>/Filters/Repeat Last",
_("Repeat Last"));
gimp_menu_item_set_label ("<Image>/Filters/Re-Show Last",
_("Re-Show Last"));
gimp_menu_item_set_sensitive ("<Image>/Filters/Repeat Last", FALSE);
gimp_menu_item_set_sensitive ("<Image>/Filters/Re-Show Last", FALSE);
}

View File

@ -1485,6 +1485,23 @@ plug_in_set_menu_sensitivity (GimpImageType type)
if (last_plug_in && (last_plug_in == &(proc_def->db_info)))
{
gchar *basename;
gchar *repeat;
gchar *reshow;
basename = g_path_get_basename (proc_def->menu_path);
repeat = g_strdup_printf (_("Repeat \"%s\""), basename);
reshow = g_strdup_printf (_("Re-show \"%s\""), basename);
g_free (basename);
gimp_menu_item_set_label ("<Image>/Filters/Repeat Last", repeat);
gimp_menu_item_set_label ("<Image>/Filters/Re-Show Last", reshow);
g_free (repeat);
g_free (reshow);
gimp_menu_item_set_sensitive ("<Image>/Filters/Repeat Last",
sensitive);
gimp_menu_item_set_sensitive ("<Image>/Filters/Re-Show Last",
@ -1493,8 +1510,13 @@ plug_in_set_menu_sensitivity (GimpImageType type)
}
}
if (!last_plug_in)
if (! last_plug_in)
{
gimp_menu_item_set_label ("<Image>/Filters/Repeat Last",
_("Repeat Last"));
gimp_menu_item_set_label ("<Image>/Filters/Re-Show Last",
_("Re-Show Last"));
gimp_menu_item_set_sensitive ("<Image>/Filters/Repeat Last", FALSE);
gimp_menu_item_set_sensitive ("<Image>/Filters/Re-Show Last", FALSE);
}

View File

@ -1485,6 +1485,23 @@ plug_in_set_menu_sensitivity (GimpImageType type)
if (last_plug_in && (last_plug_in == &(proc_def->db_info)))
{
gchar *basename;
gchar *repeat;
gchar *reshow;
basename = g_path_get_basename (proc_def->menu_path);
repeat = g_strdup_printf (_("Repeat \"%s\""), basename);
reshow = g_strdup_printf (_("Re-show \"%s\""), basename);
g_free (basename);
gimp_menu_item_set_label ("<Image>/Filters/Repeat Last", repeat);
gimp_menu_item_set_label ("<Image>/Filters/Re-Show Last", reshow);
g_free (repeat);
g_free (reshow);
gimp_menu_item_set_sensitive ("<Image>/Filters/Repeat Last",
sensitive);
gimp_menu_item_set_sensitive ("<Image>/Filters/Re-Show Last",
@ -1493,8 +1510,13 @@ plug_in_set_menu_sensitivity (GimpImageType type)
}
}
if (!last_plug_in)
if (! last_plug_in)
{
gimp_menu_item_set_label ("<Image>/Filters/Repeat Last",
_("Repeat Last"));
gimp_menu_item_set_label ("<Image>/Filters/Re-Show Last",
_("Re-Show Last"));
gimp_menu_item_set_sensitive ("<Image>/Filters/Repeat Last", FALSE);
gimp_menu_item_set_sensitive ("<Image>/Filters/Re-Show Last", FALSE);
}

View File

@ -1485,6 +1485,23 @@ plug_in_set_menu_sensitivity (GimpImageType type)
if (last_plug_in && (last_plug_in == &(proc_def->db_info)))
{
gchar *basename;
gchar *repeat;
gchar *reshow;
basename = g_path_get_basename (proc_def->menu_path);
repeat = g_strdup_printf (_("Repeat \"%s\""), basename);
reshow = g_strdup_printf (_("Re-show \"%s\""), basename);
g_free (basename);
gimp_menu_item_set_label ("<Image>/Filters/Repeat Last", repeat);
gimp_menu_item_set_label ("<Image>/Filters/Re-Show Last", reshow);
g_free (repeat);
g_free (reshow);
gimp_menu_item_set_sensitive ("<Image>/Filters/Repeat Last",
sensitive);
gimp_menu_item_set_sensitive ("<Image>/Filters/Re-Show Last",
@ -1493,8 +1510,13 @@ plug_in_set_menu_sensitivity (GimpImageType type)
}
}
if (!last_plug_in)
if (! last_plug_in)
{
gimp_menu_item_set_label ("<Image>/Filters/Repeat Last",
_("Repeat Last"));
gimp_menu_item_set_label ("<Image>/Filters/Re-Show Last",
_("Re-Show Last"));
gimp_menu_item_set_sensitive ("<Image>/Filters/Repeat Last", FALSE);
gimp_menu_item_set_sensitive ("<Image>/Filters/Re-Show Last", FALSE);
}

View File

@ -1485,6 +1485,23 @@ plug_in_set_menu_sensitivity (GimpImageType type)
if (last_plug_in && (last_plug_in == &(proc_def->db_info)))
{
gchar *basename;
gchar *repeat;
gchar *reshow;
basename = g_path_get_basename (proc_def->menu_path);
repeat = g_strdup_printf (_("Repeat \"%s\""), basename);
reshow = g_strdup_printf (_("Re-show \"%s\""), basename);
g_free (basename);
gimp_menu_item_set_label ("<Image>/Filters/Repeat Last", repeat);
gimp_menu_item_set_label ("<Image>/Filters/Re-Show Last", reshow);
g_free (repeat);
g_free (reshow);
gimp_menu_item_set_sensitive ("<Image>/Filters/Repeat Last",
sensitive);
gimp_menu_item_set_sensitive ("<Image>/Filters/Re-Show Last",
@ -1493,8 +1510,13 @@ plug_in_set_menu_sensitivity (GimpImageType type)
}
}
if (!last_plug_in)
if (! last_plug_in)
{
gimp_menu_item_set_label ("<Image>/Filters/Repeat Last",
_("Repeat Last"));
gimp_menu_item_set_label ("<Image>/Filters/Re-Show Last",
_("Re-Show Last"));
gimp_menu_item_set_sensitive ("<Image>/Filters/Repeat Last", FALSE);
gimp_menu_item_set_sensitive ("<Image>/Filters/Re-Show Last", FALSE);
}

View File

@ -1485,6 +1485,23 @@ plug_in_set_menu_sensitivity (GimpImageType type)
if (last_plug_in && (last_plug_in == &(proc_def->db_info)))
{
gchar *basename;
gchar *repeat;
gchar *reshow;
basename = g_path_get_basename (proc_def->menu_path);
repeat = g_strdup_printf (_("Repeat \"%s\""), basename);
reshow = g_strdup_printf (_("Re-show \"%s\""), basename);
g_free (basename);
gimp_menu_item_set_label ("<Image>/Filters/Repeat Last", repeat);
gimp_menu_item_set_label ("<Image>/Filters/Re-Show Last", reshow);
g_free (repeat);
g_free (reshow);
gimp_menu_item_set_sensitive ("<Image>/Filters/Repeat Last",
sensitive);
gimp_menu_item_set_sensitive ("<Image>/Filters/Re-Show Last",
@ -1493,8 +1510,13 @@ plug_in_set_menu_sensitivity (GimpImageType type)
}
}
if (!last_plug_in)
if (! last_plug_in)
{
gimp_menu_item_set_label ("<Image>/Filters/Repeat Last",
_("Repeat Last"));
gimp_menu_item_set_label ("<Image>/Filters/Re-Show Last",
_("Re-Show Last"));
gimp_menu_item_set_sensitive ("<Image>/Filters/Repeat Last", FALSE);
gimp_menu_item_set_sensitive ("<Image>/Filters/Re-Show Last", FALSE);
}

View File

@ -1485,6 +1485,23 @@ plug_in_set_menu_sensitivity (GimpImageType type)
if (last_plug_in && (last_plug_in == &(proc_def->db_info)))
{
gchar *basename;
gchar *repeat;
gchar *reshow;
basename = g_path_get_basename (proc_def->menu_path);
repeat = g_strdup_printf (_("Repeat \"%s\""), basename);
reshow = g_strdup_printf (_("Re-show \"%s\""), basename);
g_free (basename);
gimp_menu_item_set_label ("<Image>/Filters/Repeat Last", repeat);
gimp_menu_item_set_label ("<Image>/Filters/Re-Show Last", reshow);
g_free (repeat);
g_free (reshow);
gimp_menu_item_set_sensitive ("<Image>/Filters/Repeat Last",
sensitive);
gimp_menu_item_set_sensitive ("<Image>/Filters/Re-Show Last",
@ -1493,8 +1510,13 @@ plug_in_set_menu_sensitivity (GimpImageType type)
}
}
if (!last_plug_in)
if (! last_plug_in)
{
gimp_menu_item_set_label ("<Image>/Filters/Repeat Last",
_("Repeat Last"));
gimp_menu_item_set_label ("<Image>/Filters/Re-Show Last",
_("Re-Show Last"));
gimp_menu_item_set_sensitive ("<Image>/Filters/Repeat Last", FALSE);
gimp_menu_item_set_sensitive ("<Image>/Filters/Re-Show Last", FALSE);
}

View File

@ -1485,6 +1485,23 @@ plug_in_set_menu_sensitivity (GimpImageType type)
if (last_plug_in && (last_plug_in == &(proc_def->db_info)))
{
gchar *basename;
gchar *repeat;
gchar *reshow;
basename = g_path_get_basename (proc_def->menu_path);
repeat = g_strdup_printf (_("Repeat \"%s\""), basename);
reshow = g_strdup_printf (_("Re-show \"%s\""), basename);
g_free (basename);
gimp_menu_item_set_label ("<Image>/Filters/Repeat Last", repeat);
gimp_menu_item_set_label ("<Image>/Filters/Re-Show Last", reshow);
g_free (repeat);
g_free (reshow);
gimp_menu_item_set_sensitive ("<Image>/Filters/Repeat Last",
sensitive);
gimp_menu_item_set_sensitive ("<Image>/Filters/Re-Show Last",
@ -1493,8 +1510,13 @@ plug_in_set_menu_sensitivity (GimpImageType type)
}
}
if (!last_plug_in)
if (! last_plug_in)
{
gimp_menu_item_set_label ("<Image>/Filters/Repeat Last",
_("Repeat Last"));
gimp_menu_item_set_label ("<Image>/Filters/Re-Show Last",
_("Re-Show Last"));
gimp_menu_item_set_sensitive ("<Image>/Filters/Repeat Last", FALSE);
gimp_menu_item_set_sensitive ("<Image>/Filters/Re-Show Last", FALSE);
}

View File

@ -1485,6 +1485,23 @@ plug_in_set_menu_sensitivity (GimpImageType type)
if (last_plug_in && (last_plug_in == &(proc_def->db_info)))
{
gchar *basename;
gchar *repeat;
gchar *reshow;
basename = g_path_get_basename (proc_def->menu_path);
repeat = g_strdup_printf (_("Repeat \"%s\""), basename);
reshow = g_strdup_printf (_("Re-show \"%s\""), basename);
g_free (basename);
gimp_menu_item_set_label ("<Image>/Filters/Repeat Last", repeat);
gimp_menu_item_set_label ("<Image>/Filters/Re-Show Last", reshow);
g_free (repeat);
g_free (reshow);
gimp_menu_item_set_sensitive ("<Image>/Filters/Repeat Last",
sensitive);
gimp_menu_item_set_sensitive ("<Image>/Filters/Re-Show Last",
@ -1493,8 +1510,13 @@ plug_in_set_menu_sensitivity (GimpImageType type)
}
}
if (!last_plug_in)
if (! last_plug_in)
{
gimp_menu_item_set_label ("<Image>/Filters/Repeat Last",
_("Repeat Last"));
gimp_menu_item_set_label ("<Image>/Filters/Re-Show Last",
_("Re-Show Last"));
gimp_menu_item_set_sensitive ("<Image>/Filters/Repeat Last", FALSE);
gimp_menu_item_set_sensitive ("<Image>/Filters/Re-Show Last", FALSE);
}

View File

@ -1485,6 +1485,23 @@ plug_in_set_menu_sensitivity (GimpImageType type)
if (last_plug_in && (last_plug_in == &(proc_def->db_info)))
{
gchar *basename;
gchar *repeat;
gchar *reshow;
basename = g_path_get_basename (proc_def->menu_path);
repeat = g_strdup_printf (_("Repeat \"%s\""), basename);
reshow = g_strdup_printf (_("Re-show \"%s\""), basename);
g_free (basename);
gimp_menu_item_set_label ("<Image>/Filters/Repeat Last", repeat);
gimp_menu_item_set_label ("<Image>/Filters/Re-Show Last", reshow);
g_free (repeat);
g_free (reshow);
gimp_menu_item_set_sensitive ("<Image>/Filters/Repeat Last",
sensitive);
gimp_menu_item_set_sensitive ("<Image>/Filters/Re-Show Last",
@ -1493,8 +1510,13 @@ plug_in_set_menu_sensitivity (GimpImageType type)
}
}
if (!last_plug_in)
if (! last_plug_in)
{
gimp_menu_item_set_label ("<Image>/Filters/Repeat Last",
_("Repeat Last"));
gimp_menu_item_set_label ("<Image>/Filters/Re-Show Last",
_("Re-Show Last"));
gimp_menu_item_set_sensitive ("<Image>/Filters/Repeat Last", FALSE);
gimp_menu_item_set_sensitive ("<Image>/Filters/Re-Show Last", FALSE);
}

View File

@ -1485,6 +1485,23 @@ plug_in_set_menu_sensitivity (GimpImageType type)
if (last_plug_in && (last_plug_in == &(proc_def->db_info)))
{
gchar *basename;
gchar *repeat;
gchar *reshow;
basename = g_path_get_basename (proc_def->menu_path);
repeat = g_strdup_printf (_("Repeat \"%s\""), basename);
reshow = g_strdup_printf (_("Re-show \"%s\""), basename);
g_free (basename);
gimp_menu_item_set_label ("<Image>/Filters/Repeat Last", repeat);
gimp_menu_item_set_label ("<Image>/Filters/Re-Show Last", reshow);
g_free (repeat);
g_free (reshow);
gimp_menu_item_set_sensitive ("<Image>/Filters/Repeat Last",
sensitive);
gimp_menu_item_set_sensitive ("<Image>/Filters/Re-Show Last",
@ -1493,8 +1510,13 @@ plug_in_set_menu_sensitivity (GimpImageType type)
}
}
if (!last_plug_in)
if (! last_plug_in)
{
gimp_menu_item_set_label ("<Image>/Filters/Repeat Last",
_("Repeat Last"));
gimp_menu_item_set_label ("<Image>/Filters/Re-Show Last",
_("Re-Show Last"));
gimp_menu_item_set_sensitive ("<Image>/Filters/Repeat Last", FALSE);
gimp_menu_item_set_sensitive ("<Image>/Filters/Re-Show Last", FALSE);
}

View File

@ -731,7 +731,7 @@ by_color_select_draw (ByColorDialog *bcd,
gtk_widget_draw (bcd->preview, NULL);
/* Update the gimage label to reflect the displayed gimage name */
basename = g_path_get_basename (gimp_image_filename (gimage));
basename = g_path_get_basename (gimp_image_get_filename (gimage));
gtk_label_set_text (GTK_LABEL (bcd->gimage_name), basename);

View File

@ -33,6 +33,7 @@
#include "core/gimpdrawable.h"
#include "core/gimpimage.h"
#include "core/gimpimage-guides.h"
#include "core/gimpimage-mask.h"
#include "core/gimplayer.h"
#include "core/gimplist.h"

View File

@ -33,6 +33,7 @@
#include "gui/gui-types.h"
#include "core/gimpimage.h"
#include "core/gimpimage-guides.h"
#include "core/gimptoolinfo.h"
#include "display/gimpdisplay.h"

View File

@ -27,6 +27,7 @@
#include "tools-types.h"
#include "core/gimpimage.h"
#include "core/gimpimage-guides.h"
#include "core/gimpimage-mask.h"
#include "core/gimplayer.h"
#include "core/gimptoolinfo.h"

View File

@ -20,9 +20,6 @@
#define __TOOLS_TYPES_H__
#include "core/core-types.h"
#include "widgets/widgets-types.h"
#include "display/display-types.h"

View File

@ -39,6 +39,7 @@
#include "core/gimpcontext.h"
#include "core/gimpcoreconfig.h"
#include "core/gimpimage.h"
#include "core/gimpimage-guides.h"
#include "core/gimpimage-mask.h"
#include "core/gimpimage-projection.h"
#include "core/gimplayer.h"

View File

@ -455,7 +455,7 @@ undo_history_gimage_rename_callback (GimpImage *gimage,
gchar *basename;
gchar *title;
basename = g_path_get_basename (gimp_image_filename (gimage));
basename = g_path_get_basename (gimp_image_get_filename (gimage));
title = g_strdup_printf (_("Undo History: %s"), basename);
@ -806,7 +806,7 @@ undo_history_new (GimpImage *gimage)
gchar *basename;
gchar *title;
basename = g_path_get_basename (gimp_image_filename (gimage));
basename = g_path_get_basename (gimp_image_get_filename (gimage));
title = g_strdup_printf (_("Undo History: %s"), basename);

View File

@ -137,9 +137,8 @@ gimp_brush_factory_view_destroy (GtkObject *object)
if (view->spacing_changed_handler_id)
{
gimp_container_remove_handler
(GIMP_CONTAINER_EDITOR (view)->view->container,
view->spacing_changed_handler_id);
gimp_container_remove_handler (GIMP_CONTAINER_EDITOR (view)->view->container,
view->spacing_changed_handler_id);
view->spacing_changed_handler_id = 0;
}
@ -187,10 +186,10 @@ gimp_brush_factory_view_new (GimpViewType view_type,
editor = GIMP_CONTAINER_EDITOR (factory_view);
gimp_container_add_handler
(editor->view->container, "spacing_changed",
G_CALLBACK (gimp_brush_factory_view_spacing_changed),
factory_view);
factory_view->spacing_changed_handler_id =
gimp_container_add_handler (editor->view->container, "spacing_changed",
G_CALLBACK (gimp_brush_factory_view_spacing_changed),
factory_view);
return GTK_WIDGET (factory_view);
}

View File

@ -214,7 +214,7 @@ gimp_container_view_image_name_func (GtkWidget *widget,
gchar *basename;
gchar *retval;
basename = g_path_get_basename (gimp_image_filename (gimage));
basename = g_path_get_basename (gimp_image_get_filename (gimage));
retval = g_strdup_printf ("%s-%d",
basename,
@ -223,7 +223,7 @@ gimp_container_view_image_name_func (GtkWidget *widget,
g_free (basename);
if (tooltip)
*tooltip = g_strdup (gimp_image_filename (gimage));
*tooltip = g_strdup (gimp_image_get_filename (gimage));
return retval;
}

View File

@ -22,6 +22,8 @@
#include "libgimpwidgets/gimpwidgetstypes.h"
#include "core/core-types.h"
#include "display/display-types.h"

View File

@ -38,6 +38,7 @@
#include "core/gimpcoreconfig.h"
#include "core/gimpdrawable.h"
#include "core/gimpimage.h"
#include "core/gimpimage-guides.h"
#include "core/gimplayer.h"
#include "core/gimplayermask.h"
#include "core/gimpparasitelist.h"

View File

@ -103,6 +103,71 @@ gimp_image_new (gint width,
return image_ID;
}
/**
* gimp_image_delete:
* @image_ID: The image.
*
* Delete the specified image.
*
* If there are no displays associated with this image it will be
* deleted. This means that you can not delete an image through the PDB
* that was created by the user. If the associated display was however
* created through the PDB and you know the display ID, you may delete
* the display. Removal of the last associated display will then delete
* the image.
*
* Returns: TRUE on success.
*/
gboolean
gimp_image_delete (gint32 image_ID)
{
GimpParam *return_vals;
gint nreturn_vals;
gboolean success = TRUE;
return_vals = gimp_run_procedure ("gimp_image_delete",
&nreturn_vals,
GIMP_PDB_IMAGE, image_ID,
GIMP_PDB_END);
success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;
gimp_destroy_params (return_vals, nreturn_vals);
return success;
}
/**
* gimp_image_base_type:
* @image_ID: The image.
*
* Get the base type of the image.
*
* This procedure returns the image's base type. Layers in the image
* must be of this subtype, but can have an optional alpha channel.
*
* Returns: The image's base type.
*/
GimpImageBaseType
gimp_image_base_type (gint32 image_ID)
{
GimpParam *return_vals;
gint nreturn_vals;
GimpImageBaseType base_type = 0;
return_vals = gimp_run_procedure ("gimp_image_base_type",
&nreturn_vals,
GIMP_PDB_IMAGE, image_ID,
GIMP_PDB_END);
if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS)
base_type = return_vals[1].data.d_int32;
gimp_destroy_params (return_vals, nreturn_vals);
return base_type;
}
/**
* gimp_image_resize:
* @image_ID: The image.
@ -239,40 +304,6 @@ gimp_image_crop (gint32 image_ID,
return success;
}
/**
* gimp_image_delete:
* @image_ID: The image.
*
* Delete the specified image.
*
* If there are no displays associated with this image it will be
* deleted. This means that you can not delete an image through the PDB
* that was created by the user. If the associated display was however
* created through the PDB and you know the display ID, you may delete
* the display. Removal of the last associated display will then delete
* the image.
*
* Returns: TRUE on success.
*/
gboolean
gimp_image_delete (gint32 image_ID)
{
GimpParam *return_vals;
gint nreturn_vals;
gboolean success = TRUE;
return_vals = gimp_run_procedure ("gimp_image_delete",
&nreturn_vals,
GIMP_PDB_IMAGE, image_ID,
GIMP_PDB_END);
success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;
gimp_destroy_params (return_vals, nreturn_vals);
return success;
}
/**
* gimp_image_free_shadow:
* @image_ID: The image.
@ -385,6 +416,41 @@ gimp_image_get_channels (gint32 image_ID,
return channel_ids;
}
/**
* gimp_image_active_drawable:
* @image_ID: The image.
*
* Get the image's active drawable
*
* This procedure returns the ID of the image's active drawable. This
* can be either a layer, a channel, or a layer mask. The active
* drawable is specified by the active image channel. If that is -1,
* then by the active image layer. If the active image layer has a
* layer mask and the layer mask is in edit mode, then the layer mask
* is the active drawable.
*
* Returns: The active drawable.
*/
gint32
gimp_image_active_drawable (gint32 image_ID)
{
GimpParam *return_vals;
gint nreturn_vals;
gint32 drawable_ID = -1;
return_vals = gimp_run_procedure ("gimp_image_active_drawable",
&nreturn_vals,
GIMP_PDB_IMAGE, image_ID,
GIMP_PDB_END);
if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS)
drawable_ID = return_vals[1].data.d_drawable;
gimp_destroy_params (return_vals, nreturn_vals);
return drawable_ID;
}
/**
* gimp_image_unset_active_channel:
* @image_ID: The image.
@ -996,72 +1062,6 @@ gimp_image_remove_channel (gint32 image_ID,
return success;
}
/**
* gimp_image_active_drawable:
* @image_ID: The image.
*
* Get the image's active drawable
*
* This procedure returns the ID of the image's active drawable. This
* can be either a layer, a channel, or a layer mask. The active
* drawable is specified by the active image channel. If that is -1,
* then by the active image layer. If the active image layer has a
* layer mask and the layer mask is in edit mode, then the layer mask
* is the active drawable.
*
* Returns: The active drawable.
*/
gint32
gimp_image_active_drawable (gint32 image_ID)
{
GimpParam *return_vals;
gint nreturn_vals;
gint32 drawable_ID = -1;
return_vals = gimp_run_procedure ("gimp_image_active_drawable",
&nreturn_vals,
GIMP_PDB_IMAGE, image_ID,
GIMP_PDB_END);
if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS)
drawable_ID = return_vals[1].data.d_drawable;
gimp_destroy_params (return_vals, nreturn_vals);
return drawable_ID;
}
/**
* gimp_image_base_type:
* @image_ID: The image.
*
* Get the base type of the image.
*
* This procedure returns the image's base type. Layers in the image
* must be of this subtype, but can have an optional alpha channel.
*
* Returns: The image's base type.
*/
GimpImageBaseType
gimp_image_base_type (gint32 image_ID)
{
GimpParam *return_vals;
gint nreturn_vals;
GimpImageBaseType base_type = 0;
return_vals = gimp_run_procedure ("gimp_image_base_type",
&nreturn_vals,
GIMP_PDB_IMAGE, image_ID,
GIMP_PDB_END);
if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS)
base_type = return_vals[1].data.d_int32;
gimp_destroy_params (return_vals, nreturn_vals);
return base_type;
}
/**
* _gimp_image_get_cmap:
* @image_ID: The image.

View File

@ -33,6 +33,8 @@ gint* gimp_image_list (gint *num_i
gint32 gimp_image_new (gint width,
gint height,
GimpImageBaseType type);
gboolean gimp_image_delete (gint32 image_ID);
GimpImageBaseType gimp_image_base_type (gint32 image_ID);
gboolean gimp_image_resize (gint32 image_ID,
gint new_width,
gint new_height,
@ -46,12 +48,12 @@ gboolean gimp_image_crop (gint32 image
gint new_height,
gint offx,
gint offy);
gboolean gimp_image_delete (gint32 image_ID);
gboolean gimp_image_free_shadow (gint32 image_ID);
gint* gimp_image_get_layers (gint32 image_ID,
gint *num_layers);
gint* gimp_image_get_channels (gint32 image_ID,
gint *num_channels);
gint32 gimp_image_active_drawable (gint32 image_ID);
gboolean gimp_image_unset_active_channel (gint32 image_ID);
gint32 gimp_image_pick_correlate_layer (gint32 image_ID,
gint x,
@ -90,8 +92,6 @@ gboolean gimp_image_add_channel (gint32 image
gint position);
gboolean gimp_image_remove_channel (gint32 image_ID,
gint32 channel_ID);
gint32 gimp_image_active_drawable (gint32 image_ID);
GimpImageBaseType gimp_image_base_type (gint32 image_ID);
guint8* _gimp_image_get_cmap (gint32 image_ID,
gint *num_bytes);
gboolean _gimp_image_set_cmap (gint32 image_ID,

View File

@ -292,6 +292,8 @@ CODE
);
}
@headers = qw("core/gimpimage-guides.h");
@procs = qw(image_add_hguide image_add_vguide image_delete_guide
image_find_next_guide image_get_guide_orientation
image_get_guide_position);

View File

@ -292,6 +292,7 @@ HELP
}
%invoke = (
headers => [ qw("core/gimpimage-resize.h") ],
code => <<'CODE'
{
gimp_image_resize (gimage, new_width, new_height, offx, offy);
@ -319,6 +320,7 @@ HELP
&new_dim_args;
%invoke = (
headers => [ qw("core/gimpimage-scale.h") ],
code => <<'CODE'
{
gimp_image_scale (gimage, new_width, new_height, NULL, NULL);
@ -519,6 +521,7 @@ HELP
);
%invoke = (
headers => [ qw("core/gimpimage-merge.h") ],
code => <<'CODE'
{
layer = gimp_image_merge_visible_layers (gimage, merge_type);
@ -557,6 +560,7 @@ HELP
);
%invoke = (
headers => [ qw("core/gimpimage-merge.h") ],
code => <<'CODE'
{
layer = gimp_image_merge_down (gimage, merge_layer, merge_type);
@ -587,6 +591,7 @@ HELP
);
%invoke = (
headers => [ qw("core/gimpimage-merge.h") ],
code => 'success = (layer = gimp_image_flatten (gimage)) != NULL;'
);
}
@ -825,7 +830,7 @@ HELP
{
num_bytes = gimage->num_cols * 3;
cmap = g_new (guint8, num_bytes);
memcpy (cmap, gimp_image_cmap (gimage), num_bytes);
memcpy (cmap, gimp_image_get_colormap (gimage), num_bytes);
}
CODE
);
@ -862,8 +867,7 @@ HELP
gimage->num_cols = num_bytes / 3;
/* A colormap alteration affects the whole image */
gimp_image_update (gimage, 0, 0, gimage->width, gimage->height);
gimp_image_colormap_changed (gimage, -1);
}
CODE
);
@ -1214,7 +1218,6 @@ CODE2
-- if it was loaded or has since been saved. Otherwise, returns NULL.
HELP
$outargs[0]->{alias} =~ s/get_//;
CODE
&image_accessors('resolution', 'float', 'resolution', 0,
@ -1515,18 +1518,22 @@ gimlist_cb (gpointer im,
}
CODE
unshift @procs, qw(image_list image_new image_resize image_scale image_crop
image_delete
image_free_shadow image_get_layers image_get_channels
image_unset_active_channel image_pick_correlate_layer
unshift @procs, qw(image_list image_new image_delete image_base_type
image_resize image_scale image_crop
image_free_shadow
image_get_layers image_get_channels
image_active_drawable image_unset_active_channel
image_pick_correlate_layer
image_raise_layer image_lower_layer image_raise_layer_to_top
image_lower_layer_to_bottom image_merge_visible_layers
image_merge_down image_flatten image_add_layer
image_remove_layer image_add_layer_mask
image_remove_layer_mask image_raise_channel
image_lower_channel image_add_channel image_remove_channel
image_active_drawable image_base_type image_get_cmap
image_set_cmap image_undo_is_enabled image_undo_enable
image_lower_layer_to_bottom
image_merge_visible_layers image_merge_down
image_flatten
image_add_layer image_remove_layer
image_add_layer_mask image_remove_layer_mask
image_raise_channel image_lower_channel
image_add_channel image_remove_channel
image_get_cmap image_set_cmap
image_undo_is_enabled image_undo_enable
image_undo_disable image_undo_freeze image_undo_thaw
image_clean_all image_floating_selection
image_floating_sel_attached_to image_thumbnail