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

« back to all changes in this revision

Viewing changes to app/plug-in/gimppluginprocedure.h

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Holbach
  • Date: 2007-05-02 16:33:03 UTC
  • mto: This revision was merged to the branch mainline in revision 12.
  • Revision ID: james.westby@ubuntu.com-20070502163303-6wchheivjxgjtlna
Tags: upstream-2.3.16
ImportĀ upstreamĀ versionĀ 2.3.16

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
 * gimppluginprocedure.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_PROCEDURE_H__
 
22
#define __GIMP_PLUG_IN_PROCEDURE_H__
 
23
 
 
24
#include <time.h>      /* time_t */
 
25
 
 
26
#include <gdk-pixbuf/gdk-pixbuf.h>
 
27
 
 
28
#include "pdb/gimpprocedure.h"
 
29
 
 
30
 
 
31
#define GIMP_TYPE_PLUG_IN_PROCEDURE            (gimp_plug_in_procedure_get_type ())
 
32
#define GIMP_PLUG_IN_PROCEDURE(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_PLUG_IN_PROCEDURE, GimpPlugInProcedure))
 
33
#define GIMP_PLUG_IN_PROCEDURE_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_PLUG_IN_PROCEDURE, GimpPlugInProcedureClass))
 
34
#define GIMP_IS_PLUG_IN_PROCEDURE(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_PLUG_IN_PROCEDURE))
 
35
#define GIMP_IS_PLUG_IN_PROCEDURE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_PLUG_IN_PROCEDURE))
 
36
#define GIMP_PLUG_IN_PROCEDURE_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_PLUG_IN_PROCEDURE, GimpPlugInProcedureClass))
 
37
 
 
38
 
 
39
typedef struct _GimpPlugInProcedureClass GimpPlugInProcedureClass;
 
40
 
 
41
struct _GimpPlugInProcedure
 
42
{
 
43
  GimpProcedure        parent_instance;
 
44
 
 
45
  /*  common members  */
 
46
  gchar               *prog;
 
47
  GQuark               locale_domain;
 
48
  GQuark               help_domain;
 
49
  gchar               *menu_label;
 
50
  GList               *menu_paths;
 
51
  gchar               *label;
 
52
  GimpIconType         icon_type;
 
53
  gint                 icon_data_length;
 
54
  guint8              *icon_data;
 
55
  gchar               *image_types;
 
56
  GimpPlugInImageType  image_types_val;
 
57
  time_t               mtime;
 
58
  gboolean             installed_during_init;
 
59
 
 
60
  /*  file proc specific members  */
 
61
  gboolean             file_proc;
 
62
  gchar               *extensions;
 
63
  gchar               *prefixes;
 
64
  gchar               *magics;
 
65
  gchar               *mime_type;
 
66
  GSList              *extensions_list;
 
67
  GSList              *prefixes_list;
 
68
  GSList              *magics_list;
 
69
  gchar               *thumb_loader;
 
70
};
 
71
 
 
72
struct _GimpPlugInProcedureClass
 
73
{
 
74
  GimpProcedureClass parent_class;
 
75
 
 
76
  /*  virtual functions  */
 
77
  const gchar * (* get_progname)    (const GimpPlugInProcedure *procedure);
 
78
 
 
79
  /*  signals  */
 
80
  void          (* menu_path_added) (GimpPlugInProcedure       *procedure,
 
81
                                     const gchar               *menu_path);
 
82
};
 
83
 
 
84
 
 
85
GType           gimp_plug_in_procedure_get_type      (void) G_GNUC_CONST;
 
86
 
 
87
GimpProcedure * gimp_plug_in_procedure_new           (GimpPDBProcType            proc_type,
 
88
                                                      const gchar               *prog);
 
89
 
 
90
GimpPlugInProcedure * gimp_plug_in_procedure_find    (GSList                    *list,
 
91
                                                      const gchar               *proc_name);
 
92
 
 
93
const gchar * gimp_plug_in_procedure_get_progname    (const GimpPlugInProcedure *proc);
 
94
 
 
95
void          gimp_plug_in_procedure_set_locale_domain (GimpPlugInProcedure     *proc,
 
96
                                                        const gchar             *locale_domain);
 
97
const gchar * gimp_plug_in_procedure_get_locale_domain (const GimpPlugInProcedure *proc);
 
98
 
 
99
void          gimp_plug_in_procedure_set_help_domain (GimpPlugInProcedure       *proc,
 
100
                                                      const gchar               *help_domain);
 
101
const gchar * gimp_plug_in_procedure_get_help_domain (const GimpPlugInProcedure *proc);
 
102
 
 
103
gboolean      gimp_plug_in_procedure_add_menu_path   (GimpPlugInProcedure       *proc,
 
104
                                                      const gchar               *menu_path,
 
105
                                                      GError                   **error);
 
106
 
 
107
const gchar * gimp_plug_in_procedure_get_label       (GimpPlugInProcedure       *proc);
 
108
const gchar * gimp_plug_in_procedure_get_blurb       (const GimpPlugInProcedure *proc);
 
109
 
 
110
void          gimp_plug_in_procedure_set_icon        (GimpPlugInProcedure       *proc,
 
111
                                                      GimpIconType               type,
 
112
                                                      const guint8              *data,
 
113
                                                      gint                       data_length);
 
114
const gchar * gimp_plug_in_procedure_get_stock_id    (const GimpPlugInProcedure *proc);
 
115
GdkPixbuf   * gimp_plug_in_procedure_get_pixbuf      (const GimpPlugInProcedure *proc);
 
116
 
 
117
gchar       * gimp_plug_in_procedure_get_help_id     (const GimpPlugInProcedure *proc);
 
118
 
 
119
gboolean      gimp_plug_in_procedure_get_sensitive   (const GimpPlugInProcedure *proc,
 
120
                                                      GimpImageType              image_type);
 
121
 
 
122
void          gimp_plug_in_procedure_set_image_types (GimpPlugInProcedure       *proc,
 
123
                                                      const gchar               *image_types);
 
124
void          gimp_plug_in_procedure_set_file_proc   (GimpPlugInProcedure       *proc,
 
125
                                                      const gchar               *extensions,
 
126
                                                      const gchar               *prefixes,
 
127
                                                      const gchar               *magics);
 
128
void          gimp_plug_in_procedure_set_mime_type   (GimpPlugInProcedure       *proc,
 
129
                                                      const gchar               *mime_ype);
 
130
void          gimp_plug_in_procedure_set_thumb_loader(GimpPlugInProcedure       *proc,
 
131
                                                      const gchar               *thumbnailer);
 
132
 
 
133
 
 
134
#endif /* __GIMP_PLUG_IN_PROCEDURE_H__ */