Skip to content

Commit

Permalink
Merge pull request #30 from BuddiesOfBudgie/backlight
Browse files Browse the repository at this point in the history
Add API replacing gsd-power's use of libgnome-rr
  • Loading branch information
fossfreedom authored Sep 21, 2024
2 parents 79ad959 + 86bd9a3 commit 022fb54
Show file tree
Hide file tree
Showing 9 changed files with 373 additions and 90 deletions.
37 changes: 37 additions & 0 deletions data/dbus-interfaces/org.gnome.Mutter.DisplayConfig.xml
Original file line number Diff line number Diff line change
Expand Up @@ -210,12 +210,42 @@
Returns the new value after rounding.
-->
<method name="ChangeBacklight">
<annotation name="org.freedesktop.DBus.Deprecated" value="true"/>
<arg name="serial" direction="in" type="u" />
<arg name="output" direction="in" type="u" />
<arg name="value" direction="in" type="i" />
<arg name="new_value" direction="out" type="i" />
</method>

<!--
SetBacklight:
@serial: configuration serial
@connector: the connector name
@value: the new backlight value
Changes the backlight of @output to @value.
-->
<method name="SetBacklight">
<arg name="serial" direction="in" type="u" />
<arg name="connector" direction="in" type="s" />
<arg name="value" direction="in" type="i" />
</method>

<!--
Backlight:
A set of backlights. Each backlight is a dictionary with the following
entries. If an entry is only a connector, it means there is no way to
control it via this D-Bus interface.
* 'connector' (s) - An associated monitor connector
* 'active' (s) - True if the monitor is active
* 'value' (i) - Current value (optional)
The initial 'u' is a serial number used when setting the backlight.
-->
<property name="Backlight" type="(uaa{sv})" access="read" />

<!--
GetCrtcGamma:
@serial: configuration serial
Expand Down Expand Up @@ -489,5 +519,12 @@
<arg name="output" direction="in" type="u" />
<arg name="ctm" direction="in" type="(ttttttttt)" />
</method>

<!--
HasExternalmonitor:
True if there is an external monitor connected and activated.
-->
<property name="HasExternalMonitor" type="b" access="read" />
</interface>
</node>
3 changes: 0 additions & 3 deletions src/backends/meta-monitor-manager-private.h
Original file line number Diff line number Diff line change
Expand Up @@ -180,9 +180,6 @@ struct _MetaMonitorManager
*
* @set_power_save_mode: Sets the #MetaPowerSave mode (for all displays).
*
* @change_backlight: Changes the backlight intensity to the given value (in
* percent).
*
* @tiled_monitor_added: Should be called by a #MetaMonitor when it is created.
*
* @tiled_monitor_removed: Should be called by a #MetaMonitor when it is
Expand Down
Loading

0 comments on commit 022fb54

Please sign in to comment.