Add and export shell_global_get_primary_monitor_index

https://bugzilla.gnome.org/show_bug.cgi?id=609258
This commit is contained in:
Alexander Larsson 2011-02-28 20:06:58 +01:00
parent 079953c3ee
commit d8bd9f5a66
2 changed files with 18 additions and 0 deletions

View File

@ -1410,6 +1410,23 @@ shell_global_get_primary_monitor (ShellGlobal *global)
return meta_rectangle_copy (&rect);
}
/**
* shell_global_get_primary_monitor_index:
* @global: the #ShellGlobal
*
* Gets the index of the primary monitor (the one that the
* panel is on).
*
* Return value: the index of the primary monitor
*/
int
shell_global_get_primary_monitor_index (ShellGlobal *global)
{
MetaScreen *screen = shell_global_get_screen (global);
return meta_screen_get_primary_monitor (screen);
}
/**
* shell_global_get_focus_monitor:
* @global: the #ShellGlobal

View File

@ -100,6 +100,7 @@ void shell_global_format_time_relative_pretty (ShellGlobal *global, guint delta,
GSList *shell_global_get_monitors (ShellGlobal *global);
MetaRectangle *shell_global_get_primary_monitor (ShellGlobal *global);
int shell_global_get_primary_monitor_index (ShellGlobal *global);
MetaRectangle *shell_global_get_focus_monitor (ShellGlobal *global);
void shell_global_get_pointer (ShellGlobal *global,