libgimpbase: #pragma once

This commit is contained in:
Michael Natterer 2025-07-13 12:46:11 +02:00
parent 47a8ab5a66
commit 06cd254954
22 changed files with 40 additions and 133 deletions

View file

@ -16,16 +16,14 @@
* <https://www.gnu.org/licenses/>.
*/
#pragma once
#if !defined (__GIMP_BASE_H_INSIDE__) && !defined (GIMP_BASE_COMPILATION)
#error "Only <libgimpbase/gimpbase.h> can be included directly."
#endif
#ifndef __GIMP_CHECKS_H__
#define __GIMP_CHECKS_H__
G_BEGIN_DECLS
/**
* GIMP_CHECK_SIZE:
*
@ -139,7 +137,4 @@ void gimp_checks_get_colors (GimpCheckType type,
GeglColor **color1,
GeglColor **color2);
G_END_DECLS
#endif /* __GIMP_CHECKS_H__ */

View file

@ -19,17 +19,14 @@
* <https://www.gnu.org/licenses/>.
*/
#pragma once
#if !defined (__GIMP_BASE_H_INSIDE__) && !defined (GIMP_BASE_COMPILATION)
#error "Only <libgimpbase/gimpbase.h> can be included directly."
#endif
#ifndef __GIMP_CHOICE_H__
#define __GIMP_CHOICE_H__
G_BEGIN_DECLS
/* For information look into the C source or the html documentation */
@ -88,7 +85,4 @@ GParamSpec * gimp_param_spec_choice (const gchar *name,
GimpChoice * gimp_param_spec_choice_get_choice (GParamSpec *pspec);
const gchar * gimp_param_spec_choice_get_default (GParamSpec *pspec);
G_END_DECLS
#endif /* __GIMP_CHOICE_H__ */

View file

@ -16,9 +16,7 @@
* <https://www.gnu.org/licenses/>.
*/
#ifndef __GIMP_COMPAT_ENUMS_H__
#define __GIMP_COMPAT_ENUMS_H__
#pragma once
G_BEGIN_DECLS
@ -48,7 +46,4 @@ typedef enum /*< skip >*/
} GimpAddMaskTypeCompat;
#endif
G_END_DECLS
#endif /* __GIMP_COMPAT_ENUMS_H__ */

View file

@ -16,16 +16,14 @@
* <https://www.gnu.org/licenses/>.
*/
#pragma once
#if !defined (__GIMP_BASE_H_INSIDE__) && !defined (GIMP_BASE_COMPILATION)
#error "Only <libgimpbase/gimpbase.h> can be included directly."
#endif
#ifndef __GIMP_CPU_ACCEL_H__
#define __GIMP_CPU_ACCEL_H__
G_BEGIN_DECLS
/**
* GimpCpuAccelFlags:
* @GIMP_CPU_ACCEL_NONE: None
@ -66,7 +64,4 @@ typedef enum
GimpCpuAccelFlags gimp_cpu_accel_get_support (void);
G_END_DECLS
#endif /* __GIMP_CPU_ACCEL_H__ */

View file

@ -18,8 +18,7 @@
* <https://www.gnu.org/licenses/>.
*/
#ifndef __GIMP_ENV_PRIVATE_H__
#define __GIMP_ENV_PRIVATE_H__
#pragma once
G_BEGIN_DECLS
@ -28,7 +27,4 @@ G_BEGIN_DECLS
void gimp_env_init (gboolean plug_in);
G_END_DECLS
#endif /* __GIMP_ENV_PRIVATE_H__ */

View file

@ -19,13 +19,12 @@
* <https://www.gnu.org/licenses/>.
*/
#pragma once
#if !defined (__GIMP_BASE_H_INSIDE__) && !defined (GIMP_BASE_COMPILATION)
#error "Only <libgimpbase/gimpbase.h> can be included directly."
#endif
#ifndef __GIMP_ENV_H__
#define __GIMP_ENV_H__
G_BEGIN_DECLS
/* For information look into the C source or the html documentation */
@ -77,7 +76,4 @@ void gimp_path_free (GList *path);
gchar * gimp_path_get_user_writable_dir (GList *path) G_GNUC_MALLOC;
G_END_DECLS
#endif /* __GIMP_ENV_H__ */

View file

@ -18,17 +18,14 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#pragma once
#if !defined (__GIMP_BASE_H_INSIDE__) && !defined (GIMP_BASE_COMPILATION)
#error "Only <libgimpbase/gimpbase.h> can be included directly."
#endif
#ifndef __GIMP_EXPORT_OPTIONS_H__
#define __GIMP_EXPORT_OPTIONS_H__
G_BEGIN_DECLS
/* For information look into the C source or the html documentation */
@ -37,7 +34,6 @@ G_BEGIN_DECLS
G_DECLARE_FINAL_TYPE (GimpExportOptions, gimp_export_options, GIMP, EXPORT_OPTIONS, GObject)
/*
* GIMP_TYPE_PARAM_EXPORT_OPTIONS
*/
@ -53,7 +49,4 @@ GParamSpec * gimp_param_spec_export_options (const gchar *name,
const gchar *blurb,
GParamFlags flags);
G_END_DECLS
#endif /* __GIMP_EXPORT_OPTIONS_H__ */

