mirror of https://github.com/wayvr-org/wayvr.git
format
This commit is contained in:
parent
f3dc87fa64
commit
b83c54334f
|
|
@ -1,18 +1,18 @@
|
||||||
use crate::{
|
use crate::{
|
||||||
assets::AssetPath,
|
assets::AssetPath,
|
||||||
components::{
|
components::{
|
||||||
button::{self, ComponentButton},
|
|
||||||
Component, ComponentBase, ComponentTrait, RefreshData,
|
Component, ComponentBase, ComponentTrait, RefreshData,
|
||||||
|
button::{self, ComponentButton},
|
||||||
},
|
},
|
||||||
event::CallbackDataCommon,
|
event::CallbackDataCommon,
|
||||||
i18n::Translation,
|
i18n::Translation,
|
||||||
layout::WidgetPair,
|
layout::WidgetPair,
|
||||||
widget::{div::WidgetDiv, ConstructEssentials},
|
widget::{ConstructEssentials, div::WidgetDiv},
|
||||||
};
|
};
|
||||||
use std::{cell::RefCell, rc::Rc};
|
use std::{cell::RefCell, rc::Rc};
|
||||||
use taffy::{
|
use taffy::{
|
||||||
prelude::{length, percent},
|
|
||||||
AlignItems,
|
AlignItems,
|
||||||
|
prelude::{length, percent},
|
||||||
};
|
};
|
||||||
|
|
||||||
pub struct Entry<'a> {
|
pub struct Entry<'a> {
|
||||||
|
|
|
||||||
|
|
@ -524,7 +524,7 @@ impl ParserContext<'_> {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn populate_extra_variables(&mut self, other: &HashMap<Rc<str>, Rc<str>>) {
|
fn populate_extra_variables(&mut self, other: &HashMap<Rc<str>, Rc<str>>) {
|
||||||
for (k,v) in other.iter() {
|
for (k, v) in other.iter() {
|
||||||
self.data_local.var_map.insert(k.clone(), v.clone());
|
self.data_local.var_map.insert(k.clone(), v.clone());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ use taffy::{
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
drawing,
|
drawing,
|
||||||
parser::{is_percent, parse_color_hex, parse_f32, AttribPair, ParserContext},
|
parser::{AttribPair, ParserContext, is_percent, parse_color_hex, parse_f32},
|
||||||
renderer_vk::text::{FontWeight, HorizontalAlign, TextStyle},
|
renderer_vk::text::{FontWeight, HorizontalAlign, TextStyle},
|
||||||
widget::util::WLength,
|
widget::util::WLength,
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -1,50 +1,105 @@
|
||||||
// This code was autogenerated with `dbus-codegen-rust -g -m None --client nonblock`, see https://github.com/diwic/dbus-rs
|
// This code was autogenerated with `dbus-codegen-rust -g -m None --client nonblock`, see https://github.com/diwic/dbus-rs
|
||||||
use dbus as dbus;
|
use dbus;
|
||||||
#[allow(unused_imports)]
|
#[allow(unused_imports)]
|
||||||
use dbus::arg;
|
use dbus::arg;
|
||||||
use dbus::nonblock;
|
use dbus::nonblock;
|
||||||
|
|
||||||
pub trait OrgFreedesktopPortalScreenCast {
|
pub trait OrgFreedesktopPortalScreenCast {
|
||||||
fn create_session(&self, options: arg::PropMap) -> nonblock::MethodReply<dbus::Path<'static>>;
|
fn create_session(&self, options: arg::PropMap) -> nonblock::MethodReply<dbus::Path<'static>>;
|
||||||
fn select_sources(&self, session_handle: dbus::Path, options: arg::PropMap) -> nonblock::MethodReply<dbus::Path<'static>>;
|
fn select_sources(
|
||||||
fn start(&self, session_handle: dbus::Path, parent_window: &str, options: arg::PropMap) -> nonblock::MethodReply<dbus::Path<'static>>;
|
&self,
|
||||||
fn open_pipe_wire_remote(&self, session_handle: dbus::Path, options: arg::PropMap) -> nonblock::MethodReply<arg::OwnedFd>;
|
session_handle: dbus::Path,
|
||||||
|
options: arg::PropMap,
|
||||||
|
) -> nonblock::MethodReply<dbus::Path<'static>>;
|
||||||
|
fn start(
|
||||||
|
&self,
|
||||||
|
session_handle: dbus::Path,
|
||||||
|
parent_window: &str,
|
||||||
|
options: arg::PropMap,
|
||||||
|
) -> nonblock::MethodReply<dbus::Path<'static>>;
|
||||||
|
fn open_pipe_wire_remote(
|
||||||
|
&self,
|
||||||
|
session_handle: dbus::Path,
|
||||||
|
options: arg::PropMap,
|
||||||
|
) -> nonblock::MethodReply<arg::OwnedFd>;
|
||||||
fn available_source_types(&self) -> nonblock::MethodReply<u32>;
|
fn available_source_types(&self) -> nonblock::MethodReply<u32>;
|
||||||
fn available_cursor_modes(&self) -> nonblock::MethodReply<u32>;
|
fn available_cursor_modes(&self) -> nonblock::MethodReply<u32>;
|
||||||
fn version(&self) -> nonblock::MethodReply<u32>;
|
fn version(&self) -> nonblock::MethodReply<u32>;
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a, T: nonblock::NonblockReply, C: ::std::ops::Deref<Target=T>> OrgFreedesktopPortalScreenCast for nonblock::Proxy<'a, C> {
|
impl<'a, T: nonblock::NonblockReply, C: ::std::ops::Deref<Target = T>>
|
||||||
|
OrgFreedesktopPortalScreenCast for nonblock::Proxy<'a, C>
|
||||||
|
{
|
||||||
fn create_session(&self, options: arg::PropMap) -> nonblock::MethodReply<dbus::Path<'static>> {
|
fn create_session(&self, options: arg::PropMap) -> nonblock::MethodReply<dbus::Path<'static>> {
|
||||||
self.method_call("org.freedesktop.portal.ScreenCast", "CreateSession", (options, ))
|
self.method_call(
|
||||||
.and_then(|r: (dbus::Path<'static>, )| Ok(r.0, ))
|
"org.freedesktop.portal.ScreenCast",
|
||||||
|
"CreateSession",
|
||||||
|
(options,),
|
||||||
|
)
|
||||||
|
.and_then(|r: (dbus::Path<'static>,)| Ok(r.0))
|
||||||
}
|
}
|
||||||
|
|
||||||
fn select_sources(&self, session_handle: dbus::Path, options: arg::PropMap) -> nonblock::MethodReply<dbus::Path<'static>> {
|
fn select_sources(
|
||||||
self.method_call("org.freedesktop.portal.ScreenCast", "SelectSources", (session_handle, options, ))
|
&self,
|
||||||
.and_then(|r: (dbus::Path<'static>, )| Ok(r.0, ))
|
session_handle: dbus::Path,
|
||||||
|
options: arg::PropMap,
|
||||||
|
) -> nonblock::MethodReply<dbus::Path<'static>> {
|
||||||
|
self.method_call(
|
||||||
|
"org.freedesktop.portal.ScreenCast",
|
||||||
|
"SelectSources",
|
||||||
|
(session_handle, options),
|
||||||
|
)
|
||||||
|
.and_then(|r: (dbus::Path<'static>,)| Ok(r.0))
|
||||||
}
|
}
|
||||||
|
|
||||||
fn start(&self, session_handle: dbus::Path, parent_window: &str, options: arg::PropMap) -> nonblock::MethodReply<dbus::Path<'static>> {
|
fn start(
|
||||||
self.method_call("org.freedesktop.portal.ScreenCast", "Start", (session_handle, parent_window, options, ))
|
&self,
|
||||||
.and_then(|r: (dbus::Path<'static>, )| Ok(r.0, ))
|
session_handle: dbus::Path,
|
||||||
|
parent_window: &str,
|
||||||
|
options: arg::PropMap,
|
||||||
|
) -> nonblock::MethodReply<dbus::Path<'static>> {
|
||||||
|
self.method_call(
|
||||||
|
"org.freedesktop.portal.ScreenCast",
|
||||||
|
"Start",
|
||||||
|
(session_handle, parent_window, options),
|
||||||
|
)
|
||||||
|
.and_then(|r: (dbus::Path<'static>,)| Ok(r.0))
|
||||||
}
|
}
|
||||||
|
|
||||||
fn open_pipe_wire_remote(&self, session_handle: dbus::Path, options: arg::PropMap) -> nonblock::MethodReply<arg::OwnedFd> {
|
fn open_pipe_wire_remote(
|
||||||
self.method_call("org.freedesktop.portal.ScreenCast", "OpenPipeWireRemote", (session_handle, options, ))
|
&self,
|
||||||
.and_then(|r: (arg::OwnedFd, )| Ok(r.0, ))
|
session_handle: dbus::Path,
|
||||||
|
options: arg::PropMap,
|
||||||
|
) -> nonblock::MethodReply<arg::OwnedFd> {
|
||||||
|
self.method_call(
|
||||||
|
"org.freedesktop.portal.ScreenCast",
|
||||||
|
"OpenPipeWireRemote",
|
||||||
|
(session_handle, options),
|
||||||
|
)
|
||||||
|
.and_then(|r: (arg::OwnedFd,)| Ok(r.0))
|
||||||
}
|
}
|
||||||
|
|
||||||
fn available_source_types(&self) -> nonblock::MethodReply<u32> {
|
fn available_source_types(&self) -> nonblock::MethodReply<u32> {
|
||||||
<Self as nonblock::stdintf::org_freedesktop_dbus::Properties>::get(self, "org.freedesktop.portal.ScreenCast", "AvailableSourceTypes")
|
<Self as nonblock::stdintf::org_freedesktop_dbus::Properties>::get(
|
||||||
|
self,
|
||||||
|
"org.freedesktop.portal.ScreenCast",
|
||||||
|
"AvailableSourceTypes",
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn available_cursor_modes(&self) -> nonblock::MethodReply<u32> {
|
fn available_cursor_modes(&self) -> nonblock::MethodReply<u32> {
|
||||||
<Self as nonblock::stdintf::org_freedesktop_dbus::Properties>::get(self, "org.freedesktop.portal.ScreenCast", "AvailableCursorModes")
|
<Self as nonblock::stdintf::org_freedesktop_dbus::Properties>::get(
|
||||||
|
self,
|
||||||
|
"org.freedesktop.portal.ScreenCast",
|
||||||
|
"AvailableCursorModes",
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn version(&self) -> nonblock::MethodReply<u32> {
|
fn version(&self) -> nonblock::MethodReply<u32> {
|
||||||
<Self as nonblock::stdintf::org_freedesktop_dbus::Properties>::get(self, "org.freedesktop.portal.ScreenCast", "version")
|
<Self as nonblock::stdintf::org_freedesktop_dbus::Properties>::get(
|
||||||
|
self,
|
||||||
|
"org.freedesktop.portal.ScreenCast",
|
||||||
|
"version",
|
||||||
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue