Commit Graph

25 Commits

Author SHA1 Message Date
Alx Sa 7abcc97c6a modules: Swap ColorWheel to HSV float
Should resolve #11370

Per Pippin, HSV double is not a valid
color model for babl. We need to change
to HSV float to resolve the warning when
selecting colors on the Color Wheel.
2024-04-20 21:31:58 +00:00
Alx Sa 2e0d31b17e modules, core, pdb, plug-ins: GeglColor ports
More minor ports from GimpRGB to
GeglColor.
Note that file-mng's GimpRGB code was
already dummied out.
2024-03-23 07:16:02 -04:00
Jehan ebb93a07a5 modules: the color wheel selector now displays and select in the active…
… image's space!
2024-02-11 23:28:03 +01:00
Alx Sa 0587a10543 core: Add simulation intent and BPC to GimpImage
Adds a simulation_bpc and simulation_intent to GimpImage to allow 
plug-ins to access it
for CMYK import/export.
Four pdb functions were added to enable this access:
image_get_simulation_bpc (), image_set_simulation_bpc (), 
image_get_simulation_intent (), and image_set_simulation_intent ().
Next, it updates menu options and code to support GimpImage's
internal simulation intent and bpc.
New 'simulation-intent-changed' and 'simulation-bpc-changed signal 
are emitted via
GimpColorManagedInterface so that relevant tools 
(such as the
CYMK color picker, GimpColorFrame, and future pop-overs)
 are aware of these changes.
2022-08-13 19:39:47 +00:00
Alx Sa 0d7fed93ae core: Add softproof profile to GimpImage
Adds a simulation_profile to GimpImage to allow plug-ins to access it
for CMYK import/export.
Two pdb functions were added to enable this access:
image_get_simulation_profile () and image_set_simulation_profile()
Next, it updates menu options and code to support GimpImage's
internal simulation profile. Menu items are moved from View to Image's
Color Management section.
New 'simulation-profile-changed' signal is emitted via
GimpColorManagedInterface so that relevant tools (such as the
CYMK color picker, GimpColorFrame, and future dockable
dialogue) are aware of these changes.
2022-07-02 15:26:19 +02:00
Niels De Graef 75e42eda31 modules: Make sure we restore cursor in ColorWheel
We set the crosshair cursor when the user starts dragging, but we never
restored it when dragging ended. This commit fixes that.
2022-05-20 17:39:24 +02:00
Niels De Graef b2f875e889 modules: Use GtkGestureDrag in ColorWheel
This allows us to simplify some of the logic, and get rid of a
`gdk_seat_grab()` which might trigger unwanted popups. It's also a bit
more future-proof, as it uses the same mechanism to what is used in
GTK4 for event handling.

While we're at it, stop storing a separate `priv` pointer, which would
allow us to use `G_DECLARE_FINAL_TYPE()` in the future.
2021-12-12 22:28:46 +01:00
Niels De Graef 878804fb01 Cleanup GObject signal marshallers
* Don't generate our own marshallers if they are available in GLib
  already
* Don't set the c_marshaller parameter in `g_signal_new()` if it's a
  default marshaller provided by GLib. See commit message of commit
  39e4aa3c57 on why this is the case.
2020-04-01 21:20:01 +00:00
Michael Natterer 1afb7a8b32 libgimpwidgets: add GDestroyNotify to gimp_widget_track_monitor() 2019-08-07 23:44:18 +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
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 1b7d63cce9 Use g_set_object() in a lot of places, and splrinkle some g_clear_object() 2018-06-01 12:59:52 +02:00
Michael Natterer 29fbed1654 modules: undeprecate GimpColorWheel 2018-05-30 12:47:55 +02:00
Michael Natterer fc12d5bf7f modules: port GimpColorWheel to GTK+ 3.x 2018-05-20 21:06:29 +02:00
Timm Bäder 53f34ebc0b Chain up in some size-allocate implementations
The default implementation does just the right thing for most widgets.
2016-09-09 21:31:09 +02:00
Michael Natterer 3ed305f6f5 libgimpwidgets, app: have all previews track the monitor they are on
and update their color transforms with the new monitor's color
profile. A widget is considered changing monitors when its toplevel
window's center crosses, in order to let widgets within one window
have consistent colors.
2016-06-01 22:42:00 +02:00
Michael Natterer 4ad2493283 libgimpwidgets, modules: improve set_color_config() functions a bit
Don't do anything if the config doesn't change.
2016-05-31 12:27:15 +02:00
Michael Natterer 0d8b8c2f99 Bug 467930 - color selectors are not color managed
Color manage the wheel/triangle color selector.
2016-05-27 01:12:35 +02:00
Michael Natterer f7fc87884e Bug 765180 - Hard-coded NTSC parameters in babl/GEGL/GIMP
Port GimpColorWheel to GIMP_RGB_LUMINANCE().
2016-04-17 17:52:28 +01:00
Michael Natterer 8005eea835 Remove the "GIMP" from all "Since: GIMP 2.x" API doc comments
because it confuses gtk-doc and breaks some links. Also change the
"Index of new symbols in GIMP 2.x" sections to be what seems to be the
modern standard (looked at the GLib and GTK+ docs), and update some
other stuff.
2015-05-31 21:18:09 +02:00
Michael Natterer 84c132addc Bug 721553 - License text contains obsolete FSF postal address
These files were forgotten when changing license from GPL2 to GPL3.
2014-01-05 14:25:46 +01:00
Nils Philippsen 1bb379c3f5 gimpcolorwheel: comment out ineffectual code 2013-11-07 12:20:34 +01:00
Michael Natterer 2cd25ec863 modules: turn GimpColorWheel into a proper dynamically loaded type
So it works with all GObject versions, until we determine how useful
it is generally, and what API it should get for possible
libgimpwidgets inclusion.
2013-07-14 13:41:29 +02:00
Michael Natterer 632c577f18 Bug 689371 - GIMP uses deprecated GtkHSV widget
Swallow GtkHSV back into GIMP and call it GimpColorWheel. Keep it in
modules/ for the time being. Clean up and undeprecate it. Replace
set_metrics() API by set_ring_fraction() and make it follow the size
of its parent container, making its use straightforward. Kept it clean
of GIMP color types so it can be easily adapted by e.g. Inkscape.
2013-01-06 02:56:59 +01:00