Commit d1022c34 authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer

app/Makefile.am removed.

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

	* app/Makefile.am
	* app/asupsample.[ch]: removed.

	* app/core/Makefile.am
	* app/core/core-types.h
	* app/tools/Makefile.am
	* app/tools/tools-types.h: new files.

	* app/tools/gimptoolinfo.[ch]: removed.
	* app/core/gimptoolinfo.[ch]: added here.

	* libgimp/Makefile.am
	* libgimp/gimp.h
	* libgimp/gimpadaptivesupersample.[ch]
	* libgimp/gimpbilinear.[ch]: removed here...

	* libgimpcolor/Makefile.am
	* libgimpcolor/gimpcolortypes.h
	* libgimpcolor/gimpadaptivesupersample.[ch]
	* libgimpcolor/gimpbilinear.[ch]: ..and added here.

	* tools/pdbgen/app.pl
	* tools/pdbgen/pdb/paths.pdb

	* app/*.c: changed tons of #include's
parent c69de20f
2001-05-10 Michael Natterer <mitch@gimp.org>
* app/Makefile.am
* app/asupsample.[ch]: removed.
* app/core/Makefile.am
* app/core/core-types.h
* app/tools/Makefile.am
* app/tools/tools-types.h: new files.
* app/tools/gimptoolinfo.[ch]: removed.
* app/core/gimptoolinfo.[ch]: added here.
* libgimp/Makefile.am
* libgimp/gimp.h
* libgimp/gimpadaptivesupersample.[ch]
* libgimp/gimpbilinear.[ch]: removed here...
* libgimpcolor/Makefile.am
* libgimpcolor/gimpcolortypes.h
* libgimpcolor/gimpadaptivesupersample.[ch]
* libgimpcolor/gimpbilinear.[ch]: ..and added here.
* tools/pdbgen/app.pl
* tools/pdbgen/pdb/paths.pdb
* app/*.c: changed tons of #include's
2001-05-09 Michael Natterer <mitch@gimp.org>
* configure.in
......
......@@ -93,6 +93,51 @@ gimp_SOURCES = \
user_install.c \
user_install.h \
##
## stuff for core/
##
datafiles.c \
datafiles.h \
floating_sel.c \
floating_sel.h \
fsdither.h \
gimppreviewcache.h \
gimppreviewcache.c \
parasitelist.c \
parasitelist.h \
scan_convert.c \
scan_convert.h \
##
## lowlevel stuff for base/
##
boundary.c \
boundary.h \
brush_scale.c \
brush_scale.h \
gimphistogram.c \
gimphistogram.h \
gimplut.c \
gimplut.h \
lut_funcs.c \
lut_funcs.h \
pixel_processor.c \
pixel_processor.h \
pixel_region.c \
pixel_region.h \
pixel_surround.c \
pixel_surround.h \
temp_buf.c \
temp_buf.h \
tile.c \
tile.h \
tile_pvt.h \
tile_cache.c \
tile_cache.h \
tile_manager.c \
tile_manager.h \
tile_manager_pvt.h \
tile_swap.c \
tile_swap.h \
##
## stuff that needs to be sorted into yet undecided subsystems, split up,
## removed or otherwise tortured
##
......@@ -101,21 +146,13 @@ gimp_SOURCES = \
appenums.h \
appenv.h \
apptypes.h \
asupsample.c \
asupsample.h \
authors.h \
batch.c \
batch.h \
boundary.c \
boundary.h \
brush_scale.c \
brush_scale.h \
color_transfer.c \
color_transfer.h \
context_manager.c \
context_manager.h \
datafiles.c \
datafiles.h \
drawable.c \
drawable.h \
errors.c \
......@@ -126,23 +163,14 @@ gimp_SOURCES = \
file-save.h \
file-utils.h \
file-utils.c \
floating_sel.c \
floating_sel.h \
fsdither.h \
general.c \
general.h \
gimage.c \
gimage.h \
gimphelp.c \
gimphelp.h \
gimphistogram.c \
gimphistogram.h \
gimplut.c \
gimplut.h \
gimpparasite.c \
gimpparasite.h \
gimppreviewcache.h \
gimppreviewcache.c \
gimprc.c \
gimprc.h \
gimpunit.c \
......@@ -150,11 +178,7 @@ gimp_SOURCES = \
image_new.h \
libgimp_glue.c \
libgimp_glue.h \
lut_funcs.c \
lut_funcs.h \
main.c \
parasitelist.c \
parasitelist.h \
path.c \
path.h \
pathP.h \
......@@ -163,28 +187,8 @@ gimp_SOURCES = \
path_curves.c \
path_bezier.h \
path_bezier.c \
pixel_processor.c \
pixel_processor.h \
pixel_region.c \
pixel_region.h \
pixel_surround.c \
pixel_surround.h \
plug_in.c \
plug_in.h \
scan_convert.c \
scan_convert.h \
temp_buf.c \
temp_buf.h \
tile.c \
tile.h \
tile_pvt.h \
tile_cache.c \
tile_cache.h \
tile_manager.c \
tile_manager.h \
tile_manager_pvt.h \
tile_swap.c \
tile_swap.h \
undo.c \
undo.h \
undo_types.h \
......
......@@ -23,7 +23,7 @@
#include "libgimpcolor/gimpcolor.h"
#include "libgimpwidgets/gimpwidgets.h"
#include "apptypes.h"
#include "core/core-types.h"
#include "core/gimpchannel.h"
#include "core/gimpimage.h"
......
......@@ -27,7 +27,8 @@
#include "libgimpmath/gimpmath.h"
#include "libgimpwidgets/gimpwidgets.h"
#include "apptypes.h"
#include "core/core-types.h"
#include "tools/tools-types.h"
#include "core/gimpcontext.h"
#include "core/gimpdrawable.h"
......@@ -36,9 +37,9 @@
#include "core/gimpimage.h"
#include "core/gimpimage-duplicate.h"
#include "core/gimpimage-mask.h"
#include "core/gimptoolinfo.h"
#include "tools/gimptool.h"
#include "tools/gimptoolinfo.h"
#include "tools/tool_manager.h"
#include "commands.h"
......
......@@ -26,7 +26,7 @@
#include "libgimpwidgets/gimpwidgets.h"
#include "libgimp/gimplimits.h"
#include "apptypes.h"
#include "core/core-types.h"
#include "paint-funcs/paint-funcs.h"
......
......@@ -79,7 +79,7 @@
#include "libgimp/gimpenv.h"
#include "apptypes.h"
#include "core/core-types.h"
#include "libgimp/gimpparasite.h"
#include "libgimp/gimpprotocol.h"
......@@ -319,8 +319,8 @@ plug_in_init (void)
plug_in_init_shm ();
/* search for binaries in the plug-in directory path */
datafiles_read_directories (plug_in_path, MODE_EXECUTABLE,
plug_in_init_file, NULL);
gimp_datafiles_read_directories (plug_in_path, MODE_EXECUTABLE,
plug_in_init_file, NULL);
/* read the pluginrc file for cached data */
filename = NULL;
......@@ -2370,8 +2370,8 @@ plug_in_init_file (const gchar *filename,
plug_in_def = NULL;
}
plug_in_def = plug_in_def_new (filename);
plug_in_def->mtime = datafile_mtime ();
plug_in_def = plug_in_def_new (filename);
plug_in_def->mtime = gimp_datafile_mtime ();
plug_in_def->query = TRUE;
plug_in_defs = g_slist_append (plug_in_defs, plug_in_def);
......
......@@ -27,7 +27,7 @@
#include "libgimpcolor/gimpcolor.h"
#include "libgimpwidgets/gimpwidgets.h"
#include "apptypes.h"
#include "core/core-types.h"
#include "core/gimpchannel.h"
#include "core/gimpcontext.h"
......
......@@ -27,7 +27,7 @@
#include "libgimpcolor/gimpcolor.h"
#include "libgimpwidgets/gimpwidgets.h"
#include "apptypes.h"
#include "core/core-types.h"
#include "core/gimpchannel.h"
#include "core/gimpcontext.h"
......
......@@ -44,7 +44,7 @@
#include "libgimp/gimpfeatures.h"
#include "libgimp/gimpenv.h"
#include "apptypes.h"
#include "core/core-types.h"
#include "paint-funcs/paint-funcs.h"
......
......@@ -30,67 +30,6 @@
#include "appenums.h"
/* base objects */
typedef struct _GimpObject GimpObject;
typedef struct _GimpContainer GimpContainer;
typedef struct _GimpList GimpList;
typedef struct _GimpDataList GimpDataList;
typedef struct _GimpDataFactory GimpDataFactory;
typedef struct _GimpContext GimpContext;
typedef struct _GimpViewable GimpViewable;
/* drawable objects */
typedef struct _GimpDrawable GimpDrawable;
typedef struct _GimpChannel GimpChannel;
typedef struct _GimpLayer GimpLayer;
typedef struct _GimpLayerMask GimpLayerMask;
typedef struct _GimpImage GimpImage;
/* data objects */
typedef struct _GimpData GimpData;
typedef struct _GimpBrush GimpBrush;
typedef struct _GimpBrushGenerated GimpBrushGenerated;
typedef struct _GimpBrushPipe GimpBrushPipe;
typedef struct _GimpGradient GimpGradient;
typedef struct _GimpPattern GimpPattern;
typedef struct _GimpPalette GimpPalette;
/* tools */
typedef struct _GimpToolInfo GimpToolInfo;
typedef struct _GimpTool GimpTool;
typedef struct _GimpPaintTool GimpPaintTool;
typedef struct _GimpDrawTool GimpDrawTool;
typedef struct _GimpPathTool GimpPathTool;
typedef struct _GimpTransformTool GimpTransformTool;
typedef struct _GimpBezierSelectPoint GimpBezierSelectPoint;
typedef struct _GimpBezierSelectTool GimpBezierSelectTool;
/* undo objects */
typedef struct _GimpUndo GimpUndo;
typedef struct _GimpUndoStack GimpUndoStack;
/* other stuff */
typedef struct _Argument Argument;
......@@ -152,8 +91,6 @@ typedef struct _ScanConvertPoint ScanConvertPoint;
typedef struct _Selection Selection;
typedef struct _SelectionOptions SelectionOptions;
/* some undo stuff */
......@@ -173,18 +110,9 @@ typedef void (* TileValidateProc) (TileManager *tm,
typedef void (* ToolOptionsResetFunc) (ToolOptions *tool_options);
typedef void (* GimpProgressFunc) (gint min,
gint max,
gint current,
gpointer data);
typedef void (* ImageMapApplyFunc) (PixelRegion *srcPR,
PixelRegion *destPR,
gpointer data);
typedef void (* GimpDataFileLoaderFunc) (const gchar *filename,
gpointer loader_data);
typedef GimpData * (* GimpDataObjectLoaderFunc) (const gchar *filename);
#endif /* __APPTYPES_H__ */
/* The GIMP -- an image manipulation program
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
*
* General, non-jittered adaptive supersampling library
* Copyright (C) 1997 Federico Mena Quintero
*
* 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.
*
*/
/* This code is *largely* based on the sources for POV-Ray 3.0. I am
* grateful to the POV-Team for such a great program and for making
* their sources available. All comments / bug reports /
* etc. regarding this library should be addressed to me, not to the
* POV-Ray team. Any bugs are my responsibility, not theirs.
*/
#include "config.h"
#include <stdlib.h>
#include <gtk/gtk.h>
#include "libgimpcolor/gimpcolor.h"
#include "libgimpmath/gimpmath.h"
#include "apptypes.h"
#include "appenv.h"
#include "asupsample.h"
#include "gimpprogress.h"
typedef struct
{
gchar ready;
GimpRGB color;
} GimpSampleType;
/***** Local functions *****/
static gulong gimp_render_sub_pixel (gint max_depth,
gint depth,
GimpSampleType **block,
gint x,
gint y,
gint x1,
gint y1,
gint x3,
gint y3,
gdouble threshold,
gint sub_pixel_size,
GimpRGB *color,
GimpRenderFunc render_func,
gpointer render_data);
/***** Functions *****/
gulong
gimp_adaptive_supersample_area (gint x1,
gint y1,
gint x2,
gint y2,
gint max_depth,
gdouble threshold,
GimpRenderFunc render_func,
gpointer render_data,
GimpPutPixelFunc put_pixel_func,
gpointer put_pixel_data,
GimpProgressFunc progress_func,
gpointer progress_data)
{
gint x, y, width; /* Counters, width of region */
gint xt, xtt, yt; /* Temporary counters */
gint sub_pixel_size; /* Numbe of samples per pixel (1D) */
GimpRGB color; /* Rendered pixel's color */
GimpSampleType tmp_sample; /* For swapping samples */
GimpSampleType *top_row, *bot_row, *tmp_row; /* Sample rows */
GimpSampleType **block; /* Sample block matrix */
gulong num_samples;
/* Initialize color */
gimp_rgba_set (&color, 0.0, 0.0, 0.0, 0.0);
/* Calculate sub-pixel size */
sub_pixel_size = 1 << max_depth;
/* Create row arrays */
width = x2 - x1 + 1;
top_row = g_new (GimpSampleType, sub_pixel_size * width + 1);
bot_row = g_new (GimpSampleType, sub_pixel_size * width + 1);
for (x = 0; x < (sub_pixel_size * width + 1); x++)
{
top_row[x].ready = FALSE;
gimp_rgba_set (&top_row[x].color, 0.0, 0.0, 0.0, 0.0);
bot_row[x].ready = FALSE;
gimp_rgba_set (&bot_row[x].color, 0.0, 0.0, 0.0, 0.0);
}
/* Allocate block matrix */
block = g_new (GimpSampleType *, sub_pixel_size + 1); /* Rows */
for (y = 0; y < (sub_pixel_size + 1); y++)
{
block[y] = g_new (GimpSampleType, sub_pixel_size + 1); /* Columns */
for (x = 0; x < (sub_pixel_size + 1); x++)
{
block[y][x].ready = FALSE;
gimp_rgba_set (&block[y][x].color, 0.0, 0.0, 0.0, 0.0);
}
}
/* Render region */
num_samples = 0;
for (y = y1; y <= y2; y++)
{
/* Clear the bottom row */
for (xt = 0; xt < (sub_pixel_size * width + 1); xt++)
bot_row[xt].ready = FALSE;
/* Clear first column */
for (yt = 0; yt < (sub_pixel_size + 1); yt++)
block[yt][0].ready = 0;
/* Render row */
for (x = x1; x <= x2; x++)
{
/* Initialize block by clearing all but first row/column */
for (yt = 1; yt < (sub_pixel_size + 1); yt++)
for (xt = 1; xt < (sub_pixel_size + 1); xt++)
block[yt][xt].ready = FALSE;
/* Copy samples from top row to block */
for (xtt = 0, xt = (x - x1) * sub_pixel_size;
xtt < (sub_pixel_size + 1);
xtt++, xt++)
block[0][xtt] = top_row[xt];
/* Render pixel on (x, y) */
num_samples += gimp_render_sub_pixel (max_depth, 1, block, x, y, 0, 0,
sub_pixel_size, sub_pixel_size,
threshold, sub_pixel_size,
&color,
render_func, render_data);
if (put_pixel_func)
(* put_pixel_func) (x, y, &color, put_pixel_data);
/* Copy block information to rows */
top_row[((x - x1) + 1) * sub_pixel_size] = block[0][sub_pixel_size];
for (xtt = 0, xt = (x - x1) * sub_pixel_size;
xtt < (sub_pixel_size + 1);
xtt++, xt++)
bot_row[xt] = block[sub_pixel_size][xtt];
/* Swap first and last columns */
for (yt = 0; yt < (sub_pixel_size + 1); yt++)
{
tmp_sample = block[yt][0];
block[yt][0] = block[yt][sub_pixel_size];
block[yt][sub_pixel_size] = tmp_sample;
}
}
/* Swap rows */
tmp_row = top_row;
top_row = bot_row;
bot_row = tmp_row;
/* Call progress display function */
if (progress_func && !(y & 0xf))
(* progress_func) (y1, y2, y, progress_data);
}
/* Free memory */
for (y = 0; y < (sub_pixel_size + 1); y++)
g_free (block[y]);
g_free (block);
g_free (top_row);
g_free (bot_row);
return num_samples;
}
static gulong
gimp_render_sub_pixel (gint max_depth,
gint depth,
GimpSampleType **block,
gint x,
gint y,
gint x1,
gint y1,
gint x3,
gint y3,
gdouble threshold,
gint sub_pixel_size,
GimpRGB *color,
GimpRenderFunc render_func,
gpointer render_data)