Skip to content

Commit 022fb54

Browse files
authored
Merge pull request #30 from BuddiesOfBudgie/backlight
Add API replacing gsd-power's use of libgnome-rr
2 parents 79ad959 + 86bd9a3 commit 022fb54

9 files changed

+373
-90
lines changed

data/dbus-interfaces/org.gnome.Mutter.DisplayConfig.xml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,12 +210,42 @@
210210
Returns the new value after rounding.
211211
-->
212212
<method name="ChangeBacklight">
213+
<annotation name="org.freedesktop.DBus.Deprecated" value="true"/>
213214
<arg name="serial" direction="in" type="u" />
214215
<arg name="output" direction="in" type="u" />
215216
<arg name="value" direction="in" type="i" />
216217
<arg name="new_value" direction="out" type="i" />
217218
</method>
218219

220+
<!--
221+
SetBacklight:
222+
@serial: configuration serial
223+
@connector: the connector name
224+
@value: the new backlight value
225+
226+
Changes the backlight of @output to @value.
227+
-->
228+
<method name="SetBacklight">
229+
<arg name="serial" direction="in" type="u" />
230+
<arg name="connector" direction="in" type="s" />
231+
<arg name="value" direction="in" type="i" />
232+
</method>
233+
234+
<!--
235+
Backlight:
236+
237+
A set of backlights. Each backlight is a dictionary with the following
238+
entries. If an entry is only a connector, it means there is no way to
239+
control it via this D-Bus interface.
240+
241+
* 'connector' (s) - An associated monitor connector
242+
* 'active' (s) - True if the monitor is active
243+
* 'value' (i) - Current value (optional)
244+
245+
The initial 'u' is a serial number used when setting the backlight.
246+
-->
247+
<property name="Backlight" type="(uaa{sv})" access="read" />
248+
219249
<!--
220250
GetCrtcGamma:
221251
@serial: configuration serial
@@ -489,5 +519,12 @@
489519
<arg name="output" direction="in" type="u" />
490520
<arg name="ctm" direction="in" type="(ttttttttt)" />
491521
</method>
522+
523+
<!--
524+
HasExternalmonitor:
525+
526+
True if there is an external monitor connected and activated.
527+
-->
528+
<property name="HasExternalMonitor" type="b" access="read" />
492529
</interface>
493530
</node>

src/backends/meta-monitor-manager-private.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -180,9 +180,6 @@ struct _MetaMonitorManager
180180
*
181181
* @set_power_save_mode: Sets the #MetaPowerSave mode (for all displays).
182182
*
183-
* @change_backlight: Changes the backlight intensity to the given value (in
184-
* percent).
185-
*
186183
* @tiled_monitor_added: Should be called by a #MetaMonitor when it is created.
187184
*
188185
* @tiled_monitor_removed: Should be called by a #MetaMonitor when it is

0 commit comments

Comments
 (0)