[gnome-desktop] gnome-rr: add a method to discover when underscanning is supported
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-desktop] gnome-rr: add a method to discover when underscanning is supported
- Date: Fri, 3 Jul 2015 20:54:19 +0000 (UTC)
commit 6ca97207ad94316783bd8a7b605192caa7a95f0b
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Wed Jul 1 18:03:04 2015 -0700
gnome-rr: add a method to discover when underscanning is supported
So that the control center will be able to hide/show a checkbox
accordingly when the hardware supports it.
https://bugzilla.gnome.org/show_bug.cgi?id=751814
.../gnome-desktop3/gnome-desktop3-sections.txt | 1 +
libgnome-desktop/gnome-rr.c | 10 ++++++++++
libgnome-desktop/gnome-rr.h | 1 +
3 files changed, 12 insertions(+), 0 deletions(-)
---
diff --git a/docs/reference/gnome-desktop3/gnome-desktop3-sections.txt
b/docs/reference/gnome-desktop3/gnome-desktop3-sections.txt
index 0527ccd..ecb2b4f 100644
--- a/docs/reference/gnome-desktop3/gnome-desktop3-sections.txt
+++ b/docs/reference/gnome-desktop3/gnome-desktop3-sections.txt
@@ -292,6 +292,7 @@ gnome_rr_output_can_clone
gnome_rr_output_list_modes
gnome_rr_output_get_preferred_mode
gnome_rr_output_supports_mode
+gnome_rr_output_supports_underscanning
gnome_rr_output_get_is_primary
gnome_rr_output_get_backlight
gnome_rr_output_set_backlight
diff --git a/libgnome-desktop/gnome-rr.c b/libgnome-desktop/gnome-rr.c
index fa6a7e3..84b0a44 100644
--- a/libgnome-desktop/gnome-rr.c
+++ b/libgnome-desktop/gnome-rr.c
@@ -82,6 +82,8 @@ struct GnomeRROutput
gboolean is_primary;
gboolean is_presentation;
gboolean is_underscanning;
+ gboolean supports_underscanning;
+
GnomeRRTile tile_info;
};
@@ -1401,6 +1403,7 @@ output_initialize (GnomeRROutput *output, GVariant *info)
g_variant_lookup (properties, "primary", "b", &output->is_primary);
g_variant_lookup (properties, "presentation", "b", &output->is_presentation);
g_variant_lookup (properties, "underscanning", "b", &output->is_underscanning);
+ g_variant_lookup (properties, "supports-underscanning", "b", &output->supports_underscanning);
if ((edid = g_variant_lookup_value (properties, "edid", G_VARIANT_TYPE ("ay"))))
{
@@ -2214,6 +2217,13 @@ gnome_rr_output_get_is_underscanning (GnomeRROutput *output)
}
gboolean
+gnome_rr_output_supports_underscanning (GnomeRROutput *output)
+{
+ g_assert (output != NULL);
+ return output->supports_underscanning;
+}
+
+gboolean
_gnome_rr_output_get_tile_info (GnomeRROutput *output,
GnomeRRTile *tile)
{
diff --git a/libgnome-desktop/gnome-rr.h b/libgnome-desktop/gnome-rr.h
index 9311f07..1f0e5f9 100644
--- a/libgnome-desktop/gnome-rr.h
+++ b/libgnome-desktop/gnome-rr.h
@@ -173,6 +173,7 @@ gboolean gnome_rr_output_supports_mode (GnomeRROutput *outpu
GnomeRRMode *mode);
gboolean gnome_rr_output_get_is_primary (GnomeRROutput *output);
gboolean gnome_rr_output_get_is_underscanning (GnomeRROutput *output);
+gboolean gnome_rr_output_supports_underscanning (GnomeRROutput *output);
/* GnomeRRMode */
guint32 gnome_rr_mode_get_id (GnomeRRMode *mode);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]