Gimp.PDB

g GObject.Object GObject.Object Gimp.PDB Gimp.PDB GObject.Object->Gimp.PDB

Subclasses:

None

Methods

Inherited:

GObject.Object (37)

Structs:

GObject.ObjectClass (5)

dump_to_file (file)

get_last_error ()

get_last_status ()

lookup_procedure (procedure_name)

procedure_exists (procedure_name)

query_procedures (name, blurb, help, help_id, authors, copyright, date, proc_type)

temp_procedure_name ()

Virtual Methods

Inherited:

GObject.Object (7)

Properties

None

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Class Details

class Gimp.PDB(**kwargs)
Bases:

GObject.Object

Abstract:

No

Structure:

Gimp.PDBClass

Provides access to the Procedural DataBase (PDB).

dump_to_file(file)
Parameters:

file (Gio.File) – The dump file.

Returns:

True on success.

Return type:

bool

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.

New in version 3.0.

get_last_error()
Returns:

the error message

Return type:

str

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 Gimp.PDB 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 self and must not be freed or modified.

New in version 3.0.

get_last_status()
Returns:

the Gimp.PDBStatusType.

Return type:

Gimp.PDBStatusType

Retrieves the status from the last procedure call.

New in version 3.0.

lookup_procedure(procedure_name)
Parameters:

procedure_name (str) – A procedure name

Returns:

A [class`Procedure`], or None.

Return type:

Gimp.Procedure or None

This function returns the [class`Procedure`] which is registered with procedure_name if it exists, or returns None otherwise.

The returned [class`Procedure`] is owned by self and must not be modified.

New in version 3.0.

procedure_exists(procedure_name)
Parameters:

procedure_name (str) – A procedure name

Returns:

True if the procedure exists, False otherwise.

Return type:

bool

This function checks if a procedure exists in the procedural database.

New in version 3.0.

query_procedures(name, blurb, help, help_id, authors, copyright, date, proc_type)
Parameters:
  • name (str) – The regex for procedure name.

  • blurb (str) – The regex for procedure blurb.

  • help (str) – The regex for procedure help.

  • help_id (str) – The regex for procedure help-id.

  • authors (str) – The regex for procedure authors.

  • copyright (str) – The regex for procedure copyright.

  • date (str) – The regex for procedure date.

  • proc_type (str) – The regex for procedure type: { ‘Internal GIMP procedure’, ‘GIMP Plug-in’, ‘GIMP Extension’, ‘Temporary Procedure’ }.

Returns:

The list of procedure names. Free with GLib.strfreev().

Return type:

[str]

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 None and the number of entries is 0.

New in version 3.0.

temp_procedure_name()
Returns:

A unique temporary name for a temporary PDB entry. The returned value must be freed with GLib.free().

Return type:

str

Generates a unique temporary PDB name.

This function generates a temporary PDB entry name that is guaranteed to be unique.

New in version 3.0.