Commit Graph

59 Commits

Author SHA1 Message Date
Jehan 2b27feb2fd app, libgimp*, modules, pdb, plug-ins: new GimpParamColor.
This is meant to obsolete GeglParamColor with at least an additional argument
has_alpha which we need in GIMP. It allows to advertize when a parameter wants
an opaque color, which in particular means we know when displaying a GUI to pick
colors with alpha or not.
2024-04-19 23:25:13 +02:00
Jehan 559297a5cb app, libgimp*: more GeglColor's space invasion.
- New function gimp_cairo_set_source_color() which is meant to replace
  gimp_cairo_set_source_rgb(a?)() eventually. This new function sets the Cairo
  source color, using the target monitor's profile of the widget where the Cairo
  surface is meant to be drawn on. It also uses the color management settings
  (such as whether a custom profile was set, instead of using system profile, or
  also simply whether color management was disabled at all). It doesn't
  soft-proof the color yet.
- Padding and out-of-gamut colors drawing now use the new
  gimp_cairo_set_source_color(). These don't need any soft-proofing anyway.
- Out-of-gamut color property in GimpColorConfig is now a GeglColor property.
2024-02-11 23:28:02 +01:00
Alx Sa 3d54665a94 libgimpconfig: Retain color scale preferences
RGB 0..255/0..100 and LCh/HSV settings are now remembered when closing
and reopening GIMP.
A few enums were explicitly cast to GimpColorSelectorChannel to clear
some compiler warnings.
2023-01-10 00:20:22 +00:00
scootergrisen df507c05ae Remove trailing spaces in 3 strings 2020-12-15 15:55:45 +00:00
Jehan 025309b0d7 app, libgimpconfig: "printer-profile" becomes "simulation-profile".
As per a FIXME for 3.0 where various mention to "print" got replaced by
a more generic notion of "simulation".
2020-10-16 19:50:19 +02:00
Niels De Graef 1dda60154c Use "Returns:" to annotate return values
To be able to annotate return values through GObject-introspection, you
need to make sure it is tagged with `Returns:` and not something else.
2019-08-03 07:53:47 +00:00
Jehan 4e99c25902 libgimpconfig: fix introspection in gimpcolorconfig.c.
Several returned values had no documentation, and needed in particular
(transfer) annotations.

Fixes various warnings:
> return value: Missing (transfer) annotation
2019-07-27 23:55:30 +02:00
Ell 3b0040c043 app, libgimp*, modules: don't use g_type_class_add_private() ...
... and G_TYPE_INSTANCE_GET_PRIVATE()

g_type_class_add_private() and G_TYPE_INSTANCE_GET_PRIVATE() were
deprecated in GLib 2.58.  Instead, use
G_DEFINE_[ABSTRACT_]TYPE_WITH_PRIVATE(), and
G_ADD_PRIVATE[_DYNAMIC](), and the implictly-defined
foo_get_instance_private() functions, all of which are available in
the GLib versions we depend on.

This commit only covers types registered using one of the
G_DEFINE_FOO() macros (i.e., most types), but not types with a
custom registration function, of which we still have a few -- GLib
currently only provides a (non-deprecated) public API for adding a
private struct using the G_DEFINE_FOO() macros.

