Commit 804af727 authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer

app/gimpunit.c all libgimp headers are included via gimp.h or gimpui.h, so

2000-05-31  Michael Natterer  <mitch@gimp.org>

	* app/gimpunit.c
	* libgimp/*: all libgimp headers are included via gimp.h or
	gimpui.h, so include <gtk/gtk.h> there and in the *.c files.
	Various cleanups.
parent a6b72084
2000-05-31 Michael Natterer <mitch@gimp.org>
* app/gimpunit.c
* libgimp/*: all libgimp headers are included via gimp.h or
gimpui.h, so include <gtk/gtk.h> there and in the *.c files.
Various cleanups.
Wed May 31 00:43:09 CEST 2000 Stanislav Brabec <utx@penguin.cz>
* tips/gimp_tips.cs.txt: Updated translation.
......
......@@ -20,21 +20,26 @@
*/
#include "config.h"
#include <stdlib.h>
#include <stdio.h>
#include <glib.h>
#include "unitrc.h"
#include "app_procs.h"
#include "gimprc.h"
/* NOTE:
*
* one of our header files is in libgimp/ (see the note there)
*/
#include "libgimp/gimpunit.h"
#include "libgimp/gimpenv.h"
#include "unitrc.h"
#include "app_procs.h"
#include "gimprc.h"
#include "libgimp/gimpintl.h"
#include "libgimp/gimpenv.h"
/* internal structures */
......
......@@ -20,21 +20,26 @@
*/
#include "config.h"
#include <stdlib.h>
#include <stdio.h>
#include <glib.h>
#include "unitrc.h"
#include "app_procs.h"
#include "gimprc.h"
/* NOTE:
*
* one of our header files is in libgimp/ (see the note there)
*/
#include "libgimp/gimpunit.h"
#include "libgimp/gimpenv.h"
#include "unitrc.h"
#include "app_procs.h"
#include "gimprc.h"
#include "libgimp/gimpintl.h"
#include "libgimp/gimpenv.h"
/* internal structures */
......
......@@ -8,11 +8,11 @@
</MACRO>
<MACRO>
<NAME>GIMP_MICRO_VERSION</NAME>
#define GIMP_MICRO_VERSION (22)
#define GIMP_MICRO_VERSION (23)
</MACRO>
<MACRO>
<NAME>GIMP_VERSION</NAME>
#define GIMP_VERSION "1.1.22"
#define GIMP_VERSION "1.1.23"
</MACRO>
<MACRO>
<NAME>GIMP_CHECK_VERSION</NAME>
......
......@@ -16,6 +16,7 @@
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
#include "config.h"
#include <locale.h>
......@@ -47,6 +48,8 @@
#define WAIT_ANY -1
#endif
#include <gtk/gtk.h>
#ifndef G_OS_WIN32
#include "gimpsignal.h"
#else
......
......@@ -20,7 +20,10 @@
* Boston, MA 02111-1307, USA.
*/
#include <gtk/gtk.h>
#include "gimpchainbutton.h"
#include "pixmaps/chain.xpm"
static gchar **gimp_chain_xpm[] =
......
......@@ -31,10 +31,6 @@
#ifndef __GIMP_CHAIN_BUTTON_H__
#define __GIMP_CHAIN_BUTTON_H__
#include <gtk/gtk.h>
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
......@@ -80,16 +76,15 @@ struct _GimpChainButtonClass
};
GtkType gimp_chain_button_get_type (void);
GtkWidget* gimp_chain_button_new (GimpChainPosition position);
void gimp_chain_button_set_active (GimpChainButton *gcb,
gboolean is_active);
gboolean gimp_chain_button_get_active (GimpChainButton *gcb);
GtkType gimp_chain_button_get_type (void);
GtkWidget * gimp_chain_button_new (GimpChainPosition position);
void gimp_chain_button_set_active (GimpChainButton *gcb,
gboolean is_active);
gboolean gimp_chain_button_get_active (GimpChainButton *gcb);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* __CHAIN_BUTTON_H__ */
......@@ -30,6 +30,8 @@
#include "config.h"
#include <gtk/gtk.h>
#include "gimp.h"
#include "gimpcolorbutton.h"
#include "gimplimits.h"
......
......@@ -29,8 +29,6 @@
#ifndef __GIMP_COLOR_BUTTON_H__
#define __GIMP_COLOR_BUTTON_H__
#include <gtk/gtk.h>
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
......@@ -53,22 +51,22 @@ struct _GimpColorButtonClass
};
GtkType gimp_color_button_get_type (void);
GtkWidget* gimp_color_button_new (gchar *title,
gint width,
gint height,
guchar *color,
gint bpp);
GtkWidget* gimp_color_button_double_new (gchar *title,
gint width,
gint height,
gdouble *color,
gint bpp);
void gimp_color_button_update (GimpColorButton *gcb);
GtkType gimp_color_button_get_type (void);
GtkWidget * gimp_color_button_new (gchar *title,
gint width,
gint height,
guchar *color,
gint bpp);
GtkWidget * gimp_color_button_double_new (gchar *title,
gint width,
gint height,
gdouble *color,
gint bpp);
void gimp_color_button_update (GimpColorButton *gcb);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* __COLOR_BUTTON_H__ */
......@@ -22,29 +22,35 @@
#include <glib.h>
#include <gmodule.h>
#include "gimpparasite.h"
#include <libgimp/gimpparasite.h>
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
typedef void (* GimpColorDisplayInit) (void);
typedef gpointer (* GimpColorDisplayNew) (gint type);
typedef gpointer (* GimpColorDisplayClone) (gpointer cd_ID);
typedef void (* GimpColorDisplayConvert) (gpointer cd_ID,
guchar *buf,
gint width,
gint height,
gint bpp,
gint bpl);
typedef void (* GimpColorDisplayDestroy) (gpointer cd_ID);
typedef void (* GimpColorDisplayFinalize) (void);
typedef void (* GimpColorDisplayLoadState) (gpointer cd_ID,
GimpParasite *state);
typedef GimpParasite * (* GimpColorDisplaySaveState) (gpointer cd_ID);
typedef void (* GimpColorDisplayConfigure) (gpointer cd_ID,
GFunc ok_func,
gpointer ok_data,
GFunc cancel_func,
gpointer cancel_data);
typedef void (* GimpColorDisplayConfigureCancel) (gpointer cd_ID);
/* For information look at the html documentation */
typedef void (* GimpColorDisplayInit) (void);
typedef gpointer (* GimpColorDisplayNew) (gint type);
typedef gpointer (* GimpColorDisplayClone) (gpointer cd_ID);
typedef void (* GimpColorDisplayConvert) (gpointer cd_ID,
guchar *buf,
gint width,
gint height,
gint bpp,
gint bpl);
typedef void (* GimpColorDisplayDestroy) (gpointer cd_ID);
typedef void (* GimpColorDisplayFinalize) (void);
typedef void (* GimpColorDisplayLoadState) (gpointer cd_ID,
GimpParasite *state);
typedef GimpParasite * (* GimpColorDisplaySaveState) (gpointer cd_ID);
typedef void (* GimpColorDisplayConfigure) (gpointer cd_ID,
GFunc ok_func,
gpointer ok_data,
GFunc cancel_func,
gpointer cancel_data);
typedef void (* GimpColorDisplayConfigureCancel) (gpointer cd_ID);
typedef struct _GimpColorDisplayMethods GimpColorDisplayMethods;
......@@ -73,4 +79,9 @@ gboolean gimp_color_display_register (const gchar *name,
G_MODULE_EXPORT
gboolean gimp_color_display_unregister (const gchar *name);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* __GIMP_COLOR_DISPLAY_H__ */
......@@ -21,6 +21,10 @@
#ifndef __COLOR_SELECTOR_H__
#define __COLOR_SELECTOR_H__
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
/* For information look at the html documentation */
......@@ -56,6 +60,7 @@ struct _GimpColorSelectorMethods
typedef gpointer GimpColorSelectorID;
#ifndef __COLOR_NOTEBOOK_C__
/* Bypass when compiling the source for these functions.
......@@ -66,10 +71,15 @@ GimpColorSelectorID gimp_color_selector_register (const gchar *name,
typedef void (* GimpColorSelectorFinishedCB) (gpointer finished_data);
gboolean gimp_color_selector_unregister (GimpColorSelectorID id,
gboolean gimp_color_selector_unregister (GimpColorSelectorID id,
GimpColorSelectorFinishedCB finished_cb,
gpointer finished_data);
#endif /* !__COLOR_NOTEBOOK_C__ */
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* __COLOR_SELECTOR_H__ */
......@@ -20,6 +20,13 @@
#ifndef __GIMPCOLORSPACE_H__
#define __GIMPCOLORSPACE_H__
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
/* For information look into the C source or the html documentation */
/* Color conversion routines */
void gimp_rgb_to_hsv (gint *red /* returns hue */,
......@@ -65,4 +72,9 @@ void gimp_hsv_to_rgb4 (guchar *rgb,
(g) * INTENSITY_GREEN + \
(b) * INTENSITY_BLUE + 0.001)
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* __GIMPCOLORSPACE_H__ */
......@@ -23,6 +23,7 @@
extern "C" {
#endif /* __cplusplus */
/* some compatibility defines for older plug-ins */
#ifndef GIMP_DISABLE_COMPAT_H
......@@ -77,6 +78,7 @@ extern "C" {
#endif /* GIMP_DISABLE_COMPAT_H */
#ifdef __cplusplus
}
#endif /* __cplusplus */
......
......@@ -19,7 +19,10 @@
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
#include "libgimp/gimpdialog.h"
#include <gtk/gtk.h>
#include "gimpdialog.h"
#include "pixmaps/wilber.xpm"
......
......@@ -19,18 +19,19 @@
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
#ifndef __GIMP_DIALOG_H__
#define __GIMP_DIALOG_H__
#include <gtk/gtk.h>
#include "gimphelpui.h"
#include "gimpunit.h"
#include <libgimp/gimphelpui.h>
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
/* For information look into the C source or the html documentation */
GtkWidget * gimp_dialog_new (const gchar *title,
const gchar *wmclass_name,
GimpHelpFunc help_func,
......@@ -83,24 +84,9 @@ void gimp_dialog_create_action_area (GtkDialog *dialog,
void gimp_dialog_create_action_areav (GtkDialog *dialog,
va_list args);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* __GIMP_DIALOG_H__ */
......@@ -30,6 +30,7 @@ extern "C" {
/* For information look into the C source or the html documentation */
gchar * gimp_directory (void);
gchar * gimp_personal_rc_file (gchar *basename);
gchar * gimp_data_directory (void);
......@@ -44,6 +45,7 @@ void gimp_path_free (GList *path);
gchar * gimp_path_get_user_writable_dir (GList *path);
#ifdef __cplusplus
}
#endif /* __cplusplus */
......
......@@ -23,13 +23,15 @@
#ifndef __GIMP_EXPORT_H__
#define __GIMP_EXPORT_H__
#include <glib.h>
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
typedef enum {
/* For information look into the C source or the html documentation */
typedef enum
{
CAN_HANDLE_RGB = 1 << 0,
CAN_HANDLE_GRAY = 1 << 1,
CAN_HANDLE_INDEXED = 1 << 2,
......@@ -51,8 +53,9 @@ GimpExportReturnType gimp_export_image (gint32 *image_ID,
gchar *format_name,
GimpExportCapabilities capabilities);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif
#endif /* __GIMP_EXPORT_H__ */
......@@ -30,6 +30,8 @@
#endif
#include <string.h>
#include <gtk/gtk.h>
#include "gimpfileselection.h"
#include "libgimp-intl.h"
......@@ -37,6 +39,7 @@
#include "pixmaps/yes.xpm"
#include "pixmaps/no.xpm"
#ifdef G_OS_WIN32
# ifndef S_ISDIR
# define S_ISDIR(m) ((m) & _S_IFDIR)
......
......@@ -23,12 +23,13 @@
#ifndef __GIMP_FILE_SELECTION_H__
#define __GIMP_FILE_SELECTION_H__
#include <gtk/gtk.h>
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
/* For information look into the C source or the html documentation */
#define GIMP_TYPE_FILE_SELECTION (gimp_file_selection_get_type ())
#define GIMP_FILE_SELECTION(obj) (GTK_CHECK_CAST ((obj), GIMP_TYPE_FILE_SELECTION, GimpFileSelection))
#define GIMP_FILE_SELECTION_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GIMP_TYPE_FILE_SELECTION, GimpFileSelectionClass))
......@@ -79,6 +80,7 @@ gchar* gimp_file_selection_get_filename (GimpFileSelection *gfs);
void gimp_file_selection_set_filename (GimpFileSelection *gfs,
gchar *filename);
#ifdef __cplusplus
}
#endif /* __cplusplus */
......
/* LIBGIMP - The GIMP Library
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
*
* gimphelp.c
* gimphelp_pdb.c
* Copyright (C) 2000 Michael Natterer <mitch@gimp.org>
*
* This library is free software; you can redistribute it and/or
......
......@@ -19,6 +19,7 @@
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
#include <gdk/gdkkeysyms.h>
#include <gtk/gtk.h>
......
......@@ -19,15 +19,17 @@
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
#ifndef __GIMP_HELP_UI_H__
#define __GIMP_HELP_UI_H__
#include <gtk/gtk.h>
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
/* For information look into the C source or the html documentation */
typedef void (* GimpHelpFunc) (gchar *help_data);
void gimp_help_init (void);
......@@ -54,13 +56,9 @@ void gimp_help_set_help_data (GtkWidget *widget,
/* activate the context help inspector */
void gimp_context_help (void);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* __GIMP_HELP_UI_H__ */
/* LIBGIMP - The GIMP Library
* Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball
*
* libgimp-intl.h
* gimpintl.h
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
......@@ -18,15 +18,17 @@
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
#ifndef __GIMPINTL_H__
#define __GIMPINTL_H__
#include <glib.h>
#include <locale.h>
/* Copied from gnome-i18n.h by Tom Tromey <tromey@creche.cygnus.com> *
* Heavily modified by Daniel Egger <Daniel.Egger@t-online.de> *
* So be sure to hit me instead of him if something is wrong here */
/* Copied from gnome-i18n.h by Tom Tromey <tromey@creche.cygnus.com>
* Heavily modified by Daniel Egger <Daniel.Egger@t-online.de>
* So be sure to hit me instead of him if something is wrong here
*/
#ifndef LOCALEDIR
#define LOCALEDIR g_strconcat (gimp_data_directory (), \
......
......@@ -19,9 +19,11 @@
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
#ifndef __GIMP_LIMITS_H__
#define __GIMP_LIMITS_H__
/* pixel sizes
*/
#define GIMP_MIN_IMAGE_SIZE 1
......@@ -42,4 +44,5 @@
#define GIMP_CHECK_DARK 0.4 /* corresponds to GRAY_CHECKS as */
#define GIMP_CHECK_LIGHT 0.6 /* defined in app/image_render.c */
#endif /* __GIMP_LIMITS_H__ */
......@@ -20,19 +20,21 @@
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
#ifndef __GIMPMATH_H__
#define __GIMPMATH_H__
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#include <math.h>
#ifdef G_OS_WIN32
#include <float.h>
#endif
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
/* Some portability enhancing stuff. For use both by the gimp app
* as well as plug-ins and modules.
*
......@@ -90,8 +92,9 @@ extern "C" {
#endif
#endif
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* __GIMPMATH_H__ */
#endif /* __GIMPMATH_H__ */
......@@ -20,9 +20,12 @@
* Boston, MA 02111-1307, USA.
*/
#include <glib.h>
#include "gimpmath.h"
#include "gimpmatrix.h"
#define EPSILON 1e-6
......
......@@ -23,12 +23,11 @@
#ifndef __GIMP_MATRIX_H__
#define __GIMP_MATRIX_H__
#include <glib.h>
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
typedef gdouble GimpMatrix3[3][3];
typedef gdouble GimpMatrix4[4][4];
......@@ -68,8 +67,9 @@ void gimp_matrix4_to_deg (GimpMatrix4 matrix,
gdouble *b,
gdouble *c);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* __GIMP_MATRIX_H__ */
#endif /* __GIMP_MATRIX_H__ */
......@@ -16,69 +16,66 @@
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
#ifndef __GIMP_MENU_H__
#define __GIMP_MENU_H__
#include <gtk/gtk.h>
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
typedef gint (*GimpConstraintFunc) (gint32 image_id,
gint32 drawable_id,
gpointer data);
typedef void (*GimpMenuCallback) (gint32 id,
gpointer data);
typedef gint (* GimpConstraintFunc) (gint32 image_id,
gint32 drawable_id,
gpointer data);
typedef void (* GimpMenuCallback) (gint32 id,
gpointer data);
/* Popup the brush dialog interactively */
typedef void (* GRunBrushCallback) (gchar *name,
gdouble opacity,
gint spacing,
gint paint_mode,
gint width,
gint height,
gchar *mask_data,
gboolean dialog_closing,
gpointer user_data);
typedef void (* GRunBrushCallback) (gchar *name,
gdouble opacity,
gint spacing,
gint paint_mode,
gint width,
gint height,
gchar *mask_data,
gboolean dialog_closing,
gpointer user_data);
/* Popup the pattern dialog */
typedef void (*GRunPatternCallback) (gchar *name,
gint width,
gint height,
gint bpp,
gchar *mask_data,
gboolean dialog_closing,
gpointer user_data);
typedef void (* GRunPatternCallback) (gchar *name,
gint width,
gint height,
gint bpp,
gchar *mask_data,
gboolean dialog_closing,
gpointer user_data);
/* Popup the gradient dialog */
typedef void (*GRunGradientCallback) (gchar *name,