Top | ![]() |
![]() |
![]() |
![]() |
gboolean gimp_pdb_procedure_exists (GimpPDB *pdb
,const gchar *procedure_name
);
This function checks if a procedure exists in the procedural database.
Return: TRUE
if the procedure exists, FALSE
otherwise.
Since: 3.0
GimpProcedure * gimp_pdb_lookup_procedure (GimpPDB *pdb
,const gchar *procedure_name
);
This function returns the GimpProcedure which is registered
with procedure_name
if it exists, or returns NULL
otherwise.
The returned GimpProcedure is owned by pdb
and must not be
modified.
Return: (nullable) (transfer none): A GimpProcedure, or NULL
.
Since: 3.0
GimpValueArray * gimp_pdb_run_procedure (GimpPDB *pdb
,const gchar *procedure_name
,GType first_type
,...
);
Runs the procedure named procedure_name
with arguments given as
list of (GType, value) pairs, terminated by G_TYPE_NONE.
[skip]
pdb |
the GimpPDB object. |
|
procedure_name |
the procedure registered name. |
|
first_type |
the GType of the first argument, or G_TYPE_NONE. |
|
... |
the call arguments. |
Since: 3.0
GimpValueArray * gimp_pdb_run_procedure_valist (GimpPDB *pdb
,const gchar *procedure_name
,GType first_type
,va_list args
);
Runs the procedure named procedure_name
with args
given in the
order as passed to gimp_pdb_run_procedure()
.
[skip]
pdb |
the GimpPDB object. |
|
procedure_name |
the procedure registered name. |
|
first_type |
the GType of the first argument, or G_TYPE_NONE. |
|
args |
the call arguments. |
Since: 3.0
GimpValueArray * gimp_pdb_run_procedure_array (GimpPDB *pdb
,const gchar *procedure_name
,const GimpValueArray *arguments
);
Runs the procedure named procedure_name
with arguments
.
pdb |
the GimpPDB object. |
|
procedure_name |
the procedure registered name. |
|
arguments |
the call arguments. |
Since: 3.0
GimpValueArray * gimp_pdb_run_procedure_argv (GimpPDB *pdb
,const gchar *procedure_name
,const GValue *arguments
,gint n_arguments
);
Runs the procedure named procedure_name
with arguments
.
[rename-to gimp_pdb_run_procedure]
Since: 3.0
gchar *
gimp_pdb_temp_procedure_name (GimpPDB *pdb
);
Generates a unique temporary PDB name.
This function generates a temporary PDB entry name that is guaranteed to be unique.
A unique temporary name for a temporary
PDB entry. The returned value must be freed with
g_free()
.
[transfer full]
Since: 3.0
gboolean gimp_pdb_dump_to_file (GimpPDB *pdb
,GFile *file
);
Dumps the current contents of the procedural database
This procedure dumps the contents of the procedural database to the
specified file
. The file will contain all of the information
provided for each registered procedure.
Since: 3.0
gchar ** gimp_pdb_query_procedures (GimpPDB *pdb
,const gchar *name
,const gchar *blurb
,const gchar *help
,const gchar *help_id
,const gchar *authors
,const gchar *copyright
,const gchar *date
,const gchar *proc_type
,gint *num_matches
);
Queries the procedural database for its contents using regular expression matching.
This function queries the contents of the procedural database. It is supplied with eight arguments matching procedures on
{ name, blurb, help, help-id, authors, copyright, date, procedure type}.
This is accomplished using regular expression matching. For instance, to find all procedures with "jpeg" listed in the blurb, all seven arguments can be supplied as ".*", except for the second, which can be supplied as ".*jpeg.*". There are two return arguments for this procedure. The first is the number of procedures matching the query. The second is a concatenated list of procedure names corresponding to those matching the query. If no matching entries are found, then the returned string is NULL and the number of entries is 0.
pdb |
A GimpPDB. |
|
name |
The regex for procedure name. |
|
blurb |
The regex for procedure blurb. |
|
help |
The regex for procedure help. |
|
help_id |
The regex for procedure help-id. |
|
authors |
The regex for procedure authors. |
|
copyright |
The regex for procedure copyright. |
|
date |
The regex for procedure date. |
|
proc_type |
The regex for procedure type: { 'Internal GIMP procedure', 'GIMP Plug-in', 'GIMP Extension', 'Temporary Procedure' }. |
|
num_matches |
The number of matching procedures. |
[out] |
The list
of procedure names. Free with g_strfreev()
.
[array length=num_matches][transfer full]
Since: 3.0
const gchar *
gimp_pdb_get_last_error (GimpPDB *pdb
);
Retrieves the error message from the last procedure call.
If a procedure call fails, then it might pass an error message with the return values. Plug-ins that are using the libgimp C wrappers don't access the procedure return values directly. Thus GimpPDB stores the error message and makes it available with this function. The next procedure call unsets the error message again.
The returned string is owned by pdb
and must not be freed or
modified.
Since: 3.0
GimpPDBStatusType
gimp_pdb_get_last_status (GimpPDB *pdb
);
Retrieves the status from the last procedure call.
Since: 3.0
gboolean gimp_pdb_get_data (const gchar *identifier
,gpointer data
);
Returns data associated with the specified identifier.
This procedure returns any data which may have been associated with the specified identifier. The data is copied into the given memory location.
gint
gimp_pdb_get_data_size (const gchar *identifier
);
Returns size of data associated with the specified identifier.
This procedure returns the size of any data which may have been associated with the specified identifier. If no data has been associated with the identifier, an error is returned.
gboolean gimp_pdb_set_data (const gchar *identifier
,gconstpointer data
,guint32 bytes
);
Associates the specified identifier with the supplied data.
This procedure associates the supplied data with the provided identifier. The data may be subsequently retrieved by a call to 'procedural-db-get-data'.