gboolean gimp_plug_in_manager_register_save_handler (GimpPlugInManager *manager, const gchar *name, const gchar *extensions, const gchar *prefixes) { GimpPlugInProcedure *file_proc; GimpProcedure *procedure; GSList *list; g_return_val_if_fail (GIMP_IS_PLUG_IN_MANAGER (manager), FALSE); g_return_val_if_fail (name != NULL, FALSE); if (manager->current_plug_in && manager->current_plug_in->plug_in_def) list = manager->current_plug_in->plug_in_def->procedures; else list = manager->plug_in_procedures; file_proc = gimp_plug_in_procedure_find (list, name); if (! file_proc) { gimp_message (manager->gimp, NULL, GIMP_MESSAGE_ERROR, "attempt to register nonexistent save handler \"%s\"", name); return FALSE; } procedure = GIMP_PROCEDURE (file_proc); if ((procedure->num_args < 5) || ! GIMP_IS_PARAM_SPEC_INT32 (procedure->args[0]) || ! GIMP_IS_PARAM_SPEC_IMAGE_ID (procedure->args[1]) || ! GIMP_IS_PARAM_SPEC_DRAWABLE_ID (procedure->args[2]) || ! G_IS_PARAM_SPEC_STRING (procedure->args[3]) || ! G_IS_PARAM_SPEC_STRING (procedure->args[4])) { gimp_message (manager->gimp, NULL, GIMP_MESSAGE_ERROR, "save handler \"%s\" does not take the standard " "save handler args", name); return FALSE; } gimp_plug_in_procedure_set_file_proc (file_proc, extensions, prefixes, NULL); if (file_procedure_in_group (file_proc, FILE_PROCEDURE_GROUP_SAVE)) { if (! g_slist_find (manager->save_procs, file_proc)) manager->save_procs = g_slist_prepend (manager->save_procs, file_proc); } if (file_procedure_in_group (file_proc, FILE_PROCEDURE_GROUP_EXPORT)) { if (! g_slist_find (manager->export_procs, file_proc)) manager->export_procs = g_slist_prepend (manager->export_procs, file_proc); } return TRUE; }
gboolean gimp_plug_in_manager_register_load_handler (GimpPlugInManager *manager, const gchar *name, const gchar *extensions, const gchar *prefixes, const gchar *magics) { GimpPlugInProcedure *file_proc; GimpProcedure *procedure; GSList *list; g_return_val_if_fail (GIMP_IS_PLUG_IN_MANAGER (manager), FALSE); g_return_val_if_fail (name != NULL, FALSE); if (manager->current_plug_in && manager->current_plug_in->plug_in_def) list = manager->current_plug_in->plug_in_def->procedures; else list = manager->plug_in_procedures; file_proc = gimp_plug_in_procedure_find (list, name); if (! file_proc) { gimp_message (manager->gimp, NULL, GIMP_MESSAGE_ERROR, "attempt to register nonexistent load handler \"%s\"", name); return FALSE; } procedure = GIMP_PROCEDURE (file_proc); if ((procedure->num_args < 3) || (procedure->num_values < 1) || ! GIMP_IS_PARAM_SPEC_INT32 (procedure->args[0]) || ! G_IS_PARAM_SPEC_STRING (procedure->args[1]) || ! G_IS_PARAM_SPEC_STRING (procedure->args[2]) || ! GIMP_IS_PARAM_SPEC_IMAGE_ID (procedure->values[0])) { gimp_message (manager->gimp, NULL, GIMP_MESSAGE_ERROR, "load handler \"%s\" does not take the standard " "load handler args", name); return FALSE; } gimp_plug_in_procedure_set_file_proc (file_proc, extensions, prefixes, magics); if (! g_slist_find (manager->load_procs, file_proc)) manager->load_procs = g_slist_prepend (manager->load_procs, file_proc); return TRUE; }
void xcf_init (Gimp *gimp) { GimpPlugInProcedure *proc; GimpProcedure *procedure; g_return_if_fail (GIMP_IS_GIMP (gimp)); /* So this is sort of a hack, but its better than it was before. To * do this right there would be a file load-save handler type and * the whole interface would change but there isn't, and currently * the plug-in structure contains all the load-save info, so it * makes sense to use that for the XCF load/save handlers, even * though they are internal. The only thing it requires is using a * PlugInProcDef struct. -josh */ /* gimp-xcf-save */ procedure = gimp_plug_in_procedure_new (GIMP_PLUGIN, "gimp-xcf-save"); procedure->proc_type = GIMP_INTERNAL; procedure->marshal_func = xcf_save_invoker; proc = GIMP_PLUG_IN_PROCEDURE (procedure); proc->menu_label = g_strdup (N_("GIMP XCF image")); gimp_plug_in_procedure_set_icon (proc, GIMP_ICON_TYPE_STOCK_ID, (const guint8 *) "gimp-wilber", strlen ("gimp-wilber") + 1); gimp_plug_in_procedure_set_image_types (proc, "RGB*, GRAY*, INDEXED*"); gimp_plug_in_procedure_set_file_proc (proc, "xcf", "", NULL); gimp_plug_in_procedure_set_mime_type (proc, "image/xcf"); gimp_object_set_static_name (GIMP_OBJECT (procedure), "gimp-xcf-save"); gimp_procedure_set_static_strings (procedure, "gimp-xcf-save", "Saves file in the .xcf file format", "The XCF file format has been designed " "specifically for loading and saving " "tiled and layered images in GIMP. " "This procedure will save the specified " "image in the xcf file format.", "Spencer Kimball & Peter Mattis", "Spencer Kimball & Peter Mattis", "1995-1996", NULL); gimp_procedure_add_argument (procedure, gimp_param_spec_int32 ("dummy-param", "Dummy Param", "Dummy parameter", G_MININT32, G_MAXINT32, 0, GIMP_PARAM_READWRITE)); gimp_procedure_add_argument (procedure, gimp_param_spec_image_id ("image", "Image", "Input image", gimp, FALSE, GIMP_PARAM_READWRITE)); gimp_procedure_add_argument (procedure, gimp_param_spec_drawable_id ("drawable", "Drawable", "Active drawable of input image", gimp, TRUE, GIMP_PARAM_READWRITE)); gimp_procedure_add_argument (procedure, gimp_param_spec_string ("filename", "Filename", "The name of the file " "to save the image in, " "in the on-disk " "character set and " "encoding", TRUE, FALSE, TRUE, NULL, GIMP_PARAM_READWRITE)); gimp_procedure_add_argument (procedure, gimp_param_spec_string ("raw-filename", "Raw filename", "The basename of the " "file, in UTF-8", FALSE, FALSE, TRUE, NULL, GIMP_PARAM_READWRITE)); gimp_plug_in_manager_add_procedure (gimp->plug_in_manager, proc); g_object_unref (procedure); /* gimp-xcf-load */ procedure = gimp_plug_in_procedure_new (GIMP_PLUGIN, "gimp-xcf-load"); procedure->proc_type = GIMP_INTERNAL; procedure->marshal_func = xcf_load_invoker; proc = GIMP_PLUG_IN_PROCEDURE (procedure); proc->menu_label = g_strdup (N_("GIMP XCF image")); gimp_plug_in_procedure_set_icon (proc, GIMP_ICON_TYPE_STOCK_ID, (const guint8 *) "gimp-wilber", strlen ("gimp-wilber") + 1); gimp_plug_in_procedure_set_image_types (proc, NULL); gimp_plug_in_procedure_set_file_proc (proc, "xcf", "", "0,string,gimp\\040xcf\\040"); gimp_plug_in_procedure_set_mime_type (proc, "image/xcf"); gimp_object_set_static_name (GIMP_OBJECT (procedure), "gimp-xcf-load"); gimp_procedure_set_static_strings (procedure, "gimp-xcf-load", "Loads file saved in the .xcf file format", "The XCF file format has been designed " "specifically for loading and saving " "tiled and layered images in GIMP. " "This procedure will load the specified " "file.", "Spencer Kimball & Peter Mattis", "Spencer Kimball & Peter Mattis", "1995-1996", NULL); gimp_procedure_add_argument (procedure, gimp_param_spec_int32 ("dummy-param", "Dummy Param", "Dummy parameter", G_MININT32, G_MAXINT32, 0, GIMP_PARAM_READWRITE)); gimp_procedure_add_argument (procedure, gimp_param_spec_string ("filename", "Filename", "The name of the file " "to load, in the " "on-disk character " "set and encoding", TRUE, FALSE, TRUE, NULL, GIMP_PARAM_READWRITE)); gimp_procedure_add_argument (procedure, gimp_param_spec_string ("raw-filename", "Raw filename", "The basename of the " "file, in UTF-8", FALSE, FALSE, TRUE, NULL, GIMP_PARAM_READWRITE)); gimp_procedure_add_return_value (procedure, gimp_param_spec_image_id ("image", "Image", "Output image", gimp, FALSE, GIMP_PARAM_READWRITE)); gimp_plug_in_manager_add_procedure (gimp->plug_in_manager, proc); g_object_unref (procedure); }
void file_data_init (Gimp *gimp) { GimpPlugInProcedure *proc; GFile *file; GimpProcedure *procedure; g_return_if_fail (GIMP_IS_GIMP (gimp)); /* file-gbr-load */ file = g_file_new_for_path ("file-gbr-load"); procedure = gimp_plug_in_procedure_new (GIMP_PLUGIN, file); g_object_unref (file); procedure->proc_type = GIMP_INTERNAL; procedure->marshal_func = file_gbr_load_invoker; proc = GIMP_PLUG_IN_PROCEDURE (procedure); proc->menu_label = g_strdup (N_("GIMP brush")); gimp_plug_in_procedure_set_icon (proc, GIMP_ICON_TYPE_ICON_NAME, (const guint8 *) "gimp-brush", strlen ("gimp-brush") + 1); gimp_plug_in_procedure_set_image_types (proc, NULL); gimp_plug_in_procedure_set_file_proc (proc, "gbr, gbp", "", "20, string, GIMP"); gimp_plug_in_procedure_set_mime_types (proc, "image/gimp-x-gbr"); gimp_plug_in_procedure_set_handles_uri (proc); gimp_object_set_static_name (GIMP_OBJECT (procedure), "file-gbr-load"); gimp_procedure_set_static_strings (procedure, "file-gbr-load", "Loads GIMP brushes", "Loads GIMP brushes (1 or 4 bpp " "and old .gpb format)", "Tim Newsome, Jens Lautenbacher, " "Sven Neumann, Michael Natterer", "Tim Newsome, Jens Lautenbacher, " "Sven Neumann, Michael Natterer", "1995-2019", NULL); gimp_procedure_add_argument (procedure, gimp_param_spec_int32 ("dummy-param", "Dummy Param", "Dummy parameter", G_MININT32, G_MAXINT32, 0, GIMP_PARAM_READWRITE)); gimp_procedure_add_argument (procedure, gimp_param_spec_string ("uri", "URI", "The URI of the file " "to load", TRUE, FALSE, TRUE, NULL, GIMP_PARAM_READWRITE)); gimp_procedure_add_argument (procedure, gimp_param_spec_string ("raw-uri", "Raw URI", "The URI of the file " "to load", TRUE, FALSE, TRUE, NULL, GIMP_PARAM_READWRITE)); gimp_procedure_add_return_value (procedure, gimp_param_spec_image_id ("image", "Image", "Output image", gimp, FALSE, GIMP_PARAM_READWRITE)); gimp_plug_in_manager_add_procedure (gimp->plug_in_manager, proc); g_object_unref (procedure); /* file-gbr-save-internal */ file = g_file_new_for_path ("file-gbr-save-internal"); procedure = gimp_plug_in_procedure_new (GIMP_PLUGIN, file); g_object_unref (file); procedure->proc_type = GIMP_INTERNAL; procedure->marshal_func = file_gbr_save_invoker; proc = GIMP_PLUG_IN_PROCEDURE (procedure); proc->menu_label = g_strdup (N_("GIMP brush")); gimp_plug_in_procedure_set_icon (proc, GIMP_ICON_TYPE_ICON_NAME, (const guint8 *) "gimp-brush", strlen ("gimp-brush") + 1); #if 0 /* do not register as file procedure */ gimp_plug_in_procedure_set_image_types (proc, "RGB*, GRAY*, INDEXED*"); gimp_plug_in_procedure_set_file_proc (proc, "gbr", "", NULL); gimp_plug_in_procedure_set_mime_types (proc, "image/x-gimp-gbr"); gimp_plug_in_procedure_set_handles_uri (proc); #endif gimp_object_set_static_name (GIMP_OBJECT (procedure), "file-gbr-save-internal"); gimp_procedure_set_static_strings (procedure, "file-gbr-save-internal", "Exports Gimp brush file (.GBR)", "Exports Gimp brush file (.GBR)", "Tim Newsome, Michael Natterer", "Tim Newsome, Michael Natterer", "1995-2019", NULL); gimp_procedure_add_argument (procedure, gimp_param_spec_int32 ("dummy-param", "Dummy Param", "Dummy parameter", G_MININT32, G_MAXINT32, 0, GIMP_PARAM_READWRITE)); gimp_procedure_add_argument (procedure, gimp_param_spec_image_id ("image", "Image", "Input image", gimp, FALSE, GIMP_PARAM_READWRITE)); gimp_procedure_add_argument (procedure, gimp_param_spec_drawable_id ("drawable", "Drawable", "Active drawable " "of input image", gimp, FALSE, GIMP_PARAM_READWRITE)); gimp_procedure_add_argument (procedure, gimp_param_spec_string ("uri", "URI", "The URI of the file " "to export", FALSE, FALSE, TRUE, NULL, GIMP_PARAM_READWRITE)); gimp_procedure_add_argument (procedure, gimp_param_spec_string ("raw-uri", "Raw URI", "The URI of the file " "to export", FALSE, FALSE, TRUE, NULL, GIMP_PARAM_READWRITE)); gimp_procedure_add_argument (procedure, gimp_param_spec_int32 ("spacing", "spacing", "Spacing of the brush", 1, 1000, 10, GIMP_PARAM_READWRITE)); gimp_procedure_add_argument (procedure, gimp_param_spec_string ("name", "name", "The name of the " "brush", FALSE, FALSE, TRUE, "GIMP Brush", GIMP_PARAM_READWRITE)); gimp_plug_in_manager_add_procedure (gimp->plug_in_manager, proc); g_object_unref (procedure); /* file-gih-load */ file = g_file_new_for_path ("file-gih-load"); procedure = gimp_plug_in_procedure_new (GIMP_PLUGIN, file); g_object_unref (file); procedure->proc_type = GIMP_INTERNAL; procedure->marshal_func = file_gih_load_invoker; proc = GIMP_PLUG_IN_PROCEDURE (procedure); proc->menu_label = g_strdup (N_("GIMP brush (animated)")); gimp_plug_in_procedure_set_icon (proc, GIMP_ICON_TYPE_ICON_NAME, (const guint8 *) "gimp-brush", strlen ("gimp-brush") + 1); gimp_plug_in_procedure_set_image_types (proc, NULL); gimp_plug_in_procedure_set_file_proc (proc, "gih", "", ""); gimp_plug_in_procedure_set_mime_types (proc, "image/gimp-x-gih"); gimp_plug_in_procedure_set_handles_uri (proc); gimp_object_set_static_name (GIMP_OBJECT (procedure), "file-gih-load"); gimp_procedure_set_static_strings (procedure, "file-gih-load", "Loads GIMP animated brushes", "This procedure loads a GIMP brush " "pipe as an image.", "Tor Lillqvist, Michael Natterer", "Tor Lillqvist, Michael Natterer", "1999-2019", NULL); gimp_procedure_add_argument (procedure, gimp_param_spec_int32 ("dummy-param", "Dummy Param", "Dummy parameter", G_MININT32, G_MAXINT32, 0, GIMP_PARAM_READWRITE)); gimp_procedure_add_argument (procedure, gimp_param_spec_string ("uri", "URI", "The URI of the file " "to load", TRUE, FALSE, TRUE, NULL, GIMP_PARAM_READWRITE)); gimp_procedure_add_argument (procedure, gimp_param_spec_string ("raw-uri", "Raw URI", "The URI of the file " "to load", TRUE, FALSE, TRUE, NULL, GIMP_PARAM_READWRITE)); gimp_procedure_add_return_value (procedure, gimp_param_spec_image_id ("image", "Image", "Output image", gimp, FALSE, GIMP_PARAM_READWRITE)); gimp_plug_in_manager_add_procedure (gimp->plug_in_manager, proc); g_object_unref (procedure); /* file-gih-save-internal */ file = g_file_new_for_path ("file-gih-save-internal"); procedure = gimp_plug_in_procedure_new (GIMP_PLUGIN, file); g_object_unref (file); procedure->proc_type = GIMP_INTERNAL; procedure->marshal_func = file_gih_save_invoker; proc = GIMP_PLUG_IN_PROCEDURE (procedure); proc->menu_label = g_strdup (N_("GIMP brush (animated)")); gimp_plug_in_procedure_set_icon (proc, GIMP_ICON_TYPE_ICON_NAME, (const guint8 *) "gimp-brush", strlen ("gimp-brush") + 1); #if 0 /* do not register as file procedure */ gimp_plug_in_procedure_set_image_types (proc, "RGB*, GRAY*, INDEXED*"); gimp_plug_in_procedure_set_file_proc (proc, "gih", "", NULL); gimp_plug_in_procedure_set_mime_types (proc, "image/x-gimp-gih"); gimp_plug_in_procedure_set_handles_uri (proc); #endif gimp_object_set_static_name (GIMP_OBJECT (procedure), "file-gih-save-internal"); gimp_procedure_set_static_strings (procedure, "file-gih-save-internal", "Exports Gimp animated brush file (.gih)", "Exports Gimp animated brush file (.gih)", "Tor Lillqvist, Michael Natterer", "Tor Lillqvist, Michael Natterer", "1999-2019", NULL); gimp_procedure_add_argument (procedure, gimp_param_spec_int32 ("dummy-param", "Dummy Param", "Dummy parameter", G_MININT32, G_MAXINT32, 0, GIMP_PARAM_READWRITE)); gimp_procedure_add_argument (procedure, gimp_param_spec_image_id ("image", "Image", "Input image", gimp, FALSE, GIMP_PARAM_READWRITE)); gimp_procedure_add_argument (procedure, gimp_param_spec_drawable_id ("drawable", "Drawable", "Active drawable " "of input image", gimp, FALSE, GIMP_PARAM_READWRITE)); gimp_procedure_add_argument (procedure, gimp_param_spec_string ("uri", "URI", "The URI of the file " "to export", FALSE, FALSE, TRUE, NULL, GIMP_PARAM_READWRITE)); gimp_procedure_add_argument (procedure, gimp_param_spec_string ("raw-uri", "Raw URI", "The URI of the file " "to export", FALSE, FALSE, TRUE, NULL, GIMP_PARAM_READWRITE)); gimp_procedure_add_argument (procedure, gimp_param_spec_int32 ("spacing", "spacing", "Spacing of the brush", 1, 1000, 10, GIMP_PARAM_READWRITE)); gimp_procedure_add_argument (procedure, gimp_param_spec_string ("name", "name", "The name of the " "brush", FALSE, FALSE, TRUE, "GIMP Brush", GIMP_PARAM_READWRITE)); gimp_procedure_add_argument (procedure, gimp_param_spec_string ("params", "params", "The pipe's parameters", FALSE, FALSE, TRUE, NULL, GIMP_PARAM_READWRITE)); gimp_plug_in_manager_add_procedure (gimp->plug_in_manager, proc); g_object_unref (procedure); /* file-pat-load */ file = g_file_new_for_path ("file-pat-load"); procedure = gimp_plug_in_procedure_new (GIMP_PLUGIN, file); g_object_unref (file); procedure->proc_type = GIMP_INTERNAL; procedure->marshal_func = file_pat_load_invoker; proc = GIMP_PLUG_IN_PROCEDURE (procedure); proc->menu_label = g_strdup (N_("GIMP pattern")); gimp_plug_in_procedure_set_icon (proc, GIMP_ICON_TYPE_ICON_NAME, (const guint8 *) "gimp-pattern", strlen ("gimp-pattern") + 1); gimp_plug_in_procedure_set_image_types (proc, NULL); gimp_plug_in_procedure_set_file_proc (proc, "pat", "", "20,string,GPAT"); gimp_plug_in_procedure_set_mime_types (proc, "image/gimp-x-pat"); gimp_plug_in_procedure_set_handles_uri (proc); gimp_object_set_static_name (GIMP_OBJECT (procedure), "file-pat-load"); gimp_procedure_set_static_strings (procedure, "file-pat-load", "Loads GIMP patterns", "Loads GIMP patterns", "Tim Newsome, Michael Natterer", "Tim Newsome, Michael Natterer", "1997-2019", NULL); gimp_procedure_add_argument (procedure, gimp_param_spec_int32 ("dummy-param", "Dummy Param", "Dummy parameter", G_MININT32, G_MAXINT32, 0, GIMP_PARAM_READWRITE)); gimp_procedure_add_argument (procedure, gimp_param_spec_string ("uri", "URI", "The URI of the file " "to load", TRUE, FALSE, TRUE, NULL, GIMP_PARAM_READWRITE)); gimp_procedure_add_argument (procedure, gimp_param_spec_string ("raw-uri", "Raw URI", "The URI of the file " "to load", TRUE, FALSE, TRUE, NULL, GIMP_PARAM_READWRITE)); gimp_procedure_add_return_value (procedure, gimp_param_spec_image_id ("image", "Image", "Output image", gimp, FALSE, GIMP_PARAM_READWRITE)); gimp_plug_in_manager_add_procedure (gimp->plug_in_manager, proc); g_object_unref (procedure); /* file-pat-save-internal */ file = g_file_new_for_path ("file-pat-save-internal"); procedure = gimp_plug_in_procedure_new (GIMP_PLUGIN, file); g_object_unref (file); procedure->proc_type = GIMP_INTERNAL; procedure->marshal_func = file_pat_save_invoker; proc = GIMP_PLUG_IN_PROCEDURE (procedure); proc->menu_label = g_strdup (N_("GIMP pattern")); gimp_plug_in_procedure_set_icon (proc, GIMP_ICON_TYPE_ICON_NAME, (const guint8 *) "gimp-pattern", strlen ("gimp-pattern") + 1); #if 0 /* do not register as file procedure */ gimp_plug_in_procedure_set_image_types (proc, "RGB*, GRAY*, INDEXED*"); gimp_plug_in_procedure_set_file_proc (proc, "pat", "", NULL); gimp_plug_in_procedure_set_mime_types (proc, "image/x-gimp-pat"); gimp_plug_in_procedure_set_handles_uri (proc); #endif gimp_object_set_static_name (GIMP_OBJECT (procedure), "file-pat-save-internal"); gimp_procedure_set_static_strings (procedure, "file-pat-save-internal", "Exports Gimp pattern file (.PAT)", "Exports Gimp pattern file (.PAT)", "Tim Newsome, Michael Natterer", "Tim Newsome, Michael Natterer", "1995-2019", NULL); gimp_procedure_add_argument (procedure, gimp_param_spec_int32 ("dummy-param", "Dummy Param", "Dummy parameter", G_MININT32, G_MAXINT32, 0, GIMP_PARAM_READWRITE)); gimp_procedure_add_argument (procedure, gimp_param_spec_image_id ("image", "Image", "Input image", gimp, FALSE, GIMP_PARAM_READWRITE)); gimp_procedure_add_argument (procedure, gimp_param_spec_drawable_id ("drawable", "Drawable", "Active drawable " "of input image", gimp, FALSE, GIMP_PARAM_READWRITE)); gimp_procedure_add_argument (procedure, gimp_param_spec_string ("uri", "URI", "The URI of the file " "to export", FALSE, FALSE, TRUE, NULL, GIMP_PARAM_READWRITE)); gimp_procedure_add_argument (procedure, gimp_param_spec_string ("raw-uri", "Raw URI", "The URI of the file " "to export", FALSE, FALSE, TRUE, NULL, GIMP_PARAM_READWRITE)); gimp_procedure_add_argument (procedure, gimp_param_spec_string ("name", "name", "The name of the " "pattern", FALSE, FALSE, TRUE, "GIMP Pattern", GIMP_PARAM_READWRITE)); gimp_plug_in_manager_add_procedure (gimp->plug_in_manager, proc); g_object_unref (procedure); /* file-gex-load */ file = g_file_new_for_path ("file-gex-load"); procedure = gimp_plug_in_procedure_new (GIMP_PLUGIN, file); g_object_unref (file); procedure->proc_type = GIMP_INTERNAL; procedure->marshal_func = file_gex_load_invoker; proc = GIMP_PLUG_IN_PROCEDURE (procedure); proc->menu_label = g_strdup (N_("GIMP extension")); gimp_plug_in_procedure_set_icon (proc, GIMP_ICON_TYPE_ICON_NAME, (const guint8 *) "gimp-plugin", strlen ("gimp-plugin") + 1); gimp_plug_in_procedure_set_file_proc (proc, "gex", "", "20, string, GIMP"); gimp_plug_in_procedure_set_generic_file_proc (proc, TRUE); gimp_plug_in_procedure_set_mime_types (proc, "image/gimp-x-gex"); gimp_plug_in_procedure_set_handles_uri (proc); gimp_object_set_static_name (GIMP_OBJECT (procedure), "file-gex-load"); gimp_procedure_set_static_strings (procedure, "file-gex-load", "Loads GIMP extension", "Loads GIMP extension", "Jehan", "Jehan", "2019", NULL); gimp_procedure_add_argument (procedure, gimp_param_spec_int32 ("dummy-param", "Dummy Param", "Dummy parameter", G_MININT32, G_MAXINT32, 0, GIMP_PARAM_READWRITE)); gimp_procedure_add_argument (procedure, gimp_param_spec_string ("uri", "URI", "The URI of the file " "to load", TRUE, FALSE, TRUE, NULL, GIMP_PARAM_READWRITE)); gimp_procedure_add_argument (procedure, gimp_param_spec_string ("raw-uri", "Raw URI", "The URI of the file " "to load", TRUE, FALSE, TRUE, NULL, GIMP_PARAM_READWRITE)); gimp_procedure_add_return_value (procedure, gimp_param_spec_string ("extension-id", "ID of installed extension", "Identifier of the newly installed extension", FALSE, TRUE, FALSE, NULL, GIMP_PARAM_READWRITE)); gimp_plug_in_manager_add_procedure (gimp->plug_in_manager, proc); g_object_unref (procedure); }