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

« back to all changes in this revision

Viewing changes to app/tools/gimprectangletool.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_RECTANGLE_TOOL_H__
 
20
#define  __GIMP_RECTANGLE_TOOL_H__
 
21
 
 
22
 
 
23
typedef enum
 
24
{
 
25
  GIMP_RECTANGLE_TOOL_PROP_0,
 
26
  GIMP_RECTANGLE_TOOL_PROP_X1,
 
27
  GIMP_RECTANGLE_TOOL_PROP_Y1,
 
28
  GIMP_RECTANGLE_TOOL_PROP_X2,
 
29
  GIMP_RECTANGLE_TOOL_PROP_Y2,
 
30
  GIMP_RECTANGLE_TOOL_PROP_CONSTRAINT,
 
31
  GIMP_RECTANGLE_TOOL_PROP_LAST = GIMP_RECTANGLE_TOOL_PROP_CONSTRAINT
 
32
} GimpRectangleToolProp;
 
33
 
 
34
 
 
35
/*  possible functions  */
 
36
typedef enum
 
37
{
 
38
  RECT_INACTIVE,
 
39
  RECT_CREATING,
 
40
  RECT_MOVING,
 
41
  RECT_RESIZING_UPPER_LEFT,
 
42
  RECT_RESIZING_UPPER_RIGHT,
 
43
  RECT_RESIZING_LOWER_LEFT,
 
44
  RECT_RESIZING_LOWER_RIGHT,
 
45
  RECT_RESIZING_LEFT,
 
46
  RECT_RESIZING_RIGHT,
 
47
  RECT_RESIZING_TOP,
 
48
  RECT_RESIZING_BOTTOM,
 
49
  RECT_EXECUTING
 
50
} GimpRectangleFunction;
 
51
 
 
52
 
 
53
#define GIMP_TYPE_RECTANGLE_TOOL               (gimp_rectangle_tool_interface_get_type ())
 
54
#define GIMP_IS_RECTANGLE_TOOL(obj)            (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_RECTANGLE_TOOL))
 
55
#define GIMP_RECTANGLE_TOOL(obj)               (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_RECTANGLE_TOOL, GimpRectangleTool))
 
56
#define GIMP_RECTANGLE_TOOL_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GIMP_TYPE_RECTANGLE_TOOL, GimpRectangleToolInterface))
 
57
 
 
58
#define GIMP_RECTANGLE_TOOL_GET_OPTIONS(t)     (GIMP_RECTANGLE_OPTIONS (gimp_tool_get_options (GIMP_TOOL (t))))
 
59
 
 
60
 
 
61
typedef struct _GimpRectangleTool          GimpRectangleTool;
 
62
typedef struct _GimpRectangleToolInterface GimpRectangleToolInterface;
 
63
 
 
64
struct _GimpRectangleToolInterface
 
65
{
 
66
  GTypeInterface base_iface;
 
67
 
 
68
  /*  virtual functions  */
 
69
  gboolean (* execute)           (GimpRectangleTool *rect_tool,
 
70
                                  gint               x,
 
71
                                  gint               y,
 
72
                                  gint               w,
 
73
                                  gint               h);
 
74
  void     (* cancel)            (GimpRectangleTool *rect_tool);
 
75
 
 
76
  /*  signals  */
 
77
  gboolean (* rectangle_changed) (GimpRectangleTool *rect_tool);
 
78
};
 
79
 
 
80
 
 
81
GType       gimp_rectangle_tool_interface_get_type  (void) G_GNUC_CONST;
 
82
 
 
83
void        gimp_rectangle_tool_constructor         (GObject                 *object);
 
84
 
 
85
void        gimp_rectangle_tool_control             (GimpTool                *tool,
 
86
                                                     GimpToolAction           action,
 
87
                                                     GimpDisplay             *display);
 
88
void        gimp_rectangle_tool_button_press        (GimpTool                *tool,
 
89
                                                     GimpCoords              *coords,
 
90
                                                     guint32                  time,
 
91
                                                     GdkModifierType          state,
 
92
                                                     GimpDisplay             *display);
 
93
void        gimp_rectangle_tool_button_release      (GimpTool                *tool,
 
94
                                                     GimpCoords              *coords,
 
95
                                                     guint32                  time,
 
96
                                                     GdkModifierType          state,
 
97
                                                     GimpButtonReleaseType    release_type,
 
98
                                                     GimpDisplay             *display);
 
99
void        gimp_rectangle_tool_motion              (GimpTool                *tool,
 
100
                                                     GimpCoords              *coords,
 
101
                                                     guint32                  time,
 
102
                                                     GdkModifierType          state,
 
103
                                                     GimpDisplay             *display);
 
104
gboolean    gimp_rectangle_tool_key_press           (GimpTool                *tool,
 
105
                                                     GdkEventKey             *kevent,
 
106
                                                     GimpDisplay             *display);
 
107
void        gimp_rectangle_tool_active_modifier_key (GimpTool                *tool,
 
108
                                                     GdkModifierType          key,
 
109
                                                     gboolean                 press,
 
110
                                                     GdkModifierType          state,
 
111
                                                     GimpDisplay             *display);
 
112
void        gimp_rectangle_tool_oper_update         (GimpTool                *tool,
 
113
                                                     GimpCoords              *coords,
 
114
                                                     GdkModifierType          state,
 
115
                                                     gboolean                 proximity,
 
116
                                                     GimpDisplay             *display);
 
117
void        gimp_rectangle_tool_cursor_update       (GimpTool                *tool,
 
118
                                                     GimpCoords              *coords,
 
119
                                                     GdkModifierType          state,
 
120
                                                     GimpDisplay             *display);
 
121
void        gimp_rectangle_tool_draw                (GimpDrawTool            *draw);
 
122
gboolean    gimp_rectangle_tool_execute             (GimpRectangleTool       *rect_tool);
 
123
void        gimp_rectangle_tool_cancel              (GimpRectangleTool       *rect_tool);
 
124
void        gimp_rectangle_tool_configure           (GimpRectangleTool       *rectangle);
 
125
void        gimp_rectangle_tool_set_constraint      (GimpRectangleTool       *rectangle,
 
126
                                                     GimpRectangleConstraint  constraint);
 
127
GimpRectangleFunction gimp_rectangle_tool_get_function (GimpRectangleTool    *rectangle);
 
128
void        gimp_rectangle_tool_set_function        (GimpRectangleTool       *rectangle,
 
129
                                                     GimpRectangleFunction    function);
 
130
void        gimp_rectangle_tool_get_press_coords    (GimpRectangleTool       *rectangle,
 
131
                                                     gint                    *pressx_ptr,
 
132
                                                     gint                    *pressy_ptr);
 
133
 
 
134
 
 
135
/*  convenience functions  */
 
136
 
 
137
void        gimp_rectangle_tool_install_properties  (GObjectClass *klass);
 
138
void        gimp_rectangle_tool_set_property        (GObject      *object,
 
139
                                                     guint         property_id,
 
140
                                                     const GValue *value,
 
141
                                                     GParamSpec   *pspec);
 
142
void        gimp_rectangle_tool_get_property        (GObject      *object,
 
143
                                                     guint         property_id,
 
144
                                                     GValue       *value,
 
145
                                                     GParamSpec   *pspec);
 
146
 
 
147
 
 
148
#endif  /*  __GIMP_RECTANGLE_TOOL_H__  */