View file

@ -19,16 +19,14 @@
* <https://www.gnu.org/licenses/>.
*/
#pragma once
#if !defined (__GIMP_BASE_H_INSIDE__) && !defined (GIMP_BASE_COMPILATION)
#error "Only <libgimpbase/gimpbase.h> can be included directly."
#endif
#ifndef __GIMP_LIMITS_H__
#define __GIMP_LIMITS_H__
G_BEGIN_DECLS
/**
* SECTION: gimplimits
* @title: gimplimits
@ -91,7 +89,4 @@ G_BEGIN_DECLS
* and must be < G_MAXDOUBLE
*/
G_END_DECLS
#endif /* __GIMP_LIMITS_H__ */

View file

@ -16,16 +16,14 @@
* <https://www.gnu.org/licenses/>.
*/
#pragma once
#if !defined (__GIMP_BASE_H_INSIDE__) && !defined (GIMP_BASE_COMPILATION)
#error "Only <libgimpbase/gimpbase.h> can be included directly."
#endif
#ifndef __GIMP_MEMSIZE_H__
#define __GIMP_MEMSIZE_H__
G_BEGIN_DECLS
/**
* GIMP_TYPE_MEMSIZE:
*
@ -59,7 +57,4 @@ GParamSpec * gimp_param_spec_memsize (const gchar *name,
guint64 default_value,
GParamFlags flags);
G_END_DECLS
#endif /* __GIMP_MEMSIZE_H__ */

View file

@ -19,16 +19,17 @@
* <https://www.gnu.org/licenses/>.
*/
#ifndef __GIMP_METADATA_H__
#define __GIMP_METADATA_H__
G_BEGIN_DECLS
#pragma once
#include <gexiv2/gexiv2.h>
G_BEGIN_DECLS
#define GIMP_TYPE_METADATA (gimp_metadata_get_type ())
G_DECLARE_FINAL_TYPE (GimpMetadata, gimp_metadata, GIMP, METADATA, GExiv2Metadata)
G_DECLARE_FINAL_TYPE (GimpMetadata,
gimp_metadata,
GIMP, METADATA,
GExiv2Metadata)
/**
@ -154,5 +155,3 @@ gboolean gimp_metadata_is_tag_supported (const gchar *tag,
const gchar *mime_type);
G_END_DECLS
#endif /* __GIMP_METADATA_H__ */

View file

