gtk2-ng/gtk/gtkpixdatautils.h
Daemonratte c2db5954c4 Use shared pixdata helper for drag cursors
Replace the deprecated gdk_pixbuf_new_from_inline() call used for GTK drag
cursor pixbufs with the internal pixdata helper.

Keep the existing embedded cursor data and lazy per-cursor pixbuf creation.
The helper reads the embedded pixdata length from the stream header and then
uses the shared validating decoder, avoiding extra per-cursor metadata or
runtime resources.
2026-04-28 17:22:24 +02:00

20 lines
676 B
C

#ifndef __GTK_PIXDATA_UTILS_H__
#define __GTK_PIXDATA_UTILS_H__
#include <gdk-pixbuf/gdk-pixbuf.h>
G_BEGIN_DECLS
GdkPixbuf *_gtk_pixbuf_new_from_pixdata_stream (const guint8 *stream,
gsize stream_length,
GError **error);
GdkPixbuf *_gtk_pixbuf_new_from_inline_pixdata (const guint8 *stream,
GError **error);
guint8 *_gtk_pixdata_serialize_from_pixbuf (GdkPixbuf *pixbuf,
gsize *length_p);
G_END_DECLS
#endif /* __GTK_PIXDATA_UTILS_H__ */