Add a 'screen' property to ShellGlobal

Add a screen property to ShellGlobal so Javascript code can get
access to the MetaScreen.

http://bugzilla.gnome.org/show_bug.cgi?id=561297

svn path=/trunk/; revision=61
This commit is contained in:
Owen Taylor 2008-11-19 22:54:42 +00:00
parent d2c734f197
commit 48a2cca476

View File

@ -15,6 +15,7 @@ enum {
PROP_0,
PROP_OVERLAY_GROUP,
PROP_SCREEN,
PROP_SCREEN_WIDTH,
PROP_SCREEN_HEIGHT,
PROP_STAGE,
@ -60,6 +61,9 @@ shell_global_get_property(GObject *object,
case PROP_OVERLAY_GROUP:
g_value_set_object (value, mutter_plugin_get_overlay_group (global->plugin));
break;
case PROP_SCREEN:
g_value_set_object (value, mutter_plugin_get_screen (global->plugin));
break;
case PROP_SCREEN_WIDTH:
{
int width, height;
@ -126,6 +130,13 @@ shell_global_class_init (ShellGlobalClass *klass)
"Actor holding objects that appear above the desktop contents",
CLUTTER_TYPE_ACTOR,
G_PARAM_READABLE));
g_object_class_install_property (gobject_class,
PROP_SCREEN,
g_param_spec_object ("screen",
"Screen",
"Metacity screen object for the shell",
META_TYPE_SCREEN,
G_PARAM_READABLE));
g_object_class_install_property (gobject_class,
PROP_SCREEN_WIDTH,
g_param_spec_int ("screen-width",