Note that this commit was 99% auto-generated (because I'm not
*that* crazy :), so if there are any style mismatches... we'll have
to live with them for now.
2018-09-18 14:39:56 -04:00
Michael Natterer 5f700549e7 Change the license URL from http://www.gnu.org/licenses/ to https:// 2018-07-11 23:29:46 +02:00
Michael Natterer bb2a9d119f libgimpconfig: move all GimpColorConfig members to private 2018-05-20 21:06:33 +02:00
Michael Natterer f4f106ad26 libimp*: add private pointers to all instance structs
even if we don't have private members (yet). Also make class padding 8
pointers in all headers. This commit moves nothing to private, it just
makes all headers consistent and adjusts .c files accordigly.
2018-05-20 21:06:33 +02:00
Michael Natterer 86e3f31a03 libgimpconfig: remove all deprecated cruft 2018-05-20 21:06:29 +02:00
Michael Natterer caef6d0deb libgimp*: various doc fixes 2017-06-03 21:22:12 +02:00
Michael Natterer f807cbe10b libgimpconfig: change GimpColorConfig's out-of-gamut color to magenta
I have no clue why it was some gray.
2017-05-16 22:43:21 +02:00
Michael Natterer 0524b60228 app: consistently treat GimpColorConfig profile paths as config paths
and use gimp_file_new_for_config_path() and _get_config_path() when
dealing with them. We used a weird mix of config paths and plain
(filesystem encoded) paths, waiting to to break on umlauts or
whatever. The code in gimpcolorconfig.c was particularly bad.
2016-10-01 00:29:44 +02:00
Alexandre Prokoudine 6eb777a615 Bring soft-proofing consistence to blurbs 2016-06-08 23:46:09 +03:00
Alexandre Prokoudine 3e01419b0c Introduce consistent use of 'soft-proofing' in user-visible messages 2016-06-08 00:21:51 +03:00
Michael Natterer a743ae712b libgimpconfig: add "optimize" options for display and softproofing
Honor them in gimp_widget_get_color_transform() and make them
configurable in prefs. The code and GUI avoid the negation in
the lcms "NOOPTIMIZE" flag.
2016-06-06 01:15:26 +02:00
Michael Natterer 8abf1aab5e libgimpconfig: add getters for all GimpColorConfig members
and use them instead of peeking the public object struct.
2016-06-05 23:58:02 +02:00
Michael Natterer fcf5b708e5 libgimpwidgets: rename gimp_color_config_get_printer_color_profile()
to gimp_color_config_get_simulation_color_profile(), along with
various internal "printer" strings. Also reduce the number of
user-visible "print" stuff from the preferences color management page.
2016-06-05 18:00:24 +02:00
Michael Natterer 060c03a119 libgimpconfig: don't include gimpcolorconfig-enums.h in gimpcolorconfig.c
gimpcolortypes.h already includes it.
2016-05-25 21:34:49 +02:00
Michael Natterer 335727dd26 libgimpwidgets: change the tooltip of GimpColorConfig:mode
to say "How images are displayed on screen." instead of "Mode of
operation for color management.". The old text was never accurate.
2016-05-16 17:38:49 +02:00
Alexandre Prokoudine e66ec72a3f Fix a user-visible typo 2016-05-10 01:08:14 +03:00
Michael Natterer d17fa32ca2 libgimpconfig: port to GIMP_CONFIG_PROP_FOO() 2016-04-17 00:12:10 +01:00
Michael Natterer 5cbe6f2003 libgimpconfig: add a preferred gray profile to GimpColorConfig 2015-12-14 01:54:00 +01:00
Michael Natterer 77dac3ea60 Bug 555562 - GIMP should ask before applying working space profile
Get rid of the "configurable RGB working space profile".

Instead, turn GimpColorConfig's "rgb-profile" property into a
"Preferred RGB profile" thing that is only a hint and never used
without explicit user interaction. Present it next to the built-in
profile in the profile combo boxes and call it "Preferred" in the
prefs dialog and its tooltip.

Most importantly, don't use it as the image's profile when the image
is not tagged with a profile. Untagged images are now always in the
sRGB or linear RGB built-in color spaces.

This commit reduces the "Apply color profile" dialog on file import to
a simple "Convert to built-in RGB", but that dialog is about to be
moved to the core and improved anyway.
2015-08-20 16:02:22 +02:00
Michael Natterer c102dde92b libgimpcolor, *: change GimpColorProfile to be a GObject
it used to be a typedef to gpointer and actually was a cmsHPROFILE.

Change its API to be more "standard", remove the public close()
function. The object caches both the cmsHPROFILE and the data/length
ICC blob, so conversions between the two become obsolete (simply call
get_lcms_profile() or get_icc_profile()).

Adapt everything to the new API, but port it in a naive way for now,
the code doesn't take advantage of the new possibilities yet (like
refcounting).
2015-07-10 22:53:59 +02:00
Michael Natterer 3565b33019 libgimpconfig: rename the new GimpColorConfig profile accessor functions
gimp_color_config_get_foo_profile() -> get_foo_color_profile()

