/* PIKA - Photo and Image Kooker Application
 * a rebranding of The GNU Image Manipulation Program (created with heckimp)
 * A derived work which may be trivial. However, any changes may be (C)2023 by Aldercone Studio
 *
 * Original copyright, applying to most contents (license remains unchanged): 
 * Copyright (C) 1995 Spencer Kimball and Peter Mattis
 *
 * operations-enums.h
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 3 of the License, or
 * (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
 * along with this program.  If not, see <https://www.gnu.org/licenses/>.
 */

#ifndef __OPERATIONS_ENUMS_H__
#define __OPERATIONS_ENUMS_H__


#define PIKA_TYPE_LAYER_COLOR_SPACE (pika_layer_color_space_get_type ())

GType pika_layer_color_space_get_type (void) G_GNUC_CONST;

typedef enum
{
  PIKA_LAYER_COLOR_SPACE_AUTO,           /*< desc="Auto"             >*/
  PIKA_LAYER_COLOR_SPACE_RGB_LINEAR,     /*< desc="RGB (linear)"     >*/
  PIKA_LAYER_COLOR_SPACE_RGB_PERCEPTUAL, /*< desc="RGB (perceptual)" >*/
  PIKA_LAYER_COLOR_SPACE_LAB,            /*< desc="LAB", pdb-skip    >*/
} PikaLayerColorSpace;


#define PIKA_TYPE_LAYER_COMPOSITE_MODE (pika_layer_composite_mode_get_type ())

GType pika_layer_composite_mode_get_type (void) G_GNUC_CONST;

typedef enum
{
  PIKA_LAYER_COMPOSITE_AUTO,             /*< desc="Auto"             >*/
  PIKA_LAYER_COMPOSITE_UNION,            /*< desc="Union"            >*/
  PIKA_LAYER_COMPOSITE_CLIP_TO_BACKDROP, /*< desc="Clip to backdrop" >*/
  PIKA_LAYER_COMPOSITE_CLIP_TO_LAYER,    /*< desc="Clip to layer"    >*/
  PIKA_LAYER_COMPOSITE_INTERSECTION      /*< desc="Intersection"     >*/
} PikaLayerCompositeMode;


#define PIKA_TYPE_LAYER_MODE (pika_layer_mode_get_type ())

GType pika_layer_mode_get_type (void) G_GNUC_CONST;

