2006-12-10 05:33:38 +08:00
|
|
|
/* GIMP - The GNU Image Manipulation Program
|
2002-03-19 23:05:38 +08:00
|
|
|
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
|
|
|
*
|
2009-01-18 06:28:01 +08:00
|
|
|
* This program is free software: you can redistribute it and/or modify
|
2002-03-19 23:05:38 +08:00
|
|
|
* it under the terms of the GNU General Public License as published by
|
2009-01-18 06:28:01 +08:00
|
|
|
* the Free Software Foundation; either version 3 of the License, or
|
2002-03-19 23:05:38 +08:00
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
2009-01-18 06:28:01 +08:00
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
2002-03-19 23:05:38 +08:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __TOOLS_ENUMS_H__
|
|
|
|
#define __TOOLS_ENUMS_H__
|
|
|
|
|
2003-09-26 21:33:54 +08:00
|
|
|
/*
|
2003-10-26 03:00:49 +08:00
|
|
|
* these enums are registered with the type system
|
2002-03-20 03:17:31 +08:00
|
|
|
*/
|
|
|
|
|
2009-06-20 23:37:31 +08:00
|
|
|
#define GIMP_TYPE_BUTTON_PRESS_TYPE (gimp_button_press_type_get_type ())
|
|
|
|
|
|
|
|
GType gimp_button_press_type_get_type (void) G_GNUC_CONST;
|
|
|
|
|
|
|
|
typedef enum
|
|
|
|
{
|
|
|
|
GIMP_BUTTON_PRESS_NORMAL,
|
|
|
|
GIMP_BUTTON_PRESS_DOUBLE,
|
|
|
|
GIMP_BUTTON_PRESS_TRIPLE
|
|
|
|
} GimpButtonPressType;
|
|
|
|
|
|
|
|
|
2007-02-28 02:55:12 +08:00
|
|
|
#define GIMP_TYPE_BUTTON_RELEASE_TYPE (gimp_button_release_type_get_type ())
|
|
|
|
|
|
|
|
GType gimp_button_release_type_get_type (void) G_GNUC_CONST;
|
|
|
|
|
|
|
|
typedef enum
|
|
|
|
{
|
|
|
|
GIMP_BUTTON_RELEASE_NORMAL,
|
|
|
|
GIMP_BUTTON_RELEASE_CANCEL,
|
2007-03-10 23:07:56 +08:00
|
|
|
GIMP_BUTTON_RELEASE_CLICK,
|
|
|
|
GIMP_BUTTON_RELEASE_NO_MOTION
|
2007-02-28 02:55:12 +08:00
|
|
|
} GimpButtonReleaseType;
|
|
|
|
|
|
|
|
|
2006-06-06 02:50:13 +08:00
|
|
|
#define GIMP_TYPE_RECTANGLE_GUIDE (gimp_rectangle_guide_get_type ())
|
|
|
|
|
|
|
|
GType gimp_rectangle_guide_get_type (void) G_GNUC_CONST;
|
|
|
|
|
|
|
|
typedef enum
|
|
|
|
{
|
|
|
|
GIMP_RECTANGLE_GUIDE_NONE, /*< desc="No guides" >*/
|
|
|
|
GIMP_RECTANGLE_GUIDE_CENTER_LINES, /*< desc="Center lines" >*/
|
|
|
|
GIMP_RECTANGLE_GUIDE_THIRDS, /*< desc="Rule of thirds" >*/
|
2009-03-14 20:59:34 +08:00
|
|
|
GIMP_RECTANGLE_GUIDE_GOLDEN, /*< desc="Golden sections" >*/
|
|
|
|
GIMP_RECTANGLE_GUIDE_DIAGONALS /*< desc="Diagonal lines" >*/
|
2006-06-06 02:50:13 +08:00
|
|
|
} GimpRectangleGuide;
|
|
|
|
|
2006-12-14 05:49:09 +08:00
|
|
|
|
|
|
|
#define GIMP_TYPE_RECTANGLE_CONSTRAINT (gimp_rectangle_constraint_get_type ())
|
|
|
|
|
2006-09-07 06:51:54 +08:00
|
|
|
GType gimp_rectangle_constraint_get_type (void) G_GNUC_CONST;
|
|
|
|
|
|
|
|
typedef enum
|
|
|
|
{
|
2006-12-14 05:49:09 +08:00
|
|
|
GIMP_RECTANGLE_CONSTRAIN_NONE,
|
|
|
|
GIMP_RECTANGLE_CONSTRAIN_IMAGE,
|
|
|
|
GIMP_RECTANGLE_CONSTRAIN_DRAWABLE
|
2006-09-07 06:51:54 +08:00
|
|
|
} GimpRectangleConstraint;
|
|
|
|
|
2006-06-06 02:50:13 +08:00
|
|
|
|
2007-11-24 17:09:26 +08:00
|
|
|
#define GIMP_TYPE_RECTANGLE_PRECISION (gimp_rectangle_precision_get_type ())
|
|
|
|
|
|
|
|
GType gimp_rectangle_precision_get_type (void) G_GNUC_CONST;
|
|
|
|
|
|
|
|
typedef enum
|
|
|
|
{
|
|
|
|
GIMP_RECTANGLE_PRECISION_INT,
|
|
|
|
GIMP_RECTANGLE_PRECISION_DOUBLE,
|
|
|
|
} GimpRectanglePrecision;
|
|
|
|
|
|
|
|
|
2007-08-05 04:20:44 +08:00
|
|
|
#define GIMP_TYPE_RECTANGLE_TOOL_FIXED_RULE (gimp_rectangle_tool_fixed_rule_get_type ())
|
|
|
|
|
|
|
|
GType gimp_rectangle_tool_fixed_rule_get_type (void) G_GNUC_CONST;
|
|
|
|
|
|
|
|
typedef enum
|
|
|
|
{
|
|
|
|
GIMP_RECTANGLE_TOOL_FIXED_ASPECT, /*< desc="Aspect ratio" >*/
|
|
|
|
GIMP_RECTANGLE_TOOL_FIXED_WIDTH, /*< desc="Width" >*/
|
|
|
|
GIMP_RECTANGLE_TOOL_FIXED_HEIGHT, /*< desc="Height" >*/
|
|
|
|
GIMP_RECTANGLE_TOOL_FIXED_SIZE, /*< desc="Size" >*/
|
|
|
|
} GimpRectangleToolFixedRule;
|
|
|
|
|
|
|
|
|
2003-01-07 00:25:04 +08:00
|
|
|
#define GIMP_TYPE_RECT_SELECT_MODE (gimp_rect_select_mode_get_type ())
|
|
|
|
|
|
|
|
GType gimp_rect_select_mode_get_type (void) G_GNUC_CONST;
|
|
|
|
|
2003-09-27 00:20:05 +08:00
|
|
|
typedef enum
|
2003-01-07 00:25:04 +08:00
|
|
|
{
|
2004-06-30 23:47:32 +08:00
|
|
|
GIMP_RECT_SELECT_MODE_FREE, /*< desc="Free select" >*/
|
|
|
|
GIMP_RECT_SELECT_MODE_FIXED_SIZE, /*< desc="Fixed size" >*/
|
|
|
|
GIMP_RECT_SELECT_MODE_FIXED_RATIO /*< desc="Fixed aspect ratio" >*/
|
2003-01-07 00:25:04 +08:00
|
|
|
} GimpRectSelectMode;
|
|
|
|
|
|
|
|
|
2003-05-31 07:52:24 +08:00
|
|
|
#define GIMP_TYPE_TRANSFORM_TYPE (gimp_transform_type_get_type ())
|
|
|
|
|
|
|
|
GType gimp_transform_type_get_type (void) G_GNUC_CONST;
|
|
|
|
|
2003-09-27 00:20:05 +08:00
|
|
|
typedef enum
|
2003-05-31 07:52:24 +08:00
|
|
|
{
|
2006-10-04 03:32:41 +08:00
|
|
|
GIMP_TRANSFORM_TYPE_LAYER, /*< desc="Layer" >*/
|
|
|
|
GIMP_TRANSFORM_TYPE_SELECTION, /*< desc="Selection" >*/
|
|
|
|
GIMP_TRANSFORM_TYPE_PATH /*< desc="Path" >*/
|
2003-05-31 07:52:24 +08:00
|
|
|
} GimpTransformType;
|
|
|
|
|
|
|
|
|
2004-07-03 05:56:30 +08:00
|
|
|
#define GIMP_TYPE_TRANSFORM_PREVIEW_TYPE (gimp_transform_preview_type_get_type ())
|
|
|
|
|
|
|
|
GType gimp_transform_preview_type_get_type (void) G_GNUC_CONST;
|
|
|
|
|
|
|
|
typedef enum
|
|
|
|
{
|
|
|
|
GIMP_TRANSFORM_PREVIEW_TYPE_OUTLINE, /*< desc="Outline" >*/
|
|
|
|
GIMP_TRANSFORM_PREVIEW_TYPE_GRID, /*< desc="Grid" >*/
|
|
|
|
GIMP_TRANSFORM_PREVIEW_TYPE_IMAGE, /*< desc="Image" >*/
|
|
|
|
GIMP_TRANSFORM_PREVIEW_TYPE_IMAGE_GRID /*< desc="Image + Grid" >*/
|
|
|
|
} GimpTransformPreviewType;
|
|
|
|
|
|
|
|
|
2003-02-08 01:12:21 +08:00
|
|
|
#define GIMP_TYPE_TRANSFORM_GRID_TYPE (gimp_transform_grid_type_get_type ())
|
|
|
|
|
|
|
|
GType gimp_transform_grid_type_get_type (void) G_GNUC_CONST;
|
|
|
|
|
2003-09-27 00:20:05 +08:00
|
|
|
typedef enum
|
2003-02-08 01:12:21 +08:00
|
|
|
{
|
2004-06-30 23:47:32 +08:00
|
|
|
GIMP_TRANSFORM_GRID_TYPE_N_LINES, /*< desc="Number of grid lines" >*/
|
|
|
|
GIMP_TRANSFORM_GRID_TYPE_SPACING /*< desc="Grid line spacing" >*/
|
2003-02-08 01:12:21 +08:00
|
|
|
} GimpTransformGridType;
|
|
|
|
|
|
|
|
|
2007-02-28 02:55:12 +08:00
|
|
|
#define GIMP_TYPE_VECTOR_MODE (gimp_vector_mode_get_type ())
|
|
|
|
|
|
|
|
GType gimp_vector_mode_get_type (void) G_GNUC_CONST;
|
|
|
|
|
|
|
|
typedef enum
|
|
|
|
{
|
|
|
|
GIMP_VECTOR_MODE_DESIGN, /*< desc="Design" >*/
|
|
|
|
GIMP_VECTOR_MODE_EDIT, /*< desc="Edit" >*/
|
|
|
|
GIMP_VECTOR_MODE_MOVE /*< desc="Move" >*/
|
|
|
|
} GimpVectorMode;
|
|
|
|
|
|
|
|
|
2003-09-26 21:33:54 +08:00
|
|
|
/*
|
|
|
|
* non-registered enums; register them if needed
|
|
|
|
*/
|
|
|
|
|
2003-09-27 00:20:05 +08:00
|
|
|
typedef enum /*< skip >*/
|
2003-09-26 21:33:54 +08:00
|
|
|
{
|
Separate selection tool function (select, move, cut, ...) from selection
2006-10-18 Michael Natterer <mitch@gimp.org>
Separate selection tool function (select, move, cut, ...) from
selection mode (replace, add, ...). Fixes bug #313634 (that bug
wasn't triggered any more in HEAD, but was still there).
* app/tools/tools-enums.h: renamed enum SelectOp to SelectFunction
and replaced the values REPLACE, ADD, SUBTRACT and INTERSECT by a
single value SELECT.
* app/tools/gimpselectiontool.h (struct GimpSelectionTool):
renamed member "op" to "function". Changed "SelectOps saved_op" to
"GimpChannelOps saved_operation".
* app/tools/gimpselectiontool.c: we always have the right
GimpChannelOps in the tool options, so simply use it instead of
mixing up unrelated stuff in one enum. Results is some medium-ugly
nested switches, but is generally much cleaner than before.
* app/tools/gimpforegroundselecttool.c
* app/tools/gimpfreeselecttool.c
* app/tools/gimpiscissorstool.c
* app/tools/gimpregionselecttool.c: changed accordingly. Use the
operation from the tool options instead of selection_tool->op when
making the actual selection.
2006-10-18 16:04:55 +08:00
|
|
|
SELECTION_SELECT,
|
2003-09-26 21:33:54 +08:00
|
|
|
SELECTION_MOVE_MASK,
|
|
|
|
SELECTION_MOVE,
|
|
|
|
SELECTION_MOVE_COPY,
|
|
|
|
SELECTION_ANCHOR
|
Separate selection tool function (select, move, cut, ...) from selection
2006-10-18 Michael Natterer <mitch@gimp.org>
Separate selection tool function (select, move, cut, ...) from
selection mode (replace, add, ...). Fixes bug #313634 (that bug
wasn't triggered any more in HEAD, but was still there).
* app/tools/tools-enums.h: renamed enum SelectOp to SelectFunction
and replaced the values REPLACE, ADD, SUBTRACT and INTERSECT by a
single value SELECT.
* app/tools/gimpselectiontool.h (struct GimpSelectionTool):
renamed member "op" to "function". Changed "SelectOps saved_op" to
"GimpChannelOps saved_operation".
* app/tools/gimpselectiontool.c: we always have the right
GimpChannelOps in the tool options, so simply use it instead of
mixing up unrelated stuff in one enum. Results is some medium-ugly
nested switches, but is generally much cleaner than before.
* app/tools/gimpforegroundselecttool.c
* app/tools/gimpfreeselecttool.c
* app/tools/gimpiscissorstool.c
* app/tools/gimpregionselecttool.c: changed accordingly. Use the
operation from the tool options instead of selection_tool->op when
making the actual selection.
2006-10-18 16:04:55 +08:00
|
|
|
} SelectFunction;
|
2003-09-26 21:33:54 +08:00
|
|
|
|
|
|
|
/* Tool control actions */
|
2003-09-27 00:20:05 +08:00
|
|
|
typedef enum /*< skip >*/
|
2003-09-26 21:33:54 +08:00
|
|
|
{
|
2006-05-22 05:12:01 +08:00
|
|
|
GIMP_TOOL_ACTION_PAUSE,
|
|
|
|
GIMP_TOOL_ACTION_RESUME,
|
|
|
|
GIMP_TOOL_ACTION_HALT
|
2003-09-26 21:33:54 +08:00
|
|
|
} GimpToolAction;
|
|
|
|
|
2004-07-26 22:50:51 +08:00
|
|
|
/* Modes of GimpEditSelectionTool */
|
|
|
|
typedef enum /*< skip >*/
|
|
|
|
{
|
|
|
|
GIMP_TRANSLATE_MODE_VECTORS,
|
|
|
|
GIMP_TRANSLATE_MODE_CHANNEL,
|
|
|
|
GIMP_TRANSLATE_MODE_LAYER_MASK,
|
|
|
|
GIMP_TRANSLATE_MODE_MASK,
|
|
|
|
GIMP_TRANSLATE_MODE_MASK_TO_LAYER,
|
|
|
|
GIMP_TRANSLATE_MODE_MASK_COPY_TO_LAYER,
|
|
|
|
GIMP_TRANSLATE_MODE_LAYER,
|
|
|
|
GIMP_TRANSLATE_MODE_FLOATING_SEL
|
|
|
|
} GimpTranslateMode;
|
|
|
|
|
2003-09-26 21:33:54 +08:00
|
|
|
/* Motion event report modes */
|
2003-09-27 00:20:05 +08:00
|
|
|
typedef enum /*< skip >*/
|
2003-09-26 21:33:54 +08:00
|
|
|
{
|
|
|
|
GIMP_MOTION_MODE_EXACT,
|
|
|
|
GIMP_MOTION_MODE_HINT,
|
|
|
|
GIMP_MOTION_MODE_COMPRESS
|
|
|
|
} GimpMotionMode;
|
|
|
|
|
2003-01-07 00:25:04 +08:00
|
|
|
/* Possible transform functions */
|
2003-09-27 00:20:05 +08:00
|
|
|
typedef enum /*< skip >*/
|
2002-03-19 23:05:38 +08:00
|
|
|
{
|
|
|
|
TRANSFORM_CREATING,
|
2006-06-20 16:22:39 +08:00
|
|
|
TRANSFORM_HANDLE_NONE,
|
2006-06-19 01:44:06 +08:00
|
|
|
TRANSFORM_HANDLE_NW, /* north west */
|
|
|
|
TRANSFORM_HANDLE_NE, /* north east */
|
|
|
|
TRANSFORM_HANDLE_SW, /* south west */
|
|
|
|
TRANSFORM_HANDLE_SE, /* south east */
|
2006-08-24 06:13:17 +08:00
|
|
|
TRANSFORM_HANDLE_N, /* north */
|
|
|
|
TRANSFORM_HANDLE_S, /* south */
|
|
|
|
TRANSFORM_HANDLE_E, /* east */
|
|
|
|
TRANSFORM_HANDLE_W, /* west */
|
2002-03-19 23:05:38 +08:00
|
|
|
TRANSFORM_HANDLE_CENTER
|
|
|
|
} TransformAction;
|
|
|
|
|
|
|
|
|
|
|
|
#endif /* __TOOLS_ENUMS_H__ */
|