{
PROP_SURFACE = 1,
PROP_SURFACE_WIDTH,
- PROP_SURFACE_HEIGHT
+ PROP_SURFACE_HEIGHT,
+ PROP_COGL_TEXTURE,
+ PROP_LAST
};
+static GParamSpec *obj_props[PROP_LAST];
+
#if 0
enum
{
if (priv->width != width)
{
priv->width = width;
- g_object_notify (G_OBJECT (self), "surface-width");
+ g_object_notify_by_pspec (G_OBJECT (self), obj_props[PROP_SURFACE_WIDTH]);
}
if (priv->height != height)
{
priv->height = height;
- g_object_notify (G_OBJECT (self), "surface-height");
+ g_object_notify_by_pspec (G_OBJECT (self), obj_props[PROP_SURFACE_HEIGHT]);
}
clutter_actor_set_size (CLUTTER_ACTOR (self), priv->width, priv->height);
/* XXX: should we freeze/thaw notifications? */
- g_object_notify (G_OBJECT (self), "surface");
+ g_object_notify_by_pspec (G_OBJECT (self), obj_props[PROP_SURFACE]);
/* We have to wait until the next attach event to find out the surface
* geometry... */
P_("The underlying wayland surface"),
CLUTTER_PARAM_READWRITE|
G_PARAM_CONSTRUCT_ONLY);
-
+ obj_props[PROP_SURFACE] = pspec;
g_object_class_install_property (object_class, PROP_SURFACE, pspec);
pspec = g_param_spec_uint ("surface-width",
0, G_MAXUINT,
0,
G_PARAM_READABLE);
-
+ obj_props[PROP_SURFACE_WIDTH] = pspec;
g_object_class_install_property (object_class, PROP_SURFACE_WIDTH, pspec);
pspec = g_param_spec_uint ("surface-height",
0, G_MAXUINT,
0,
G_PARAM_READABLE);
-
+ obj_props[PROP_SURFACE_HEIGHT] = pspec;
g_object_class_install_property (object_class, PROP_SURFACE_HEIGHT, pspec);
+
+ pspec = g_param_spec_boxed ("cogl-texture",
+ P_("Cogl Texture"),
+ P_("The underlying Cogl texture handle used to draw this actor"),
+ COGL_TYPE_HANDLE,
+ CLUTTER_PARAM_READWRITE);
+ obj_props[PROP_COGL_TEXTURE] = pspec;
+ g_object_class_install_property (object_class, PROP_COGL_TEXTURE, pspec);
}
/**
clutter_actor_queue_redraw (CLUTTER_ACTOR (self));
+ g_object_notify_by_pspec (G_OBJECT (self), obj_props[PROP_COGL_TEXTURE]);
+
if (!priv->buffer)
return FALSE;
clutter_wayland_surface_queue_damage_redraw (self, x, y, width, height);
}
+
+CoglTexture *
+clutter_wayland_surface_get_cogl_texture (ClutterWaylandSurface *self)
+{
+ g_return_val_if_fail (CLUTTER_WAYLAND_IS_SURFACE (self), NULL);
+
+ return COGL_TEXTURE (self->priv->buffer);
+}