GTK2 deprecation: document and plan migration to standalone color type#4
Open
rampageservices wants to merge 2 commits into
Open
GTK2 deprecation: document and plan migration to standalone color type#4rampageservices wants to merge 2 commits into
rampageservices wants to merge 2 commits into
Conversation
GdkColor (16-bit, no alpha) is deprecated in favor of GdkRGBA. GTK2 is EOL since GTK3. Proposes 3-phase fix: standalone color struct, remove GTK include from gerbv.h, optional headless build. Documents current workaround used in Parts Studio gerbv-render.
… (Phase 1) Introduces gerbv_color_t with normalized float RGBA (0.0-1.0) to gerbv.h as a GTK-independent color type. Adds GERBV_COLOR_FROM_GDK() and GERBV_COLOR_TO_GDK() macros for backward-compatible conversion. No ABI break — existing GdkColor fields are unchanged. This is the non-breaking foundation for Phase 2 (replacing GdkColor in structs).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
GdkColor(16-bit, no alpha) is deprecated — GTK3 usesGdkRGBAgerbv.hforces GTK2 linkage even for headless/library usageProposed 3-phase fix
GdkColorwithgerbv_color_t(float RGBA, no GTK dep)#include <gtk/gtk.h>fromgerbv.h— move to GUI-only sourcesGERBV_HEADLESS=ONfor server-side renderingCurrent workaround
Used in Parts Studio
gerbv-render.c:See
GTK2_DEPRECATION.mdfor full details.