[gnome-shell/wip/hadess/add-nvidia-other-gpu-support: 1/5] data: Update switcheroo-control D-Bus interface



commit a849945bc403f5bbb3fbd5ecbf7c2cd0f3525470
Author: Bastien Nocera <hadess hadess net>
Date:   Thu Dec 12 18:19:29 2019 +0100

    data: Update switcheroo-control D-Bus interface
    
    It's backwards compatible, so just new properties.
    
    See: https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/781

 .../net.hadess.SwitcherooControl.xml               | 41 ++++++++++++++++++++++
 1 file changed, 41 insertions(+)
---
diff --git a/data/dbus-interfaces/net.hadess.SwitcherooControl.xml 
b/data/dbus-interfaces/net.hadess.SwitcherooControl.xml
index 792af08f30..e52bc1a0d2 100644
--- a/data/dbus-interfaces/net.hadess.SwitcherooControl.xml
+++ b/data/dbus-interfaces/net.hadess.SwitcherooControl.xml
@@ -1,5 +1,46 @@
+<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
+"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd";>
+
 <node>
+
+  <!--
+      net.hadess.SwitcherooControl:
+      @short_description: D-Bus proxy to access dual-GPU controls.
+
+      After checking the availability of two switchable GPUs in the machine,
+      check the value of net.hadess.SwitcherooControl.HasDualGpu to see
+      if running applications on the discrete GPU should be offered.
+
+      The object path will be "/net/hadess/SwitcherooControl".
+  -->
   <interface name="net.hadess.SwitcherooControl">
+    <!--
+        HasDualGpu:
+
+        Whether two switchable GPUs are present on the system. This property
+        has been obsoleted in favour of the "NumGPUs" property.
+    -->
     <property name="HasDualGpu" type="b" access="read"/>
+
+    <!--
+        NumGPUs:
+
+        The number of GPUs available on the system. Note that while having no
+        GPUs is unlikely, consumers of this API should probably not throw errors
+        if that were the case.
+    -->
+    <property name="NumGPUs" type="u" access="read"/>
+
+    <!--
+        GPUs:
+
+        An array of key-pair values representing each GPU. The key named "Name" (s)
+        will contain a user-facing name for the GPU, the "Environment" (as) key will
+        contain an array of even number of strings, each being an environment
+        variable to set to use the GPU, followed by its value, the "Default" (b) key
+        will tag the default (usually integrated) GPU.
+    -->
+    <property name="GPUs" type="aa{sv}" access="read"/>
+
   </interface>
 </node>


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]