2006-12-09 13:33:38 -08:00
|
|
|
/* GIMP - The GNU Image Manipulation Program
|
1997-11-24 14:05:25 -08:00
|
|
|
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
|
|
|
|
*
|
2009-01-17 14:28:01 -08:00
|
|
|
* This program is free software: you can redistribute it and/or modify
|
1997-11-24 14:05:25 -08:00
|
|
|
* it under the terms of the GNU General Public License as published by
|
2009-01-17 14:28:01 -08:00
|
|
|
* the Free Software Foundation; either version 3 of the License, or
|
1997-11-24 14:05:25 -08:00
|
|
|
* (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
|
2018-07-11 14:47:19 -07:00
|
|
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
1997-11-24 14:05:25 -08:00
|
|
|
*/
|
2000-12-16 13:37:03 -08:00
|
|
|
|
2001-01-28 08:44:22 -08:00
|
|
|
#ifndef __GIMP_LAYER_H__
|
|
|
|
|
#define __GIMP_LAYER_H__
|
1997-11-24 14:05:25 -08:00
|
|
|
|
|
|
|
|
|
2000-12-29 07:22:01 -08:00
|
|
|
#include "gimpdrawable.h"
|
1997-11-24 14:05:25 -08:00
|
|
|
|
|
|
|
|
|
2001-01-28 08:44:22 -08:00
|
|
|
#define GIMP_TYPE_LAYER (gimp_layer_get_type ())
|
Port to glib/gtk+ 2.0 episode I (every segfault has it's beginning)
2001-07-24 Michael Natterer <mitch@gimp.org>
Port to glib/gtk+ 2.0 episode I (every segfault has it's beginning)
* configure.in: require glib/gtk+ >= 1.3.7, commented out the
gtkxmhtml stuff.
From now on, you will need glib, pango, atk and gtk+ HEAD from CVS
to hack or use GIMP HEAD.
Beware, it crashes randomly :)
* app/core/Makefile.am
* app/core/gimpmarshal.list: new file plus rules to generate
gimpmarshal.[ch] from it.
* app/core/*
* app/tools/*
* app/widgets/*
* libgimpwidgets/*: started to use the glib object system. All
core/ objects are still gtk objects however. All signals are
created using g_signal_new(). There are many gtk+ artefacts left.
Finally, we will _not_ use the gtk_signal_foo() wrappers and
friends any more.
* app/colormaps.c
* app/devices.[ch]
* app/disp_callbacks.c
* app/errorconsole.c
* app/file-save.[ch]
* app/interface.c
* app/module_db.c
* app/nav_window.c
* app/ops_buttons.c
* app/scroll.c
* app/user_install.c
* app/gui/about-dialog.c
* app/gui/brush-editor.c
* app/gui/brushes-commands.c
* app/gui/color-notebook.c
* app/gui/colormap-dialog.c
* app/gui/dialogs-commands.c
* app/gui/dialogs-constructors.c
* app/gui/file-commands.c
* app/gui/file-dialog-utils.c
* app/gui/file-new-dialog.c
* app/gui/file-open-dialog.[ch]
* app/gui/file-save-dialog.c
* app/gui/gradient-editor.c
* app/gui/gradients-commands.c
* app/gui/image-commands.c
* app/gui/info-dialog.[ch]
* app/gui/layer-select.c
* app/gui/layers-commands.c
* app/gui/menus.c
* app/gui/offset-dialog.c
* app/gui/palette-editor.c
* app/gui/palettes-commands.c
* app/gui/patterns-commands.c
* app/gui/preferences-dialog.c
* app/gui/resize-dialog.[ch]
* app/gui/splash.c
* app/gui/tips-dialog.c
* app/gui/tool-options-dialog.c
* app/gui/toolbox.c
* app/gui/tools-commands.c
* libgimp/gimpbrushmenu.c
* libgimp/gimpmenu.c
* libgimp/gimppatternmenu.c
* libgimp/gimpui.c
* libgimpbase/gimpenv.c: tons and tons of changes like "const
gchar*", switch from GdkDeviceInfo to GdkDevice (very incomplete
and currently disables), lots of s/gtk_signal/g_signal/,
removal/replacement of deprecated stuff,
s/GtkSignalFunc/GCallback/ and lots of small changes and fixes
while I was on it, zillions of warnings left...
* modules/Makefile.am: disabled the water color selector
temporarily (XInput issues).
* plug-ins/Makefile.am
* plug-ins/common/.cvsignore
* plug-ins/common/Makefile.am
* plug-ins/common/plugin-defs.pl: simply excluded all plug-ins
which did not build (including Script-Fu). They are trivial to
fix.
2001-07-24 14:27:11 -07:00
|
|
|
#define GIMP_LAYER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_LAYER, GimpLayer))
|
|
|
|
|
#define GIMP_LAYER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_LAYER, GimpLayerClass))
|
|
|
|
|
#define GIMP_IS_LAYER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_LAYER))
|
|
|
|
|
#define GIMP_IS_LAYER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_LAYER))
|
2001-08-11 07:39:19 -07:00
|
|
|
#define GIMP_LAYER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_LAYER, GimpLayerClass))
|
1997-11-24 14:05:25 -08:00
|
|
|
|
2000-12-29 07:22:01 -08:00
|
|
|
|
2001-01-28 15:25:25 -08:00
|
|
|
typedef struct _GimpLayerClass GimpLayerClass;
|
2000-12-30 21:31:43 -08:00
|
|
|
|
2000-12-29 07:22:01 -08:00
|
|
|
struct _GimpLayer
|
|
|
|
|
{
|
2017-02-01 15:38:25 -08:00
|
|
|
GimpDrawable parent_instance;
|
2000-12-29 07:22:01 -08:00
|
|
|
|
2017-12-06 10:10:38 -08:00
|
|
|
gdouble opacity; /* layer opacity */
|
|
|
|
|
GimpLayerMode mode; /* layer combination mode */
|
|
|
|
|
GimpLayerColorSpace blend_space; /* layer blend space */
|
|
|
|
|
GimpLayerColorSpace composite_space; /* layer composite space */
|
|
|
|
|
GimpLayerCompositeMode composite_mode; /* layer composite mode */
|
|
|
|
|
GimpLayerMode effective_mode; /* layer effective combination mode */
|
|
|
|
|
GimpLayerColorSpace effective_blend_space; /* layer effective blend space */
|
|
|
|
|
GimpLayerColorSpace effective_composite_space; /* layer effective composite space */
|
|
|
|
|
GimpLayerCompositeMode effective_composite_mode; /* layer effective composite mode */
|
|
|
|
|
gboolean excludes_backdrop; /* layer clips backdrop */
|
|
|
|
|
gboolean lock_alpha; /* lock the alpha channel */
|
|
|
|
|
|
|
|
|
|
GimpLayerMask *mask; /* possible layer mask */
|
|
|
|
|
gboolean apply_mask; /* controls mask application */
|
|
|
|
|
gboolean edit_mask; /* edit mask or layer? */
|
|
|
|
|
gboolean show_mask; /* show mask or layer? */
|
2000-12-29 07:22:01 -08:00
|
|
|
|
2018-02-10 02:17:04 -08:00
|
|
|
GSList *move_stack; /* ancestors affected by move */
|
|
|
|
|
|
2017-02-01 15:38:25 -08:00
|
|
|
GeglNode *layer_offset_node;
|
|
|
|
|
GeglNode *mask_offset_node;
|
2008-10-09 13:44:23 -07:00
|
|
|
|
2000-12-29 07:22:01 -08:00
|
|
|
/* Floating selections */
|
|
|
|
|
struct
|
|
|
|
|
{
|
2001-01-13 19:55:56 -08:00
|
|
|
GimpDrawable *drawable; /* floating sel is attached to */
|
2001-12-03 05:44:59 -08:00
|
|
|
gboolean boundary_known; /* is the current boundary valid */
|
2012-03-19 07:04:20 -07:00
|
|
|
GimpBoundSeg *segs; /* boundary of floating sel */
|
2001-12-03 05:44:59 -08:00
|
|
|
gint num_segs; /* number of segs in boundary */
|
2000-12-29 07:22:01 -08:00
|
|
|
} fs;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
struct _GimpLayerClass
|
|
|
|
|
{
|
2001-01-13 19:55:56 -08:00
|
|
|
GimpDrawableClass parent_class;
|
2001-03-04 12:06:48 -08:00
|
|
|
|
2017-05-07 15:49:38 -07:00
|
|
|
/* signals */
|
2017-06-16 17:15:56 -07:00
|
|
|
void (* opacity_changed) (GimpLayer *layer);
|
|
|
|
|
void (* mode_changed) (GimpLayer *layer);
|
|
|
|
|
void (* blend_space_changed) (GimpLayer *layer);
|
|
|
|
|
void (* composite_space_changed) (GimpLayer *layer);
|
|
|
|
|
void (* composite_mode_changed) (GimpLayer *layer);
|
2017-12-06 10:10:38 -08:00
|
|
|
void (* effective_mode_changed) (GimpLayer *layer);
|
2017-06-16 17:15:56 -07:00
|
|
|
void (* excludes_backdrop_changed) (GimpLayer *layer);
|
|
|
|
|
void (* lock_alpha_changed) (GimpLayer *layer);
|
|
|
|
|
void (* mask_changed) (GimpLayer *layer);
|
|
|
|
|
void (* apply_mask_changed) (GimpLayer *layer);
|
|
|
|
|
void (* edit_mask_changed) (GimpLayer *layer);
|
|
|
|
|
void (* show_mask_changed) (GimpLayer *layer);
|
2017-05-07 15:49:38 -07:00
|
|
|
|
|
|
|
|
/* virtual functions */
|
2017-06-16 17:15:56 -07:00
|
|
|
void (* translate) (GimpLayer *layer,
|
|
|
|
|
gint offset_x,
|
|
|
|
|
gint offset_y);
|
|
|
|
|
void (* scale) (GimpLayer *layer,
|
|
|
|
|
gint new_width,
|
|
|
|
|
gint new_height,
|
|
|
|
|
gint new_offset_x,
|
|
|
|
|
gint new_offset_y,
|
|
|
|
|
GimpInterpolationType interpolation_type,
|
|
|
|
|
GimpProgress *progress);
|
|
|
|
|
void (* resize) (GimpLayer *layer,
|
|
|
|
|
GimpContext *context,
|
|
|
|
|
GimpFillType fill_type,
|
|
|
|
|
gint new_width,
|
|
|
|
|
gint new_height,
|
|
|
|
|
gint offset_x,
|
|
|
|
|
gint offset_y);
|
|
|
|
|
void (* flip) (GimpLayer *layer,
|
|
|
|
|
GimpContext *context,
|
|
|
|
|
GimpOrientationType flip_type,
|
|
|
|
|
gdouble axis,
|
|
|
|
|
gboolean clip_result);
|
|
|
|
|
void (* rotate) (GimpLayer *layer,
|
|
|
|
|
GimpContext *context,
|
|
|
|
|
GimpRotationType rotate_type,
|
|
|
|
|
gdouble center_x,
|
|
|
|
|
gdouble center_y,
|
|
|
|
|
gboolean clip_result);
|
|
|
|
|
void (* transform) (GimpLayer *layer,
|
|
|
|
|
GimpContext *context,
|
|
|
|
|
const GimpMatrix3 *matrix,
|
|
|
|
|
GimpTransformDirection direction,
|
|
|
|
|
GimpInterpolationType interpolation_type,
|
|
|
|
|
GimpTransformResize clip_result,
|
|
|
|
|
GimpProgress *progress);
|
|
|
|
|
void (* convert_type) (GimpLayer *layer,
|
|
|
|
|
GimpImage *dest_image,
|
|
|
|
|
const Babl *new_format,
|
|
|
|
|
GimpColorProfile *dest_profile,
|
|
|
|
|
GeglDitherMethod layer_dither_type,
|
|
|
|
|
GeglDitherMethod mask_dither_type,
|
|
|
|
|
gboolean push_undo,
|
|
|
|
|
GimpProgress *progress);
|
2017-12-06 10:10:38 -08:00
|
|
|
void (* get_effective_mode) (GimpLayer *layer,
|
|
|
|
|
GimpLayerMode *mode,
|
|
|
|
|
GimpLayerColorSpace *blend_space,
|
|
|
|
|
GimpLayerColorSpace *composite_space,
|
|
|
|
|
GimpLayerCompositeMode *composite_mode);
|
2017-06-16 17:15:56 -07:00
|
|
|
gboolean (* get_excludes_backdrop) (GimpLayer *layer);
|
2000-12-29 07:22:01 -08:00
|
|
|
};
|
|
|
|
|
|
1997-11-24 14:05:25 -08:00
|
|
|
|
2001-01-28 08:44:22 -08:00
|
|
|
/* function declarations */
|
1998-01-21 23:02:57 -08:00
|
|
|
|
2001-12-12 15:48:18 -08:00
|
|
|
GType gimp_layer_get_type (void) G_GNUC_CONST;
|
|
|
|
|
|
2010-02-07 03:03:07 -08:00
|
|
|
GimpLayer * gimp_layer_get_parent (GimpLayer *layer);
|
|
|
|
|
|
2016-05-19 14:51:44 -07:00
|
|
|
GimpLayerMask * gimp_layer_get_mask (GimpLayer *layer);
|
|
|
|
|
GimpLayerMask * gimp_layer_create_mask (GimpLayer *layer,
|
2006-05-14 09:24:31 -07:00
|
|
|
GimpAddMaskType mask_type,
|
|
|
|
|
GimpChannel *channel);
|
2001-12-12 15:48:18 -08:00
|
|
|
GimpLayerMask * gimp_layer_add_mask (GimpLayer *layer,
|
|
|
|
|
GimpLayerMask *mask,
|
2008-09-15 14:05:01 -07:00
|
|
|
gboolean push_undo,
|
|
|
|
|
GError **error);
|
2001-12-12 15:48:18 -08:00
|
|
|
void gimp_layer_apply_mask (GimpLayer *layer,
|
2002-03-18 03:07:34 -08:00
|
|
|
GimpMaskApplyMode mode,
|
2001-12-12 15:48:18 -08:00
|
|
|
gboolean push_undo);
|
2009-07-30 09:59:12 -07:00
|
|
|
|
2012-03-17 10:30:13 -07:00
|
|
|
void gimp_layer_set_apply_mask (GimpLayer *layer,
|
|
|
|
|
gboolean apply,
|
|
|
|
|
gboolean push_undo);
|
2016-05-19 14:51:44 -07:00
|
|
|
gboolean gimp_layer_get_apply_mask (GimpLayer *layer);
|
2012-03-17 10:30:13 -07:00
|
|
|
|
|
|
|
|
void gimp_layer_set_edit_mask (GimpLayer *layer,
|
|
|
|
|
gboolean edit);
|
2016-05-19 14:51:44 -07:00
|
|
|
gboolean gimp_layer_get_edit_mask (GimpLayer *layer);
|
2012-03-17 10:30:13 -07:00
|
|
|
|
|
|
|
|
void gimp_layer_set_show_mask (GimpLayer *layer,
|
|
|
|
|
gboolean show,
|
|
|
|
|
gboolean push_undo);
|
2016-05-19 14:51:44 -07:00
|
|
|
gboolean gimp_layer_get_show_mask (GimpLayer *layer);
|
2012-03-17 10:30:13 -07:00
|
|
|
|
2001-12-12 15:48:18 -08:00
|
|
|
void gimp_layer_add_alpha (GimpLayer *layer);
|
2016-09-21 02:56:25 -07:00
|
|
|
void gimp_layer_remove_alpha (GimpLayer *layer,
|
2005-08-07 09:38:35 -07:00
|
|
|
GimpContext *context);
|
2003-05-07 06:01:17 -07:00
|
|
|
|
2004-04-14 16:37:34 -07:00
|
|
|
void gimp_layer_resize_to_image (GimpLayer *layer,
|
2016-10-09 15:02:16 -07:00
|
|
|
GimpContext *context,
|
|
|
|
|
GimpFillType fill_type);
|
2001-12-12 15:48:18 -08:00
|
|
|
|
2016-05-19 14:51:44 -07:00
|
|
|
GimpDrawable * gimp_layer_get_floating_sel_drawable (GimpLayer *layer);
|
2009-01-26 14:47:16 -08:00
|
|
|
void gimp_layer_set_floating_sel_drawable (GimpLayer *layer,
|
|
|
|
|
GimpDrawable *drawable);
|
2016-05-19 14:51:44 -07:00
|
|
|
gboolean gimp_layer_is_floating_sel (GimpLayer *layer);
|
2001-12-12 15:48:18 -08:00
|
|
|
|
|
|
|
|
void gimp_layer_set_opacity (GimpLayer *layer,
|
Made drawable/layer properties (visibility, opacity etc.) undoable (fixes
2003-03-17 Michael Natterer <mitch@gimp.org>
Made drawable/layer properties (visibility, opacity etc.)
undoable (fixes bug #73893).
* app/core/core-enums.[ch]: added undo types/groups for
visibility, mode, opacity, linked and preserve_trans.
* app/core/Makefile.am
* app/core/core-types.h
* app/core/gimpitemundo.[ch]: new GimpUndo subclass which holds a
ref'ed GimpItem pointer so (1) this doesn't need to be done by all
undo steps related to an item and (2) the item the undo step is
for can be determined from outside the undo system.
* app/core/gimpimage-undo.[ch]: added gimp_image_undo_push_item()
which returns a new GimpItemUndo.
* app/core/gimpimage-undo-push.[ch]: use it for all item related
undo steps. Removed lots of GimpItem, GimpLayer, GimpDrawable
and GimpVectors pointers from the private undo structs. Added
undo push functions for the new undo types added above.
* app/core/gimpdrawable.[ch] (gimp_drawable_set_visible): added
"gboolean push_undo" parameter.
* app/core/gimplayer.[ch] (gimp_layer_set_opacity, _mode,
_preserve_trans, _linked): added "gboolean push_undo" parameters.
* app/core/gimpimage-mask.c
* app/core/gimpimage-merge.c
* app/core/gimplayer-floating-sel.c
* app/tools/gimpmovetool.c
* app/xcf/xcf-load.c
* app/widgets/gimpdrawablelistitem.c
* app/widgets/gimplayerlistitem.c
* app/widgets/gimplayerlistview.c: changed accordingly.
* tools/pdbgen/pdb/channel.pdb
* tools/pdbgen/pdb/layer.pdb: ditto. Added '$undo' paramaters to
the foo_accessors() functions. Removed $func from foo_accesors()
because we don't manipulate items without using getters/setters
any longer.
* app/pdb/channel_cmds.c
* app/pdb/layer_cmds.c: regenerated.
* app/widgets/gimpcellrenderertoggle.[ch]: added "clicked" signal
which carries an additional "GdkModifierType state" parameter as
in GimpCellRendererViewable .
* app/widgets/gimpcontainertreeview.c: emit "clicked" from
the toggle renderer, not "toggled" so the callbacks get the
modifier state.
* app/widgets/gimpdrawabletreeview.c: resurrected the "exclusive
visible by <shift>+click" feature as in 1.2.
* app/widgets/gimplayertreeview.c: compress layer opacity undos by
looking at the top of the undo stack and not pushing an undo if
there already is a GIMP_UNDO_DRAWABLE_OPACITY for the active
layer.
2003-03-17 10:02:41 -08:00
|
|
|
gdouble opacity,
|
|
|
|
|
gboolean push_undo);
|
2016-05-19 14:51:44 -07:00
|
|
|
gdouble gimp_layer_get_opacity (GimpLayer *layer);
|
2001-12-12 15:48:18 -08:00
|
|
|
|
2003-08-27 10:21:49 -07:00
|
|
|
void gimp_layer_set_mode (GimpLayer *layer,
|
2017-01-08 14:00:19 -08:00
|
|
|
GimpLayerMode mode,
|
Made drawable/layer properties (visibility, opacity etc.) undoable (fixes
2003-03-17 Michael Natterer <mitch@gimp.org>
Made drawable/layer properties (visibility, opacity etc.)
undoable (fixes bug #73893).
* app/core/core-enums.[ch]: added undo types/groups for
visibility, mode, opacity, linked and preserve_trans.
* app/core/Makefile.am
* app/core/core-types.h
* app/core/gimpitemundo.[ch]: new GimpUndo subclass which holds a
ref'ed GimpItem pointer so (1) this doesn't need to be done by all
undo steps related to an item and (2) the item the undo step is
for can be determined from outside the undo system.
* app/core/gimpimage-undo.[ch]: added gimp_image_undo_push_item()
which returns a new GimpItemUndo.
* app/core/gimpimage-undo-push.[ch]: use it for all item related
undo steps. Removed lots of GimpItem, GimpLayer, GimpDrawable
and GimpVectors pointers from the private undo structs. Added
undo push functions for the new undo types added above.
* app/core/gimpdrawable.[ch] (gimp_drawable_set_visible): added
"gboolean push_undo" parameter.
* app/core/gimplayer.[ch] (gimp_layer_set_opacity, _mode,
_preserve_trans, _linked): added "gboolean push_undo" parameters.
* app/core/gimpimage-mask.c
* app/core/gimpimage-merge.c
* app/core/gimplayer-floating-sel.c
* app/tools/gimpmovetool.c
* app/xcf/xcf-load.c
* app/widgets/gimpdrawablelistitem.c
* app/widgets/gimplayerlistitem.c
* app/widgets/gimplayerlistview.c: changed accordingly.
* tools/pdbgen/pdb/channel.pdb
* tools/pdbgen/pdb/layer.pdb: ditto. Added '$undo' paramaters to
the foo_accessors() functions. Removed $func from foo_accesors()
because we don't manipulate items without using getters/setters
any longer.
* app/pdb/channel_cmds.c
* app/pdb/layer_cmds.c: regenerated.
* app/widgets/gimpcellrenderertoggle.[ch]: added "clicked" signal
which carries an additional "GdkModifierType state" parameter as
in GimpCellRendererViewable .
* app/widgets/gimpcontainertreeview.c: emit "clicked" from
the toggle renderer, not "toggled" so the callbacks get the
modifier state.
* app/widgets/gimpdrawabletreeview.c: resurrected the "exclusive
visible by <shift>+click" feature as in 1.2.
* app/widgets/gimplayertreeview.c: compress layer opacity undos by
looking at the top of the undo stack and not pushing an undo if
there already is a GIMP_UNDO_DRAWABLE_OPACITY for the active
layer.
2003-03-17 10:02:41 -08:00
|
|
|
gboolean push_undo);
|
2017-01-08 14:00:19 -08:00
|
|
|
GimpLayerMode gimp_layer_get_mode (GimpLayer *layer);
|
2001-12-12 15:48:18 -08:00
|
|
|
|
2017-02-12 14:49:26 -08:00
|
|
|
void gimp_layer_set_blend_space (GimpLayer *layer,
|
|
|
|
|
GimpLayerColorSpace blend_space,
|
|
|
|
|
gboolean push_undo);
|
|
|
|
|
GimpLayerColorSpace
|
|
|
|
|
gimp_layer_get_blend_space (GimpLayer *layer);
|
2017-10-21 08:10:29 -07:00
|
|
|
GimpLayerColorSpace
|
|
|
|
|
gimp_layer_get_real_blend_space (GimpLayer *layer);
|
2017-02-12 14:49:26 -08:00
|
|
|
|
|
|
|
|
void gimp_layer_set_composite_space (GimpLayer *layer,
|
|
|
|
|
GimpLayerColorSpace composite_space,
|
|
|
|
|
gboolean push_undo);
|
|
|
|
|
GimpLayerColorSpace
|
|
|
|
|
gimp_layer_get_composite_space (GimpLayer *layer);
|
2017-10-21 08:10:29 -07:00
|
|
|
GimpLayerColorSpace
|
|
|
|
|
gimp_layer_get_real_composite_space (GimpLayer *layer);
|
2017-02-12 14:49:26 -08:00
|
|
|
|
|
|
|
|
void gimp_layer_set_composite_mode (GimpLayer *layer,
|
|
|
|
|
GimpLayerCompositeMode composite_mode,
|
2017-02-01 15:38:25 -08:00
|
|
|
gboolean push_undo);
|
|
|
|
|
GimpLayerCompositeMode
|
2017-02-12 14:49:26 -08:00
|
|
|
gimp_layer_get_composite_mode (GimpLayer *layer);
|
2017-10-21 08:10:29 -07:00
|
|
|
GimpLayerCompositeMode
|
|
|
|
|
gimp_layer_get_real_composite_mode (GimpLayer *layer);
|
2017-02-01 15:38:25 -08:00
|
|
|
|
2017-12-06 10:10:38 -08:00
|
|
|
void gimp_layer_get_effective_mode (GimpLayer *layer,
|
|
|
|
|
GimpLayerMode *mode,
|
|
|
|
|
GimpLayerColorSpace *blend_space,
|
|
|
|
|
GimpLayerColorSpace *composite_space,
|
|
|
|
|
GimpLayerCompositeMode *composite_mode);
|
|
|
|
|
|
2017-05-07 15:49:38 -07:00
|
|
|
gboolean gimp_layer_get_excludes_backdrop (GimpLayer *layer);
|
|
|
|
|
|
2005-07-10 14:17:22 -07:00
|
|
|
void gimp_layer_set_lock_alpha (GimpLayer *layer,
|
|
|
|
|
gboolean lock_alpha,
|
Made drawable/layer properties (visibility, opacity etc.) undoable (fixes
2003-03-17 Michael Natterer <mitch@gimp.org>
Made drawable/layer properties (visibility, opacity etc.)
undoable (fixes bug #73893).
* app/core/core-enums.[ch]: added undo types/groups for
visibility, mode, opacity, linked and preserve_trans.
* app/core/Makefile.am
* app/core/core-types.h
* app/core/gimpitemundo.[ch]: new GimpUndo subclass which holds a
ref'ed GimpItem pointer so (1) this doesn't need to be done by all
undo steps related to an item and (2) the item the undo step is
for can be determined from outside the undo system.
* app/core/gimpimage-undo.[ch]: added gimp_image_undo_push_item()
which returns a new GimpItemUndo.
* app/core/gimpimage-undo-push.[ch]: use it for all item related
undo steps. Removed lots of GimpItem, GimpLayer, GimpDrawable
and GimpVectors pointers from the private undo structs. Added
undo push functions for the new undo types added above.
* app/core/gimpdrawable.[ch] (gimp_drawable_set_visible): added
"gboolean push_undo" parameter.
* app/core/gimplayer.[ch] (gimp_layer_set_opacity, _mode,
_preserve_trans, _linked): added "gboolean push_undo" parameters.
* app/core/gimpimage-mask.c
* app/core/gimpimage-merge.c
* app/core/gimplayer-floating-sel.c
* app/tools/gimpmovetool.c
* app/xcf/xcf-load.c
* app/widgets/gimpdrawablelistitem.c
* app/widgets/gimplayerlistitem.c
* app/widgets/gimplayerlistview.c: changed accordingly.
* tools/pdbgen/pdb/channel.pdb
* tools/pdbgen/pdb/layer.pdb: ditto. Added '$undo' paramaters to
the foo_accessors() functions. Removed $func from foo_accesors()
because we don't manipulate items without using getters/setters
any longer.
* app/pdb/channel_cmds.c
* app/pdb/layer_cmds.c: regenerated.
* app/widgets/gimpcellrenderertoggle.[ch]: added "clicked" signal
which carries an additional "GdkModifierType state" parameter as
in GimpCellRendererViewable .
* app/widgets/gimpcontainertreeview.c: emit "clicked" from
the toggle renderer, not "toggled" so the callbacks get the
modifier state.
* app/widgets/gimpdrawabletreeview.c: resurrected the "exclusive
visible by <shift>+click" feature as in 1.2.
* app/widgets/gimplayertreeview.c: compress layer opacity undos by
looking at the top of the undo stack and not pushing an undo if
there already is a GIMP_UNDO_DRAWABLE_OPACITY for the active
layer.
2003-03-17 10:02:41 -08:00
|
|
|
gboolean push_undo);
|
2016-05-19 14:51:44 -07:00
|
|
|
gboolean gimp_layer_get_lock_alpha (GimpLayer *layer);
|
|
|
|
|
gboolean gimp_layer_can_lock_alpha (GimpLayer *layer);
|
2001-12-12 15:48:18 -08:00
|
|
|
|
2001-01-28 08:44:22 -08:00
|
|
|
|
2017-05-07 15:49:38 -07:00
|
|
|
/* protected */
|
|
|
|
|
|
2017-12-06 10:10:38 -08:00
|
|
|
void gimp_layer_update_effective_mode (GimpLayer *layer);
|
2017-05-07 15:49:38 -07:00
|
|
|
void gimp_layer_update_excludes_backdrop (GimpLayer *layer);
|
|
|
|
|
|
|
|
|
|
|
2001-01-28 08:44:22 -08:00
|
|
|
#endif /* __GIMP_LAYER_H__ */
|