1997-11-25 06:05:25 +08:00
|
|
|
/* The GIMP -- an image manipulation program
|
2001-02-14 12:55:21 +08:00
|
|
|
* Copyright (C) 1995-2001 Spencer Kimball, Peter Mattis and others
|
1997-11-25 06:05:25 +08:00
|
|
|
*
|
|
|
|
* 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
|
1998-04-13 13:44:11 +08:00
|
|
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
1997-11-25 06:05:25 +08:00
|
|
|
*/
|
2000-11-18 08:25:42 +08:00
|
|
|
|
2000-04-28 01:27:28 +08:00
|
|
|
#include "config.h"
|
1999-10-30 18:39:48 +08:00
|
|
|
|
2000-12-29 23:22:01 +08:00
|
|
|
#include <gtk/gtk.h>
|
2000-12-17 05:37:03 +08:00
|
|
|
|
2001-05-10 06:34:59 +08:00
|
|
|
#include "tools-types.h"
|
2000-12-17 05:37:03 +08:00
|
|
|
|
2002-02-09 08:11:11 +08:00
|
|
|
/*FIXME: remove when proper module loading is in place */
|
|
|
|
#include "core/gimp.h"
|
|
|
|
#include "core/gimpcoreconfig.h"
|
|
|
|
#include "core/gimpdatafiles.h"
|
|
|
|
/*end remove */
|
|
|
|
|
2002-03-29 11:50:29 +08:00
|
|
|
#include "libgimptool/gimptool.h"
|
|
|
|
#include "libgimptool/gimptoolmodule.h"
|
|
|
|
|
2001-02-22 05:56:39 +08:00
|
|
|
#include "tool_manager.h"
|
|
|
|
|
2001-03-08 09:07:03 +08:00
|
|
|
#include "gimpairbrushtool.h"
|
2001-03-31 22:10:22 +08:00
|
|
|
#include "gimpbezierselecttool.h"
|
2001-03-08 09:07:03 +08:00
|
|
|
#include "gimpblendtool.h"
|
2001-05-25 07:57:08 +08:00
|
|
|
#include "gimpbrightnesscontrasttool.h"
|
2001-03-08 09:07:03 +08:00
|
|
|
#include "gimpbucketfilltool.h"
|
|
|
|
#include "gimpbycolorselecttool.h"
|
|
|
|
#include "gimpclonetool.h"
|
2001-05-25 07:57:08 +08:00
|
|
|
#include "gimpcolorbalancetool.h"
|
2001-02-27 13:21:12 +08:00
|
|
|
#include "gimpcolorpickertool.h"
|
2001-03-08 09:07:03 +08:00
|
|
|
#include "gimpconvolvetool.h"
|
|
|
|
#include "gimpcroptool.h"
|
2001-05-25 07:57:08 +08:00
|
|
|
#include "gimpcurvestool.h"
|
2001-03-08 09:07:03 +08:00
|
|
|
#include "gimpdodgeburntool.h"
|
|
|
|
#include "gimpellipseselecttool.h"
|
|
|
|
#include "gimperasertool.h"
|
|
|
|
#include "gimpfliptool.h"
|
|
|
|
#include "gimpfreeselecttool.h"
|
|
|
|
#include "gimpfuzzyselecttool.h"
|
2001-05-25 07:57:08 +08:00
|
|
|
#include "gimphistogramtool.h"
|
|
|
|
#include "gimphuesaturationtool.h"
|
2001-03-08 09:07:03 +08:00
|
|
|
#include "gimpinktool.h"
|
2001-03-12 06:19:06 +08:00
|
|
|
#include "gimpiscissorstool.h"
|
2001-05-25 07:57:08 +08:00
|
|
|
#include "gimplevelstool.h"
|
2001-03-08 09:07:03 +08:00
|
|
|
#include "gimpmagnifytool.h"
|
|
|
|
#include "gimpmeasuretool.h"
|
|
|
|
#include "gimpmovetool.h"
|
2001-02-27 13:21:12 +08:00
|
|
|
#include "gimppaintbrushtool.h"
|
2001-04-07 22:55:39 +08:00
|
|
|
#include "gimppathtool.h"
|
2001-03-08 09:07:03 +08:00
|
|
|
#include "gimppenciltool.h"
|
|
|
|
#include "gimpperspectivetool.h"
|
2001-05-25 07:57:08 +08:00
|
|
|
#include "gimpposterizetool.h"
|
2001-03-08 09:07:03 +08:00
|
|
|
#include "gimprectselecttool.h"
|
2001-05-25 07:57:08 +08:00
|
|
|
#include "gimpthresholdtool.h"
|
2001-03-08 09:07:03 +08:00
|
|
|
#include "gimprotatetool.h"
|
|
|
|
#include "gimpscaletool.h"
|
|
|
|
#include "gimpsheartool.h"
|
|
|
|
#include "gimpsmudgetool.h"
|
|
|
|
#include "gimptexttool.h"
|
2002-02-22 08:11:37 +08:00
|
|
|
#include "gimpvectortool.h"
|
2000-04-28 01:27:28 +08:00
|
|
|
|
2002-02-10 02:51:17 +08:00
|
|
|
void
|
|
|
|
cheesey_module_loading_hack (const gchar *filename,
|
|
|
|
gpointer loader_data)
|
|
|
|
{
|
2002-05-03 19:31:08 +08:00
|
|
|
gimp_tool_module_new (filename, tool_manager_register_tool, loader_data);
|
2002-02-09 08:11:11 +08:00
|
|
|
}
|
|
|
|
|
2001-02-14 12:55:21 +08:00
|
|
|
void
|
2001-07-07 20:17:23 +08:00
|
|
|
tools_init (Gimp *gimp)
|
1997-11-25 06:05:25 +08:00
|
|
|
{
|
2001-11-21 07:00:47 +08:00
|
|
|
GimpToolRegisterFunc register_funcs[] =
|
|
|
|
{
|
|
|
|
/* register tools in reverse order */
|
|
|
|
|
|
|
|
/* color tools */
|
|
|
|
gimp_posterize_tool_register,
|
|
|
|
gimp_curves_tool_register,
|
|
|
|
gimp_levels_tool_register,
|
|
|
|
gimp_threshold_tool_register,
|
|
|
|
gimp_brightness_contrast_tool_register,
|
|
|
|
gimp_hue_saturation_tool_register,
|
|
|
|
gimp_color_balance_tool_register,
|
|
|
|
|
|
|
|
/* paint tools */
|
|
|
|
|
|
|
|
gimp_smudge_tool_register,
|
|
|
|
gimp_dodgeburn_tool_register,
|
|
|
|
gimp_convolve_tool_register,
|
|
|
|
gimp_clone_tool_register,
|
|
|
|
gimp_ink_tool_register,
|
|
|
|
gimp_airbrush_tool_register,
|
|
|
|
gimp_eraser_tool_register,
|
|
|
|
gimp_paintbrush_tool_register,
|
|
|
|
gimp_pencil_tool_register,
|
|
|
|
gimp_blend_tool_register,
|
|
|
|
gimp_bucket_fill_tool_register,
|
|
|
|
gimp_text_tool_register,
|
|
|
|
|
|
|
|
/* transform tools */
|
|
|
|
|
|
|
|
gimp_flip_tool_register,
|
|
|
|
gimp_perspective_tool_register,
|
|
|
|
gimp_shear_tool_register,
|
|
|
|
gimp_scale_tool_register,
|
|
|
|
gimp_rotate_tool_register,
|
|
|
|
gimp_crop_tool_register,
|
|
|
|
gimp_move_tool_register,
|
|
|
|
|
|
|
|
/* non-modifying tools */
|
|
|
|
|
|
|
|
gimp_path_tool_register,
|
2002-02-22 08:11:37 +08:00
|
|
|
gimp_vector_tool_register,
|
2001-11-21 07:00:47 +08:00
|
|
|
gimp_measure_tool_register,
|
|
|
|
gimp_magnify_tool_register,
|
|
|
|
gimp_histogram_tool_register,
|
|
|
|
gimp_color_picker_tool_register,
|
|
|
|
|
|
|
|
/* selection tools */
|
|
|
|
|
|
|
|
gimp_bezier_select_tool_register,
|
|
|
|
gimp_iscissors_tool_register,
|
|
|
|
gimp_by_color_select_tool_register,
|
|
|
|
gimp_fuzzy_select_tool_register,
|
|
|
|
gimp_free_select_tool_register,
|
|
|
|
gimp_ellipse_select_tool_register,
|
|
|
|
gimp_rect_select_tool_register
|
|
|
|
};
|
|
|
|
|
|
|
|
gint i;
|
|
|
|
|
|
|
|
for (i = 0; i < G_N_ELEMENTS (register_funcs); i++)
|
|
|
|
{
|
2002-03-29 11:50:29 +08:00
|
|
|
register_funcs[i] (tool_manager_register_tool, gimp);
|
2001-11-21 07:00:47 +08:00
|
|
|
}
|
2002-02-09 08:11:11 +08:00
|
|
|
|
2002-03-29 11:50:29 +08:00
|
|
|
#if 0
|
2002-02-09 08:11:11 +08:00
|
|
|
if (g_module_supported ())
|
|
|
|
gimp_datafiles_read_directories (gimp->config->tool_plug_in_path,
|
|
|
|
0 /* no flags */,
|
|
|
|
cheesey_module_loading_hack,
|
|
|
|
gimp);
|
2002-03-29 11:50:29 +08:00
|
|
|
#endif
|
2002-02-09 08:11:11 +08:00
|
|
|
|
1998-04-02 12:51:44 +08:00
|
|
|
}
|
2001-05-25 09:24:12 +08:00
|
|
|
|
|
|
|
void
|
2001-07-07 20:17:23 +08:00
|
|
|
tools_exit (Gimp *gimp)
|
2001-05-25 09:24:12 +08:00
|
|
|
{
|
|
|
|
}
|