This changes the meta_compositor_clutter namespacing to simply "mutter" which

helps makes code much more readable.
This commit is contained in:
Robert Bragg
2008-10-16 12:50:01 +01:00
parent c4fe54d004
commit 2f790b0165
19 changed files with 801 additions and 803 deletions

View File

@ -1,73 +0,0 @@
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
/*
* Copyright (C) 2008 Matthew Allum
* Copyright (C) 2007 Iain Holmes
* Based on xcompmgr - (c) 2003 Keith Packard
* xfwm4 - (c) 2005-2007 Olivier Fourdan
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
* 02111-1307, USA.
*/
#ifndef META_COMPOSITOR_CLUTTER_H_
#define META_COMPOSITOR_CLUTTER_H_
#include <clutter/clutter.h>
#include "types.h"
/*
* MetaCompWindow object (ClutterGroup sub-class)
*/
#define META_TYPE_COMP_WINDOW (meta_comp_window_get_type ())
#define META_COMP_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), META_TYPE_COMP_WINDOW, MetaCompWindow))
#define META_COMP_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), META_TYPE_COMP_WINDOW, MetaCompWindowClass))
#define IS_META_COMP_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), META_COMP_WINDOW_TYPE))
#define META_IS_COMP_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), META_TYPE_COMP_WINDOW))
#define META_COMP_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), META_TYPE_COMP_WINDOW, MetaCompWindowClass))
typedef struct _MetaCompWindow MetaCompWindow;
typedef struct _MetaCompWindowClass MetaCompWindowClass;
typedef struct _MetaCompWindowPrivate MetaCompWindowPrivate;
struct _MetaCompWindowClass
{
ClutterGroupClass parent_class;
};
struct _MetaCompWindow
{
ClutterGroup parent;
MetaCompWindowPrivate *priv;
};
GType meta_comp_window_get_type (void);
Window meta_comp_window_get_x_window (MetaCompWindow *mcw);
MetaCompWindowType meta_comp_window_get_window_type (MetaCompWindow *mcw);
gint meta_comp_window_get_workspace (MetaCompWindow *mcw);
/* Compositor API */
MetaCompositor *meta_compositor_clutter_new (MetaDisplay *display);
void meta_compositor_clutter_window_effect_completed (MetaCompWindow *actor, gulong event);
ClutterActor * meta_compositor_clutter_get_stage_for_screen (MetaScreen *screen);
ClutterActor * meta_compositor_clutter_get_overlay_group_for_screen (MetaScreen *screen);
#endif

View File

@ -0,0 +1,73 @@
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
/*
* Copyright (C) 2008 Matthew Allum
* Copyright (C) 2007 Iain Holmes
* Based on xcompmgr - (c) 2003 Keith Packard
* xfwm4 - (c) 2005-2007 Olivier Fourdan
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
* 02111-1307, USA.
*/
#ifndef MUTTER_H_
#define MUTTER_H_
#include <clutter/clutter.h>
#include "types.h"
/*
* MutterWindow object (ClutterGroup sub-class)
*/
#define MUTTER_TYPE_COMP_WINDOW (mutter_window_get_type ())
#define MUTTER_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), MUTTER_TYPE_COMP_WINDOW, MutterWindow))
#define MUTTER_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), MUTTER_TYPE_COMP_WINDOW, MutterWindowClass))
#define IS_MUTTER_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), MUTTER_WINDOW_TYPE))
#define MUTTER_IS_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), MUTTER_TYPE_COMP_WINDOW))
#define MUTTER_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), MUTTER_TYPE_COMP_WINDOW, MutterWindowClass))
typedef struct _MutterWindow MutterWindow;
typedef struct _MutterWindowClass MutterWindowClass;
typedef struct _MutterWindowPrivate MutterWindowPrivate;
struct _MutterWindowClass
{
ClutterGroupClass parent_class;
};
struct _MutterWindow
{
ClutterGroup parent;
MutterWindowPrivate *priv;
};
GType mutter_window_get_type (void);
Window mutter_window_get_x_window (MutterWindow *mcw);
MetaCompWindowType mutter_window_get_window_type (MutterWindow *mcw);
gint mutter_window_get_workspace (MutterWindow *mcw);
/* Compositor API */
MetaCompositor *mutter_new (MetaDisplay *display);
void mutter_window_effect_completed (MutterWindow *actor, gulong event);
ClutterActor * mutter_get_stage_for_screen (MetaScreen *screen);
ClutterActor * mutter_get_overlay_group_for_screen (MetaScreen *screen);
#endif

View File

