1
/* The GIMP -- an image manipulation program
2
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
4
* This program is free software; you can redistribute it and/or modify
5
* it under the terms of the GNU General Public License as published by
6
* the Free Software Foundation; either version 2 of the License, or
7
* (at your option) any later version.
9
* This program is distributed in the hope that it will be useful,
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
* GNU General Public License for more details.
14
* You should have received a copy of the GNU General Public License
15
* along with this program; if not, write to the Free Software
16
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19
#ifndef __PROCEDURAL_DB_H__
20
#define __PROCEDURAL_DB_H__
25
GimpPDBArgType arg_type; /* argument type */
29
gint32 pdb_int; /* Integer type */
30
gdouble pdb_float; /* Floating point type */
31
gpointer pdb_pointer; /* Pointer type */
32
GimpRGB pdb_color; /* Color type */
37
/* Argument marshalling procedures */
38
typedef Argument * (* ArgMarshal) (Gimp *gimp,
40
GimpProgress *progress,
45
typedef struct _IntExec IntExec;
46
typedef struct _PlugInExec PlugInExec;
47
typedef struct _ExtExec ExtExec;
48
typedef struct _TempExec TempExec;
49
typedef struct _NetExec NetExec;
54
ArgMarshal marshal_func; /* Function called to marshal arguments */
59
gchar *filename; /* Where is the executable on disk? */
64
gchar *filename; /* Where is the executable on disk? */
69
void *plug_in; /* Plug-in that registered this temp proc */
74
gchar *host; /* Host responsible for procedure execution */
75
gint32 port; /* Port on host to send data to */
79
/* Structure for a procedure argument */
83
GimpPDBArgType arg_type; /* Argument type (int, char, char *, etc) */
84
gchar *name; /* Argument name */
85
gchar *description; /* Argument description */
89
/* Structure for a procedure */
93
/* Procedure information */
94
gchar *name; /* Procedure name */
95
gchar *blurb; /* Short procedure description */
96
gchar *help; /* Detailed help instructions */
97
gchar *author; /* Author field */
98
gchar *copyright; /* Copyright field */
99
gchar *date; /* Date field */
101
gchar *deprecated; /* Replacement if the procedure is deprecated */
104
GimpPDBProcType proc_type; /* Type of procedure--Internal, Plug-In, Extension */
106
/* Input arguments */
107
gint32 num_args; /* Number of procedure arguments */
108
ProcArg *args; /* Array of procedure arguments */
111
gint32 num_values; /* Number of return values */
112
ProcArg *values; /* Array of return values */
114
/* Method of procedure execution */
117
IntExec internal; /* Execution information for internal procs */
118
PlugInExec plug_in; /* ..................... for plug-ins */
119
ExtExec extension; /* ..................... for extensions */
120
TempExec temporary; /* ..................... for temp procs */
127
void procedural_db_init (Gimp *gimp);
128
void procedural_db_free (Gimp *gimp);
130
void procedural_db_init_procs (Gimp *gimp,
131
GimpInitStatusFunc status_callback);
133
void procedural_db_register (Gimp *gimp,
134
ProcRecord *procedure);
135
void procedural_db_unregister (Gimp *gimp,
137
ProcRecord * procedural_db_lookup (Gimp *gimp,
140
Argument * procedural_db_execute (Gimp *gimp,
141
GimpContext *context,
142
GimpProgress *progress,
145
Argument * procedural_db_run_proc (Gimp *gimp,
146
GimpContext *context,
147
GimpProgress *progress,
152
Argument * procedural_db_return_args (ProcRecord *procedure,
154
void procedural_db_destroy_args (Argument *args,
157
void procedural_db_free_data (Gimp *gimp);
158
void procedural_db_set_data (Gimp *gimp,
159
const gchar *identifier,
162
const guint8 * procedural_db_get_data (Gimp *gimp,
163
const gchar *identifier,
167
/* "type" should really be a GimpPDBArgType, but we can cope with
168
* out-of-range values.
170
const gchar * pdb_type_name (gint type); /* really exists in _cmds.c file */
173
#endif /* __PROCEDURAL_DB_H__ */