From ac1bf4a64ee3645d122ebed37673c02b79beb5f8 Mon Sep 17 00:00:00 2001 From: Jehan Date: Thu, 17 Oct 2024 16:12:04 +0200 Subject: [PATCH] app, libgimpbase: also move gimp_cpu_accel_set_use() in a private header. Similar to previous commit. If we don't want people to use this function yet need to export it, at least don't expose the declaration in shipped headers and even less in the API docs. --- app/app.c | 1 + libgimpbase/gimpbase-private.h | 1 + libgimpbase/gimpcpuaccel-private.h | 32 ++++++++++++++++++++++++++++++ libgimpbase/gimpcpuaccel.c | 1 + libgimpbase/gimpcpuaccel.h | 4 ---- 5 files changed, 35 insertions(+), 4 deletions(-) create mode 100644 libgimpbase/gimpcpuaccel-private.h diff --git a/app/app.c b/app/app.c index b5a26c598e..e7b63940c1 100644 --- a/app/app.c +++ b/app/app.c @@ -44,6 +44,7 @@ #undef GIMP_DISABLE_DEPRECATED /* for compat enums */ #include "libgimpbase/gimpbase.h" #define GIMP_DISABLE_DEPRECATED +#include "libgimpbase/gimpbase-private.h" #include "libgimpconfig/gimpconfig.h" #include "core/core-types.h" diff --git a/libgimpbase/gimpbase-private.h b/libgimpbase/gimpbase-private.h index 4b83b3f1d3..208069f970 100644 --- a/libgimpbase/gimpbase-private.h +++ b/libgimpbase/gimpbase-private.h @@ -23,6 +23,7 @@ #define __GIMP_BASE_PRIVATE_H__ +#include #include diff --git a/libgimpbase/gimpcpuaccel-private.h b/libgimpbase/gimpcpuaccel-private.h new file mode 100644 index 0000000000..df46b7a4c6 --- /dev/null +++ b/libgimpbase/gimpcpuaccel-private.h @@ -0,0 +1,32 @@ +/* LIBGIMP - The GIMP Library + * Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball + * + * gimpcpuaccel-private.h + * + * This library is free software: you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. If not, see + * . + */ + +#ifndef __GIMP_CPU_ACCEL_PRIVATE_H__ +#define __GIMP_CPU_ACCEL_PRIVATE_H__ + +G_BEGIN_DECLS + + +void gimp_cpu_accel_set_use (gboolean use); + + +G_END_DECLS + +#endif /* __GIMP_CPU_ACCEL_PRIVATE_H__ */ diff --git a/libgimpbase/gimpcpuaccel.c b/libgimpbase/gimpcpuaccel.c index 2c864dc886..1d8f706f37 100644 --- a/libgimpbase/gimpcpuaccel.c +++ b/libgimpbase/gimpcpuaccel.c @@ -36,6 +36,7 @@ #include #include "gimpcpuaccel.h" +#include "gimpcpuaccel-private.h" /** diff --git a/libgimpbase/gimpcpuaccel.h b/libgimpbase/gimpcpuaccel.h index 03c0d4b6b7..73495bd317 100644 --- a/libgimpbase/gimpcpuaccel.h +++ b/libgimpbase/gimpcpuaccel.h @@ -67,10 +67,6 @@ typedef enum GimpCpuAccelFlags gimp_cpu_accel_get_support (void); -/* for internal use only */ -void gimp_cpu_accel_set_use (gboolean use); - - G_END_DECLS #endif /* __GIMP_CPU_ACCEL_H__ */