Beispiel #1
0
void
register_plug_in_procs (GimpPDB *pdb)
{
  GimpProcedure *procedure;

  /*
   * gimp-plugins-query
   */
  procedure = gimp_procedure_new (plugins_query_invoker);
  gimp_object_set_static_name (GIMP_OBJECT (procedure),
                               "gimp-plugins-query");
  gimp_procedure_set_static_strings (procedure,
                                     "gimp-plugins-query",
                                     "Queries the plugin database for its contents.",
                                     "This procedure queries the contents of the plugin database.",
                                     "Andy Thomas",
                                     "Andy Thomas",
                                     "1998",
                                     NULL);
  gimp_procedure_add_argument (procedure,
                               gimp_param_spec_string ("search-string",
                                                       "search string",
                                                       "If not an empty string then use this as a search pattern",
                                                       FALSE, FALSE, FALSE,
                                                       NULL,
                                                       GIMP_PARAM_READWRITE | GIMP_PARAM_NO_VALIDATE));
  gimp_procedure_add_return_value (procedure,
                                   gimp_param_spec_int32 ("num-plugins",
                                                          "num plugins",
                                                          "The number of plugins",
                                                          0, G_MAXINT32, 0,
                                                          GIMP_PARAM_READWRITE));
  gimp_procedure_add_return_value (procedure,
                                   gimp_param_spec_string_array ("menu-path",
                                                                 "menu path",
                                                                 "The menu path of the plugin",
                                                                 GIMP_PARAM_READWRITE));
  gimp_procedure_add_return_value (procedure,
                                   gimp_param_spec_int32 ("num-plugins",
                                                          "num plugins",
                                                          "The number of plugins",
                                                          0, G_MAXINT32, 0,
                                                          GIMP_PARAM_READWRITE));
  gimp_procedure_add_return_value (procedure,
                                   gimp_param_spec_string_array ("plugin-accelerator",
                                                                 "plugin accelerator",
                                                                 "String representing keyboard accelerator (could be empty string)",
                                                                 GIMP_PARAM_READWRITE));
  gimp_procedure_add_return_value (procedure,
                                   gimp_param_spec_int32 ("num-plugins",
                                                          "num plugins",
                                                          "The number of plugins",
                                                          0, G_MAXINT32, 0,
                                                          GIMP_PARAM_READWRITE));
  gimp_procedure_add_return_value (procedure,
                                   gimp_param_spec_string_array ("plugin-location",
                                                                 "plugin location",
                                                                 "Location of the plugin program",
                                                                 GIMP_PARAM_READWRITE));
  gimp_procedure_add_return_value (procedure,
                                   gimp_param_spec_int32 ("num-plugins",
                                                          "num plugins",
                                                          "The number of plugins",
                                                          0, G_MAXINT32, 0,
                                                          GIMP_PARAM_READWRITE));
  gimp_procedure_add_return_value (procedure,
                                   gimp_param_spec_string_array ("plugin-image-type",
                                                                 "plugin image type",
                                                                 "Type of image that this plugin will work on",
                                                                 GIMP_PARAM_READWRITE));
  gimp_procedure_add_return_value (procedure,
                                   gimp_param_spec_int32 ("num-plugins",
                                                          "num plugins",
                                                          "The number of plugins",
                                                          0, G_MAXINT32, 0,
                                                          GIMP_PARAM_READWRITE));
  gimp_procedure_add_return_value (procedure,
                                   gimp_param_spec_int32_array ("plugin-install-time",
                                                                "plugin install time",
                                                                "Time that the plugin was installed",
                                                                GIMP_PARAM_READWRITE));
  gimp_procedure_add_return_value (procedure,
                                   gimp_param_spec_int32 ("num-plugins",
                                                          "num plugins",
                                                          "The number of plugins",
                                                          0, G_MAXINT32, 0,
                                                          GIMP_PARAM_READWRITE));
  gimp_procedure_add_return_value (procedure,
                                   gimp_param_spec_string_array ("plugin-real-name",
                                                                 "plugin real name",
                                                                 "The internal name of the plugin",
                                                                 GIMP_PARAM_READWRITE));
  gimp_pdb_register_procedure (pdb, procedure);
  g_object_unref (procedure);

  /*
   * gimp-plugin-domain-register
   */
  procedure = gimp_procedure_new (plugin_domain_register_invoker);
  gimp_object_set_static_name (GIMP_OBJECT (procedure),
                               "gimp-plugin-domain-register");
  gimp_procedure_set_static_strings (procedure,
                                     "gimp-plugin-domain-register",
                                     "Registers a textdomain for localisation.",
                                     "This procedure adds a textdomain to the list of domains Gimp searches for strings when translating its menu entries. There is no need to call this function for plug-ins that have their strings included in the 'gimp-std-plugins' domain as that is used by default. If the compiled message catalog is not in the standard location, you may specify an absolute path to another location. This procedure can only be called in the query function of a plug-in and it has to be called before any procedure is installed.",
                                     "Sven Neumann <*****@*****.**>",
                                     "Sven Neumann",
                                     "2000",
                                     NULL);
  gimp_procedure_add_argument (procedure,
                               gimp_param_spec_string ("domain-name",
                                                       "domain name",
                                                       "The name of the textdomain (must be unique)",
                                                       FALSE, FALSE, FALSE,
                                                       NULL,
                                                       GIMP_PARAM_READWRITE));
  gimp_procedure_add_argument (procedure,
                               gimp_param_spec_string ("domain-path",
                                                       "domain path",
                                                       "The absolute path to the compiled message catalog (may be NULL)",
                                                       FALSE, FALSE, FALSE,
                                                       NULL,
                                                       GIMP_PARAM_READWRITE | GIMP_PARAM_NO_VALIDATE));
  gimp_pdb_register_procedure (pdb, procedure);
  g_object_unref (procedure);

  /*
   * gimp-plugin-help-register
   */
  procedure = gimp_procedure_new (plugin_help_register_invoker);
  gimp_object_set_static_name (GIMP_OBJECT (procedure),
                               "gimp-plugin-help-register");
  gimp_procedure_set_static_strings (procedure,
                                     "gimp-plugin-help-register",
                                     "Register a help path for a plug-in.",
                                     "This procedure registers user documentation for the calling plug-in with the GIMP help system. The domain_uri parameter points to the root directory where the plug-in help is installed. For each supported language there should be a file called 'gimp-help.xml' that maps the help IDs to the actual help files.",
                                     "Michael Natterer <*****@*****.**>",
                                     "Michael Natterer",
                                     "2000",
                                     NULL);
  gimp_procedure_add_argument (procedure,
                               gimp_param_spec_string ("domain-name",
                                                       "domain name",
                                                       "The XML namespace of the plug-in's help pages",
                                                       FALSE, FALSE, FALSE,
                                                       NULL,
                                                       GIMP_PARAM_READWRITE));
  gimp_procedure_add_argument (procedure,
                               gimp_param_spec_string ("domain-uri",
                                                       "domain uri",
                                                       "The root URI of the plug-in's help pages",
                                                       FALSE, FALSE, FALSE,
                                                       NULL,
                                                       GIMP_PARAM_READWRITE));
  gimp_pdb_register_procedure (pdb, procedure);
  g_object_unref (procedure);

  /*
   * gimp-plugin-menu-register
   */
  procedure = gimp_procedure_new (plugin_menu_register_invoker);
  gimp_object_set_static_name (GIMP_OBJECT (procedure),
                               "gimp-plugin-menu-register");
  gimp_procedure_set_static_strings (procedure,
                                     "gimp-plugin-menu-register",
                                     "Register an additional menu path for a plug-in procedure.",
                                     "This procedure installs an additional menu entry for the given procedure.",
                                     "Michael Natterer <*****@*****.**>",
                                     "Michael Natterer",
                                     "2004",
                                     NULL);
  gimp_procedure_add_argument (procedure,
                               gimp_param_spec_string ("procedure-name",
                                                       "procedure name",
                                                       "The procedure for which to install the menu path",
                                                       FALSE, FALSE, TRUE,
                                                       NULL,
                                                       GIMP_PARAM_READWRITE));
  gimp_procedure_add_argument (procedure,
                               gimp_param_spec_string ("menu-path",
                                                       "menu path",
                                                       "The procedure's additional menu path",
                                                       FALSE, FALSE, FALSE,
                                                       NULL,
                                                       GIMP_PARAM_READWRITE));
  gimp_pdb_register_procedure (pdb, procedure);
  g_object_unref (procedure);

  /*
   * gimp-plugin-menu-branch-register
   */
  procedure = gimp_procedure_new (plugin_menu_branch_register_invoker);
  gimp_object_set_static_name (GIMP_OBJECT (procedure),
                               "gimp-plugin-menu-branch-register");
  gimp_procedure_set_static_strings (procedure,
                                     "gimp-plugin-menu-branch-register",
                                     "Register a sub-menu.",
                                     "This procedure installs a sub-menu which does not belong to any procedure. The menu-name should be the untranslated menu label. GIMP will look up the translation in the textdomain registered for the plug-in.",
                                     "Michael Natterer <*****@*****.**>",
                                     "Michael Natterer",
                                     "2005",
                                     NULL);
  gimp_procedure_add_argument (procedure,
                               gimp_param_spec_string ("menu-path",
                                                       "menu path",
                                                       "The sub-menu's menu path",
                                                       FALSE, FALSE, FALSE,
                                                       NULL,
                                                       GIMP_PARAM_READWRITE));
  gimp_procedure_add_argument (procedure,
                               gimp_param_spec_string ("menu-name",
                                                       "menu name",
                                                       "The name of the sub-menu",
                                                       FALSE, FALSE, FALSE,
                                                       NULL,
                                                       GIMP_PARAM_READWRITE));
  gimp_pdb_register_procedure (pdb, procedure);
  g_object_unref (procedure);

  /*
   * gimp-plugin-icon-register
   */
  procedure = gimp_procedure_new (plugin_icon_register_invoker);
  gimp_object_set_static_name (GIMP_OBJECT (procedure),
                               "gimp-plugin-icon-register");
  gimp_procedure_set_static_strings (procedure,
                                     "gimp-plugin-icon-register",
                                     "Register an icon for a plug-in procedure.",
                                     "This procedure installs an icon for the given procedure.",
                                     "Michael Natterer <*****@*****.**>",
                                     "Michael Natterer",
                                     "2004",
                                     NULL);
  gimp_procedure_add_argument (procedure,
                               gimp_param_spec_string ("procedure-name",
                                                       "procedure name",
                                                       "The procedure for which to install the icon",
                                                       FALSE, FALSE, TRUE,
                                                       NULL,
                                                       GIMP_PARAM_READWRITE));
  gimp_procedure_add_argument (procedure,
                               g_param_spec_enum ("icon-type",
                                                  "icon type",
                                                  "The type of the icon",
                                                  GIMP_TYPE_ICON_TYPE,
                                                  GIMP_ICON_TYPE_STOCK_ID,
                                                  GIMP_PARAM_READWRITE));
  gimp_procedure_add_argument (procedure,
                               gimp_param_spec_int32 ("icon-data-length",
                                                      "icon data length",
                                                      "The length of 'icon-data'",
                                                      1, G_MAXINT32, 1,
                                                      GIMP_PARAM_READWRITE));
  gimp_procedure_add_argument (procedure,
                               gimp_param_spec_int8_array ("icon-data",
                                                           "icon data",
                                                           "The procedure's icon. The format depends on the 'icon_type' parameter",
                                                           GIMP_PARAM_READWRITE));
  gimp_pdb_register_procedure (pdb, procedure);
  g_object_unref (procedure);

  /*
   * gimp-plugin-set-pdb-error-handler
   */
  procedure = gimp_procedure_new (plugin_set_pdb_error_handler_invoker);
  gimp_object_set_static_name (GIMP_OBJECT (procedure),
                               "gimp-plugin-set-pdb-error-handler");
  gimp_procedure_set_static_strings (procedure,
                                     "gimp-plugin-set-pdb-error-handler",
                                     "Sets an error handler for procedure calls.",
                                     "This procedure changes the way that errors in procedure calls are handled. By default GIMP will raise an error dialog if a procedure call made by a plug-in fails. Using this procedure the plug-in can change this behavior. If the error handler is set to %GIMP_PDB_ERROR_HANDLER_PLUGIN, then the plug-in is responsible for calling 'gimp-get-pdb-error' and handling the error whenever one if its procedure calls fails. It can do this by displaying the error message or by forwarding it in its own return values.",
                                     "Sven Neumann <*****@*****.**>",
                                     "Sven Neumann",
                                     "2008",
                                     NULL);
  gimp_procedure_add_argument (procedure,
                               g_param_spec_enum ("handler",
                                                  "handler",
                                                  "Who is responsible for handling procedure call errors",
                                                  GIMP_TYPE_PDB_ERROR_HANDLER,
                                                  GIMP_PDB_ERROR_HANDLER_INTERNAL,
                                                  GIMP_PARAM_READWRITE));
  gimp_pdb_register_procedure (pdb, procedure);
  g_object_unref (procedure);

  /*
   * gimp-plugin-get-pdb-error-handler
   */
  procedure = gimp_procedure_new (plugin_get_pdb_error_handler_invoker);
  gimp_object_set_static_name (GIMP_OBJECT (procedure),
                               "gimp-plugin-get-pdb-error-handler");
  gimp_procedure_set_static_strings (procedure,
                                     "gimp-plugin-get-pdb-error-handler",
                                     "Retrieves the active error handler for procedure calls.",
                                     "This procedure retrieves the currently active error handler for procedure calls made by the calling plug-in. See 'gimp-plugin-set-pdb-error-handler' for details.",
                                     "Sven Neumann <*****@*****.**>",
                                     "Sven Neumann",
                                     "2008",
                                     NULL);
  gimp_procedure_add_return_value (procedure,
                                   g_param_spec_enum ("handler",
                                                      "handler",
                                                      "Who is responsible for handling procedure call errors",
                                                      GIMP_TYPE_PDB_ERROR_HANDLER,
                                                      GIMP_PDB_ERROR_HANDLER_INTERNAL,
                                                      GIMP_PARAM_READWRITE));
  gimp_pdb_register_procedure (pdb, procedure);
  g_object_unref (procedure);
}
Beispiel #2
0
void
register_fileops_procs (GimpPDB *pdb)
{
  GimpProcedure *procedure;

  /*
   * gimp-file-load
   */
  procedure = gimp_procedure_new (file_load_invoker);
  gimp_object_set_static_name (GIMP_OBJECT (procedure),
                               "gimp-file-load");
  gimp_procedure_set_static_strings (procedure,
                                     "gimp-file-load",
                                     "Loads an image file by invoking the right load handler.",
                                     "This procedure invokes the correct file load handler using magic if possible, and falling back on the file's extension and/or prefix if not. The name of the file to load is typically a full pathname, and the name entered is what the user actually typed before prepending a directory path. The reason for this is that if the user types http://www.xcf/~gimp/ he wants to fetch a URL, and the full pathname will not look like a URL.\"",
                                     "Josh MacDonald",
                                     "Josh MacDonald",
                                     "1997",
                                     NULL);
  gimp_procedure_add_argument (procedure,
                               gimp_param_spec_enum ("run-mode",
                                                     "run mode",
                                                     "The run mode",
                                                     GIMP_TYPE_RUN_MODE,
                                                     GIMP_RUN_INTERACTIVE,
                                                     GIMP_PARAM_READWRITE));
  gimp_param_spec_enum_exclude_value (GIMP_PARAM_SPEC_ENUM (procedure->args[0]),
                                      GIMP_RUN_WITH_LAST_VALS);
  gimp_procedure_add_argument (procedure,
                               gimp_param_spec_string ("filename",
                                                       "filename",
                                                       "The name of the file to load",
                                                       TRUE, FALSE, FALSE,
                                                       NULL,
                                                       GIMP_PARAM_READWRITE));
  gimp_procedure_add_argument (procedure,
                               gimp_param_spec_string ("raw-filename",
                                                       "raw filename",
                                                       "The name as entered by the user",
                                                       TRUE, FALSE, FALSE,
                                                       NULL,
                                                       GIMP_PARAM_READWRITE));
  gimp_procedure_add_return_value (procedure,
                                   gimp_param_spec_image_id ("image",
                                                             "image",
                                                             "The output image",
                                                             pdb->gimp, FALSE,
                                                             GIMP_PARAM_READWRITE));
  gimp_pdb_register_procedure (pdb, procedure);
  g_object_unref (procedure);

  /*
   * gimp-file-load-layer
   */
  procedure = gimp_procedure_new (file_load_layer_invoker);
  gimp_object_set_static_name (GIMP_OBJECT (procedure),
                               "gimp-file-load-layer");
  gimp_procedure_set_static_strings (procedure,
                                     "gimp-file-load-layer",
                                     "Loads an image file as a layer for an existing image.",
                                     "This procedure behaves like the file-load procedure but opens the specified image as a layer for an existing image. The returned layer needs to be added to the existing image with 'gimp-image-insert-layer'.",
                                     "Sven Neumann <*****@*****.**>",
                                     "Sven Neumann",
                                     "2005",
                                     NULL);
  gimp_procedure_add_argument (procedure,
                               gimp_param_spec_enum ("run-mode",
                                                     "run mode",
                                                     "The run mode",
                                                     GIMP_TYPE_RUN_MODE,
                                                     GIMP_RUN_INTERACTIVE,
                                                     GIMP_PARAM_READWRITE));
  gimp_param_spec_enum_exclude_value (GIMP_PARAM_SPEC_ENUM (procedure->args[0]),
                                      GIMP_RUN_WITH_LAST_VALS);
  gimp_procedure_add_argument (procedure,
                               gimp_param_spec_image_id ("image",
                                                         "image",
                                                         "Destination image",
                                                         pdb->gimp, FALSE,
                                                         GIMP_PARAM_READWRITE));
  gimp_procedure_add_argument (procedure,
                               gimp_param_spec_string ("filename",
                                                       "filename",
                                                       "The name of the file to load",
                                                       TRUE, FALSE, FALSE,
                                                       NULL,
                                                       GIMP_PARAM_READWRITE));
  gimp_procedure_add_return_value (procedure,
                                   gimp_param_spec_layer_id ("layer",
                                                             "layer",
                                                             "The layer created when loading the image file",
                                                             pdb->gimp, FALSE,
                                                             GIMP_PARAM_READWRITE));
  gimp_pdb_register_procedure (pdb, procedure);
  g_object_unref (procedure);

  /*
   * gimp-file-load-layers
   */
  procedure = gimp_procedure_new (file_load_layers_invoker);
  gimp_object_set_static_name (GIMP_OBJECT (procedure),
                               "gimp-file-load-layers");
  gimp_procedure_set_static_strings (procedure,
                                     "gimp-file-load-layers",
                                     "Loads an image file as layers for an existing image.",
                                     "This procedure behaves like the file-load procedure but opens the specified image as layers for an existing image. The returned layers needs to be added to the existing image with 'gimp-image-insert-layer'.",
                                     "Michael Natterer <*****@*****.**>",
                                     "Michael Natterer",
                                     "2006",
                                     NULL);
  gimp_procedure_add_argument (procedure,
                               gimp_param_spec_enum ("run-mode",
                                                     "run mode",
                                                     "The run mode",
                                                     GIMP_TYPE_RUN_MODE,
                                                     GIMP_RUN_INTERACTIVE,
                                                     GIMP_PARAM_READWRITE));
  gimp_param_spec_enum_exclude_value (GIMP_PARAM_SPEC_ENUM (procedure->args[0]),
                                      GIMP_RUN_WITH_LAST_VALS);
  gimp_procedure_add_argument (procedure,
                               gimp_param_spec_image_id ("image",
                                                         "image",
                                                         "Destination image",
                                                         pdb->gimp, FALSE,
                                                         GIMP_PARAM_READWRITE));
  gimp_procedure_add_argument (procedure,
                               gimp_param_spec_string ("filename",
                                                       "filename",
                                                       "The name of the file to load",
                                                       TRUE, FALSE, FALSE,
                                                       NULL,
                                                       GIMP_PARAM_READWRITE));
  gimp_procedure_add_return_value (procedure,
                                   gimp_param_spec_int32 ("num-layers",
                                                          "num layers",
                                                          "The number of loaded layers",
                                                          0, G_MAXINT32, 0,
                                                          GIMP_PARAM_READWRITE));
  gimp_procedure_add_return_value (procedure,
                                   gimp_param_spec_int32_array ("layer-ids",
                                                                "layer ids",
                                                                "The list of loaded layers",
                                                                GIMP_PARAM_READWRITE));
  gimp_pdb_register_procedure (pdb, procedure);
  g_object_unref (procedure);

  /*
   * gimp-file-save
   */
  procedure = gimp_procedure_new (file_save_invoker);
  gimp_object_set_static_name (GIMP_OBJECT (procedure),
                               "gimp-file-save");
  gimp_procedure_set_static_strings (procedure,
                                     "gimp-file-save",
                                     "Saves a file by extension.",
                                     "This procedure invokes the correct file save handler according to the file's extension and/or prefix. The name of the file to save is typically a full pathname, and the name entered is what the user actually typed before prepending a directory path. The reason for this is that if the user types http://www.xcf/~gimp/ she wants to fetch a URL, and the full pathname will not look like a URL.",
                                     "Josh MacDonald",
                                     "Josh MacDonald",
                                     "1997",
                                     NULL);
  gimp_procedure_add_argument (procedure,
                               g_param_spec_enum ("run-mode",
                                                  "run mode",
                                                  "The run mode",
                                                  GIMP_TYPE_RUN_MODE,
                                                  GIMP_RUN_INTERACTIVE,
                                                  GIMP_PARAM_READWRITE));
  gimp_procedure_add_argument (procedure,
                               gimp_param_spec_image_id ("image",
                                                         "image",
                                                         "Input image",
                                                         pdb->gimp, FALSE,
                                                         GIMP_PARAM_READWRITE));
  gimp_procedure_add_argument (procedure,
                               gimp_param_spec_drawable_id ("drawable",
                                                            "drawable",
                                                            "Drawable to save",
                                                            pdb->gimp, FALSE,
                                                            GIMP_PARAM_READWRITE));
  gimp_procedure_add_argument (procedure,
                               gimp_param_spec_string ("filename",
                                                       "filename",
                                                       "The name of the file to save the image in",
                                                       TRUE, FALSE, FALSE,
                                                       NULL,
                                                       GIMP_PARAM_READWRITE));
  gimp_procedure_add_argument (procedure,
                               gimp_param_spec_string ("raw-filename",
                                                       "raw filename",
                                                       "The name as entered by the user",
                                                       TRUE, FALSE, FALSE,
                                                       NULL,
                                                       GIMP_PARAM_READWRITE));
  gimp_pdb_register_procedure (pdb, procedure);
  g_object_unref (procedure);

  /*
   * gimp-file-load-thumbnail
   */
  procedure = gimp_procedure_new (file_load_thumbnail_invoker);
  gimp_object_set_static_name (GIMP_OBJECT (procedure),
                               "gimp-file-load-thumbnail");
  gimp_procedure_set_static_strings (procedure,
                                     "gimp-file-load-thumbnail",
                                     "Loads the thumbnail for a file.",
                                     "This procedure tries to load a thumbnail that belongs to the file with the given filename. This name is a full pathname. The returned data is an array of colordepth 3 (RGB), regardless of the image type. Width and height of the thumbnail are also returned. Don't use this function if you need a thumbnail of an already opened image, use 'gimp-image-thumbnail' instead.",
                                     "Adam D. Moss, Sven Neumann",
                                     "Adam D. Moss, Sven Neumann",
                                     "1999-2003",
                                     NULL);
  gimp_procedure_add_argument (procedure,
                               gimp_param_spec_string ("filename",
                                                       "filename",
                                                       "The name of the file that owns the thumbnail to load",
                                                       TRUE, FALSE, FALSE,
                                                       NULL,
                                                       GIMP_PARAM_READWRITE));
  gimp_procedure_add_return_value (procedure,
                                   gimp_param_spec_int32 ("width",
                                                          "width",
                                                          "The width of the thumbnail",
                                                          G_MININT32, G_MAXINT32, 0,
                                                          GIMP_PARAM_READWRITE));
  gimp_procedure_add_return_value (procedure,
                                   gimp_param_spec_int32 ("height",
                                                          "height",
                                                          "The height of the thumbnail",
                                                          G_MININT32, G_MAXINT32, 0,
                                                          GIMP_PARAM_READWRITE));
  gimp_procedure_add_return_value (procedure,
                                   gimp_param_spec_int32 ("thumb-data-count",
                                                          "thumb data count",
                                                          "The number of bytes in thumbnail data",
                                                          0, G_MAXINT32, 0,
                                                          GIMP_PARAM_READWRITE));
  gimp_procedure_add_return_value (procedure,
                                   gimp_param_spec_int8_array ("thumb-data",
                                                               "thumb data",
                                                               "The thumbnail data",
                                                               GIMP_PARAM_READWRITE));
  gimp_pdb_register_procedure (pdb, procedure);
  g_object_unref (procedure);

  /*
   * gimp-file-save-thumbnail
   */
  procedure = gimp_procedure_new (file_save_thumbnail_invoker);
  gimp_object_set_static_name (GIMP_OBJECT (procedure),
                               "gimp-file-save-thumbnail");
  gimp_procedure_set_static_strings (procedure,
                                     "gimp-file-save-thumbnail",
                                     "Saves a thumbnail for the given image",
                                     "This procedure saves a thumbnail for the given image according to the Free Desktop Thumbnail Managing Standard. The thumbnail is saved so that it belongs to the file with the given filename. This means you have to save the image under this name first, otherwise this procedure will fail. This procedure may become useful if you want to explicitly save a thumbnail with a file.",
                                     "Josh MacDonald",
                                     "Josh MacDonald",
                                     "1997",
                                     NULL);
  gimp_procedure_add_argument (procedure,
                               gimp_param_spec_image_id ("image",
                                                         "image",
                                                         "The image",
                                                         pdb->gimp, FALSE,
                                                         GIMP_PARAM_READWRITE));
  gimp_procedure_add_argument (procedure,
                               gimp_param_spec_string ("filename",
                                                       "filename",
                                                       "The name of the file the thumbnail belongs to",
                                                       TRUE, FALSE, FALSE,
                                                       NULL,
                                                       GIMP_PARAM_READWRITE));
  gimp_pdb_register_procedure (pdb, procedure);
  g_object_unref (procedure);

  /*
   * gimp-temp-name
   */
  procedure = gimp_procedure_new (temp_name_invoker);
  gimp_object_set_static_name (GIMP_OBJECT (procedure),
                               "gimp-temp-name");
  gimp_procedure_set_static_strings (procedure,
                                     "gimp-temp-name",
                                     "Generates a unique filename.",
                                     "Generates a unique filename using the temp path supplied in the user's gimprc.",
                                     "Josh MacDonald",
                                     "Josh MacDonald",
                                     "1997",
                                     NULL);
  gimp_procedure_add_argument (procedure,
                               gimp_param_spec_string ("extension",
                                                       "extension",
                                                       "The extension the file will have",
                                                       TRUE, TRUE, FALSE,
                                                       NULL,
                                                       GIMP_PARAM_READWRITE));
  gimp_procedure_add_return_value (procedure,
                                   gimp_param_spec_string ("name",
                                                           "name",
                                                           "The new temp filename",
                                                           FALSE, FALSE, FALSE,
                                                           NULL,
                                                           GIMP_PARAM_READWRITE));
  gimp_pdb_register_procedure (pdb, procedure);
  g_object_unref (procedure);

  /*
   * gimp-register-magic-load-handler
   */
  procedure = gimp_procedure_new (register_magic_load_handler_invoker);
  gimp_object_set_static_name (GIMP_OBJECT (procedure),
                               "gimp-register-magic-load-handler");
  gimp_procedure_set_static_strings (procedure,
                                     "gimp-register-magic-load-handler",
                                     "Registers a file load handler procedure.",
                                     "Registers a procedural database procedure to be called to load files of a particular file format using magic file information.",
                                     "Spencer Kimball & Peter Mattis",
                                     "Spencer Kimball & Peter Mattis",
                                     "1995-1996",
                                     NULL);
  gimp_procedure_add_argument (procedure,
                               gimp_param_spec_string ("procedure-name",
                                                       "procedure name",
                                                       "The name of the procedure to be used for loading",
                                                       FALSE, FALSE, TRUE,
                                                       NULL,
                                                       GIMP_PARAM_READWRITE));
  gimp_procedure_add_argument (procedure,
                               gimp_param_spec_string ("extensions",
                                                       "extensions",
                                                       "comma separated list of extensions this handler can load (i.e. \"jpg,jpeg\")",
                                                       FALSE, FALSE, FALSE,
                                                       NULL,
                                                       GIMP_PARAM_READWRITE | GIMP_PARAM_NO_VALIDATE));
  gimp_procedure_add_argument (procedure,
                               gimp_param_spec_string ("prefixes",
                                                       "prefixes",
                                                       "comma separated list of prefixes this handler can load (i.e. \"http:,ftp:\")",
                                                       FALSE, FALSE, FALSE,
                                                       NULL,
                                                       GIMP_PARAM_READWRITE | GIMP_PARAM_NO_VALIDATE));
  gimp_procedure_add_argument (procedure,
                               gimp_param_spec_string ("magics",
                                                       "magics",
                                                       "comma separated list of magic file information this handler can load (i.e. \"0,string,GIF\")",
                                                       FALSE, FALSE, FALSE,
                                                       NULL,
                                                       GIMP_PARAM_READWRITE | GIMP_PARAM_NO_VALIDATE));
  gimp_pdb_register_procedure (pdb, procedure);
  g_object_unref (procedure);

  /*
   * gimp-register-load-handler
   */
  procedure = gimp_procedure_new (register_load_handler_invoker);
  gimp_object_set_static_name (GIMP_OBJECT (procedure),
                               "gimp-register-load-handler");
  gimp_procedure_set_static_strings (procedure,
                                     "gimp-register-load-handler",
                                     "Registers a file load handler procedure.",
                                     "Registers a procedural database procedure to be called to load files of a particular file format.",
                                     "Spencer Kimball & Peter Mattis",
                                     "Spencer Kimball & Peter Mattis",
                                     "1995-1996",
                                     NULL);
  gimp_procedure_add_argument (procedure,
                               gimp_param_spec_string ("procedure-name",
                                                       "procedure name",
                                                       "The name of the procedure to be used for loading",
                                                       FALSE, FALSE, TRUE,
                                                       NULL,
                                                       GIMP_PARAM_READWRITE));
  gimp_procedure_add_argument (procedure,
                               gimp_param_spec_string ("extensions",
                                                       "extensions",
                                                       "comma separated list of extensions this handler can load (i.e. \"jpg,jpeg\")",
                                                       FALSE, FALSE, FALSE,
                                                       NULL,
                                                       GIMP_PARAM_READWRITE | GIMP_PARAM_NO_VALIDATE));
  gimp_procedure_add_argument (procedure,
                               gimp_param_spec_string ("prefixes",
                                                       "prefixes",
                                                       "comma separated list of prefixes this handler can load (i.e. \"http:,ftp:\")",
                                                       FALSE, FALSE, FALSE,
                                                       NULL,
                                                       GIMP_PARAM_READWRITE | GIMP_PARAM_NO_VALIDATE));
  gimp_pdb_register_procedure (pdb, procedure);
  g_object_unref (procedure);

  /*
   * gimp-register-save-handler
   */
  procedure = gimp_procedure_new (register_save_handler_invoker);
  gimp_object_set_static_name (GIMP_OBJECT (procedure),
                               "gimp-register-save-handler");
  gimp_procedure_set_static_strings (procedure,
                                     "gimp-register-save-handler",
                                     "Registers a file save handler procedure.",
                                     "Registers a procedural database procedure to be called to save files in a particular file format.",
                                     "Spencer Kimball & Peter Mattis",
                                     "Spencer Kimball & Peter Mattis",
                                     "1995-1996",
                                     NULL);
  gimp_procedure_add_argument (procedure,
                               gimp_param_spec_string ("procedure-name",
                                                       "procedure name",
                                                       "The name of the procedure to be used for saving",
                                                       FALSE, FALSE, TRUE,
                                                       NULL,
                                                       GIMP_PARAM_READWRITE));
  gimp_procedure_add_argument (procedure,
                               gimp_param_spec_string ("extensions",
                                                       "extensions",
                                                       "comma separated list of extensions this handler can save (i.e. \"jpg,jpeg\")",
                                                       FALSE, FALSE, FALSE,
                                                       NULL,
                                                       GIMP_PARAM_READWRITE | GIMP_PARAM_NO_VALIDATE));
  gimp_procedure_add_argument (procedure,
                               gimp_param_spec_string ("prefixes",
                                                       "prefixes",
                                                       "comma separated list of prefixes this handler can save (i.e. \"http:,ftp:\")",
                                                       FALSE, FALSE, FALSE,
                                                       NULL,
                                                       GIMP_PARAM_READWRITE | GIMP_PARAM_NO_VALIDATE));
  gimp_pdb_register_procedure (pdb, procedure);
  g_object_unref (procedure);

  /*
   * gimp-register-file-handler-mime
   */
  procedure = gimp_procedure_new (register_file_handler_mime_invoker);
  gimp_object_set_static_name (GIMP_OBJECT (procedure),
                               "gimp-register-file-handler-mime");
  gimp_procedure_set_static_strings (procedure,
                                     "gimp-register-file-handler-mime",
                                     "Associates a MIME type with a file handler procedure.",
                                     "Registers a MIME type for a file handler procedure. This allows GIMP to determine the MIME type of the file opened or saved using this procedure.",
                                     "Sven Neumann <*****@*****.**>",
                                     "Sven Neumann",
                                     "2004",
                                     NULL);
  gimp_procedure_add_argument (procedure,
                               gimp_param_spec_string ("procedure-name",
                                                       "procedure name",
                                                       "The name of the procedure to associate a MIME type with.",
                                                       FALSE, FALSE, TRUE,
                                                       NULL,
                                                       GIMP_PARAM_READWRITE));
  gimp_procedure_add_argument (procedure,
                               gimp_param_spec_string ("mime-type",
                                                       "mime type",
                                                       "A single MIME type, like for example \"image/jpeg\".",
                                                       FALSE, FALSE, FALSE,
                                                       NULL,
                                                       GIMP_PARAM_READWRITE));
  gimp_pdb_register_procedure (pdb, procedure);
  g_object_unref (procedure);

  /*
   * gimp-register-thumbnail-loader
   */
  procedure = gimp_procedure_new (register_thumbnail_loader_invoker);
  gimp_object_set_static_name (GIMP_OBJECT (procedure),
                               "gimp-register-thumbnail-loader");
  gimp_procedure_set_static_strings (procedure,
                                     "gimp-register-thumbnail-loader",
                                     "Associates a thumbnail loader with a file load procedure.",
                                     "Some file formats allow for embedded thumbnails, other file formats contain a scalable image or provide the image data in different resolutions. A file plug-in for such a format may register a special procedure that allows GIMP to load a thumbnail preview of the image. This procedure is then associated with the standard load procedure using this function.",
                                     "Sven Neumann <*****@*****.**>",
                                     "Sven Neumann",
                                     "2004",
                                     NULL);
  gimp_procedure_add_argument (procedure,
                               gimp_param_spec_string ("load-proc",
                                                       "load proc",
                                                       "The name of the procedure the thumbnail loader with.",
                                                       FALSE, FALSE, TRUE,
                                                       NULL,
                                                       GIMP_PARAM_READWRITE));
  gimp_procedure_add_argument (procedure,
                               gimp_param_spec_string ("thumb-proc",
                                                       "thumb proc",
                                                       "The name of the thumbnail load procedure.",
                                                       FALSE, FALSE, TRUE,
                                                       NULL,
                                                       GIMP_PARAM_READWRITE));
  gimp_pdb_register_procedure (pdb, procedure);
  g_object_unref (procedure);
}