shell: Use G_DECLARE_*_TYPE macros

Cut down on boilerplate by using the (no longer that) new helper
macros. We don't care about breaking ABI in private libraries, so
use G_DECLARE_FINAL_TYPE even where the class struct used to be
exposed in the header, except for types we inherit from ourselves
(obviously) or where the class exposes any vfuncs (where changes
could affect inheritance in extensions).
This commit is contained in:
Florian Müllner 2015-09-24 20:07:44 +02:00
parent 58f3b7c748
commit 294702d3f1
33 changed files with 183 additions and 413 deletions

View File

@ -37,6 +37,15 @@ enum {
static guint signals[LAST_SIGNAL] = { 0 }; static guint signals[LAST_SIGNAL] = { 0 };
typedef struct _ShellAppSystemPrivate ShellAppSystemPrivate;
struct _ShellAppSystem
{
GObject parent;
ShellAppSystemPrivate *priv;
};
struct _ShellAppSystemPrivate { struct _ShellAppSystemPrivate {
GHashTable *running_apps; GHashTable *running_apps;
GHashTable *id_to_app; GHashTable *id_to_app;

View File

@ -9,29 +9,9 @@
#include "shell-app.h" #include "shell-app.h"
#define SHELL_TYPE_APP_SYSTEM (shell_app_system_get_type ()) #define SHELL_TYPE_APP_SYSTEM (shell_app_system_get_type ())
#define SHELL_APP_SYSTEM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SHELL_TYPE_APP_SYSTEM, ShellAppSystem)) G_DECLARE_FINAL_TYPE (ShellAppSystem, shell_app_system,
#define SHELL_APP_SYSTEM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SHELL_TYPE_APP_SYSTEM, ShellAppSystemClass)) SHELL, APP_SYSTEM, GObject)
#define SHELL_IS_APP_SYSTEM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SHELL_TYPE_APP_SYSTEM))
#define SHELL_IS_APP_SYSTEM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SHELL_TYPE_APP_SYSTEM))
#define SHELL_APP_SYSTEM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SHELL_TYPE_APP_SYSTEM, ShellAppSystemClass))
typedef struct _ShellAppSystem ShellAppSystem;
typedef struct _ShellAppSystemClass ShellAppSystemClass;
typedef struct _ShellAppSystemPrivate ShellAppSystemPrivate;
struct _ShellAppSystem
{
GObject parent;
ShellAppSystemPrivate *priv;
};
struct _ShellAppSystemClass
{
GObjectClass parent_class;
};
GType shell_app_system_get_type (void) G_GNUC_CONST;
ShellAppSystem *shell_app_system_get_default (void); ShellAppSystem *shell_app_system_get_default (void);
ShellApp *shell_app_system_lookup_app (ShellAppSystem *system, ShellApp *shell_app_system_lookup_app (ShellAppSystem *system,

View File

@ -7,23 +7,9 @@
G_BEGIN_DECLS G_BEGIN_DECLS
typedef struct _ShellAppUsage ShellAppUsage;
typedef struct _ShellAppUsageClass ShellAppUsageClass;
typedef struct _ShellAppUsagePrivate ShellAppUsagePrivate;
#define SHELL_TYPE_APP_USAGE (shell_app_usage_get_type ()) #define SHELL_TYPE_APP_USAGE (shell_app_usage_get_type ())
#define SHELL_APP_USAGE(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), SHELL_TYPE_APP_USAGE, ShellAppUsage)) G_DECLARE_FINAL_TYPE (ShellAppUsage, shell_app_usage,
#define SHELL_APP_USAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SHELL_TYPE_APP_USAGE, ShellAppUsageClass)) SHELL, APP_USAGE, GObject)
#define SHELL_IS_APP_USAGE(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), SHELL_TYPE_APP_USAGE))
#define SHELL_IS_APP_USAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SHELL_TYPE_APP_USAGE))
#define SHELL_APP_USAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SHELL_TYPE_APP_USAGE, ShellAppUsageClass))
struct _ShellAppUsageClass
{
GObjectClass parent_class;
};
GType shell_app_usage_get_type (void) G_GNUC_CONST;
ShellAppUsage* shell_app_usage_get_default(void); ShellAppUsage* shell_app_usage_get_default(void);

View File

@ -9,23 +9,8 @@
G_BEGIN_DECLS G_BEGIN_DECLS
typedef struct _ShellApp ShellApp;
typedef struct _ShellAppClass ShellAppClass;
typedef struct _ShellAppPrivate ShellAppPrivate;
typedef struct _ShellAppAction ShellAppAction;
#define SHELL_TYPE_APP (shell_app_get_type ()) #define SHELL_TYPE_APP (shell_app_get_type ())
#define SHELL_APP(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), SHELL_TYPE_APP, ShellApp)) G_DECLARE_FINAL_TYPE (ShellApp, shell_app, SHELL, APP, GObject)
#define SHELL_APP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SHELL_TYPE_APP, ShellAppClass))
#define SHELL_IS_APP(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), SHELL_TYPE_APP))
#define SHELL_IS_APP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SHELL_TYPE_APP))
#define SHELL_APP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SHELL_TYPE_APP, ShellAppClass))
struct _ShellAppClass
{
GObjectClass parent_class;
};
typedef enum { typedef enum {
SHELL_APP_STATE_STOPPED, SHELL_APP_STATE_STOPPED,
@ -33,8 +18,6 @@ typedef enum {
SHELL_APP_STATE_RUNNING SHELL_APP_STATE_RUNNING
} ShellAppState; } ShellAppState;
GType shell_app_get_type (void) G_GNUC_CONST;
const char *shell_app_get_id (ShellApp *app); const char *shell_app_get_id (ShellApp *app);
GDesktopAppInfo *shell_app_get_app_info (ShellApp *app); GDesktopAppInfo *shell_app_get_app_info (ShellApp *app);

View File

@ -27,6 +27,8 @@ enum {
PROP_0 PROP_0
}; };
typedef struct _ShellEmbeddedWindowPrivate ShellEmbeddedWindowPrivate;
struct _ShellEmbeddedWindowPrivate { struct _ShellEmbeddedWindowPrivate {
ShellGtkEmbed *actor; ShellGtkEmbed *actor;
@ -49,19 +51,22 @@ static void
shell_embedded_window_show (GtkWidget *widget) shell_embedded_window_show (GtkWidget *widget)
{ {
ShellEmbeddedWindow *window = SHELL_EMBEDDED_WINDOW (widget); ShellEmbeddedWindow *window = SHELL_EMBEDDED_WINDOW (widget);
ShellEmbeddedWindowPrivate *priv;
GtkWidgetClass *widget_class; GtkWidgetClass *widget_class;
priv = shell_embedded_window_get_instance_private (window);
/* Skip GtkWindow, but run the default GtkWidget handling which /* Skip GtkWindow, but run the default GtkWidget handling which
* marks the widget visible */ * marks the widget visible */
widget_class = g_type_class_peek (GTK_TYPE_WIDGET); widget_class = g_type_class_peek (GTK_TYPE_WIDGET);
widget_class->show (widget); widget_class->show (widget);
if (window->priv->actor) if (priv->actor)
{ {
/* Size is 0x0 if the GtkWindow is not shown */ /* Size is 0x0 if the GtkWindow is not shown */
clutter_actor_queue_relayout (CLUTTER_ACTOR (window->priv->actor)); clutter_actor_queue_relayout (CLUTTER_ACTOR (priv->actor));
if (clutter_actor_is_realized (CLUTTER_ACTOR (window->priv->actor))) if (clutter_actor_is_realized (CLUTTER_ACTOR (priv->actor)))
gtk_widget_map (widget); gtk_widget_map (widget);
} }
} }
@ -70,9 +75,12 @@ static void
shell_embedded_window_hide (GtkWidget *widget) shell_embedded_window_hide (GtkWidget *widget)
{ {
ShellEmbeddedWindow *window = SHELL_EMBEDDED_WINDOW (widget); ShellEmbeddedWindow *window = SHELL_EMBEDDED_WINDOW (widget);
ShellEmbeddedWindowPrivate *priv;
if (window->priv->actor) priv = shell_embedded_window_get_instance_private (window);
clutter_actor_queue_relayout (CLUTTER_ACTOR (window->priv->actor));
if (priv->actor)
clutter_actor_queue_relayout (CLUTTER_ACTOR (priv->actor));
GTK_WIDGET_CLASS (shell_embedded_window_parent_class)->hide (widget); GTK_WIDGET_CLASS (shell_embedded_window_parent_class)->hide (widget);
} }
@ -92,6 +100,9 @@ static void
shell_embedded_window_check_resize (GtkContainer *container) shell_embedded_window_check_resize (GtkContainer *container)
{ {
ShellEmbeddedWindow *window = SHELL_EMBEDDED_WINDOW (container); ShellEmbeddedWindow *window = SHELL_EMBEDDED_WINDOW (container);
ShellEmbeddedWindowPrivate *priv;
priv = shell_embedded_window_get_instance_private (window);
/* Check resize is called when a resize is queued on something /* Check resize is called when a resize is queued on something
* inside the GtkWindow; we need to make sure that in response * inside the GtkWindow; we need to make sure that in response
@ -99,8 +110,8 @@ shell_embedded_window_check_resize (GtkContainer *container)
* gtk_widget_size_allocate() are called; we defer to the Clutter * gtk_widget_size_allocate() are called; we defer to the Clutter
* logic and assume it will do the right thing. * logic and assume it will do the right thing.
*/ */
if (window->priv->actor) if (priv->actor)
clutter_actor_queue_relayout (CLUTTER_ACTOR (window->priv->actor)); clutter_actor_queue_relayout (CLUTTER_ACTOR (priv->actor));
} }
static GObject * static GObject *
@ -148,7 +159,6 @@ shell_embedded_window_class_init (ShellEmbeddedWindowClass *klass)
static void static void
shell_embedded_window_init (ShellEmbeddedWindow *window) shell_embedded_window_init (ShellEmbeddedWindow *window)
{ {
window->priv = shell_embedded_window_get_instance_private (window);
} }
/* /*
@ -160,9 +170,12 @@ _shell_embedded_window_set_actor (ShellEmbeddedWindow *window,
ShellGtkEmbed *actor) ShellGtkEmbed *actor)
{ {
ShellEmbeddedWindowPrivate *priv;
g_return_if_fail (SHELL_IS_EMBEDDED_WINDOW (window)); g_return_if_fail (SHELL_IS_EMBEDDED_WINDOW (window));
window->priv->actor = actor; priv = shell_embedded_window_get_instance_private (window);
priv->actor = actor;
if (actor && if (actor &&
clutter_actor_is_mapped (CLUTTER_ACTOR (actor)) && clutter_actor_is_mapped (CLUTTER_ACTOR (actor)) &&
@ -177,20 +190,23 @@ _shell_embedded_window_allocate (ShellEmbeddedWindow *window,
int width, int width,
int height) int height)
{ {
ShellEmbeddedWindowPrivate *priv;
GtkAllocation allocation; GtkAllocation allocation;
g_return_if_fail (SHELL_IS_EMBEDDED_WINDOW (window)); g_return_if_fail (SHELL_IS_EMBEDDED_WINDOW (window));
if (window->priv->position.x == x && priv = shell_embedded_window_get_instance_private (window);
window->priv->position.y == y &&
window->priv->position.width == width && if (priv->position.x == x &&
window->priv->position.height == height) priv->position.y == y &&
priv->position.width == width &&
priv->position.height == height)
return; return;
window->priv->position.x = x; priv->position.x = x;
window->priv->position.y = y; priv->position.y = y;
window->priv->position.width = width; priv->position.width = width;
window->priv->position.height = height; priv->position.height = height;
if (gtk_widget_get_realized (GTK_WIDGET (window))) if (gtk_widget_get_realized (GTK_WIDGET (window)))
gdk_window_move_resize (gtk_widget_get_window (GTK_WIDGET (window)), gdk_window_move_resize (gtk_widget_get_window (GTK_WIDGET (window)),

View File

@ -6,30 +6,14 @@
#include <clutter/clutter.h> #include <clutter/clutter.h>
#define SHELL_TYPE_EMBEDDED_WINDOW (shell_embedded_window_get_type ()) #define SHELL_TYPE_EMBEDDED_WINDOW (shell_embedded_window_get_type ())
#define SHELL_EMBEDDED_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SHELL_TYPE_EMBEDDED_WINDOW, ShellEmbeddedWindow)) G_DECLARE_DERIVABLE_TYPE (ShellEmbeddedWindow, shell_embedded_window,
#define SHELL_EMBEDDED_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SHELL_TYPE_EMBEDDED_WINDOW, ShellEmbeddedWindowClass)) SHELL, EMBEDDED_WINDOW, GtkWindow)
#define SHELL_IS_EMBEDDED_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SHELL_TYPE_EMBEDDED_WINDOW))
#define SHELL_IS_EMBEDDED_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SHELL_TYPE_EMBEDDED_WINDOW))
#define SHELL_EMBEDDED_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SHELL_TYPE_EMBEDDED_WINDOW, ShellEmbeddedWindowClass))
typedef struct _ShellEmbeddedWindow ShellEmbeddedWindow;
typedef struct _ShellEmbeddedWindowClass ShellEmbeddedWindowClass;
typedef struct _ShellEmbeddedWindowPrivate ShellEmbeddedWindowPrivate;
struct _ShellEmbeddedWindow
{
GtkWindow parent;
ShellEmbeddedWindowPrivate *priv;
};
struct _ShellEmbeddedWindowClass struct _ShellEmbeddedWindowClass
{ {
GtkWindowClass parent_class; GtkWindowClass parent_class;
}; };
GType shell_embedded_window_get_type (void) G_GNUC_CONST;
GtkWidget *shell_embedded_window_new (void); GtkWidget *shell_embedded_window_new (void);
#endif /* __SHELL_EMBEDDED_WINDOW_H__ */ #endif /* __SHELL_EMBEDDED_WINDOW_H__ */

View File

@ -23,6 +23,15 @@
static void shell_generic_container_iface_init (ClutterContainerIface *iface); static void shell_generic_container_iface_init (ClutterContainerIface *iface);
typedef struct _ShellGenericContainerPrivate ShellGenericContainerPrivate;
struct _ShellGenericContainer
{
StWidget parent;
ShellGenericContainerPrivate *priv;
};
struct _ShellGenericContainerPrivate { struct _ShellGenericContainerPrivate {
GHashTable *skip_paint; GHashTable *skip_paint;
}; };

View File

@ -5,11 +5,8 @@
#include "st.h" #include "st.h"
#define SHELL_TYPE_GENERIC_CONTAINER (shell_generic_container_get_type ()) #define SHELL_TYPE_GENERIC_CONTAINER (shell_generic_container_get_type ())
#define SHELL_GENERIC_CONTAINER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SHELL_TYPE_GENERIC_CONTAINER, ShellGenericContainer)) G_DECLARE_FINAL_TYPE (ShellGenericContainer, shell_generic_container,
#define SHELL_GENERIC_CONTAINER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SHELL_TYPE_GENERIC_CONTAINER, ShellGenericContainerClass)) SHELL, GENERIC_CONTAINER, StWidget)
#define SHELL_IS_GENERIC_CONTAINER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SHELL_TYPE_GENERIC_CONTAINER))
#define SHELL_IS_GENERIC_CONTAINER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SHELL_TYPE_GENERIC_CONTAINER))
#define SHELL_GENERIC_CONTAINER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SHELL_TYPE_GENERIC_CONTAINER, ShellGenericContainerClass))
typedef struct { typedef struct {
float min_size; float min_size;
@ -22,25 +19,6 @@ typedef struct {
#define SHELL_TYPE_GENERIC_CONTAINER_ALLOCATION (shell_generic_container_allocation_get_type ()) #define SHELL_TYPE_GENERIC_CONTAINER_ALLOCATION (shell_generic_container_allocation_get_type ())
GType shell_generic_container_allocation_get_type (void); GType shell_generic_container_allocation_get_type (void);
typedef struct _ShellGenericContainer ShellGenericContainer;
typedef struct _ShellGenericContainerClass ShellGenericContainerClass;
typedef struct _ShellGenericContainerPrivate ShellGenericContainerPrivate;
struct _ShellGenericContainer
{
StWidget parent;
ShellGenericContainerPrivate *priv;
};
struct _ShellGenericContainerClass
{
StWidgetClass parent_class;
};
GType shell_generic_container_get_type (void) G_GNUC_CONST;
guint shell_generic_container_get_n_skip_paint (ShellGenericContainer *self); guint shell_generic_container_get_n_skip_paint (ShellGenericContainer *self);
gboolean shell_generic_container_get_skip_paint (ShellGenericContainer *self, gboolean shell_generic_container_get_skip_paint (ShellGenericContainer *self,

View File

@ -10,22 +10,8 @@
G_BEGIN_DECLS G_BEGIN_DECLS
typedef struct _ShellGlobal ShellGlobal;
typedef struct _ShellGlobalClass ShellGlobalClass;
#define SHELL_TYPE_GLOBAL (shell_global_get_type ()) #define SHELL_TYPE_GLOBAL (shell_global_get_type ())
#define SHELL_GLOBAL(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), SHELL_TYPE_GLOBAL, ShellGlobal)) G_DECLARE_FINAL_TYPE (ShellGlobal, shell_global, SHELL, GLOBAL, GObject)
#define SHELL_GLOBAL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SHELL_TYPE_GLOBAL, ShellGlobalClass))
#define SHELL_IS_GLOBAL(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), SHELL_TYPE_GLOBAL))
#define SHELL_IS_GLOBAL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SHELL_TYPE_GLOBAL))
#define SHELL_GLOBAL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SHELL_TYPE_GLOBAL, ShellGlobalClass))
struct _ShellGlobalClass
{
GObjectClass parent_class;
};
GType shell_global_get_type (void) G_GNUC_CONST;
ShellGlobal *shell_global_get (void); ShellGlobal *shell_global_get (void);

View File

@ -16,6 +16,7 @@
#include <cogl/cogl.h> #include <cogl/cogl.h>
#include "shell-glsl-quad.h" #include "shell-glsl-quad.h"
typedef struct _ShellGLSLQuadPrivate ShellGLSLQuadPrivate;
struct _ShellGLSLQuadPrivate struct _ShellGLSLQuadPrivate
{ {
CoglPipeline *pipeline; CoglPipeline *pipeline;
@ -38,7 +39,7 @@ shell_glsl_quad_paint (ClutterActor *actor)
guint8 paint_opacity; guint8 paint_opacity;
ClutterActorBox box; ClutterActorBox box;
priv = self->priv; priv = shell_glsl_quad_get_instance_private (self);
paint_opacity = clutter_actor_get_paint_opacity (actor); paint_opacity = clutter_actor_get_paint_opacity (actor);
clutter_actor_get_allocation_box (actor, &box); clutter_actor_get_allocation_box (actor, &box);
@ -106,7 +107,7 @@ shell_glsl_quad_dispose (GObject *gobject)
ShellGLSLQuad *self = SHELL_GLSL_QUAD (gobject); ShellGLSLQuad *self = SHELL_GLSL_QUAD (gobject);
ShellGLSLQuadPrivate *priv; ShellGLSLQuadPrivate *priv;
priv = self->priv; priv = shell_glsl_quad_get_instance_private (self);
g_clear_pointer (&priv->pipeline, cogl_object_unref); g_clear_pointer (&priv->pipeline, cogl_object_unref);
@ -116,7 +117,6 @@ shell_glsl_quad_dispose (GObject *gobject)
static void static void
shell_glsl_quad_init (ShellGLSLQuad *quad) shell_glsl_quad_init (ShellGLSLQuad *quad)
{ {
quad->priv = shell_glsl_quad_get_instance_private (quad);
} }
static void static void
@ -124,6 +124,7 @@ shell_glsl_quad_constructed (GObject *object)
{ {
ShellGLSLQuad *self; ShellGLSLQuad *self;
ShellGLSLQuadClass *klass; ShellGLSLQuadClass *klass;
ShellGLSLQuadPrivate *priv;
CoglContext *ctx = CoglContext *ctx =
clutter_backend_get_cogl_context (clutter_get_default_backend ()); clutter_backend_get_cogl_context (clutter_get_default_backend ());
@ -135,6 +136,7 @@ shell_glsl_quad_constructed (GObject *object)
*/ */
klass = SHELL_GLSL_QUAD_GET_CLASS (object); klass = SHELL_GLSL_QUAD_GET_CLASS (object);
self = SHELL_GLSL_QUAD (object); self = SHELL_GLSL_QUAD (object);
priv = shell_glsl_quad_get_instance_private (self);
if (G_UNLIKELY (klass->base_pipeline == NULL)) if (G_UNLIKELY (klass->base_pipeline == NULL))
{ {
@ -145,9 +147,9 @@ shell_glsl_quad_constructed (GObject *object)
klass->build_pipeline (self); klass->build_pipeline (self);
} }
self->priv->pipeline = cogl_pipeline_copy (klass->base_pipeline); priv->pipeline = cogl_pipeline_copy (klass->base_pipeline);
cogl_pipeline_set_layer_null_texture (self->priv->pipeline, 0, COGL_TEXTURE_TYPE_2D); cogl_pipeline_set_layer_null_texture (priv->pipeline, 0, COGL_TEXTURE_TYPE_2D);
} }
static void static void
@ -175,7 +177,8 @@ int
shell_glsl_quad_get_uniform_location (ShellGLSLQuad *quad, shell_glsl_quad_get_uniform_location (ShellGLSLQuad *quad,
const char *name) const char *name)
{ {
return cogl_pipeline_get_uniform_location (quad->priv->pipeline, name); ShellGLSLQuadPrivate *priv = shell_glsl_quad_get_instance_private (quad);
return cogl_pipeline_get_uniform_location (priv->pipeline, name);
} }
/** /**
@ -193,7 +196,8 @@ shell_glsl_quad_set_uniform_float (ShellGLSLQuad *quad,
int total_count, int total_count,
const float *value) const float *value)
{ {
cogl_pipeline_set_uniform_float (quad->priv->pipeline, uniform, ShellGLSLQuadPrivate *priv = shell_glsl_quad_get_instance_private (quad);
cogl_pipeline_set_uniform_float (priv->pipeline, uniform,
n_components, total_count / n_components, n_components, total_count / n_components,
value); value);
} }

View File

@ -27,22 +27,8 @@ typedef enum {
} ShellSnippetHook; } ShellSnippetHook;
#define SHELL_TYPE_GLSL_QUAD (shell_glsl_quad_get_type ()) #define SHELL_TYPE_GLSL_QUAD (shell_glsl_quad_get_type ())
#define SHELL_GLSL_QUAD(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SHELL_TYPE_GLSL_QUAD, ShellGLSLQuad)) G_DECLARE_DERIVABLE_TYPE (ShellGLSLQuad, shell_glsl_quad,
#define SHELL_GLSL_QUAD_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SHELL_TYPE_GLSL_QUAD, ShellGLSLQuadClass)) SHELL, GLSL_QUAD, ClutterActor)
#define SHELL_IS_GLSL_QUAD(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SHELL_TYPE_GLSL_QUAD))
#define SHELL_IS_GLSL_QUAD_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SHELL_TYPE_GLSL_QUAD))
#define SHELL_GLSL_QUAD_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SHELL_TYPE_GLSL_QUAD, ShellGLSLQuadClass))
typedef struct _ShellGLSLQuad ShellGLSLQuad;
typedef struct _ShellGLSLQuadClass ShellGLSLQuadClass;
typedef struct _ShellGLSLQuadPrivate ShellGLSLQuadPrivate;
struct _ShellGLSLQuad
{
ClutterActor parent;
ShellGLSLQuadPrivate *priv;
};
struct _ShellGLSLQuadClass struct _ShellGLSLQuadClass
{ {
@ -53,8 +39,6 @@ struct _ShellGLSLQuadClass
void (*build_pipeline) (ShellGLSLQuad *effect); void (*build_pipeline) (ShellGLSLQuad *effect);
}; };
GType shell_glsl_quad_get_type (void) G_GNUC_CONST;
void shell_glsl_quad_add_glsl_snippet (ShellGLSLQuad *quad, void shell_glsl_quad_add_glsl_snippet (ShellGLSLQuad *quad,
ShellSnippetHook hook, ShellSnippetHook hook,
const char *declarations, const char *declarations,

View File

@ -15,6 +15,8 @@ enum {
PROP_WINDOW PROP_WINDOW
}; };
typedef struct _ShellGtkEmbedPrivate ShellGtkEmbedPrivate;
struct _ShellGtkEmbedPrivate struct _ShellGtkEmbedPrivate
{ {
ShellEmbeddedWindow *window; ShellEmbeddedWindow *window;
@ -40,7 +42,7 @@ shell_gtk_embed_on_window_destroy (GtkWidget *object,
static void static void
shell_gtk_embed_remove_window_actor (ShellGtkEmbed *embed) shell_gtk_embed_remove_window_actor (ShellGtkEmbed *embed)
{ {
ShellGtkEmbedPrivate *priv = embed->priv; ShellGtkEmbedPrivate *priv = shell_gtk_embed_get_instance_private (embed);
if (priv->window_actor) if (priv->window_actor)
{ {
@ -60,7 +62,7 @@ shell_gtk_embed_window_created_cb (MetaDisplay *display,
MetaWindow *window, MetaWindow *window,
ShellGtkEmbed *embed) ShellGtkEmbed *embed)
{ {
ShellGtkEmbedPrivate *priv = embed->priv; ShellGtkEmbedPrivate *priv = shell_gtk_embed_get_instance_private (embed);
Window xwindow = meta_window_get_xwindow (window); Window xwindow = meta_window_get_xwindow (window);
GdkWindow *gdk_window = gtk_widget_get_window (GTK_WIDGET (priv->window)); GdkWindow *gdk_window = gtk_widget_get_window (GTK_WIDGET (priv->window));
@ -119,11 +121,12 @@ static void
shell_gtk_embed_on_window_mapped (GtkWidget *object, shell_gtk_embed_on_window_mapped (GtkWidget *object,
ShellGtkEmbed *embed) ShellGtkEmbed *embed)
{ {
ShellGtkEmbedPrivate *priv = shell_gtk_embed_get_instance_private (embed);
MetaDisplay *display = shell_global_get_display (shell_global_get ()); MetaDisplay *display = shell_global_get_display (shell_global_get ());
/* Listen for new windows so we can detect when Mutter has /* Listen for new windows so we can detect when Mutter has
created a MutterWindow for this window */ created a MutterWindow for this window */
embed->priv->window_created_handler = priv->window_created_handler =
g_signal_connect (display, g_signal_connect (display,
"window-created", "window-created",
G_CALLBACK (shell_gtk_embed_window_created_cb), G_CALLBACK (shell_gtk_embed_window_created_cb),
@ -134,44 +137,45 @@ static void
shell_gtk_embed_set_window (ShellGtkEmbed *embed, shell_gtk_embed_set_window (ShellGtkEmbed *embed,
ShellEmbeddedWindow *window) ShellEmbeddedWindow *window)
{ {
ShellGtkEmbedPrivate *priv = shell_gtk_embed_get_instance_private (embed);
MetaDisplay *display = shell_global_get_display (shell_global_get ()); MetaDisplay *display = shell_global_get_display (shell_global_get ());
if (embed->priv->window) if (priv->window)
{ {
if (embed->priv->window_created_handler) if (priv->window_created_handler)
{ {
g_signal_handler_disconnect (display, g_signal_handler_disconnect (display,
embed->priv->window_created_handler); priv->window_created_handler);
embed->priv->window_created_handler = 0; priv->window_created_handler = 0;
} }
shell_gtk_embed_remove_window_actor (embed); shell_gtk_embed_remove_window_actor (embed);
_shell_embedded_window_set_actor (embed->priv->window, NULL); _shell_embedded_window_set_actor (priv->window, NULL);
g_object_unref (embed->priv->window); g_object_unref (priv->window);
g_signal_handlers_disconnect_by_func (embed->priv->window, g_signal_handlers_disconnect_by_func (priv->window,
(gpointer)shell_gtk_embed_on_window_destroy, (gpointer)shell_gtk_embed_on_window_destroy,
embed); embed);
g_signal_handlers_disconnect_by_func (embed->priv->window, g_signal_handlers_disconnect_by_func (priv->window,
(gpointer)shell_gtk_embed_on_window_mapped, (gpointer)shell_gtk_embed_on_window_mapped,
embed); embed);
} }
embed->priv->window = window; priv->window = window;
if (embed->priv->window) if (priv->window)
{ {
g_object_ref (embed->priv->window); g_object_ref (priv->window);
_shell_embedded_window_set_actor (embed->priv->window, embed); _shell_embedded_window_set_actor (priv->window, embed);
g_signal_connect (embed->priv->window, "destroy", g_signal_connect (priv->window, "destroy",
G_CALLBACK (shell_gtk_embed_on_window_destroy), embed); G_CALLBACK (shell_gtk_embed_on_window_destroy), embed);
g_signal_connect (embed->priv->window, "map", g_signal_connect (priv->window, "map",
G_CALLBACK (shell_gtk_embed_on_window_mapped), embed); G_CALLBACK (shell_gtk_embed_on_window_mapped), embed);
} }
@ -205,11 +209,12 @@ shell_gtk_embed_get_property (GObject *object,
GParamSpec *pspec) GParamSpec *pspec)
{ {
ShellGtkEmbed *embed = SHELL_GTK_EMBED (object); ShellGtkEmbed *embed = SHELL_GTK_EMBED (object);
ShellGtkEmbedPrivate *priv = shell_gtk_embed_get_instance_private (embed);
switch (prop_id) switch (prop_id)
{ {
case PROP_WINDOW: case PROP_WINDOW:
g_value_set_object (value, embed->priv->window); g_value_set_object (value, priv->window);
break; break;
default: default:
@ -225,12 +230,13 @@ shell_gtk_embed_get_preferred_width (ClutterActor *actor,
float *natural_width_p) float *natural_width_p)
{ {
ShellGtkEmbed *embed = SHELL_GTK_EMBED (actor); ShellGtkEmbed *embed = SHELL_GTK_EMBED (actor);
ShellGtkEmbedPrivate *priv = shell_gtk_embed_get_instance_private (embed);
if (embed->priv->window if (priv->window
&& gtk_widget_get_visible (GTK_WIDGET (embed->priv->window))) && gtk_widget_get_visible (GTK_WIDGET (priv->window)))
{ {
GtkRequisition min_req, natural_req; GtkRequisition min_req, natural_req;
gtk_widget_get_preferred_size (GTK_WIDGET (embed->priv->window), &min_req, &natural_req); gtk_widget_get_preferred_size (GTK_WIDGET (priv->window), &min_req, &natural_req);
*min_width_p = min_req.width; *min_width_p = min_req.width;
*natural_width_p = natural_req.width; *natural_width_p = natural_req.width;
@ -246,12 +252,13 @@ shell_gtk_embed_get_preferred_height (ClutterActor *actor,
float *natural_height_p) float *natural_height_p)
{ {
ShellGtkEmbed *embed = SHELL_GTK_EMBED (actor); ShellGtkEmbed *embed = SHELL_GTK_EMBED (actor);
ShellGtkEmbedPrivate *priv = shell_gtk_embed_get_instance_private (embed);
if (embed->priv->window if (priv->window
&& gtk_widget_get_visible (GTK_WIDGET (embed->priv->window))) && gtk_widget_get_visible (GTK_WIDGET (priv->window)))
{ {
GtkRequisition min_req, natural_req; GtkRequisition min_req, natural_req;
gtk_widget_get_preferred_size (GTK_WIDGET (embed->priv->window), &min_req, &natural_req); gtk_widget_get_preferred_size (GTK_WIDGET (priv->window), &min_req, &natural_req);
*min_height_p = min_req.height; *min_height_p = min_req.height;
*natural_height_p = natural_req.height; *natural_height_p = natural_req.height;
@ -266,6 +273,7 @@ shell_gtk_embed_allocate (ClutterActor *actor,
ClutterAllocationFlags flags) ClutterAllocationFlags flags)
{ {
ShellGtkEmbed *embed = SHELL_GTK_EMBED (actor); ShellGtkEmbed *embed = SHELL_GTK_EMBED (actor);
ShellGtkEmbedPrivate *priv = shell_gtk_embed_get_instance_private (embed);
float wx = 0.0, wy = 0.0, x, y, ax, ay; float wx = 0.0, wy = 0.0, x, y, ax, ay;
CLUTTER_ACTOR_CLASS (shell_gtk_embed_parent_class)-> CLUTTER_ACTOR_CLASS (shell_gtk_embed_parent_class)->
@ -285,7 +293,7 @@ shell_gtk_embed_allocate (ClutterActor *actor,
actor = clutter_actor_get_parent (actor); actor = clutter_actor_get_parent (actor);
} }
_shell_embedded_window_allocate (embed->priv->window, _shell_embedded_window_allocate (priv->window,
(int)(0.5 + wx), (int)(0.5 + wy), (int)(0.5 + wx), (int)(0.5 + wy),
box->x2 - box->x1, box->x2 - box->x1,
box->y2 - box->y1); box->y2 - box->y1);
@ -295,8 +303,9 @@ static void
shell_gtk_embed_map (ClutterActor *actor) shell_gtk_embed_map (ClutterActor *actor)
{ {
ShellGtkEmbed *embed = SHELL_GTK_EMBED (actor); ShellGtkEmbed *embed = SHELL_GTK_EMBED (actor);
ShellGtkEmbedPrivate *priv = shell_gtk_embed_get_instance_private (embed);
_shell_embedded_window_map (embed->priv->window); _shell_embedded_window_map (priv->window);
CLUTTER_ACTOR_CLASS (shell_gtk_embed_parent_class)->map (actor); CLUTTER_ACTOR_CLASS (shell_gtk_embed_parent_class)->map (actor);
} }
@ -305,8 +314,9 @@ static void
shell_gtk_embed_unmap (ClutterActor *actor) shell_gtk_embed_unmap (ClutterActor *actor)
{ {
ShellGtkEmbed *embed = SHELL_GTK_EMBED (actor); ShellGtkEmbed *embed = SHELL_GTK_EMBED (actor);
ShellGtkEmbedPrivate *priv = shell_gtk_embed_get_instance_private (embed);
_shell_embedded_window_unmap (embed->priv->window); _shell_embedded_window_unmap (priv->window);
CLUTTER_ACTOR_CLASS (shell_gtk_embed_parent_class)->unmap (actor); CLUTTER_ACTOR_CLASS (shell_gtk_embed_parent_class)->unmap (actor);
} }
@ -349,7 +359,6 @@ shell_gtk_embed_class_init (ShellGtkEmbedClass *klass)
static void static void
shell_gtk_embed_init (ShellGtkEmbed *embed) shell_gtk_embed_init (ShellGtkEmbed *embed)
{ {
embed->priv = shell_gtk_embed_get_instance_private (embed);
} }
/* /*

View File

@ -7,29 +7,14 @@
#include "shell-embedded-window.h" #include "shell-embedded-window.h"
#define SHELL_TYPE_GTK_EMBED (shell_gtk_embed_get_type ()) #define SHELL_TYPE_GTK_EMBED (shell_gtk_embed_get_type ())
#define SHELL_GTK_EMBED(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SHELL_TYPE_GTK_EMBED, ShellGtkEmbed)) G_DECLARE_DERIVABLE_TYPE (ShellGtkEmbed, shell_gtk_embed,
#define SHELL_GTK_EMBED_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SHELL_TYPE_GTK_EMBED, ShellGtkEmbedClass)) SHELL, GTK_EMBED, ClutterClone)
#define SHELL_IS_GTK_EMBED(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SHELL_TYPE_GTK_EMBED))
#define SHELL_IS_GTK_EMBED_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SHELL_TYPE_GTK_EMBED))
#define SHELL_GTK_EMBED_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SHELL_TYPE_GTK_EMBED, ShellGtkEmbedClass))
typedef struct _ShellGtkEmbed ShellGtkEmbed;
typedef struct _ShellGtkEmbedClass ShellGtkEmbedClass;
typedef struct _ShellGtkEmbedPrivate ShellGtkEmbedPrivate;
struct _ShellGtkEmbed
{
ClutterClone parent;
ShellGtkEmbedPrivate *priv;
};
struct _ShellGtkEmbedClass struct _ShellGtkEmbedClass
{ {
ClutterCloneClass parent_class; ClutterCloneClass parent_class;
}; };
GType shell_gtk_embed_get_type (void) G_GNUC_CONST;
ClutterActor *shell_gtk_embed_new (ShellEmbeddedWindow *window); ClutterActor *shell_gtk_embed_new (ShellEmbeddedWindow *window);
#endif /* __SHELL_GTK_EMBED_H__ */ #endif /* __SHELL_GTK_EMBED_H__ */

View File

@ -32,7 +32,6 @@
#include <string.h> #include <string.h>
typedef struct _ShellPasswordPromptClass ShellPasswordPromptClass;
typedef struct _ShellPasswordPromptPrivate ShellPasswordPromptPrivate; typedef struct _ShellPasswordPromptPrivate ShellPasswordPromptPrivate;
typedef enum typedef enum
@ -65,11 +64,6 @@ struct _ShellKeyringPrompt
gboolean shown; gboolean shown;
}; };
typedef struct _ShellKeyringPromptClass
{
GObjectClass parent_class;
} ShellKeyringPromptClass;
enum { enum {
PROP_0, PROP_0,
PROP_TITLE, PROP_TITLE,

View File

@ -33,10 +33,8 @@ G_BEGIN_DECLS
typedef struct _ShellKeyringPrompt ShellKeyringPrompt; typedef struct _ShellKeyringPrompt ShellKeyringPrompt;
#define SHELL_TYPE_KEYRING_PROMPT (shell_keyring_prompt_get_type ()) #define SHELL_TYPE_KEYRING_PROMPT (shell_keyring_prompt_get_type ())
#define SHELL_KEYRING_PROMPT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SHELL_TYPE_KEYRING_PROMPT, ShellKeyringPrompt)) G_DECLARE_FINAL_TYPE (ShellKeyringPrompt, shell_keyring_prompt,
#define SHELL_IS_KEYRING_PROMPT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SHELL_TYPE_KEYRING_PROMPT)) SHELL, KEYRING_PROMPT, GObject)
GType shell_keyring_prompt_get_type (void) G_GNUC_CONST;
ShellKeyringPrompt * shell_keyring_prompt_new (void); ShellKeyringPrompt * shell_keyring_prompt_new (void);

View File

@ -41,6 +41,15 @@ enum {
static guint signals[NUM_SIGNALS] = { 0, }; static guint signals[NUM_SIGNALS] = { 0, };
typedef struct _ShellMountOperationPrivate ShellMountOperationPrivate;
struct _ShellMountOperation
{
GMountOperation parent_instance;
ShellMountOperationPrivate *priv;
};
struct _ShellMountOperationPrivate { struct _ShellMountOperationPrivate {
GArray *pids; GArray *pids;
gchar **choices; gchar **choices;

View File

@ -27,30 +27,9 @@
G_BEGIN_DECLS G_BEGIN_DECLS
#define SHELL_TYPE_MOUNT_OPERATION (shell_mount_operation_get_type ()) #define SHELL_TYPE_MOUNT_OPERATION (shell_mount_operation_get_type ())
#define SHELL_MOUNT_OPERATION(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), SHELL_TYPE_MOUNT_OPERATION, ShellMountOperation)) G_DECLARE_FINAL_TYPE (ShellMountOperation, shell_mount_operation,
#define SHELL_MOUNT_OPERATION_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), SHELL_TYPE_MOUNT_OPERATION, ShellMountOperationClass)) SHELL, MOUNT_OPERATION, GMountOperation)
#define SHELL_IS_MOUNT_OPERATION(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), SHELL_TYPE_MOUNT_OPERATION))
#define SHELL_IS_MOUNT_OPERATION_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), SHELL_TYPE_MOUNT_OPERATION))
#define SHELL_MOUNT_OPERATION_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), SHELL_TYPE_MOUNT_OPERATION, ShellMountOperationClass))
typedef struct _ShellMountOperation ShellMountOperation;
typedef struct _ShellMountOperationClass ShellMountOperationClass;
typedef struct _ShellMountOperationPrivate ShellMountOperationPrivate;
struct _ShellMountOperation
{
GMountOperation parent_instance;
ShellMountOperationPrivate *priv;
};
struct _ShellMountOperationClass
{
GMountOperationClass parent_class;
};
GType shell_mount_operation_get_type (void);
GMountOperation *shell_mount_operation_new (void); GMountOperation *shell_mount_operation_new (void);
GArray * shell_mount_operation_get_show_processes_pids (ShellMountOperation *self); GArray * shell_mount_operation_get_show_processes_pids (ShellMountOperation *self);

View File

@ -53,11 +53,6 @@ struct _ShellPerfLog
guint enabled : 1; guint enabled : 1;
}; };
struct _ShellPerfLogClass
{
GObjectClass parent_class;
};
struct _ShellPerfEvent struct _ShellPerfEvent
{ {
guint16 id; guint16 id;

View File

@ -7,17 +7,8 @@
G_BEGIN_DECLS G_BEGIN_DECLS
typedef struct _ShellPerfLog ShellPerfLog;
typedef struct _ShellPerfLogClass ShellPerfLogClass;
#define SHELL_TYPE_PERF_LOG (shell_perf_log_get_type ()) #define SHELL_TYPE_PERF_LOG (shell_perf_log_get_type ())
#define SHELL_PERF_LOG(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), SHELL_TYPE_PERF_LOG, ShellPerfLog)) G_DECLARE_FINAL_TYPE (ShellPerfLog, shell_perf_log, SHELL, PERF_LOG, GObject)
#define SHELL_PERF_LOG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SHELL_TYPE_PERF_LOG, ShellPerfLogClass))
#define SHELL_IS_PERF_LOG(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), SHELL_TYPE_PERF_LOG))
#define SHELL_IS_PERF_LOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SHELL_TYPE_PERF_LOG))
#define SHELL_PERF_LOG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SHELL_TYPE_PERF_LOG, ShellPerfLogClass))
GType shell_perf_log_get_type (void) G_GNUC_CONST;
ShellPerfLog *shell_perf_log_get_default (void); ShellPerfLog *shell_perf_log_get_default (void);

View File

@ -33,11 +33,6 @@ typedef enum {
typedef struct _RecorderPipeline RecorderPipeline; typedef struct _RecorderPipeline RecorderPipeline;
struct _ShellRecorderClass
{
GObjectClass parent_class;
};
struct _ShellRecorder { struct _ShellRecorder {
GObject parent; GObject parent;

View File

@ -16,17 +16,8 @@ G_BEGIN_DECLS
* directory named after the date, but the encoding and output can * directory named after the date, but the encoding and output can
* be configured. * be configured.
*/ */
typedef struct _ShellRecorder ShellRecorder;
typedef struct _ShellRecorderClass ShellRecorderClass;
#define SHELL_TYPE_RECORDER (shell_recorder_get_type ()) #define SHELL_TYPE_RECORDER (shell_recorder_get_type ())
#define SHELL_RECORDER(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), SHELL_TYPE_RECORDER, ShellRecorder)) G_DECLARE_FINAL_TYPE (ShellRecorder, shell_recorder, SHELL, RECORDER, GObject)
#define SHELL_RECORDER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SHELL_TYPE_RECORDER, ShellRecorderClass))
#define SHELL_IS_RECORDER(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), SHELL_TYPE_RECORDER))
#define SHELL_IS_RECORDER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SHELL_TYPE_RECORDER))
#define SHELL_RECORDER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SHELL_TYPE_RECORDER, ShellRecorderClass))
GType shell_recorder_get_type (void) G_GNUC_CONST;
ShellRecorder *shell_recorder_new (ClutterStage *stage); ShellRecorder *shell_recorder_new (ClutterStage *stage);

View File

@ -14,10 +14,7 @@
#define A11Y_APPS_SCHEMA "org.gnome.desktop.a11y.applications" #define A11Y_APPS_SCHEMA "org.gnome.desktop.a11y.applications"
#define MAGNIFIER_ACTIVE_KEY "screen-magnifier-enabled" #define MAGNIFIER_ACTIVE_KEY "screen-magnifier-enabled"
struct _ShellScreenshotClass typedef struct _ShellScreenshotPrivate ShellScreenshotPrivate;
{
GObjectClass parent_class;
};
struct _ShellScreenshot struct _ShellScreenshot
{ {

View File

@ -10,19 +10,9 @@
* areas or windows and write them out as png files. * areas or windows and write them out as png files.
* *
*/ */
typedef struct _ShellScreenshot ShellScreenshot;
typedef struct _ShellScreenshotPrivate ShellScreenshotPrivate;
typedef struct _ShellScreenshotClass ShellScreenshotClass;
#define SHELL_TYPE_SCREENSHOT (shell_screenshot_get_type ()) #define SHELL_TYPE_SCREENSHOT (shell_screenshot_get_type ())
#define SHELL_SCREENSHOT(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), SHELL_TYPE_SCREENSHOT, ShellScreenshot)) G_DECLARE_FINAL_TYPE (ShellScreenshot, shell_screenshot,
#define SHELL_SCREENSHOT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SHELL_TYPE_SCREENSHOT, ShellScreenshotClass)) SHELL, SCREENSHOT, GObject)
#define SHELL_IS_SCREENSHOT(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), SHELL_TYPE_SCREENSHOT))
#define SHELL_IS_SCREENSHOT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SHELL_TYPE_SCREENSHOT))
#define SHELL_SCREENSHOT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SHELL_TYPE_SCREENSHOT, ShellScreenshotClass))
GType shell_screenshot_get_type (void) G_GNUC_CONST;
ShellScreenshot *shell_screenshot_new (void); ShellScreenshot *shell_screenshot_new (void);

View File

@ -30,9 +30,6 @@
#include <string.h> #include <string.h>
typedef struct _ShellSecureTextBuffer ShellSecureTextBuffer;
typedef struct _ShellSecureTextBufferClass ShellSecureTextBufferClass;
struct _ShellSecureTextBuffer { struct _ShellSecureTextBuffer {
ClutterTextBuffer parent; ClutterTextBuffer parent;
gchar *text; gchar *text;
@ -41,10 +38,6 @@ struct _ShellSecureTextBuffer {
guint text_chars; guint text_chars;
}; };
struct _ShellSecureTextBufferClass {
ClutterTextBufferClass parent_class;
};
/* Initial size of buffer, in bytes */ /* Initial size of buffer, in bytes */
#define MIN_SIZE 16 #define MIN_SIZE 16

View File

@ -29,10 +29,8 @@
G_BEGIN_DECLS G_BEGIN_DECLS
#define SHELL_TYPE_SECURE_TEXT_BUFFER (shell_secure_text_buffer_get_type ()) #define SHELL_TYPE_SECURE_TEXT_BUFFER (shell_secure_text_buffer_get_type ())
#define SHELL_SECURE_TEXT_BUFFER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SHELL_TYPE_SECURE_TEXT_BUFFER, ShellSecureTextBuffer)) G_DECLARE_FINAL_TYPE (ShellSecureTextBuffer, shell_secure_text_buffer,
#define SHELL_IS_SECURE_TEXT_BUFFER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SHELL_TYPE_SECURE_TEXT_BUFFER)) SHELL, SECURE_TEXT_BUFFER, ClutterTextBuffer)
GType shell_secure_text_buffer_get_type (void) G_GNUC_CONST;
ClutterTextBuffer * shell_secure_text_buffer_new (void); ClutterTextBuffer * shell_secure_text_buffer_new (void);

View File

@ -16,9 +16,12 @@
#include "shell-stack.h" #include "shell-stack.h"
G_DEFINE_TYPE (ShellStack, struct _ShellStack
shell_stack, {
ST_TYPE_WIDGET); StWidget parent;
};
G_DEFINE_TYPE (ShellStack, shell_stack, ST_TYPE_WIDGET);
static void static void
shell_stack_allocate (ClutterActor *self, shell_stack_allocate (ClutterActor *self,

View File

@ -6,29 +6,6 @@
#include <gtk/gtk.h> #include <gtk/gtk.h>
#define SHELL_TYPE_STACK (shell_stack_get_type ()) #define SHELL_TYPE_STACK (shell_stack_get_type ())
#define SHELL_STACK(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SHELL_TYPE_STACK, ShellStack)) G_DECLARE_FINAL_TYPE (ShellStack, shell_stack, SHELL, STACK, StWidget)
#define SHELL_STACK_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SHELL_TYPE_STACK, ShellStackClass))
#define SHELL_IS_STACK(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SHELL_TYPE_STACK))
#define SHELL_IS_STACK_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SHELL_TYPE_STACK))
#define SHELL_STACK_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SHELL_TYPE_STACK, ShellStackClass))
typedef struct _ShellStack ShellStack;
typedef struct _ShellStackClass ShellStackClass;
typedef struct _ShellStackPrivate ShellStackPrivate;
struct _ShellStack
{
StWidget parent;
ShellStackPrivate *priv;
};
struct _ShellStackClass
{
StWidgetClass parent_class;
};
GType shell_stack_get_type (void) G_GNUC_CONST;
#endif /* __SHELL_STACK_H__ */ #endif /* __SHELL_STACK_H__ */

View File

@ -17,6 +17,15 @@ enum {
PROP_WM_CLASS PROP_WM_CLASS
}; };
typedef struct _ShellTrayIconPrivate ShellTrayIconPrivate;
struct _ShellTrayIcon
{
ShellGtkEmbed parent;
ShellTrayIconPrivate *priv;
};
struct _ShellTrayIconPrivate struct _ShellTrayIconPrivate
{ {
NaTrayChild *socket; NaTrayChild *socket;

View File

@ -5,30 +5,9 @@
#include "shell-gtk-embed.h" #include "shell-gtk-embed.h"
#define SHELL_TYPE_TRAY_ICON (shell_tray_icon_get_type ()) #define SHELL_TYPE_TRAY_ICON (shell_tray_icon_get_type ())
#define SHELL_TRAY_ICON(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SHELL_TYPE_TRAY_ICON, ShellTrayIcon)) G_DECLARE_FINAL_TYPE (ShellTrayIcon, shell_tray_icon,
#define SHELL_TRAY_ICON_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SHELL_TYPE_TRAY_ICON, ShellTrayIconClass)) SHELL, TRAY_ICON, ShellGtkEmbed)
#define SHELL_IS_TRAY_ICON(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SHELL_TYPE_TRAY_ICON))
#define SHELL_IS_TRAY_ICON_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SHELL_TYPE_TRAY_ICON))
#define SHELL_TRAY_ICON_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SHELL_TYPE_TRAY_ICON, ShellTrayIconClass))
typedef struct _ShellTrayIcon ShellTrayIcon;
typedef struct _ShellTrayIconClass ShellTrayIconClass;
typedef struct _ShellTrayIconPrivate ShellTrayIconPrivate;
struct _ShellTrayIcon
{
ShellGtkEmbed parent;
ShellTrayIconPrivate *priv;
};
struct _ShellTrayIconClass
{
ShellGtkEmbedClass parent_class;
};
GType shell_tray_icon_get_type (void) G_GNUC_CONST;
ClutterActor *shell_tray_icon_new (ShellEmbeddedWindow *window); ClutterActor *shell_tray_icon_new (ShellEmbeddedWindow *window);
void shell_tray_icon_click (ShellTrayIcon *icon, void shell_tray_icon_click (ShellTrayIcon *icon,

View File

@ -15,6 +15,15 @@
#include "shell-embedded-window.h" #include "shell-embedded-window.h"
#include "shell-global.h" #include "shell-global.h"
typedef struct _ShellTrayManagerPrivate ShellTrayManagerPrivate;
struct _ShellTrayManager
{
GObject parent_instance;
ShellTrayManagerPrivate *priv;
};
struct _ShellTrayManagerPrivate { struct _ShellTrayManagerPrivate {
NaTrayManager *na_manager; NaTrayManager *na_manager;
ClutterColor bg_color; ClutterColor bg_color;

View File

@ -9,29 +9,8 @@
G_BEGIN_DECLS G_BEGIN_DECLS
#define SHELL_TYPE_TRAY_MANAGER (shell_tray_manager_get_type ()) #define SHELL_TYPE_TRAY_MANAGER (shell_tray_manager_get_type ())
#define SHELL_TRAY_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SHELL_TYPE_TRAY_MANAGER, ShellTrayManager)) G_DECLARE_FINAL_TYPE (ShellTrayManager, shell_tray_manager,
#define SHELL_TRAY_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SHELL_TYPE_TRAY_MANAGER, ShellTrayManagerClass)) SHELL, TRAY_MANAGER, GObject)
#define SHELL_IS_TRAY_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SHELL_TYPE_TRAY_MANAGER))
#define SHELL_IS_TRAY_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SHELL_TYPE_TRAY_MANAGER))
#define SHELL_TRAY_MANAGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SHELL_TYPE_TRAY_MANAGER, ShellTrayManagerClass))
typedef struct _ShellTrayManager ShellTrayManager;
typedef struct _ShellTrayManagerPrivate ShellTrayManagerPrivate;
typedef struct _ShellTrayManagerClass ShellTrayManagerClass;
struct _ShellTrayManager
{
GObject parent_instance;
ShellTrayManagerPrivate *priv;
};
struct _ShellTrayManagerClass
{
GObjectClass parent_class;
};
GType shell_tray_manager_get_type (void);
ShellTrayManager *shell_tray_manager_new (void); ShellTrayManager *shell_tray_manager_new (void);
void shell_tray_manager_manage_screen (ShellTrayManager *manager, void shell_tray_manager_manage_screen (ShellTrayManager *manager,

View File

@ -11,23 +11,9 @@
G_BEGIN_DECLS G_BEGIN_DECLS
typedef struct _ShellWindowTracker ShellWindowTracker;
typedef struct _ShellWindowTrackerClass ShellWindowTrackerClass;
typedef struct _ShellWindowTrackerPrivate ShellWindowTrackerPrivate;
#define SHELL_TYPE_WINDOW_TRACKER (shell_window_tracker_get_type ()) #define SHELL_TYPE_WINDOW_TRACKER (shell_window_tracker_get_type ())
#define SHELL_WINDOW_TRACKER(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), SHELL_TYPE_WINDOW_TRACKER, ShellWindowTracker)) G_DECLARE_FINAL_TYPE (ShellWindowTracker, shell_window_tracker,
#define SHELL_WINDOW_TRACKER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SHELL_TYPE_WINDOW_TRACKER, ShellWindowTrackerClass)) SHELL, WINDOW_TRACKER, GObject)
#define SHELL_IS_WINDOW_TRACKER(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), SHELL_TYPE_WINDOW_TRACKER))
#define SHELL_IS_WINDOW_TRACKER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SHELL_TYPE_WINDOW_TRACKER))
#define SHELL_WINDOW_TRACKER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SHELL_TYPE_WINDOW_TRACKER, ShellWindowTrackerClass))
struct _ShellWindowTrackerClass
{
GObjectClass parent_class;
};
GType shell_window_tracker_get_type (void) G_GNUC_CONST;
ShellWindowTracker* shell_window_tracker_get_default(void); ShellWindowTracker* shell_window_tracker_get_default(void);

View File

@ -7,23 +7,8 @@
G_BEGIN_DECLS G_BEGIN_DECLS
typedef struct _ShellWM ShellWM;
typedef struct _ShellWMClass ShellWMClass;
#define SHELL_TYPE_WM (shell_wm_get_type ()) #define SHELL_TYPE_WM (shell_wm_get_type ())
#define SHELL_WM(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), SHELL_TYPE_WM, ShellWM)) G_DECLARE_FINAL_TYPE (ShellWM, shell_wm, SHELL, WM, GObject)
#define SHELL_WM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SHELL_TYPE_WM, ShellWMClass))
#define SHELL_IS_WM(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), SHELL_TYPE_WM))
#define SHELL_IS_WM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SHELL_TYPE_WM))
#define SHELL_WM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SHELL_TYPE_WM, ShellWMClass))
struct _ShellWMClass
{
GObjectClass parent_class;
};
GType shell_wm_get_type (void) G_GNUC_CONST;
ShellWM *shell_wm_new (MetaPlugin *plugin); ShellWM *shell_wm_new (MetaPlugin *plugin);