gimpcolormanaged.h 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. /* LIBGIMP - The GIMP Library
  2. * Copyright (C) 1995-1997 Spencer Kimball and Peter Mattis
  3. *
  4. * GimpColorManaged interface
  5. * Copyright (C) 2007 Sven Neumann <sven@gimp.org>
  6. *
  7. * This library is free software: you can redistribute it and/or
  8. * modify it under the terms of the GNU Lesser General Public
  9. * License as published by the Free Software Foundation; either
  10. * version 3 of the License, or (at your option) any later version.
  11. *
  12. * This library is distributed in the hope that it will be useful,
  13. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  15. * Library General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU Lesser General Public
  18. * License along with this library. If not, see
  19. * <https://www.gnu.org/licenses/>.
  20. */
  21. #if !defined (__GIMP_COLOR_H_INSIDE__) && !defined (GIMP_COLOR_COMPILATION)
  22. #error "Only <libgimpcolor/gimpcolor.h> can be included directly."
  23. #endif
  24. #ifndef __GIMP_COLOR_MANAGED_H__
  25. #define __GIMP_COLOR_MANAGED_H__
  26. G_BEGIN_DECLS
  27. /* For information look into the C source or the html documentation */
  28. #define GIMP_TYPE_COLOR_MANAGED (gimp_color_managed_get_type ())
  29. G_DECLARE_INTERFACE (GimpColorManaged, gimp_color_managed, GIMP, COLOR_MANAGED, GObject)
  30. /**
  31. * GimpColorManagedInterface:
  32. * @base_iface: The parent interface
  33. * @get_icc_profile: Returns the ICC profile of the pixels managed by
  34. * the object
  35. * @profile_changed: This signal is emitted when the object's color profile
  36. * has changed
  37. * @get_color_profile: Returns the #GimpColorProfile of the pixels managed
  38. * by the object
  39. * @get_simulation_profile: Returns the simulation #GimpColorProfile of the
  40. * pixels managed by the object
  41. * @get_simulation_rendering_intent: Returns the simulation #GimpColorRenderingIntent
  42. * of the pixels managed by the object
  43. * @get_simulation_bpc: Returns whether black point compensation is enabled for the
  44. * simulation of the pixels managed by the object
  45. **/
  46. struct _GimpColorManagedInterface
  47. {
  48. GTypeInterface base_iface;
  49. /**
  50. * GimpColorManagedInterface::get_icc_profile:
  51. * @managed: an object the implements the #GimpColorManaged interface
  52. * @len: (out): return location for the number of bytes in the profile data
  53. *
  54. * Returns: (array length=len): A blob of data that represents an ICC color
  55. * profile.
  56. *
  57. * Since: 2.4
  58. */
  59. const guint8 * (* get_icc_profile) (GimpColorManaged *managed,
  60. gsize *len);
  61. /* signals */
  62. void (* profile_changed) (GimpColorManaged *managed);
  63. void (* simulation_profile_changed) (GimpColorManaged *managed);
  64. void (* simulation_intent_changed) (GimpColorManaged *managed);
  65. void (* simulation_bpc_changed) (GimpColorManaged *managed);
  66. /* virtual functions */
  67. GimpColorProfile * (* get_color_profile) (GimpColorManaged *managed);
  68. GimpColorProfile * (* get_simulation_profile) (GimpColorManaged *managed);
  69. GimpColorRenderingIntent
  70. (* get_simulation_intent) (GimpColorManaged *managed);
  71. gboolean (* get_simulation_bpc) (GimpColorManaged *managed);
  72. };
  73. const guint8 * gimp_color_managed_get_icc_profile (GimpColorManaged *managed,
  74. gsize *len);
  75. GimpColorProfile * gimp_color_managed_get_color_profile (GimpColorManaged *managed);
  76. GimpColorProfile * gimp_color_managed_get_simulation_profile (GimpColorManaged *managed);
  77. GimpColorRenderingIntent gimp_color_managed_get_simulation_intent (GimpColorManaged *managed);
  78. gboolean gimp_color_managed_get_simulation_bpc (GimpColorManaged *managed);
  79. void gimp_color_managed_profile_changed (GimpColorManaged *managed);
  80. void gimp_color_managed_simulation_profile_changed (GimpColorManaged *managed);
  81. void gimp_color_managed_simulation_intent_changed (GimpColorManaged *managed);
  82. void gimp_color_managed_simulation_bpc_changed (GimpColorManaged *managed);
  83. G_END_DECLS
  84. #endif /* __GIMP_COLOR_MANAGED_IFACE_H__ */