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,12 +29,12 @@
|
|||
|
||||
struct _GimpLoadProcedurePrivate
|
||||
{
|
||||
GimpLoadFunc run_func;
|
||||
gpointer run_data;
|
||||
GDestroyNotify run_data_destroy;
|
||||
GimpRunLoadFunc run_func;
|
||||
gpointer run_data;
|
||||
GDestroyNotify run_data_destroy;
|
||||
|
||||
gboolean handles_raw;
|
||||
gchar *thumbnail_proc;
|
||||
gboolean handles_raw;
|
||||
gchar *thumbnail_proc;
|
||||
};
|
||||
|
||||
|
||||
|
@ -204,11 +204,44 @@ gimp_load_procedure_run (GimpProcedure *procedure,
|
|||
|
||||
/* 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 *
|
||||
gimp_load_procedure_new (GimpPlugIn *plug_in,
|
||||
const gchar *name,
|
||||
GimpPDBProcType proc_type,
|
||||
GimpLoadFunc run_func,
|
||||
GimpRunLoadFunc run_func,
|
||||
gpointer run_data,
|
||||
GDestroyNotify run_data_destroy)
|
||||
{
|
||||
|
|
|
@ -30,7 +30,7 @@ G_BEGIN_DECLS
|
|||
|
||||
|
||||
/**
|
||||
* GimpLoadFunc:
|
||||
* GimpRunLoadFunc:
|
||||
* @procedure: the #GimpProcedure that runs.
|
||||
* @run_mode: the #GimpRunMode.
|
||||
* @file: the #GFile to load from.
|
||||
|
@ -44,11 +44,11 @@ G_BEGIN_DECLS
|
|||
*
|
||||
* Since: 3.0
|
||||
**/
|
||||
typedef GimpValueArray * (* GimpLoadFunc) (GimpProcedure *procedure,
|
||||
GimpRunMode run_mode,
|
||||
GFile *file,
|
||||
const GimpValueArray *args,
|
||||
gpointer run_data);
|
||||
typedef GimpValueArray * (* GimpRunLoadFunc) (GimpProcedure *procedure,
|
||||
GimpRunMode run_mode,
|
||||
GFile *file,
|
||||
const GimpValueArray *args,
|
||||
gpointer run_data);
|
||||
|
||||
|
||||
#define GIMP_TYPE_LOAD_PROCEDURE (gimp_load_procedure_get_type ())
|
||||
|
@ -81,7 +81,7 @@ GType gimp_load_procedure_get_type (void) G_GNUC_CONST;
|
|||
GimpProcedure * gimp_load_procedure_new (GimpPlugIn *plug_in,
|
||||
const gchar *name,
|
||||
GimpPDBProcType proc_type,
|
||||
GimpLoadFunc run_func,
|
||||
GimpRunLoadFunc run_func,
|
||||
gpointer run_data,
|
||||
GDestroyNotify run_data_destroy);
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
|
||||
struct _GimpSaveProcedurePrivate
|
||||
{
|
||||
GimpSaveFunc run_func;
|
||||
GimpRunSaveFunc run_func;
|
||||
gpointer run_data;
|
||||
GDestroyNotify run_data_destroy;
|
||||
};
|
||||
|
@ -192,11 +192,44 @@ gimp_save_procedure_run (GimpProcedure *procedure,
|
|||
|
||||
/* 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 *
|
||||
gimp_save_procedure_new (GimpPlugIn *plug_in,
|
||||
const gchar *name,
|
||||
GimpPDBProcType proc_type,
|
||||
GimpSaveFunc run_func,
|
||||
GimpRunSaveFunc run_func,
|
||||
gpointer run_data,
|
||||
GDestroyNotify run_data_destroy)
|
||||
{
|
||||
|
|
|
@ -30,7 +30,7 @@ G_BEGIN_DECLS
|
|||
|
||||
|
||||
/**
|
||||
* GimpSaveFunc:
|
||||
* GimpRunSaveFunc:
|
||||
* @procedure: the #GimpProcedure that runs.
|
||||
* @run_mode: the #GimpRunMode.
|
||||
* @image_id: the image to save.
|
||||
|
@ -46,13 +46,13 @@ G_BEGIN_DECLS
|
|||
*
|
||||
* Since: 3.0
|
||||
**/
|
||||
typedef GimpValueArray * (* GimpSaveFunc) (GimpProcedure *procedure,
|
||||
GimpRunMode run_mode,
|
||||
gint32 image_id,
|
||||
gint32 drawable_id,
|
||||
GFile *file,
|
||||
const GimpValueArray *args,
|
||||
gpointer run_data);
|
||||
typedef GimpValueArray * (* GimpRunSaveFunc) (GimpProcedure *procedure,
|
||||
GimpRunMode run_mode,
|
||||
gint32 image_id,
|
||||
gint32 drawable_id,
|
||||
GFile *file,
|
||||
const GimpValueArray *args,
|
||||
gpointer run_data);
|
||||
|
||||
|
||||
#define GIMP_TYPE_SAVE_PROCEDURE (gimp_save_procedure_get_type ())
|
||||
|
@ -85,7 +85,7 @@ GType gimp_save_procedure_get_type (void) G_GNUC_CONST;
|
|||
GimpProcedure * gimp_save_procedure_new (GimpPlugIn *plug_in,
|
||||
const gchar *name,
|
||||
GimpPDBProcType proc_type,
|
||||
GimpSaveFunc run_func,
|
||||
GimpRunSaveFunc run_func,
|
||||
gpointer run_data,
|
||||
GDestroyNotify run_data_destroy);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue