* autogen portal code Signed-off-by: Sahil Yeole <sahilyeole93@gmail.com> * use remote desktop portal Signed-off-by: Sahil Yeole <sahilyeole93@gmail.com> * remove clipboard portal in favour of #6586 Signed-off-by: Sahil Yeole <sahilyeole93@gmail.com> * remove clipboard portal Signed-off-by: Sahil Yeole <sahilyeole93@gmail.com> * use select_devices for input capture Signed-off-by: Sahil Yeole <sahilyeole93@gmail.com> * remove embedded cursor code as not being used | return session path for input capture Signed-off-by: Sahil Yeole <sahilyeole93@gmail.com> * setup rdp input Signed-off-by: Sahil Yeole <sahilyeole93@gmail.com> * remove simulate example Signed-off-by: Sahil Yeole <sahilyeole93@gmail.com> * setup rdp input raw key events + mouse movements Signed-off-by: Sahil Yeole <sahilyeole93@gmail.com> * fix rdp raw key input Signed-off-by: Sahil Yeole <sahilyeole93@gmail.com> * refact rdp raw key inpuy & fix right meta key Signed-off-by: Sahil Yeole <sahilyeole93@gmail.com> * refact and support rdp layout mode key input Signed-off-by: Sahil Yeole <sahilyeole93@gmail.com> * support rdp mouse clicks Signed-off-by: Sahil Yeole <sahilyeole93@gmail.com> * support rdp mouse scroll Signed-off-by: Sahil Yeole <sahilyeole93@gmail.com> * support rdp key sequence input Signed-off-by: Sahil Yeole <sahilyeole93@gmail.com> * use rdp input only when uinput is not available Signed-off-by: Sahil Yeole <sahilyeole93@gmail.com> * combine rdp input and get_capturables into a single rdp request Signed-off-by: Sahil Yeole <sahilyeole93@gmail.com> * rdp fix build Signed-off-by: Sahil Yeole <sahilyeole93@gmail.com> * rdp fix build Signed-off-by: Sahil Yeole <sahilyeole93@gmail.com> * fix rdp caps lock Signed-off-by: Sahil Yeole <sahilyeole93@gmail.com> * format pipewire.rs Signed-off-by: Sahil Yeole <sahilyeole93@gmail.com> * format rdp_input.rs Signed-off-by: Sahil Yeole <sahilyeole93@gmail.com> * revert #6628 as rdp request state is now managed (better solution) Signed-off-by: Sahil Yeole <sahilyeole93@gmail.com> * fix rdp crash on arch kde Signed-off-by: Sahil Yeole <sahilyeole93@gmail.com> * rdp_input.rs improvements Signed-off-by: Sahil Yeole <sahilyeole93@gmail.com> * refact request_remote_desktop Signed-off-by: Sahil Yeole <sahilyeole93@gmail.com> * improve unwraps Signed-off-by: Sahil Yeole <sahilyeole93@gmail.com> * remove unwraps Signed-off-by: Sahil Yeole <sahilyeole93@gmail.com> * use session references instead of clones Signed-off-by: Sahil Yeole <sahilyeole93@gmail.com> --------- Signed-off-by: Sahil Yeole <sahilyeole93@gmail.com>
107 lines
3.3 KiB
Rust
107 lines
3.3 KiB
Rust
// This code was autogenerated with `dbus-codegen-rust -c blocking -m None`, see https://github.com/diwic/dbus-rs
|
|
// https://github.com/flatpak/xdg-desktop-portal/blob/main/data/org.freedesktop.portal.ScreenCast.xml
|
|
use dbus;
|
|
#[allow(unused_imports)]
|
|
use dbus::arg;
|
|
use dbus::blocking;
|
|
|
|
pub trait OrgFreedesktopPortalScreenCast {
|
|
fn create_session(&self, options: arg::PropMap) -> Result<dbus::Path<'static>, dbus::Error>;
|
|
fn select_sources(
|
|
&self,
|
|
session_handle: dbus::Path,
|
|
options: arg::PropMap,
|
|
) -> Result<dbus::Path<'static>, dbus::Error>;
|
|
fn start(
|
|
&self,
|
|
session_handle: dbus::Path,
|
|
parent_window: &str,
|
|
options: arg::PropMap,
|
|
) -> Result<dbus::Path<'static>, dbus::Error>;
|
|
fn open_pipe_wire_remote(
|
|
&self,
|
|
session_handle: dbus::Path,
|
|
options: arg::PropMap,
|
|
) -> Result<arg::OwnedFd, dbus::Error>;
|
|
fn available_source_types(&self) -> Result<u32, dbus::Error>;
|
|
fn available_cursor_modes(&self) -> Result<u32, dbus::Error>;
|
|
fn version(&self) -> Result<u32, dbus::Error>;
|
|
}
|
|
|
|
impl<'a, T: blocking::BlockingSender, C: ::std::ops::Deref<Target = T>>
|
|
OrgFreedesktopPortalScreenCast for blocking::Proxy<'a, C>
|
|
{
|
|
fn create_session(&self, options: arg::PropMap) -> Result<dbus::Path<'static>, dbus::Error> {
|
|
self.method_call(
|
|
"org.freedesktop.portal.ScreenCast",
|
|
"CreateSession",
|
|
(options,),
|
|
)
|
|
.map(|r: (dbus::Path<'static>,)| r.0)
|
|
}
|
|
|
|
fn select_sources(
|
|
&self,
|
|
session_handle: dbus::Path,
|
|
options: arg::PropMap,
|
|
) -> Result<dbus::Path<'static>, dbus::Error> {
|
|
self.method_call(
|
|
"org.freedesktop.portal.ScreenCast",
|
|
"SelectSources",
|
|
(session_handle, options),
|
|
)
|
|
.map(|r: (dbus::Path<'static>,)| r.0)
|
|
}
|
|
|
|
fn start(
|
|
&self,
|
|
session_handle: dbus::Path,
|
|
parent_window: &str,
|
|
options: arg::PropMap,
|
|
) -> Result<dbus::Path<'static>, dbus::Error> {
|
|
self.method_call(
|
|
"org.freedesktop.portal.ScreenCast",
|
|
"Start",
|
|
(session_handle, parent_window, options),
|
|
)
|
|
.map(|r: (dbus::Path<'static>,)| r.0)
|
|
}
|
|
|
|
fn open_pipe_wire_remote(
|
|
&self,
|
|
session_handle: dbus::Path,
|
|
options: arg::PropMap,
|
|
) -> Result<arg::OwnedFd, dbus::Error> {
|
|
self.method_call(
|
|
"org.freedesktop.portal.ScreenCast",
|
|
"OpenPipeWireRemote",
|
|
(session_handle, options),
|
|
)
|
|
.map(|r: (arg::OwnedFd,)| r.0)
|
|
}
|
|
|
|
fn available_source_types(&self) -> Result<u32, dbus::Error> {
|
|
<Self as blocking::stdintf::org_freedesktop_dbus::Properties>::get(
|
|
&self,
|
|
"org.freedesktop.portal.ScreenCast",
|
|
"AvailableSourceTypes",
|
|
)
|
|
}
|
|
|
|
fn available_cursor_modes(&self) -> Result<u32, dbus::Error> {
|
|
<Self as blocking::stdintf::org_freedesktop_dbus::Properties>::get(
|
|
&self,
|
|
"org.freedesktop.portal.ScreenCast",
|
|
"AvailableCursorModes",
|
|
)
|
|
}
|
|
|
|
fn version(&self) -> Result<u32, dbus::Error> {
|
|
<Self as blocking::stdintf::org_freedesktop_dbus::Properties>::get(
|
|
&self,
|
|
"org.freedesktop.portal.ScreenCast",
|
|
"version",
|
|
)
|
|
}
|
|
}
|