@ -21,13 +21,13 @@
* 02111-1307, USA.
*/
#ifndef META_COMPOSITOR_CLUTTER_PLUGIN_H_
#define META_COMPOSITOR_CLUTTER_PLUGIN_H_
#ifndef MUTTER_PLUGIN_H_
#define MUTTER_PLUGIN_H_
#include "types.h"
#include "config.h"
#include "compositor.h"
#include "compositor-clutter.h"
#include "compositor-mutter.h"
#include <clutter/clutter.h>
@ -38,25 +38,25 @@
* recommended that the GModule API is used (otherwise you are on your own to
* do proper plugin clean up when the module is unloaded).
*
* The plugin interface is exported via the MetaCompositorClutterPlugin struct.
* The plugin interface is exported via the MutterPlugin struct.
*/
typedef struct MetaCompositorClutterPlugin MetaCompositorClutterPlugin;
typedef struct MutterPlugin MutterPlugin;
/*
* Feature flags: identify events that the plugin can handle; a plugin can
* handle one or more events.
*/
#define META_COMPOSITOR_CLUTTER_PLUGIN_MINIMIZE (1<<0)
#define META_COMPOSITOR_CLUTTER_PLUGIN_MAXIMIZE (1<<1)
#define META_COMPOSITOR_CLUTTER_PLUGIN_UNMAXIMIZE (1<<2)
#define META_COMPOSITOR_CLUTTER_PLUGIN_MAP (1<<3)
#define META_COMPOSITOR_CLUTTER_PLUGIN_DESTROY (1<<4)
#define META_COMPOSITOR_CLUTTER_PLUGIN_SWITCH_WORKSPACE (1<<5)
#define MUTTER_PLUGIN_MINIMIZE (1<<0)
#define MUTTER_PLUGIN_MAXIMIZE (1<<1)
#define MUTTER_PLUGIN_UNMAXIMIZE (1<<2)
#define MUTTER_PLUGIN_MAP (1<<3)
#define MUTTER_PLUGIN_DESTROY (1<<4)
#define MUTTER_PLUGIN_SWITCH_WORKSPACE (1<<5)
#define META_COMPOSITOR_CLUTTER_PLUGIN_ALL_EFFECTS (~0)
#define MUTTER_PLUGIN_ALL_EFFECTS (~0)
struct MetaCompositorClutterPlugin
struct MutterPlugin
{
/*
* Version information; the first three numbers match the Metacity version
@ -74,7 +74,7 @@ struct MetaCompositorClutterPlugin
*/
guint version_api;
#ifndef META_COMPOSITOR_CLUTTER_BUILDING_PLUGIN
#ifndef MUTTER_BUILDING_PLUGIN
const
#endif
gchar *name; /* Human-readable name for UI */
@ -134,29 +134,29 @@ struct MetaCompositorClutterPlugin
* On completion, each event handler must call the manager completed()
* callback function.
*/
void (*minimize) (MetaCompWindow *actor);
void (*minimize) (MutterWindow *actor);
void (*maximize) (MetaCompWindow *actor,
void (*maximize) (MutterWindow *actor,
gint x,
gint y,
gint width,
gint height);
void (*unmaximize) (MetaCompWindow *actor,
void (*unmaximize) (MutterWindow *actor,
gint x,
gint y,
gint width,
gint height);
void (*map) (MetaCompWindow *actor);
void (*map) (MutterWindow *actor);
void (*destroy) (MetaCompWindow *actor);
void (*destroy) (MutterWindow *actor);
/*
* Each actor in the list has a workspace number attached to it using
* g_object_set_data() with key META_COMPOSITOR_CLUTTER_PLUGIN_WORKSPACE_KEY;
* g_object_set_data() with key MUTTER_PLUGIN_WORKSPACE_KEY;
* workspace < 0 indicates the window is sticky (i.e., on all desktops).
* TODO: Add accessor for sticky bit in new MetaCompWindow structure
* TODO: Add accessor for sticky bit in new MutterWindow structure
*/
void (*switch_workspace) (const GList **actors,
gint from,
@ -169,7 +169,7 @@ struct MetaCompositorClutterPlugin
* The events parameter is a bitmask indicating which effects are to be
* killed.
*/
void (*kill_effect) (MetaCompWindow *actor,
void (*kill_effect) (MutterWindow *actor,
gulong events);
/*
@ -202,19 +202,19 @@ struct MetaCompositorClutterPlugin
};
void
meta_comp_clutter_plugin_effect_completed (MetaCompositorClutterPlugin *plugin,
MetaCompWindow *actor,
meta_comp_clutter_plugin_effect_completed (MutterPlugin *plugin,
MutterWindow *actor,
unsigned long event);
ClutterActor *
meta_comp_clutter_plugin_get_overlay_group (MetaCompositorClutterPlugin *plugin);
meta_comp_clutter_plugin_get_overlay_group (MutterPlugin *plugin);
ClutterActor *
meta_comp_clutter_plugin_get_stage (MetaCompositorClutterPlugin *plugin);
meta_comp_clutter_plugin_get_stage (MutterPlugin *plugin);
void
meta_comp_clutter_plugin_query_screen_size (MetaCompositorClutterPlugin *plugin,
meta_comp_clutter_plugin_query_screen_size (MutterPlugin *plugin,
int *width,
int *height);
#endif /* META_COMPOSITOR_CLUTTER_PLUGIN_H_ */
#endif /* MUTTER_PLUGIN_H_ */