typedef enum
{
  /*  Modes that exist since ancient times  */
  PIKA_LAYER_MODE_NORMAL_LEGACY,         /*< desc="Normal (legacy)",         abbrev="Normal (l)"            >*/
  PIKA_LAYER_MODE_DISSOLVE,              /*< desc="Dissolve"                                                >*/
  PIKA_LAYER_MODE_BEHIND_LEGACY,         /*< desc="Behind (legacy)",         abbrev="Behind (l)"            >*/
  PIKA_LAYER_MODE_MULTIPLY_LEGACY,       /*< desc="Multiply (legacy)",       abbrev="Multiply (l)"          >*/
  PIKA_LAYER_MODE_SCREEN_LEGACY,         /*< desc="Screen (legacy)",         abbrev="Screen (l)"            >*/
  PIKA_LAYER_MODE_OVERLAY_LEGACY,        /*< desc="Old broken Overlay",      abbrev="Old Overlay"           >*/
  PIKA_LAYER_MODE_DIFFERENCE_LEGACY,     /*< desc="Difference (legacy)",     abbrev="Difference (l)"        >*/
  PIKA_LAYER_MODE_ADDITION_LEGACY,       /*< desc="Addition (legacy)",       abbrev="Addition (l)"          >*/
  PIKA_LAYER_MODE_SUBTRACT_LEGACY,       /*< desc="Subtract (legacy)",       abbrev="Subtract (l)"          >*/
  PIKA_LAYER_MODE_DARKEN_ONLY_LEGACY,    /*< desc="Darken only (legacy)",    abbrev="Darken only (l)"       >*/
  PIKA_LAYER_MODE_LIGHTEN_ONLY_LEGACY,   /*< desc="Lighten only (legacy)",   abbrev="Lighten only (l)"      >*/
  PIKA_LAYER_MODE_HSV_HUE_LEGACY,        /*< desc="HSV Hue (legacy)",        abbrev="HSV Hue (l)"           >*/
  PIKA_LAYER_MODE_HSV_SATURATION_LEGACY, /*< desc="HSV Saturation (legacy)", abbrev="HSV Saturation (l)"    >*/
  PIKA_LAYER_MODE_HSL_COLOR_LEGACY,      /*< desc="HSL Color (legacy)",      abbrev="HSL Color (l)"         >*/
  PIKA_LAYER_MODE_HSV_VALUE_LEGACY,      /*< desc="HSV Value (legacy)",      abbrev="HSV Value (l)"         >*/
  PIKA_LAYER_MODE_DIVIDE_LEGACY,         /*< desc="Divide (legacy)",         abbrev="Divide (l)"            >*/
  PIKA_LAYER_MODE_DODGE_LEGACY,          /*< desc="Dodge (legacy)",          abbrev="Dodge (l)"             >*/
  PIKA_LAYER_MODE_BURN_LEGACY,           /*< desc="Burn (legacy)",           abbrev="Burn (l)"              >*/
  PIKA_LAYER_MODE_HARDLIGHT_LEGACY,      /*< desc="Hard light (legacy)",     abbrev="Hard light (l)"        >*/

  /*  Since 2.8 (XCF version 2)  */
  PIKA_LAYER_MODE_SOFTLIGHT_LEGACY,      /*< desc="Soft light (legacy)",     abbrev="Soft light (l)"        >*/
  PIKA_LAYER_MODE_GRAIN_EXTRACT_LEGACY,  /*< desc="Grain extract (legacy)",  abbrev="Grain extract (l)"     >*/
  PIKA_LAYER_MODE_GRAIN_MERGE_LEGACY,    /*< desc="Grain merge (legacy)",    abbrev="Grain merge (l)"       >*/
  PIKA_LAYER_MODE_COLOR_ERASE_LEGACY,    /*< desc="Color erase (legacy)",    abbrev="Color erase (l)"       >*/

  /*  Since 2.10 (XCF version 9) */
  PIKA_LAYER_MODE_OVERLAY,               /*< desc="Overlay"                                                 >*/
  PIKA_LAYER_MODE_LCH_HUE,               /*< desc="LCh Hue"                                                 >*/
  PIKA_LAYER_MODE_LCH_CHROMA,            /*< desc="LCh Chroma"                                              >*/
  PIKA_LAYER_MODE_LCH_COLOR,             /*< desc="LCh Color"                                               >*/
  PIKA_LAYER_MODE_LCH_LIGHTNESS,         /*< desc="LCh Lightness"                                           >*/

  /*  Since 2.10 (XCF version 10)  */
  PIKA_LAYER_MODE_NORMAL,                /*< desc="Normal"                                                  >*/
  PIKA_LAYER_MODE_BEHIND,                /*< desc="Behind"                                                  >*/
  PIKA_LAYER_MODE_MULTIPLY,              /*< desc="Multiply"                                                >*/
  PIKA_LAYER_MODE_SCREEN,                /*< desc="Screen"                                                  >*/
  PIKA_LAYER_MODE_DIFFERENCE,            /*< desc="Difference"                                              >*/
  PIKA_LAYER_MODE_ADDITION,              /*< desc="Addition"                                                >*/
  PIKA_LAYER_MODE_SUBTRACT,              /*< desc="Subtract"                                                >*/
  PIKA_LAYER_MODE_DARKEN_ONLY,           /*< desc="Darken only"                                             >*/
  PIKA_LAYER_MODE_LIGHTEN_ONLY,          /*< desc="Lighten only"                                            >*/
  PIKA_LAYER_MODE_HSV_HUE,               /*< desc="HSV Hue"                                                 >*/
  PIKA_LAYER_MODE_HSV_SATURATION,        /*< desc="HSV Saturation"                                          >*/
  PIKA_LAYER_MODE_HSL_COLOR,             /*< desc="HSL Color"                                               >*/
  PIKA_LAYER_MODE_HSV_VALUE,             /*< desc="HSV Value"                                               >*/
  PIKA_LAYER_MODE_DIVIDE,                /*< desc="Divide"                                                  >*/
  PIKA_LAYER_MODE_DODGE,                 /*< desc="Dodge"                                                   >*/
  PIKA_LAYER_MODE_BURN,                  /*< desc="Burn"                                                    >*/
  PIKA_LAYER_MODE_HARDLIGHT,             /*< desc="Hard light"                                              >*/
  PIKA_LAYER_MODE_SOFTLIGHT,             /*< desc="Soft light"                                              >*/
  PIKA_LAYER_MODE_GRAIN_EXTRACT,         /*< desc="Grain extract"                                           >*/
  PIKA_LAYER_MODE_GRAIN_MERGE,           /*< desc="Grain merge"                                             >*/
  PIKA_LAYER_MODE_VIVID_LIGHT,           /*< desc="Vivid light"                                             >*/
  PIKA_LAYER_MODE_PIN_LIGHT,             /*< desc="Pin light"                                               >*/
  PIKA_LAYER_MODE_LINEAR_LIGHT,          /*< desc="Linear light"                                            >*/
  PIKA_LAYER_MODE_HARD_MIX,              /*< desc="Hard mix"                                                >*/
  PIKA_LAYER_MODE_EXCLUSION,             /*< desc="Exclusion"                                               >*/
  PIKA_LAYER_MODE_LINEAR_BURN,           /*< desc="Linear burn"                                             >*/
  PIKA_LAYER_MODE_LUMA_DARKEN_ONLY,      /*< desc="Luma/Luminance darken only",  abbrev="Luma darken only"  >*/
  PIKA_LAYER_MODE_LUMA_LIGHTEN_ONLY,     /*< desc="Luma/Luminance lighten only", abbrev="Luma lighten only" >*/
  PIKA_LAYER_MODE_LUMINANCE,             /*< desc="Luminance"                                               >*/
  PIKA_LAYER_MODE_COLOR_ERASE,           /*< desc="Color erase"                                             >*/
  PIKA_LAYER_MODE_ERASE,                 /*< desc="Erase"                                                   >*/
  PIKA_LAYER_MODE_MERGE,                 /*< desc="Merge"                                                   >*/
  PIKA_LAYER_MODE_SPLIT,                 /*< desc="Split"                                                   >*/
  PIKA_LAYER_MODE_PASS_THROUGH,          /*< desc="Pass through"                                            >*/

  /*  Internal modes, not available to the PDB, must be kept at the end  */
  PIKA_LAYER_MODE_REPLACE,               /*< pdb-skip, desc="Replace"                                       >*/
  PIKA_LAYER_MODE_ANTI_ERASE,            /*< pdb-skip, desc="Anti erase"                                    >*/

  /*  Layer mode menu separator  */
  PIKA_LAYER_MODE_SEPARATOR = -1         /*< pdb-skip, skip                                                 >*/
} PikaLayerMode;


