mirror of
https://github.com/edu4rdshl/gnome-shell.git
synced 2026-07-18 07:34:54 +00:00
https://gitlab.gnome.org/GNOME/xdg-desktop-portal-gnome/-/issues/47#note_2089569 This adds an interface in org.gnome.Shell that provides additional functionality for managing key grabs, suitable for the GlobalShortcuts portal.
120 lines
4.5 KiB
XML
120 lines
4.5 KiB
XML
<node>
|
|
<interface name="org.gnome.Shell">
|
|
<method name="Eval">
|
|
<arg type="s" direction="in" name="script"/>
|
|
<arg type="b" direction="out" name="success"/>
|
|
<arg type="s" direction="out" name="result"/>
|
|
</method>
|
|
<method name="FocusSearch"/>
|
|
<method name="ShowOSD">
|
|
<arg type="a{sv}" direction="in" name="params"/>
|
|
</method>
|
|
<method name="ShowMonitorLabels">
|
|
<arg type="a{sv}" direction="in" name="params"/>
|
|
</method>
|
|
<method name="HideMonitorLabels"/>
|
|
<method name="FocusApp">
|
|
<arg type="s" direction="in" name="id"/>
|
|
</method>
|
|
<method name="ShowApplications"/>
|
|
|
|
<!-- START SHORTCUTS
|
|
Designed to handle shortcuts for the globalshortcuts portal.
|
|
`group_id` identifies a group of shortcuts meant to be modified together.
|
|
-->
|
|
|
|
<!-- (Re)binds shortcuts according to spec.
|
|
`shortcuts` is made of pairs:
|
|
(id: s, {'shortcuts'=Variant(as)})
|
|
for example:
|
|
('sstop', {'description': 'Stop the show', 'shortcuts': <['<alt>C', '<ctrl>Q']>})
|
|
|
|
`results['shortcuts']` is the list of shortcuts now in effect:
|
|
(id: s, {'trigger_description'=Variant(s)})
|
|
for example:
|
|
('sstop', {'description': 'Stop the show', 'trigger_description': <['hold alt and then C', 'the Q key while holding Control']>})
|
|
'trigger_description's are free-form, human-readable text.
|
|
|
|
`changed` is nonzero if registered shortcuts changed because of this call, zero otherwise.
|
|
|
|
The 'description' key is optional.
|
|
|
|
FIXME: trigger release events when a combo is being pressed while unbinding?
|
|
-->
|
|
<method name="BindShortcuts">
|
|
<arg type="s" name="group_id" direction="in"/>
|
|
<arg type="a(sa{sv})" name="shortcuts" direction="in"/>
|
|
<arg type="a{sv}" name="results" direction="out"/>
|
|
<arg type="u" name="changed" direction="out"/>
|
|
</method>
|
|
|
|
<!-- Unbinds shortcuts in the selected group.
|
|
Equivalent to calling BindShortcuts with an empty list.
|
|
-->
|
|
<method name="UnbindShortcuts">
|
|
<arg type="s" name="group_id" direction="in"/>
|
|
</method>
|
|
|
|
<!-- Lists all shortcuts of the group, together with their triggers.
|
|
If the group never bound shortcuts, this returns an error.
|
|
|
|
`results['shortcuts']` is a list of pairs:
|
|
(id: s, {'description'=Variant(s), 'trigger_description'=Variant(as))})
|
|
for example:
|
|
('sstop', {'description': 'Stop the show', 'trigger_description': <['hold alt and then C', 'the Q key while holding Control']>})
|
|
|
|
The 'description' key is optional.
|
|
-->
|
|
<method name="ListShortcuts">
|
|
<arg type="s" name="group_id" direction="in"/>
|
|
<arg type="a{sv}" name="results" direction="out"/>
|
|
</method>
|
|
|
|
<!-- Sent whenever a registered combo becomes pressed.
|
|
Sent back to the client that registered it. -->
|
|
<signal name="Activated">
|
|
<arg type="s" name="group_id" direction="out"/>
|
|
<arg type="s" name="shortcut_id" direction="out"/>
|
|
<arg type="t" name="timestamp" direction="out"/>
|
|
</signal>
|
|
|
|
<!-- Sent whenever a registered combo stops being pressed.
|
|
Sent back to the client that registered it. -->
|
|
<signal name="Deactivated">
|
|
<arg type="s" name="group_id" direction="out"/>
|
|
<arg type="s" name="shortcut_id" direction="out"/>
|
|
<arg type="t" name="timestamp" direction="out"/>
|
|
</signal>
|
|
|
|
<!-- END SHORTCUTS -->
|
|
|
|
<method name="GrabAccelerator">
|
|
<arg type="s" direction="in" name="accelerator"/>
|
|
<!-- Shell.ActionMode -->
|
|
<arg type="u" direction="in" name="modeFlags"/>
|
|
<!-- Meta.KeyBindingFlags -->
|
|
<arg type="u" direction="in" name="grabFlags"/>
|
|
<arg type="u" direction="out" name="action"/>
|
|
</method>
|
|
<method name="GrabAccelerators">
|
|
<arg type="a(suu)" direction="in" name="accelerators"/>
|
|
<arg type="au" direction="out" name="actions"/>
|
|
</method>
|
|
<method name="UngrabAccelerator">
|
|
<arg type="u" direction="in" name="action"/>
|
|
<arg type="b" direction="out" name="success"/>
|
|
</method>
|
|
<method name="UngrabAccelerators">
|
|
<arg type="au" direction="in" name="action"/>
|
|
<arg type="b" direction="out" name="success"/>
|
|
</method>
|
|
<method name="ScreenTransition"/>
|
|
<signal name="AcceleratorActivated">
|
|
<arg name="action" type="u"/>
|
|
<arg name="parameters" type="a{sv}"/>
|
|
</signal>
|
|
<property name="Mode" type="s" access="read"/>
|
|
<property name="OverviewActive" type="b" access="readwrite"/>
|
|
<property name="ShellVersion" type="s" access="read"/>
|
|
</interface>
|
|
</node>
|