fmt
This commit is contained in:
@@ -9,7 +9,7 @@ use crate::{
|
|||||||
event::EventAlterables,
|
event::EventAlterables,
|
||||||
globals::Globals,
|
globals::Globals,
|
||||||
layout::Widget,
|
layout::Widget,
|
||||||
renderer_vk::text::{custom_glyph::CustomGlyph, TextShadow},
|
renderer_vk::text::{TextShadow, custom_glyph::CustomGlyph},
|
||||||
stack::{self, ScissorBoundary, ScissorStack, TransformStack},
|
stack::{self, ScissorBoundary, ScissorStack, TransformStack},
|
||||||
widget::{self, ScrollbarInfo, WidgetState},
|
widget::{self, ScrollbarInfo, WidgetState},
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ mod widget_rectangle;
|
|||||||
mod widget_sprite;
|
mod widget_sprite;
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
assets::{normalize_path, AssetPath, AssetPathOwned},
|
assets::{AssetPath, AssetPathOwned, normalize_path},
|
||||||
components::{Component, ComponentWeak},
|
components::{Component, ComponentWeak},
|
||||||
drawing::{self},
|
drawing::{self},
|
||||||
globals::WguiGlobals,
|
globals::WguiGlobals,
|
||||||
|
|||||||
@@ -2,9 +2,8 @@ use crate::{
|
|||||||
i18n::Translation,
|
i18n::Translation,
|
||||||
layout::WidgetID,
|
layout::WidgetID,
|
||||||
parser::{
|
parser::{
|
||||||
parse_children, parse_i32, parse_widget_universal, print_invalid_attrib,
|
AttribPair, ParserContext, ParserFile, parse_children, parse_i32, parse_widget_universal, print_invalid_attrib,
|
||||||
style::{parse_style, parse_text_style},
|
style::{parse_style, parse_text_style},
|
||||||
AttribPair, ParserContext, ParserFile,
|
|
||||||
},
|
},
|
||||||
widget::label::{WidgetLabel, WidgetLabelParams},
|
widget::label::{WidgetLabel, WidgetLabelParams},
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
use crate::{
|
use crate::{
|
||||||
assets::AssetPath,
|
assets::AssetPath,
|
||||||
layout::WidgetID,
|
layout::WidgetID,
|
||||||
parser::{parse_children, parse_widget_universal, style::parse_style, AttribPair, ParserContext, ParserFile},
|
parser::{AttribPair, ParserContext, ParserFile, parse_children, parse_widget_universal, style::parse_style},
|
||||||
renderer_vk::text::custom_glyph::{CustomGlyphContent, CustomGlyphData},
|
renderer_vk::text::custom_glyph::{CustomGlyphContent, CustomGlyphData},
|
||||||
widget::sprite::{WidgetSprite, WidgetSpriteParams},
|
widget::sprite::{WidgetSprite, WidgetSpriteParams},
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
use std::{
|
use std::{
|
||||||
f32,
|
f32,
|
||||||
sync::{
|
sync::{
|
||||||
atomic::{AtomicUsize, Ordering},
|
|
||||||
Arc,
|
Arc,
|
||||||
|
atomic::{AtomicUsize, Ordering},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -8,8 +8,8 @@ use crate::{
|
|||||||
globals::Globals,
|
globals::Globals,
|
||||||
layout::WidgetID,
|
layout::WidgetID,
|
||||||
renderer_vk::text::{
|
renderer_vk::text::{
|
||||||
custom_glyph::{CustomGlyph, CustomGlyphData},
|
|
||||||
DEFAULT_METRICS,
|
DEFAULT_METRICS,
|
||||||
|
custom_glyph::{CustomGlyph, CustomGlyphData},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
use std::f32::consts::PI;
|
use std::f32::consts::PI;
|
||||||
use std::sync::atomic::{AtomicUsize, Ordering};
|
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
|
use std::sync::atomic::{AtomicUsize, Ordering};
|
||||||
|
|
||||||
use ash::vk::SubmitInfo;
|
use ash::vk::SubmitInfo;
|
||||||
use glam::{Affine3A, Vec3, Vec3A, Vec4};
|
use glam::{Affine3A, Vec3, Vec3A, Vec4};
|
||||||
@@ -8,6 +8,7 @@ use idmap::IdMap;
|
|||||||
use ovr_overlay::overlay::OverlayManager;
|
use ovr_overlay::overlay::OverlayManager;
|
||||||
use ovr_overlay::sys::ETrackingUniverseOrigin;
|
use ovr_overlay::sys::ETrackingUniverseOrigin;
|
||||||
use vulkano::{
|
use vulkano::{
|
||||||
|
VulkanObject,
|
||||||
command_buffer::{
|
command_buffer::{
|
||||||
CommandBufferBeginInfo, CommandBufferLevel, CommandBufferUsage, RecordingCommandBuffer,
|
CommandBufferBeginInfo, CommandBufferLevel, CommandBufferUsage, RecordingCommandBuffer,
|
||||||
},
|
},
|
||||||
@@ -15,22 +16,21 @@ use vulkano::{
|
|||||||
image::view::ImageView,
|
image::view::ImageView,
|
||||||
image::{Image, ImageLayout},
|
image::{Image, ImageLayout},
|
||||||
sync::{
|
sync::{
|
||||||
fence::{Fence, FenceCreateInfo},
|
|
||||||
AccessFlags, DependencyInfo, ImageMemoryBarrier, PipelineStages,
|
AccessFlags, DependencyInfo, ImageMemoryBarrier, PipelineStages,
|
||||||
|
fence::{Fence, FenceCreateInfo},
|
||||||
},
|
},
|
||||||
VulkanObject,
|
|
||||||
};
|
};
|
||||||
use wgui::gfx::WGfx;
|
use wgui::gfx::WGfx;
|
||||||
|
|
||||||
use crate::backend::input::{HoverResult, PointerHit};
|
use crate::backend::input::{HoverResult, PointerHit};
|
||||||
use crate::state::AppState;
|
use crate::state::AppState;
|
||||||
use crate::subsystem::hid::WheelDelta;
|
use crate::subsystem::hid::WheelDelta;
|
||||||
|
use crate::windowing::Z_ORDER_LINES;
|
||||||
use crate::windowing::backend::{
|
use crate::windowing::backend::{
|
||||||
BackendAttrib, BackendAttribValue, FrameMeta, OverlayBackend, OverlayEventData,
|
BackendAttrib, BackendAttribValue, FrameMeta, OverlayBackend, OverlayEventData,
|
||||||
RenderResources, ShouldRender,
|
RenderResources, ShouldRender,
|
||||||
};
|
};
|
||||||
use crate::windowing::window::{OverlayWindowConfig, OverlayWindowData};
|
use crate::windowing::window::{OverlayWindowConfig, OverlayWindowData};
|
||||||
use crate::windowing::Z_ORDER_LINES;
|
|
||||||
|
|
||||||
use super::overlay::OpenVrOverlayData;
|
use super::overlay::OpenVrOverlayData;
|
||||||
|
|
||||||
|
|||||||
@@ -5,33 +5,34 @@ use std::{
|
|||||||
time::{Duration, Instant},
|
time::{Duration, Instant},
|
||||||
};
|
};
|
||||||
|
|
||||||
use anyhow::{anyhow, Result};
|
use anyhow::{Result, anyhow};
|
||||||
use ovr_overlay::{
|
use ovr_overlay::{
|
||||||
sys::{ETrackedDeviceProperty, EVRApplicationType, EVREventType},
|
|
||||||
TrackedDeviceIndex,
|
TrackedDeviceIndex,
|
||||||
|
sys::{ETrackedDeviceProperty, EVRApplicationType, EVREventType},
|
||||||
};
|
};
|
||||||
use smallvec::smallvec;
|
use smallvec::smallvec;
|
||||||
use vulkano::{device::physical::PhysicalDevice, Handle, VulkanObject};
|
use vulkano::{Handle, VulkanObject, device::physical::PhysicalDevice};
|
||||||
use wlx_common::overlays::ToastTopic;
|
use wlx_common::overlays::ToastTopic;
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
|
RUNNING,
|
||||||
backend::{
|
backend::{
|
||||||
|
BackendError, XrBackend,
|
||||||
input::interact,
|
input::interact,
|
||||||
openvr::{
|
openvr::{
|
||||||
helpers::adjust_gain,
|
helpers::adjust_gain,
|
||||||
input::{set_action_manifest, OpenVrInputSource},
|
input::{OpenVrInputSource, set_action_manifest},
|
||||||
lines::LinePool,
|
lines::LinePool,
|
||||||
manifest::{install_manifest, uninstall_manifest},
|
manifest::{install_manifest, uninstall_manifest},
|
||||||
overlay::OpenVrOverlayData,
|
overlay::OpenVrOverlayData,
|
||||||
},
|
},
|
||||||
task::{OpenVrTask, OverlayTask, TaskType},
|
task::{OpenVrTask, OverlayTask, TaskType},
|
||||||
BackendError, XrBackend,
|
|
||||||
},
|
},
|
||||||
config::save_state,
|
config::save_state,
|
||||||
graphics::{init_openvr_graphics, GpuFutures},
|
graphics::{GpuFutures, init_openvr_graphics},
|
||||||
overlays::{
|
overlays::{
|
||||||
toast::Toast,
|
toast::Toast,
|
||||||
watch::{watch_fade, WATCH_NAME},
|
watch::{WATCH_NAME, watch_fade},
|
||||||
},
|
},
|
||||||
state::AppState,
|
state::AppState,
|
||||||
subsystem::notifications::NotificationManager,
|
subsystem::notifications::NotificationManager,
|
||||||
@@ -39,7 +40,6 @@ use crate::{
|
|||||||
backend::{RenderResources, RenderTarget, ShouldRender},
|
backend::{RenderResources, RenderTarget, ShouldRender},
|
||||||
manager::OverlayWindowManager,
|
manager::OverlayWindowManager,
|
||||||
},
|
},
|
||||||
RUNNING,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#[cfg(feature = "wayvr")]
|
#[cfg(feature = "wayvr")]
|
||||||
|
|||||||
@@ -5,16 +5,16 @@ use smallvec::SmallVec;
|
|||||||
use std::{
|
use std::{
|
||||||
f32::consts::PI,
|
f32::consts::PI,
|
||||||
sync::{
|
sync::{
|
||||||
atomic::{AtomicUsize, Ordering},
|
|
||||||
Arc,
|
Arc,
|
||||||
|
atomic::{AtomicUsize, Ordering},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
use wgui::gfx::{
|
use wgui::gfx::{
|
||||||
|
WGfx,
|
||||||
cmd::WGfxClearMode,
|
cmd::WGfxClearMode,
|
||||||
pass::WGfxPass,
|
pass::WGfxPass,
|
||||||
pipeline::{WGfxPipeline, WPipelineCreateInfo},
|
pipeline::{WGfxPipeline, WPipelineCreateInfo},
|
||||||
WGfx,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
@@ -28,8 +28,8 @@ use vulkano::{
|
|||||||
};
|
};
|
||||||
|
|
||||||
use super::{
|
use super::{
|
||||||
swapchain::{create_swapchain, SwapchainOpts, WlxSwapchain},
|
|
||||||
CompositionLayer, XrState,
|
CompositionLayer, XrState,
|
||||||
|
swapchain::{SwapchainOpts, WlxSwapchain, create_swapchain},
|
||||||
};
|
};
|
||||||
|
|
||||||
static LINE_AUTO_INCREMENT: AtomicUsize = AtomicUsize::new(1);
|
static LINE_AUTO_INCREMENT: AtomicUsize = AtomicUsize::new(1);
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
use std::{
|
use std::{
|
||||||
collections::VecDeque,
|
collections::VecDeque,
|
||||||
ops::Add,
|
ops::Add,
|
||||||
sync::{atomic::Ordering, Arc},
|
sync::{Arc, atomic::Ordering},
|
||||||
time::{Duration, Instant},
|
time::{Duration, Instant},
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -14,17 +14,18 @@ use vulkano::{Handle, VulkanObject};
|
|||||||
use wlx_common::overlays::ToastTopic;
|
use wlx_common::overlays::ToastTopic;
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
|
FRAME_COUNTER, RUNNING,
|
||||||
backend::{
|
backend::{
|
||||||
|
BackendError, XrBackend,
|
||||||
input::interact,
|
input::interact,
|
||||||
openxr::{lines::LinePool, overlay::OpenXrOverlayData},
|
openxr::{lines::LinePool, overlay::OpenXrOverlayData},
|
||||||
task::{OverlayTask, TaskType},
|
task::{OverlayTask, TaskType},
|
||||||
BackendError, XrBackend,
|
|
||||||
},
|
},
|
||||||
config::save_state,
|
config::save_state,
|
||||||
graphics::{init_openxr_graphics, GpuFutures},
|
graphics::{GpuFutures, init_openxr_graphics},
|
||||||
overlays::{
|
overlays::{
|
||||||
toast::Toast,
|
toast::Toast,
|
||||||
watch::{watch_fade, WATCH_NAME},
|
watch::{WATCH_NAME, watch_fade},
|
||||||
},
|
},
|
||||||
state::AppState,
|
state::AppState,
|
||||||
subsystem::notifications::NotificationManager,
|
subsystem::notifications::NotificationManager,
|
||||||
@@ -32,7 +33,6 @@ use crate::{
|
|||||||
backend::{RenderResources, RenderTarget, ShouldRender},
|
backend::{RenderResources, RenderTarget, ShouldRender},
|
||||||
manager::OverlayWindowManager,
|
manager::OverlayWindowManager,
|
||||||
},
|
},
|
||||||
FRAME_COUNTER, RUNNING,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#[cfg(feature = "wayvr")]
|
#[cfg(feature = "wayvr")]
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
use glam::Vec3A;
|
use glam::Vec3A;
|
||||||
use openxr::{self as xr, CompositionLayerFlags};
|
use openxr::{self as xr, CompositionLayerFlags};
|
||||||
use smallvec::{smallvec, SmallVec};
|
use smallvec::{SmallVec, smallvec};
|
||||||
use std::f32::consts::PI;
|
use std::f32::consts::PI;
|
||||||
use xr::EyeVisibility;
|
use xr::EyeVisibility;
|
||||||
|
|
||||||
use super::{helpers, swapchain::WlxSwapchain, CompositionLayer, XrState};
|
use super::{CompositionLayer, XrState, helpers, swapchain::WlxSwapchain};
|
||||||
use crate::{
|
use crate::{
|
||||||
backend::openxr::swapchain::{create_swapchain, SwapchainOpts, WlxSwapchainImage},
|
backend::openxr::swapchain::{SwapchainOpts, WlxSwapchainImage, create_swapchain},
|
||||||
state::AppState,
|
state::AppState,
|
||||||
windowing::window::OverlayWindowData,
|
windowing::window::OverlayWindowData,
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -15,13 +15,13 @@ use wgui::gfx::{cmd::WGfxClearMode, pipeline::WPipelineCreateInfo};
|
|||||||
use crate::{
|
use crate::{
|
||||||
backend::openxr::{helpers::translation_rotation_to_posef, swapchain::SwapchainOpts},
|
backend::openxr::{helpers::translation_rotation_to_posef, swapchain::SwapchainOpts},
|
||||||
config_io,
|
config_io,
|
||||||
graphics::{dds::WlxCommandBufferDds, ExtentExt, GpuFutures},
|
graphics::{ExtentExt, GpuFutures, dds::WlxCommandBufferDds},
|
||||||
state::AppState,
|
state::AppState,
|
||||||
};
|
};
|
||||||
|
|
||||||
use super::{
|
use super::{
|
||||||
swapchain::{create_swapchain, WlxSwapchain},
|
|
||||||
CompositionLayer, XrState,
|
CompositionLayer, XrState,
|
||||||
|
swapchain::{WlxSwapchain, create_swapchain},
|
||||||
};
|
};
|
||||||
|
|
||||||
pub(super) struct Skybox {
|
pub(super) struct Skybox {
|
||||||
|
|||||||
@@ -5,12 +5,12 @@ use openxr as xr;
|
|||||||
|
|
||||||
use smallvec::SmallVec;
|
use smallvec::SmallVec;
|
||||||
use vulkano::{
|
use vulkano::{
|
||||||
|
Handle,
|
||||||
image::{
|
image::{
|
||||||
|
ImageCreateInfo, ImageUsage,
|
||||||
sys::RawImage,
|
sys::RawImage,
|
||||||
view::{ImageView, ImageViewCreateInfo},
|
view::{ImageView, ImageViewCreateInfo},
|
||||||
ImageCreateInfo, ImageUsage,
|
|
||||||
},
|
},
|
||||||
Handle,
|
|
||||||
};
|
};
|
||||||
use wgui::gfx::WGfx;
|
use wgui::gfx::WGfx;
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ use std::{
|
|||||||
sync::{Arc, OnceLock},
|
sync::{Arc, OnceLock},
|
||||||
};
|
};
|
||||||
|
|
||||||
use glam::{vec2, Vec2};
|
use glam::{Vec2, vec2};
|
||||||
use smallvec::SmallVec;
|
use smallvec::SmallVec;
|
||||||
use vulkano::{
|
use vulkano::{
|
||||||
buffer::{BufferCreateInfo, BufferUsage},
|
buffer::{BufferCreateInfo, BufferUsage},
|
||||||
@@ -27,11 +27,11 @@ use crate::shaders::{frag_color, frag_grid, frag_screen, frag_srgb, vert_quad};
|
|||||||
use {ash::vk, std::os::raw::c_void};
|
use {ash::vk, std::os::raw::c_void};
|
||||||
|
|
||||||
use vulkano::{
|
use vulkano::{
|
||||||
self,
|
self, VulkanObject,
|
||||||
buffer::{Buffer, BufferContents, IndexBuffer, Subbuffer},
|
buffer::{Buffer, BufferContents, IndexBuffer, Subbuffer},
|
||||||
device::{
|
device::{
|
||||||
physical::{PhysicalDevice, PhysicalDeviceType},
|
|
||||||
DeviceCreateInfo, DeviceExtensions, DeviceFeatures, Queue, QueueCreateInfo, QueueFlags,
|
DeviceCreateInfo, DeviceExtensions, DeviceFeatures, Queue, QueueCreateInfo, QueueFlags,
|
||||||
|
physical::{PhysicalDevice, PhysicalDeviceType},
|
||||||
},
|
},
|
||||||
format::Format,
|
format::Format,
|
||||||
instance::{Instance, InstanceCreateInfo, InstanceExtensions},
|
instance::{Instance, InstanceCreateInfo, InstanceExtensions},
|
||||||
@@ -40,7 +40,6 @@ use vulkano::{
|
|||||||
vertex_input::Vertex,
|
vertex_input::Vertex,
|
||||||
},
|
},
|
||||||
shader::ShaderModule,
|
shader::ShaderModule,
|
||||||
VulkanObject,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
use dmabuf::get_drm_formats;
|
use dmabuf::get_drm_formats;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
use std::{cell::RefCell, rc::Rc};
|
use std::{cell::RefCell, rc::Rc};
|
||||||
|
|
||||||
use button::setup_custom_button;
|
use button::setup_custom_button;
|
||||||
use glam::{vec2, Affine2, Vec2};
|
use glam::{Affine2, Vec2, vec2};
|
||||||
use label::setup_custom_label;
|
use label::setup_custom_label;
|
||||||
use wgui::{
|
use wgui::{
|
||||||
assets::AssetPath,
|
assets::AssetPath,
|
||||||
@@ -16,7 +16,7 @@ use wgui::{
|
|||||||
layout::{Layout, LayoutParams, WidgetID},
|
layout::{Layout, LayoutParams, WidgetID},
|
||||||
parser::{CustomAttribsInfoOwned, Fetchable, ParserState},
|
parser::{CustomAttribsInfoOwned, Fetchable, ParserState},
|
||||||
renderer_vk::context::Context as WguiContext,
|
renderer_vk::context::Context as WguiContext,
|
||||||
widget::{label::WidgetLabel, EventResult},
|
widget::{EventResult, label::WidgetLabel},
|
||||||
};
|
};
|
||||||
use wlx_common::timestep::Timestep;
|
use wlx_common::timestep::Timestep;
|
||||||
|
|
||||||
@@ -25,8 +25,8 @@ use crate::{
|
|||||||
state::AppState,
|
state::AppState,
|
||||||
subsystem::hid::WheelDelta,
|
subsystem::hid::WheelDelta,
|
||||||
windowing::backend::{
|
windowing::backend::{
|
||||||
ui_transform, BackendAttrib, BackendAttribValue, FrameMeta, OverlayBackend,
|
BackendAttrib, BackendAttribValue, FrameMeta, OverlayBackend, OverlayEventData,
|
||||||
OverlayEventData, RenderResources, ShouldRender,
|
RenderResources, ShouldRender, ui_transform,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
|
|
||||||
use glam::{vec3, Affine3A, Quat, Vec3};
|
use glam::{Affine3A, Quat, Vec3, vec3};
|
||||||
use wlx_common::windowing::OverlayWindowState;
|
use wlx_common::windowing::OverlayWindowState;
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
|
|||||||
@@ -21,10 +21,10 @@ use crate::{
|
|||||||
input::HoverResult,
|
input::HoverResult,
|
||||||
task::{OverlayTask, TaskContainer, TaskType},
|
task::{OverlayTask, TaskContainer, TaskType},
|
||||||
},
|
},
|
||||||
gui::panel::{button::BUTTON_EVENTS, GuiPanel, NewGuiPanelParams, OnCustomAttribFunc},
|
gui::panel::{GuiPanel, NewGuiPanelParams, OnCustomAttribFunc, button::BUTTON_EVENTS},
|
||||||
overlays::edit::{
|
overlays::edit::{
|
||||||
lock::InteractLockHandler,
|
lock::InteractLockHandler,
|
||||||
pos::{new_pos_tab_handler, PosTabState},
|
pos::{PosTabState, new_pos_tab_handler},
|
||||||
sprite_tab::SpriteTabHandler,
|
sprite_tab::SpriteTabHandler,
|
||||||
stereo::new_stereo_tab_handler,
|
stereo::new_stereo_tab_handler,
|
||||||
tab::ButtonPaneTabSwitcher,
|
tab::ButtonPaneTabSwitcher,
|
||||||
@@ -32,12 +32,12 @@ use crate::{
|
|||||||
state::AppState,
|
state::AppState,
|
||||||
subsystem::hid::WheelDelta,
|
subsystem::hid::WheelDelta,
|
||||||
windowing::{
|
windowing::{
|
||||||
|
OverlayID, OverlaySelector,
|
||||||
backend::{
|
backend::{
|
||||||
BackendAttrib, BackendAttribValue, DummyBackend, OverlayBackend, OverlayEventData,
|
BackendAttrib, BackendAttribValue, DummyBackend, OverlayBackend, OverlayEventData,
|
||||||
RenderResources, ShouldRender, StereoMode,
|
RenderResources, ShouldRender, StereoMode,
|
||||||
},
|
},
|
||||||
window::OverlayWindowConfig,
|
window::OverlayWindowConfig,
|
||||||
OverlayID, OverlaySelector,
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -3,8 +3,8 @@ use wlx_common::{common::LeftRight, windowing::Positioning};
|
|||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
overlays::edit::{
|
overlays::edit::{
|
||||||
sprite_tab::{SpriteTabHandler, SpriteTabKey},
|
|
||||||
EditModeWrapPanel,
|
EditModeWrapPanel,
|
||||||
|
sprite_tab::{SpriteTabHandler, SpriteTabKey},
|
||||||
},
|
},
|
||||||
windowing::window,
|
windowing::window,
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
use crate::{
|
use crate::{
|
||||||
overlays::edit::{
|
overlays::edit::{
|
||||||
sprite_tab::{SpriteTabHandler, SpriteTabKey},
|
|
||||||
EditModeWrapPanel,
|
EditModeWrapPanel,
|
||||||
|
sprite_tab::{SpriteTabHandler, SpriteTabKey},
|
||||||
},
|
},
|
||||||
windowing::backend::{BackendAttribValue, StereoMode},
|
windowing::backend::{BackendAttribValue, StereoMode},
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -6,13 +6,14 @@ use std::{
|
|||||||
};
|
};
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
|
KEYMAP_CHANGE,
|
||||||
backend::input::{HoverResult, PointerHit},
|
backend::input::{HoverResult, PointerHit},
|
||||||
gui::panel::GuiPanel,
|
gui::panel::GuiPanel,
|
||||||
overlays::keyboard::{builder::create_keyboard_panel, layout::AltModifier},
|
overlays::keyboard::{builder::create_keyboard_panel, layout::AltModifier},
|
||||||
state::AppState,
|
state::AppState,
|
||||||
subsystem::hid::{
|
subsystem::hid::{
|
||||||
get_keymap_wl, get_keymap_x11, KeyModifier, VirtualKey, WheelDelta, XkbKeymap, ALT, CTRL,
|
ALT, CTRL, KeyModifier, META, SHIFT, SUPER, VirtualKey, WheelDelta, XkbKeymap,
|
||||||
META, SHIFT, SUPER,
|
get_keymap_wl, get_keymap_x11,
|
||||||
},
|
},
|
||||||
windowing::{
|
windowing::{
|
||||||
backend::{
|
backend::{
|
||||||
@@ -21,12 +22,11 @@ use crate::{
|
|||||||
},
|
},
|
||||||
window::OverlayWindowConfig,
|
window::OverlayWindowConfig,
|
||||||
},
|
},
|
||||||
KEYMAP_CHANGE,
|
|
||||||
};
|
};
|
||||||
use anyhow::Context;
|
use anyhow::Context;
|
||||||
use glam::{vec3, Affine3A, Quat, Vec3};
|
use glam::{Affine3A, Quat, Vec3, vec3};
|
||||||
use regex::Regex;
|
use regex::Regex;
|
||||||
use slotmap::{new_key_type, SlotMap};
|
use slotmap::{SlotMap, new_key_type};
|
||||||
use wgui::{
|
use wgui::{
|
||||||
drawing,
|
drawing,
|
||||||
event::{InternalStateChangeEvent, MouseButton, MouseButtonIndex},
|
event::{InternalStateChangeEvent, MouseButton, MouseButtonIndex},
|
||||||
|
|||||||
@@ -1,14 +1,14 @@
|
|||||||
use std::{
|
use std::{
|
||||||
sync::{
|
sync::{
|
||||||
atomic::{AtomicUsize, Ordering},
|
|
||||||
Arc,
|
Arc,
|
||||||
|
atomic::{AtomicUsize, Ordering},
|
||||||
},
|
},
|
||||||
task::{Context, Poll},
|
task::{Context, Poll},
|
||||||
};
|
};
|
||||||
|
|
||||||
use futures::{Future, FutureExt};
|
use futures::{Future, FutureExt};
|
||||||
use glam::{vec3, Affine2, Affine3A, Quat, Vec3};
|
use glam::{Affine2, Affine3A, Quat, Vec3, vec3};
|
||||||
use wlx_capture::pipewire::{pipewire_select_screen, PipewireCapture, PipewireSelectScreenResult};
|
use wlx_capture::pipewire::{PipewireCapture, PipewireSelectScreenResult, pipewire_select_screen};
|
||||||
use wlx_common::windowing::OverlayWindowState;
|
use wlx_common::windowing::OverlayWindowState;
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
@@ -19,12 +19,12 @@ use crate::{
|
|||||||
state::{AppSession, AppState},
|
state::{AppSession, AppState},
|
||||||
subsystem::hid::WheelDelta,
|
subsystem::hid::WheelDelta,
|
||||||
windowing::{
|
windowing::{
|
||||||
|
OverlaySelector,
|
||||||
backend::{
|
backend::{
|
||||||
ui_transform, BackendAttrib, BackendAttribValue, FrameMeta, OverlayBackend,
|
BackendAttrib, BackendAttribValue, FrameMeta, OverlayBackend, OverlayEventData,
|
||||||
OverlayEventData, RenderResources, ShouldRender,
|
RenderResources, ShouldRender, ui_transform,
|
||||||
},
|
},
|
||||||
window::{OverlayCategory, OverlayWindowConfig},
|
window::{OverlayCategory, OverlayWindowConfig},
|
||||||
OverlaySelector,
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -1,26 +1,26 @@
|
|||||||
use std::{
|
use std::{
|
||||||
sync::{atomic::AtomicU64, Arc, LazyLock},
|
sync::{Arc, LazyLock, atomic::AtomicU64},
|
||||||
time::Instant,
|
time::Instant,
|
||||||
};
|
};
|
||||||
|
|
||||||
use glam::{vec2, Affine2, Vec2};
|
use glam::{Affine2, Vec2, vec2};
|
||||||
use wlx_capture::{frame::Transform, WlxCapture};
|
use wlx_capture::{WlxCapture, frame::Transform};
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
backend::{
|
backend::{
|
||||||
input::{HoverResult, PointerHit, PointerMode},
|
|
||||||
XrBackend,
|
XrBackend,
|
||||||
|
input::{HoverResult, PointerHit, PointerMode},
|
||||||
},
|
},
|
||||||
graphics::ExtentExt,
|
graphics::ExtentExt,
|
||||||
state::AppState,
|
state::AppState,
|
||||||
subsystem::hid::{WheelDelta, MOUSE_LEFT, MOUSE_MIDDLE, MOUSE_RIGHT},
|
subsystem::hid::{MOUSE_LEFT, MOUSE_MIDDLE, MOUSE_RIGHT, WheelDelta},
|
||||||
windowing::backend::{
|
windowing::backend::{
|
||||||
BackendAttrib, BackendAttribValue, FrameMeta, OverlayBackend, OverlayEventData,
|
BackendAttrib, BackendAttribValue, FrameMeta, OverlayBackend, OverlayEventData,
|
||||||
RenderResources, ShouldRender, StereoMode,
|
RenderResources, ShouldRender, StereoMode,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
use super::capture::{receive_callback, ScreenPipeline, WlxCaptureIn, WlxCaptureOut};
|
use super::capture::{ScreenPipeline, WlxCaptureIn, WlxCaptureOut, receive_callback};
|
||||||
|
|
||||||
const CURSOR_SIZE: f32 = 16. / 1440.;
|
const CURSOR_SIZE: f32 = 16. / 1440.;
|
||||||
|
|
||||||
|
|||||||
@@ -1,31 +1,32 @@
|
|||||||
use std::{f32::consts::PI, sync::Arc};
|
use std::{f32::consts::PI, sync::Arc};
|
||||||
|
|
||||||
use glam::{Affine3A, Vec3};
|
use glam::{Affine3A, Vec3};
|
||||||
use smallvec::{smallvec, SmallVec};
|
use smallvec::{SmallVec, smallvec};
|
||||||
use vulkano::{
|
use vulkano::{
|
||||||
buffer::{BufferUsage, Subbuffer},
|
buffer::{BufferUsage, Subbuffer},
|
||||||
command_buffer::CommandBufferUsage,
|
command_buffer::CommandBufferUsage,
|
||||||
device::Queue,
|
device::Queue,
|
||||||
format::Format,
|
format::Format,
|
||||||
image::{sampler::Filter, view::ImageView, Image},
|
image::{Image, sampler::Filter, view::ImageView},
|
||||||
pipeline::graphics::color_blend::AttachmentBlend,
|
pipeline::graphics::color_blend::AttachmentBlend,
|
||||||
};
|
};
|
||||||
use wgui::gfx::{
|
use wgui::gfx::{
|
||||||
|
WGfx,
|
||||||
cmd::WGfxClearMode,
|
cmd::WGfxClearMode,
|
||||||
pass::WGfxPass,
|
pass::WGfxPass,
|
||||||
pipeline::{WGfxPipeline, WPipelineCreateInfo},
|
pipeline::{WGfxPipeline, WPipelineCreateInfo},
|
||||||
WGfx,
|
|
||||||
};
|
};
|
||||||
use wlx_capture::{
|
use wlx_capture::{
|
||||||
frame::{self as wlx_frame, DrmFormat, FrameFormat, MouseMeta, Transform, WlxFrame},
|
|
||||||
WlxCapture,
|
WlxCapture,
|
||||||
|
frame::{self as wlx_frame, DrmFormat, FrameFormat, MouseMeta, Transform, WlxFrame},
|
||||||
};
|
};
|
||||||
use wlx_common::config::GeneralConfig;
|
use wlx_common::config::GeneralConfig;
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
graphics::{
|
graphics::{
|
||||||
dmabuf::{fourcc_to_vk, WGfxDmabuf},
|
Vert2Uv,
|
||||||
upload_quad_vertices, Vert2Uv,
|
dmabuf::{WGfxDmabuf, fourcc_to_vk},
|
||||||
|
upload_quad_vertices,
|
||||||
},
|
},
|
||||||
state::AppState,
|
state::AppState,
|
||||||
windowing::backend::{FrameMeta, RenderResources, StereoMode},
|
windowing::backend::{FrameMeta, RenderResources, StereoMode},
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ use std::{
|
|||||||
time::{Duration, Instant},
|
time::{Duration, Instant},
|
||||||
};
|
};
|
||||||
|
|
||||||
use glam::{vec3, Affine3A, Quat, Vec3, Vec3A};
|
use glam::{Affine3A, Quat, Vec3, Vec3A, vec3};
|
||||||
use idmap::DirectIdMap;
|
use idmap::DirectIdMap;
|
||||||
use wgui::{
|
use wgui::{
|
||||||
components::button::ComponentButton,
|
components::button::ComponentButton,
|
||||||
@@ -14,7 +14,7 @@ use wgui::{
|
|||||||
parser::Fetchable,
|
parser::Fetchable,
|
||||||
renderer_vk::text::custom_glyph::CustomGlyphData,
|
renderer_vk::text::custom_glyph::CustomGlyphData,
|
||||||
taffy,
|
taffy,
|
||||||
widget::{label::WidgetLabel, sprite::WidgetSprite, EventResult},
|
widget::{EventResult, label::WidgetLabel, sprite::WidgetSprite},
|
||||||
};
|
};
|
||||||
use wlx_common::{
|
use wlx_common::{
|
||||||
common::LeftRight,
|
common::LeftRight,
|
||||||
@@ -27,16 +27,16 @@ use crate::{
|
|||||||
task::{OverlayTask, TaskType},
|
task::{OverlayTask, TaskType},
|
||||||
},
|
},
|
||||||
gui::{
|
gui::{
|
||||||
panel::{button::BUTTON_EVENTS, GuiPanel, NewGuiPanelParams, OnCustomAttribFunc},
|
panel::{GuiPanel, NewGuiPanelParams, OnCustomAttribFunc, button::BUTTON_EVENTS},
|
||||||
timer::GuiTimer,
|
timer::GuiTimer,
|
||||||
},
|
},
|
||||||
overlays::edit::LongPressButtonState,
|
overlays::edit::LongPressButtonState,
|
||||||
state::AppState,
|
state::AppState,
|
||||||
windowing::{
|
windowing::{
|
||||||
|
OverlaySelector, Z_ORDER_WATCH,
|
||||||
backend::{OverlayEventData, OverlayMeta},
|
backend::{OverlayEventData, OverlayMeta},
|
||||||
manager::MAX_OVERLAY_SETS,
|
manager::MAX_OVERLAY_SETS,
|
||||||
window::{OverlayCategory, OverlayWindowConfig, OverlayWindowData},
|
window::{OverlayCategory, OverlayWindowConfig, OverlayWindowData},
|
||||||
OverlaySelector, Z_ORDER_WATCH,
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -1,18 +1,18 @@
|
|||||||
use anyhow::Context;
|
use anyhow::Context;
|
||||||
use glam::{vec3, Affine2, Affine3A, Quat, Vec3};
|
use glam::{Affine2, Affine3A, Quat, Vec3, vec3};
|
||||||
use smallvec::smallvec;
|
use smallvec::smallvec;
|
||||||
use std::{cell::RefCell, collections::HashMap, rc::Rc, sync::Arc};
|
use std::{cell::RefCell, collections::HashMap, rc::Rc, sync::Arc};
|
||||||
use vulkano::{
|
use vulkano::{
|
||||||
buffer::{BufferUsage, Subbuffer},
|
buffer::{BufferUsage, Subbuffer},
|
||||||
command_buffer::CommandBufferUsage,
|
command_buffer::CommandBufferUsage,
|
||||||
format::Format,
|
format::Format,
|
||||||
image::{view::ImageView, Image, ImageTiling, SubresourceLayout},
|
image::{Image, ImageTiling, SubresourceLayout, view::ImageView},
|
||||||
};
|
};
|
||||||
use wayvr_ipc::packet_server::{self, PacketServer, WvrStateChanged};
|
use wayvr_ipc::packet_server::{self, PacketServer, WvrStateChanged};
|
||||||
use wgui::gfx::{
|
use wgui::gfx::{
|
||||||
|
WGfx,
|
||||||
pass::WGfxPass,
|
pass::WGfxPass,
|
||||||
pipeline::{WGfxPipeline, WPipelineCreateInfo},
|
pipeline::{WGfxPipeline, WPipelineCreateInfo},
|
||||||
WGfx,
|
|
||||||
};
|
};
|
||||||
use wlx_capture::frame::{DmabufFrame, FourCC, FrameFormat, FramePlane};
|
use wlx_capture::frame::{DmabufFrame, FourCC, FrameFormat, FramePlane};
|
||||||
use wlx_common::windowing::OverlayWindowState;
|
use wlx_common::windowing::OverlayWindowState;
|
||||||
@@ -22,23 +22,22 @@ use crate::{
|
|||||||
input::{self, HoverResult},
|
input::{self, HoverResult},
|
||||||
task::{OverlayTask, TaskType},
|
task::{OverlayTask, TaskType},
|
||||||
wayvr::{
|
wayvr::{
|
||||||
self, display,
|
self, WayVR, WayVRAction, WayVRDisplayClickAction, display,
|
||||||
server_ipc::{gen_args_vec, gen_env_vec},
|
server_ipc::{gen_args_vec, gen_env_vec},
|
||||||
WayVR, WayVRAction, WayVRDisplayClickAction,
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
config_wayvr,
|
config_wayvr,
|
||||||
graphics::{dmabuf::WGfxDmabuf, Vert2Uv},
|
graphics::{Vert2Uv, dmabuf::WGfxDmabuf},
|
||||||
state::{self, AppState},
|
state::{self, AppState},
|
||||||
subsystem::{hid::WheelDelta, input::KeyboardFocus},
|
subsystem::{hid::WheelDelta, input::KeyboardFocus},
|
||||||
windowing::{
|
windowing::{
|
||||||
|
OverlayID, OverlaySelector, Z_ORDER_DASHBOARD,
|
||||||
backend::{
|
backend::{
|
||||||
ui_transform, BackendAttrib, BackendAttribValue, FrameMeta, OverlayBackend,
|
BackendAttrib, BackendAttribValue, FrameMeta, OverlayBackend, OverlayEventData,
|
||||||
OverlayEventData, RenderResources, ShouldRender,
|
RenderResources, ShouldRender, ui_transform,
|
||||||
},
|
},
|
||||||
manager::OverlayWindowManager,
|
manager::OverlayWindowManager,
|
||||||
window::{OverlayCategory, OverlayWindowConfig, OverlayWindowData},
|
window::{OverlayCategory, OverlayWindowConfig, OverlayWindowData},
|
||||||
OverlayID, OverlaySelector, Z_ORDER_DASHBOARD,
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
use glam::Affine3A;
|
use glam::Affine3A;
|
||||||
use idmap::IdMap;
|
use idmap::IdMap;
|
||||||
use smallvec::{smallvec, SmallVec};
|
use smallvec::{SmallVec, smallvec};
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
use wgui::{
|
use wgui::{
|
||||||
font_config::WguiFontConfig, gfx::WGfx, globals::WguiGlobals, parser::parse_color_hex,
|
font_config::WguiFontConfig, gfx::WGfx, globals::WguiGlobals, parser::parse_color_hex,
|
||||||
@@ -22,7 +22,7 @@ use {
|
|||||||
use crate::subsystem::osc::OscSender;
|
use crate::subsystem::osc::OscSender;
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
backend::{input::InputState, task::TaskContainer, XrBackend},
|
backend::{XrBackend, input::InputState, task::TaskContainer},
|
||||||
config::load_general_config,
|
config::load_general_config,
|
||||||
config_io::{self, get_config_file_path},
|
config_io::{self, get_config_file_path},
|
||||||
graphics::WGfxExtras,
|
graphics::WGfxExtras,
|
||||||
|
|||||||
@@ -3,8 +3,8 @@ use smallvec::SmallVec;
|
|||||||
use std::{any::Any, sync::Arc};
|
use std::{any::Any, sync::Arc};
|
||||||
use vulkano::{command_buffer::CommandBufferUsage, format::Format, image::view::ImageView};
|
use vulkano::{command_buffer::CommandBufferUsage, format::Format, image::view::ImageView};
|
||||||
use wgui::gfx::{
|
use wgui::gfx::{
|
||||||
cmd::{GfxCommandBuffer, WGfxClearMode},
|
|
||||||
WGfx,
|
WGfx,
|
||||||
|
cmd::{GfxCommandBuffer, WGfxClearMode},
|
||||||
};
|
};
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
@@ -12,7 +12,7 @@ use crate::{
|
|||||||
graphics::{ExtentExt, RenderResult},
|
graphics::{ExtentExt, RenderResult},
|
||||||
state::AppState,
|
state::AppState,
|
||||||
subsystem::hid::WheelDelta,
|
subsystem::hid::WheelDelta,
|
||||||
windowing::{window::OverlayCategory, OverlayID},
|
windowing::{OverlayID, window::OverlayCategory},
|
||||||
};
|
};
|
||||||
|
|
||||||
#[derive(Default, Clone, Copy)]
|
#[derive(Default, Clone, Copy)]
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ use wlx_common::{
|
|||||||
};
|
};
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
|
FRAME_COUNTER,
|
||||||
backend::task::OverlayTask,
|
backend::task::OverlayTask,
|
||||||
overlays::{
|
overlays::{
|
||||||
anchor::create_anchor, custom::create_custom, edit::EditWrapperManager,
|
anchor::create_anchor, custom::create_custom, edit::EditWrapperManager,
|
||||||
@@ -19,13 +20,12 @@ use crate::{
|
|||||||
},
|
},
|
||||||
state::AppState,
|
state::AppState,
|
||||||
windowing::{
|
windowing::{
|
||||||
|
OverlayID, OverlaySelector,
|
||||||
backend::{OverlayEventData, OverlayMeta},
|
backend::{OverlayEventData, OverlayMeta},
|
||||||
set::OverlayWindowSet,
|
set::OverlayWindowSet,
|
||||||
snap_upright,
|
snap_upright,
|
||||||
window::{OverlayCategory, OverlayWindowData},
|
window::{OverlayCategory, OverlayWindowData},
|
||||||
OverlayID, OverlaySelector,
|
|
||||||
},
|
},
|
||||||
FRAME_COUNTER,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const MAX_OVERLAY_SETS: usize = 7;
|
pub const MAX_OVERLAY_SETS: usize = 7;
|
||||||
|
|||||||
Reference in New Issue
Block a user