#define PIKA_TYPE_LAYER_MODE_GROUP (pika_layer_mode_group_get_type ())

GType pika_layer_mode_group_get_type (void) G_GNUC_CONST;

typedef enum  /*< pdb-skip >*/
{
  PIKA_LAYER_MODE_GROUP_DEFAULT,     /*< desc="Default"      >*/
  PIKA_LAYER_MODE_GROUP_LEGACY,      /*< desc="Legacy"       >*/
} PikaLayerModeGroup;


#define PIKA_TYPE_LAYER_MODE_CONTEXT (pika_layer_mode_context_get_type ())

GType pika_layer_mode_context_get_type (void) G_GNUC_CONST;

typedef enum  /*< pdb-skip >*/
{
  PIKA_LAYER_MODE_CONTEXT_LAYER  = 1 << 0,
  PIKA_LAYER_MODE_CONTEXT_GROUP  = 1 << 1,
  PIKA_LAYER_MODE_CONTEXT_PAINT  = 1 << 2,
  PIKA_LAYER_MODE_CONTEXT_FILTER = 1 << 3,

  PIKA_LAYER_MODE_CONTEXT_ALL = (PIKA_LAYER_MODE_CONTEXT_LAYER |
                                 PIKA_LAYER_MODE_CONTEXT_GROUP |
                                 PIKA_LAYER_MODE_CONTEXT_PAINT |
                                 PIKA_LAYER_MODE_CONTEXT_FILTER)
} PikaLayerModeContext;


/*
 * non-registered enums; register them if needed
 */

typedef enum  /*< pdb-skip, skip >*/
{
  PIKA_LAYER_COMPOSITE_REGION_INTERSECTION = 0,
  PIKA_LAYER_COMPOSITE_REGION_DESTINATION  = 1 << 0,
  PIKA_LAYER_COMPOSITE_REGION_SOURCE       = 1 << 1,
  PIKA_LAYER_COMPOSITE_REGION_UNION        = (PIKA_LAYER_COMPOSITE_REGION_DESTINATION |
                                              PIKA_LAYER_COMPOSITE_REGION_SOURCE),
} PikaLayerCompositeRegion;

typedef enum  /*< pdb-skip, skip >*/
{
  PIKA_LAYER_MODE_FLAG_LEGACY                    =  1 << 0,
  PIKA_LAYER_MODE_FLAG_BLEND_SPACE_IMMUTABLE     =  1 << 1,
  PIKA_LAYER_MODE_FLAG_COMPOSITE_SPACE_IMMUTABLE =  1 << 2,
  PIKA_LAYER_MODE_FLAG_COMPOSITE_MODE_IMMUTABLE  =  1 << 3,
  PIKA_LAYER_MODE_FLAG_SUBTRACTIVE               =  1 << 4,
  PIKA_LAYER_MODE_FLAG_ALPHA_ONLY                =  1 << 5,
  PIKA_LAYER_MODE_FLAG_TRIVIAL                   =  1 << 6
} PikaLayerModeFlags;


#endif /* __OPERATIONS_ENUMS_H__ */
