mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-29 06:51:10 +00:00
25c812fa87
Main changes: 1. Avoid invalid writes by not passing pointers to a GArray that realloc()s its data 2. Use a hash table to store image defs, instead of an array. This requires a custom hash/equal function 3. Make image desc computation sync, so that setting a cs always succeeds or always fails and doesn't depend on timing. 4. Add a few debug messages in failure paths. For lack of a category, they ended up in MISC.
40 lines
2.0 KiB
C
40 lines
2.0 KiB
C
#pragma once
|
|
|
|
#include "gdkcolorstateprivate.h"
|
|
#include "gdkwaylanddisplay.h"
|
|
#include <wayland-client.h>
|
|
|
|
typedef struct _GdkWaylandColor GdkWaylandColor;
|
|
|
|
GdkWaylandColor * gdk_wayland_color_new (GdkWaylandDisplay *display,
|
|
struct wl_registry *registry,
|
|
uint32_t id,
|
|
uint32_t version);
|
|
|
|
void gdk_wayland_color_free (GdkWaylandColor *color);
|
|
|
|
gboolean gdk_wayland_color_prepare (GdkWaylandColor *color);
|
|
|
|
struct wl_proxy * gdk_wayland_color_get_color_manager (GdkWaylandColor *color);
|
|
|
|
|
|
typedef struct _GdkWaylandColorSurface GdkWaylandColorSurface;
|
|
|
|
typedef void (* GdkColorStateChanged) (GdkWaylandColorSurface *self,
|
|
GdkColorState *cs,
|
|
gpointer data);
|
|
|
|
GdkWaylandColorSurface *
|
|
gdk_wayland_color_surface_new (GdkWaylandColor *color,
|
|
struct wl_surface *wl_surface,
|
|
GdkColorStateChanged callback,
|
|
gpointer data);
|
|
|
|
void gdk_wayland_color_surface_free (GdkWaylandColorSurface *self);
|
|
|
|
void gdk_wayland_color_surface_set_color_state (GdkWaylandColorSurface *self,
|
|
GdkColorState *cs);
|
|
|
|
gboolean gdk_wayland_color_surface_can_set_color_state (GdkWaylandColorSurface *self,
|
|
GdkColorState *cs);
|