pdb: allow file procedures to register themselves for handling URIs
and store the flag in pluginrc. There are no URIs passed to procedures yet and no procedure registers as such, this is just preparation.
This commit is contained in:
@ -708,6 +708,7 @@ EXPORTS
|
||||
gimp_read_expect_msg
|
||||
gimp_rect_select
|
||||
gimp_register_file_handler_mime
|
||||
gimp_register_file_handler_uri
|
||||
gimp_register_load_handler
|
||||
gimp_register_magic_load_handler
|
||||
gimp_register_save_handler
|
||||
|
||||
@ -431,6 +431,40 @@ gimp_register_file_handler_mime (const gchar *procedure_name,
|
||||
return success;
|
||||
}
|
||||
|
||||
/**
|
||||
* gimp_register_file_handler_uri:
|
||||
* @procedure_name: The name of the procedure to enable URIs for.
|
||||
*
|
||||
* Registers a file handler procedure as capable of handling URIs.
|
||||
*
|
||||
* Registers a file handler procedure as capable of handling URIs. This
|
||||
* allows GIMP to call the procecure directly for all kinds of URIs,
|
||||
* and the 'filename' traditionally passed to file procesures turns
|
||||
* into an URI.
|
||||
*
|
||||
* Returns: TRUE on success.
|
||||
*
|
||||
* Since: GIMP 2.10
|
||||
**/
|
||||
gboolean
|
||||
gimp_register_file_handler_uri (const gchar *procedure_name)
|
||||
{
|
||||
GimpParam *return_vals;
|
||||
gint nreturn_vals;
|
||||
gboolean success = TRUE;
|
||||
|
||||
return_vals = gimp_run_procedure ("gimp-register-file-handler-uri",
|
||||
&nreturn_vals,
|
||||
GIMP_PDB_STRING, procedure_name,
|
||||
GIMP_PDB_END);
|
||||
|
||||
success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;
|
||||
|
||||
gimp_destroy_params (return_vals, nreturn_vals);
|
||||
|
||||
return success;
|
||||
}
|
||||
|
||||
/**
|
||||
* gimp_register_thumbnail_loader:
|
||||
* @load_proc: The name of the procedure the thumbnail loader with.
|
||||
|
||||
@ -62,6 +62,7 @@ gboolean gimp_register_save_handler (const gchar *procedure_name,
|
||||
const gchar *prefixes);
|
||||
gboolean gimp_register_file_handler_mime (const gchar *procedure_name,
|
||||
const gchar *mime_type);
|
||||
gboolean gimp_register_file_handler_uri (const gchar *procedure_name);
|
||||
gboolean gimp_register_thumbnail_loader (const gchar *load_proc,
|
||||
const gchar *thumb_proc);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user