forked from AuroraMiddleware/gtk
renderer: Make gsk_renderer_is_realized() public
... and add a property for it.
This commit is contained in:
parent
480d8aec06
commit
658588dfe7
@ -4,6 +4,7 @@ gsk_renderer_new_for_surface
|
|||||||
gsk_renderer_get_surface
|
gsk_renderer_get_surface
|
||||||
gsk_renderer_realize
|
gsk_renderer_realize
|
||||||
gsk_renderer_unrealize
|
gsk_renderer_unrealize
|
||||||
|
gsk_renderer_is_realized
|
||||||
gsk_renderer_render
|
gsk_renderer_render
|
||||||
gsk_renderer_render_texture
|
gsk_renderer_render_texture
|
||||||
<SUBSECTION Standard>
|
<SUBSECTION Standard>
|
||||||
|
@ -79,7 +79,9 @@ typedef struct
|
|||||||
G_DEFINE_ABSTRACT_TYPE_WITH_PRIVATE (GskRenderer, gsk_renderer, G_TYPE_OBJECT)
|
G_DEFINE_ABSTRACT_TYPE_WITH_PRIVATE (GskRenderer, gsk_renderer, G_TYPE_OBJECT)
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
PROP_SURFACE = 1,
|
PROP_0,
|
||||||
|
PROP_REALIZED,
|
||||||
|
PROP_SURFACE,
|
||||||
|
|
||||||
N_PROPS
|
N_PROPS
|
||||||
};
|
};
|
||||||
@ -147,6 +149,10 @@ gsk_renderer_get_property (GObject *gobject,
|
|||||||
|
|
||||||
switch (prop_id)
|
switch (prop_id)
|
||||||
{
|
{
|
||||||
|
case PROP_REALIZED:
|
||||||
|
g_value_set_boolean (value, priv->is_realized);
|
||||||
|
break;
|
||||||
|
|
||||||
case PROP_SURFACE:
|
case PROP_SURFACE:
|
||||||
g_value_set_object (value, priv->surface);
|
g_value_set_object (value, priv->surface);
|
||||||
break;
|
break;
|
||||||
@ -170,13 +176,19 @@ gsk_renderer_class_init (GskRendererClass *klass)
|
|||||||
gobject_class->get_property = gsk_renderer_get_property;
|
gobject_class->get_property = gsk_renderer_get_property;
|
||||||
gobject_class->dispose = gsk_renderer_dispose;
|
gobject_class->dispose = gsk_renderer_dispose;
|
||||||
|
|
||||||
|
gsk_renderer_properties[PROP_REALIZED] =
|
||||||
|
g_param_spec_boolean ("realized",
|
||||||
|
"Realized",
|
||||||
|
"The renderer has been associated with a surface",
|
||||||
|
FALSE,
|
||||||
|
G_PARAM_READABLE | G_PARAM_EXPLICIT_NOTIFY | G_PARAM_STATIC_STRINGS);
|
||||||
|
|
||||||
gsk_renderer_properties[PROP_SURFACE] =
|
gsk_renderer_properties[PROP_SURFACE] =
|
||||||
g_param_spec_object ("surface",
|
g_param_spec_object ("surface",
|
||||||
"Surface",
|
"Surface",
|
||||||
"The surface associated to the renderer",
|
"The surface associated to the renderer",
|
||||||
GDK_TYPE_SURFACE,
|
GDK_TYPE_SURFACE,
|
||||||
G_PARAM_READABLE |
|
G_PARAM_READABLE | G_PARAM_EXPLICIT_NOTIFY | G_PARAM_STATIC_STRINGS);
|
||||||
G_PARAM_STATIC_STRINGS);
|
|
||||||
|
|
||||||
g_object_class_install_properties (gobject_class, N_PROPS, gsk_renderer_properties);
|
g_object_class_install_properties (gobject_class, N_PROPS, gsk_renderer_properties);
|
||||||
}
|
}
|
||||||
|
@ -50,6 +50,8 @@ gboolean gsk_renderer_realize (GskRenderer
|
|||||||
GError **error);
|
GError **error);
|
||||||
GDK_AVAILABLE_IN_ALL
|
GDK_AVAILABLE_IN_ALL
|
||||||
void gsk_renderer_unrealize (GskRenderer *renderer);
|
void gsk_renderer_unrealize (GskRenderer *renderer);
|
||||||
|
GDK_AVAILABLE_IN_ALL
|
||||||
|
gboolean gsk_renderer_is_realized (GskRenderer *renderer);
|
||||||
|
|
||||||
GDK_AVAILABLE_IN_ALL
|
GDK_AVAILABLE_IN_ALL
|
||||||
GdkTexture * gsk_renderer_render_texture (GskRenderer *renderer,
|
GdkTexture * gsk_renderer_render_texture (GskRenderer *renderer,
|
||||||
|
@ -51,8 +51,6 @@ struct _GskRendererClass
|
|||||||
const cairo_region_t *invalid);
|
const cairo_region_t *invalid);
|
||||||
};
|
};
|
||||||
|
|
||||||
gboolean gsk_renderer_is_realized (GskRenderer *renderer);
|
|
||||||
|
|
||||||
GskRenderNode * gsk_renderer_get_root_node (GskRenderer *renderer);
|
GskRenderNode * gsk_renderer_get_root_node (GskRenderer *renderer);
|
||||||
|
|
||||||
GskProfiler * gsk_renderer_get_profiler (GskRenderer *renderer);
|
GskProfiler * gsk_renderer_get_profiler (GskRenderer *renderer);
|
||||||
|
Loading…
Reference in New Issue
Block a user