because the old names clash with possible future accessors for the raw
filename properties.
2015-06-03 09:57:34 +02:00
Michael Natterer 4910c28957 libgimpcolor: rename the gimp_lcms_*() functions to gimp_color_profile_*()
because it doesn't make sense to call the typedef GimpColorProfile
but the function namespace gimp_lcms_*().
2015-06-03 09:41:23 +02:00
Michael Natterer 393e3e0b0b libgimpconfig: fix error codes and messages in GimpColorConfig 2015-05-20 14:47:44 +02:00
Michael Natterer ce3429d643 libgimpconfig: validate profile filenames when setting them on GimpColorConfig
and don't allow wrong files to be set.
2015-05-20 12:20:58 +02:00
Michael Natterer 54553487f2 libgimpconfig: add functions to get GimpColorProfiles to GimpColorConfig
gimp_color_config_get_rgb,cmyk,display,printer_profile()
2015-05-06 16:32:17 +02:00
Michael Natterer 8be52f6aa7 app, libgimp*: pass translated blurbs to GIMP_CONFIG_INSTALL_PROP_FOO()
instead of passing N_()-strings; and remove gettext() calls on these
strings when using them. Reduces complexitx, and fixes double- and
untranslated strings. Also enables to treat properties of GIMP and
GEGL objects the same way, which was totally broken before.
2014-05-14 23:34:01 +02:00
Elle Stone a4821914d3 Bug 720045 - Add black point compensation to Preferences/Color Management
Make black point compensation configurable separately for both proof
and display.
2013-12-09 02:23:31 +01:00
Michael Natterer 3ad73b3658 libgimpcolor: add GdkPixbuf <-> GeglBuffer utility functions
and update tons of includes in libgimp and app.
2012-05-03 03:37:20 +02:00
Michael Natterer 3e119c5af7 libgimpcolor: add gimp_rgb[a]_set,get_pixel()
which converts from/to any pixel format using Babl. Added tons of
includes and CFLAGS now that libgimpcolor publically uses Babl.
2012-05-02 17:50:43 +02:00
Michael Natterer cc47b2a600 libgimpwidgets/color: move the cairo color utility functions to libgimpcolor
Add CAIRO_CFLAGS to a lot of Makefiles to make this possible, and
because they pull in cairo via the libgimp headers.
2011-04-28 15:50:39 +02:00
Michael Natterer 844df2b4df libgimp*: add guards that #error out if individual files are included
This only helps to maintain proper includes in app/ and shouldn't
affect plug-ins at all, because these are supposed to only include the
main headers from libgimp/ since the beginning of time.

The gimpfootypes.h files do not have these guards, so we can continue
to maintain app/'s include policy that is very likely to error out if
wrong things are included.
2011-04-28 14:30:41 +02:00
Michael Natterer 1af54c7874 libgimpconfig: move docs from template files to inline comments 2010-06-29 20:59:07 +02:00
Michael Natterer d9b5207aa2 Change licence to GPLv3 (and to LGPLv3 for libgimp).
2009-01-17  Michael Natterer  <mitch@gimp.org>

	* all files with a GPL header and all COPYING files:

	Change licence to GPLv3 (and to LGPLv3 for libgimp).

	Cleaned up some copyright headers and regenerated the parsers in
	the ImageMap plugin.


svn path=/trunk/; revision=27913
2009-01-17 22:28:01 +00:00
Sven Neumann 52581ec851 changed default value for using the system monitor profile. Many users
2007-11-16  Sven Neumann  <sven@gimp.org>

	* libgimpconfig/gimpcolorconfig.c: changed default value for using
	the system monitor profile. Many users seem to have broken monitor
	profiles and it's hard to figure out how to fix this (bug #496890).

svn path=/trunk/; revision=24170
2007-11-16 13:27:07 +00:00
Sven Neumann 0add284387 use a neutral gray as the default out-of-gamut warning color.
2007-10-07  Sven Neumann  <sven@gimp.org>

	* libgimpconfig/gimpcolorconfig.c: use a neutral gray as the
	default out-of-gamut warning color.


