Commit Graph

92 Commits

Author SHA1 Message Date
Michael Natterer f029c6b59f app/Makefile.am app/apptypes.h new object. Everything that can have a
2001-02-04  Michael Natterer  <mitch@gimp.org>

	* app/Makefile.am
	* app/apptypes.h
	* app/gimpviewable.[ch]: new object. Everything that can have a
	preview will be a GimpViewable. The virtual functions are
	"invalidate_preview", "preview" and "preview_new".

	* app/gimpmarshal.[ch]: new marshaller needed for the viewable.

	* app/gimpdrawable.[ch]
	* app/gimpimage.[ch]: derived from GimpViewable. Removed the
	preview stuff from the public interface.

	Made a single boolean out of GimpImage's "comp_preview_valid"
	array because we have only one copposite preview.

	* app/gimplayer.c: made the preview stuff private.

	* app/gimppreviewcache.[ch]: removed gimp_preview_scale()...

	* app/temp_buf.[ch]: ...and added it as temp_buf_scale() here.

	* app/gimpdrawablepreview.[ch]: is a private method of
	GimpDrawable now.

	* app/channels_dialog.c
	* app/convert.c
	* app/drawable.c
	* app/fileops.c
	* app/floating_sel.c
	* app/gimage.c
	* app/gimage_mask.c
	* app/gimpchannel.c
	* app/gimpcontainer.c
	* app/gimpdnd.c
	* app/layer_select.c
	* app/layers_dialog.c
	* app/lc_dialog.c
	* app/nav_window.c
	* app/palette_import.c
	* app/undo.c
	* app/undo_history.c
	* app/pdb/drawable_cmds.c
	* app/pdb/image_cmds.c
	* app/tools/crop.c
	* app/tools/edit_selection.c
	* app/tools/ink.c
	* app/tools/paint_core.c
	* tools/pdbgen/pdb/drawable.pdb
	* tools/pdbgen/pdb/image.pdb
	* po/POTFILES.in: changed accordingly.
2001-02-04 22:10:54 +00:00
Michael Natterer dde74f9735 app/Makefile.am app/gimpchannel.[ch] new files moved here by Yosh.
2001-02-01  Michael Natterer  <mitch@gimp.org>

	* app/Makefile.am
	* app/gimpchannel.[ch]
	* app/gimplayer.[ch]: new files moved here by Yosh.

	* app/channel.[ch]
	* app/layer.[ch]: removed.

	* app/gdisplay.c: cleanup stuff.

	* app/[lotsa files].c
	* tools/pdbgen/Makefile.am
	* tools/pdbgen/pdb.pl
	* tools/pdbgen/pdb/channel.pdb
	* tools/pdbgen/pdb/drawable.pdb
	* tools/pdbgen/pdb/floating_sel.pdb
	* tools/pdbgen/pdb/layer.pdb: changed includes accordingly.
2001-02-01 18:44:22 +00:00
Michael Natterer df0bbb26fb removed channel_update() because channel.c should not call
2001-01-29  Michael Natterer  <mitch@gimp.org>

	* app/channel.[ch]: removed channel_update() because channel.c
	should not call gdisplays_update(). Use drawable_update() and
	a subsequent gdisplays_update() instead.

	* app/qmask.c: do as described above.

	* app/channel_ops.c
	* app/channels_dialog.c
	* app/commands.c
	* app/convert.c
	* app/disp_callbacks.c
	* app/equalize.c
	* app/fileops.c
	* app/floating_sel.c
	* app/gdisplay.c
	* app/gimage.c
	* app/gimage_mask.c
	* app/gimpdnd.c
	* app/gimpdrawablepreview.c
	* app/gimphistogram.c
	* app/gimplayermask.c
	* app/global_edit.c
	* app/histogramwidget.c
	* app/histogramwidget.h
	* app/image_map.c
	* app/image_new.c
	* app/invert.c
	* app/layer.c
	* app/layer_select.c
	* app/paths_dialog.c
	* app/plug_in.c
	* app/scan_convert.c
	* app/undo_history.c
	* app/xcf.c: include gimpdrawable.h instead of drawable.h where
	possible, removed useless includes, minor other cleanups.
2001-01-29 17:54:02 +00:00
Michael Natterer bd7a4bf1b0 app/Makefile.am new file with one set of functions...
2001-01-29  Michael Natterer  <mitch@gimp.org>

	* app/Makefile.am
	* app/gimpdrawablepreview.[ch]: new file with one set of functions...

	* app/channel.[ch]
	* app/layer.[ch]: ...instead of having everything duplicated three
	times here.

	* app/channels_dialog.c
	* app/floating_sel.c
	* app/floating_sel.h
	* app/gimpdnd.c
	* app/gimpimage.c
	* app/layer_select.c
	* app/layers_dialog.c
	* app/selection.c
	* app/pdb/drawable_cmds.c
	* tools/pdbgen/pdb/drawable.pdb: changed accordingly, cleanup.
2001-01-29 13:51:23 +00:00
Michael Natterer 227eea67cb app/Makefile.am new file.
2001-01-29  Michael Natterer  <mitch@gimp.org>

	* app/Makefile.am
	* app/undo_history.h: new file.

	* app/apptypes.h: removed the "Channel" typedef.

	* app/channel.[ch]: renamed all functions to gimp_channel_*()

	* app/channel_ops.c
	* app/channels_dialog.c
	* app/commands.c
	* app/disp_callbacks.c
	* app/gdisplay.c
	* app/gimage_mask.[ch]
	* app/gimpdnd.c
	* app/gimphistogram.c
	* app/gimpimage.[ch]
	* app/global_edit.c
	* app/layer.c
	* app/layers_dialog.c
	* app/qmask.c
	* app/scan_convert.c
	* app/scan_convert.h
	* app/toolbox.c
	* app/undo.[ch]
	* app/undo_history.c
	* app/xcf.[ch]
	* app/pdb/channel_cmds.c
	* app/pdb/color_cmds.c
	* app/pdb/drawable_cmds.c
	* app/pdb/image_cmds.c
	* app/pdb/pdb_glue.h
	* app/pdb/selection_cmds.c
	* app/pdb/tools_cmds.c
	* app/tools/bezier_select.c
	* app/tools/bezier_selectP.h
	* app/tools/blend.c
	* app/tools/bucket_fill.c
	* app/tools/by_color_select.c
	* app/tools/crop.c
	* app/tools/ellipse_select.c
	* app/tools/free_select.c
	* app/tools/fuzzy_select.c
	* app/tools/fuzzy_select.h
	* app/tools/iscissors.c
	* app/tools/rect_select.c
	* app/tools/text_tool.c
	* app/tools/transform_core.c
	* tools/pdbgen/pdb.pl
	* tools/pdbgen/pdb/channel.pdb
	* tools/pdbgen/pdb/color.pdb
	* tools/pdbgen/pdb/drawable.pdb
	* tools/pdbgen/pdb/selection.pdb
	* tools/pdbgen/pdb/tools.pdb: changed accordingly.
