Matthias Clasen
954938e90a
egl: Check for the EXT_KHR_gl_colorspace extension
2024-06-17 07:56:06 -04:00
Matthias Clasen
fcf9e09d9d
wip: Hack in use of an SRGB framebuffer format
...
This needs cleanup to make the decisions properly.
2024-06-17 07:39:58 -04:00
Matthias Clasen
d344bcbbcb
colorstate: Add a comment
2024-06-17 07:39:58 -04:00
Matthias Clasen
0402a350e7
Make display colorstate settable
...
Just for debugging
2024-06-16 15:57:25 -04:00
Matthias Clasen
bd2ac3e897
cairo: Use GdkColor
2024-06-16 15:57:25 -04:00
Matthias Clasen
1e1c8d1a6d
Add crude color management impl for cairo
...
Use linear compositing with cairo if LINEAR_COMPOSITING=1 is
set in the environment.
2024-06-16 15:57:25 -04:00
Matthias Clasen
7b4f08eea6
Add gdk_cairo_set_source_color
2024-06-16 15:57:25 -04:00
Benjamin Otte
baefbc5259
Add color space get/set for cairo
...
Add a centralized place to attach color space to.
Nothing uses that information yet, but all the
backends do set it.
2024-06-16 15:57:25 -04:00
Matthias Clasen
81da727a9c
gdk: Introduce GdkColor
...
GdkColor represents a color in the real world, by combining a color
profile, an alpha value and N component values.
2024-06-16 15:57:25 -04:00
Benjamin Otte
13e3242e7d
gdk: Add GDK_DEBUG=srgb
...
Disables gdk_surface_set_color_profile() for backends and forces
sRGB.
This does not change any GSK renderers, it just turns off any backends
trying to hand us color profiles.
2024-06-16 15:57:25 -04:00
Benjamin Otte
afb02f2d54
x11: Implement support for color states
...
Stole the implementation from eog.
This doesn't yet update the color state when it changes though.
2024-06-16 15:57:25 -04:00
Matthias Clasen
c53772908c
Give surfaces a color state
...
Add api to get the color state of a surface.
2024-06-16 15:57:25 -04:00
Matthias Clasen
83523d88f6
Add color state to texture download methods
2024-06-16 15:57:25 -04:00
Matthias Clasen
b5e4bf7a70
Add color states to gdk_memory_convert
...
This lets us perform color space conversions at the same time
as memory format changes.
2024-06-16 15:57:25 -04:00
Matthias Clasen
1c1d52cc59
pixbuf: Add color state support
...
When creating a GdkTexture from a GdkPixbuf, see if it has an
icc profile attached, and if so, use it.
2024-06-16 15:57:25 -04:00
Matthias Clasen
6b600a2bd8
tiff: Add color state support
...
When loading or saving tiff files, translate between embedded
icc profiles and color state objects.
2024-06-16 15:57:25 -04:00
Benjamin Otte
e3100bde3b
png: Add color state support
...
When loading or saving png files, translate between embedded
icc profiles or cicp data and color state objects.
2024-06-16 15:57:25 -04:00
Benjamin Otte
5395e839a3
jpeg: Add color state support
...
When loading or saving jpeg files, translate between embedded
icc profiles and color state objects.
2024-06-16 15:57:25 -04:00
Matthias Clasen
9cbe82d7fe
dmabuf texture: color state support
2024-06-16 15:57:25 -04:00
Matthias Clasen
8ed427dab9
gl texture: color state support
2024-06-16 15:57:25 -04:00
Matthias Clasen
47fe542e62
memory texture: color state support
2024-06-16 15:57:25 -04:00
Matthias Clasen
67e3afe42e
Give textures a color state
2024-06-16 15:57:25 -04:00
Matthias Clasen
ae1e2a13d1
Add GdkColorState
...
This is just an empty shell for now.
2024-06-16 15:57:25 -04:00
Matthias Clasen
d141cb7b72
Fix an oversight
...
This snuck in as part of 098d67f8befdb00d75.
2024-06-11 16:41:22 -04:00
Matthias Clasen
42c6e0249f
vulkan: Fix updating swap chains
...
gdk_vulkan_context_check_swapchain uses priv->current_format,
so we must update it first, and undo that if check_swapchain
falls. This fixes handling of high-depth back buffers in gsk.
2024-06-09 15:59:56 -04:00
Matthias Clasen
54eb85f814
vulkan: Add a getter for the memory format
...
We need this to accurately set up the gpu image for the
backbuffer in gsk.
2024-06-09 15:59:56 -04:00
Matthias Clasen
0045ac839b
Give memory formats a name
...
This is useful in debugging.
The names I chose are shortened a bit from the enum values. We
use just a single depth, * for premultiplied, and f for float.
2024-06-09 15:59:27 -04:00
Matthias Clasen
b660fa27d3
Merge branch 'fix-missing-listeners' into 'main'
...
wayland: Add missing listeners
See merge request GNOME/gtk!7331
2024-06-02 20:42:13 +00:00
Matthias Clasen
77f0e5e1ba
wayland: Add missing listeners
...
Now that we are using version 6 of the compositor interface,
we need to have preferred scale and bufer transform callbacks
everywhere.
2024-06-02 12:07:51 -04:00
Matthias Clasen
cfcc5c5c0b
Merge branch 'docs-add-missing-returns-args' into 'main'
...
docs: Add missing returns and parameter annotations
See merge request GNOME/gtk!7325
2024-06-02 15:26:50 +00:00
Maximiliano Sandoval
cf4d13bee3
gdkevents: gdk_event_get_position return value
2024-06-01 10:01:20 +02:00
Maximiliano Sandoval
00acc7957f
gdkcursor: Fix typo in GdkCursorGetTestureCallback
2024-06-01 09:04:00 +02:00
Matthias Clasen
3a4c69f370
gdk: Add gdk_rgba_print
2024-05-31 21:29:49 -04:00
Maximiliano Sandoval
2eea911a0f
gdktoplevel: Document TitlebarGesture
2024-05-31 11:47:30 +02:00
Maximiliano Sandoval
ee4a817121
gdk: docs: Document error quarks
2024-05-31 11:47:30 +02:00
Matthias Clasen
7ec4f6e297
Merge branch 'wip/xdg-dialog' into 'main'
...
gdk/wayland: Implement support for xdg-dialog Wayland protocol
See merge request GNOME/gtk!6837
2024-05-29 23:40:39 +00:00
Matthias Clasen
8841a002ed
Merge branch 'build-with-unicode' into 'main'
...
Windows: Build with UNICODE
See merge request GNOME/gtk!7230
2024-05-29 23:20:01 +00:00
Matthias Clasen
6da606aaad
Merge branch 'issue-6401-legacy' into 'main'
...
Win32 GL: Also force not to use depth/stencil/accum bits on legacy contexts (for issue #6401 )
See merge request GNOME/gtk!7176
2024-05-29 23:18:04 +00:00
Chun-wei Fan
5935bc95b7
gdkvulkancontext.c: Use pointers to hash VkShaderModule
...
VkShaderModule's may or may not be pointers depending on the target
platform, so use pointers to hash those handles to be safe, and retrieve
them from hashes accordingly.
Fixes build on 32-bit Windows at least.
2024-05-29 18:03:13 +08:00
Luca Bacci
7f9363d471
Windows: Build with UNICODE
...
Build with UNICODE (and _UNICODE) defined when targeting Windows.
2024-05-28 16:37:48 +02:00
Bilal Elmoussaoui
9b42377347
docs: Drop _finish blobs
...
As they are generated by gi-docgen thanks to the newly added async annotations.
It allows bindings that don't expose the _finish
functions to propose less-confusing docs
2024-05-23 20:39:50 +02:00
Carlos Garnacho
cf8c3be030
gdk/wayland: Implement support for xdg-dialog Wayland protocol
...
This protocol lifts some functionality from the gtk-shell protocol,
namely the ability to tag dialogs as modal. Ensure to use this
new protocol if available for the task, instead of the gtk-shell
protocol.
2024-05-23 12:40:39 +02:00
Carlos Garnacho
4eb715cf81
build: Support in-tree copies of wayland protocols
...
Make the info about the required protocols an array of definitions
again (a dict instead of an array this time) and add a field that
may be used for version checks of the wayland-protocols found.
Also, make it possible to have versioned protocols in-tree. Both
of these things will allow us to ship in-tree copies of wayland-protocols
without necessarily having to bump the version we depend on.
2024-05-23 12:40:19 +02:00
Luca Bacci
d4899fdf1f
Merge branch 'gdk4_win32_fix_dnd_move_cursor' into 'main'
...
gdk4-win32: Guarantee dnd-move as a cursor name
See merge request GNOME/gtk!7289
2024-05-23 10:16:30 +00:00
Matthias Clasen
ca442f8641
Merge branch 'css-color-spaces' into 'main'
...
gdk: Add support for some color conversions
See merge request GNOME/gtk!7285
2024-05-22 22:32:52 +00:00
g.willems
aa057da1ca
win32: Guarantee dnd-move as a cursor name
...
gdk currently falls back to the default cursor, which may not be
approriate for rendering a DnD move.
2024-05-22 20:55:21 +02:00
Matthias Clasen
1de09d59fb
css: Support some color spaces
...
Support the hwb(), oklab() and oklch() functions for specifying
colors in these color spaces.
See https://bottosson.github.io/posts/oklab/ and
https://www.w3.org/TR/css-color-4/ .
Some tests included.
2024-05-22 14:31:56 -04:00
Arjan Molenaar
396ef5ebe5
Merge branch 'macos-popup-shadows' into 'main'
...
macos: Take shadows into account when positioning popups
See merge request GNOME/gtk!7266
2024-05-22 13:15:34 +00:00
Mat
ed8255993f
gdkmacossurface: Set surface before accessing it
...
Silences the following critial:
_gdk_macos_surface_update_fullscreen_state: assertion
'GDK_IS_MACOS_SURFACE (self)' failed
2024-05-19 23:58:35 +03:00
Mat
e1431f31c1
macos: Take shadows into account when positioning popups
...
Otherwise popups will be misaligned. This becomes noticeable when larger
shadows are used, like in libadwaita.
Regression in 08216dcee9
2024-05-19 23:35:18 +03:00