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

« back to all changes in this revision

Viewing changes to app/plug-in/gimpplugin.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
 * gimpplugin.h
 
5
 *
 
6
 * This program is free software; you can redistribute it and/or modify
 
7
 * it under the terms of the GNU General Public License as published by
 
8
 * the Free Software Foundation; either version 2 of the License, or
 
9
 * (at your option) any later version.
 
10
 *
 
11
 * This program is distributed in the hope that it will be useful,
 
12
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
14
 * GNU General Public License for more details.
 
15
 *
 
16
 * You should have received a copy of the GNU General Public License
 
17
 * along with this program; if not, write to the Free Software
 
18
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
19
 */
 
20
 
 
21
#ifndef __GIMP_PLUG_IN_H__
 
22
#define __GIMP_PLUG_IN_H__
 
23
 
 
24
 
 
25
#include "core/gimpobject.h"
 
26
#include "gimppluginprocframe.h"
 
27
 
 
28
 
 
29
#define WRITE_BUFFER_SIZE  512
 
30
 
 
31
 
 
32
#define GIMP_TYPE_PLUG_IN            (gimp_plug_in_get_type ())
 
33
#define GIMP_PLUG_IN(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_PLUG_IN, GimpPlugIn))
 
34
#define GIMP_PLUG_IN_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_PLUG_IN, GimpPlugInClass))
 
35
#define GIMP_IS_PLUG_IN(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_PLUG_IN))
 
36
#define GIMP_IS_PLUG_IN_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_PLUG_IN))
 
37
 
 
38
 
 
39
typedef struct _GimpPlugInClass GimpPlugInClass;
 
40
 
 
41
struct _GimpPlugIn
 
42
{
 
43
  GimpObject           parent_instance;
 
44
 
 
45
  GimpPlugInManager   *manager;
 
46
  gchar               *prog;            /*  Plug-in's full path name          */
 
47
 
 
48
  GimpPlugInCallMode   call_mode;       /*  QUERY, INIT or RUN                */
 
49
  guint                open : 1;        /*  Is the plug-in open?              */
 
50
  GPid                 pid;             /*  Plug-in's process id              */
 
51
 
 
52
  GIOChannel          *my_read;         /*  App's read and write channels     */
 
53
  GIOChannel          *my_write;
 
54
  GIOChannel          *his_read;        /*  Plug-in's read and write channels */
 
55
  GIOChannel          *his_write;
 
56
 
 
57
  guint                input_id;        /*  Id of input proc                  */
 
58
 
 
59
  gchar                write_buffer[WRITE_BUFFER_SIZE]; /* Buffer for writing */
 
60
  gint                 write_buffer_index;              /* Buffer index       */
 
61
 
 
62
  GSList              *temp_procedures; /*  Temporary procedures              */
 
63
 
 
64
  GMainLoop           *ext_main_loop;   /*  for waiting for extension_ack     */
 
65
 
 
66
  GimpPlugInProcFrame  main_proc_frame;
 
67
 
 
68
  GList               *temp_proc_frames;
 
69
 
 
70
  GimpPlugInDef       *plug_in_def;     /*  Valid during query() and init()   */
 
71
};
 
72
 
 
73
struct _GimpPlugInClass
 
74
{
 
75
  GimpObjectClass  parent_class;
 
76
};
 
77
 
 
78
 
 
79
GType         gimp_plug_in_get_type         (void) G_GNUC_CONST;
 
80
 
 
81
GimpPlugIn  * gimp_plug_in_new              (GimpPlugInManager      *manager,
 
82
                                             GimpContext            *context,
 
83
                                             GimpProgress           *progress,
 
84
                                             GimpPlugInProcedure    *procedure,
 
85
                                             const gchar            *prog);
 
86
 
 
87
gboolean      gimp_plug_in_open             (GimpPlugIn             *plug_in,
 
88
                                             GimpPlugInCallMode      call_mode,
 
89
                                             gboolean                synchronous);
 
90
void          gimp_plug_in_close            (GimpPlugIn             *plug_in,
 
91
                                             gboolean                kill_it);
 
92
 
 
93
GimpPlugInProcFrame *
 
94
              gimp_plug_in_get_proc_frame   (GimpPlugIn             *plug_in);
 
95
 
 
96
GimpPlugInProcFrame *
 
97
              gimp_plug_in_proc_frame_push  (GimpPlugIn             *plug_in,
 
98
                                             GimpContext            *context,
 
99
                                             GimpProgress           *progress,
 
100
                                             GimpTemporaryProcedure *procedure);
 
101
void          gimp_plug_in_proc_frame_pop   (GimpPlugIn             *plug_in);
 
102
 
 
103
void          gimp_plug_in_main_loop        (GimpPlugIn             *plug_in);
 
104
void          gimp_plug_in_main_loop_quit   (GimpPlugIn             *plug_in);
 
105
 
 
106
const gchar * gimp_plug_in_get_undo_desc    (GimpPlugIn             *plug_in);
 
107
 
 
108
gboolean      gimp_plug_in_menu_register    (GimpPlugIn             *plug_in,
 
109
                                             const gchar            *proc_name,
 
110
                                             const gchar            *menu_path);
 
111
 
 
112
void          gimp_plug_in_add_temp_proc    (GimpPlugIn             *plug_in,
 
113
                                             GimpTemporaryProcedure *procedure);
 
114
void          gimp_plug_in_remove_temp_proc (GimpPlugIn             *plug_in,
 
115
                                             GimpTemporaryProcedure *procedure);
 
116
 
 
117
 
 
118
#endif /* __GIMP_PLUG_IN_H__ */