mirror of
https://gitlab.gnome.org/GNOME/gimp.git
synced 2025-07-03 09:23:24 +00:00
libgimp: make gimp_resource_select_*() API private.
This commit is contained in:
parent
81fcb71209
commit
5b981adc7f
6 changed files with 31 additions and 35 deletions
|
@ -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
|
||||||
|
|
|
@ -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__
|
||||||
|
|
|
@ -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,13 +569,13 @@ 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,
|
||||||
gimp_resource_chooser_callback,
|
gimp_resource_chooser_callback,
|
||||||
self,
|
self,
|
||||||
NULL));
|
NULL));
|
||||||
gimp_resource_chooser_set_remote_dialog (self, priv->resource);
|
gimp_resource_chooser_set_remote_dialog (self, priv->resource);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -37,16 +37,16 @@ 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,
|
||||||
GimpResourceChoosedCallback callback,
|
GimpResourceChoosedCallback callback,
|
||||||
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
|
||||||
|
|
|
@ -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,13 +263,13 @@ 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,
|
||||||
GimpResourceChoosedCallback callback,
|
GimpResourceChoosedCallback callback,
|
||||||
gpointer owner_data,
|
gpointer owner_data,
|
||||||
GDestroyNotify data_destroy)
|
GDestroyNotify data_destroy)
|
||||||
{
|
{
|
||||||
GimpPlugIn *plug_in = gimp_get_plug_in ();
|
GimpPlugIn *plug_in = gimp_get_plug_in ();
|
||||||
GimpProcedure *procedure;
|
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].
|
* @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;
|
||||||
|
|
||||||
|
|
|
@ -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',
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue