2000-05-31 13:24:14 +00:00
|
|
|
/* LIBGIMP - The GIMP Library
|
2000-06-01 21:18:04 +00:00
|
|
|
* Copyright (C) 1995-2000 Peter Mattis and Spencer Kimball
|
2000-05-31 13:24:14 +00:00
|
|
|
*
|
|
|
|
* gimpfileops_pdb.c
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
2000-06-01 21:18:04 +00:00
|
|
|
* Lesser General Public License for more details.
|
2000-05-31 13:24:14 +00:00
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library; if not, write to the
|
|
|
|
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
|
|
* Boston, MA 02111-1307, USA.
|
|
|
|
*/
|
|
|
|
|
2000-06-01 21:18:04 +00:00
|
|
|
/* NOTE: This file is autogenerated by pdbgen.pl */
|
2000-05-31 13:24:14 +00:00
|
|
|
|
2000-06-01 21:18:04 +00:00
|
|
|
#include "gimp.h"
|
2000-05-31 13:24:14 +00:00
|
|
|
|
2000-08-24 23:06:53 +00:00
|
|
|
/**
|
|
|
|
* gimp_register_magic_load_handler:
|
|
|
|
* @procedure_name: The name of the procedure to be used for loading.
|
|
|
|
* @extensions: comma separated list of extensions this handler can load (i.e. \"jpg,jpeg\").
|
|
|
|
* @prefixes: comma separated list of prefixes this handler can load (i.e. \"http:,ftp:\").
|
|
|
|
* @magics: comma separated list of magic file information this handler can load (i.e. \"0,string,GIF\").
|
|
|
|
*
|
|
|
|
* 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.
|
|
|
|
*
|
|
|
|
* Returns: TRUE on success.
|
|
|
|
*/
|
2000-08-23 01:44:59 +00:00
|
|
|
gboolean
|
2000-06-01 21:18:04 +00:00
|
|
|
gimp_register_magic_load_handler (gchar *procedure_name,
|
2000-05-31 13:24:14 +00:00
|
|
|
gchar *extensions,
|
|
|
|
gchar *prefixes,
|
|
|
|
gchar *magics)
|
|
|
|
{
|
2000-08-03 01:35:28 +00:00
|
|
|
GimpParam *return_vals;
|
2000-05-31 13:24:14 +00:00
|
|
|
gint nreturn_vals;
|
2000-08-23 01:44:59 +00:00
|
|
|
gboolean success = TRUE;
|
2000-05-31 13:24:14 +00:00
|
|
|
|
|
|
|
return_vals = gimp_run_procedure ("gimp_register_magic_load_handler",
|
|
|
|
&nreturn_vals,
|
2000-08-03 01:35:28 +00:00
|
|
|
GIMP_PDB_STRING, procedure_name,
|
|
|
|
GIMP_PDB_STRING, extensions,
|
|
|
|
GIMP_PDB_STRING, prefixes,
|
|
|
|
GIMP_PDB_STRING, magics,
|
|
|
|
GIMP_PDB_END);
|
2000-05-31 13:24:14 +00:00
|
|
|
|
2000-08-23 01:44:59 +00:00
|
|
|
success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;
|
|
|
|
|
2000-05-31 13:24:14 +00:00
|
|
|
gimp_destroy_params (return_vals, nreturn_vals);
|
2000-08-23 01:44:59 +00:00
|
|
|
|
|
|
|
return success;
|
2000-05-31 13:24:14 +00:00
|
|
|
}
|
|
|
|
|
2000-08-24 23:06:53 +00:00
|
|
|
/**
|
|
|
|
* gimp_register_load_handler:
|
|
|
|
* @procedure_name: The name of the procedure to be used for loading.
|
|
|
|
* @extensions: comma separated list of extensions this handler can load (i.e. \"jpg,jpeg\").
|
|
|
|
* @prefixes: comma separated list of prefixes this handler can load (i.e. \"http:,ftp:\").
|
|
|
|
*
|
|
|
|
* Registers a file load handler procedure.
|
|
|
|
*
|
|
|
|
* Registers a procedural database procedure to be called to load files
|
|
|
|
* of a particular file format.
|
|
|
|
*
|
|
|
|
* Returns: TRUE on success.
|
|
|
|
*/
|
2000-08-23 01:44:59 +00:00
|
|
|
gboolean
|
2000-06-01 21:18:04 +00:00
|
|
|
gimp_register_load_handler (gchar *procedure_name,
|
2000-05-31 13:24:14 +00:00
|
|
|
gchar *extensions,
|
|
|
|
gchar *prefixes)
|
|
|
|
{
|
2000-08-03 01:35:28 +00:00
|
|
|
GimpParam *return_vals;
|
2000-05-31 13:24:14 +00:00
|
|
|
gint nreturn_vals;
|
2000-08-23 01:44:59 +00:00
|
|
|
gboolean success = TRUE;
|
2000-05-31 13:24:14 +00:00
|
|
|
|
|
|
|
return_vals = gimp_run_procedure ("gimp_register_load_handler",
|
|
|
|
&nreturn_vals,
|
2000-08-03 01:35:28 +00:00
|
|
|
GIMP_PDB_STRING, procedure_name,
|
|
|
|
GIMP_PDB_STRING, extensions,
|
|
|
|
GIMP_PDB_STRING, prefixes,
|
|
|
|
GIMP_PDB_END);
|
2000-05-31 13:24:14 +00:00
|
|
|
|
2000-08-23 01:44:59 +00:00
|
|
|
success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;
|
|
|
|
|
2000-05-31 13:24:14 +00:00
|
|
|
gimp_destroy_params (return_vals, nreturn_vals);
|
2000-08-23 01:44:59 +00:00
|
|
|
|
|
|
|
return success;
|
2000-05-31 13:24:14 +00:00
|
|
|
}
|
|
|
|
|
2000-08-24 23:06:53 +00:00
|
|
|
/**
|
|
|
|
* gimp_register_save_handler:
|
|
|
|
* @procedure_name: The name of the procedure to be used for saving.
|
|
|
|
* @extensions: comma separated list of extensions this handler can save (i.e. \"jpg,jpeg\").
|
|
|
|
* @prefixes: comma separated list of prefixes this handler can save (i.e. \"http:,ftp:\").
|
|
|
|
*
|
|
|
|
* Registers a file save handler procedure.
|
|
|
|
*
|
|
|
|
* Registers a procedural database procedure to be called to save files
|
|
|
|
* in a particular file format.
|
|
|
|
*
|
|
|
|
* Returns: TRUE on success.
|
|
|
|
*/
|
2000-08-23 01:44:59 +00:00
|
|
|
gboolean
|
2000-06-01 21:18:04 +00:00
|
|
|
gimp_register_save_handler (gchar *procedure_name,
|
2000-05-31 13:24:14 +00:00
|
|
|
gchar *extensions,
|
|
|
|
gchar *prefixes)
|
|
|
|
{
|
2000-08-03 01:35:28 +00:00
|
|
|
GimpParam *return_vals;
|
2000-05-31 13:24:14 +00:00
|
|
|
gint nreturn_vals;
|
2000-08-23 01:44:59 +00:00
|
|
|
gboolean success = TRUE;
|
2000-05-31 13:24:14 +00:00
|
|
|
|
|
|
|
return_vals = gimp_run_procedure ("gimp_register_save_handler",
|
|
|
|
&nreturn_vals,
|
2000-08-03 01:35:28 +00:00
|
|
|
GIMP_PDB_STRING, procedure_name,
|
|
|
|
GIMP_PDB_STRING, extensions,
|
|
|
|
GIMP_PDB_STRING, prefixes,
|
|
|
|
GIMP_PDB_END);
|
2000-05-31 13:24:14 +00:00
|
|
|
|
2000-08-23 01:44:59 +00:00
|
|
|
success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;
|
|
|
|
|
2000-05-31 13:24:14 +00:00
|
|
|
gimp_destroy_params (return_vals, nreturn_vals);
|
2000-08-23 01:44:59 +00:00
|
|
|
|
|
|
|
return success;
|
2000-05-31 13:24:14 +00:00
|
|
|
}
|