gtk/gdk/gdkdmabufdownloaderprivate.h
Benjamin Otte 11543a229a texturedownloader: Add color state
... and plumb the color state through the downloading machinery, where
no matter what path it takes it ends up in
gdk_memory_convert_color_state() or gdk_memory_convert().

The 2nd of those has been expanded to optionally do colorstate
conversion when the 2 colorstates are different.
2024-07-16 21:23:44 +02:00

42 lines
2.4 KiB
C

#pragma once
#include <gdk/gdktypes.h>
G_BEGIN_DECLS
#define GDK_TYPE_DMABUF_DOWNLOADER (gdk_dmabuf_downloader_get_type ())
GDK_AVAILABLE_IN_ALL
G_DECLARE_INTERFACE (GdkDmabufDownloader, gdk_dmabuf_downloader, GDK, DMABUF_DOWNLOADER, GObject)
struct _GdkDmabufDownloaderInterface
{
GTypeInterface g_iface;
void (* close) (GdkDmabufDownloader *downloader);
gboolean (* supports) (GdkDmabufDownloader *downloader,
GdkDmabufTexture *texture,
GError **error);
void (* download) (GdkDmabufDownloader *downloader,
GdkDmabufTexture *texture,
GdkMemoryFormat format,
GdkColorState *color_state,
guchar *data,
gsize stride);
};
void gdk_dmabuf_downloader_close (GdkDmabufDownloader *downloader);
gboolean gdk_dmabuf_downloader_supports (GdkDmabufDownloader *downloader,
GdkDmabufTexture *texture,
GError **error);
void gdk_dmabuf_downloader_download (GdkDmabufDownloader *downloader,
GdkDmabufTexture *texture,
GdkMemoryFormat format,
GdkColorState *color_state,
guchar *data,
gsize stride);
G_END_DECLS