Use local compile-time selected parser helpers with a legacy Pango fallback.
Avoid temporary string decompression allocations and use unlocked stdio where available.
Add RGB48 and RGBX64 drawing APIs with direct conversion for common 15-, 16-, 24-, 30- and 32-bit TrueColor visuals. Preserve the existing GdkRGB path as a fallback for unsupported visuals and maximum dithering.
Add native big-endian four-pixel converters for RGB565, grayscale RGB565, and dithered RGB565.
Select the block converters only where cross-target code generation is favorable: RGB on PowerPC, s390x, ARMv5+, and AArch64; grayscale on PowerPC, ARMv5+, AArch64, and m68k; and dither on PowerPC. Retain the scalar fallbacks everywhere else.
The little-endian machine code remains byte-for-byte unchanged. No runtime endian checks, allocations, or additional image buffers are introduced.
Validated with a complete build and test suite, deterministic and randomized big-endian formula tests, exact little-endian .text comparison, and cross-target code-generation checks.
Add specialized converters for both 10:10:10 channel layouts and both X image byte orders.
Preserve depth-30 padding bits, avoid invalid negative shifts in the generic converter and select endian conversion at compile time.
Validated with a real Xvfb 30-bit A/B pixel test and cross-target endian store checks.
Derived from downstream commit 02a2c61f2d.
Co-authored-by: Daemonratte <daemonratte@daemonratte.net>
Based on the MSYS2 0005-Fix-header-ref.all.patch.
Use an explicit top_srcdir-relative path for gdkx.h in the GDK reference documentation instead of a fragile relative path.
Based on the openSUSE gtk2-default-printer.patch.
Avoid treating printer status updates as user-driven printer selection changes, so the print dialog can continue waiting for a default printer that may appear later.
Based on the MSYS2 0024-gtk-update-icon-cache-rc-quote.patch.
Quote the manifest path when generating the gtk-update-icon-cache resource file so windres parses it correctly.
Based on the MSYS2 0023-gdkkeys-win32.c-fix-initialisation-of-key_state-in-u.patch.
Clear the key_state array before using it during keymap updates so stale state cannot affect layout handling, including Japanese IME input.
Based on the MSYS2 0022-icontheme-win32-detect-SVG-files-by-extension.patch.
Some Windows systems report .svg files with a generic or incorrect content type. On Win32, fall back to the .svg extension so SVG icons can still be detected.
Based on the MSYS2 0013_fix_mouse_events.patch.
Use CWP_SKIPTRANSPARENT while walking from the desktop window, but stop skipping transparent windows after the first level so transparent child windows are still considered correctly.
Based on part of the MacPorts Big Sur performance patch for GIMP issue 5989.
Keep the existing gdk_window_process_all_updates() call for non-Quartz targets and for older macOS releases, but avoid this extra resize-idle update path on Big Sur and newer where it can contribute to expensive full-window redraw behaviour.
Based on part of the MacPorts Big Sur performance patch for GIMP issue 5989.
Keep the existing Mojave-era setNeedsDisplay workaround for macOS 10.14 and 10.15, but avoid the extra full-window invalidation on Big Sur and newer where it can cause expensive redraw behaviour.
Based on part of the MacPorts Big Sur performance patch for GIMP issue 5989.
Use a dynamic Objective-C call to request 8-bit layer contents on macOS 11 and newer, avoiding a hard QuartzCore/CALayer compile-time dependency and preserving old behaviour on older macOS releases.
Based on part of the MacPorts Big Sur performance patch for GIMP issue 5989.
NSDisableScreenUpdates and NSEnableScreenUpdates are deprecated on newer macOS releases. Keep using them for older macOS versions, but avoid them on Mojave and newer.
Based on part of the MacPorts Big Sur performance patch for GIMP issue 5989.
Use the modern NSGraphicsContext CGContext accessor on Yosemite and newer, matching the existing Quartz window code, while preserving graphicsPort for older macOS versions.
Based on part of the MacPorts Big Sur performance patch for GIMP issue 5989.
GTK2 represents macOS 10.x releases by their minor version. Read the major version as well and map macOS 11 and newer into the same sequence so Big Sur and later releases can be detected correctly.
Based on part of the MacPorts Big Sur performance patch for GIMP issue 5989.
The NSView focus-locking API is deprecated on newer macOS releases and can cause expensive redraw behaviour. Keep the old path for older macOS versions, but avoid lockFocusIfCanDraw/unlockFocus on Mojave and newer.
Based on the MacPorts patch-gdkquartz-osx-versions.diff.
Extend the Quartz OS version enum so later macOS-specific code can
distinguish Catalina, Big Sur, Monterey, Ventura, Sonoma, and Sequoia
while preserving the existing older constants.
Based on the MacPorts patch-aliases.diff.
Keep the existing GNU visibility alias generation on other platforms, but avoid it on Apple targets where this alias mechanism is not suitable.
Based on the Mageia gtk+-2.24.32-warnings.patch.
Declare the reserved GtkTrayIconClass function pointers with explicit void parameter lists to avoid strict-prototype warnings without changing the class layout.
Based on the Guix gtk2-theme-paths.patch by Jookia.
Keep the existing ~/.themes and gtk_rc_get_theme_dir() lookup paths, but check g_get_system_data_dirs() in between so profile- and prefix-based theme installations can be found.
Based on the Guix gtk2-fix-builder-test.patch.
The callbacks are connected to notify-style signals and must take a
GParamSpec pointer, not a GParamSpec by value. This avoids stack/register
ABI problems on platforms such as ppc64el.
The translation matrix in this file was very badly outdated, there is a new version, but the file itself is not in a format that would work well here, and is extremely large and complex. So I fixed the link to the newest version and added a link to the translation project's home page.