libgimp: fix libgimp introspection.

- Fix a few broken references and an inconsistent argument name.
- Add the new headers in the introspectable header list.
- Add a few missing class descriptions for GimpProcedure and subclasses.
This commit is contained in:
Jehan 2024-04-24 16:02:08 +02:00
parent dd6acc86fb
commit 25b9f677b1
6 changed files with 53 additions and 3 deletions

View File

@ -26,6 +26,21 @@
#include "gimppdb_pdb.h"
/**
* GimpBatchProcedure:
*
* Batch procedures implement an interpreter able to run commands as input.
*
* In particular, batch procedures will be available on the command line
* through the `--batch-interpreter` option to switch the chosen interpreter.
* Then any command given through the `--batch` option will have to be in the
* chosen language.
*
* It makes GIMP usable on the command line, but also to process small scripts
* (without making full-featured plug-ins), fully in command line without
* graphical interface.
**/
struct _GimpBatchProcedurePrivate
{
gchar *interpreter_name;

View File

@ -31,6 +31,18 @@
#include "libgimp-intl.h"
/**
* GimpExportProcedure:
*
* Export procedures implement image export.
*
* Registered export procedures will be automatically available in the export
* interfaces and functions of GIMP. The detection (to decide which file is
* redirected to which plug-in procedure) depends on the various methods set
* with [class@FileProcedure] API.
**/
enum
{
PROP_0,

View File

@ -24,6 +24,15 @@
#include "gimpfileprocedure.h"
/**
* GimpFileProcedure:
*
* File procedures implement file support. They cannot be created directly.
* Instead, you will create an instance of one of the sublasses (such as export
* or load procedures). This provides a common interface for file-related
* functions on these objects.
**/
typedef struct _GimpFileProcedurePrivate
{
gchar *format_name;

View File

@ -42,6 +42,18 @@
#include "libgimp-intl.h"
/**
* GimpProcedure:
*
* Procedures are registered functions which can be run across GIMP ecosystem.
* They can be created by plug-ins and can then run by the core application
* when called from menus (or through other interaction depending on specific
* procedure subclasses).
*
* A plug-in can also run procedures created by the core, but also the ones
* created by other plug-ins (see [class@PDB]).
**/
enum
{
PROP_0,

View File

@ -33,7 +33,7 @@ G_BEGIN_DECLS
* GimpRunVectorLoadFunc:
* @procedure: the [class@Gimp.Procedure] that runs.
* @run_mode: the [enum@RunMode].
* @file: the [class@Gio.File] to load from.
* @file: the [iface@Gio.File] to load from.
* @width: the desired width in pixel for the created image.
* @height: the desired height in pixel for the created image.
* @keep_ratio: whether dimension ratio should be preserved.
@ -52,7 +52,7 @@ G_BEGIN_DECLS
* supports this format. You may tweak this object, for instance adding metadata
* specific to the format. You can also edit @flags if you need to filter out
* some specific common fields. For instance, it is customary to remove a
* colorspace field with [const@MetadataLoadFlags] when a profile was added.
* colorspace field with [flags@MetadataLoadFlags] when a profile was added.
*
* Regarding returned image dimensions:
*
@ -79,7 +79,7 @@ typedef GimpValueArray * (* GimpRunVectorLoadFunc) (GimpProcedure
GFile *file,
gint width,
gint height,
gboolean preserve_ratio,
gboolean keep_ratio,
gboolean prefer_native_dimension,
GimpMetadata *metadata,
GimpMetadataLoadFlags *flags,

View File

@ -261,6 +261,7 @@ libgimp_headers_introspectable = [
'gimpselection.h',
'gimptextlayer.h',
'gimpthumbnailprocedure.h',
'gimpvectorloadprocedure.h',
'gimpvectors.h',
pdb_wrappers_headers,
]
@ -326,6 +327,7 @@ libgimpui_headers_introspectable = [
'gimppropwidgets.h',
'gimpresourcechooser.h',
'gimpexportproceduredialog.h',
'gimpvectorloadproceduredialog.h',
'gimpzoompreview.h',
]