2001-01-29 02:45:02 +00:00
Michael Natterer d3dcfadccf app/pdb/Makefile.am new file which contains the stuff that makes PDB code
2001-01-29  Michael Natterer  <mitch@gimp.org>

	* app/pdb/Makefile.am
	* app/pdb/pdb_glue.h: new file which contains the stuff that makes
	PDB code generation easier but is ugly when used in the app
	(see my comment in the log below).

	Contains:
	gimp_drawable_[layer|layer_mask|channel]()
	[channel|gimp_layer]_[set|get]_[name|tattoo]()

	* app/channel.[ch]
	* app/channels_dialog.c
	* app/gimpdrawable.h
	* app/gimpimage.c
	* app/gimplayermask.h
	* app/layer.c
	* app/layer.h
	* app/toolbox.c
	* app/undo.c
	* app/xcf.c
	* app/pdb/channel_cmds.c
	* app/pdb/drawable_cmds.c
	* app/pdb/layer_cmds.c
	* app/pdb/selection_cmds.c
	* app/tools/bezier_select.c
	* app/tools/bucket_fill.c
	* app/tools/by_color_select.c
	* app/tools/ellipse_select.c
	* app/tools/free_select.c
	* app/tools/fuzzy_select.c
	* app/tools/iscissors.c
	* app/tools/rect_select.c
	* tools/pdbgen/pdb/channel.pdb
	* tools/pdbgen/pdb/drawable.pdb
	* tools/pdbgen/pdb/layer.pdb
	* tools/pdbgen/pdb/selection.pdb: changed accordingly.
2001-01-29 00:46:04 +00:00
Michael Natterer a2ae989ff3 removed the "Layer" typedef.
2001-01-29  Michael Natterer  <mitch@gimp.org>

	* app/apptypes.h: removed the "Layer" typedef.

	* app/layer.[ch]: removed the defines of the old function names.

	Don't implement methods of the parent class (get_name, get_tattoo, ...)
	but define them as macros. They will go to a separate "pdb_glue.h"
	header because they are used only by the PDB to simplify code
	generation (no application file should say gimp_layer_get_tattoo()
	but always gimp_drawable_get_tatoo()).

	* app/channel.h
	* app/channel_ops.c
	* app/channels_dialog.c
	* app/commands.c
	* app/convert.c
	* app/disp_callbacks.c
	* app/floating_sel.[ch]
	* app/gdisplay.c
	* app/gimage.c
	* app/gimage_mask.c
	* app/gimage_mask.h
	* app/gimpdnd.c
	* app/gimpdrawable.h
	* app/gimpimage.[ch]
	* app/gimplayermask.h
	* app/global_edit.c
	* app/image_new.c
	* app/layer_select.c
	* app/layers_dialog.c
	* app/resize.c
	* app/undo.c
	* app/xcf.[ch]
	* app/pdb/drawable_cmds.c
	* app/pdb/floating_sel_cmds.c
	* app/pdb/image_cmds.c
	* app/pdb/layer_cmds.c
	* app/tools/bucket_fill.c
	* app/tools/by_color_select.c
	* app/tools/clone.c
	* app/tools/crop.c
	* app/tools/edit_selection.c
	* app/tools/ink.c
	* app/tools/move.c
	* app/tools/paint_core.c
	* app/tools/rect_select.c
	* app/tools/text_tool.c
	* app/tools/transform_core.c
	* tools/pdbgen/pdb/drawable.pdb
	* tools/pdbgen/pdb/floating_sel.pdb
	* tools/pdbgen/pdb/image.pdb
	* tools/pdbgen/pdb/layer.pdb: changed accordingly, cleanup.
2001-01-28 23:25:25 +00:00
Michael Natterer 8ddebdf79a app/Makefile.am new files cut out of layer.[ch]. Renamed all functions to
2001-01-28  Michael Natterer  <mitch@gimp.org>

	* app/Makefile.am
	* app/gimplayermask.[ch]: new files cut out of layer.[ch]. Renamed
	all functions to gimp_layes_mask_*(). removed artefacts like
	the ref/unref functions.

	* app/apptypes.h: removed the "LayerMask" typedef.

	* app/layer.[ch]: removed the layer mask stuff and renamed all
	functions to gimp_layer_*(). Added temporary typedefs for the old
	function names. The layer mask preview stuff is still there (should
	probably go to new layer_preview.{ch] files).

	* app/gimpimage.[ch]: added
	gimp_image_invalidate_[layer|channel]_previews() formerly known as
	[layer|channel]_invalidate_previews().

	* app/channel.[ch]: moved channel_layer_alpha() and
	channel_layer_mask() here because they are methods of the Channel.

	* app/channel_ops.c
	* app/convert.c
	* app/disp_callbacks.c
	* app/fileops.c
	* app/floating_sel.c
	* app/gimage.c
	* app/gimage_mask.c
	* app/gimpdnd.c
	* app/global_edit.c
	* app/layers_dialog.c
	* app/preferences_dialog.c
	* app/toolbox.c
	* app/undo.c
	* app/xcf.c
	* app/pdb/drawable_cmds.c
	* app/pdb/image_cmds.c
	* app/pdb/layer_cmds.c
	* app/tools/crop.c
	* app/tools/text_tool.c
	* app/tools/transform_core.c
	* tools/pdbgen/pdb.pl
	* tools/pdbgen/pdb/drawable.pdb: changed accordingly, cleanup.
