diff options
Diffstat (limited to 'gdk/gdkscreen.c')
-rw-r--r-- | gdk/gdkscreen.c | 35 |
1 files changed, 33 insertions, 2 deletions
diff --git a/gdk/gdkscreen.c b/gdk/gdkscreen.c index c1de0f64e9..9493e168ff 100644 --- a/gdk/gdkscreen.c +++ b/gdk/gdkscreen.c @@ -750,12 +750,16 @@ gdk_screen_get_monitor_plug_name (GdkScreen *screen, /** * gdk_screen_get_monitor_geometry: * @screen: a #GdkScreen - * @monitor_num: the monitor number, between 0 and gdk_screen_get_n_monitors (screen) - * @dest: (out) (allow-none): a #GdkRectangle to be filled with the monitor geometry + * @monitor_num: the monitor number + * @dest: (out) (allow-none): a #GdkRectangle to be filled with + * the monitor geometry * * Retrieves the #GdkRectangle representing the size and position of * the individual monitor within the entire screen area. * + * Monitor numbers start at 0. To obtain the number of monitors of + * @screen, use gdk_screen_get_n_monitors(). + * * Note that the size of the entire screen area can be retrieved via * gdk_screen_get_width() and gdk_screen_get_height(). * @@ -770,6 +774,33 @@ gdk_screen_get_monitor_geometry (GdkScreen *screen, } /** + * gdk_screen_get_monitor_workarea: + * @screen: a #GdkScreen + * @monitor_num: the monitor number + * @dest: (out) (allow-none): a #GdkRectangle to be filled with + * the monitor workarea + * + * Retrieves the #GdkRectangle representing the size and position of + * the "work area" on a monitor within the entire screen area. + * + * The work area should be considered when positioning menus and + * similar popups, to avoid placing them below panels, docks or other + * desktop components. + * + * Monitor numbers start at 0. To obtain the number of monitors of + * @screen, use gdk_screen_get_n_monitors(). + * + * Since: 3.4 + */ +void +gdk_screen_get_monitor_workarea (GdkScreen *screen, + gint monitor_num, + GdkRectangle *dest) +{ + GDK_SCREEN_GET_CLASS(screen)->get_monitor_workarea (screen, monitor_num, dest); +} + +/** * gdk_screen_list_visuals: * @screen: the relevant #GdkScreen. * |