Compare commits
11 Commits
wip/waylan
...
wip/gcampa
Author | SHA1 | Date | |
---|---|---|---|
![]() |
4f56cfb1e6 | ||
![]() |
db7fa793b0 | ||
![]() |
f254879226 | ||
![]() |
94ac7ff02c | ||
![]() |
7332eb3db2 | ||
![]() |
b61e221e8f | ||
![]() |
f278fd92d5 | ||
![]() |
0a1ee4aa54 | ||
![]() |
5a83ef71c9 | ||
![]() |
3e723caabd | ||
![]() |
dbc9303efd |
@@ -48,6 +48,7 @@ libmutter_la_SOURCES = \
|
|||||||
compositor/compositor-private.h \
|
compositor/compositor-private.h \
|
||||||
compositor/meta-background-actor.c \
|
compositor/meta-background-actor.c \
|
||||||
compositor/meta-background-actor-private.h \
|
compositor/meta-background-actor-private.h \
|
||||||
|
compositor/meta-background.c \
|
||||||
compositor/meta-module.c \
|
compositor/meta-module.c \
|
||||||
compositor/meta-module.h \
|
compositor/meta-module.h \
|
||||||
compositor/meta-plugin.c \
|
compositor/meta-plugin.c \
|
||||||
@@ -226,7 +227,7 @@ typelib_DATA = Meta-$(api_version).typelib
|
|||||||
INTROSPECTION_GIRS = Meta-$(api_version).gir
|
INTROSPECTION_GIRS = Meta-$(api_version).gir
|
||||||
|
|
||||||
Meta-$(api_version).gir: libmutter.la
|
Meta-$(api_version).gir: libmutter.la
|
||||||
@META_GIR@_INCLUDES = GObject-2.0 GDesktopEnums-3.0 Gdk-3.0 Gtk-3.0 Clutter-1.0 xlib-2.0 xfixes-4.0 Cogl-1.0
|
@META_GIR@_INCLUDES = GObject-2.0 GDesktopEnums-3.0 Gdk-3.0 Gtk-3.0 Clutter-1.0 xlib-2.0 xfixes-4.0 Cogl-1.0 GnomeDesktop-3.0
|
||||||
@META_GIR@_EXPORT_PACKAGES = libmutter
|
@META_GIR@_EXPORT_PACKAGES = libmutter
|
||||||
@META_GIR@_CFLAGS = $(INCLUDES)
|
@META_GIR@_CFLAGS = $(INCLUDES)
|
||||||
@META_GIR@_LIBS = libmutter.la
|
@META_GIR@_LIBS = libmutter.la
|
||||||
|
@@ -23,47 +23,8 @@
|
|||||||
|
|
||||||
#include "cogl-utils.h"
|
#include "cogl-utils.h"
|
||||||
|
|
||||||
/**
|
#define CLUTTER_ENABLE_EXPERIMENTAL_API
|
||||||
* meta_create_color_texture_4ub:
|
#include <clutter/clutter.h>
|
||||||
* @red:
|
|
||||||
* @green:
|
|
||||||
* @blue:
|
|
||||||
* @alpha:
|
|
||||||
* @flags: Optional flags for the texture, or %COGL_TEXTURE_NONE;
|
|
||||||
* %COGL_TEXTURE_NO_SLICING is useful if the texture will be
|
|
||||||
* repeated to create a constant color fill, since hardware
|
|
||||||
* repeat can't be used for a sliced texture.
|
|
||||||
*
|
|
||||||
* Creates a texture that is a single pixel with the specified
|
|
||||||
* unpremultiplied color components.
|
|
||||||
*
|
|
||||||
* Return value: (transfer full): a newly created Cogl texture
|
|
||||||
*/
|
|
||||||
CoglHandle
|
|
||||||
meta_create_color_texture_4ub (guint8 red,
|
|
||||||
guint8 green,
|
|
||||||
guint8 blue,
|
|
||||||
guint8 alpha,
|
|
||||||
CoglTextureFlags flags)
|
|
||||||
{
|
|
||||||
CoglColor color;
|
|
||||||
guint8 pixel[4];
|
|
||||||
|
|
||||||
cogl_color_set_from_4ub (&color, red, green, blue, alpha);
|
|
||||||
cogl_color_premultiply (&color);
|
|
||||||
|
|
||||||
pixel[0] = cogl_color_get_red_byte (&color);
|
|
||||||
pixel[1] = cogl_color_get_green_byte (&color);
|
|
||||||
pixel[2] = cogl_color_get_blue_byte (&color);
|
|
||||||
pixel[3] = cogl_color_get_alpha_byte (&color);
|
|
||||||
|
|
||||||
return cogl_texture_new_from_data (1, 1,
|
|
||||||
flags,
|
|
||||||
COGL_PIXEL_FORMAT_RGBA_8888_PRE,
|
|
||||||
COGL_PIXEL_FORMAT_ANY,
|
|
||||||
4, pixel);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* Based on gnome-shell/src/st/st-private.c:_st_create_texture_material.c */
|
/* Based on gnome-shell/src/st/st-private.c:_st_create_texture_material.c */
|
||||||
|
|
||||||
@@ -79,32 +40,69 @@ meta_create_color_texture_4ub (guint8 red,
|
|||||||
*
|
*
|
||||||
* Return value: (transfer full): a newly created Cogl material
|
* Return value: (transfer full): a newly created Cogl material
|
||||||
*/
|
*/
|
||||||
CoglHandle
|
CoglPipeline *
|
||||||
meta_create_texture_material (CoglHandle src_texture)
|
meta_create_texture_material (CoglHandle src_texture)
|
||||||
{
|
{
|
||||||
static CoglHandle texture_material_template = COGL_INVALID_HANDLE;
|
static CoglPipeline *texture_material_template = NULL;
|
||||||
CoglHandle material;
|
CoglPipeline *material;
|
||||||
|
|
||||||
/* We use a material that has a dummy texture as a base for all
|
if (G_UNLIKELY (texture_material_template == NULL))
|
||||||
texture materials. The idea is that only the Cogl texture object
|
|
||||||
would be different in the children so it is likely that Cogl will
|
|
||||||
be able to share GL programs between all the textures. */
|
|
||||||
if (G_UNLIKELY (texture_material_template == COGL_INVALID_HANDLE))
|
|
||||||
{
|
{
|
||||||
CoglHandle dummy_texture;
|
ClutterBackend *backend = clutter_get_default_backend ();
|
||||||
|
CoglContext *context = clutter_backend_get_cogl_context (backend);
|
||||||
|
|
||||||
dummy_texture = meta_create_color_texture_4ub (0xff, 0xff, 0xff, 0xff,
|
texture_material_template = cogl_pipeline_new (context);
|
||||||
COGL_TEXTURE_NONE);
|
cogl_pipeline_set_layer_null_texture (texture_material_template,
|
||||||
|
0, COGL_TEXTURE_TYPE_2D);
|
||||||
texture_material_template = cogl_material_new ();
|
|
||||||
cogl_material_set_layer (texture_material_template, 0, dummy_texture);
|
|
||||||
cogl_handle_unref (dummy_texture);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
material = cogl_material_copy (texture_material_template);
|
material = cogl_pipeline_copy (texture_material_template);
|
||||||
|
|
||||||
if (src_texture != COGL_INVALID_HANDLE)
|
if (src_texture != COGL_INVALID_HANDLE)
|
||||||
cogl_material_set_layer (material, 0, src_texture);
|
cogl_pipeline_set_layer_texture (material, 0, src_texture);
|
||||||
|
|
||||||
|
return material;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* meta_create_crossfade_material:
|
||||||
|
* @src_texture_0: (allow-none): the texture to crossfade from
|
||||||
|
* @src_texture_1: (allow-none): the texture to crossfade to
|
||||||
|
*
|
||||||
|
* Creates a material with two layers, using a combine constant to
|
||||||
|
* crossfade between them.
|
||||||
|
*
|
||||||
|
* Return value: (transfer full): a newly created Cogl material
|
||||||
|
*/
|
||||||
|
CoglPipeline *
|
||||||
|
meta_create_crossfade_material (CoglHandle src_texture_0,
|
||||||
|
CoglHandle src_texture_1)
|
||||||
|
{
|
||||||
|
static CoglPipeline *texture_material_template = NULL;
|
||||||
|
CoglPipeline *material;
|
||||||
|
|
||||||
|
if (G_UNLIKELY (texture_material_template == NULL))
|
||||||
|
{
|
||||||
|
ClutterBackend *backend = clutter_get_default_backend ();
|
||||||
|
CoglContext *context = clutter_backend_get_cogl_context (backend);
|
||||||
|
|
||||||
|
texture_material_template = cogl_pipeline_new (context);
|
||||||
|
|
||||||
|
cogl_pipeline_set_layer_null_texture (texture_material_template,
|
||||||
|
0, COGL_TEXTURE_TYPE_2D);
|
||||||
|
cogl_pipeline_set_layer_null_texture (texture_material_template,
|
||||||
|
1, COGL_TEXTURE_TYPE_2D);
|
||||||
|
cogl_pipeline_set_layer_combine (texture_material_template,
|
||||||
|
1, "RGBA = INTERPOLATE (TEXTURE, PREVIOUS, CONSTANT[A])",
|
||||||
|
NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
material = cogl_pipeline_copy (texture_material_template);
|
||||||
|
|
||||||
|
if (src_texture_0 != COGL_INVALID_HANDLE)
|
||||||
|
cogl_pipeline_set_layer_texture (material, 0, src_texture_0);
|
||||||
|
if (src_texture_1 != COGL_INVALID_HANDLE)
|
||||||
|
cogl_pipeline_set_layer_texture (material, 1, src_texture_1);
|
||||||
|
|
||||||
return material;
|
return material;
|
||||||
}
|
}
|
||||||
|
@@ -23,13 +23,11 @@
|
|||||||
#ifndef __META_COGL_UTILS_H__
|
#ifndef __META_COGL_UTILS_H__
|
||||||
#define __META_COGL_UTILS_H__
|
#define __META_COGL_UTILS_H__
|
||||||
|
|
||||||
|
#define COGL_ENABLE_EXPERIMENTAL_API
|
||||||
#include <cogl/cogl.h>
|
#include <cogl/cogl.h>
|
||||||
|
|
||||||
CoglHandle meta_create_color_texture_4ub (guint8 red,
|
CoglPipeline *meta_create_texture_material (CoglHandle src_texture);
|
||||||
guint8 green,
|
CoglPipeline *meta_create_crossfade_material (CoglHandle src_texture_0,
|
||||||
guint8 blue,
|
CoglHandle src_texture_1);
|
||||||
guint8 alpha,
|
|
||||||
CoglTextureFlags flags);
|
|
||||||
CoglHandle meta_create_texture_material (CoglHandle src_texture);
|
|
||||||
|
|
||||||
#endif /* __META_COGL_UTILS_H__ */
|
#endif /* __META_COGL_UTILS_H__ */
|
||||||
|
@@ -40,7 +40,6 @@ struct _MetaCompScreen
|
|||||||
|
|
||||||
ClutterActor *stage, *window_group, *overlay_group;
|
ClutterActor *stage, *window_group, *overlay_group;
|
||||||
ClutterActor *background_actor;
|
ClutterActor *background_actor;
|
||||||
ClutterActor *hidden_group;
|
|
||||||
GList *windows;
|
GList *windows;
|
||||||
GHashTable *windows_by_xid;
|
GHashTable *windows_by_xid;
|
||||||
Window output;
|
Window output;
|
||||||
|
@@ -117,21 +117,6 @@ process_property_notify (MetaCompositor *compositor,
|
|||||||
{
|
{
|
||||||
MetaWindowActor *window_actor;
|
MetaWindowActor *window_actor;
|
||||||
|
|
||||||
if (event->atom == compositor->atom_x_root_pixmap)
|
|
||||||
{
|
|
||||||
GSList *l;
|
|
||||||
|
|
||||||
for (l = meta_display_get_screens (compositor->display); l; l = l->next)
|
|
||||||
{
|
|
||||||
MetaScreen *screen = l->data;
|
|
||||||
if (event->window == meta_screen_get_xroot (screen))
|
|
||||||
{
|
|
||||||
meta_background_actor_update (screen);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (window == NULL)
|
if (window == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@@ -588,22 +573,17 @@ meta_compositor_manage_screen (MetaCompositor *compositor,
|
|||||||
}
|
}
|
||||||
|
|
||||||
info->window_group = meta_window_group_new (screen);
|
info->window_group = meta_window_group_new (screen);
|
||||||
info->background_actor = meta_background_actor_new_for_screen (screen);
|
info->background_actor = meta_background_actor_new (screen, NULL);
|
||||||
info->overlay_group = clutter_group_new ();
|
info->overlay_group = clutter_group_new ();
|
||||||
info->hidden_group = clutter_group_new ();
|
|
||||||
|
|
||||||
clutter_container_add (CLUTTER_CONTAINER (info->window_group),
|
meta_window_group_set_background (META_WINDOW_GROUP (info->window_group),
|
||||||
info->background_actor,
|
META_BACKGROUND_ACTOR (info->background_actor));
|
||||||
NULL);
|
|
||||||
|
|
||||||
clutter_container_add (CLUTTER_CONTAINER (info->stage),
|
clutter_container_add (CLUTTER_CONTAINER (info->stage),
|
||||||
info->window_group,
|
info->window_group,
|
||||||
info->overlay_group,
|
info->overlay_group,
|
||||||
info->hidden_group,
|
|
||||||
NULL);
|
NULL);
|
||||||
|
|
||||||
clutter_actor_hide (info->hidden_group);
|
|
||||||
|
|
||||||
info->plugin_mgr = meta_plugin_manager_new (screen);
|
info->plugin_mgr = meta_plugin_manager_new (screen);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -1202,8 +1182,6 @@ meta_compositor_sync_screen_size (MetaCompositor *compositor,
|
|||||||
|
|
||||||
XResizeWindow (xdisplay, xwin, width, height);
|
XResizeWindow (xdisplay, xwin, width, height);
|
||||||
|
|
||||||
meta_background_actor_screen_size_changed (screen);
|
|
||||||
|
|
||||||
meta_verbose ("Changed size for stage on screen %d to %dx%d\n",
|
meta_verbose ("Changed size for stage on screen %d to %dx%d\n",
|
||||||
meta_screen_get_screen_number (screen),
|
meta_screen_get_screen_number (screen),
|
||||||
width, height);
|
width, height);
|
||||||
|
@@ -9,7 +9,39 @@
|
|||||||
void meta_background_actor_set_visible_region (MetaBackgroundActor *self,
|
void meta_background_actor_set_visible_region (MetaBackgroundActor *self,
|
||||||
cairo_region_t *visible_region);
|
cairo_region_t *visible_region);
|
||||||
|
|
||||||
void meta_background_actor_update (MetaScreen *screen);
|
/**
|
||||||
void meta_background_actor_screen_size_changed (MetaScreen *screen);
|
* MetaBackgroundSlideshow:
|
||||||
|
*
|
||||||
|
* A class for handling animated backgrounds.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define META_TYPE_BACKGROUND_SLIDESHOW (meta_background_slideshow_get_type ())
|
||||||
|
#define META_BACKGROUND_SLIDESHOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), META_TYPE_BACKGROUND_SLIDESHOW, MetaBackgroundSlideshow))
|
||||||
|
#define META_BACKGROUND_SLIDESHOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), META_TYPE_BACKGROUND_SLIDESHOW, MetaBackgroundSlideshowClass))
|
||||||
|
#define META_IS_BACKGROUND_SLIDESHOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), META_TYPE_BACKGROUND_SLIDESHOW))
|
||||||
|
#define META_IS_BACKGROUND_SLIDESHOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), META_TYPE_BACKGROUND_SLIDESHOW))
|
||||||
|
#define META_BACKGROUND_SLIDESHOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), META_TYPE_BACKGROUND_SLIDESHOW, MetaBackgroundSlideshowClass))
|
||||||
|
|
||||||
|
typedef struct _MetaBackgroundSlideshow MetaBackgroundSlideshow;
|
||||||
|
typedef struct _MetaBackgroundSlideshowClass MetaBackgroundSlideshowClass;
|
||||||
|
|
||||||
|
GType meta_background_slideshow_get_type (void) G_GNUC_CONST;
|
||||||
|
|
||||||
|
MetaBackgroundSlideshow *meta_background_slideshow_new (MetaScreen *screen,
|
||||||
|
const char *picture_uri);
|
||||||
|
|
||||||
|
const char *meta_background_slideshow_get_uri (MetaBackgroundSlideshow *slideshow);
|
||||||
|
|
||||||
|
GTask *meta_background_slideshow_draw_async (MetaBackgroundSlideshow *slideshow,
|
||||||
|
GCancellable *cancellable,
|
||||||
|
GAsyncReadyCallback callback,
|
||||||
|
gpointer user_data);
|
||||||
|
CoglHandle meta_background_slideshow_draw_finish (MetaBackgroundSlideshow *slideshow,
|
||||||
|
GAsyncResult *result,
|
||||||
|
GError **error);
|
||||||
|
|
||||||
|
int meta_background_slideshow_get_next_timeout (MetaBackgroundSlideshow *slideshow);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#endif /* META_BACKGROUND_ACTOR_PRIVATE_H */
|
#endif /* META_BACKGROUND_ACTOR_PRIVATE_H */
|
||||||
|
File diff suppressed because it is too large
Load Diff
1005
src/compositor/meta-background.c
Normal file
1005
src/compositor/meta-background.c
Normal file
File diff suppressed because it is too large
Load Diff
@@ -22,6 +22,13 @@ struct _MetaWindowGroup
|
|||||||
ClutterGroup parent;
|
ClutterGroup parent;
|
||||||
|
|
||||||
MetaScreen *screen;
|
MetaScreen *screen;
|
||||||
|
MetaBackgroundActor *background;
|
||||||
|
};
|
||||||
|
|
||||||
|
enum {
|
||||||
|
PROP_0,
|
||||||
|
PROP_BACKGROUND,
|
||||||
|
PROP_LAST
|
||||||
};
|
};
|
||||||
|
|
||||||
G_DEFINE_TYPE (MetaWindowGroup, meta_window_group, CLUTTER_TYPE_GROUP);
|
G_DEFINE_TYPE (MetaWindowGroup, meta_window_group, CLUTTER_TYPE_GROUP);
|
||||||
@@ -270,7 +277,8 @@ meta_window_group_paint (ClutterActor *actor)
|
|||||||
if (clutter_actor_has_effects (l->data))
|
if (clutter_actor_has_effects (l->data))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (META_IS_WINDOW_ACTOR (l->data))
|
if (l->data != window_group->background &&
|
||||||
|
META_IS_WINDOW_ACTOR (l->data))
|
||||||
{
|
{
|
||||||
MetaWindowActor *window_actor = l->data;
|
MetaWindowActor *window_actor = l->data;
|
||||||
int x, y;
|
int x, y;
|
||||||
@@ -296,7 +304,7 @@ meta_window_group_paint (ClutterActor *actor)
|
|||||||
meta_window_actor_set_visible_region_beneath (window_actor, visible_region);
|
meta_window_actor_set_visible_region_beneath (window_actor, visible_region);
|
||||||
cairo_region_translate (visible_region, x, y);
|
cairo_region_translate (visible_region, x, y);
|
||||||
}
|
}
|
||||||
else if (META_IS_BACKGROUND_ACTOR (l->data))
|
else if (l->data == window_group->background)
|
||||||
{
|
{
|
||||||
MetaBackgroundActor *background_actor = l->data;
|
MetaBackgroundActor *background_actor = l->data;
|
||||||
int x, y;
|
int x, y;
|
||||||
@@ -322,12 +330,13 @@ meta_window_group_paint (ClutterActor *actor)
|
|||||||
*/
|
*/
|
||||||
for (l = children; l; l = l->next)
|
for (l = children; l; l = l->next)
|
||||||
{
|
{
|
||||||
if (META_IS_WINDOW_ACTOR (l->data))
|
if (l->data != window_group->background &&
|
||||||
|
META_IS_WINDOW_ACTOR (l->data))
|
||||||
{
|
{
|
||||||
MetaWindowActor *window_actor = l->data;
|
MetaWindowActor *window_actor = l->data;
|
||||||
meta_window_actor_reset_visible_regions (window_actor);
|
meta_window_actor_reset_visible_regions (window_actor);
|
||||||
}
|
}
|
||||||
else if (META_IS_BACKGROUND_ACTOR (l->data))
|
else if (l->data == window_group->background)
|
||||||
{
|
{
|
||||||
MetaBackgroundActor *background_actor = l->data;
|
MetaBackgroundActor *background_actor = l->data;
|
||||||
meta_background_actor_set_visible_region (background_actor, NULL);
|
meta_background_actor_set_visible_region (background_actor, NULL);
|
||||||
@@ -337,12 +346,70 @@ meta_window_group_paint (ClutterActor *actor)
|
|||||||
g_list_free (children);
|
g_list_free (children);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
meta_window_group_set_background (MetaWindowGroup *self,
|
||||||
|
MetaBackgroundActor *actor)
|
||||||
|
{
|
||||||
|
self->background = actor;
|
||||||
|
clutter_actor_add_child (CLUTTER_ACTOR (self),
|
||||||
|
CLUTTER_ACTOR (actor));
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
meta_window_group_get_property (GObject *object,
|
||||||
|
guint prop_id,
|
||||||
|
GValue *value,
|
||||||
|
GParamSpec *pspec)
|
||||||
|
{
|
||||||
|
MetaWindowGroup *self = META_WINDOW_GROUP (object);
|
||||||
|
|
||||||
|
switch (prop_id)
|
||||||
|
{
|
||||||
|
case PROP_BACKGROUND:
|
||||||
|
g_value_set_object (value, self->background);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
meta_window_group_set_property (GObject *object,
|
||||||
|
guint prop_id,
|
||||||
|
const GValue *value,
|
||||||
|
GParamSpec *pspec)
|
||||||
|
{
|
||||||
|
MetaWindowGroup *self = META_WINDOW_GROUP (object);
|
||||||
|
|
||||||
|
switch (prop_id)
|
||||||
|
{
|
||||||
|
case PROP_BACKGROUND:
|
||||||
|
meta_window_group_set_background (self, g_value_get_object (value));
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
meta_window_group_class_init (MetaWindowGroupClass *klass)
|
meta_window_group_class_init (MetaWindowGroupClass *klass)
|
||||||
{
|
{
|
||||||
|
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
||||||
ClutterActorClass *actor_class = CLUTTER_ACTOR_CLASS (klass);
|
ClutterActorClass *actor_class = CLUTTER_ACTOR_CLASS (klass);
|
||||||
|
|
||||||
|
object_class->get_property = meta_window_group_get_property;
|
||||||
|
object_class->set_property = meta_window_group_set_property;
|
||||||
|
|
||||||
actor_class->paint = meta_window_group_paint;
|
actor_class->paint = meta_window_group_paint;
|
||||||
|
|
||||||
|
g_object_class_install_property (object_class, PROP_BACKGROUND,
|
||||||
|
g_param_spec_object ("background",
|
||||||
|
"Background actor",
|
||||||
|
"The primary background actor",
|
||||||
|
META_TYPE_BACKGROUND_ACTOR,
|
||||||
|
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@@ -6,6 +6,7 @@
|
|||||||
#include <clutter/clutter.h>
|
#include <clutter/clutter.h>
|
||||||
|
|
||||||
#include <meta/screen.h>
|
#include <meta/screen.h>
|
||||||
|
#include <meta/meta-background-actor.h>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* MetaWindowGroup:
|
* MetaWindowGroup:
|
||||||
@@ -49,4 +50,7 @@ GType meta_window_group_get_type (void);
|
|||||||
|
|
||||||
ClutterActor *meta_window_group_new (MetaScreen *screen);
|
ClutterActor *meta_window_group_new (MetaScreen *screen);
|
||||||
|
|
||||||
|
void meta_window_group_set_background (MetaWindowGroup *group,
|
||||||
|
MetaBackgroundActor *background);
|
||||||
|
|
||||||
#endif /* META_WINDOW_GROUP_H */
|
#endif /* META_WINDOW_GROUP_H */
|
||||||
|
@@ -60,7 +60,8 @@ struct _MetaBackgroundActor
|
|||||||
|
|
||||||
GType meta_background_actor_get_type (void);
|
GType meta_background_actor_get_type (void);
|
||||||
|
|
||||||
ClutterActor *meta_background_actor_new_for_screen (MetaScreen *screen);
|
ClutterActor *meta_background_actor_new (MetaScreen *screen,
|
||||||
|
GSettings *settings);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* MetaSnippetHook:
|
* MetaSnippetHook:
|
||||||
@@ -83,18 +84,4 @@ typedef enum {
|
|||||||
META_SNIPPET_HOOK_TEXTURE_LOOKUP
|
META_SNIPPET_HOOK_TEXTURE_LOOKUP
|
||||||
} MetaSnippetHook;
|
} MetaSnippetHook;
|
||||||
|
|
||||||
|
|
||||||
void meta_background_actor_add_glsl_snippet (MetaBackgroundActor *actor,
|
|
||||||
MetaSnippetHook hook,
|
|
||||||
const char *declarations,
|
|
||||||
const char *code,
|
|
||||||
gboolean is_replace);
|
|
||||||
|
|
||||||
void meta_background_actor_set_uniform_float (MetaBackgroundActor *actor,
|
|
||||||
const char *uniform_name,
|
|
||||||
int n_components,
|
|
||||||
int count,
|
|
||||||
const float *uniform,
|
|
||||||
int uniform_length);
|
|
||||||
|
|
||||||
#endif /* META_BACKGROUND_ACTOR_H */
|
#endif /* META_BACKGROUND_ACTOR_H */
|
||||||
|
Reference in New Issue
Block a user