svn path=/trunk/; revision=23754
2007-10-07 10:00:22 +00:00
Sven Neumann 169c7dbc46 added settings for marking out-of-gamut colors in the Print Simulation
2007-10-05  Sven Neumann  <sven@gimp.org>

        * libgimpconfig/gimpcolorconfig.[ch]: added settings for marking
        out-of-gamut colors in the Print Simulation (bug #476824).

        * app/dialogs/preferences-dialog.c: added a check-button for the
        out-of-gamut warning and tweaked the layout of the Color Management
        page to make the relationship of the settings more obvious.

        * modules/cdisplay_lcms.c: mark out-of-gamut colors.


svn path=/trunk/; revision=23729
2007-10-05 08:21:27 +00:00
Sven Neumann 4981ad57e3 fixed blurb.
2007-01-03  Sven Neumann  <sven@gimp.org>

	* libgimpconfig/gimpcolorconfig.c: fixed blurb.


svn path=/trunk/; revision=21631
2007-01-03 11:24:20 +00:00
Sven Neumann 0370337796 always deal with embedded color profiles.
2006-11-01  Sven Neumann  <sven@gimp.org>

	* app/file/file-open.c: always deal with embedded color profiles.

	* app/dialogs/preferences-dialog.c: reordered items in Color
	Management section, added some spacing.

	* app/config/gimprc-blurbs.h
	* libgimpconfig/gimpcolorconfig.c
	* plug-ins/common/lcms.c: string changes for consistency.
2006-11-01 14:09:29 +00:00
Sven Neumann 63da8bb8ca libgimpconfig/gimpcolorconfig-enums.[ch] libgimpconfig/gimpcolorconfig.c
2006-10-27  Sven Neumann  <sven@gimp.org>

	* libgimpconfig/gimpcolorconfig-enums.[ch]
	* libgimpconfig/gimpcolorconfig.c
	* libgimpconfig/gimpconfig.def: removed unused enum
	GimpColorFileOpenBehaviour.

	* app/core/core-enums.[ch]: added enum GimpColorProfilePolicy.

	* app/config/gimpcoreconfig.[ch]
	* app/config/gimprc-blurbs.h: added property
"color-profile-policy".

	* app/plug-in/Makefile.am
	* app/plug-in/plug-in-icc-profile.[ch]: new files that wrap
usage
	of the lcms plug-in.

	* app/file/file-open.c: implement the user-configured policy for
	embedded color profiles.

	* app/widgets/gimpimageprofileview.c: use the wrapper to call
the
	plug-in-icc-profile-info procedure.

	* app/widgets/gimptoolbox-dnd.c: pass TRUE for "attach_comment"
	parameter to gimp_create_image().

	* app/core/gimptemplate.c
	* app/file/Makefile.am: cosmetic changes.

	* app/Makefile.am: some resorting to make the beast link again.
2006-10-27 13:52:40 +00:00
Sven Neumann 6ebcf700d1 removed erroneous semicolon after G_DEFINE_TYPE macros.
2006-05-15  Sven Neumann  <sven@gimp.org>

	* app/*/*.c:
	* lib*/*.c: removed erroneous semicolon after G_DEFINE_TYPE macros.
2006-05-15 09:46:31 +00:00
Sven Neumann 7b24dd8e36 moved GIMP_PARAM defines from here ...
2006-01-30  Sven Neumann  <sven@gimp.org>

	* app/config/config-types.h: moved GIMP_PARAM defines from here ...

	* libgimpbase/gimpparam.h: ... to this new files.

	* libgimpbase/Makefile.am
	* libgimpbase/gimpbasetypes.h: include the new header file.

	* libgimp/gimpfontselectbutton.c
	* libgimpconfig/gimpcolorconfig.c
	* libgimpthumb/gimpthumbnail.c
	* libgimpwidgets/gimpcellrenderercolor.c
	* libgimpwidgets/gimpcellrenderertoggle.c
	* libgimpwidgets/gimpcolorarea.c
	* libgimpwidgets/gimpcolorbutton.c
	* libgimpwidgets/gimpcolordisplay.c
	* libgimpwidgets/gimpcontroller.c
	* libgimpwidgets/gimpdialog.c
	* libgimpwidgets/gimpenumcombobox.c
	* libgimpwidgets/gimpintcombobox.c
	* libgimpwidgets/gimppageselector.c
	* libgimpwidgets/gimppreview.c
	* libgimpwidgets/gimppreviewarea.c
	* libgimpwidgets/gimpzoommodel.c
	* modules/cdisplay_colorblind.c
	* modules/cdisplay_gamma.c
	* modules/cdisplay_highcontrast.c
	* modules/cdisplay_lcms.c
	* modules/cdisplay_proof.c
	* modules/controller_linux_input.c
	* modules/controller_midi.c: use the GIMP_PARAM defines to avoid
	unnecessary string allocations.
2006-01-30 16:10:56 +00:00
Michael Natterer 33ae55f873 libgimp/*.c libgimpconfig/*.c libgimpmodule/*.c libgimpthumb/*.c port to
2005-12-20  Michael Natterer  <mitch@gimp.org>

	* libgimp/*.c
	* libgimpconfig/*.c
	* libgimpmodule/*.c
	* libgimpthumb/*.c
	* libgimpwidgets/*.c: port to G_DEFINE_TYPE() and friends. Some
	related cleanup.
2005-12-20 20:35:23 +00:00
Sven Neumann 531430c6de use dgettext() instead of gettext() and try to obtain the translation
2005-06-26  Sven Neumann  <sven@gimp.org>

	* libgimpwidgets/gimppropwidgets.c: use dgettext() instead of
	gettext() and try to obtain the translation domain from the type.
	Fixes i18n of tooltips on property widgets (bug #307756).

	* libgimpconfig/gimpcolorconfig.c: set a translation domain.
2005-06-26 18:09:12 +00:00