libgimp: make gimp_resource_select_*() API private.

This commit is contained in:
Jehan 2024-09-29 02:14:30 +02:00
parent 81fcb71209
commit 5b981adc7f
6 changed files with 31 additions and 35 deletions

View file

@ -955,8 +955,6 @@ EXPORTS
gimp_resource_is_pattern gimp_resource_is_pattern
gimp_resource_is_valid gimp_resource_is_valid
gimp_resource_rename gimp_resource_rename
gimp_resource_select_new
gimp_resource_select_set
gimp_selection_all gimp_selection_all
gimp_selection_border gimp_selection_border
gimp_selection_bounds gimp_selection_bounds

View file

@ -71,9 +71,6 @@
#include <libgimp/gimpthumbnailprocedure.h> #include <libgimp/gimpthumbnailprocedure.h>
#include <libgimp/gimpvectorloadprocedure.h> #include <libgimp/gimpvectorloadprocedure.h>
/* Resources and their widgets. Order important. */
#include <libgimp/gimpresourceselect.h>
#include <libgimp/gimp_pdb_headers.h> #include <libgimp/gimp_pdb_headers.h>
#undef __GIMP_H_INSIDE__ #undef __GIMP_H_INSIDE__

View file

@ -24,6 +24,7 @@
#include "libgimpwidgets/gimpwidgets.h" #include "libgimpwidgets/gimpwidgets.h"
#include "gimp.h" #include "gimp.h"
#include "gimpresourceselect-private.h"
#include "gimpuitypes.h" #include "gimpuitypes.h"
#include "gimpresourcechooser.h" #include "gimpresourcechooser.h"
@ -460,7 +461,7 @@ gimp_resource_chooser_set_remote_dialog (GimpResourceChooser *self,
g_return_if_fail (klass->resource_type != G_TYPE_INVALID); g_return_if_fail (klass->resource_type != G_TYPE_INVALID);
g_return_if_fail (klass->resource_type == G_TYPE_FROM_INSTANCE (resource)); g_return_if_fail (klass->resource_type == G_TYPE_FROM_INSTANCE (resource));
gimp_resource_select_set (priv->callback, resource); _gimp_resource_select_set (priv->callback, resource);
} }
static void static void
@ -568,7 +569,7 @@ gimp_resource_chooser_clicked (GimpResourceChooser *self)
if (GIMP_IS_DIALOG (toplevel)) if (GIMP_IS_DIALOG (toplevel))
handle = gimp_dialog_get_native_handle (GIMP_DIALOG (toplevel)); handle = gimp_dialog_get_native_handle (GIMP_DIALOG (toplevel));
priv->callback = g_strdup (gimp_resource_select_new (priv->title, priv->callback = g_strdup (_gimp_resource_select_new (priv->title,
handle, handle,
priv->resource, priv->resource,
klass->resource_type, klass->resource_type,

View file

@ -37,7 +37,7 @@ typedef void (* GimpResourceChoosedCallback) (GimpResource *resource,
gboolean is_dialog_closing, gboolean is_dialog_closing,
gpointer owner_data); gpointer owner_data);
const gchar * gimp_resource_select_new (const gchar *title, const gchar * _gimp_resource_select_new (const gchar *title,
GBytes *parent_handle, GBytes *parent_handle,
GimpResource *resource, GimpResource *resource,
GType resource_type, GType resource_type,
@ -45,7 +45,7 @@ const gchar * gimp_resource_select_new (const gchar *title
gpointer owner_data, gpointer owner_data,
GDestroyNotify data_destroy); GDestroyNotify data_destroy);
void gimp_resource_select_set (const gchar *callback_name, void _gimp_resource_select_set (const gchar *callback_name,
GimpResource *resource); GimpResource *resource);
G_END_DECLS G_END_DECLS

View file

@ -19,6 +19,7 @@
#include "config.h" #include "config.h"
#include "gimp.h" #include "gimp.h"
#include "gimpresourceselect-private.h"
typedef struct typedef struct
{ {
@ -244,7 +245,7 @@ popup_remote_chooser (const gchar *title,
} }
/** /**
* gimp_resource_select_new: * _gimp_resource_select_new:
* @title: Title of the resource selection dialog. * @title: Title of the resource selection dialog.
* @resource: The resource to set as the initial choice. * @resource: The resource to set as the initial choice.
* @resource_type: The type of the subclass of [class@Resource]. * @resource_type: The type of the subclass of [class@Resource].
@ -262,7 +263,7 @@ popup_remote_chooser (const gchar *title,
* freed automatically when the dialog is closed. * freed automatically when the dialog is closed.
**/ **/
const gchar * const gchar *
gimp_resource_select_new (const gchar *title, _gimp_resource_select_new (const gchar *title,
GBytes *parent_handle, GBytes *parent_handle,
GimpResource *resource, GimpResource *resource,
GType resource_type, GType resource_type,
@ -317,14 +318,14 @@ gimp_resource_select_new (const gchar *title,
} }
/* gimp_resource_select_set: /* _gimp_resource_select_set:
* @callback_name: a callback name as returned by [func@resource_select_new]. * @callback_name: a callback name as returned by [func@resource_select_new].
* @resource: a [class@Resource] of type @resource_type. * @resource: a [class@Resource] of type @resource_type.
* *
* Set currently selected resource in remote chooser. * Set currently selected resource in remote chooser.
*/ */
void void
gimp_resource_select_set (const gchar *callback_name, _gimp_resource_select_set (const gchar *callback_name,
GimpResource *resource) GimpResource *resource)
{ {
GType resource_type; GType resource_type;

View file

@ -205,7 +205,6 @@ libgimp_sources_introspectable = [
'gimpprocedureconfig.c', 'gimpprocedureconfig.c',
'gimpprogress.c', 'gimpprogress.c',
'gimpresource.c', 'gimpresource.c',
'gimpresourceselect.c',
'gimpexportprocedure.c', 'gimpexportprocedure.c',
'gimpselection.c', 'gimpselection.c',
'gimptextlayer.c', 'gimptextlayer.c',
@ -225,6 +224,7 @@ libgimp_sources = [
'gimppdbprocedure.c', 'gimppdbprocedure.c',
'gimppixbuf.c', 'gimppixbuf.c',
'gimpplugin_pdb.c', 'gimpplugin_pdb.c',
'gimpresourceselect.c',
'gimptilebackendplugin.c', 'gimptilebackendplugin.c',
] ]
@ -265,7 +265,6 @@ libgimp_headers_introspectable = [
'gimpprocedureconfig.h', 'gimpprocedureconfig.h',
'gimpprogress.h', 'gimpprogress.h',
'gimpresource.h', 'gimpresource.h',
'gimpresourceselect.h',
'gimpexportprocedure.h', 'gimpexportprocedure.h',
'gimpselection.h', 'gimpselection.h',
'gimptextlayer.h', 'gimptextlayer.h',