diff options
author | Jonas Ådahl <jadahl@gmail.com> | 2021-07-29 08:44:36 +0200 |
---|---|---|
committer | Marge Bot <marge-bot@gnome.org> | 2021-12-07 18:52:29 +0000 |
commit | 3c1f50a85eabdf185ab93e6dabdb8d8e5ebd79f3 (patch) | |
tree | 40702e7ea4c759d24b2ab570aa28b3deaf75555c /data | |
parent | d459df9a2865f3736d47571d323efc9d73615262 (diff) | |
download | mutter-3c1f50a85eabdf185ab93e6dabdb8d8e5ebd79f3.tar.gz |
Move D-Bus interface files to dedicated directory
Place the XML files in data/dbus-interfaces.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2126>
Diffstat (limited to 'data')
-rw-r--r-- | data/dbus-interfaces/meson.build | 1 | ||||
-rw-r--r-- | data/dbus-interfaces/org.freedesktop.RealtimeKit1.xml | 42 | ||||
-rw-r--r-- | data/dbus-interfaces/org.freedesktop.login1.xml | 46 | ||||
-rw-r--r-- | data/dbus-interfaces/org.gnome.Mutter.DisplayConfig.xml | 473 | ||||
-rw-r--r-- | data/dbus-interfaces/org.gnome.Mutter.IdleMonitor.xml | 37 | ||||
-rw-r--r-- | data/dbus-interfaces/org.gnome.Mutter.RemoteDesktop.xml | 351 | ||||
-rw-r--r-- | data/dbus-interfaces/org.gnome.Mutter.ScreenCast.xml | 220 | ||||
-rw-r--r-- | data/meson.build | 2 |
8 files changed, 1172 insertions, 0 deletions
diff --git a/data/dbus-interfaces/meson.build b/data/dbus-interfaces/meson.build new file mode 100644 index 000000000..0cdb8441e --- /dev/null +++ b/data/dbus-interfaces/meson.build @@ -0,0 +1 @@ +dbus_interfaces_dir = meson.current_source_dir() diff --git a/data/dbus-interfaces/org.freedesktop.RealtimeKit1.xml b/data/dbus-interfaces/org.freedesktop.RealtimeKit1.xml new file mode 100644 index 000000000..305e767b1 --- /dev/null +++ b/data/dbus-interfaces/org.freedesktop.RealtimeKit1.xml @@ -0,0 +1,42 @@ +<!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.RealtimeKit1"> + <method name="MakeThreadRealtime"> + <arg name="thread" type="t" direction="in"/> + <arg name="priority" type="u" direction="in"/> + </method> + <method name="MakeThreadRealtimeWithPID"> + <arg name="process" type="t" direction="in"/> + <arg name="thread" type="t" direction="in"/> + <arg name="priority" type="u" direction="in"/> + </method> + <method name="MakeThreadHighPriority"> + <arg name="thread" type="t" direction="in"/> + <arg name="priority" type="i" direction="in"/> + </method> + <method name="MakeThreadHighPriorityWithPID"> + <arg name="process" type="t" direction="in"/> + <arg name="thread" type="t" direction="in"/> + <arg name="priority" type="i" direction="in"/> + </method> + <method name="ResetKnown"/> + <method name="ResetAll"/> + <method name="Exit"/> + <property name="RTTimeUSecMax" type="x" access="read"/> + <property name="MaxRealtimePriority" type="i" access="read"/> + <property name="MinNiceLevel" type="i" access="read"/> + </interface> + <interface name="org.freedesktop.DBus.Properties"> + <method name="Get"> + <arg name="interface" direction="in" type="s"/> + <arg name="property" direction="in" type="s"/> + <arg name="value" direction="out" type="v"/> + </method> + </interface> + <interface name="org.freedesktop.DBus.Introspectable"> + <method name="Introspect"> + <arg name="data" type="s" direction="out"/> + </method> + </interface> +</node> diff --git a/data/dbus-interfaces/org.freedesktop.login1.xml b/data/dbus-interfaces/org.freedesktop.login1.xml new file mode 100644 index 000000000..765475132 --- /dev/null +++ b/data/dbus-interfaces/org.freedesktop.login1.xml @@ -0,0 +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> + <interface name="org.freedesktop.login1.Session"> + <property name="Active" type="b" access="read" /> + + <method name="Activate"> + </method> + <method name="TakeControl"> + <arg name="force" type="b"/> + </method> + <method name="ReleaseControl"> + </method> + <method name="TakeDevice"> + <annotation name="org.gtk.GDBus.C.UnixFD" value="true"/> + <arg name="major" type="u" direction="in"/> + <arg name="minor" type="u" direction="in"/> + <arg name="fd" type="h" direction="out"/> + <arg name="paused" type="b" direction="out"/> + </method> + <method name="ReleaseDevice"> + <arg name="major" type="u"/> + <arg name="minor" type="u"/> + </method> + <method name="PauseDeviceComplete"> + <arg name="major" type="u"/> + <arg name="minor" type="u"/> + </method> + <signal name="PauseDevice"> + <arg name="major" type="u"/> + <arg name="minor" type="u"/> + <arg name="type" type="s"/> + </signal> + <signal name="ResumeDevice"> + <arg name="major" type="u"/> + <arg name="minor" type="u"/> + <arg name="fd" type="h"/> + </signal> + </interface> + + <interface name="org.freedesktop.login1.Seat"> + <method name="SwitchTo"> + <arg name="vt" type="u"/> + </method> + </interface> +</node> diff --git a/data/dbus-interfaces/org.gnome.Mutter.DisplayConfig.xml b/data/dbus-interfaces/org.gnome.Mutter.DisplayConfig.xml new file mode 100644 index 000000000..7522652dc --- /dev/null +++ b/data/dbus-interfaces/org.gnome.Mutter.DisplayConfig.xml @@ -0,0 +1,473 @@ +<!DOCTYPE node PUBLIC +'-//freedesktop//DTD D-BUS Object Introspection 1.0//EN' +'http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd'> +<node> + <!-- + org.gnome.Mutter.DisplayConfig: + @short_description: display configuration interface + + This interface is used by mutter and gnome-settings-daemon + to apply multiple monitor configuration. + --> + + <interface name="org.gnome.Mutter.DisplayConfig"> + + <!-- + GetResources: + @serial: configuration serial + @crtcs: available CRTCs + @outputs: available outputs + @modes: available modes + @max_screen_width: + @max_screen_height: + + Retrieves the current layout of the hardware. + + @serial is an unique identifier representing the current state + of the screen. It must be passed back to ApplyConfiguration() + and will be increased for every configuration change (so that + mutter can detect that the new configuration is based on old + state). + + A CRTC (CRT controller) is a logical monitor, ie a portion + of the compositor coordinate space. It might correspond + to multiple monitors, when in clone mode, but not that + it is possible to implement clone mode also by setting different + CRTCs to the same coordinates. + + The number of CRTCs represent the maximum number of monitors + that can be set to expand and it is a HW constraint; if more + monitors are connected, then necessarily some will clone. This + is complementary to the concept of the encoder (not exposed in + the API), which groups outputs that necessarily will show the + same image (again a HW constraint). + + A CRTC is represented by a DBus structure with the following + layout: + * u ID: the ID in the API of this CRTC + * x winsys_id: the low-level ID of this CRTC (which might + be a XID, a KMS handle or something entirely + different) + * i x, y, width, height: the geometry of this CRTC + (might be invalid if the CRTC is not in + use) + * i current_mode: the current mode of the CRTC, or -1 if this + CRTC is not used + Note: the size of the mode will always correspond + to the width and height of the CRTC + * u current_transform: the current transform (espressed according + to the wayland protocol) + * au transforms: all possible transforms + * a{sv} properties: other high-level properties that affect this + CRTC; they are not necessarily reflected in + the hardware. + No property is specified in this version of the API. + + Note: all geometry information refers to the untransformed + display. + + An output represents a physical screen, connected somewhere to + the computer. Floating connectors are not exposed in the API. + An output is a DBus struct with the following fields: + * u ID: the ID in the API + * x winsys_id: the low-level ID of this output (XID or KMS handle) + * i current_crtc: the CRTC that is currently driving this output, + or -1 if the output is disabled + * au possible_crtcs: all CRTCs that can control this output + * s name: the name of the connector to which the output is attached + (like VGA1 or HDMI) + * au modes: valid modes for this output + * au clones: valid clones for this output, ie other outputs that + can be assigned the same CRTC as this one; if you + want to mirror two outputs that don't have each other + in the clone list, you must configure two different + CRTCs for the same geometry + * a{sv} properties: other high-level properties that affect this + output; they are not necessarily reflected in + the hardware. + Known properties: + - "vendor" (s): (readonly) the human readable name + of the manufacturer + - "product" (s): (readonly) the human readable name + of the display model + - "serial" (s): (readonly) the serial number of this + particular hardware part + - "display-name" (s): (readonly) a human readable name + of this output, to be shown in the UI + - "backlight" (i): (readonly, use the specific interface) + the backlight value as a percentage + (-1 if not supported) + - "primary" (b): whether this output is primary + or not + - "presentation" (b): whether this output is + for presentation only + Note: properties might be ignored if not consistently + applied to all outputs in the same clone group. In + general, it's expected that presentation or primary + outputs will not be cloned. + + A mode represents a set of parameters that are applied to + each output, such as resolution and refresh rate. It is a separate + object so that it can be referenced by CRTCs and outputs. + Multiple outputs in the same CRTCs must all have the same mode. + A mode is exposed as: + * u ID: the ID in the API + * x winsys_id: the low-level ID of this mode + * u width, height: the resolution + * d frequency: refresh rate + * u flags: mode flags as defined in xf86drmMode.h and randr.h + + Output and modes are read-only objects (except for output properties), + they can change only in accordance to HW changes (such as hotplugging + a monitor), while CRTCs can be changed with ApplyConfiguration(). + + XXX: actually, if you insist enough, you can add new modes + through xrandr command line or the KMS API, overriding what the + kernel driver and the EDID say. + Usually, it only matters with old cards with broken drivers, or + old monitors with broken EDIDs, but it happens more often with + projectors (if for example the kernel driver doesn't add the + 640x480 - 800x600 - 1024x768 default modes). Probably something + that we need to handle in mutter anyway. + --> + <method name="GetResources"> + <arg name="serial" direction="out" type="u" /> + <arg name="crtcs" direction="out" type="a(uxiiiiiuaua{sv})" /> + <arg name="outputs" direction="out" type="a(uxiausauaua{sv})" /> + <arg name="modes" direction="out" type="a(uxuudu)" /> + <arg name="max_screen_width" direction="out" type="i" /> + <arg name="max_screen_height" direction="out" type="i" /> + </method> + + <!-- + ApplyConfiguration: + @serial: configuration serial + @persistent: whether this configuration should be saved on disk + @crtcs: new data for CRTCs + @outputs: new data for outputs + + Applies the requested configuration changes. + + @serial must match the serial from the last GetResources() call, + or org.freedesktop.DBus.AccessDenied will be generated. + + If @persistent is true, mutter will attempt to replicate this + configuration the next time this HW layout appears. + + @crtcs represents the new logical configuration, as a list + of structures containing: + - u ID: the API ID from the corresponding GetResources() call + - i new_mode: the API ID of the new mode to configure the CRTC + with, or -1 if the CRTC should be disabled + - i x, y: the new coordinates of the top left corner + the geometry will be completed with the size information + from @new_mode + - u transform: the desired transform + - au outputs: the API ID of outputs that should be assigned to + this CRTC + - a{sv} properties: properties whose value should be changed + + Note: CRTCs not referenced in the array will be disabled. + + @outputs represent the output property changes as: + - u ID: the API ID of the output to change + - a{sv} properties: properties whose value should be changed + + Note: both for CRTCs and outputs, properties not included in + the dictionary will not be changed. + + Note: unrecognized properties will have no effect, but if the + configuration change succeeds the property will be reported + by the next GetResources() call, and if @persistent is true, + it will also be saved to disk. + + If the configuration is invalid according to the previous + GetResources() call, for example because a CRTC references + an output it cannot drive, or not all outputs support the + chosen mode, the error org.freedesktop.DBus.InvalidArgs will + be generated. + + If the configuration cannot be applied for any other reason + (eg. the screen size would exceed texture limits), the error + org.freedesktop.DBus.Error.LimitsExceeded will be generated. + --> + <method name="ApplyConfiguration"> + <arg name="serial" direction="in" type="u" /> + <arg name="persistent" direction="in" type="b" /> + <arg name="crtcs" direction="in" type="a(uiiiuaua{sv})" /> + <arg name="outputs" direction="in" type="a(ua{sv})" /> + </method> + + <!-- + ChangeBacklight: + @serial: configuration serial + @output: the API id of the output + @value: the new backlight value + + Changes the backlight of @output to @value, which is + expressed as a percentage and rounded to the HW limits. + + Returns the new value after rounding. + --> + <method name="ChangeBacklight"> + <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> + + <!-- + GetCrtcGamma: + @serial: configuration serial + @crtc: API id of the crtc + @red: red gamma ramp + @green: green gamma ramp + @blue: blue gamma ramp + + Requests the current gamma ramps of @crtc. + --> + <method name="GetCrtcGamma"> + <arg name="serial" direction="in" type="u" /> + <arg name="crtc" direction="in" type="u" /> + <arg name="red" direction="out" type="aq" /> + <arg name="green" direction="out" type="aq" /> + <arg name="blue" direction="out" type="aq" /> + </method> + + <!-- + SetCrtcGamma: + @serial: configuration serial + @crtc: API id of the crtc + @red: red gamma ramp + @green: green gamma ramp + @blue: blue gamma ramp + + Changes the gamma ramps of @crtc. + --> + <method name="SetCrtcGamma"> + <arg name="serial" direction="in" type="u" /> + <arg name="crtc" direction="in" type="u" /> + <arg name="red" direction="in" type="aq" /> + <arg name="green" direction="in" type="aq" /> + <arg name="blue" direction="in" type="aq" /> + </method> + + <!-- + PowerSaveMode: + + Contains the current power saving mode for the screen, and + allows changing it. + + Possible values: + - 0: on + - 1: standby + - 2: suspend + - 3: off + - -1: unknown (unsupported) + + A client should not attempt to change the powersave mode + from -1 (unknown) to any other value, and viceversa. + Note that the actual effects of the different values + depend on the hardware and the kernel driver in use, and + it's perfectly possible that all values different than on + have the same effect. + Also, setting the PowerSaveMode to 3 (off) may or may + not have the same effect as disabling all outputs by + setting no CRTC on them with ApplyConfiguration(), and + may or may not cause a configuration change. + + Also note that this property might become out of date + if changed through different means (for example using the + XRandR interface directly). + --> + <property name="PowerSaveMode" type="i" access="readwrite" /> + + <!-- + PanelOrientationManaged: + + Whether the built-in panel orientation is automatically managed + by mutter. + --> + <property name="PanelOrientationManaged" type="b" access="read" /> + + <!-- + MonitorsChanged: + + The signal is emitted every time the screen configuration + changes. + The client should then call GetResources() to read the new layout. + --> + <signal name="MonitorsChanged" /> + + <!-- + GetCurrentState: + @serial: configuration serial + @monitors: available monitors + @logical_monitors: current logical monitor configuration + @properties: display configuration properties + + @monitors represent connected physical monitors + + * s connector: connector name (e.g. HDMI-1, DP-1, etc) + * s vendor: vendor name + * s product: product name + * s serial: product serial + * a(siiddada{sv}) modes: available modes + * s id: mode ID + * i width: width in physical pixels + * i height: height in physical pixels + * d refresh rate: refresh rate + * d preferred scale: scale preferred as per calculations + * ad supported scales: scales supported by this mode + * a{sv} properties: optional properties, including: + - "is-current" (b): the mode is currently active mode + - "is-preferred" (b): the mode is the preferred mode + - "is-interlaced" (b): the mode is an interlaced mode + * a{sv} properties: optional properties, including: + - "width-mm" (i): physical width of monitor in millimeters + - "height-mm" (i): physical height of monitor in millimeters + - "is-underscanning" (b): whether underscanning is enabled + (absence of this means underscanning + not being supported) + - "max-screen-size" (ii): the maximum size a screen may have + (absence of this means unlimited screen + size) + - "is-builtin" (b): whether the monitor is built in, e.g. a + laptop panel (absence of this means it is + not built in) + - "display-name" (s): a human readable display name of the monitor + + Possible mode flags: + 1 : preferred mode + 2 : current mode + + + @logical_monitors represent current logical monitor configuration + + * i x: x position + * i y: y position + * d scale: scale + * u transform: transform (see below) + * b primary: true if this is the primary logical monitor + * a(sss) monitors: monitors displaying this logical monitor + * connector: name of the connector (e.g. DP-1, eDP-1 etc) + * vendor: vendor name + * product: product name + * serial: product serial + * a{sv} properties: possibly other properties + + Posisble transform values: + 0: normal + 1: 90° + 2: 180° + 3: 270° + 4: flipped + 5: 90° flipped + 6: 180° flipped + 7: 270° flipped + + + @layout_mode current layout mode represents the way logical monitors + are laid out on the screen. Possible modes include: + + 1 : physical + 2 : logical + + With physical layout mode, each logical monitor has the same dimensions + as the monitor modes of the associated monitors assigned to it, no + matter what scale is in use. + + With logical mode, the dimension of a logical monitor is the dimension + of the monitor mode, divided by the logical monitor scale. + + + Possible @properties are: + + * "layout-mode" (u): Represents in what way logical monitors are laid + out on the screen. The layout mode can be either + of the ones listed below. Absence of this property + means the layout mode cannot be changed, and that + "logical" mode is assumed to be used. + * 1 : logical - the dimension of a logical monitor is derived from + the monitor modes associated with it, then scaled + using the logical monitor scale. + * 2 : physical - the dimension of a logical monitor is derived from + the monitor modes associated with it. + * "supports-changing-layout-mode" (b): True if the layout mode can be + changed. Absence of this means the + layout mode cannot be changed. + * "global-scale-required" (b): True if all the logical monitors must + always use the same scale. Absence of + this means logical monitor scales can + differ. + * "legacy-ui-scaling-factor" (i): The legacy scaling factor traditionally + used to scale X11 clients (commonly + communicated via the + Gdk/WindowScalingFactor XSetting entry). + --> + <method name="GetCurrentState"> + <arg name="serial" direction="out" type="u" /> + <arg name="monitors" direction="out" type="a((ssss)a(siiddada{sv})a{sv})" /> + <arg name="logical_monitors" direction="out" type="a(iiduba(ssss)a{sv})" /> + <arg name="properties" direction="out" type="a{sv}" /> + </method> + + <!-- + ApplyMonitorsConfig: + @serial: configuration serial + @method: configuration method + @logical_monitors: monitors configuration + @properties: properties + + @method represents the way the configuration should be handled. + + Possible methods: + 0: verify + 1: temporary + 2: persistent + + @logical_monitors consists of a list of logical monitor configurations. + Each logical monitor configuration consists of: + + * i: layout x position + * i: layout y position + * d: scale + * u: transform (see GetCurrentState) + * b primary: true if this is the primary logical monitor + * a(ssa{sv}): a list of monitors, each consisting of: + * s: connector + * s: monitor mode ID + * a{sv}: monitor properties, including: + - "enable_underscanning" (b): enable monitor underscanning; + may only be set when underscanning + is supported (see GetCurrentState). + + @properties may effect the global monitor configuration state. Possible + properties are: + + * "layout-mode" (u): layout mode the passed configuration is in; may + only be set when changing the layout mode is + supported (see GetCurrentState). + --> + <method name="ApplyMonitorsConfig"> + <arg name="serial" direction="in" type="u" /> + <arg name="method" direction="in" type="u" /> + <arg name="logical_monitors" direction="in" type="a(iiduba(ssa{sv}))" /> + <arg name="properties" direction="in" type="a{sv}" /> + </method> + + <!-- + SetOutputCTM: + @serial: configuration serial + @output: API id of the output + @ctm: 3x3 matrix in fixed-point sign-magnitude S31.32 + + Changes the color transform matrix of @output + --> + <method name="SetOutputCTM"> + <arg name="serial" direction="in" type="u" /> + <arg name="output" direction="in" type="u" /> + <arg name="ctm" direction="in" type="(ttttttttt)" /> + </method> + </interface> +</node> diff --git a/data/dbus-interfaces/org.gnome.Mutter.IdleMonitor.xml b/data/dbus-interfaces/org.gnome.Mutter.IdleMonitor.xml new file mode 100644 index 000000000..374af4dc4 --- /dev/null +++ b/data/dbus-interfaces/org.gnome.Mutter.IdleMonitor.xml @@ -0,0 +1,37 @@ +<!DOCTYPE node PUBLIC +'-//freedesktop//DTD D-BUS Object Introspection 1.0//EN' +'http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd'> +<node> + <!-- + org.gnome.Mutter.IdleMonitor: + @short_description: idle monitor interface + + This interface is used by gnome-desktop to implement + user activity monitoring. + --> + + <interface name="org.gnome.Mutter.IdleMonitor"> + <method name="GetIdletime"> + <arg name="idletime" direction="out" type="t"/> + </method> + + <method name="AddIdleWatch"> + <arg name="interval" direction="in" type="t" /> + <arg name="id" direction="out" type="u" /> + </method> + + <method name="AddUserActiveWatch"> + <arg name="id" direction="out" type="u" /> + </method> + + <method name="RemoveWatch"> + <arg name="id" direction="in" type="u" /> + </method> + + <method name="ResetIdletime"/> + + <signal name="WatchFired"> + <arg name="id" direction="out" type="u" /> + </signal> + </interface> +</node> diff --git a/data/dbus-interfaces/org.gnome.Mutter.RemoteDesktop.xml b/data/dbus-interfaces/org.gnome.Mutter.RemoteDesktop.xml new file mode 100644 index 000000000..7bae10e43 --- /dev/null +++ b/data/dbus-interfaces/org.gnome.Mutter.RemoteDesktop.xml @@ -0,0 +1,351 @@ +<!DOCTYPE node PUBLIC +'-//freedesktop//DTD D-BUS Object Introspection 1.0//EN' +'http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd'> +<node> + + <!-- + org.gnome.Mutter.RemoteDesktop: + @short_description: Remote desktop interface + + This API is private and not intended to be used outside of the integrated + system that uses libmutter. No compatibility between versions are + promised. + --> + <interface name="org.gnome.Mutter.RemoteDesktop"> + + <!-- + CreateSession: + @session_path: Path to the new session object + --> + <method name="CreateSession"> + <arg name="session_path" type="o" direction="out" /> + </method> + + <!-- + SupportedDeviceTypes: + @short_description: Bit mask of supported device types + + Device types: + 1: keyboard + 2: pointer + 4: touchscreen + --> + <property name="SupportedDeviceTypes" type="u" access="read" /> + + <!-- + Version: + @short_description: API version + --> + <property name="Version" type="i" access="read" /> + + </interface> + + <!-- + org.gnome.Mutter.RemoteDesktop.Session: + @short_description: Remote desktop session + --> + <interface name="org.gnome.Mutter.RemoteDesktop.Session"> + + <!-- + SessionId: + + An identification string used for identifying a remote desktop session. + It can be used to associate screen cast sessions with a remote desktop session. + --> + <property name="SessionId" type="s" access="read" /> + + <!-- + Start: + + Start the remote desktop session + --> + <method name="Start" /> + + <!-- + Stop: + + Stop the remote desktop session + --> + <method name="Stop" /> + + <!-- + Closed: + + The session has closed. + + A session doesn't have to have been started before it may be closed. + After it being closed, it can no longer be used. + --> + <signal name="Closed" /> + + <!-- + NotifyKeyboardKeycode: + + A key identified by an evdev keycode was pressed or released + --> + <method name="NotifyKeyboardKeycode"> + <arg name="keycode" type="u" direction="in" /> + <arg name="state" type="b" direction="in" /> + </method> + + <!-- + NotifyKeyboardKeysym: + + A key identified by a keysym was pressed or released + --> + <method name="NotifyKeyboardKeysym"> + <arg name="keysym" type="u" direction="in" /> + <arg name="state" type="b" direction="in" /> + </method> + + <!-- + NotifyPointerButton: + + A pointer button was pressed or released + --> + <method name="NotifyPointerButton"> + <arg name="button" type="i" direction="in" /> + <arg name="state" type="b" direction="in" /> + </method> + + <!-- + NotifyPointerAxis: + + A smooth pointer axis event notification. Relative motion deltas are to be + interpreted as pixel movement of a standardized mouse. + + Additionally to the smooth pointer axis event notification, an emulated + discrete pointer axis event notification is emitted based on the submitted + accumulated smooth scrolling steps. + The base for these emulated discrete pointer axis event is the discrete step + with the value 10.0. + This means that for a delta dx (or dy) with the value 10.0 one emulated + discrete scrolling event is emitted. + For a high resolution smooth pointer axis event, a smaller value is submitted + for each scrolling step. + This means: For a double resolution mouse wheel one emulated discrete event + is emitted for 2 smooth pointer axis events with each having the value 5.0. + + Possible @flags: + 1: finish - scroll motion was finished (e.g. fingers lifted) + 2: source_wheel - The scroll event is originated by a mouse wheel. + 4: source_finger - The scroll event is originated by one or more fingers on + the device (eg. touchpads). + 8: source_continuous - The scroll event is originated by the motion of some + device (eg. a scroll button is set). + + Maximum one of the @flags 'source_wheel', 'source_finger', + 'source_continuous' may be specified. + If no source flag is specified, `source_finger` is assumed. + --> + <method name="NotifyPointerAxis"> + <arg name="dx" type="d" direction="in" /> + <arg name="dy" type="d" direction="in" /> + <arg name="flags" type="u" direction="in" /> + </method> + + <!-- + NotifyPointerAxisDiscrete: + + A discrete pointer axis event notification + --> + <method name="NotifyPointerAxisDiscrete"> + <arg name="axis" type="u" direction="in" /> + <arg name="steps" type="i" direction="in" /> + </method> + + <!-- + NotifyPointerMotionRelative: + + A relative pointer motion event notification + --> + <method name="NotifyPointerMotionRelative"> + <arg name="dx" type="d" direction="in" /> + <arg name="dy" type="d" direction="in" /> + </method> + + <!-- + NotifyPointerMotionAbsolute: + + A absolute pointer motion event notification + --> + <method name="NotifyPointerMotionAbsolute"> + <arg name="stream" type="s" direction="in" /> + <arg name="x" type="d" direction="in" /> + <arg name="y" type="d" direction="in" /> + </method> + + <!-- + NotifyTouchDown: + + A absolute pointer motion event notification + --> + <method name="NotifyTouchDown"> + <arg name="stream" type="s" direction="in" /> + <arg name="slot" type="u" direction="in" /> + <arg name="x" type="d" direction="in" /> + <arg name="y" type="d" direction="in" /> + </method> + + <!-- + NotifyTouchMotion: + + A absolute pointer motion event notification + --> + <method name="NotifyTouchMotion"> + <arg name="stream" type="s" direction="in" /> + <arg name="slot" type="u" direction="in" /> + <arg name="x" type="d" direction="in" /> + <arg name="y" type="d" direction="in" /> + </method> + + <!-- + NotifyTouchUp: + + A absolute pointer motion event notification + --> + <method name="NotifyTouchUp"> + <arg name="slot" type="u" direction="in" /> + </method> + + <!-- + EnableClipboard: + @options: Options for the clipboard + + Available @options include: + + * "mime-types" (as): List of mime types, for which the clipboard of the + remote desktop client has content. + Each mime-type is in string form, e.g. "image/jpeg", + "text/plain", etc.. + If this list is included in @options, then this call + is equivalent to calling 'EnableClipboard' and + 'SetSelection' atomically. + + Enables the clipboard for the remote desktop client which will allow it + to call the methods 'SetSelection', 'DisableClipboard', 'SelectionWrite', + 'SelectionWriteDone', 'SelectionRead'. + The 'SelectionOwnerChanged' signal will also be emitted when the + selection owner changes to inform the API user of new clipboard mime + types, and the 'SelectionTransfer' signal will be emitted to request the + advertised clipboard content of a mime type. + --> + <method name="EnableClipboard"> + <arg name="options" type="a{sv}" direction="in" /> + </method> + + <!-- + DisableClipboard: + + Unregisters all clipboard types that were advertised by the + remote desktop client. + The 'SelectionOwnerChanged' or 'SelectionTransfer' signals will not be + emitted any more. + Any 'SelectionTransfer' signals that weren't answered yet with a + 'SelectionWriteDone' call, will be answered with a 'SelectionWriteDone' + call where 'success' is 'false'. + --> + <method name="DisableClipboard" /> + + <!-- + SetSelection: + @options: Options for the clipboard selection + + Available @options include: + + * "mime-types" (as): List of mime types, for which the clipboard of the + remote desktop client has content. + Each mime-type is in string form, e.g. "image/jpeg", + "text/plain", etc.. + + Sets the owner of the clipboard formats in 'mime-types' in @options to + the remote desktop client, i.e. the remote desktop client has data for + these advertised clipboard formats. + --> + <method name="SetSelection"> + <arg name="options" type="a{sv}" direction="in" /> + </method> + + <!-- + SelectionWrite: + @serial: The serial of the request where this answer is directed to + @fd: The file descriptor where the data will be written to + + Answer to 'SelectionTransfer' signal. Contains the fd where the clipboard + content will be written to. + --> + <method name="SelectionWrite"> + <arg name="serial" type="u" direction="in" /> + <annotation name="org.gtk.GDBus.C.UnixFD" value="true"/> + <arg name="fd" type="h" direction="out" /> + </method> + + <!-- + SelectionWriteDone: + @serial: The serial of the request where this answer is directed to + @success: A boolean which indicates whether the transfer of the clipboard + data was successful ('true') or not ('false'). + + Notifies that the transfer of the clipboard data has either completed + successfully, or failed. + --> + <method name="SelectionWriteDone"> + <arg name="serial" type="u" direction="in" /> + <arg name="success" type="b" direction="in" /> + </method> + + <!-- + SelectionRead: + @mime_type: The mime-type string of the requested format + @fd: The file descriptor where the data will be written to + + Transfer the clipboard content given the specified mime type to the + method caller via a file descriptor. + It is the callee that creates the file descriptor. + --> + <method name="SelectionRead"> + <arg name="mime_type" type="s" direction="in" /> + <annotation name="org.gtk.GDBus.C.UnixFD" value="true"/> + <arg name="fd" type="h" direction="out" /> + </method> + + <!-- + SelectionOwnerChanged: + @options: Options for the clipboard selection + + Available @options include: + + * "mime-types" (as): List of mime types, for which the clipboard of the + remote desktop client has content. + Each mime-type is in string form, e.g. "image/jpeg", + "text/plain", etc.. + * "session-is-owner" (b): 'true', if the remote desktop clients clipboard + is already owner of these types, else 'false'. + + Informs the remote desktop client of new clipboard formats that are + available. + --> + <signal name="SelectionOwnerChanged"> + <arg name="options" type="a{sv}" direction="in" /> + </signal> + + <!-- + SelectionTransfer: + @mime_type: The mime-type string of the requested format + @serial: The serial, that the answer of this particular request, MUST use + + Requests the data for a clipboard format from the remote desktop client. + MUST NOT be called when the remote desktop clients clipboard is (already) + disabled. + --> + <signal name="SelectionTransfer"> + <arg name="mime_type" type="s" direction="in" /> + <arg name="serial" type="u" direction="in" /> + </signal> + + <property name="CapsLockState" type="b" access="read" /> + <property name="NumLockState" type="b" access="read" /> + + </interface> + +</node> diff --git a/data/dbus-interfaces/org.gnome.Mutter.ScreenCast.xml b/data/dbus-interfaces/org.gnome.Mutter.ScreenCast.xml new file mode 100644 index 000000000..d9f1f4435 --- /dev/null +++ b/data/dbus-interfaces/org.gnome.Mutter.ScreenCast.xml @@ -0,0 +1,220 @@ +<!DOCTYPE node PUBLIC +'-//freedesktop//DTD D-BUS Object Introspection 1.0//EN' +'http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd'> +<node> + + <!-- + org.gnome.Mutter.ScreenCast: + @short_description: Screen cast interface + + This API is private and not intended to be used outside of the integrated + system that uses libmutter. No compatibility between versions are + promised. + --> + <interface name="org.gnome.Mutter.ScreenCast"> + + <!-- + CreateSession: + @properties: Properties + @session_path: Path to the new session object + + * "remote-desktop-session-id" (s): The ID of a remote desktop session. + Remote desktop driven screen casts + are started and stopped by the remote + desktop session. + * "disable-animations" (b): Set to "true" if the screen cast application + would prefer animations to be globally + disabled, while the session is running. Default + is "false". Available since version 3. + --> + <method name="CreateSession"> + <arg name="properties" type="a{sv}" direction="in" /> + <arg name="session_path" type="o" direction="out" /> + </method> + + <!-- + Version: + @short_description: API version + --> + <property name="Version" type="i" access="read" /> + + </interface> + + <!-- + org.gnome.Mutter.ScreenCast.Session: + @short_description: Screen cast session + --> + <interface name="org.gnome.Mutter.ScreenCast.Session"> + + <!-- + Start: + + Start the screen cast session + --> + <method name="Start" /> + + <!-- + Stop: + + Stop the screen cast session + --> + <method name="Stop" /> + + <!-- + Closed: + + The session has closed. + --> + <signal name="Closed" /> + + <!-- + RecordMonitor: + @connector: Connector of the monitor to record + @properties: Properties + @stream_path: Path to the new stream object + + Record a single monitor. + + Available @properties include: + + * "cursor-mode" (u): Cursor mode. Default: 'hidden' (see below) + Available since API version 2. + * "is-recording" (b): Whether this is a screen recording. May be + be used for choosing appropriate visual feedback. + Default: false. Available since API version 4. + + Available cursor mode values: + + 0: hidden - cursor is not included in the stream + 1: embedded - cursor is included in the framebuffer + 2: metadata - cursor is included as metadata in the PipeWire stream + --> + <method name="RecordMonitor"> + <arg name="connector" type="s" direction="in" /> + <arg name="properties" type="a{sv}" direction="in" /> + <arg name="stream_path" type="o" direction="out" /> + </method> + + <!-- + RecordWindow: + @properties: Properties used determining what window to select + @stream_path: Path to the new stream object + + Supported since API version 2. + + Record a single window. The cursor will not be included. + + Available @properties include: + + * "window-id" (t): Id of the window to record. + * "cursor-mode" (u): Cursor mode. Default: 'hidden' (see RecordMonitor). + * "is-recording" (b): Whether this is a screen recording. May be + be used for choosing panel icon. + Default: false. Available since API version 4. + + --> + <method name="RecordWindow"> + <arg name="properties" type="a{sv}" direction="in" /> + <arg name="stream_path" type="o" direction="out" /> + </method> + + <!-- + RecordArea: + @x: X position of the recorded area + @y: Y position of the recorded area + @width: width of the recorded area + @height: height of the recorded area + @properties: Properties + @stream_path: Path to the new stream object + + Record an area of the stage. The coordinates are in stage coordinates. + The size of the stream does not necessarily match the size of the + recorded area, and will depend on DPI scale of the affected monitors. + + Available @properties include: + + * "cursor-mode" (u): Cursor mode. Default: 'hidden' (see below) + Available since API version 2. + * "is-recording" (b): Whether this is a screen recording. May be + be used for choosing panel icon. + Default: false. Available since API version 4. + + Available cursor mode values: + + 0: hidden - cursor is not included in the stream + 1: embedded - cursor is included in the framebuffer + 2: metadata - cursor is included as metadata in the PipeWire stream + --> + <method name="RecordArea"> + <arg name="x" type="i" direction="in" /> + <arg name="y" type="i" direction="in" /> + <arg name="width" type="i" direction="in" /> + <arg name="height" type="i" direction="in" /> + <arg name="properties" type="a{sv}" direction="in" /> + <arg name="stream_path" type="o" direction="out" /> + </method> + + <!-- + RecordVirtual: + @properties: Properties + @stream_path: Path to the new stream object + + Record a virtual area that will be represented as a virtual monitor. The + width and height corresponds to the non-scaled intended stream size. + + Available @properties include: + + * "cursor-mode" (u): Cursor mode. Default: 'hidden' (see below) + Available since API version 2. + * "is-platform" (b): Whether this virtual output should be considered + part of the platform, meaning it will not be + interpreted as if the screen is shared, but more + transparently as if it was a real monitor. + Available since API version 3. Default: FALSE. + + Available cursor mode values: + + 0: hidden - cursor is not included in the stream + 1: embedded - cursor is included in the framebuffer + 2: metadata - cursor is included as metadata in the PipeWire stream + --> + <method name="RecordVirtual"> + <arg name="properties" type="a{sv}" direction="in" /> + <arg name="stream_path" type="o" direction="out" /> + </method> + </interface> + + <!-- + org.gnome.Mutter.ScreenCast.Stream: + @short_description: Screen cast stream + --> + <interface name="org.gnome.Mutter.ScreenCast.Stream"> + + <!-- + PipeWireStreamAdded: + @short_description: Pipewire stream added + + A signal emitted when PipeWire stream for the screen cast stream has + been created. The @node_id corresponds to the PipeWire stream node. + --> + <signal name="PipeWireStreamAdded"> + <annotation name="org.gtk.GDBus.C.Name" value="pipewire-stream-added"/> + <arg name="node_id" type="u" direction="out" /> + </signal> + + <!-- + Parameters: + @short_description: Optional stream parameters + + Available parameters include: + + * "position" (ii): Position of the source of the stream in the + compositor coordinate space. + * "size" (ii): Size of the source of the stream in the compositor + coordinate space. + --> + <property name="Parameters" type="a{sv}" access="read" /> + + </interface> + +</node> diff --git a/data/meson.build b/data/meson.build index b55ded908..ae9832199 100644 --- a/data/meson.build +++ b/data/meson.build @@ -64,3 +64,5 @@ if have_libgudev install_dir: join_paths(udev_dir, 'rules.d'), ) endif + +subdir('dbus-interfaces') |