diff options
author | Přemysl Eric Janouch <p@janouch.name> | 2024-01-26 18:37:38 +0100 |
---|---|---|
committer | Přemysl Eric Janouch <p@janouch.name> | 2024-01-26 19:17:54 +0100 |
commit | 3c8a280546e3ec19c3246afada2d488880fc3222 (patch) | |
tree | fe95a502ea4b2ea9e20fcd1cea7045b1e67508e8 /fiv-view.c | |
parent | 96189b70b85f939401a40364b222b91f905d291a (diff) | |
download | fiv-3c8a280546e3ec19c3246afada2d488880fc3222.tar.gz fiv-3c8a280546e3ec19c3246afada2d488880fc3222.tar.xz fiv-3c8a280546e3ec19c3246afada2d488880fc3222.zip |
Move colour management to its own compilation unit
Also make it apparent that CMM profiles are pointer types.
This isn't all that pretty, but it's a necessary first step.
Diffstat (limited to 'fiv-view.c')
-rw-r--r-- | fiv-view.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -78,7 +78,7 @@ struct _FivView { double drag_start[2]; ///< Adjustment values for drag origin FivIoImage *enhance_swap; ///< Quick swap in/out - FivIoProfile screen_cms_profile; ///< Target colour profile for widget + FivIoProfile *screen_cms_profile; ///< Target colour profile for widget int remaining_loops; ///< Greater than zero if limited gint64 frame_time; ///< Current frame's start, µs precision @@ -461,7 +461,7 @@ out: // // Note that Wayland does not have any appropriate protocol, as of writing: // https://gitlab.freedesktop.org/wayland/wayland-protocols/-/merge_requests/14 -static FivIoProfile +static FivIoProfile * monitor_cms_profile(GdkWindow *root, int num) { char atom[32] = ""; @@ -471,7 +471,7 @@ monitor_cms_profile(GdkWindow *root, int num) int format = 0, length = 0; GdkAtom type = GDK_NONE; guchar *data = NULL; - FivIoProfile result = NULL; + FivIoProfile *result = NULL; if (gdk_property_get(root, gdk_atom_intern(atom, FALSE), GDK_NONE, 0, 8 << 20 /* MiB */, FALSE, &type, &format, &length, &data)) { if (format == 8 && length > 0) @@ -1117,7 +1117,7 @@ static gboolean save_as(FivView *self, FivIoImage *frame) { GtkWindow *window = get_toplevel(GTK_WIDGET(self)); - FivIoProfile target = NULL; + FivIoProfile *target = NULL; if (self->enable_cms && (target = self->screen_cms_profile)) { GtkWidget *dialog = gtk_message_dialog_new(window, GTK_DIALOG_MODAL, GTK_MESSAGE_WARNING, GTK_BUTTONS_CLOSE, "%s", |