2001-01-28 16:44:22 +00:00
Michael Natterer cb16697229 Makefile.am configure.in added stuff for the new library below.
2001-01-24  Michael Natterer  <mitch@gimp.org>

	* Makefile.am
	* configure.in
	* gimptool.in: added stuff for the new library below.

	* libgimpmath/.cvsignore
	* libgimpmath/Makefile.am
	* libgimpmath/gimpmath.def
	* libgimpmath/gimpmath.h
	* libgimpmath/gimpmathtypes.h
	* libgimpmath/gimpmatrix.c
	* libgimpmath/gimpmatrix.h
	* libgimpmath/gimpvector.c
	* libgimpmath/gimpvector.h
	* libgimpmath/makefile.mingw.in
	* libgimpmath/makefile.msc: new shared library. Depends on glib only.

	* libgimp/Makefile.am
	* libgimp/gimp.def
	* libgimp/gimp.h: removed the math stuff.

	* libgimp/gimpmath.h
	* libgimp/gimpmatrix.[ch]
	* libgimp/gimpvector.[ch]: removed.

	* app/Makefile.am
	* plug-ins/Lighting/Makefile.am
	* plug-ins/MapObject/Makefile.am
	* plug-ins/pagecurl/Makefile.am: link against libgimpmath.la

	* app/[many files]
	* libgimpcolor/gimpcolorspace.c
	* libgimpcolor/gimprgb.c
	* libgimp/gimpadaptivesupersample.c
	* libgimp/gimpbilinear.c
	* libgimp/gimpwidgets.c
	* modules/colorsel_gtk.c
	* modules/colorsel_triangle.c
	* modules/colorsel_water.c
	* plug-ins/libgck/gck/gckcolor.c
	* tools/pdbgen/pdb/channel.pdb
	* tools/pdbgen/pdb/image.pdb: include "libgimpmath/gimpmath.h",
	removed the remaining includes of the old color stuff.
2001-01-23 23:56:18 +00:00
Sven Neumann b102101e94 app/convert.c app/floating_sel.c app/gimage_mask.c app/gimpimage.c
2001-01-23  Sven Neumann  <sven@gimp.org>

	* app/convert.c
	* app/floating_sel.c
	* app/gimage_mask.c
	* app/gimpimage.c
	* app/global_edit.c
	* app/image_map.c
	* app/image_new.c
	* app/layer.c
	* app/paint_funcs.c
	* app/pixel_region.c
	* app/tile_manager.c
	* app/tile_manager.h
	* app/tile_manager_pvt.h
	* app/undo.c
	* app/xcf.c
	* app/pdb/tools_cmds.c
	* app/tools/flip_tool.c
	* app/tools/perspective_tool.c
	* app/tools/rotate_tool.c
	* app/tools/scale_tool.c
	* app/tools/shear_tool.c
	* app/tools/text_tool.c
	* app/tools/transform_core.c
	* tools/pdbgen/pdb/tools.pdb: made all files execpt xcf.c use the
	TileManager accessor functions instead of accessing the TileManager
	struct directly.
2001-01-23 13:01:48 +00:00
Sven Neumann 5591b7cd2d app/gdisplay.c app/gdisplay_ops.c app/info_window.c app/layer.c
2001-01-22  Sven Neumann  <sven@gimp.org>

	* app/gdisplay.c
	* app/gdisplay_ops.c
	* app/info_window.c
	* app/layer.c
	* app/menus.c
	* app/nav_window.c
	* app/path.c
	* app/scroll.[ch]: removed inclusion of superfluous headers and
	cleaned up the source a little.
2001-01-22 20:46:50 +00:00
Michael Natterer d822839089 app/channel.[ch] app/gimpimage.[ch] use GimpRGB for the Channel's, the
2001-01-15  Michael Natterer  <mitch@gimp.org>

	* app/channel.[ch]
	* app/gimpimage.[ch]
	* app/layer.[ch]: use GimpRGB for the Channel's, the QuickMask's
	and the LayerMask's color.

	* app/channel_cmds.c
	* app/channel_ops.c
	* app/channels_dialog.c
	* app/qmask.c
	* app/xcf.c
	* tools/pdbgen/pdb/channel.pdb: changed accordingly.
2001-01-15 04:37:01 +00:00
Michael Natterer 3220f9ec94 app/channel.[ch] app/drawable.[ch] app/gdisplay.[ch] app/gimpdrawable.[ch]
2001-01-14  Michael Natterer  <mitch@gimp.org>

	* app/channel.[ch]
	* app/drawable.[ch]
	* app/gdisplay.[ch]
	* app/gimpdrawable.[ch]
	* app/layer.[ch]:

	- Removed all "typedef drawable_function gimp_drawable_function".
	- Renamed all *_get_ID() functions to *_get_by_ID().
	- For symmetry reasons, renamed drawable_ID() to gimp_drawable_get_ID().
	- Removed the *_get_ID() functions of GimpLayer, GimpLayerMask
	  and GimpChannel.

	* app/airbrush.c
	* app/bezier_select.c
	* app/blend.c
	* app/brightness_contrast.c
	* app/bucket_fill.c
	* app/by_color_select.c
	* app/clone.c
	* app/color_balance.c
	* app/color_picker.c
	* app/convert.c
	* app/convolve.c
	* app/crop.c
	* app/curves.c
	* app/desaturate.c
	* app/dodgeburn.c
	* app/edit_selection.c
	* app/eraser.c
	* app/fileops.c
	* app/flip_tool.c
	* app/floating_sel.c
	* app/fuzzy_select.c
	* app/gimage.c
	* app/gimage_mask.c
	* app/gimphistogram.c
	* app/gimpimage.c
	* app/global_edit.c
	* app/histogram_tool.c
	* app/hue_saturation.c
	* app/image_map.c
	* app/ink.c
	* app/invert.c
	* app/layer_select.c
	* app/layers_dialog.c
	* app/levels.c
	* app/paint_core.c
	* app/paintbrush.c
	* app/pencil.c
	* app/plug_in.c
	* app/posterize.c
	* app/scan_convert.c
	* app/smudge.c
	* app/text_tool.c
	* app/threshold.c
	* app/transform_core.c
	* app/undo.c
	* app/undo_history.c

	* app/channel_cmds.c
	* app/channel_ops_cmds.c
	* app/color_cmds.c
	* app/display_cmds.c
	* app/drawable_cmds.c
	* app/edit_cmds.c
	* app/floating_sel_cmds.c
	* app/image_cmds.c
	* app/layer_cmds.c
	* app/parasite_cmds.c
	* app/selection_cmds.c
	* app/text_tool_cmds.c
	* app/tools_cmds.c
	* libgimp/gimpdrawable_pdb.c
	* tools/pdbgen/pdb.pl
	* tools/pdbgen/pdb/channel_ops.pdb
	* tools/pdbgen/pdb/color.pdb
	* tools/pdbgen/pdb/drawable.pdb
	* tools/pdbgen/pdb/edit.pdb
	* tools/pdbgen/pdb/image.pdb
	* tools/pdbgen/pdb/selection.pdb
	* tools/pdbgen/pdb/tools.pdb: changed accordingly.
