From be3597e3c71601cb77207e76d68f72eb935f1385 Mon Sep 17 00:00:00 2001 From: Michael Natterer Date: Sun, 13 Jul 2025 11:05:20 +0200 Subject: [PATCH] pdb, libgimp: more #pragma once, and formatting cleanup --- libgimp/gimp.h | 7 +-- libgimp/gimp_pdb_headers.h | 6 +-- libgimp/gimpaspectpreview.h | 14 +++--- libgimp/gimpbatchprocedure.h | 10 ++-- libgimp/gimpbrush.h | 15 +++--- libgimp/gimpbrushchooser.h | 13 +++-- libgimp/gimpchannel.h | 17 +++---- libgimp/gimpdisplay.h | 14 +++--- libgimp/gimpdrawable.h | 16 +++--- libgimp/gimpdrawablechooser.h | 29 ++++++----- libgimp/gimpdrawablefilter.h | 38 +++++++------- libgimp/gimpdrawablefilterconfig.h | 14 +++--- libgimp/gimpdrawablepreview.h | 14 +++--- libgimp/gimpenums.h | 7 +-- libgimp/gimpexportoptions.h | 13 ++--- libgimp/gimpexportprocedure.h | 35 +++++++------ libgimp/gimpexportproceduredialog.h | 13 +++-- libgimp/gimpfileprocedure.h | 12 ++--- libgimp/gimpfont.h | 15 +++--- libgimp/gimpfontchooser.h | 13 +++-- libgimp/gimpgimprc.h | 8 +-- libgimp/gimpgpparams.h | 7 +-- libgimp/gimpgradient.h | 15 +++--- libgimp/gimpgradientchooser.h | 13 +++-- libgimp/gimpgrouplayer.h | 18 +++---- libgimp/gimpimage.h | 14 +++--- libgimp/gimpimagecolorprofile.h | 8 +-- libgimp/gimpimagecombobox.h | 16 +++--- libgimp/gimpimagemetadata.h | 9 +--- libgimp/gimpimageprocedure.h | 23 ++++----- libgimp/gimpitem.h | 13 +++-- libgimp/gimpitemcombobox.h | 17 +++---- libgimp/gimplayer.h | 10 ++-- libgimp/gimplayermask.h | 16 +++--- libgimp/gimploadprocedure.h | 11 ++-- libgimp/gimppalette.h | 15 +++--- libgimp/gimppalettechooser.h | 13 +++-- libgimp/gimpparamspecs-desc.h | 9 +--- libgimp/gimpparamspecs.h | 8 +-- libgimp/gimppath.h | 13 +++-- libgimp/gimppattern.h | 16 +++--- libgimp/gimppatternchooser.h | 12 ++--- libgimp/gimppdb-private.h | 19 +++---- libgimp/gimppdb.h | 13 +++-- libgimp/gimppdbprocedure.h | 11 ++-- libgimp/gimppixbuf.h | 8 +-- libgimp/gimpplugin.h | 15 +++--- libgimp/gimpprocbrowserdialog.h | 14 +++--- libgimp/gimpprocedure-params.h | 8 +-- libgimp/gimpprocedure.h | 13 +++-- libgimp/gimpprocedureconfig-private.h | 7 +-- libgimp/gimpprocedureconfig.h | 14 +++--- libgimp/gimpproceduredialog.h | 14 +++--- libgimp/gimpprocview.h | 9 +--- libgimp/gimpprogress.h | 7 +-- libgimp/gimpprogressbar.h | 16 +++--- libgimp/gimppropwidgets.h | 46 ++++++++--------- libgimp/gimpresolutionentry-private.h | 67 ++++++++++++------------- libgimp/gimpresource.h | 14 +++--- libgimp/gimpresourcechooser.h | 13 ++--- libgimp/gimpresourceselect-private.h | 26 +++++----- libgimp/gimpselection.h | 24 ++++----- libgimp/gimptextlayer.h | 18 +++---- libgimp/gimpthumbnailprocedure.h | 23 ++++----- libgimp/gimptilebackendplugin.h | 5 +- libgimp/gimptypes.h | 6 +-- libgimp/gimpui.h | 6 +-- libgimp/gimpuitypes.h | 6 +-- libgimp/gimpvectorloadprocedure.h | 31 ++++++------ libgimp/gimpvectorloadproceduredialog.h | 14 +++--- libgimp/gimpzoompreview.h | 14 +++--- libgimp/libgimp-intl.h | 6 +-- libgimp/stdplugins-intl.h | 6 +-- libgimpcolor/gimpadaptivesupersample.h | 6 +-- libgimpcolor/gimpbilinear.h | 6 +-- libgimpcolor/gimpcairo.h | 6 +-- libgimpcolor/gimpcolor-private.h | 7 +-- libgimpcolor/gimpcolor.h | 6 +-- libgimpcolor/gimpcolormanaged.h | 12 ++--- libgimpcolor/gimpcolorprofile.h | 11 ++-- libgimpcolor/gimpcolortransform.h | 11 ++-- libgimpcolor/gimpcolortypes.h | 8 +-- libgimpcolor/gimppixbuf.h | 6 +-- libgimpmodule/gimpmodule.h | 17 +++---- libgimpmodule/gimpmoduledb.h | 15 +++--- libgimpmodule/gimpmoduletypes.h | 8 +-- libgimpthumb/gimpthumb-enums.h | 7 +-- libgimpthumb/gimpthumb-error.h | 9 +--- libgimpthumb/gimpthumb-types.h | 7 +-- libgimpthumb/gimpthumb-utils.h | 7 +-- libgimpthumb/gimpthumb.h | 5 +- libgimpthumb/gimpthumbnail.h | 14 +++--- pdb/enumcode.pl | 8 +-- pdb/lib.pl | 7 +-- 94 files changed, 521 insertions(+), 754 deletions(-) diff --git a/libgimp/gimp.h b/libgimp/gimp.h index d130eba575..64391e8056 100644 --- a/libgimp/gimp.h +++ b/libgimp/gimp.h @@ -18,8 +18,7 @@ * . */ -#ifndef __GIMP_H__ -#define __GIMP_H__ +#pragma once #include #include @@ -83,7 +82,6 @@ G_BEGIN_DECLS - /** * GIMP_MAIN: * @plug_in_type: The #GType of the plug-in's #GimpPlugIn subclass @@ -202,7 +200,4 @@ const gchar * gimp_icon_theme_dir (void) G_GNUC_CONST; const gchar * gimp_get_progname (void) G_GNUC_CONST; - G_END_DECLS - -#endif /* __GIMP_H__ */ diff --git a/libgimp/gimp_pdb_headers.h b/libgimp/gimp_pdb_headers.h index 65ef2e9104..e908f04d41 100644 --- a/libgimp/gimp_pdb_headers.h +++ b/libgimp/gimp_pdb_headers.h @@ -20,13 +20,12 @@ /* NOTE: This file is auto-generated by pdbgen.pl */ +#pragma once + #if !defined (__GIMP_H_INSIDE__) && !defined (GIMP_COMPILATION) #error "Only can be included directly." #endif -#ifndef __GIMP_PDB_HEADERS_H__ -#define __GIMP_PDB_HEADERS_H__ - #include #include #include @@ -83,4 +82,3 @@ #include #include -#endif /* __GIMP_PDB_HEADERS_H__ */ diff --git a/libgimp/gimpaspectpreview.h b/libgimp/gimpaspectpreview.h index 84f3cf4bad..e6a498af90 100644 --- a/libgimp/gimpaspectpreview.h +++ b/libgimp/gimpaspectpreview.h @@ -18,26 +18,24 @@ * . */ +#pragma once + #if !defined (__GIMP_UI_H_INSIDE__) && !defined (GIMP_COMPILATION) #error "Only can be included directly." #endif -#ifndef __GIMP_ASPECT_PREVIEW_H__ -#define __GIMP_ASPECT_PREVIEW_H__ - G_BEGIN_DECLS - /* For information look into the C source or the html documentation */ #define GIMP_TYPE_ASPECT_PREVIEW (gimp_aspect_preview_get_type ()) -G_DECLARE_FINAL_TYPE (GimpAspectPreview, gimp_aspect_preview, GIMP, ASPECT_PREVIEW, GimpPreview) +G_DECLARE_FINAL_TYPE (GimpAspectPreview, + gimp_aspect_preview, + GIMP, ASPECT_PREVIEW, + GimpPreview) GtkWidget * gimp_aspect_preview_new_from_drawable (GimpDrawable *drawable); - G_END_DECLS - -#endif /* __GIMP_ASPECT_PREVIEW_H__ */ diff --git a/libgimp/gimpbatchprocedure.h b/libgimp/gimpbatchprocedure.h index dc59bf7dc2..eefb2a06c1 100644 --- a/libgimp/gimpbatchprocedure.h +++ b/libgimp/gimpbatchprocedure.h @@ -19,8 +19,7 @@ * . */ -#ifndef __GIMP_BATCH_PROCEDURE_H__ -#define __GIMP_BATCH_PROCEDURE_H__ +#pragma once #include @@ -51,7 +50,10 @@ typedef GimpValueArray * (* GimpBatchFunc) (GimpProcedure *procedure, #define GIMP_TYPE_BATCH_PROCEDURE (gimp_batch_procedure_get_type ()) -G_DECLARE_FINAL_TYPE (GimpBatchProcedure, gimp_batch_procedure, GIMP, BATCH_PROCEDURE, GimpProcedure) +G_DECLARE_FINAL_TYPE (GimpBatchProcedure, + gimp_batch_procedure, + GIMP, BATCH_PROCEDURE, + GimpProcedure) GimpProcedure * gimp_batch_procedure_new (GimpPlugIn *plug_in, @@ -67,5 +69,3 @@ void gimp_batch_procedure_set_interpreter_name (GimpBatchProcedure *p const gchar * gimp_batch_procedure_get_interpreter_name (GimpBatchProcedure *procedure); G_END_DECLS - -#endif /* __GIMP_BATCH_PROCEDURE_H__ */ diff --git a/libgimp/gimpbrush.h b/libgimp/gimpbrush.h index 5c159ce681..de4393faac 100644 --- a/libgimp/gimpbrush.h +++ b/libgimp/gimpbrush.h @@ -19,23 +19,24 @@ * . */ +#pragma once + #if !defined (__GIMP_H_INSIDE__) && !defined (GIMP_COMPILATION) #error "Only can be included directly." #endif -#ifndef __GIMP_BRUSH_H__ -#define __GIMP_BRUSH_H__ +#include G_BEGIN_DECLS /* For information look into the C source or the html documentation */ -#include - - #define GIMP_TYPE_BRUSH (gimp_brush_get_type ()) -G_DECLARE_FINAL_TYPE (GimpBrush, gimp_brush, GIMP, BRUSH, GimpResource) +G_DECLARE_FINAL_TYPE (GimpBrush, + gimp_brush, + GIMP, BRUSH, + GimpResource) GeglBuffer * gimp_brush_get_buffer (GimpBrush *brush, @@ -48,5 +49,3 @@ GeglBuffer * gimp_brush_get_mask (GimpBrush *brush, const Babl *format) G_GNUC_WARN_UNUSED_RESULT; G_END_DECLS - -#endif /* __GIMP_BRUSH_H__ */ diff --git a/libgimp/gimpbrushchooser.h b/libgimp/gimpbrushchooser.h index 1976cfa5db..4db04dbba1 100644 --- a/libgimp/gimpbrushchooser.h +++ b/libgimp/gimpbrushchooser.h @@ -18,26 +18,25 @@ * . */ +#pragma once + #if !defined (__GIMP_UI_H_INSIDE__) && !defined (GIMP_COMPILATION) #error "Only can be included directly." #endif -#ifndef __GIMP_BRUSH_CHOOSER_H__ -#define __GIMP_BRUSH_CHOOSER_H__ - #include G_BEGIN_DECLS #define GIMP_TYPE_BRUSH_CHOOSER (gimp_brush_chooser_get_type ()) -G_DECLARE_FINAL_TYPE (GimpBrushChooser, gimp_brush_chooser, GIMP, BRUSH_CHOOSER, GimpResourceChooser) +G_DECLARE_FINAL_TYPE (GimpBrushChooser, + gimp_brush_chooser, + GIMP, BRUSH_CHOOSER, + GimpResourceChooser) GtkWidget * gimp_brush_chooser_new (const gchar *title, const gchar *label, GimpBrush *brush); - G_END_DECLS - -#endif /* __GIMP_BRUSH_CHOOSER_H__ */ diff --git a/libgimp/gimpchannel.h b/libgimp/gimpchannel.h index b31f10a628..07a51c5d06 100644 --- a/libgimp/gimpchannel.h +++ b/libgimp/gimpchannel.h @@ -18,22 +18,24 @@ * . */ +#pragma once + #if !defined (__GIMP_H_INSIDE__) && !defined (GIMP_COMPILATION) #error "Only can be included directly." #endif -#ifndef __GIMP_CHANNEL_H__ -#define __GIMP_CHANNEL_H__ +#include G_BEGIN_DECLS /* For information look into the C source or the html documentation */ -#include - #define GIMP_TYPE_CHANNEL (gimp_channel_get_type ()) -G_DECLARE_DERIVABLE_TYPE (GimpChannel, gimp_channel, GIMP, CHANNEL, GimpDrawable) +G_DECLARE_DERIVABLE_TYPE (GimpChannel, + gimp_channel, + GIMP, CHANNEL, + GimpDrawable) struct _GimpChannelClass @@ -54,9 +56,6 @@ struct _GimpChannelClass }; -GimpChannel * gimp_channel_get_by_id (gint32 channel_id); - +GimpChannel * gimp_channel_get_by_id (gint32 channel_id); G_END_DECLS - -#endif /* __GIMP_CHANNEL_H__ */ diff --git a/libgimp/gimpdisplay.h b/libgimp/gimpdisplay.h index 7bd1ad309d..6fc03adbb7 100644 --- a/libgimp/gimpdisplay.h +++ b/libgimp/gimpdisplay.h @@ -19,21 +19,22 @@ * . */ +#pragma once + #if !defined (__GIMP_H_INSIDE__) && !defined (GIMP_COMPILATION) #error "Only can be included directly." #endif -#ifndef __GIMP_DISPLAY_H__ -#define __GIMP_DISPLAY_H__ - G_BEGIN_DECLS - /* For information look into the C source or the html documentation */ #define GIMP_TYPE_DISPLAY (gimp_display_get_type ()) -G_DECLARE_FINAL_TYPE (GimpDisplay, gimp_display, GIMP, DISPLAY, GObject) +G_DECLARE_FINAL_TYPE (GimpDisplay, + gimp_display, + GIMP, DISPLAY, + GObject) gint32 gimp_display_get_id (GimpDisplay *display); @@ -41,7 +42,4 @@ GimpDisplay * gimp_display_get_by_id (gint32 display_id); gboolean gimp_display_is_valid (GimpDisplay *display); - G_END_DECLS - -#endif /* __GIMP_DISPLAY_H__ */ diff --git a/libgimp/gimpdrawable.h b/libgimp/gimpdrawable.h index cc42c7675e..4ef1ce141e 100644 --- a/libgimp/gimpdrawable.h +++ b/libgimp/gimpdrawable.h @@ -18,23 +18,24 @@ * . */ +#pragma once + #if !defined (__GIMP_H_INSIDE__) && !defined (GIMP_COMPILATION) #error "Only can be included directly." #endif -#ifndef __GIMP_DRAWABLE_H__ -#define __GIMP_DRAWABLE_H__ +#include G_BEGIN_DECLS /* For information look into the C source or the html documentation */ -#include - - #define GIMP_TYPE_DRAWABLE (gimp_drawable_get_type ()) -G_DECLARE_DERIVABLE_TYPE (GimpDrawable, gimp_drawable, GIMP, DRAWABLE, GimpItem) +G_DECLARE_DERIVABLE_TYPE (GimpDrawable, + gimp_drawable, + GIMP, DRAWABLE, + GimpItem) struct _GimpDrawableClass @@ -111,7 +112,4 @@ void gimp_drawable_merge_new_filter (GimpDrawable gdouble opacity, ...) G_GNUC_NULL_TERMINATED; - G_END_DECLS - -#endif /* __GIMP_DRAWABLE_H__ */ diff --git a/libgimp/gimpdrawablechooser.h b/libgimp/gimpdrawablechooser.h index 15039fd22c..c4a77caba0 100644 --- a/libgimp/gimpdrawablechooser.h +++ b/libgimp/gimpdrawablechooser.h @@ -19,30 +19,29 @@ * . */ +#pragma once + #if !defined (__GIMP_UI_H_INSIDE__) && !defined (GIMP_COMPILATION) #error "Only can be included directly." #endif -#ifndef __GIMP_DRAWABLE_CHOOSER_H__ -#define __GIMP_DRAWABLE_CHOOSER_H__ - G_BEGIN_DECLS #define GIMP_TYPE_DRAWABLE_CHOOSER (gimp_drawable_chooser_get_type ()) -G_DECLARE_FINAL_TYPE (GimpDrawableChooser, gimp_drawable_chooser, GIMP, DRAWABLE_CHOOSER, GtkBox) +G_DECLARE_FINAL_TYPE (GimpDrawableChooser, + gimp_drawable_chooser, + GIMP, DRAWABLE_CHOOSER, + GtkBox) -GtkWidget * gimp_drawable_chooser_new (const gchar *title, - const gchar *label, - GType drawable_type, - GimpDrawable *drawable); - -GimpDrawable * gimp_drawable_chooser_get_drawable (GimpDrawableChooser *chooser); -void gimp_drawable_chooser_set_drawable (GimpDrawableChooser *chooser, - GimpDrawable *drawable); -GtkWidget * gimp_drawable_chooser_get_label (GimpDrawableChooser *widget); +GtkWidget * gimp_drawable_chooser_new (const gchar *title, + const gchar *label, + GType drawable_type, + GimpDrawable *drawable); +GimpDrawable * gimp_drawable_chooser_get_drawable (GimpDrawableChooser *chooser); +void gimp_drawable_chooser_set_drawable (GimpDrawableChooser *chooser, + GimpDrawable *drawable); +GtkWidget * gimp_drawable_chooser_get_label (GimpDrawableChooser *widget); G_END_DECLS - -#endif /* __GIMP_DRAWABLE_CHOOSER_H__ */ diff --git a/libgimp/gimpdrawablefilter.h b/libgimp/gimpdrawablefilter.h index 8535f3c1ca..975d37a5bc 100644 --- a/libgimp/gimpdrawablefilter.h +++ b/libgimp/gimpdrawablefilter.h @@ -19,41 +19,39 @@ * . */ +#pragma once + #if !defined (__GIMP_H_INSIDE__) && !defined (GIMP_COMPILATION) #error "Only can be included directly." #endif -#ifndef __GIMP_DRAWABLE_FILTER_H__ -#define __GIMP_DRAWABLE_FILTER_H__ - G_BEGIN_DECLS - /* For information look into the C source or the html documentation */ #define GIMP_TYPE_DRAWABLE_FILTER (gimp_drawable_filter_get_type ()) -G_DECLARE_FINAL_TYPE (GimpDrawableFilter, gimp_drawable_filter, GIMP, DRAWABLE_FILTER, GObject) +G_DECLARE_FINAL_TYPE (GimpDrawableFilter, + gimp_drawable_filter, + GIMP, DRAWABLE_FILTER, + GObject) -gint32 gimp_drawable_filter_get_id (GimpDrawableFilter *filter); -GimpDrawableFilter * gimp_drawable_filter_get_by_id (gint32 filter_id); +gint32 gimp_drawable_filter_get_id (GimpDrawableFilter *filter); +GimpDrawableFilter * gimp_drawable_filter_get_by_id (gint32 filter_id); -gboolean gimp_drawable_filter_is_valid (GimpDrawableFilter *filter); +gboolean gimp_drawable_filter_is_valid (GimpDrawableFilter *filter); -void gimp_drawable_filter_set_opacity (GimpDrawableFilter *filter, - gdouble opacity); -void gimp_drawable_filter_set_blend_mode (GimpDrawableFilter *filter, - GimpLayerMode mode); -void gimp_drawable_filter_set_aux_input (GimpDrawableFilter *filter, - const gchar *input_pad_name, - GimpDrawable *input); +void gimp_drawable_filter_set_opacity (GimpDrawableFilter *filter, + gdouble opacity); +void gimp_drawable_filter_set_blend_mode (GimpDrawableFilter *filter, + GimpLayerMode mode); +void gimp_drawable_filter_set_aux_input (GimpDrawableFilter *filter, + const gchar *input_pad_name, + GimpDrawable *input); -GimpDrawableFilterConfig * gimp_drawable_filter_get_config (GimpDrawableFilter *filter); - -void gimp_drawable_filter_update (GimpDrawableFilter *filter); +GimpDrawableFilterConfig * gimp_drawable_filter_get_config (GimpDrawableFilter *filter); +void gimp_drawable_filter_update (GimpDrawableFilter *filter); G_END_DECLS - -#endif /* __GIMP_DRAWABLE_FILTER_H__ */ diff --git a/libgimp/gimpdrawablefilterconfig.h b/libgimp/gimpdrawablefilterconfig.h index 50a7f80576..b3f00ccfd3 100644 --- a/libgimp/gimpdrawablefilterconfig.h +++ b/libgimp/gimpdrawablefilterconfig.h @@ -19,20 +19,23 @@ * . */ +#pragma once + #if !defined (__GIMP_H_INSIDE__) && !defined (GIMP_COMPILATION) #error "Only can be included directly." #endif -#ifndef __GIMP_DRAWABLE_FILTER_CONFIG_H__ -#define __GIMP_DRAWABLE_FILTER_CONFIG_H__ - G_BEGIN_DECLS /* For information look into the C source or the html documentation */ #define GIMP_TYPE_DRAWABLE_FILTER_CONFIG (gimp_drawable_filter_config_get_type ()) -G_DECLARE_DERIVABLE_TYPE (GimpDrawableFilterConfig, gimp_drawable_filter_config, GIMP, DRAWABLE_FILTER_CONFIG, GObject) +G_DECLARE_DERIVABLE_TYPE (GimpDrawableFilterConfig, + gimp_drawable_filter_config, + GIMP, DRAWABLE_FILTER_CONFIG, + GObject) + struct _GimpDrawableFilterConfigClass { @@ -51,7 +54,4 @@ struct _GimpDrawableFilterConfigClass void (* _gimp_reserved9) (void); }; - G_END_DECLS - -#endif /* __GIMP_DRAWABLE_FILTER_CONFIG_H__ */ diff --git a/libgimp/gimpdrawablepreview.h b/libgimp/gimpdrawablepreview.h index d47b3ecf52..0dfa005be8 100644 --- a/libgimp/gimpdrawablepreview.h +++ b/libgimp/gimpdrawablepreview.h @@ -18,21 +18,22 @@ * . */ +#pragma once + #if !defined (__GIMP_UI_H_INSIDE__) && !defined (GIMP_COMPILATION) #error "Only can be included directly." #endif -#ifndef __GIMP_DRAWABLE_PREVIEW_H__ -#define __GIMP_DRAWABLE_PREVIEW_H__ - G_BEGIN_DECLS - /* For information look into the C source or the html documentation */ #define GIMP_TYPE_DRAWABLE_PREVIEW (gimp_drawable_preview_get_type ()) -G_DECLARE_FINAL_TYPE (GimpDrawablePreview, gimp_drawable_preview, GIMP, DRAWABLE_PREVIEW, GimpScrolledPreview) +G_DECLARE_FINAL_TYPE (GimpDrawablePreview, + gimp_drawable_preview, + GIMP, DRAWABLE_PREVIEW, + GimpScrolledPreview) GtkWidget * gimp_drawable_preview_new_from_drawable (GimpDrawable *drawable); @@ -49,8 +50,5 @@ G_GNUC_INTERNAL gboolean _gimp_drawable_preview_get_bounds (GimpDrawable gint *xmax, gint *ymax); - G_END_DECLS -#endif /* __GIMP_DRAWABLE_PREVIEW_H__ */ - diff --git a/libgimp/gimpenums.h b/libgimp/gimpenums.h index 00dc96d1b2..fe93f095dc 100644 --- a/libgimp/gimpenums.h +++ b/libgimp/gimpenums.h @@ -18,12 +18,10 @@ /* NOTE: This file is autogenerated by enumcode.pl */ -#ifndef __GIMP_ENUMS_H__ -#define __GIMP_ENUMS_H__ +#pragma once G_BEGIN_DECLS - #define GIMP_TYPE_BRUSH_APPLICATION_MODE (gimp_brush_application_mode_get_type ()) GType gimp_brush_application_mode_get_type (void) G_GNUC_CONST; @@ -284,7 +282,4 @@ void gimp_enums_init (void); const gchar ** gimp_enums_get_type_names (gint *n_type_names); - G_END_DECLS - -#endif /* __GIMP_ENUMS_H__ */ diff --git a/libgimp/gimpexportoptions.h b/libgimp/gimpexportoptions.h index 255e7998d8..99009d0379 100644 --- a/libgimp/gimpexportoptions.h +++ b/libgimp/gimpexportoptions.h @@ -19,13 +19,12 @@ * . */ +#pragma once + #if !defined (__GIMP_H_INSIDE__) && !defined (GIMP_COMPILATION) #error "Only can be included directly." #endif -#ifndef __LIBGIMP_GIMP_EXPORT_OPTIONS_H__ -#define __LIBGIMP_GIMP_EXPORT_OPTIONS_H__ - G_BEGIN_DECLS /* For information look into the C source or the html documentation */ @@ -45,11 +44,7 @@ typedef enum } GimpExportReturn; -GimpExportReturn gimp_export_options_get_image (GimpExportOptions *options, - GimpImage **image) G_GNUC_WARN_UNUSED_RESULT; - +GimpExportReturn gimp_export_options_get_image (GimpExportOptions *options, + GimpImage **image) G_GNUC_WARN_UNUSED_RESULT; G_END_DECLS - - -#endif /* __LIBGIMP_GIMP_EXPORT_OPTIONS_H__ */ diff --git a/libgimp/gimpexportprocedure.h b/libgimp/gimpexportprocedure.h index cc2eaaa875..4acf883e58 100644 --- a/libgimp/gimpexportprocedure.h +++ b/libgimp/gimpexportprocedure.h @@ -19,8 +19,7 @@ * . */ -#ifndef __GIMP_EXPORT_PROCEDURE_H__ -#define __GIMP_EXPORT_PROCEDURE_H__ +#pragma once #include @@ -54,14 +53,14 @@ G_BEGIN_DECLS * * Since: 3.0 **/ -typedef GimpValueArray * (* GimpRunExportFunc) (GimpProcedure *procedure, - GimpRunMode run_mode, - GimpImage *image, - GFile *file, - GimpExportOptions *options, - GimpMetadata *metadata, - GimpProcedureConfig *config, - gpointer run_data); +typedef GimpValueArray * (* GimpRunExportFunc) (GimpProcedure *procedure, + GimpRunMode run_mode, + GimpImage *image, + GFile *file, + GimpExportOptions *options, + GimpMetadata *metadata, + GimpProcedureConfig *config, + gpointer run_data); /** * GimpExportGetCapabilitiesFunc: @@ -79,14 +78,17 @@ typedef GimpValueArray * (* GimpRunExportFunc) (GimpProcedure *procedure, * * Since: 3.0 **/ -typedef GimpExportCapabilities (* GimpExportGetCapabilitiesFunc) (GimpProcedure *procedure, - GimpProcedureConfig *config, - GimpExportOptions *options, - gpointer get_capabilities_data); +typedef GimpExportCapabilities (* GimpExportGetCapabilitiesFunc) (GimpProcedure *procedure, + GimpProcedureConfig *config, + GimpExportOptions *options, + gpointer get_capabilities_data); #define GIMP_TYPE_EXPORT_PROCEDURE (gimp_export_procedure_get_type ()) -G_DECLARE_FINAL_TYPE (GimpExportProcedure, gimp_export_procedure, GIMP, EXPORT_PROCEDURE, GimpFileProcedure) +G_DECLARE_FINAL_TYPE (GimpExportProcedure, + gimp_export_procedure, + GIMP, EXPORT_PROCEDURE, + GimpFileProcedure) GimpProcedure * gimp_export_procedure_new (GimpPlugIn *plug_in, @@ -124,7 +126,4 @@ gboolean gimp_export_procedure_get_support_profile (GimpExportProcedure gboolean gimp_export_procedure_get_support_thumbnail (GimpExportProcedure *procedure); gboolean gimp_export_procedure_get_support_comment (GimpExportProcedure *procedure); - G_END_DECLS - -#endif /* __GIMP_EXPORT_PROCEDURE_H__ */ diff --git a/libgimp/gimpexportproceduredialog.h b/libgimp/gimpexportproceduredialog.h index 7e732f5196..4076e2f9a2 100644 --- a/libgimp/gimpexportproceduredialog.h +++ b/libgimp/gimpexportproceduredialog.h @@ -18,20 +18,22 @@ * along with this program. If not, see . */ +#pragma once + #if !defined (__GIMP_UI_H_INSIDE__) && !defined (GIMP_COMPILATION) #error "Only can be included directly." #endif -#ifndef __GIMP_EXPORT_PROCEDURE_DIALOG_H__ -#define __GIMP_EXPORT_PROCEDURE_DIALOG_H__ - G_BEGIN_DECLS /* For information look into the C source or the html documentation */ #define GIMP_TYPE_EXPORT_PROCEDURE_DIALOG (gimp_export_procedure_dialog_get_type ()) -G_DECLARE_FINAL_TYPE (GimpExportProcedureDialog, gimp_export_procedure_dialog, GIMP, EXPORT_PROCEDURE_DIALOG, GimpProcedureDialog) +G_DECLARE_FINAL_TYPE (GimpExportProcedureDialog, + gimp_export_procedure_dialog, + GIMP, EXPORT_PROCEDURE_DIALOG, + GimpProcedureDialog) GtkWidget * gimp_export_procedure_dialog_new (GimpExportProcedure *procedure, @@ -41,7 +43,4 @@ GtkWidget * gimp_export_procedure_dialog_new (GimpExportProcedure void gimp_export_procedure_dialog_add_metadata (GimpExportProcedureDialog *dialog, const gchar *property); - G_END_DECLS - -#endif /* __GIMP_EXPORT_PROCEDURE_DIALOG_H__ */ diff --git a/libgimp/gimpfileprocedure.h b/libgimp/gimpfileprocedure.h index 5de002e491..4666f740f5 100644 --- a/libgimp/gimpfileprocedure.h +++ b/libgimp/gimpfileprocedure.h @@ -19,8 +19,7 @@ * . */ -#ifndef __GIMP_FILE_PROCEDURE_H__ -#define __GIMP_FILE_PROCEDURE_H__ +#pragma once #include @@ -30,7 +29,11 @@ G_BEGIN_DECLS #define GIMP_TYPE_FILE_PROCEDURE (gimp_file_procedure_get_type ()) -G_DECLARE_DERIVABLE_TYPE (GimpFileProcedure, gimp_file_procedure, GIMP, FILE_PROCEDURE, GimpProcedure) +G_DECLARE_DERIVABLE_TYPE (GimpFileProcedure, + gimp_file_procedure, + GIMP, FILE_PROCEDURE, + GimpProcedure) + struct _GimpFileProcedureClass { @@ -80,7 +83,4 @@ void gimp_file_procedure_set_handles_remote gboolean gimp_file_procedure_get_handles_remote (GimpFileProcedure *procedure); - G_END_DECLS - -#endif /* __GIMP_FILE_PROCEDURE_H__ */ diff --git a/libgimp/gimpfont.h b/libgimp/gimpfont.h index 85f0602ed6..207fc1e8aa 100644 --- a/libgimp/gimpfont.h +++ b/libgimp/gimpfont.h @@ -19,28 +19,27 @@ * . */ +#pragma once + #if !defined (__GIMP_H_INSIDE__) && !defined (GIMP_COMPILATION) #error "Only can be included directly." #endif -#ifndef __GIMP_FONT_H__ -#define __GIMP_FONT_H__ +#include G_BEGIN_DECLS /* For information look into the C source or the html documentation */ -#include - - #define GIMP_TYPE_FONT (gimp_font_get_type ()) -G_DECLARE_FINAL_TYPE (GimpFont, gimp_font, GIMP, FONT, GimpResource) +G_DECLARE_FINAL_TYPE (GimpFont, + gimp_font, + GIMP, FONT, + GimpResource) PangoFontDescription * gimp_font_get_pango_font_description (GimpFont *font); - G_END_DECLS -#endif /* __GIMP_FONT_H__ */ diff --git a/libgimp/gimpfontchooser.h b/libgimp/gimpfontchooser.h index fd9320c480..edaa2d0b3a 100644 --- a/libgimp/gimpfontchooser.h +++ b/libgimp/gimpfontchooser.h @@ -18,26 +18,25 @@ * . */ +#pragma once + #if !defined (__GIMP_UI_H_INSIDE__) && !defined (GIMP_COMPILATION) #error "Only can be included directly." #endif -#ifndef __GIMP_FONT_CHOOSER_H__ -#define __GIMP_FONT_CHOOSER_H__ - #include G_BEGIN_DECLS #define GIMP_TYPE_FONT_CHOOSER (gimp_font_chooser_get_type ()) -G_DECLARE_FINAL_TYPE (GimpFontChooser, gimp_font_chooser, GIMP, FONT_CHOOSER, GimpResourceChooser) +G_DECLARE_FINAL_TYPE (GimpFontChooser, + gimp_font_chooser, + GIMP, FONT_CHOOSER, + GimpResourceChooser) GtkWidget * gimp_font_chooser_new (const gchar *title, const gchar *label, GimpFont *font); - G_END_DECLS - -#endif /* __GIMP_FONT_CHOOSER_H__ */ diff --git a/libgimp/gimpgimprc.h b/libgimp/gimpgimprc.h index a1326f9ee1..0f1f665a9a 100644 --- a/libgimp/gimpgimprc.h +++ b/libgimp/gimpgimprc.h @@ -18,13 +18,12 @@ * . */ +#pragma once + #if !defined (__GIMP_H_INSIDE__) && !defined (GIMP_COMPILATION) #error "Only can be included directly." #endif -#ifndef __GIMP_GIMPRC_H__ -#define __GIMP_GIMPRC_H__ - G_BEGIN_DECLS /* For information look into the C source or the html documentation */ @@ -32,7 +31,4 @@ G_BEGIN_DECLS GimpColorConfig * gimp_get_color_configuration (void); - G_END_DECLS - -#endif /* __GIMP_GIMPRC_H__ */ diff --git a/libgimp/gimpgpparams.h b/libgimp/gimpgpparams.h index 8f88080068..d607a1bcd9 100644 --- a/libgimp/gimpgpparams.h +++ b/libgimp/gimpgpparams.h @@ -19,12 +19,10 @@ * . */ -#ifndef __GIMP_GP_PARAMS_H__ -#define __GIMP_GP_PARAMS_H__ +#pragma once G_BEGIN_DECLS - GParamSpec * _gimp_gp_param_def_to_param_spec (const GPParamDef *param_def); void _gimp_param_spec_to_gp_param_def (GParamSpec *pspec, GPParamDef *param_def); @@ -41,7 +39,4 @@ void _gimp_gp_params_free (GPParam *params, gint n_params, gboolean full_copy); - G_END_DECLS - -#endif /* __GIMP_GP_PARAMS_H__ */ diff --git a/libgimp/gimpgradient.h b/libgimp/gimpgradient.h index 1dbe989de5..2b1e395445 100644 --- a/libgimp/gimpgradient.h +++ b/libgimp/gimpgradient.h @@ -19,25 +19,24 @@ * . */ +#pragma once + #if !defined (__GIMP_H_INSIDE__) && !defined (GIMP_COMPILATION) #error "Only can be included directly." #endif -#ifndef __GIMP_GRADIENT_H__ -#define __GIMP_GRADIENT_H__ +#include G_BEGIN_DECLS /* For information look into the C source or the html documentation */ -#include - - #define GIMP_TYPE_GRADIENT (gimp_gradient_get_type ()) -G_DECLARE_FINAL_TYPE (GimpGradient, gimp_gradient, GIMP, GRADIENT, GimpResource) - +G_DECLARE_FINAL_TYPE (GimpGradient, + gimp_gradient, + GIMP, GRADIENT, + GimpResource) G_END_DECLS -#endif /* __GIMP_GRADIENT_H__ */ diff --git a/libgimp/gimpgradientchooser.h b/libgimp/gimpgradientchooser.h index 483dda9be2..2742cd278f 100644 --- a/libgimp/gimpgradientchooser.h +++ b/libgimp/gimpgradientchooser.h @@ -18,26 +18,25 @@ * . */ +#pragma once + #if !defined (__GIMP_UI_H_INSIDE__) && !defined (GIMP_COMPILATION) #error "Only can be included directly." #endif -#ifndef __GIMP_GRADIENT_CHOOSER_H__ -#define __GIMP_GRADIENT_CHOOSER_H__ - #include G_BEGIN_DECLS #define GIMP_TYPE_GRADIENT_CHOOSER (gimp_gradient_chooser_get_type ()) -G_DECLARE_FINAL_TYPE (GimpGradientChooser, gimp_gradient_chooser, GIMP, GRADIENT_CHOOSER, GimpResourceChooser) +G_DECLARE_FINAL_TYPE (GimpGradientChooser, + gimp_gradient_chooser, + GIMP, GRADIENT_CHOOSER, + GimpResourceChooser) GtkWidget * gimp_gradient_chooser_new (const gchar *title, const gchar *label, GimpGradient *gradient); - G_END_DECLS - -#endif /* __GIMP_GRADIENT_CHOOSER_H__ */ diff --git a/libgimp/gimpgrouplayer.h b/libgimp/gimpgrouplayer.h index 8a19cc5bee..66d956a8d6 100644 --- a/libgimp/gimpgrouplayer.h +++ b/libgimp/gimpgrouplayer.h @@ -19,28 +19,26 @@ * . */ +#pragma once + #if !defined (__GIMP_H_INSIDE__) && !defined (GIMP_COMPILATION) #error "Only can be included directly." #endif -#ifndef __GIMP_GROUP_LAYER_H__ -#define __GIMP_GROUP_LAYER_H__ +#include G_BEGIN_DECLS /* For information look into the C source or the html documentation */ -#include - - #define GIMP_TYPE_GROUP_LAYER (gimp_group_layer_get_type ()) -G_DECLARE_FINAL_TYPE (GimpGroupLayer, gimp_group_layer, GIMP, GROUP_LAYER, GimpLayer) +G_DECLARE_FINAL_TYPE (GimpGroupLayer, + gimp_group_layer, + GIMP, GROUP_LAYER, + GimpLayer) -GimpGroupLayer * gimp_group_layer_get_by_id (gint32 layer_id); - +GimpGroupLayer * gimp_group_layer_get_by_id (gint32 layer_id); G_END_DECLS - -#endif /* __GIMP_GROUP_LAYER_H__ */ diff --git a/libgimp/gimpimage.h b/libgimp/gimpimage.h index ad709c35f3..1112bfec67 100644 --- a/libgimp/gimpimage.h +++ b/libgimp/gimpimage.h @@ -18,21 +18,22 @@ * . */ +#pragma once + #if !defined (__GIMP_H_INSIDE__) && !defined (GIMP_COMPILATION) #error "Only can be included directly." #endif -#ifndef __GIMP_IMAGE_H__ -#define __GIMP_IMAGE_H__ - G_BEGIN_DECLS - /* For information look into the C source or the html documentation */ #define GIMP_TYPE_IMAGE (gimp_image_get_type ()) -G_DECLARE_FINAL_TYPE (GimpImage, gimp_image, GIMP, IMAGE, GObject) +G_DECLARE_FINAL_TYPE (GimpImage, + gimp_image, + GIMP, IMAGE, + GObject) gint32 gimp_image_get_id (GimpImage *image); @@ -71,7 +72,4 @@ GimpMetadata * gimp_image_get_metadata (GimpImage *image); gboolean gimp_image_set_metadata (GimpImage *image, GimpMetadata *metadata); - G_END_DECLS - -#endif /* __GIMP_IMAGE_H__ */ diff --git a/libgimp/gimpimagecolorprofile.h b/libgimp/gimpimagecolorprofile.h index 92e4e60123..29906f3696 100644 --- a/libgimp/gimpimagecolorprofile.h +++ b/libgimp/gimpimagecolorprofile.h @@ -18,13 +18,12 @@ * . */ +#pragma once + #if !defined (__GIMP_H_INSIDE__) && !defined (GIMP_COMPILATION) #error "Only can be included directly." #endif -#ifndef __GIMP_IMAGE_COLOR_PROFILE_H__ -#define __GIMP_IMAGE_COLOR_PROFILE_H__ - G_BEGIN_DECLS /* For information look into the C source or the html documentation */ @@ -45,7 +44,4 @@ gboolean gimp_image_convert_color_profile (GimpImage GimpColorRenderingIntent intent, gboolean bpc); - G_END_DECLS - -#endif /* __GIMP_IMAGE_COLOR_PROFILE_H__ */ diff --git a/libgimp/gimpimagecombobox.h b/libgimp/gimpimagecombobox.h index 7279d8c30d..d2b0588dbe 100644 --- a/libgimp/gimpimagecombobox.h +++ b/libgimp/gimpimagecombobox.h @@ -19,17 +19,17 @@ * . */ +#pragma once + #if !defined (__GIMP_UI_H_INSIDE__) && !defined (GIMP_COMPILATION) #error "Only can be included directly." #endif -#ifndef __GIMP_IMAGE_COMBO_BOX_H__ -#define __GIMP_IMAGE_COMBO_BOX_H__ - G_BEGIN_DECLS /* For information look into the C source or the html documentation */ + /** * GimpImageConstraintFunc: * @image: @@ -39,15 +39,15 @@ typedef gboolean (* GimpImageConstraintFunc) (GimpImage *image, gpointer data); -#define GIMP_TYPE_IMAGE_COMBO_BOX (gimp_image_combo_box_get_type ()) -G_DECLARE_FINAL_TYPE (GimpImageComboBox, gimp_image_combo_box, GIMP, IMAGE_COMBO_BOX, GimpIntComboBox) +#define GIMP_TYPE_IMAGE_COMBO_BOX (gimp_image_combo_box_get_type ()) +G_DECLARE_FINAL_TYPE (GimpImageComboBox, + gimp_image_combo_box, + GIMP, IMAGE_COMBO_BOX, + GimpIntComboBox) GtkWidget * gimp_image_combo_box_new (GimpImageConstraintFunc constraint, gpointer data, GDestroyNotify data_destroy); - G_END_DECLS - -#endif /* __GIMP_IMAGE_COMBO_BOX_H__ */ diff --git a/libgimp/gimpimagemetadata.h b/libgimp/gimpimagemetadata.h index a6ec45e470..67d5f95d6c 100644 --- a/libgimp/gimpimagemetadata.h +++ b/libgimp/gimpimagemetadata.h @@ -18,14 +18,12 @@ * . */ +#pragma once + #if !defined (__GIMP_H_INSIDE__) && !defined (GIMP_COMPILATION) #error "Only can be included directly." #endif - -#ifndef __GIMP_IMAGE_METADATA_H__ -#define __GIMP_IMAGE_METADATA_H__ - G_BEGIN_DECLS /* For information look into the C source or the html documentation */ @@ -59,7 +57,4 @@ G_GNUC_INTERNAL gboolean _gimp_image_metadata_save_finish (GimpImage GFile *file, GError **error); - G_END_DECLS - -#endif /* __GIMP_IMAGE_METADATA_H__ */ diff --git a/libgimp/gimpimageprocedure.h b/libgimp/gimpimageprocedure.h index eb76250aa8..fdacfb5b6a 100644 --- a/libgimp/gimpimageprocedure.h +++ b/libgimp/gimpimageprocedure.h @@ -19,8 +19,7 @@ * . */ -#ifndef __GIMP_IMAGE_PROCEDURE_H__ -#define __GIMP_IMAGE_PROCEDURE_H__ +#pragma once #include @@ -54,17 +53,17 @@ typedef GimpValueArray * (* GimpRunImageFunc) (GimpProcedure *procedure, #define GIMP_TYPE_IMAGE_PROCEDURE (gimp_image_procedure_get_type ()) -G_DECLARE_FINAL_TYPE (GimpImageProcedure, gimp_image_procedure, GIMP, IMAGE_PROCEDURE, GimpProcedure) +G_DECLARE_FINAL_TYPE (GimpImageProcedure, + gimp_image_procedure, + GIMP, IMAGE_PROCEDURE, + GimpProcedure) -GimpProcedure * gimp_image_procedure_new (GimpPlugIn *plug_in, - const gchar *name, - GimpPDBProcType proc_type, - GimpRunImageFunc run_func, - gpointer run_data, - GDestroyNotify run_data_destroy); - +GimpProcedure * gimp_image_procedure_new (GimpPlugIn *plug_in, + const gchar *name, + GimpPDBProcType proc_type, + GimpRunImageFunc run_func, + gpointer run_data, + GDestroyNotify run_data_destroy); G_END_DECLS - -#endif /* __GIMP_IMAGE_PROCEDURE_H__ */ diff --git a/libgimp/gimpitem.h b/libgimp/gimpitem.h index 1a19785efe..4dee77dddb 100644 --- a/libgimp/gimpitem.h +++ b/libgimp/gimpitem.h @@ -19,20 +19,22 @@ * . */ +#pragma once + #if !defined (__GIMP_H_INSIDE__) && !defined (GIMP_COMPILATION) #error "Only can be included directly." #endif -#ifndef __GIMP_ITEM_H__ -#define __GIMP_ITEM_H__ - G_BEGIN_DECLS /* For information look into the C source or the html documentation */ #define GIMP_TYPE_ITEM (gimp_item_get_type ()) -G_DECLARE_DERIVABLE_TYPE (GimpItem, gimp_item, GIMP, ITEM, GObject) +G_DECLARE_DERIVABLE_TYPE (GimpItem, + gimp_item, + GIMP, ITEM, + GObject) struct _GimpItemClass @@ -68,7 +70,4 @@ gboolean gimp_item_is_path (GimpItem *item); GList * gimp_item_list_children (GimpItem *item); - G_END_DECLS - -#endif /* __GIMP_ITEM_H__ */ diff --git a/libgimp/gimpitemcombobox.h b/libgimp/gimpitemcombobox.h index de107755cb..08dfe1b077 100644 --- a/libgimp/gimpitemcombobox.h +++ b/libgimp/gimpitemcombobox.h @@ -20,13 +20,12 @@ * . */ +#pragma once + #if !defined (__GIMP_UI_H_INSIDE__) && !defined (GIMP_COMPILATION) #error "Only can be included directly." #endif -#ifndef __GIMP_ITEM_COMBO_BOX_H__ -#define __GIMP_ITEM_COMBO_BOX_H__ - G_BEGIN_DECLS /* For information look into the C source or the html documentation */ @@ -49,10 +48,10 @@ G_BEGIN_DECLS #define GIMP_IS_PATH_COMBO_BOX(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_PATH_COMBO_BOX)) -GType gimp_drawable_combo_box_get_type (void) G_GNUC_CONST; -GType gimp_channel_combo_box_get_type (void) G_GNUC_CONST; -GType gimp_layer_combo_box_get_type (void) G_GNUC_CONST; -GType gimp_path_combo_box_get_type (void) G_GNUC_CONST; +GType gimp_drawable_combo_box_get_type (void) G_GNUC_CONST; +GType gimp_channel_combo_box_get_type (void) G_GNUC_CONST; +GType gimp_layer_combo_box_get_type (void) G_GNUC_CONST; +GType gimp_path_combo_box_get_type (void) G_GNUC_CONST; /** * GimpItemConstraintFunc: @@ -64,6 +63,7 @@ typedef gboolean (* GimpItemConstraintFunc) (GimpImage *image, GimpItem *item, gpointer data); + GtkWidget * gimp_drawable_combo_box_new (GimpItemConstraintFunc constraint, gpointer data, GDestroyNotify data_destroy); @@ -77,7 +77,4 @@ GtkWidget * gimp_path_combo_box_new (GimpItemConstraintFunc constraint, gpointer data, GDestroyNotify data_destroy); - G_END_DECLS - -#endif /* __GIMP_ITEM_COMBO_BOX_H__ */ diff --git a/libgimp/gimplayer.h b/libgimp/gimplayer.h index a64dd4263f..5a0fb49111 100644 --- a/libgimp/gimplayer.h +++ b/libgimp/gimplayer.h @@ -18,21 +18,19 @@ * . */ +#pragma once + #if !defined (__GIMP_H_INSIDE__) && !defined (GIMP_COMPILATION) #error "Only can be included directly." #endif -#ifndef __GIMP_LAYER_H__ -#define __GIMP_LAYER_H__ +#include G_BEGIN_DECLS /* For information look into the C source or the html documentation */ -#include - - #define GIMP_TYPE_LAYER (gimp_layer_get_type ()) G_DECLARE_DERIVABLE_TYPE (GimpLayer, gimp_layer, GIMP, LAYER, GimpDrawable) @@ -68,7 +66,5 @@ GimpLayer * gimp_layer_new_from_surface (GimpImage *image, gdouble progress_start, gdouble progress_end) G_GNUC_WARN_UNUSED_RESULT; - G_END_DECLS -#endif /* __GIMP_LAYER_H__ */ diff --git a/libgimp/gimplayermask.h b/libgimp/gimplayermask.h index a75bb19064..0ad0f9395f 100644 --- a/libgimp/gimplayermask.h +++ b/libgimp/gimplayermask.h @@ -19,28 +19,26 @@ * . */ +#pragma once + #if !defined (__GIMP_H_INSIDE__) && !defined (GIMP_COMPILATION) #error "Only can be included directly." #endif -#ifndef __GIMP_LAYER_MASK_H__ -#define __GIMP_LAYER_MASK_H__ +#include G_BEGIN_DECLS /* For information look into the C source or the html documentation */ -#include - - #define GIMP_TYPE_LAYER_MASK (gimp_layer_mask_get_type ()) -G_DECLARE_FINAL_TYPE (GimpLayerMask, gimp_layer_mask, GIMP, LAYER_MASK, GimpChannel) +G_DECLARE_FINAL_TYPE (GimpLayerMask, + gimp_layer_mask, + GIMP, LAYER_MASK, + GimpChannel) GimpLayerMask * gimp_layer_mask_get_by_id (gint32 layer_mask_id); - G_END_DECLS - -#endif /* __GIMP_LAYER_MASK_H__ */ diff --git a/libgimp/gimploadprocedure.h b/libgimp/gimploadprocedure.h index 44a8e19f9a..38df1a4c78 100644 --- a/libgimp/gimploadprocedure.h +++ b/libgimp/gimploadprocedure.h @@ -19,8 +19,7 @@ * . */ -#ifndef __GIMP_LOAD_PROCEDURE_H__ -#define __GIMP_LOAD_PROCEDURE_H__ +#pragma once #include @@ -64,7 +63,10 @@ typedef GimpValueArray * (* GimpRunLoadFunc) (GimpProcedure *procedure, #define GIMP_TYPE_LOAD_PROCEDURE (gimp_load_procedure_get_type ()) -G_DECLARE_DERIVABLE_TYPE (GimpLoadProcedure, gimp_load_procedure, GIMP, LOAD_PROCEDURE, GimpFileProcedure) +G_DECLARE_DERIVABLE_TYPE (GimpLoadProcedure, + gimp_load_procedure, + GIMP, LOAD_PROCEDURE, + GimpFileProcedure) struct _GimpLoadProcedureClass @@ -100,7 +102,4 @@ void gimp_load_procedure_set_thumbnail_loader (GimpLoadProcedure *pro const gchar *thumbnail_proc); const gchar * gimp_load_procedure_get_thumbnail_loader (GimpLoadProcedure *procedure); - G_END_DECLS - -#endif /* __GIMP_LOAD_PROCEDURE_H__ */ diff --git a/libgimp/gimppalette.h b/libgimp/gimppalette.h index cce5fb1e4a..ef6e3896f7 100644 --- a/libgimp/gimppalette.h +++ b/libgimp/gimppalette.h @@ -19,23 +19,24 @@ * . */ +#pragma once + #if !defined (__GIMP_H_INSIDE__) && !defined (GIMP_COMPILATION) #error "Only can be included directly." #endif -#ifndef __GIMP_PALETTE_H__ -#define __GIMP_PALETTE_H__ +#include G_BEGIN_DECLS /* For information look into the C source or the html documentation */ -#include - - #define GIMP_TYPE_PALETTE (gimp_palette_get_type ()) -G_DECLARE_FINAL_TYPE (GimpPalette, gimp_palette, GIMP, PALETTE, GimpResource) +G_DECLARE_FINAL_TYPE (GimpPalette, + gimp_palette, + GIMP, PALETTE, + GimpResource) guint8 * gimp_palette_get_colormap (GimpPalette *palette, @@ -49,5 +50,3 @@ gboolean gimp_palette_set_colormap (GimpPalette *palette, gsize num_bytes); G_END_DECLS - -#endif /* __GIMP_PALETTE_H__ */ diff --git a/libgimp/gimppalettechooser.h b/libgimp/gimppalettechooser.h index 5c251d2316..9306c71667 100644 --- a/libgimp/gimppalettechooser.h +++ b/libgimp/gimppalettechooser.h @@ -18,26 +18,25 @@ * . */ +#pragma once + #if !defined (__GIMP_UI_H_INSIDE__) && !defined (GIMP_COMPILATION) #error "Only can be included directly." #endif -#ifndef __GIMP_PALETTE_CHOOSER_H__ -#define __GIMP_PALETTE_CHOOSER_H__ - #include G_BEGIN_DECLS #define GIMP_TYPE_PALETTE_CHOOSER (gimp_palette_chooser_get_type ()) -G_DECLARE_FINAL_TYPE (GimpPaletteChooser, gimp_palette_chooser, GIMP, PALETTE_CHOOSER, GimpResourceChooser) +G_DECLARE_FINAL_TYPE (GimpPaletteChooser, + gimp_palette_chooser, + GIMP, PALETTE_CHOOSER, + GimpResourceChooser) GtkWidget * gimp_palette_chooser_new (const gchar *title, const gchar *label, GimpPalette *palette); - G_END_DECLS - -#endif /* __GIMP_PALETTE_CHOOSER_H__ */ diff --git a/libgimp/gimpparamspecs-desc.h b/libgimp/gimpparamspecs-desc.h index 95ee31c77d..5108efe9de 100644 --- a/libgimp/gimpparamspecs-desc.h +++ b/libgimp/gimpparamspecs-desc.h @@ -18,22 +18,17 @@ * . */ +#pragma once + #if !defined (__GIMP_H_INSIDE__) && !defined (GIMP_COMPILATION) #error "Only can be included directly." #endif -#ifndef __GIMP_PARAM_SPECS_DESC_H__ -#define __GIMP_PARAM_SPECS_DESC_H__ - G_BEGIN_DECLS - /* For information look into the C source or the html documentation */ gchar * gimp_param_spec_get_desc (GParamSpec *pspec); - G_END_DECLS - -#endif /* __GIMP_PARAM_SPECS_DESC_H__ */ diff --git a/libgimp/gimpparamspecs.h b/libgimp/gimpparamspecs.h index d5e5ecfdca..81c9339ec3 100644 --- a/libgimp/gimpparamspecs.h +++ b/libgimp/gimpparamspecs.h @@ -18,13 +18,12 @@ * . */ +#pragma once + #if !defined (__GIMP_H_INSIDE__) && !defined (GIMP_COMPILATION) #error "Only can be included directly." #endif -#ifndef __LIBGIMP_GIMP_PARAM_SPECS_H__ -#define __LIBGIMP_GIMP_PARAM_SPECS_H__ - G_BEGIN_DECLS /* For information look into the C source or the html documentation */ @@ -394,7 +393,4 @@ GParamSpec * gimp_param_spec_font (const gchar *name, gboolean default_to_context, GParamFlags flags); - G_END_DECLS - -#endif /* __LIBGIMP_GIMP_PARAM_SPECS_H__ */ diff --git a/libgimp/gimppath.h b/libgimp/gimppath.h index a22d1bce48..82776ab24f 100644 --- a/libgimp/gimppath.h +++ b/libgimp/gimppath.h @@ -19,25 +19,24 @@ * . */ +#pragma once + #if !defined (__GIMP_H_INSIDE__) && !defined (GIMP_COMPILATION) #error "Only can be included directly." #endif -#ifndef __GIMP_PATH_H__ -#define __GIMP_PATH_H__ - G_BEGIN_DECLS /* For information look into the C source or the html documentation */ #define GIMP_TYPE_PATH (gimp_path_get_type ()) -G_DECLARE_FINAL_TYPE (GimpPath, gimp_path, GIMP, PATH, GimpItem) +G_DECLARE_FINAL_TYPE (GimpPath, + gimp_path, + GIMP, PATH, + GimpItem) GimpPath * gimp_path_get_by_id (gint32 path_id); - G_END_DECLS - -#endif /* __GIMP_PATH_H__ */ diff --git a/libgimp/gimppattern.h b/libgimp/gimppattern.h index 93deb3aa90..8ade14af03 100644 --- a/libgimp/gimppattern.h +++ b/libgimp/gimppattern.h @@ -19,24 +19,24 @@ * . */ +#pragma once + #if !defined (__GIMP_H_INSIDE__) && !defined (GIMP_COMPILATION) #error "Only can be included directly." #endif -#ifndef __GIMP_PATTERN_H__ -#define __GIMP_PATTERN_H__ +#include G_BEGIN_DECLS /* For information look into the C source or the html documentation */ -#include - - #define GIMP_TYPE_PATTERN (gimp_pattern_get_type ()) -G_DECLARE_FINAL_TYPE (GimpPattern, gimp_pattern, GIMP, PATTERN, GimpResource) - +G_DECLARE_FINAL_TYPE (GimpPattern, + gimp_pattern, + GIMP, PATTERN, + GimpResource) GeglBuffer * gimp_pattern_get_buffer (GimpPattern *pattern, @@ -45,5 +45,3 @@ GeglBuffer * gimp_pattern_get_buffer (GimpPattern *pattern, const Babl *format) G_GNUC_WARN_UNUSED_RESULT; G_END_DECLS - -#endif /* __GIMP_PATTERN_H__ */ diff --git a/libgimp/gimppatternchooser.h b/libgimp/gimppatternchooser.h index 73ebfaaf16..53bcf215ce 100644 --- a/libgimp/gimppatternchooser.h +++ b/libgimp/gimppatternchooser.h @@ -18,26 +18,26 @@ * . */ +#pragma once + #if !defined (__GIMP_UI_H_INSIDE__) && !defined (GIMP_COMPILATION) #error "Only can be included directly." #endif -#ifndef __GIMP_PATTERN_CHOOSER_H__ -#define __GIMP_PATTERN_CHOOSER_H__ - #include G_BEGIN_DECLS #define GIMP_TYPE_PATTERN_CHOOSER (gimp_pattern_chooser_get_type ()) -G_DECLARE_FINAL_TYPE (GimpPatternChooser, gimp_pattern_chooser, GIMP, PATTERN_CHOOSER, GimpResourceChooser) +G_DECLARE_FINAL_TYPE (GimpPatternChooser, + gimp_pattern_chooser, + GIMP, PATTERN_CHOOSER, + GimpResourceChooser) GtkWidget * gimp_pattern_chooser_new (const gchar *title, const gchar *label, GimpPattern *pattern); - G_END_DECLS -#endif /* __GIMP_PATTERN_CHOOSER_H__ */ diff --git a/libgimp/gimppdb-private.h b/libgimp/gimppdb-private.h index e0d66fddcd..adba422df9 100644 --- a/libgimp/gimppdb-private.h +++ b/libgimp/gimppdb-private.h @@ -19,12 +19,10 @@ * . */ -#ifndef __GIMP_PDB_PRIVATE_H__ -#define __GIMP_PDB_PRIVATE_H__ +#pragma once G_BEGIN_DECLS - typedef enum { GIMP_PDB_ERROR_FAILED, /* generic error condition */ @@ -41,16 +39,13 @@ typedef enum GQuark _gimp_pdb_error_quark (void) G_GNUC_CONST; -G_GNUC_INTERNAL GimpPDB * _gimp_pdb_new (GimpPlugIn *plug_in); +G_GNUC_INTERNAL GimpPDB * _gimp_pdb_new (GimpPlugIn *plug_in); -G_GNUC_INTERNAL GimpPlugIn * _gimp_pdb_get_plug_in (GimpPDB *pdb); - -gboolean gimp_pdb_get_data (const gchar *identifier, - GBytes **data); -gboolean gimp_pdb_set_data (const gchar *identifier, - GBytes *data); +G_GNUC_INTERNAL GimpPlugIn * _gimp_pdb_get_plug_in (GimpPDB *pdb); +gboolean gimp_pdb_get_data (const gchar *identifier, + GBytes **data); +gboolean gimp_pdb_set_data (const gchar *identifier, + GBytes *data); G_END_DECLS - -#endif /* __GIMP_PDB_PRIVATE_H__ */ diff --git a/libgimp/gimppdb.h b/libgimp/gimppdb.h index 741ea93bde..1fe1496ff6 100644 --- a/libgimp/gimppdb.h +++ b/libgimp/gimppdb.h @@ -19,20 +19,22 @@ * . */ +#pragma once + #if !defined (__GIMP_H_INSIDE__) && !defined (GIMP_COMPILATION) #error "Only can be included directly." #endif -#ifndef __GIMP_PDB_H__ -#define __GIMP_PDB_H__ - G_BEGIN_DECLS /* For information look into the C source or the html documentation */ #define GIMP_TYPE_PDB (gimp_pdb_get_type ()) -G_DECLARE_FINAL_TYPE (GimpPDB, gimp_pdb, GIMP, PDB, GObject) +G_DECLARE_FINAL_TYPE (GimpPDB, + gimp_pdb, + GIMP, PDB, + GObject) gboolean gimp_pdb_procedure_exists (GimpPDB *pdb, @@ -65,7 +67,4 @@ G_GNUC_INTERNAL GimpValueArray * _gimp_pdb_run_procedure_array (GimpPDB const gchar *procedure_name, const GimpValueArray *arguments); - G_END_DECLS - -#endif /* __GIMP_PDB_H__ */ diff --git a/libgimp/gimppdbprocedure.h b/libgimp/gimppdbprocedure.h index ecb07513b9..0fcb70bbc3 100644 --- a/libgimp/gimppdbprocedure.h +++ b/libgimp/gimppdbprocedure.h @@ -19,8 +19,7 @@ * . */ -#ifndef __GIMP_PDB_PROCEDURE_H__ -#define __GIMP_PDB_PROCEDURE_H__ +#pragma once G_BEGIN_DECLS @@ -28,13 +27,13 @@ G_BEGIN_DECLS #define GIMP_TYPE_PDB_PROCEDURE (_gimp_pdb_procedure_get_type ()) -G_DECLARE_FINAL_TYPE (GimpPDBProcedure, _gimp_pdb_procedure, GIMP, PDB_PROCEDURE, GimpProcedure) +G_DECLARE_FINAL_TYPE (GimpPDBProcedure, + _gimp_pdb_procedure, + GIMP, PDB_PROCEDURE, + GimpProcedure) G_GNUC_INTERNAL GimpProcedure * _gimp_pdb_procedure_new (GimpPDB *pdb, const gchar *name); - G_END_DECLS - -#endif /* __GIMP_PDB_PROCEDURE_H__ */ diff --git a/libgimp/gimppixbuf.h b/libgimp/gimppixbuf.h index 32722559a3..a8b2075fa7 100644 --- a/libgimp/gimppixbuf.h +++ b/libgimp/gimppixbuf.h @@ -19,13 +19,12 @@ * . */ +#pragma once + #if !defined (__GIMP_H_INSIDE__) && !defined (GIMP_COMPILATION) #error "Only can be included directly." #endif -#ifndef __LIBGIMP_GIMP_PIXBUF_H__ -#define __LIBGIMP_GIMP_PIXBUF_H__ - G_BEGIN_DECLS /* For information look into the C source or the html documentation */ @@ -37,7 +36,4 @@ G_GNUC_INTERNAL GdkPixbuf * _gimp_pixbuf_from_data (guchar *data gint bpp, GimpPixbufTransparency alpha); - G_END_DECLS - -#endif /* __LIBGIMP_GIMP_PIXBUF_H__ */ diff --git a/libgimp/gimpplugin.h b/libgimp/gimpplugin.h index e71a1d7ad5..d3c2988687 100644 --- a/libgimp/gimpplugin.h +++ b/libgimp/gimpplugin.h @@ -19,22 +19,24 @@ * . */ +#pragma once + #if !defined (__GIMP_H_INSIDE__) && !defined (GIMP_COMPILATION) #error "Only can be included directly." #endif -#ifndef __GIMP_PLUG_IN_H__ -#define __GIMP_PLUG_IN_H__ - G_BEGIN_DECLS /* For information look into the C source or the html documentation */ -#define GIMP_PLUG_IN_ERROR (gimp_plug_in_error_quark ()) +#define GIMP_PLUG_IN_ERROR (gimp_plug_in_error_quark ()) #define GIMP_TYPE_PLUG_IN (gimp_plug_in_get_type ()) -G_DECLARE_DERIVABLE_TYPE (GimpPlugIn, gimp_plug_in, GIMP, PLUG_IN, GObject) +G_DECLARE_DERIVABLE_TYPE (GimpPlugIn, + gimp_plug_in, + GIMP, PLUG_IN, + GObject) /** @@ -214,7 +216,4 @@ void gimp_plug_in_set_pdb_error_handler (GimpPlugIn *plug_in, GimpPDBErrorHandler gimp_plug_in_get_pdb_error_handler (GimpPlugIn *plug_in); - G_END_DECLS - -#endif /* __GIMP_PLUG_IN_H__ */ diff --git a/libgimp/gimpprocbrowserdialog.h b/libgimp/gimpprocbrowserdialog.h index e697a94424..b705043c69 100644 --- a/libgimp/gimpprocbrowserdialog.h +++ b/libgimp/gimpprocbrowserdialog.h @@ -18,21 +18,22 @@ * . */ +#pragma once + #if !defined (__GIMP_UI_H_INSIDE__) && !defined (GIMP_COMPILATION) #error "Only can be included directly." #endif -#ifndef __GIMP_PROC_BROWSER_DIALOG_H__ -#define __GIMP_PROC_BROWSER_DIALOG_H__ - G_BEGIN_DECLS - /* For information look into the C source or the html documentation */ #define GIMP_TYPE_PROC_BROWSER_DIALOG (gimp_proc_browser_dialog_get_type ()) -G_DECLARE_FINAL_TYPE (GimpProcBrowserDialog, gimp_proc_browser_dialog, GIMP, PROC_BROWSER_DIALOG, GimpDialog) +G_DECLARE_FINAL_TYPE (GimpProcBrowserDialog, + gimp_proc_browser_dialog, + GIMP, PROC_BROWSER_DIALOG, + GimpDialog) GtkWidget * gimp_proc_browser_dialog_new (const gchar *title, @@ -43,7 +44,4 @@ GtkWidget * gimp_proc_browser_dialog_new (const gchar *title, gchar * gimp_proc_browser_dialog_get_selected (GimpProcBrowserDialog *dialog); - G_END_DECLS - -#endif /* __GIMP_PROC_BROWSER_DIALOG_H__ */ diff --git a/libgimp/gimpprocedure-params.h b/libgimp/gimpprocedure-params.h index e92b09a94f..2a66436e26 100644 --- a/libgimp/gimpprocedure-params.h +++ b/libgimp/gimpprocedure-params.h @@ -19,13 +19,12 @@ * . */ +#pragma once + #if !defined (__GIMP_H_INSIDE__) && !defined (GIMP_COMPILATION) #error "Only can be included directly." #endif -#ifndef __GIMP_PROCEDURE_PARAMS_H__ -#define __GIMP_PROCEDURE_PARAMS_H__ - G_BEGIN_DECLS /* For information look into the C source or the html documentation */ @@ -1140,7 +1139,4 @@ void gimp_procedure_add_pattern_return_value (GimpProcedure *procedure const gchar *blurb, GParamFlags flags); - G_END_DECLS - -#endif /* __GIMP_PROCEDURE_PARAMS_H__ */ diff --git a/libgimp/gimpprocedure.h b/libgimp/gimpprocedure.h index 66a9729c1f..413e1ed072 100644 --- a/libgimp/gimpprocedure.h +++ b/libgimp/gimpprocedure.h @@ -19,13 +19,12 @@ * . */ +#pragma once + #if !defined (__GIMP_H_INSIDE__) && !defined (GIMP_COMPILATION) #error "Only can be included directly." #endif -#ifndef __GIMP_PROCEDURE_H__ -#define __GIMP_PROCEDURE_H__ - G_BEGIN_DECLS /* For information look into the C source or the html documentation */ @@ -66,7 +65,10 @@ typedef enum #define GIMP_TYPE_PROCEDURE (gimp_procedure_get_type ()) -G_DECLARE_DERIVABLE_TYPE (GimpProcedure, gimp_procedure, GIMP, PROCEDURE, GObject) +G_DECLARE_DERIVABLE_TYPE (GimpProcedure, + gimp_procedure, + GIMP, PROCEDURE, + GObject) /** @@ -232,7 +234,4 @@ G_GNUC_INTERNAL GimpValueArray * _gimp_procedure_run_array (GimpPro G_GNUC_INTERNAL gint _gimp_procedure_get_ref_count (GimpProcedure *procedure, GObject *object); - G_END_DECLS - -#endif /* __GIMP_PROCEDURE_H__ */ diff --git a/libgimp/gimpprocedureconfig-private.h b/libgimp/gimpprocedureconfig-private.h index 6c626115c3..777647e9a7 100644 --- a/libgimp/gimpprocedureconfig-private.h +++ b/libgimp/gimpprocedureconfig-private.h @@ -19,12 +19,10 @@ * . */ -#ifndef __GIMP_PROCEDURE_CONFIG_PRIVATE_H__ -#define __GIMP_PROCEDURE_CONFIG_PRIVATE_H__ +#pragma once G_BEGIN_DECLS - G_GNUC_INTERNAL void _gimp_procedure_config_get_values (GimpProcedureConfig *config, GimpValueArray *values); @@ -58,7 +56,4 @@ gboolean gimp_procedure_config_load_default (GimpProcedureConfig *config, gboolean gimp_procedure_config_save_default (GimpProcedureConfig *config, GError **error); - G_END_DECLS - -#endif /* __GIMP_PROCEDURE_CONFIG_PRIVATE_H__ */ diff --git a/libgimp/gimpprocedureconfig.h b/libgimp/gimpprocedureconfig.h index f72a5a7101..08eaed0bf5 100644 --- a/libgimp/gimpprocedureconfig.h +++ b/libgimp/gimpprocedureconfig.h @@ -19,20 +19,23 @@ * . */ +#pragma once + #if !defined (__GIMP_H_INSIDE__) && !defined (GIMP_COMPILATION) #error "Only can be included directly." #endif -#ifndef __GIMP_PROCEDURE_CONFIG_H__ -#define __GIMP_PROCEDURE_CONFIG_H__ - G_BEGIN_DECLS /* For information look into the C source or the html documentation */ #define GIMP_TYPE_PROCEDURE_CONFIG (gimp_procedure_config_get_type ()) -G_DECLARE_DERIVABLE_TYPE (GimpProcedureConfig, gimp_procedure_config, GIMP, PROCEDURE_CONFIG, GObject) +G_DECLARE_DERIVABLE_TYPE (GimpProcedureConfig, + gimp_procedure_config, + GIMP, PROCEDURE_CONFIG, + GObject) + struct _GimpProcedureConfigClass { @@ -81,7 +84,4 @@ void gimp_procedure_config_set_color_array (GimpProcedureConfi gint gimp_procedure_config_get_choice_id (GimpProcedureConfig *config, const gchar *property_name); - G_END_DECLS - -#endif /* __GIMP_PROCEDURE_CONFIG_H__ */ diff --git a/libgimp/gimpproceduredialog.h b/libgimp/gimpproceduredialog.h index 097d5604a7..f4870ebaf7 100644 --- a/libgimp/gimpproceduredialog.h +++ b/libgimp/gimpproceduredialog.h @@ -18,20 +18,23 @@ * along with this program. If not, see . */ +#pragma once + #if !defined (__GIMP_UI_H_INSIDE__) && !defined (GIMP_COMPILATION) #error "Only can be included directly." #endif -#ifndef __GIMP_PROCEDURE_DIALOG_H__ -#define __GIMP_PROCEDURE_DIALOG_H__ - G_BEGIN_DECLS /* For information look into the C source or the html documentation */ #define GIMP_TYPE_PROCEDURE_DIALOG (gimp_procedure_dialog_get_type ()) -G_DECLARE_DERIVABLE_TYPE (GimpProcedureDialog, gimp_procedure_dialog, GIMP, PROCEDURE_DIALOG, GimpDialog) +G_DECLARE_DERIVABLE_TYPE (GimpProcedureDialog, + gimp_procedure_dialog, + GIMP, PROCEDURE_DIALOG, + GimpDialog) + struct _GimpProcedureDialogClass { @@ -186,7 +189,4 @@ void gimp_procedure_dialog_set_sensitive_if_in (GimpProcedureDialog *dial gboolean gimp_procedure_dialog_run (GimpProcedureDialog *dialog); - G_END_DECLS - -#endif /* __GIMP_PROCEDURE_DIALOG_H__ */ diff --git a/libgimp/gimpprocview.h b/libgimp/gimpprocview.h index 4b9451086a..d805cd42fc 100644 --- a/libgimp/gimpprocview.h +++ b/libgimp/gimpprocview.h @@ -18,22 +18,17 @@ * . */ +#pragma once + #if !defined (__GIMP_UI_H_INSIDE__) && !defined (GIMP_COMPILATION) #error "Only can be included directly." #endif -#ifndef __GIMP_PROC_VIEW_H__ -#define __GIMP_PROC_VIEW_H__ - G_BEGIN_DECLS - /* For information look into the C source or the html documentation */ GtkWidget * gimp_proc_view_new (const gchar *procedure_name); - G_END_DECLS - -#endif /* __GIMP_PROC_VIEW_H__ */ diff --git a/libgimp/gimpprogress.h b/libgimp/gimpprogress.h index 9044958b6c..df02d0872d 100644 --- a/libgimp/gimpprogress.h +++ b/libgimp/gimpprogress.h @@ -18,13 +18,12 @@ * . */ +#pragma once + #if !defined (__GIMP_H_INSIDE__) && !defined (GIMP_COMPILATION) #error "Only can be included directly." #endif -#ifndef __GIMP_PROGRESS_H__ -#define __GIMP_PROGRESS_H__ - G_BEGIN_DECLS /** @@ -132,7 +131,5 @@ gboolean gimp_progress_set_text_printf (const gchar *format, gboolean gimp_progress_update (gdouble percentage); - G_END_DECLS -#endif /* __GIMP_PROGRESS_H__ */ diff --git a/libgimp/gimpprogressbar.h b/libgimp/gimpprogressbar.h index 15b494beee..634a83cefc 100644 --- a/libgimp/gimpprogressbar.h +++ b/libgimp/gimpprogressbar.h @@ -19,23 +19,21 @@ * . */ +#pragma once + #if !defined (__GIMP_UI_H_INSIDE__) && !defined (GIMP_COMPILATION) #error "Only can be included directly." #endif -#ifndef __GIMP_PROGRESS_BAR_H__ -#define __GIMP_PROGRESS_BAR_H__ - G_BEGIN_DECLS - #define GIMP_TYPE_PROGRESS_BAR (gimp_progress_bar_get_type ()) -G_DECLARE_FINAL_TYPE (GimpProgressBar, gimp_progress_bar, GIMP, PROGRESS_BAR, GtkProgressBar) +G_DECLARE_FINAL_TYPE (GimpProgressBar, + gimp_progress_bar, + GIMP, PROGRESS_BAR, + GtkProgressBar) -GtkWidget * gimp_progress_bar_new (void); - +GtkWidget * gimp_progress_bar_new (void); G_END_DECLS - -#endif /* __GIMP_PROGRESS_BAR_H__ */ diff --git a/libgimp/gimppropwidgets.h b/libgimp/gimppropwidgets.h index 0db7063158..61b45e4b8b 100644 --- a/libgimp/gimppropwidgets.h +++ b/libgimp/gimppropwidgets.h @@ -19,40 +19,34 @@ * . */ +#pragma once + #if !defined (__GIMP_UI_H_INSIDE__) && !defined (GIMP_COMPILATION) #error "Only can be included directly." #endif - -#ifndef __GIMP_PROP_WIDGETS_H__ -#define __GIMP_PROP_WIDGETS_H__ - G_BEGIN_DECLS - /* GimpParamResource */ -GtkWidget * gimp_prop_brush_chooser_new (GObject *config, - const gchar *property_name, - const gchar *chooser_title); -GtkWidget * gimp_prop_font_chooser_new (GObject *config, - const gchar *property_name, - const gchar *chooser_title); -GtkWidget * gimp_prop_gradient_chooser_new (GObject *config, - const gchar *property_name, - const gchar *chooser_title); -GtkWidget * gimp_prop_palette_chooser_new (GObject *config, - const gchar *property_name, - const gchar *chooser_title); -GtkWidget * gimp_prop_pattern_chooser_new (GObject *config, - const gchar *property_name, - const gchar *chooser_title); - -GtkWidget * gimp_prop_drawable_chooser_new (GObject *config, - const gchar *property_name, - const gchar *chooser_title); - +GtkWidget * gimp_prop_brush_chooser_new (GObject *config, + const gchar *property_name, + const gchar *chooser_title); +GtkWidget * gimp_prop_font_chooser_new (GObject *config, + const gchar *property_name, + const gchar *chooser_title); +GtkWidget * gimp_prop_gradient_chooser_new (GObject *config, + const gchar *property_name, + const gchar *chooser_title); +GtkWidget * gimp_prop_palette_chooser_new (GObject *config, + const gchar *property_name, + const gchar *chooser_title); +GtkWidget * gimp_prop_pattern_chooser_new (GObject *config, + const gchar *property_name, + const gchar *chooser_title); +GtkWidget * gimp_prop_drawable_chooser_new (GObject *config, + const gchar *property_name, + const gchar *chooser_title); G_END_DECLS -#endif /* __GIMP_PROP_WIDGETS_H__ */ diff --git a/libgimp/gimpresolutionentry-private.h b/libgimp/gimpresolutionentry-private.h index ee3cc4e789..1e8e6085dd 100644 --- a/libgimp/gimpresolutionentry-private.h +++ b/libgimp/gimpresolutionentry-private.h @@ -18,13 +18,12 @@ * along with this program. If not, see . */ +#pragma once + #if !defined (__GIMP_UI_H_INSIDE__) && !defined (GIMP_COMPILATION) #error "Only can be included directly." #endif -#ifndef __GIMP_RESOLUTION_ENTRY__ -#define __GIMP_RESOLUTION_ENTRY__ - G_BEGIN_DECLS /* For information look into the C source or the html documentation */ @@ -41,40 +40,40 @@ G_BEGIN_DECLS * with a much nicer API and also adding a property widget function. */ #define GIMP_TYPE_RESOLUTION_ENTRY (gimp_resolution_entry_get_type ()) -G_DECLARE_FINAL_TYPE (GimpResolutionEntry, gimp_resolution_entry, GIMP, RESOLUTION_ENTRY, GtkGrid) +G_DECLARE_FINAL_TYPE (GimpResolutionEntry, + gimp_resolution_entry, + GIMP, RESOLUTION_ENTRY, + GtkGrid) -typedef struct _GimpResolutionEntry GimpResolutionEntry; -GtkWidget * gimp_prop_resolution_entry_new (GObject *config, - const gchar *width_prop, - const gchar *height_prop, - const gchar *ppi_prop, - const gchar *unit_prop); -GtkWidget * gimp_resolution_entry_new (const gchar *width_label, - gint width, - const gchar *height_label, - gint height, - const gchar *res_label, - gdouble pixel_density, - GimpUnit *display_unit); +GtkWidget * gimp_prop_resolution_entry_new (GObject *config, + const gchar *width_prop, + const gchar *height_prop, + const gchar *ppi_prop, + const gchar *unit_prop); +GtkWidget * gimp_resolution_entry_new (const gchar *width_label, + gint width, + const gchar *height_label, + gint height, + const gchar *res_label, + gdouble pixel_density, + GimpUnit *display_unit); -void gimp_resolution_entry_set_width (GimpResolutionEntry *entry, - gint width); -void gimp_resolution_entry_set_height (GimpResolutionEntry *entry, - gint height); -void gimp_resolution_entry_set_pixel_density (GimpResolutionEntry *entry, - gdouble ppi); -void gimp_resolution_entry_set_unit (GimpResolutionEntry *entry, - GimpUnit *unit); -void gimp_resolution_entry_set_keep_ratio (GimpResolutionEntry *entry, - gboolean keep_ratio); +void gimp_resolution_entry_set_width (GimpResolutionEntry *entry, + gint width); +void gimp_resolution_entry_set_height (GimpResolutionEntry *entry, + gint height); +void gimp_resolution_entry_set_pixel_density (GimpResolutionEntry *entry, + gdouble ppi); +void gimp_resolution_entry_set_unit (GimpResolutionEntry *entry, + GimpUnit *unit); +void gimp_resolution_entry_set_keep_ratio (GimpResolutionEntry *entry, + gboolean keep_ratio); -gint gimp_resolution_entry_get_width (GimpResolutionEntry *entry); -gint gimp_resolution_entry_get_height (GimpResolutionEntry *entry); -gdouble gimp_resolution_entry_get_density (GimpResolutionEntry *entry); -GimpUnit * gimp_resolution_entry_get_unit (GimpResolutionEntry *entry); -gboolean gimp_resolution_entry_get_keep_ratio (GimpResolutionEntry *entry); +gint gimp_resolution_entry_get_width (GimpResolutionEntry *entry); +gint gimp_resolution_entry_get_height (GimpResolutionEntry *entry); +gdouble gimp_resolution_entry_get_density (GimpResolutionEntry *entry); +GimpUnit * gimp_resolution_entry_get_unit (GimpResolutionEntry *entry); +gboolean gimp_resolution_entry_get_keep_ratio (GimpResolutionEntry *entry); G_END_DECLS - -#endif /* __GIMP_RESOLUTION_ENTRY__ */ diff --git a/libgimp/gimpresource.h b/libgimp/gimpresource.h index ec0384bed8..c6fe22e36b 100644 --- a/libgimp/gimpresource.h +++ b/libgimp/gimpresource.h @@ -16,20 +16,22 @@ * . */ +#pragma once + #if !defined (__GIMP_H_INSIDE__) && !defined (GIMP_COMPILATION) #error "Only can be included directly." #endif -#ifndef __GIMP_RESOURCE_H__ -#define __GIMP_RESOURCE_H__ - G_BEGIN_DECLS /* For information look into the C source or the html documentation */ #define GIMP_TYPE_RESOURCE (gimp_resource_get_type ()) -G_DECLARE_DERIVABLE_TYPE (GimpResource, gimp_resource, GIMP, RESOURCE, GObject) +G_DECLARE_DERIVABLE_TYPE (GimpResource, + gimp_resource, + GIMP, RESOURCE, + GObject) struct _GimpResourceClass @@ -49,6 +51,7 @@ struct _GimpResourceClass void (*_gimp_reserved9) (void); }; + gint32 gimp_resource_get_id (GimpResource *resource); GimpResource * gimp_resource_get_by_id (gint32 resource_id); GimpResource * gimp_resource_get_by_name (GType resource_type, @@ -61,7 +64,4 @@ gboolean gimp_resource_is_gradient (GimpResource *resource); gboolean gimp_resource_is_palette (GimpResource *resource); gboolean gimp_resource_is_font (GimpResource *resource); - G_END_DECLS - -#endif /* __GIMP_RESOURCE_H__ */ diff --git a/libgimp/gimpresourcechooser.h b/libgimp/gimpresourcechooser.h index c9ea91d5eb..7f0d8320ad 100644 --- a/libgimp/gimpresourcechooser.h +++ b/libgimp/gimpresourcechooser.h @@ -16,17 +16,20 @@ * . */ +#pragma once + #if !defined (__GIMP_UI_H_INSIDE__) && !defined (GIMP_COMPILATION) #error "Only can be included directly." #endif -#ifndef __GIMP_RESOURCE_CHOOSER_H__ -#define __GIMP_RESOURCE_CHOOSER_H__ - G_BEGIN_DECLS #define GIMP_TYPE_RESOURCE_CHOOSER (gimp_resource_chooser_get_type ()) -G_DECLARE_DERIVABLE_TYPE (GimpResourceChooser, gimp_resource_chooser, GIMP, RESOURCE_CHOOSER, GtkBox) +G_DECLARE_DERIVABLE_TYPE (GimpResourceChooser, + gimp_resource_chooser, + GIMP, RESOURCE_CHOOSER, + GtkBox) + struct _GimpResourceChooserClass { @@ -61,5 +64,3 @@ G_GNUC_INTERNAL void _gimp_resource_chooser_set_clickable (GimpResourceChoose GtkWidget *widget); G_END_DECLS - -#endif /* __GIMP_RESOURCE_CHOOSER_H__ */ diff --git a/libgimp/gimpresourceselect-private.h b/libgimp/gimpresourceselect-private.h index 0611e8425e..b7c4322a51 100644 --- a/libgimp/gimpresourceselect-private.h +++ b/libgimp/gimpresourceselect-private.h @@ -16,13 +16,12 @@ * . */ +#pragma once + #if !defined (__GIMP_H_INSIDE__) && !defined (GIMP_COMPILATION) #error "Only can be included directly." #endif -#ifndef __GIMP_RESOURCE_SELECT_H__ -#define __GIMP_RESOURCE_SELECT_H__ - G_BEGIN_DECLS /** @@ -37,17 +36,16 @@ typedef void (* GimpResourceChoosedCallback) (GimpResource *resource, gboolean is_dialog_closing, gpointer owner_data); -const gchar * gimp_resource_select_new (const gchar *title, - GBytes *parent_handle, - GimpResource *resource, - GType resource_type, - GimpResourceChoosedCallback callback, - gpointer owner_data, - GDestroyNotify data_destroy); -void gimp_resource_select_set (const gchar *callback_name, - GimpResource *resource); +const gchar * gimp_resource_select_new (const gchar *title, + GBytes *parent_handle, + GimpResource *resource, + GType resource_type, + GimpResourceChoosedCallback callback, + gpointer owner_data, + GDestroyNotify data_destroy); + +void gimp_resource_select_set (const gchar *callback_name, + GimpResource *resource); G_END_DECLS - -#endif /* __GIMP_RESOURCE_SELECT_H__ */ diff --git a/libgimp/gimpselection.h b/libgimp/gimpselection.h index 00c2fe937c..4983319a2c 100644 --- a/libgimp/gimpselection.h +++ b/libgimp/gimpselection.h @@ -18,33 +18,31 @@ * . */ +#pragma once + #if !defined (__GIMP_H_INSIDE__) && !defined (GIMP_COMPILATION) #error "Only can be included directly." #endif -#ifndef __GIMP_SELECTION_H__ -#define __GIMP_SELECTION_H__ +#include G_BEGIN_DECLS /* For information look into the C source or the html documentation */ -#include - - #define GIMP_TYPE_SELECTION (gimp_selection_get_type ()) -G_DECLARE_FINAL_TYPE (GimpSelection, gimp_selection, GIMP, SELECTION, GimpChannel) +G_DECLARE_FINAL_TYPE (GimpSelection, + gimp_selection, + GIMP, SELECTION, + GimpChannel) -GimpSelection * gimp_selection_get_by_id (gint32 selection_id); +GimpSelection * gimp_selection_get_by_id (gint32 selection_id); -GimpLayer * gimp_selection_float (GimpImage *image, +GimpLayer * gimp_selection_float (GimpImage *image, GimpDrawable **drawables, - gint offx, - gint offy); - + gint offx, + gint offy); G_END_DECLS - -#endif /* __GIMP_SELECTION_H__ */ diff --git a/libgimp/gimptextlayer.h b/libgimp/gimptextlayer.h index e05de4a151..fd26a6c30e 100644 --- a/libgimp/gimptextlayer.h +++ b/libgimp/gimptextlayer.h @@ -19,28 +19,26 @@ * . */ +#pragma once + #if !defined (__GIMP_H_INSIDE__) && !defined (GIMP_COMPILATION) #error "Only can be included directly." #endif -#ifndef __GIMP_TEXT_LAYER_H__ -#define __GIMP_TEXT_LAYER_H__ +#include G_BEGIN_DECLS /* For information look into the C source or the html documentation */ -#include - - #define GIMP_TYPE_TEXT_LAYER (gimp_text_layer_get_type ()) -G_DECLARE_FINAL_TYPE (GimpTextLayer, gimp_text_layer, GIMP, TEXT_LAYER, GimpLayer) +G_DECLARE_FINAL_TYPE (GimpTextLayer, + gimp_text_layer, + GIMP, TEXT_LAYER, + GimpLayer) -GimpTextLayer * gimp_text_layer_get_by_id (gint32 layer_id); - +GimpTextLayer * gimp_text_layer_get_by_id (gint32 layer_id); G_END_DECLS - -#endif /* __GIMP_TEXT_LAYER_H__ */ diff --git a/libgimp/gimpthumbnailprocedure.h b/libgimp/gimpthumbnailprocedure.h index 314a815a00..2484dd2835 100644 --- a/libgimp/gimpthumbnailprocedure.h +++ b/libgimp/gimpthumbnailprocedure.h @@ -19,8 +19,7 @@ * . */ -#ifndef __GIMP_THUMBNAIL_PROCEDURE_H__ -#define __GIMP_THUMBNAIL_PROCEDURE_H__ +#pragma once #include @@ -64,17 +63,17 @@ typedef GimpValueArray * (* GimpRunThumbnailFunc) (GimpProcedure *procedu #define GIMP_TYPE_THUMBNAIL_PROCEDURE (gimp_thumbnail_procedure_get_type ()) -G_DECLARE_FINAL_TYPE (GimpThumbnailProcedure, gimp_thumbnail_procedure, GIMP, THUMBNAIL_PROCEDURE, GimpProcedure) +G_DECLARE_FINAL_TYPE (GimpThumbnailProcedure, + gimp_thumbnail_procedure, + GIMP, THUMBNAIL_PROCEDURE, + GimpProcedure) -GimpProcedure * gimp_thumbnail_procedure_new (GimpPlugIn *plug_in, - const gchar *name, - GimpPDBProcType proc_type, - GimpRunThumbnailFunc run_func, - gpointer run_data, - GDestroyNotify run_data_destroy); - +GimpProcedure * gimp_thumbnail_procedure_new (GimpPlugIn *plug_in, + const gchar *name, + GimpPDBProcType proc_type, + GimpRunThumbnailFunc run_func, + gpointer run_data, + GDestroyNotify run_data_destroy); G_END_DECLS - -#endif /* __GIMP_THUMBNAIL_PROCEDURE_H__ */ diff --git a/libgimp/gimptilebackendplugin.h b/libgimp/gimptilebackendplugin.h index 3afefc39fd..93c54cf57b 100644 --- a/libgimp/gimptilebackendplugin.h +++ b/libgimp/gimptilebackendplugin.h @@ -19,8 +19,7 @@ * along with this program. If not, see . */ -#ifndef __GIMP_TILE_BACKEND_PLUGIN_H__ -#define __GIMP_TILE_BACKEND_PLUGIN_H__ +#pragma once #include @@ -56,5 +55,3 @@ GeglTileBackend * _gimp_tile_backend_plugin_new (GimpDrawable *drawable, gint shadow); G_END_DECLS - -#endif /* __GIMP_TILE_BACKEND_PLUGIN_H__ */ diff --git a/libgimp/gimptypes.h b/libgimp/gimptypes.h index e1afbe1541..e9a83a4e3b 100644 --- a/libgimp/gimptypes.h +++ b/libgimp/gimptypes.h @@ -18,8 +18,7 @@ * . */ -#ifndef __GIMP_TYPES_H__ -#define __GIMP_TYPES_H__ +#pragma once #include @@ -81,7 +80,4 @@ typedef enum GIMP_PIXBUF_LARGE_CHECKS } GimpPixbufTransparency; - G_END_DECLS - -#endif /* __GIMP_TYPES_H__ */ diff --git a/libgimp/gimpui.h b/libgimp/gimpui.h index 25a01bf41f..7ad4d1d219 100644 --- a/libgimp/gimpui.h +++ b/libgimp/gimpui.h @@ -16,8 +16,7 @@ * . */ -#ifndef __GIMP_UI_H__ -#define __GIMP_UI_H__ +#pragma once #include #include @@ -64,7 +63,4 @@ void gimp_window_set_transient_for (GtkWindow *window, void gimp_window_set_transient_for_display (GtkWindow *window, GimpDisplay *display); - G_END_DECLS - -#endif /* __GIMP_UI_H__ */ diff --git a/libgimp/gimpuitypes.h b/libgimp/gimpuitypes.h index 1ddfdef2cb..b8f01b6bf8 100644 --- a/libgimp/gimpuitypes.h +++ b/libgimp/gimpuitypes.h @@ -18,8 +18,7 @@ * . */ -#ifndef __GIMP_UI_TYPES_H__ -#define __GIMP_UI_TYPES_H__ +#pragma once #include @@ -53,7 +52,4 @@ typedef struct _GimpGradientChooser GimpGradientChooser; typedef struct _GimpPaletteChooser GimpPaletteChooser; typedef struct _GimpPatternChooser GimpPatternChooser; - G_END_DECLS - -#endif /* __GIMP_UI_TYPES_H__ */ diff --git a/libgimp/gimpvectorloadprocedure.h b/libgimp/gimpvectorloadprocedure.h index 260f9df345..3e13ca46d1 100644 --- a/libgimp/gimpvectorloadprocedure.h +++ b/libgimp/gimpvectorloadprocedure.h @@ -19,8 +19,7 @@ * . */ -#ifndef __GIMP_VECTOR_LOAD_PROCEDURE_H__ -#define __GIMP_VECTOR_LOAD_PROCEDURE_H__ +#pragma once #include @@ -151,20 +150,23 @@ typedef GimpValueArray * (* GimpRunVectorLoadFunc) (GimpProcedure * * Since: 3.0 **/ -typedef gboolean (* GimpExtractVectorFunc) (GimpProcedure *procedure, - GimpRunMode run_mode, - GFile *file, - GimpMetadata *metadata, - GimpProcedureConfig *config, - GimpVectorLoadData *extracted_data, - gpointer *data_for_run, - GDestroyNotify *data_for_run_destroy, - gpointer extract_data, - GError **error); +typedef gboolean (* GimpExtractVectorFunc) (GimpProcedure *procedure, + GimpRunMode run_mode, + GFile *file, + GimpMetadata *metadata, + GimpProcedureConfig *config, + GimpVectorLoadData *extracted_data, + gpointer *data_for_run, + GDestroyNotify *data_for_run_destroy, + gpointer extract_data, + GError **error); #define GIMP_TYPE_VECTOR_LOAD_PROCEDURE (gimp_vector_load_procedure_get_type ()) -G_DECLARE_FINAL_TYPE (GimpVectorLoadProcedure, gimp_vector_load_procedure, GIMP, VECTOR_LOAD_PROCEDURE, GimpLoadProcedure) +G_DECLARE_FINAL_TYPE (GimpVectorLoadProcedure, + gimp_vector_load_procedure, + GIMP, VECTOR_LOAD_PROCEDURE, + GimpLoadProcedure) GimpProcedure * gimp_vector_load_procedure_new (GimpPlugIn *plug_in, @@ -182,7 +184,4 @@ gboolean gimp_vector_load_procedure_extract_dimensions (GimpVectorLoadPro GimpVectorLoadData *data, GError **error); - G_END_DECLS - -#endif /* __GIMP_VECTOR_LOAD_PROCEDURE_H__ */ diff --git a/libgimp/gimpvectorloadproceduredialog.h b/libgimp/gimpvectorloadproceduredialog.h index a2fa23732e..8a343c4905 100644 --- a/libgimp/gimpvectorloadproceduredialog.h +++ b/libgimp/gimpvectorloadproceduredialog.h @@ -18,20 +18,22 @@ * along with this program. If not, see . */ +#pragma once + #if !defined (__GIMP_UI_H_INSIDE__) && !defined (GIMP_COMPILATION) #error "Only can be included directly." #endif -#ifndef __GIMP_VECTOR_LOAD_PROCEDURE_DIALOG_H__ -#define __GIMP_VECTOR_LOAD_PROCEDURE_DIALOG_H__ - G_BEGIN_DECLS /* For information look into the C source or the html documentation */ #define GIMP_TYPE_VECTOR_LOAD_PROCEDURE_DIALOG (gimp_vector_load_procedure_dialog_get_type ()) -G_DECLARE_FINAL_TYPE (GimpVectorLoadProcedureDialog, gimp_vector_load_procedure_dialog, GIMP, VECTOR_LOAD_PROCEDURE_DIALOG, GimpProcedureDialog) +G_DECLARE_FINAL_TYPE (GimpVectorLoadProcedureDialog, + gimp_vector_load_procedure_dialog, + GIMP, VECTOR_LOAD_PROCEDURE_DIALOG, + GimpProcedureDialog) GtkWidget * gimp_vector_load_procedure_dialog_new (GimpVectorLoadProcedure *procedure, @@ -39,8 +41,4 @@ GtkWidget * gimp_vector_load_procedure_dialog_new (GimpVectorLoadProcedure *proc GimpVectorLoadData *extracted_data, GFile *file); - - G_END_DECLS - -#endif /* __GIMP_VECTOR_LOAD_PROCEDURE_DIALOG_H__ */ diff --git a/libgimp/gimpzoompreview.h b/libgimp/gimpzoompreview.h index 1f3310d0f1..5bf63250df 100644 --- a/libgimp/gimpzoompreview.h +++ b/libgimp/gimpzoompreview.h @@ -19,21 +19,22 @@ * . */ +#pragma once + #if !defined (__GIMP_UI_H_INSIDE__) && !defined (GIMP_COMPILATION) #error "Only can be included directly." #endif -#ifndef __GIMP_ZOOM_PREVIEW_H__ -#define __GIMP_ZOOM_PREVIEW_H__ - G_BEGIN_DECLS - /* For information look into the C source or the html documentation */ #define GIMP_TYPE_ZOOM_PREVIEW (gimp_zoom_preview_get_type ()) -G_DECLARE_FINAL_TYPE (GimpZoomPreview, gimp_zoom_preview, GIMP, ZOOM_PREVIEW, GimpScrolledPreview) +G_DECLARE_FINAL_TYPE (GimpZoomPreview, + gimp_zoom_preview, + GIMP, ZOOM_PREVIEW, + GimpScrolledPreview) GtkWidget * gimp_zoom_preview_new_from_drawable (GimpDrawable *drawable); @@ -49,7 +50,4 @@ GimpDrawable * gimp_zoom_preview_get_drawable (GimpZoomPreview GimpZoomModel * gimp_zoom_preview_get_model (GimpZoomPreview *preview); gdouble gimp_zoom_preview_get_factor (GimpZoomPreview *preview); - G_END_DECLS - -#endif /* __GIMP_ZOOM_PREVIEW_H__ */ diff --git a/libgimp/libgimp-intl.h b/libgimp/libgimp-intl.h index 2ae01d9d00..9b61ad5327 100644 --- a/libgimp/libgimp-intl.h +++ b/libgimp/libgimp-intl.h @@ -18,8 +18,7 @@ * . */ -#ifndef __LIBGIMP_INTL_H__ -#define __LIBGIMP_INTL_H__ +#pragma once #ifndef GETTEXT_PACKAGE #error "config.h must be included prior to libgimp-intl.h" @@ -40,6 +39,3 @@ #define N_(String) (String) #define NC_(Context,String) (String) - - -#endif /* __LIBGIMP_INTL_H__ */ diff --git a/libgimp/stdplugins-intl.h b/libgimp/stdplugins-intl.h index 4a2d7be6de..1ee7c096bd 100644 --- a/libgimp/stdplugins-intl.h +++ b/libgimp/stdplugins-intl.h @@ -18,8 +18,7 @@ * . */ -#ifndef __STDPLUGINS_INTL_H__ -#define __STDPLUGINS_INTL_H__ +#pragma once #ifndef GETTEXT_PACKAGE #error "config.h must be included prior to stdplugins-intl.h" @@ -40,6 +39,3 @@ set_i18n (GimpPlugIn *plug_in, \ }; #define STD_SET_I18N set_i18n - - -#endif /* __STDPLUGINS_INTL_H__ */ diff --git a/libgimpcolor/gimpadaptivesupersample.h b/libgimpcolor/gimpadaptivesupersample.h index 57cb784e96..346ca68064 100644 --- a/libgimpcolor/gimpadaptivesupersample.h +++ b/libgimpcolor/gimpadaptivesupersample.h @@ -20,8 +20,7 @@ #error "Only can be included directly." #endif -#ifndef __GIMP_ADAPTIVE_SUPERSAMPLE_H__ -#define __GIMP_ADAPTIVE_SUPERSAMPLE_H__ +#pragma once G_BEGIN_DECLS @@ -76,7 +75,4 @@ gulong gimp_adaptive_supersample_area (gint x1, GimpProgressFunc progress_func, gpointer progress_data); - G_END_DECLS - -#endif /* __GIMP_ADAPTIVE_SUPERSAMPLE_H__ */ diff --git a/libgimpcolor/gimpbilinear.h b/libgimpcolor/gimpbilinear.h index c6c38259b4..05dcd52b4b 100644 --- a/libgimpcolor/gimpbilinear.h +++ b/libgimpcolor/gimpbilinear.h @@ -20,8 +20,7 @@ #error "Only can be included directly." #endif -#ifndef __GIMP_BILINEAR_H__ -#define __GIMP_BILINEAR_H__ +#pragma once G_BEGIN_DECLS @@ -49,7 +48,4 @@ void gimp_bilinear_rgb (gdouble x, gboolean has_alpha, gdouble *retvalues); - G_END_DECLS - -#endif /* __GIMP_BILINEAR_H__ */ diff --git a/libgimpcolor/gimpcairo.h b/libgimpcolor/gimpcairo.h index 883f41e3a2..9eb0434404 100644 --- a/libgimpcolor/gimpcairo.h +++ b/libgimpcolor/gimpcairo.h @@ -20,8 +20,7 @@ * . */ -#ifndef __GIMP_CAIRO_H__ -#define __GIMP_CAIRO_H__ +#pragma once cairo_pattern_t * gimp_cairo_checkerboard_create (cairo_t *cr, @@ -150,6 +149,3 @@ GeglBuffer * gimp_cairo_surface_create_buffer (cairo_surface_t *surface, (a) = ta; \ } G_STMT_END #endif - - -#endif /* __GIMP_CAIRO_H__ */ diff --git a/libgimpcolor/gimpcolor-private.h b/libgimpcolor/gimpcolor-private.h index 9a9716d6ba..64fe5efcef 100644 --- a/libgimpcolor/gimpcolor-private.h +++ b/libgimpcolor/gimpcolor-private.h @@ -16,8 +16,8 @@ * . */ -#ifndef __GIMP_COLOR_PRIVATE_H__ -#define __GIMP_COLOR_PRIVATE_H__ +#pragma once + /* Legacy definition to calculate luminance from sRGB. * @@ -35,6 +35,3 @@ #define GIMP_RGB_LUMINANCE(r,g,b) ((r) * GIMP_RGB_LUMINANCE_RED + \ (g) * GIMP_RGB_LUMINANCE_GREEN + \ (b) * GIMP_RGB_LUMINANCE_BLUE) - - -#endif /* __GIMP_COLOR_PRIVATE_H__ */ diff --git a/libgimpcolor/gimpcolor.h b/libgimpcolor/gimpcolor.h index c046a1bcbd..4a16a7c515 100644 --- a/libgimpcolor/gimpcolor.h +++ b/libgimpcolor/gimpcolor.h @@ -16,8 +16,7 @@ * . */ -#ifndef __GIMP_COLOR_H__ -#define __GIMP_COLOR_H__ +#pragma once #define __GIMP_COLOR_H_INSIDE__ @@ -120,7 +119,4 @@ typedef const Babl * GimpBablFormat; GType gimp_babl_format_get_type (void) G_GNUC_CONST; - G_END_DECLS - -#endif /* __GIMP_COLOR_H__ */ diff --git a/libgimpcolor/gimpcolormanaged.h b/libgimpcolor/gimpcolormanaged.h index 7bab1c68ff..74946f5775 100644 --- a/libgimpcolor/gimpcolormanaged.h +++ b/libgimpcolor/gimpcolormanaged.h @@ -23,8 +23,7 @@ #error "Only can be included directly." #endif -#ifndef __GIMP_COLOR_MANAGED_H__ -#define __GIMP_COLOR_MANAGED_H__ +#pragma once G_BEGIN_DECLS @@ -32,7 +31,11 @@ G_BEGIN_DECLS #define GIMP_TYPE_COLOR_MANAGED (gimp_color_managed_get_type ()) -G_DECLARE_INTERFACE (GimpColorManaged, gimp_color_managed, GIMP, COLOR_MANAGED, GObject) +G_DECLARE_INTERFACE (GimpColorManaged, + gimp_color_managed, + GIMP, COLOR_MANAGED, + GObject) + /** * GimpColorManagedInterface: @@ -103,7 +106,4 @@ void gimp_color_managed_simulation_intent_changed (GimpColo void gimp_color_managed_simulation_bpc_changed (GimpColorManaged *managed); - G_END_DECLS - -#endif /* __GIMP_COLOR_MANAGED_IFACE_H__ */ diff --git a/libgimpcolor/gimpcolorprofile.h b/libgimpcolor/gimpcolorprofile.h index e5c2f1670f..ce2781efd5 100644 --- a/libgimpcolor/gimpcolorprofile.h +++ b/libgimpcolor/gimpcolorprofile.h @@ -24,8 +24,7 @@ #error "Only can be included directly." #endif -#ifndef __GIMP_COLOR_PROFILE_H__ -#define __GIMP_COLOR_PROFILE_H__ +#pragma once G_BEGIN_DECLS @@ -33,7 +32,10 @@ G_BEGIN_DECLS #define GIMP_TYPE_COLOR_PROFILE (gimp_color_profile_get_type ()) -G_DECLARE_FINAL_TYPE (GimpColorProfile, gimp_color_profile, GIMP, COLOR_PROFILE, GObject) +G_DECLARE_FINAL_TYPE (GimpColorProfile, + gimp_color_profile, + GIMP, COLOR_PROFILE, + GObject) GimpColorProfile * gimp_color_profile_new_rgb_srgb (void); @@ -94,7 +96,4 @@ const Babl * gimp_color_profile_get_format (GimpColorProfile * const Babl * gimp_color_profile_get_lcms_format (const Babl *format, guint32 *lcms_format); - G_END_DECLS - -#endif /* __GIMP_COLOR_PROFILE_H__ */ diff --git a/libgimpcolor/gimpcolortransform.h b/libgimpcolor/gimpcolortransform.h index 938a1e7f9e..f76b75de36 100644 --- a/libgimpcolor/gimpcolortransform.h +++ b/libgimpcolor/gimpcolortransform.h @@ -24,8 +24,7 @@ #error "Only can be included directly." #endif -#ifndef __GIMP_COLOR_TRANSFORM_H__ -#define __GIMP_COLOR_TRANSFORM_H__ +#pragma once G_BEGIN_DECLS @@ -52,7 +51,10 @@ typedef enum #define GIMP_TYPE_COLOR_TRANSFORM (gimp_color_transform_get_type ()) -G_DECLARE_FINAL_TYPE (GimpColorTransform, gimp_color_transform, GIMP, COLOR_TRANSFORM, GObject) +G_DECLARE_FINAL_TYPE (GimpColorTransform, + gimp_color_transform, + GIMP, COLOR_TRANSFORM, + GObject) GimpColorTransform * @@ -89,7 +91,4 @@ void gimp_color_transform_process_buffer (GimpColorTransform *transfo gboolean gimp_color_transform_can_gegl_copy (GimpColorProfile *src_profile, GimpColorProfile *dest_profile); - G_END_DECLS - -#endif /* __GIMP_COLOR_TRANSFORM_H__ */ diff --git a/libgimpcolor/gimpcolortypes.h b/libgimpcolor/gimpcolortypes.h index 3825050035..144906b835 100644 --- a/libgimpcolor/gimpcolortypes.h +++ b/libgimpcolor/gimpcolortypes.h @@ -16,14 +16,11 @@ * . */ -#ifndef __GIMP_COLOR_TYPES_H__ -#define __GIMP_COLOR_TYPES_H__ - +#pragma once #include #include - G_BEGIN_DECLS /* For information look into the C source or the html documentation */ @@ -33,7 +30,4 @@ typedef struct _GimpColorManaged GimpColorManaged; /* dummy typedef */ typedef struct _GimpColorProfile GimpColorProfile; typedef struct _GimpColorTransform GimpColorTransform; - G_END_DECLS - -#endif /* __GIMP_COLOR_TYPES_H__ */ diff --git a/libgimpcolor/gimppixbuf.h b/libgimpcolor/gimppixbuf.h index 6cc590cae3..076c2aef86 100644 --- a/libgimpcolor/gimppixbuf.h +++ b/libgimpcolor/gimppixbuf.h @@ -23,8 +23,7 @@ #error "Only can be included directly." #endif -#ifndef __GIMP_PIXBUF_H__ -#define __GIMP_PIXBUF_H__ +#pragma once G_BEGIN_DECLS @@ -37,7 +36,4 @@ GeglBuffer * gimp_pixbuf_create_buffer (GdkPixbuf *pixbuf); guint8 * gimp_pixbuf_get_icc_profile (GdkPixbuf *pixbuf, gsize *length); - G_END_DECLS - -#endif /* __GIMP_PIXBUF_H__ */ diff --git a/libgimpmodule/gimpmodule.h b/libgimpmodule/gimpmodule.h index 2233ef4360..f391692b90 100644 --- a/libgimpmodule/gimpmodule.h +++ b/libgimpmodule/gimpmodule.h @@ -19,8 +19,7 @@ * . */ -#ifndef __GIMP_MODULE_H__ -#define __GIMP_MODULE_H__ +#pragma once #include #include @@ -35,7 +34,6 @@ G_BEGIN_DECLS - /** * GIMP_MODULE_ABI_VERSION: * @@ -128,7 +126,7 @@ struct _GimpModuleInfo * * Returns: The info struct describing the module. **/ -typedef const GimpModuleInfo * (* GimpModuleQueryFunc) (GTypeModule *module); +typedef const GimpModuleInfo * (* GimpModuleQueryFunc) (GTypeModule *module); /** * GimpModuleRegisterFunc: @@ -143,7 +141,7 @@ typedef const GimpModuleInfo * (* GimpModuleQueryFunc) (GTypeModule *module); * * Returns: Whether the registration was succesfull **/ -typedef gboolean (* GimpModuleRegisterFunc) (GTypeModule *module); +typedef gboolean (* GimpModuleRegisterFunc) (GTypeModule *module); /* GimpModules have to implement these */ @@ -152,7 +150,11 @@ G_MODULE_EXPORT gboolean gimp_module_register (GTypeModule *module #define GIMP_TYPE_MODULE (gimp_module_get_type ()) -G_DECLARE_DERIVABLE_TYPE (GimpModule, gimp_module, GIMP, MODULE, GTypeModule) +G_DECLARE_DERIVABLE_TYPE (GimpModule, + gimp_module, + GIMP, MODULE, + GTypeModule) + struct _GimpModuleClass { @@ -193,7 +195,4 @@ const gchar * gimp_module_get_last_error (GimpModule *module); gboolean gimp_module_query_module (GimpModule *module); - G_END_DECLS - -#endif /* __GIMP_MODULE_H__ */ diff --git a/libgimpmodule/gimpmoduledb.h b/libgimpmodule/gimpmoduledb.h index 2d2c2c7b15..787409e15e 100644 --- a/libgimpmodule/gimpmoduledb.h +++ b/libgimpmodule/gimpmoduledb.h @@ -16,17 +16,19 @@ * . */ +#pragma once + #if !defined (__GIMP_MODULE_H_INSIDE__) && !defined (GIMP_MODULE_COMPILATION) #error "Only can be included directly." #endif -#ifndef __GIMP_MODULE_DB_H__ -#define __GIMP_MODULE_DB_H__ - G_BEGIN_DECLS -#define GIMP_TYPE_MODULE_DB (gimp_module_db_get_type ()) -G_DECLARE_FINAL_TYPE (GimpModuleDB, gimp_module_db, GIMP, MODULE_DB, GObject) +#define GIMP_TYPE_MODULE_DB (gimp_module_db_get_type ()) +G_DECLARE_FINAL_TYPE (GimpModuleDB, + gimp_module_db, + GIMP, MODULE_DB, + GObject) GimpModuleDB * gimp_module_db_new (gboolean verbose); @@ -44,7 +46,4 @@ void gimp_module_db_load (GimpModuleDB *db, void gimp_module_db_refresh (GimpModuleDB *db, const gchar *module_path); - G_END_DECLS - -#endif /* __GIMP_MODULE_DB_H__ */ diff --git a/libgimpmodule/gimpmoduletypes.h b/libgimpmodule/gimpmoduletypes.h index 91d2649a61..a61c9f8273 100644 --- a/libgimpmodule/gimpmoduletypes.h +++ b/libgimpmodule/gimpmoduletypes.h @@ -16,13 +16,10 @@ * . */ -#ifndef __GIMP_MODULE_TYPES_H__ -#define __GIMP_MODULE_TYPES_H__ - +#pragma once #include - G_BEGIN_DECLS /* For information look into the C source or the html documentation */ @@ -32,7 +29,4 @@ typedef struct _GimpModule GimpModule; typedef struct _GimpModuleInfo GimpModuleInfo; typedef struct _GimpModuleDB GimpModuleDB; - G_END_DECLS - -#endif /* __GIMP_MODULE_TYPES_H__ */ diff --git a/libgimpthumb/gimpthumb-enums.h b/libgimpthumb/gimpthumb-enums.h index 841467327c..0407f68d03 100644 --- a/libgimpthumb/gimpthumb-enums.h +++ b/libgimpthumb/gimpthumb-enums.h @@ -22,12 +22,10 @@ * . */ -#ifndef __GIMP_THUMB_ENUMS_H__ -#define __GIMP_THUMB_ENUMS_H__ +#pragma once G_BEGIN_DECLS - /** * SECTION: gimpthumb-enums * @title: GimpThumb-enums @@ -112,7 +110,4 @@ typedef enum GIMP_THUMB_STATE_OK } GimpThumbState; - G_END_DECLS - -#endif /* __GIMP_THUMB_ENUMS_H__ */ diff --git a/libgimpthumb/gimpthumb-error.h b/libgimpthumb/gimpthumb-error.h index 9dec6e8d9c..dee100620b 100644 --- a/libgimpthumb/gimpthumb-error.h +++ b/libgimpthumb/gimpthumb-error.h @@ -22,16 +22,14 @@ * . */ +#pragma once + #if !defined (__GIMP_THUMB_H_INSIDE__) && !defined (GIMP_THUMB_COMPILATION) #error "Only can be included directly." #endif -#ifndef __GIMP_THUMB_ERROR_H__ -#define __GIMP_THUMB_ERROR_H__ - G_BEGIN_DECLS - /** * GimpThumbError: * @GIMP_THUMB_ERROR_OPEN: there was a problem opening the file @@ -58,7 +56,4 @@ typedef enum GQuark gimp_thumb_error_quark (void) G_GNUC_CONST; - G_END_DECLS - -#endif /* __GIMP_THUMB_ERROR_H__ */ diff --git a/libgimpthumb/gimpthumb-types.h b/libgimpthumb/gimpthumb-types.h index 29aa4e346b..3d91fdad1a 100644 --- a/libgimpthumb/gimpthumb-types.h +++ b/libgimpthumb/gimpthumb-types.h @@ -22,9 +22,7 @@ * . */ -#ifndef __GIMP_THUMB_TYPES_H__ -#define __GIMP_THUMB_TYPES_H__ - +#pragma once #include @@ -33,6 +31,3 @@ G_BEGIN_DECLS typedef struct _GimpThumbnail GimpThumbnail; G_END_DECLS - - -#endif /* __GIMP_THUMB_TYPES_H__ */ diff --git a/libgimpthumb/gimpthumb-utils.h b/libgimpthumb/gimpthumb-utils.h index 7346e1a70e..f50c3bb95d 100644 --- a/libgimpthumb/gimpthumb-utils.h +++ b/libgimpthumb/gimpthumb-utils.h @@ -26,12 +26,10 @@ #error "Only can be included directly." #endif -#ifndef __GIMP_THUMB_UTILS_H__ -#define __GIMP_THUMB_UTILS_H__ +#pragma once G_BEGIN_DECLS - gboolean gimp_thumb_init (const gchar *creator, const gchar *thumb_basedir); @@ -67,7 +65,4 @@ G_GNUC_INTERNAL void _gimp_thumbs_delete_others (const gchar *uri, GimpThumbSize size); G_GNUC_INTERNAL gchar * _gimp_thumb_filename_from_uri (const gchar *uri); - G_END_DECLS - -#endif /* __GIMP_THUMB_UTILS_H__ */ diff --git a/libgimpthumb/gimpthumb.h b/libgimpthumb/gimpthumb.h index 97a038a4de..1ccca70b9c 100644 --- a/libgimpthumb/gimpthumb.h +++ b/libgimpthumb/gimpthumb.h @@ -22,8 +22,7 @@ * . */ -#ifndef __GIMP_THUMB_H__ -#define __GIMP_THUMB_H__ +#pragma once #define __GIMP_THUMB_H_INSIDE__ @@ -34,5 +33,3 @@ #include #undef __GIMP_THUMB_H_INSIDE__ - -#endif /* __GIMP_THUMB_H__ */ diff --git a/libgimpthumb/gimpthumbnail.h b/libgimpthumb/gimpthumbnail.h index 9682c34875..6778e55bff 100644 --- a/libgimpthumb/gimpthumbnail.h +++ b/libgimpthumb/gimpthumbnail.h @@ -22,18 +22,19 @@ * . */ +#pragma once + #if !defined (__GIMP_THUMB_H_INSIDE__) && !defined (GIMP_THUMB_COMPILATION) #error "Only can be included directly." #endif -#ifndef __GIMP_THUMBNAIL_H__ -#define __GIMP_THUMBNAIL_H__ - G_BEGIN_DECLS - #define GIMP_TYPE_THUMBNAIL (gimp_thumbnail_get_type ()) -G_DECLARE_FINAL_TYPE (GimpThumbnail, gimp_thumbnail, GIMP, THUMBNAIL, GObject) +G_DECLARE_FINAL_TYPE (GimpThumbnail, + gimp_thumbnail, + GIMP, THUMBNAIL, + GObject) GimpThumbnail * gimp_thumbnail_new (void); @@ -76,7 +77,4 @@ void gimp_thumbnail_delete_others (GimpThumbnail *thumbnail, gboolean gimp_thumbnail_has_failed (GimpThumbnail *thumbnail); - G_END_DECLS - -#endif /* __GIMP_THUMBNAIL_H__ */ diff --git a/pdb/enumcode.pl b/pdb/enumcode.pl index 91c5ce29f1..06133c4902 100755 --- a/pdb/enumcode.pl +++ b/pdb/enumcode.pl @@ -58,13 +58,10 @@ print ENUMFILE <<'LGPL'; LGPL -my $guard = "__GIMP_ENUMS_H__"; print ENUMFILE < can be included directly." #endif -#ifndef $guard -#define $guard - HEADER my @groups; foreach $group (keys %out) { @@ -866,7 +864,6 @@ HEADER } print PFILE <