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_valid
gimp_resource_rename
gimp_resource_select_new
gimp_resource_select_set
gimp_selection_all
gimp_selection_border
gimp_selection_bounds

View File

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

View File

@ -24,6 +24,7 @@
#include "libgimpwidgets/gimpwidgets.h"
#include "gimp.h"
#include "gimpresourceselect-private.h"
#include "gimpuitypes.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_FROM_INSTANCE (resource));
gimp_resource_select_set (priv->callback, resource);
_gimp_resource_select_set (priv->callback, resource);
}
static void
@ -568,13 +569,13 @@ gimp_resource_chooser_clicked (GimpResourceChooser *self)
if (GIMP_IS_DIALOG (toplevel))
handle = gimp_dialog_get_native_handle (GIMP_DIALOG (toplevel));
priv->callback = g_strdup (gimp_resource_select_new (priv->title,
handle,
priv->resource,
klass->resource_type,
gimp_resource_chooser_callback,
self,
NULL));
priv->callback = g_strdup (_gimp_resource_select_new (priv->title,
handle,
priv->resource,
klass->resource_type,
gimp_resource_chooser_callback,
self,
NULL));
gimp_resource_chooser_set_remote_dialog (self, priv->resource);
}
}

View File

@ -37,16 +37,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);
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);
void _gimp_resource_select_set (const gchar *callback_name,
GimpResource *resource);
G_END_DECLS

View File

@ -19,6 +19,7 @@
#include "config.h"
#include "gimp.h"
#include "gimpresourceselect-private.h"
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.
* @resource: The resource to set as the initial choice.
* @resource_type: The type of the subclass of [class@Resource].
@ -262,13 +263,13 @@ popup_remote_chooser (const gchar *title,
* freed automatically when the dialog is closed.
**/
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)
_gimp_resource_select_new (const gchar *title,
GBytes *parent_handle,
GimpResource *resource,
GType resource_type,
GimpResourceChoosedCallback callback,
gpointer owner_data,
GDestroyNotify data_destroy)
{
GimpPlugIn *plug_in = gimp_get_plug_in ();
GimpProcedure *procedure;
@ -317,15 +318,15 @@ 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].
* @resource: a [class@Resource] of type @resource_type.
*
* Set currently selected resource in remote chooser.
*/
void
gimp_resource_select_set (const gchar *callback_name,
GimpResource *resource)
_gimp_resource_select_set (const gchar *callback_name,
GimpResource *resource)
{
GType resource_type;

View File

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