2001-01-14 21:11:52 +00:00
Michael Natterer f504187d5e app/channel.[ch] app/gimpdrawable.[ch] moved the "removed" signal from
2001-01-14  Michael Natterer  <mitch@gimp.org>

	* app/channel.[ch]
	* app/gimpdrawable.[ch]
	* app/layer.[ch]: moved the "removed" signal from GimpChannel and
	GimpLayer to GimpDrawable.

	* app/gimpimage.[ch]: changed accordingly.
2001-01-14 17:11:14 +00:00
Michael Natterer cac3f7cb25 app/apptypes.h app/brush_edit.c app/brush_select.c app/brushes_cmds.c
2001-01-14  Michael Natterer  <mitch@gimp.org>

	* app/apptypes.h
	* app/brush_edit.c
	* app/brush_select.c
	* app/brushes_cmds.c
	* app/channel.h
	* app/colormap_dialog.c
	* app/datafiles.[ch]
	* app/devices.c
	* app/docindex.c
	* app/fileops.c
	* app/gdisplay.c
	* app/gimage.c
	* app/gimpbrush.[ch]
	* app/gimpbrushgenerated.[ch]
	* app/gimpbrushlist.[ch]
	* app/gimpbrushpipe.[ch]
	* app/gimpcontext.[ch]
	* app/gimpcontextpreview.c
	* app/gimpdnd.c
	* app/gimpdrawable.h
	* app/gimpimage.[ch]
	* app/gimplist.h
	* app/gimpobject.h
	* app/gimpset.[ch]
	* app/gradient.c
	* app/info_window.c
	* app/layer.[ch]
	* app/module_db.c
	* app/palette.[ch]
	* app/patterns.[ch]
	* app/plug_in.[ch]
	* app/undo_history.c
	* app/xcf.c
	* tools/pdbgen/pdb/brushes.pdb

	- Removed the "name" argument from all objects and use
	  GimpObject's name.
	- Use the same code in all "uniquefy name" functions (this
	  functionality will be a method of the "GimpContainer" class).
	- Renamed the parent instances of all objects to "parent instance".
	- Added missing instance and class cast macros.
	- Changed some "gchar *" to "const gchar *" parameters.
2001-01-14 03:55:56 +00:00
Michael Natterer 6642bc2c94 removed the "name" parameter and use GimpObject's name instead.
2001-01-10  Michael Natterer  <mitch@gimp.org>

	* app/gimpdrawable.[ch]: removed the "name" parameter and use
	GimpObject's name instead.

	* app/channel.c
	* app/channel_ops.c
	* app/channels_dialog.c
	* app/drawable.h
	* app/gimpimage.c
	* app/interface.c
	* app/layer.c
	* app/layer_select.c
	* app/layers_dialog.c
	* app/qmask.c
	* app/undo.c
	* app/xcf.c: changed accordingly, cleanup.
2001-01-10 03:13:03 +00:00
Michael Natterer 92c45a90e6 app/Makefile.am removed. added.
2001-01-10  Michael Natterer  <mitch@gimp.org>

	* app/Makefile.am
	* app/gimpsignal.[ch]: removed.
	* app/gimpmarshal.[ch]: added.

	* app/channel.[ch]
	* app/gimpbrush.[ch]
	* app/gimpbrushgenerated.c
	* app/gimpbrushlist.[ch]
	* app/gimpbrushpipe.[ch]
	* app/gimpcontext.c
	* app/gimpdrawable.c
	* app/gimpimage.c
	* app/gimplist.[ch]
	* app/gimpobject.[ch]
	* app/gimpset.[ch]
	* app/layer.c
	* app/layers_dialog.c
	* app/module_db.c
	* app/parasitelist.[ch]: removed gimp_signal_new() and
	GIMP_TYPE_INIT(). Fixed lots of object related uglyness.