@ -18,13 +18,12 @@
* <https://www.gnu.org/licenses/>.
*/
#pragma once
#if !defined (__GIMP_BASE_H_INSIDE__) && !defined (GIMP_BASE_COMPILATION)
#error "Only <libgimpbase/gimpbase.h> can be included directly."
#endif
#ifndef __GIMP_PARAM_SPECS_H__
#define __GIMP_PARAM_SPECS_H__
G_BEGIN_DECLS
/* For information look into the C source or the html documentation */
@ -410,7 +409,4 @@ GParamSpec * gimp_param_spec_core_object_array (const gchar *
GType gimp_param_spec_core_object_array_get_object_type (GParamSpec *pspec);
G_END_DECLS
#endif /* __GIMP_PARAM_SPECS_H__ */

View file

@ -19,13 +19,12 @@
* <https://www.gnu.org/licenses/>.
*/
#pragma once
#if !defined (__GIMP_BASE_H_INSIDE__) && !defined (GIMP_BASE_COMPILATION)
#error "Only <libgimpbase/gimpbase.h> can be included directly."
#endif
#ifndef __GIMP_PARASITE_H__
#define __GIMP_PARASITE_H__
G_BEGIN_DECLS
/* For information look into the C source or the html documentation */
@ -109,5 +108,3 @@ gconstpointer gimp_parasite_get_data (const GimpParasite *parasite,
guint32 *num_bytes);
G_END_DECLS
#endif /* __GIMP_PARASITE_H__ */

View file

@ -19,8 +19,7 @@
* <https://www.gnu.org/licenses/>.
*/
#ifndef __GIMP_PARASITE_IO_H__
#define __GIMP_PARASITE_IO_H__
#pragma once
G_BEGIN_DECLS
@ -83,5 +82,3 @@ gchar * gimp_pixpipe_params_build (GimpPixPipeParams *params) G_GNUC_MALLOC;
void gimp_pixpipe_params_free (GimpPixPipeParams *params);
G_END_DECLS
#endif /* __GIMP_PARASITE_IO_H__ */

View file

@ -16,8 +16,7 @@
* <https://www.gnu.org/licenses/>.
*/
#ifndef __GIMP_PROTOCOL_H__
#define __GIMP_PROTOCOL_H__
#pragma once
G_BEGIN_DECLS
@ -417,7 +416,4 @@ gboolean gp_extension_ack_write (GIOChannel *channel,
gboolean gp_has_init_write (GIOChannel *channel,
gpointer user_data);
G_END_DECLS
#endif /* __GIMP_PROTOCOL_H__ */

View file

@ -16,13 +16,12 @@
* <https://www.gnu.org/licenses/>.
*/
#pragma once
#if !defined (__GIMP_BASE_H_INSIDE__) && !defined (GIMP_BASE_COMPILATION)
#error "Only <libgimpbase/gimpbase.h> can be included directly."
#endif
#ifndef __GIMP_RECTANGLE_H__
#define __GIMP_RECTANGLE_H__
G_BEGIN_DECLS
/* For information look into the C source or the html documentation */
@ -54,7 +53,4 @@ void gimp_rectangle_union (gint x1,
gint *dest_width,
gint *dest_height);
G_END_DECLS
#endif /* __GIMP_RECTANGLE_H__ */

View file

@ -10,12 +10,10 @@
* more information and how to use this.
*/
#ifndef __GIMP_RELOC_H__
#define __GIMP_RELOC_H__
#pragma once
G_BEGIN_DECLS
/* These error codes can be returned from _gimp_reloc_init() or
* _gimp_reloc_init_lib().
*/
@ -40,7 +38,4 @@ G_GNUC_INTERNAL gboolean _gimp_reloc_init_lib (GError **error);
G_GNUC_INTERNAL gchar * _gimp_reloc_find_prefix (const gchar *default_prefix);
G_END_DECLS
#endif /* _GIMPRELOC_H_ */

View file

@ -16,8 +16,7 @@
* <https://www.gnu.org/licenses/>.
*/
#ifndef __GIMP_SIGNAL_H__
#define __GIMP_SIGNAL_H__
#pragma once
#include <signal.h>
@ -38,11 +37,9 @@ G_BEGIN_DECLS
**/
typedef void (* GimpSignalHandlerFunc) (gint signum);
GimpSignalHandlerFunc gimp_signal_private (gint signum,
GimpSignalHandlerFunc handler,
gint flags);
G_END_DECLS
#endif /* __GIMP_SIGNAL_H__ */

View file

@ -16,16 +16,14 @@
* <https://www.gnu.org/licenses/>.
*/
#pragma once
#if !defined (__GIMP_BASE_H_INSIDE__) && !defined (GIMP_BASE_COMPILATION)
#error "Only <libgimpbase/gimpbase.h> can be included directly."
#endif
#ifndef __GIMP_UTILS_H__
#define __GIMP_UTILS_H__
G_BEGIN_DECLS
gchar * gimp_utf8_strtrim (const gchar *str,
gint max_chars) G_GNUC_MALLOC;
gchar * gimp_any_to_utf8 (const gchar *str,
@ -92,5 +90,3 @@ void gimp_bind_text_domain (const gchar *domain_
const gchar *dir_name);
G_END_DECLS
#endif /* __GIMP_UTILS_H__ */

View file

@ -18,13 +18,12 @@
* <https://www.gnu.org/licenses/>.
*/
#pragma once
#if !defined (__GIMP_BASE_H_INSIDE__) && !defined (GIMP_BASE_COMPILATION)
#error "Only <libgimpbase/gimpbase.h> can be included directly."
#endif
#ifndef __GIMP_VALUE_ARRAY_H__
#define __GIMP_VALUE_ARRAY_H__
G_BEGIN_DECLS
/**
@ -97,7 +96,4 @@ GParamSpec * gimp_param_spec_value_array (const gchar *name,
GParamSpec * gimp_param_spec_value_array_get_element_spec (GParamSpec *pspec);
G_END_DECLS
#endif /* __GIMP_VALUE_ARRAY_H__ */

View file

@ -1,5 +1,4 @@
#ifndef __GIMP_VERSION_H__
#define __GIMP_VERSION_H__
#pragma once
/* gimpversion.h.in -> gimpversion.h
* This file is configured by Meson. Please modify meson.build files.
@ -62,7 +61,4 @@ G_BEGIN_DECLS
(GIMP_MAJOR_VERSION == (major) && GIMP_MINOR_VERSION == (minor) && \
GIMP_MICRO_VERSION >= (micro)))
G_END_DECLS
#endif /* __GIMP_VERSION_H__ */

View file

@ -19,15 +19,13 @@
* <https://www.gnu.org/licenses/>.
*/
#ifndef __GIMP_WIN32_IO_H__
#define __GIMP_WIN32_IO_H__
#pragma once
#include <io.h>
#include <direct.h>
G_BEGIN_DECLS
#define mkdir(n,a) _mkdir(n)
#define chmod(n,f) _chmod(n,f)
#define access(f,p) _access(f,p)
@ -95,5 +93,3 @@ G_BEGIN_DECLS
#endif
G_END_DECLS
#endif /* __GIMP_WIN32_IO_H__ */

View file

@ -16,8 +16,7 @@
* <https://www.gnu.org/licenses/>.
*/
#ifndef __GIMP_WIRE_H__
#define __GIMP_WIRE_H__
#pragma once
G_BEGIN_DECLS
@ -146,7 +145,4 @@ G_GNUC_INTERNAL gboolean
gint count,
gpointer user_data);
G_END_DECLS
#endif /* __GIMP_WIRE_H__ */