Skip to content

Commit

Permalink
feat(XWayland): add remove_app_id method
Browse files Browse the repository at this point in the history
  • Loading branch information
ShadowApex committed Feb 13, 2024
1 parent 4dfe652 commit 683ff62
Show file tree
Hide file tree
Showing 6 changed files with 167 additions and 130 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

30 changes: 15 additions & 15 deletions bindings/dbus-xml/org-shadowblip-gamescope-manager.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,21 @@
<?xml version="1.0"?>
<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN" "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
<node>
<interface name="org.freedesktop.DBus.Introspectable">
<method name="Introspect">
<arg type="s" direction="out"/>
</method>
</interface>
<interface name="org.shadowblip.Gamescope.Manager">
<property name="Name" type="s" access="read"/>
</interface>
<interface name="org.freedesktop.DBus.Peer">
<method name="Ping">
</method>
<method name="GetMachineId">
<arg type="s" direction="out"/>
</method>
</interface>
<interface name="org.freedesktop.DBus.Properties">
<method name="Get">
<arg name="interface_name" type="s" direction="in"/>
Expand All @@ -25,19 +40,4 @@
<arg name="invalidated_properties" type="as"/>
</signal>
</interface>
<interface name="org.shadowblip.Gamescope.Manager">
<property name="Name" type="s" access="read"/>
</interface>
<interface name="org.freedesktop.DBus.Peer">
<method name="Ping">
</method>
<method name="GetMachineId">
<arg type="s" direction="out"/>
</method>
</interface>
<interface name="org.freedesktop.DBus.Introspectable">
<method name="Introspect">
<arg type="s" direction="out"/>
</method>
</interface>
</node>
68 changes: 40 additions & 28 deletions bindings/dbus-xml/org-shadowblip-gamescope-xwayland.xml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,12 @@
<arg name="window_id" type="u" direction="in"/>
<arg name="app_id" type="u" direction="in"/>
</method>
<!--
Removes the app ID on the given window
-->
<method name="RemoveAppId">
<arg name="window_id" type="u" direction="in"/>
</method>
<!--
Returns whether or not the given window has an app ID set
-->
Expand All @@ -99,42 +105,18 @@
-->
<property name="WatchedWindows" type="au" access="read"/>
</interface>
<interface name="org.freedesktop.DBus.Properties">
<method name="Get">
<arg name="interface_name" type="s" direction="in"/>
<arg name="property_name" type="s" direction="in"/>
<arg type="v" direction="out"/>
</method>
<method name="Set">
<arg name="interface_name" type="s" direction="in"/>
<arg name="property_name" type="s" direction="in"/>
<arg name="value" type="v" direction="in"/>
<interface name="org.freedesktop.DBus.Peer">
<method name="Ping">
</method>
<method name="GetAll">
<arg name="interface_name" type="s" direction="in"/>
<arg type="a{sv}" direction="out"/>
<method name="GetMachineId">
<arg type="s" direction="out"/>
</method>
<!--
Emits the `org.freedesktop.DBus.Properties.PropertiesChanged` signal.
-->
<signal name="PropertiesChanged">
<arg name="interface_name" type="s"/>
<arg name="changed_properties" type="a{sv}"/>
<arg name="invalidated_properties" type="as"/>
</signal>
</interface>
<interface name="org.freedesktop.DBus.Introspectable">
<method name="Introspect">
<arg type="s" direction="out"/>
</method>
</interface>
<interface name="org.freedesktop.DBus.Peer">
<method name="Ping">
</method>
<method name="GetMachineId">
<arg type="s" direction="out"/>
</method>
</interface>
<interface name="org.shadowblip.Gamescope.XWayland.Primary">
<!--
Returns true if the window with the given window ID exists in focusable apps
Expand All @@ -148,6 +130,12 @@
-->
<signal name="BaselayerWindowUpdated">
</signal>
<!--
Fires when a new window is created
-->
<signal name="WindowCreated">
<arg name="window_id" type="u"/>
</signal>
<!--
Sets the given window as the main launcher app. This will set an X window
property called STEAM_GAME to 769 (Steam), which will make Gamescope
Expand Down Expand Up @@ -272,4 +260,28 @@
-->
<property name="OverlayFocused" type="b" access="read"/>
</interface>
<interface name="org.freedesktop.DBus.Properties">
<method name="Get">
<arg name="interface_name" type="s" direction="in"/>
<arg name="property_name" type="s" direction="in"/>
<arg type="v" direction="out"/>
</method>
<method name="Set">
<arg name="interface_name" type="s" direction="in"/>
<arg name="property_name" type="s" direction="in"/>
<arg name="value" type="v" direction="in"/>
</method>
<method name="GetAll">
<arg name="interface_name" type="s" direction="in"/>
<arg type="a{sv}" direction="out"/>
</method>
<!--
Emits the `org.freedesktop.DBus.Properties.PropertiesChanged` signal.
-->
<signal name="PropertiesChanged">
<arg name="interface_name" type="s"/>
<arg name="changed_properties" type="a{sv}"/>
<arg name="invalidated_properties" type="as"/>
</signal>
</interface>
</node>
74 changes: 37 additions & 37 deletions docs/manager.md
Original file line number Diff line number Diff line change
@@ -1,50 +1,19 @@
# Manager DBus Interface API

