libgimp: add gimp_get_pdb_status() to return the status of last...

... procedure call.
This is needed for plug-ins which depends on other plug-in's procedures.
If for instance, the second-level plug-in is interrupted interactively,
we don't want to process this as an error but as a cancellation.
Therefore we need to know the returned value of the plug-in. Currently
only way was to use gimp_get_pdb_error() but that was returning a
human-readable error, not a computer-processable error.
This commit is contained in:
Jehan 2018-01-19 14:15:47 +01:00
parent 911e46ee2b
commit 2e18c80c58
3 changed files with 20 additions and 0 deletions

View File

@ -1225,6 +1225,21 @@ gimp_get_pdb_error (void)
}
}
/**
* gimp_get_pdb_status:
*
* Retrieves the status from the last procedure call.
*
* Return value: the #GimpPDBStatusType.
*
* Since: 2.10
**/
GimpPDBStatusType
gimp_get_pdb_status (void)
{
return pdb_error_status;
}
/**
* gimp_tile_width:
*

View File

@ -343,6 +343,7 @@ EXPORTS
gimp_get_parasite_list
gimp_get_path_by_tattoo
gimp_get_pdb_error
gimp_get_pdb_status
gimp_get_progname
gimp_get_theme_dir
gimp_getpid

View File

@ -317,6 +317,10 @@ void gimp_destroy_paramdefs (GimpParamDef *paramdefs,
*/
const gchar * gimp_get_pdb_error (void);
/* Retrieve the return status for the last procedure call.
*/
GimpPDBStatusType gimp_get_pdb_status (void);
/* Return various constants given by the GIMP core at plug-in config time.
*/
guint gimp_tile_width (void) G_GNUC_CONST;