~ubuntu-branches/ubuntu/jaunty/gimp/jaunty-security

« back to all changes in this revision

Viewing changes to app/pdb/gimpprocedure.h

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Holbach
  • Date: 2007-05-02 16:33:03 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20070502163303-bvzhjzbpw8qglc4y
Tags: 2.3.16-1ubuntu1
* Resynchronized with Debian, remaining Ubuntu changes:
  - debian/rules: i18n magic.
* debian/control.in:
  - Maintainer: Ubuntu Core Developers <ubuntu-devel@lists.ubuntu.com>
* debian/patches/02_help-message.patch,
  debian/patches/03_gimp.desktop.in.in.patch,
  debian/patches/10_dont_show_wizard.patch: updated.
* debian/patches/04_composite-signedness.patch,
  debian/patches/05_add-letter-spacing.patch: dropped, used upstream.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* GIMP - The GNU Image Manipulation Program
 
2
 * Copyright (C) 1995 Spencer Kimball and Peter Mattis
 
3
 *
 
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.
 
8
 *
 
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.
 
13
 *
 
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.
 
17
 */
 
18
 
 
19
#ifndef __GIMP_PROCEDURE_H__
 
20
#define __GIMP_PROCEDURE_H__
 
21
 
 
22
 
 
23
#include "core/gimpobject.h"
 
24
 
 
25
 
 
26
typedef GValueArray * (* GimpMarshalFunc) (GimpProcedure     *procedure,
 
27
                                           Gimp              *gimp,
 
28
                                           GimpContext       *context,
 
29
                                           GimpProgress      *progress,
 
30
                                           const GValueArray *args);
 
31
 
 
32
 
 
33
#define GIMP_TYPE_PROCEDURE            (gimp_procedure_get_type ())
 
34
#define GIMP_PROCEDURE(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_PROCEDURE, GimpProcedure))
 
35
#define GIMP_PROCEDURE_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_PROCEDURE, GimpProcedureClass))
 
36
#define GIMP_IS_PROCEDURE(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_PROCEDURE))
 
37
#define GIMP_IS_PROCEDURE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_PROCEDURE))
 
38
#define GIMP_PROCEDURE_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_PROCEDURE, GimpProcedureClass))
 
39
 
 
40
 
 
41
typedef struct _GimpProcedureClass GimpProcedureClass;
 
42
 
 
43
struct _GimpProcedure
 
44
{
 
45
  GimpObject        parent_instance;
 
46
 
 
47
  GimpPDBProcType   proc_type;      /* Type of procedure              */
 
48
 
 
49
  gboolean          static_strings; /* Are the strings allocated?     */
 
50
 
 
51
  gchar            *original_name;  /* Uncanonicalized procedure name */
 
52
  gchar            *blurb;          /* Short procedure description    */
 
53
  gchar            *help;           /* Detailed help instructions     */
 
54
  gchar            *author;         /* Author field                   */
 
55
  gchar            *copyright;      /* Copyright field                */
 
56
  gchar            *date;           /* Date field                     */
 
57
  gchar            *deprecated;     /* Replacement if deprecated      */
 
58
 
 
59
  gint32            num_args;       /* Number of procedure arguments  */
 
60
  GParamSpec      **args;           /* Array of procedure arguments   */
 
61
 
 
62
  gint32            num_values;     /* Number of return values        */
 
63
  GParamSpec      **values;         /* Array of return values         */
 
64
 
 
65
  GimpMarshalFunc   marshal_func;   /* Marshaller for internal procs  */
 
66
};
 
67
 
 
68
struct _GimpProcedureClass
 
69
{
 
70
  GimpObjectClass parent_class;
 
71
 
 
72
  GValueArray * (* execute)       (GimpProcedure *procedure,
 
73
                                   Gimp          *gimp,
 
74
                                   GimpContext   *context,
 
75
                                   GimpProgress  *progress,
 
76
                                   GValueArray   *args);
 
77
  void          (* execute_async) (GimpProcedure *procedure,
 
78
                                   Gimp          *gimp,
 
79
                                   GimpContext   *context,
 
80
                                   GimpProgress  *progress,
 
81
                                   GValueArray   *args,
 
82
                                   GimpObject    *display);
 
83
};
 
84
 
 
85
 
 
86
GType           gimp_procedure_get_type           (void) G_GNUC_CONST;
 
87
 
 
88
GimpProcedure * gimp_procedure_new                (GimpMarshalFunc   marshal_func);
 
89
 
 
90
void            gimp_procedure_set_strings        (GimpProcedure    *procedure,
 
91
                                                   gchar            *original_name,
 
92
                                                   gchar            *blurb,
 
93
                                                   gchar            *help,
 
94
                                                   gchar            *author,
 
95
                                                   gchar            *copyright,
 
96
                                                   gchar            *date,
 
97
                                                   gchar            *deprecated);
 
98
void            gimp_procedure_set_static_strings (GimpProcedure    *procedure,
 
99
                                                   gchar            *original_name,
 
100
                                                   gchar            *blurb,
 
101
                                                   gchar            *help,
 
102
                                                   gchar            *author,
 
103
                                                   gchar            *copyright,
 
104
                                                   gchar            *date,
 
105
                                                   gchar            *deprecated);
 
106
void            gimp_procedure_take_strings       (GimpProcedure    *procedure,
 
107
                                                   gchar            *original_name,
 
108
                                                   gchar            *blurb,
 
109
                                                   gchar            *help,
 
110
                                                   gchar            *author,
 
111
                                                   gchar            *copyright,
 
112
                                                   gchar            *date,
 
113
                                                   gchar            *deprecated);
 
114
 
 
115
void            gimp_procedure_add_argument       (GimpProcedure    *procedure,
 
116
                                                   GParamSpec       *pspec);
 
117
void            gimp_procedure_add_return_value   (GimpProcedure    *procedure,
 
118
                                                   GParamSpec       *pspec);
 
119
 
 
120
GValueArray   * gimp_procedure_get_arguments      (GimpProcedure    *procedure);
 
121
GValueArray   * gimp_procedure_get_return_values  (GimpProcedure    *procedure,
 
122
                                                   gboolean          success);
 
123
 
 
124
GValueArray   * gimp_procedure_execute            (GimpProcedure    *procedure,
 
125
                                                   Gimp             *gimp,
 
126
                                                   GimpContext      *context,
 
127
                                                   GimpProgress     *progress,
 
128
                                                   GValueArray      *args);
 
129
void            gimp_procedure_execute_async      (GimpProcedure    *procedure,
 
130
                                                   Gimp             *gimp,
 
131
                                                   GimpContext      *context,
 
132
                                                   GimpProgress     *progress,
 
133
                                                   GValueArray      *args,
 
134
                                                   GimpObject       *display);
 
135
 
 
136
 
 
137
#endif  /*  __GIMP_PROCEDURE_H__  */