## org.freedesktop.DBus.Properties
## org.freedesktop.DBus.Introspectable

### Methods

#### Get

##### Arguments

| Name | Direction | Type | Description |
| --- | :---: | :---: | --- |
| **interface_name** | *in* | *s* | |
| **property_name** | *in* | *s* | |
| \*\*\*\* | *out* | *v* | |

#### Set

##### Arguments

| Name | Direction | Type | Description |
| --- | :---: | :---: | --- |
| **interface_name** | *in* | *s* | |
| **property_name** | *in* | *s* | |
| **value** | *in* | *v* | |

#### GetAll
#### Introspect

##### Arguments

| Name | Direction | Type | Description |
| --- | :---: | :---: | --- |
| **interface_name** | *in* | *s* | |
| \*\*\*\* | *out* | *a{sv}* | |
| \*\*\*\* | *out* | *s* | |

### Signals

#### PropertiesChanged

##### Arguments

| Name | Direction | Type | Description |
| --- | :---: | :---: | --- |
| **interface_name** | \*\* | *s* | |
| **changed_properties** | \*\* | *a{sv}* | |
| **invalidated_properties** | \*\* | *as* | |

## org.shadowblip.Gamescope.Manager

### Properties
Expand Down Expand Up @@ -73,16 +42,47 @@

### Signals

## org.freedesktop.DBus.Introspectable
## org.freedesktop.DBus.Properties

### Methods

#### Introspect
#### Get

##### Arguments

| Name | Direction | Type | Description |
| --- | :---: | :---: | --- |
| \*\*\*\* | *out* | *s* | |
| **interface_name** | *in* | *s* | |
| **property_name** | *in* | *s* | |
| \*\*\*\* | *out* | *v* | |

#### Set

##### Arguments

| Name | Direction | Type | Description |
| --- | :---: | :---: | --- |
| **interface_name** | *in* | *s* | |
| **property_name** | *in* | *s* | |
| **value** | *in* | *v* | |

#### GetAll

##### Arguments

| Name | Direction | Type | Description |
| --- | :---: | :---: | --- |
| **interface_name** | *in* | *s* | |
| \*\*\*\* | *out* | *a{sv}* | |

### Signals

#### PropertiesChanged

##### Arguments

| Name | Direction | Type | Description |
| --- | :---: | :---: | --- |
| **interface_name** | \*\* | *s* | |
| **changed_properties** | \*\* | *a{sv}* | |
| **invalidated_properties** | \*\* | *as* | |
Loading

0 comments on commit 683ff62

Please sign in to comment.