2001-01-10 00:36:54 +00:00
Michael Natterer 8d6c335f8f app/Makefile.am app/channel_pvt.h app/drawable_pvt.h app/gdisplayF.h
2000-12-29  Michael Natterer  <mitch@gimp.org>

	* app/Makefile.am
	* app/channel_pvt.h
	* app/drawable_pvt.h
	* app/gdisplayF.h
	* app/gimpdrawableP.h
	* app/gimpimageP.h
	* app/layer_pvt.h
	* app/toolsF.h: removed these files.

	* app/apptypes.h
	* tools/pdbgen/enums.pl: added tons of opaque typedefs and enums.

	* tools/pdbgen/pdb/brush_select.pdb
	* tools/pdbgen/pdb/brushes.pdb
	* tools/pdbgen/pdb/channel.pdb
	* tools/pdbgen/pdb/color.pdb
	* tools/pdbgen/pdb/convert.pdb
	* tools/pdbgen/pdb/display.pdb
	* tools/pdbgen/pdb/drawable.pdb
	* tools/pdbgen/pdb/fileops.pdb
	* tools/pdbgen/pdb/gradient_select.pdb
	* tools/pdbgen/pdb/gradients.pdb
	* tools/pdbgen/pdb/help.pdb
	* tools/pdbgen/pdb/image.pdb
	* tools/pdbgen/pdb/layer.pdb
	* tools/pdbgen/pdb/pattern_select.pdb
	* tools/pdbgen/pdb/patterns.pdb
	* tools/pdbgen/pdb/selection.pdb
	* tools/pdbgen/pdb/tools.pdb
	* app/*: chainsaw #include cleanup:

	- Never (never!!) include stuff in header files except where we
	  need access to structures' contents (like derived objects).
	- Added prototypes and proper formating in many files.
	- The #include order in *all* *.c files is as follows:

	#include "config.h"

	#include <system stuff>

	#include <gtk/gtk.h>

	#include "apptypes.h"

	#include "gimp stuff"

	#include "libgimp stuff"

	#include "libgimp/gimpintl.h"

	By following this scheme we can easily see a file's dependencies
	from it's #include's and can grep for the inclusion to find out
	where a file is used.

	* tools/pdbgen/app.pl: changed to follow the include scheme above.

	* libgimp/Makefile.am
	* libgimp/gimpuitypes.h: new file, included from libgimp/gimpui.h
	and from app/apptypes.h.

	* libgimp/gimpcolorbutton.[ch]
	* libgimp/gimpdialog.[ch]
	* libgimp/gimphelpui.[ch]
	* libgimp/gimpparasite.[ch]
	* libgimp/gimppatheditor.[ch]
	* libgimp/gimpprotocol.c
	* libgimp/gimpquerybox.[ch]
	* libgimp/gimpsizeentry.[ch]
	* libgimp/gimptypes.h
	* libgimp/gimpui.h
	* libgimp/gimpunit.h
	* libgimp/gimpunitmenu.[ch]
	* libgimp/gimpwidgets.[ch]: changed accordingly.

	* plug-ins/FractalExplorer/Dialogs.c
	* plug-ins/gdyntext/message_window.c
	* plug-ins/imagemap/imap_default_dialog.c
	* plug-ins/imagemap/imap_file.c: these files used to include
	"libgimp/gimpui.h" without including "libgimp/gimp.h". This is
	no longer possible because the libgimpui headers don't inlcude
	"libgimp/gimpunit.h" any more.
2000-12-29 15:22:01 +00:00
Sven Neumann ebe7d2f988 app/channel.c use gtk_object_sink() instead of gtk_object_unref() when
2000-12-28  Sven Neumann  <sven@gimp.org>

	* app/channel.c
	* app/layer.c: use gtk_object_sink() instead of gtk_object_unref()
	when deleting a layer or channel since only floating objects should
	be destroyed this way. A layer or channel that has been attached
	to an image shall never be deleted.

	* app/layer_cmds.c
	* libgimp/gimplayer_pdb.c
	* tools/pdbgen/pdb/layer.pdb: reenabled the gimp_layer_delete() PDB
	function since it might be useful under rare circumstances.
2000-12-28 19:17:41 +00:00
Michael Natterer 0d440e1040 app/channel.[ch] app/drawable.h app/gimpdrawable.[ch] app/gimpdrawableP.h
2000-12-28  Michael Natterer  <mitch@gimp.org>

	* app/channel.[ch]
	* app/drawable.h
	* app/gimpdrawable.[ch]
	* app/gimpdrawableP.h
	* app/gimpimage.[ch]
	* app/gimpimageP.h
	* app/layer.[ch]
	* app/layer_pvt.h: started a major cleanup of all image/drawable
	files. Added tons of "const GimpImage *" declarations and properly
	formated the headers.

	* app/bezier_select.c
	* app/channels_dialog.c
	* app/crop.c
	* app/fileops.[ch]
	* app/fuzzy_select.c
	* app/gdisplay.c
	* app/layers_dialog.c
	* app/move.c
	* app/paint_funcs.[ch]
	* app/qmask.c
	* app/undo.c: changed accordingly plus the usual portion of coding
	style paranoia. This is not finished but Sven promised to buy me
	a beer if I commit now ;)
2000-12-28 16:19:55 +00:00
Sven Neumann 7d0ca8d0fe app/gimppreviewcache.h app/channel.c put the preview cache priming code
2000-12-16  Sven Neumann  <sven@gimp.org>

	* app/gimppreviewcache.h
	* app/channel.c
	* app/layer.c: put the preview cache priming code back into place,
	but disabled it for small images to avoid unnecessary upscaling.
2000-12-16 22:02:10 +00:00
Sven Neumann dfa2bed505 Last-minute cleanup:
2000-12-16  Sven Neumann  <sven@gimp.org>

	Last-minute cleanup:

	* app/gimpdrawableF.h
	* app/gimphistogramF.h
	* app/gimpimageF.h
	* app/gimplistF.h
	* app/gimplutF.h
	* app/gimpobjectF.h
	* app/gimpsetF.h
	* app/layerF.h
	* app/parasitelistF.h: removed these files

	* app/Makefile.am
	* tools/pdbgen/Makefile.am: changed accordingly

	* app/[almost every file]: include cleanup
2000-12-16 21:37:03 +00:00
Sven Neumann e29df7e285 added new function gimp_preview_scale().
2000-12-15  Sven Neumann  <sven@gimp.org>

	* app/gimppreviewcache.[ch]: added new function gimp_preview_scale().

	* app/channel.c
	* app/channels_dialog.c
	* app/gimpimage.c
	* app/layer.c
	* app/layers_dialog.c
	* app/lc_dialog.c
	* app/nav_window.c: unified preview drawing code. Previews are never
	generated larger than the canvas size. Image and channel previews are
	scaled up to the desired size, so does the navigation window. The
	layer previews are not yet scaled up again since we can not use
	gimp_preview_scale here. I have removed the preview_cache priming
	code since we don't need it any longer and it caused bad results.
2000-12-15 15:54:17 +00:00
Sven Neumann 471713e3a7 app/gimpimage.c app/layer.c app/layers_dialog.c cleaned up these files
2000-12-14  Sven Neumann  <sven@gimp.org>

	* app/gimpimage.c
	* app/layer.c
	* app/layers_dialog.c
	* app/nav_window.c: cleaned up these files while trying to find a
	fix for #31098. No real changes, the bug is still present :-(
2000-12-14 13:52:16 +00:00
Sven Neumann 2458bfcbba app/color_picker.c app/convert.c app/curves.c app/gimpdrawable.c
2000-12-13  Sven Neumann  <sven@gimp.org>

        * app/color_picker.c
        * app/convert.c
        * app/curves.c
        * app/gimpdrawable.c
        * app/gimpimage.c
        * app/gimpimage.h
        * app/image_map.c
        * app/info_window.c
        * app/layer.c
        * app/undo.c: couldn't resist: renamed TYPE_HAS_ALPHA() to
        GIMP_IMAGE_TYPE_HAS_ALPHA()

        * plug-ins/common/sunras.c
        * plug-ins/common/xwd.c: small cleanups
2000-12-13 18:53:35 +00:00
Sven Neumann 0d9382fb04 app/layer.c app/layers_dialog.c reviewed code in an attempt to fix the
2000-12-03  Sven Neumann  <sven@gimp.org>

	* app/layer.c
	* app/layers_dialog.c
	* plug-ins/common/jpeg.c: reviewed code in an attempt to fix the
	crash-on-jpeg-save. The only thing that I have changed (despite
	lots of indentation) is that we now connect the preview rewdraw
	using gtk_signal_connect_while_alive() which should keep gimp from
	trying to create previews of nonexistant drawables.

Updated german translation.
2000-12-03 18:15:08 +00:00
Sven Neumann 27a4faa0b2 plugged memleak (similar to the one that was present in
2000-10-22  Sven Neumann  <sven@gimp.org>

	* app/edit_selection.[ch]: plugged memleak (similar to the one that
	was present in gtkutil_compress_motion()) in the key snooper.

	Round moves to nearest integer instead of truncating the value.
	This seems to fix the reported redraw problems when moving
	selections at low zoom levels.

	Cleaned up the code a little and converted enum values to uppercase.

	* app/bezier_select.c
	* app/free_select.c
	* app/fuzzy_select.c
	* app/move.c
	* app/rect_select.c
	* app/text_tool.c: updated to use the new EditType enum values.

	* app/gimprc.c: minor optimization in the GList handling.

	* app/layer.[ch]: removed unused functions.

	* app/menus.c: removed "Dump Items (Debug)" menu entry.
2000-10-23 09:05:45 +00:00
BST 2000 Austin Donnelly 1218b2bb89 The gif save plugin normally asks the user if it's ok to crop the image if
Tue Jul 18 23:34:34 BST 2000  Austin Donnelly  <austin@gimp.org>

	* plugs-ins/common/gif.c: The gif save plugin normally asks the
	    user if it's ok to crop the image if there are layers larger
    	    than the image size.  This isn't a good idea if we're running
    	    with run_mode == NON_INTERACTIVE.  Fix similar to that
    	    suggested by Bryan Livingston <bryan@cooltext.com> on
    	    gimp-developer mailing list.

   	* app/layer.c: Fix for Bug#17347: Scale Layer leaves artifacts.
	    Basic problem is that scaling a layer when there's a selection
    	    active (eg there's a floating selection) doesn't invalidate
    	    the layer bounds.  Same problem with resizing a layer,
    	    although the bug report didn't mention that.  Fixed by changing
    	    layer_resize() and layer_scale_lowlevel() to call
    	    layer_invalidate_boundary() once done changing the layer.
2000-07-18 22:48:14 +00:00
Manish Singh f764c56d03 Be smarter about emitting the "invalidate_preview" signal.
comitted using Yosh's account...


--Sven
2000-06-03 18:19:22 +00:00
Michael Natterer 6fa33d6855 Libgimp cleanup part II (with a little help from Yosh who moved the CVS
2000-05-27  Michael Natterer  <mitch@gimp.org>

	Libgimp cleanup part II (with a little help from Yosh
	who moved the CVS files).

	* libgimp/Makefile.am
	* libgimp/gimpchannel_pdb.c
	* libgimp/gimpdisplay_pdb.c
	* libgimp/gimpdrawable_pdb.c
	* libgimp/gimpgradient_pdb.c
	* libgimp/gimphelp_pdb.c
	* libgimp/gimpimage_pdb.c
	* libgimp/gimplayer_pdb.c
	* libgimp/gimppalette_pdb.c
	* libgimp/gimpparasite_pdb.c
	* libgimp/gimpselection_pdb.c
	* libgimp/gimpunit_pdb.c: new names of all files which contain
	PDB wrappers.

	* modules/Makefile.am
	* libgimp/gimpcolordisplay.h
	* libgimp/gimpcolorselector.h
	* modules/gimpmodregister.[ch]: renamed.

	* libgimp/gimpparasiteF.h
	* libgimp/gimpparasiteP.h: removed because gimp.h had to include
	the private header anyway.

	* app/color_notebook.c
	* app/color_select.c
	* app/gdisplay_color.[ch]
	* app/gdisplay_color_ui.c
	* app/gimpbrushpipe.c
	* app/gimpdrawable.[ch]
	* app/gimpimage.c
	* app/gimpimage.h
	* app/gimpparasite.[ch]
	* app/gimprc.c
	* app/image_new.c
	* app/layer.c
	* app/parasite_cmds.c
	* app/parasitelist.[ch]
	* app/plug_in.c
	* app/procedural_db.c
	* app/undo.c
	* app/xcf.c
	* libgimp/gimp.[ch]
	* libgimp/gimpcolordisplay.h
	* libgimp/gimpparasite.[ch]
	* modules/cdisplay_gamma.c
	* modules/cdisplay_highcontrast.c
	* modules/colorsel_gtk.c
	* modules/colorsel_triangle.c
	* modules/colorsel_water.c
	* plug-ins/FractalExplorer/Dialogs.c
	* plug-ins/FractalExplorer/Events.c
	* plug-ins/Lighting/lighting_apply.c
	* plug-ins/Lighting/lighting_shade.c
	* plug-ins/MapObject/mapobject_image.c
	* plug-ins/common/gpb.c
	* plug-ins/common/psp.c
	* plug-ins/sel2path/sel2path.c
	* po-libgimp/POTFILES.in
	* tools/pdbgen/pdb.pl
	* tools/pdbgen/pdb/parasite.pdb: changed includes accordingly.
2000-05-27 01:30:21 +00:00
Sven Neumann b101e7bc85 enabled the (commented out) signal "invalidate_preview".
2000-05-12  Sven Neumann  <sven@gimp.org>

* gimpdrawable.c: enabled the (commented out) signal
  "invalidate_preview".

* app/layers_dialog.c: connect to the "invalidate_preview"
  signal to catch changes that need to be shown in the layer
  previews. Synthetize an expose event when a layer changes.

  Expose events are optimzed away by GTK+ if the widget is not
  visible. Therefore, previews not visible in the layers_dialog
  are not redrawn when they invalidate. Later the preview gets
  validated by the image_preview in lc_dialog but is never
  propagated to the layer_pixmap. We work around this by using an
  additional flag "layer_pixmap_valid" so that the pixmap gets
  updated once the preview scrolls into sight.

  Fixes bugs #10549, #10300 and #8787.

* app/channel.[ch]
* app/layer.[ch]: code review and indentation


--Sven
2000-05-12 17:07:54 +00:00
Michael Natterer c73b233f8a app/color_select.c app/colormaps.[ch] removed unused global variables
2000-04-26  Michael Natterer  <mitch@gimp.org>

	* app/color_select.c
	* app/colormaps.[ch]
	* app/context_manager.c: removed unused global variables
	[foreground|background]_pixel and [old|new]_color_pixel.

	Initialize the colormap and visual stuff with GdkRGB instead of
	GtkPreview functions (which are deprecated).

	* app/[62 files]: removed #include's (started with colormaps.h and
	couldn't stop). Also ordered them consistently and did some small
	unrelated cleanups.
	Removed variuos <stdlib.h> et.al. but checked the files carefully
	before doing so. If I was too radical and you get warnings on your
	platform, please flame me or just put them back :)
2000-04-27 17:27:28 +00:00
Sven Neumann 1bd3c65443 removed warnings, cleaned up the source, unmarked
internal error messages for translation


--Sven
2000-02-27 12:09:29 +00:00
Garry R. Osgood 8769bbb456 app/commands.c app/gimpimage.c app/layer.c app/layer.h app/resize.c
2000-02-26 Garry R. Osgood <gosgood@idt.net>
* app/commands.c
* app/gimpimage.c
* app/layer.c
* app/layer.h
* app/resize.c
* app/resize.h

Aliasing artifacts that changed relative positions
of layers under scaling, giving rise to #5271, are
minimized by a new layer.c function,
layer_scale_by_factors(). Closes #5271. See
http://idt.net/~gosgood/gimp-patch/patch07.html for
further detail. See also usage documentation for
layer_scale() and layer_scale_by_factors() in
layer.c.

Provided logic for the Scale Image dialog box to
pre-check an image's layers for the possibility that
a particular scaling, s: 0 < s < 1, reduces a layer
dimension to zero. Should this case prevail, a
boolean dialog box warns the user of the
possibility. The user may (1) Cancel, returning
focus to Scale Image and the possibility of
corrective adjustment, or (2) OK the scaling. The
layers that will vanish upon the new scaling are
culled from the GimpImage::layers list first.
2000-02-26 18:46:08 +00:00
Manish Singh 45842e262a added 2000 to the copyrights
* tools/pdbgen/*.pl: added 2000 to the copyrights

* tools/pdbgen/lib.pl: it's foo_pdb.[ch] now

* tools/pdbgen/pdb/drawable.pdb
* tools/pdbgen/pdb/parasite.pdb: reenabled sanity checks for the
drawable IDs and the parasite names

* app/drawable.c
* app/gimpdrawable.c: added a bunch of g_return_if_fail's, instead
of the silent check and return in many functions. This should also
be done in gimpimage.c and the like too.

* app/gimpdrawable.h
* app/layer.c: cosmetic code fix

-Yosh
2000-02-17 11:44:27 +00:00
GMT 2000 Andy Thomas 8f6bca3234 gimp/app/gimpdrawable.c gimp/app/channel.c gimp/app/layer.c
Tue Feb 15 23:27:42 GMT 2000 Andy Thomas <alt@gimp.org>

	 * gimp/app/gimpdrawable.c
	 * gimp/app/channel.c
	 * gimp/app/layer.c
	 * gimp/app/channel.h
	 * gimp/app/layer.h
	 * gimp/app/gimpimage.c
	 * gimp/app/gimpimage.h
	 * gimp/app/gimpdrawable.h
	 * gimp/tools/pdbgen/pdb/paths.pdb
	 * gimp/tools/pdbgen/pdb/layer.pdb
	 * gimp/tools/pdbgen/pdb/channel.pdb
	 * gimp/tools/pdbgen/pdb/gimage.pdb
	 * gimp/app/channel_cmds.c
	 * gimp/app/gimage_cmds.c
	 * gimp/app/internal_procs.c
	 * gimp/app/layer_cmds.c
	 * gimp/app/paths_cmds.c

	New gimp_*_set_tattoo procedures. This allows save/load plugins
        to save/restore tattoo states of layers, channels and paths. Note the
	internal tattoo state can also be set, however rigorous checks are
	performed to make sure that the internal tattoo states of layer,
	channels and paths are consistent and that the new state value is
	newval > MAX(MAX(layertattoo),MAX(channeltattoo),MAX(pathtattoo)).
2000-02-15 23:49:03 +00:00
Sven Neumann c9482821ab mostly header cleanup and i18n
--Sven
2000-01-31 23:59:05 +00:00
Sven Neumann f3eb81f4c2 Applied a change suggested by Steinar H. Gunderson.
Fixes crashing on empty images (bug #5536).


--Sven
2000-01-25 21:00:54 +00:00
Sven Neumann 8b178fcbcc Implemented the "removed" signal for channels and connected qmask to it
to keep the buttons in sync when a qmask channels gets deleted manually.
Fixes bug #2516.


-Sven
2000-01-20 17:10:49 +00:00
Sven Neumann 65bfd700f9 in layer_new_from_tiles check if image_type has alpha to avoid obscure
* app/layer.c: in layer_new_from_tiles check if image_type has alpha
  to avoid obscure bugs if the function is not called correctly

* app/text_tool_cmds.c
* tools/pdbgen/pdb/text_tool.pdb: added a hint about using border = -1
  to suppress cropping of empty spaces around the text


--Sven
2000-01-11 21:23:38 +00:00
Garry R. Osgood 16d1795918 app/disp_callbacks.c app/gimage_mask.c app/global_edit.c app/interface.c
2000-01-11  Garry R. Osgood <gosgood@idt.net>
* app/disp_callbacks.c
* app/gimage_mask.c
* app/global_edit.c
* app/interface.c
* app/layer.c
* app/layer.h
* app/transform_core.c  Followup to #4708. Some clients
of layer_new_from_tiles() need to specify the
kind of layer they need; added a GimpImageType
parameter for this purpose. Closes #5045.
* app/paths_dialog.c paths_dialog_set_default_op()
now checks for the existence of the path_dialog
before manipulating its internals. Closes #5049;
2000-01-11 20:08:45 +00:00
Sven Neumann a34415cb7b Removed the obsolete drawable argument from layer_from_tiles.
The layer_type is now taken from the base_type of the image.
Also changed the name to layer_new_from_tiles.


--Sven
2000-01-01 18:33:40 +00:00
Sven Neumann 7cd5c09f59 more i18n fixes
--Sven
1999-12-28 14:09:20 +00:00
Sven Neumann 7427a53c95 Layer to Imagesize in C
--Sven
1999-11-27 14:00:26 +00:00
Sven Neumann a265c91c65 plugged more memleaks
--Sven
1999-11-06 18:19:41 +00:00
BST 1999 Andy Thomas 35539062e6 app/layer.c
Tue Oct 19 21:50:52 BST 1999 Andy Thomas <alt@gimp.org>

	* app/layer.c

	Fixed rounding error in preview generating code that
	produced dithering where no dithering should have been!
1999-10-19 20:56:51 +00:00
BST 1999 Andy Thomas df7ad092f4 app/nav_window.c app/nav_window.h app/gimppreviewcache.h app/layer.c
Fri Aug 27 18:57:50 BST 1999 Andy Thomas <alt@gimp.org>

	* app/nav_window.c
	* app/nav_window.h
	* app/gimppreviewcache.h
	* app/layer.c
	* app/channel.c
	* app/commands.c

	Added some controls to the nav window. Yep. I know that the
	buttons are toooo biGGG.

	Preview cache changes. Now prime preview cache with a image
	so that later we have a better chance of a hit. Still
	needs to be more intelligent at doing this (needs to pick largest
	out of the cache & use its size as the size to prime with).
1999-08-27 19:07:21 +00:00
Michael Natterer 1e08aa1ef7 app/color_area.[ch] app/color_panel.[ch] enabled dnd for colors
1999-08-22  Michael Natterer  <mitschel@cs.tu-berlin.de>

	* app/color_area.[ch]
	* app/color_panel.[ch]
	* app/gimpdnd.[ch]: enabled dnd for colors (compatible with the
	standard gtk/gnome color dnd). The color selection is now invoked
	on a real click, not on button_down to avoid confusion with dnd.

	* app/channels_dialog.c
	* app/disp_callbacks.c
	* app/interface.c
	* app/layers_dialog.c: minor dnd updates/fixes.

	* app/channel.[ch]
	* app/channel_pvt.h
	* app/docindex.[ch]
	* app/docindexif.[ch]
	* app/drawable.[ch]
	* app/floating_sel.c
	* app/gimage.[ch]
	* app/gimage_mask.c
	* app/gimpdrawable.[ch]
	* app/gimpdrawableP.h
	* app/gimpimage.[ch]
	* app/gimpimageP.h
	* app/layer.[ch]
	* app/layer_pvt.h
	* app/undo.c
	* app/xcf.c: wanted to do some s/int/gboolean/ in the layer files
	where appropriate and found myself spending the whole night doing
	a big code review for layers/channels/drawables/images:
	s/int/gboolean/, s/<type>/g<type>/, lots of indentation, removed
	some old global variables and deprecated functions, #include
	cleanups, proper prototypes, copyright headers, ...
1999-08-22 11:45:31 +00:00
Michael Natterer 70407d2882 app/Makefile.am new file. Contains a function which creates dnd preview
1999-08-20  Michael Natterer  <mitschel@cs.tu-berlin.de>

	* app/Makefile.am
	* app/gimpdnd.c: new file. Contains a function which creates dnd
	preview icons for all kinds of drawables.

	* app/gimpdnd.h: added the new dnd types.

	* app/channels_dialog.c: same dnd functions as in the layers
	dialog. Fixed channels_dialog_flush(). Code cleanup.

	* app/layers_dialog.c: enabled dnd for layer masks.

	* app/disp_callbacks.c
	* app/interface.c: dnd code generalization. The toolbox and the
	display accept drop of any kind of drawable now.

	* app/gimage.h
	* app/gimpimage.[ch]: new function gimp_image_position_channel().

	* app/layer.[ch]: new function layer_mask_get_layer().
1999-08-20 19:59:06 +00:00
Michael Natterer 311c83b0a4 app/Makefile.am new file containing the dnd data definitions.
1999-08-19  Michael Natterer  <mitschel@cs.tu-berlin.de>

	* app/Makefile.am
	* app/gimpdnd.h: new file containing the dnd data definitions.

	* app/disp_callbacks.[ch]
	* app/interface.c: drop layers on the toolbox to create a new
	image and on the display to copy it to the image's layer stack.

	* app/layers_dialog.c: drop layer on the "New" button to create an
	empty layer with the dropped layer's properties, to "Duplicate" to
	duplicate it and on the trashcan to delete it.
	Thanks to Andy for the ultra-cool dnd preview pixmap patch.

	* app/layer.[ch]
	* app/undo.c: renamed layer_mask() to layer_get_mask(). Prototyped
	some function headers.

	* app/disp_callbacks.c: Wheelmouse stuff: Shift+wheel scales the
	display.

	* app/airbrush.c
	* app/eraser.c
	* app/paint_options.h
	* app/paintbrush.c
	* app/pencil.c
	* app/tool_options.c: moved the "Incremental" toggle to the
	PaintOptions structure because it is used more often now.
1999-08-19 19:53:30 +00:00