mirror of
https://gitlab.gnome.org/GNOME/gimp.git
synced 2025-07-03 17:33:25 +00:00
libgimp: rename GimpLoad,SaveFunc to GimpRunLoad,SaveFunc
and document gimp_load,save_procedure_new().
This commit is contained in:
parent
fc065f8add
commit
d067441c31
4 changed files with 90 additions and 24 deletions
|
@ -29,7 +29,7 @@
|
||||||
|
|
||||||
struct _GimpLoadProcedurePrivate
|
struct _GimpLoadProcedurePrivate
|
||||||
{
|
{
|
||||||
GimpLoadFunc run_func;
|
GimpRunLoadFunc run_func;
|
||||||
gpointer run_data;
|
gpointer run_data;
|
||||||
GDestroyNotify run_data_destroy;
|
GDestroyNotify run_data_destroy;
|
||||||
|
|
||||||
|
@ -204,11 +204,44 @@ gimp_load_procedure_run (GimpProcedure *procedure,
|
||||||
|
|
||||||
/* public functions */
|
/* public functions */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* gimp_load_procedure_new:
|
||||||
|
* @plug_in: a #GimpPlugIn.
|
||||||
|
* @name: the new procedure's name.
|
||||||
|
* @proc_type: the new procedure's #GimpPDBProcType.
|
||||||
|
* @run_func: the run function for the new procedure.
|
||||||
|
* @run_data: user data passed to @run_func.
|
||||||
|
* @run_data_destroy: (nullable): free function for @run_data, or %NULL.
|
||||||
|
*
|
||||||
|
* Creates a new load procedure named @name which will call @run_func
|
||||||
|
* when invoked.
|
||||||
|
*
|
||||||
|
* See gimp_procedure_new() for information about @proc_type.
|
||||||
|
*
|
||||||
|
* #GimpLoadProcedure is a #GimpProcedure subclass that makes it easier
|
||||||
|
* to write file load procedures.
|
||||||
|
*
|
||||||
|
* It automatically adds the standard
|
||||||
|
*
|
||||||
|
* (run-mode, uri, raw-uri)
|
||||||
|
*
|
||||||
|
* arguments of a load procedure. It is possible to add additional
|
||||||
|
* arguments.
|
||||||
|
*
|
||||||
|
* When invoked via gimp_procedure_run(), it unpacks these standard
|
||||||
|
* arguemnts and calls @run_func which is a #GimpRunLoadFunc. The
|
||||||
|
* "args" #GimpValueArray of #GimpRunLoadFunc only contains
|
||||||
|
* additionally added arguments.
|
||||||
|
*
|
||||||
|
* Returns: a new #GimpProcedure.
|
||||||
|
*
|
||||||
|
* Since: 3.0
|
||||||
|
**/
|
||||||
GimpProcedure *
|
GimpProcedure *
|
||||||
gimp_load_procedure_new (GimpPlugIn *plug_in,
|
gimp_load_procedure_new (GimpPlugIn *plug_in,
|
||||||
const gchar *name,
|
const gchar *name,
|
||||||
GimpPDBProcType proc_type,
|
GimpPDBProcType proc_type,
|
||||||
GimpLoadFunc run_func,
|
GimpRunLoadFunc run_func,
|
||||||
gpointer run_data,
|
gpointer run_data,
|
||||||
GDestroyNotify run_data_destroy)
|
GDestroyNotify run_data_destroy)
|
||||||
{
|
{
|
||||||
|
|
|
@ -30,7 +30,7 @@ G_BEGIN_DECLS
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* GimpLoadFunc:
|
* GimpRunLoadFunc:
|
||||||
* @procedure: the #GimpProcedure that runs.
|
* @procedure: the #GimpProcedure that runs.
|
||||||
* @run_mode: the #GimpRunMode.
|
* @run_mode: the #GimpRunMode.
|
||||||
* @file: the #GFile to load from.
|
* @file: the #GFile to load from.
|
||||||
|
@ -44,7 +44,7 @@ G_BEGIN_DECLS
|
||||||
*
|
*
|
||||||
* Since: 3.0
|
* Since: 3.0
|
||||||
**/
|
**/
|
||||||
typedef GimpValueArray * (* GimpLoadFunc) (GimpProcedure *procedure,
|
typedef GimpValueArray * (* GimpRunLoadFunc) (GimpProcedure *procedure,
|
||||||
GimpRunMode run_mode,
|
GimpRunMode run_mode,
|
||||||
GFile *file,
|
GFile *file,
|
||||||
const GimpValueArray *args,
|
const GimpValueArray *args,
|
||||||
|
@ -81,7 +81,7 @@ GType gimp_load_procedure_get_type (void) G_GNUC_CONST;
|
||||||
GimpProcedure * gimp_load_procedure_new (GimpPlugIn *plug_in,
|
GimpProcedure * gimp_load_procedure_new (GimpPlugIn *plug_in,
|
||||||
const gchar *name,
|
const gchar *name,
|
||||||
GimpPDBProcType proc_type,
|
GimpPDBProcType proc_type,
|
||||||
GimpLoadFunc run_func,
|
GimpRunLoadFunc run_func,
|
||||||
gpointer run_data,
|
gpointer run_data,
|
||||||
GDestroyNotify run_data_destroy);
|
GDestroyNotify run_data_destroy);
|
||||||
|
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
|
|
||||||
struct _GimpSaveProcedurePrivate
|
struct _GimpSaveProcedurePrivate
|
||||||
{
|
{
|
||||||
GimpSaveFunc run_func;
|
GimpRunSaveFunc run_func;
|
||||||
gpointer run_data;
|
gpointer run_data;
|
||||||
GDestroyNotify run_data_destroy;
|
GDestroyNotify run_data_destroy;
|
||||||
};
|
};
|
||||||
|
@ -192,11 +192,44 @@ gimp_save_procedure_run (GimpProcedure *procedure,
|
||||||
|
|
||||||
/* public functions */
|
/* public functions */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* gimp_save_procedure_new:
|
||||||
|
* @plug_in: a #GimpPlugIn.
|
||||||
|
* @name: the new procedure's name.
|
||||||
|
* @proc_type: the new procedure's #GimpPDBProcType.
|
||||||
|
* @run_func: the run function for the new procedure.
|
||||||
|
* @run_data: user data passed to @run_func.
|
||||||
|
* @run_data_destroy: (nullable): free function for @run_data, or %NULL.
|
||||||
|
*
|
||||||
|
* Creates a new save procedure named @name which will call @run_func
|
||||||
|
* when invoked.
|
||||||
|
*
|
||||||
|
* See gimp_procedure_new() for information about @proc_type.
|
||||||
|
*
|
||||||
|
* #GimpSaveProcedure is a #GimpProcedure subclass that makes it easier
|
||||||
|
* to write file save procedures.
|
||||||
|
*
|
||||||
|
* It automatically adds the standard
|
||||||
|
*
|
||||||
|
* (run-mode, image-id, drawable-id, uri, raw-uri)
|
||||||
|
*
|
||||||
|
* arguments of a save procedure. It is possible to add additional
|
||||||
|
* arguments.
|
||||||
|
*
|
||||||
|
* When invoked via gimp_procedure_run(), it unpacks these standard
|
||||||
|
* arguemnts and calls @run_func which is a #GimpRunSaveFunc. The
|
||||||
|
* "args" #GimpValueArray of #GimpRunSaveFunc only contains
|
||||||
|
* additionally added arguments.
|
||||||
|
*
|
||||||
|
* Returns: a new #GimpProcedure.
|
||||||
|
*
|
||||||
|
* Since: 3.0
|
||||||
|
**/
|
||||||
GimpProcedure *
|
GimpProcedure *
|
||||||
gimp_save_procedure_new (GimpPlugIn *plug_in,
|
gimp_save_procedure_new (GimpPlugIn *plug_in,
|
||||||
const gchar *name,
|
const gchar *name,
|
||||||
GimpPDBProcType proc_type,
|
GimpPDBProcType proc_type,
|
||||||
GimpSaveFunc run_func,
|
GimpRunSaveFunc run_func,
|
||||||
gpointer run_data,
|
gpointer run_data,
|
||||||
GDestroyNotify run_data_destroy)
|
GDestroyNotify run_data_destroy)
|
||||||
{
|
{
|
||||||
|
|
|
@ -30,7 +30,7 @@ G_BEGIN_DECLS
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* GimpSaveFunc:
|
* GimpRunSaveFunc:
|
||||||
* @procedure: the #GimpProcedure that runs.
|
* @procedure: the #GimpProcedure that runs.
|
||||||
* @run_mode: the #GimpRunMode.
|
* @run_mode: the #GimpRunMode.
|
||||||
* @image_id: the image to save.
|
* @image_id: the image to save.
|
||||||
|
@ -46,7 +46,7 @@ G_BEGIN_DECLS
|
||||||
*
|
*
|
||||||
* Since: 3.0
|
* Since: 3.0
|
||||||
**/
|
**/
|
||||||
typedef GimpValueArray * (* GimpSaveFunc) (GimpProcedure *procedure,
|
typedef GimpValueArray * (* GimpRunSaveFunc) (GimpProcedure *procedure,
|
||||||
GimpRunMode run_mode,
|
GimpRunMode run_mode,
|
||||||
gint32 image_id,
|
gint32 image_id,
|
||||||
gint32 drawable_id,
|
gint32 drawable_id,
|
||||||
|
@ -85,7 +85,7 @@ GType gimp_save_procedure_get_type (void) G_GNUC_CONST;
|
||||||
GimpProcedure * gimp_save_procedure_new (GimpPlugIn *plug_in,
|
GimpProcedure * gimp_save_procedure_new (GimpPlugIn *plug_in,
|
||||||
const gchar *name,
|
const gchar *name,
|
||||||
GimpPDBProcType proc_type,
|
GimpPDBProcType proc_type,
|
||||||
GimpSaveFunc run_func,
|
GimpRunSaveFunc run_func,
|
||||||
gpointer run_data,
|
gpointer run_data,
|
||||||
GDestroyNotify run_data_destroy);
|
GDestroyNotify run_data_destroy);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue