7 #include <wayland-client.h>
20 FlSubsurface*
self = FL_SUBSURFACE(
object);
22 g_clear_pointer(&self->subsurface, wl_subsurface_destroy);
23 g_clear_pointer(&self->surface, wl_surface_destroy);
25 G_OBJECT_CLASS(fl_subsurface_parent_class)->dispose(
object);
35 struct wl_subcompositor* subcompositor,
36 struct wl_surface* parent_surface) {
38 FL_SUBSURFACE(g_object_new(fl_subsurface_get_type(),
nullptr));
40 self->surface = wl_compositor_create_surface(compositor);
41 self->subsurface = wl_subcompositor_get_subsurface(
42 subcompositor, self->surface, parent_surface);
43 wl_subsurface_set_sync(self->subsurface);
48 struct wl_region* input_region = wl_compositor_create_region(compositor);
49 wl_surface_set_input_region(self->surface, input_region);
50 wl_region_destroy(input_region);
56 g_return_val_if_fail(FL_IS_SUBSURFACE(
self),
nullptr);
61 g_return_if_fail(FL_IS_SUBSURFACE(
self));
62 wl_subsurface_set_position(self->subsurface, x, y);
G_DEFINE_TYPE(FlBasicMessageChannelResponseHandle, fl_basic_message_channel_response_handle, G_TYPE_OBJECT) static void fl_basic_message_channel_response_handle_dispose(GObject *object)
static void fl_subsurface_init(FlSubsurface *self)
static void fl_subsurface_class_init(FlSubsurfaceClass *klass)
FlSubsurface * fl_subsurface_new(struct wl_compositor *compositor, struct wl_subcompositor *subcompositor, struct wl_surface *parent_surface)
void fl_subsurface_set_position(FlSubsurface *self, gint x, gint y)
static void fl_subsurface_dispose(GObject *object)
struct wl_surface * fl_subsurface_get_surface(FlSubsurface *self)
struct wl_surface * surface
struct wl_subsurface * subsurface