window-actor: Turn into a derivable class

We will introduce specialized MetaWindowActors for X11
and Wayland in the future, so it needs to be derivable.

Make it a derivable class, and introduce a private field.
The MetaWindowActorClass definition is in the private
header in order to prevent external consumers of Mutter
to create MetaWindowActor implementations of their own.
That is, MetaWindowActor is only internally derivable.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/368
This commit is contained in:
Georges Basile Stavracas Neto 2018-12-21 18:12:49 -02:00
parent 2fe05d7c35
commit 60f7ff3a69
No known key found for this signature in database
GPG Key ID: 886C17EE170D1385
3 changed files with 408 additions and 250 deletions

View File

@ -9,6 +9,11 @@
#include "compositor/meta-surface-actor.h" #include "compositor/meta-surface-actor.h"
#include "meta/compositor-mutter.h" #include "meta/compositor-mutter.h"
struct _MetaWindowActorClass
{
ClutterActorClass parent;
};
MetaWindowActor *meta_window_actor_new (MetaWindow *window); MetaWindowActor *meta_window_actor_new (MetaWindow *window);
void meta_window_actor_queue_destroy (MetaWindowActor *self); void meta_window_actor_queue_destroy (MetaWindowActor *self);

File diff suppressed because it is too large Load Diff

View File

@ -29,11 +29,10 @@
#include "meta/compositor.h" #include "meta/compositor.h"
#define META_TYPE_WINDOW_ACTOR (meta_window_actor_get_type ()) #define META_TYPE_WINDOW_ACTOR (meta_window_actor_get_type ())
G_DECLARE_FINAL_TYPE (MetaWindowActor, G_DECLARE_DERIVABLE_TYPE (MetaWindowActor,
meta_window_actor, meta_window_actor,
META, WINDOW_ACTOR, META, WINDOW_ACTOR,
ClutterActor) ClutterActor)
Window meta_window_actor_get_x_window (MetaWindowActor *self); Window meta_window_actor_get_x_window (MetaWindowActor *self);
MetaWindow * meta_window_actor_get_meta_window (MetaWindowActor *self); MetaWindow * meta_window_actor_get_meta_window (MetaWindowActor *self);