2006-12-10 05:33:38 +08:00
|
|
|
/* GIMP - The GNU Image Manipulation Program
|
2001-08-17 22:27:31 +08:00
|
|
|
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
|
|
|
*
|
2009-01-18 06:28:01 +08:00
|
|
|
* This program is free software: you can redistribute it and/or modify
|
2001-08-17 22:27:31 +08:00
|
|
|
* it under the terms of the GNU General Public License as published by
|
2009-01-18 06:28:01 +08:00
|
|
|
* the Free Software Foundation; either version 3 of the License, or
|
2001-08-17 22:27:31 +08:00
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program 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 General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
2009-01-18 06:28:01 +08:00
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
2001-08-17 22:27:31 +08:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __PDB_TYPES_H__
|
|
|
|
#define __PDB_TYPES_H__
|
|
|
|
|
|
|
|
|
|
|
|
#include "core/core-types.h"
|
|
|
|
|
|
|
|
|
2006-04-26 17:13:47 +08:00
|
|
|
typedef struct _GimpPDB GimpPDB;
|
2006-04-06 18:01:30 +08:00
|
|
|
typedef struct _GimpProcedure GimpProcedure;
|
|
|
|
typedef struct _GimpPlugInProcedure GimpPlugInProcedure;
|
|
|
|
typedef struct _GimpTemporaryProcedure GimpTemporaryProcedure;
|
2001-08-17 22:27:31 +08:00
|
|
|
|
|
|
|
|
2003-12-06 01:08:35 +08:00
|
|
|
typedef enum
|
|
|
|
{
|
|
|
|
GIMP_PDB_COMPAT_OFF,
|
|
|
|
GIMP_PDB_COMPAT_ON,
|
|
|
|
GIMP_PDB_COMPAT_WARN
|
|
|
|
} GimpPDBCompatMode;
|
|
|
|
|
|
|
|
|
2012-11-09 03:46:18 +08:00
|
|
|
typedef enum
|
|
|
|
{
|
2012-11-09 18:17:25 +08:00
|
|
|
GIMP_PDB_ITEM_CONTENT = 1 << 0,
|
|
|
|
GIMP_PDB_ITEM_POSITION = 1 << 1
|
2012-11-09 03:46:18 +08:00
|
|
|
} GimpPDBItemModify;
|
|
|
|
|
|
|
|
|
app, pdb: prevent custom gradient from being renamed
Make internal data objects non-renamable, even if they're writable,
through gimp_data_is_name_editable(). Currently, the only such
object is the custom gradient.
Prevent changing the name of non-renamable data by making the name
entry of GimpDataEditor non-editable whenever
gimp_viewable_is_name_editable() is FALSE, even if the data is
otherwise editable.
Prevent the vairous PDB -rename() functions from renaming non-
renamable data, by adding a GimpPDBDataAccess flags type,
specifying the desired access mode for the data -- any combination
of READ, WRITE, and RENAME -- and replacing the 'writable'
parameter of the gimp_pdb_get_foo() functions with an 'access'
parameter. Change the various .pdb files to use READ where they'd
used FALSE, and WRITE where they'd used TRUE; use RENAME, isntead
of WRITE, in the -rename() functions.
2017-10-31 05:06:31 +08:00
|
|
|
typedef enum
|
|
|
|
{
|
|
|
|
GIMP_PDB_DATA_ACCESS_READ = 0,
|
|
|
|
GIMP_PDB_DATA_ACCESS_WRITE = 1 << 0,
|
|
|
|
GIMP_PDB_DATA_ACCESS_RENAME = 1 << 1
|
|
|
|
} GimpPDBDataAccess;
|
|
|
|
|
|
|
|
|
2001-08-17 22:27:31 +08:00
|
|
|
#endif /* __PDB_TYPES_H__ */
|