treewide: use Rust 2018 import paths
Rust 2018 is required for D-Bus support with tokio/zbus.
This commit is contained in:
parent
f282a741dd
commit
78f389beaa
13 changed files with 119 additions and 135 deletions
|
|
@ -3,14 +3,11 @@
|
|||
* Copyright (c) 2024, Richard Acayan. All rights reserved.
|
||||
*/
|
||||
|
||||
extern crate libc;
|
||||
extern crate memmap2;
|
||||
|
||||
use core::imgref::ImgRef;
|
||||
use core::imgref::ImgRefMut;
|
||||
use core::rgb::alt::BGRA;
|
||||
use core::rgb::FromSlice;
|
||||
use self::memmap2::MmapMut;
|
||||
use imgref::ImgRef;
|
||||
use imgref::ImgRefMut;
|
||||
use memmap2::MmapMut;
|
||||
use rgb::alt::BGRA;
|
||||
use rgb::FromSlice;
|
||||
use std::ffi::CString;
|
||||
use std::fs::File;
|
||||
use std::io::Error;
|
||||
|
|
@ -19,12 +16,12 @@ use std::iter;
|
|||
use std::os::fd::FromRawFd;
|
||||
use std::os::fd::AsFd;
|
||||
use std::process;
|
||||
use wayland::wayland_client::protocol::wl_buffer::WlBuffer;
|
||||
use wayland::wayland_client::protocol::wl_shm_pool::WlShmPool;
|
||||
use wayland::wayland_client::protocol::wl_shm;
|
||||
use wayland::wayland_client::protocol::wl_surface::WlSurface;
|
||||
use wayland::wayland_client::Dispatch;
|
||||
use wayland::wayland_client::QueueHandle;
|
||||
use wayland_client::protocol::wl_buffer::WlBuffer;
|
||||
use wayland_client::protocol::wl_shm_pool::WlShmPool;
|
||||
use wayland_client::protocol::wl_shm;
|
||||
use wayland_client::protocol::wl_surface::WlSurface;
|
||||
use wayland_client::Dispatch;
|
||||
use wayland_client::QueueHandle;
|
||||
|
||||
pub struct Buffer<T> {
|
||||
file: File,
|
||||
|
|
|
|||
|
|
@ -3,42 +3,42 @@
|
|||
* Copyright (c) 2024, Richard Acayan. All rights reserved.
|
||||
*/
|
||||
|
||||
use core::Button;
|
||||
use core::Display;
|
||||
use core::Graphics;
|
||||
use core::Layout;
|
||||
use crate::core::Button;
|
||||
use crate::core::Display;
|
||||
use crate::core::Graphics;
|
||||
use crate::core::Layout;
|
||||
use crate::wayland::Seat;
|
||||
use crate::wayland::Surface;
|
||||
use crate::wayland::VirtualKeyboard;
|
||||
use crate::wayland::wlr_layer_shell_unstable_v1::zwlr_layer_shell_v1;
|
||||
use crate::wayland::wlr_layer_shell_unstable_v1::zwlr_layer_surface_v1;
|
||||
use crate::wayland::fractional_scale_v1::wp_fractional_scale_manager_v1;
|
||||
use crate::wayland::fractional_scale_v1::wp_fractional_scale_v1;
|
||||
use crate::wayland::input_method_unstable_v2::zwp_input_method_manager_v2;
|
||||
use crate::wayland::input_method_unstable_v2::zwp_input_method_v2;
|
||||
use crate::wayland::viewporter::wp_viewporter;
|
||||
use crate::wayland::viewporter::wp_viewport;
|
||||
use crate::wayland::virtual_keyboard_unstable_v1::zwp_virtual_keyboard_manager_v1;
|
||||
use crate::wayland::virtual_keyboard_unstable_v1::zwp_virtual_keyboard_v1;
|
||||
use std::io::Error;
|
||||
use std::sync::Arc;
|
||||
use std::sync::Mutex;
|
||||
use wayland::Seat;
|
||||
use wayland::Surface;
|
||||
use wayland::wayland_client::globals::GlobalList;
|
||||
use wayland::wayland_client::globals::GlobalListContents;
|
||||
use wayland::wayland_client::protocol::wl_buffer;
|
||||
use wayland::wayland_client::protocol::wl_compositor;
|
||||
use wayland::wayland_client::protocol::wl_pointer;
|
||||
use wayland::wayland_client::protocol::wl_registry;
|
||||
use wayland::wayland_client::protocol::wl_seat;
|
||||
use wayland::wayland_client::protocol::wl_shm;
|
||||
use wayland::wayland_client::protocol::wl_shm_pool;
|
||||
use wayland::wayland_client::protocol::wl_surface;
|
||||
use wayland::wayland_client::protocol::wl_touch;
|
||||
use wayland::wayland_client::Connection;
|
||||
use wayland::wayland_client::Dispatch;
|
||||
use wayland::wayland_client::Proxy;
|
||||
use wayland::wayland_client::QueueHandle;
|
||||
use wayland::wayland_client::WEnum;
|
||||
use wayland::wlr_layer_shell_unstable_v1::zwlr_layer_shell_v1;
|
||||
use wayland::wlr_layer_shell_unstable_v1::zwlr_layer_surface_v1;
|
||||
use wayland::fractional_scale_v1::wp_fractional_scale_manager_v1;
|
||||
use wayland::fractional_scale_v1::wp_fractional_scale_v1;
|
||||
use wayland::input_method_unstable_v2::zwp_input_method_manager_v2;
|
||||
use wayland::input_method_unstable_v2::zwp_input_method_v2;
|
||||
use wayland::viewporter::wp_viewporter;
|
||||
use wayland::viewporter::wp_viewport;
|
||||
use wayland::virtual_keyboard_unstable_v1::zwp_virtual_keyboard_manager_v1;
|
||||
use wayland::virtual_keyboard_unstable_v1::zwp_virtual_keyboard_v1;
|
||||
use wayland::VirtualKeyboard;
|
||||
use wayland_client::Connection;
|
||||
use wayland_client::Dispatch;
|
||||
use wayland_client::Proxy;
|
||||
use wayland_client::QueueHandle;
|
||||
use wayland_client::WEnum;
|
||||
use wayland_client::globals::GlobalList;
|
||||
use wayland_client::globals::GlobalListContents;
|
||||
use wayland_client::protocol::wl_buffer;
|
||||
use wayland_client::protocol::wl_compositor;
|
||||
use wayland_client::protocol::wl_pointer;
|
||||
use wayland_client::protocol::wl_registry;
|
||||
use wayland_client::protocol::wl_seat;
|
||||
use wayland_client::protocol::wl_shm;
|
||||
use wayland_client::protocol::wl_shm_pool;
|
||||
use wayland_client::protocol::wl_surface;
|
||||
use wayland_client::protocol::wl_touch;
|
||||
|
||||
pub struct Dispatcher {
|
||||
seat: Seat<Surface<Self>, VirtualKeyboard, Self>,
|
||||
|
|
|
|||
|
|
@ -3,10 +3,11 @@
|
|||
* Copyright (c) 2024, Richard Acayan. All rights reserved.
|
||||
*/
|
||||
|
||||
use core::Keyboard;
|
||||
use core::Layout;
|
||||
use core::Part;
|
||||
use core::xkeysym::Keysym;
|
||||
use crate::core::Keyboard;
|
||||
use crate::core::Layout;
|
||||
use crate::core::Part;
|
||||
use crate::wayland::virtual_keyboard_unstable_v1::zwp_virtual_keyboard_manager_v1::ZwpVirtualKeyboardManagerV1;
|
||||
use crate::wayland::virtual_keyboard_unstable_v1::zwp_virtual_keyboard_v1::ZwpVirtualKeyboardV1;
|
||||
use std::collections::HashMap;
|
||||
use std::fs::File;
|
||||
use std::fs::OpenOptions;
|
||||
|
|
@ -14,12 +15,11 @@ use std::io::Seek;
|
|||
use std::io::Write;
|
||||
use std::os::fd::AsFd;
|
||||
use std::process;
|
||||
use wayland::wayland_client::Dispatch;
|
||||
use wayland::wayland_client::QueueHandle;
|
||||
use wayland::wayland_client::protocol::wl_seat::WlSeat;
|
||||
use wayland::wayland_client::protocol::wl_keyboard::KeymapFormat;
|
||||
use wayland::virtual_keyboard_unstable_v1::zwp_virtual_keyboard_manager_v1::ZwpVirtualKeyboardManagerV1;
|
||||
use wayland::virtual_keyboard_unstable_v1::zwp_virtual_keyboard_v1::ZwpVirtualKeyboardV1;
|
||||
use wayland_client::Dispatch;
|
||||
use wayland_client::QueueHandle;
|
||||
use wayland_client::protocol::wl_seat::WlSeat;
|
||||
use wayland_client::protocol::wl_keyboard::KeymapFormat;
|
||||
use xkeysym::Keysym;
|
||||
|
||||
pub struct VirtualKeyboard {
|
||||
vk: ZwpVirtualKeyboardV1,
|
||||
|
|
|
|||
|
|
@ -3,11 +3,6 @@
|
|||
* Copyright (c) 2024, Richard Acayan. All rights reserved.
|
||||
*/
|
||||
|
||||
pub extern crate wayland_client;
|
||||
pub extern crate wayland_protocols;
|
||||
pub extern crate wayland_protocols_wlr;
|
||||
pub extern crate wayland_scanner;
|
||||
|
||||
mod buffer;
|
||||
mod dispatcher;
|
||||
mod keyboard;
|
||||
|
|
@ -21,10 +16,10 @@ pub use self::keyboard::VirtualKeyboard;
|
|||
pub use self::seat::Seat;
|
||||
pub use self::surface::Surface;
|
||||
|
||||
pub use self::wayland_protocols_wlr::layer_shell::v1::client as wlr_layer_shell_unstable_v1;
|
||||
pub use self::wayland_protocols::wp::fractional_scale::v1::client as fractional_scale_v1;
|
||||
pub use self::wayland_protocols::wp::text_input::zv3::client as text_input_unstable_v3;
|
||||
pub use self::wayland_protocols::wp::viewporter::client as viewporter;
|
||||
pub use wayland_protocols_wlr::layer_shell::v1::client as wlr_layer_shell_unstable_v1;
|
||||
pub use wayland_protocols::wp::fractional_scale::v1::client as fractional_scale_v1;
|
||||
pub use wayland_protocols::wp::text_input::zv3::client as text_input_unstable_v3;
|
||||
pub use wayland_protocols::wp::viewporter::client as viewporter;
|
||||
|
||||
pub use self::protocols::input_method_unstable_v2;
|
||||
pub use self::protocols::virtual_keyboard_unstable_v1;
|
||||
|
|
|
|||
|
|
@ -4,12 +4,12 @@
|
|||
*/
|
||||
|
||||
pub mod input_method_unstable_v2 {
|
||||
use wayland::wayland_client;
|
||||
use wayland::wayland_client::protocol::*;
|
||||
use wayland::text_input_unstable_v3::*;
|
||||
use wayland_client;
|
||||
use wayland_client::protocol::*;
|
||||
use crate::wayland::text_input_unstable_v3::*;
|
||||
|
||||
pub mod __interfaces {
|
||||
use wayland::wayland_client::protocol::__interfaces::*;
|
||||
use wayland_client::protocol::__interfaces::*;
|
||||
|
||||
wayland_scanner::generate_interfaces!("wayland-protocols/input-method-unstable-v2.xml");
|
||||
}
|
||||
|
|
@ -20,11 +20,11 @@ pub mod input_method_unstable_v2 {
|
|||
}
|
||||
|
||||
pub mod virtual_keyboard_unstable_v1 {
|
||||
use wayland::wayland_client;
|
||||
use wayland::wayland_client::protocol::*;
|
||||
use wayland_client;
|
||||
use wayland_client::protocol::*;
|
||||
|
||||
pub mod __interfaces {
|
||||
use wayland::wayland_client::protocol::__interfaces::*;
|
||||
use wayland_client::protocol::__interfaces::*;
|
||||
|
||||
wayland_scanner::generate_interfaces!("wayland-protocols/virtual-keyboard-unstable-v1.xml");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,19 +3,19 @@
|
|||
* Copyright (c) 2024, Richard Acayan. All rights reserved.
|
||||
*/
|
||||
|
||||
use core::Button;
|
||||
use core::ModState;
|
||||
use core::Display;
|
||||
use core::Graphics;
|
||||
use core::Keyboard;
|
||||
use core::Layout;
|
||||
use crate::core::Button;
|
||||
use crate::core::Display;
|
||||
use crate::core::Graphics;
|
||||
use crate::core::Keyboard;
|
||||
use crate::core::Layout;
|
||||
use crate::core::ModState;
|
||||
use std::sync::Arc;
|
||||
use std::sync::Mutex;
|
||||
use wayland::wayland_client::protocol::wl_pointer;
|
||||
use wayland::wayland_client::protocol::wl_seat;
|
||||
use wayland::wayland_client::protocol::wl_touch::WlTouch;
|
||||
use wayland::wayland_client::Dispatch;
|
||||
use wayland::wayland_client::QueueHandle;
|
||||
use wayland_client::protocol::wl_pointer;
|
||||
use wayland_client::protocol::wl_seat;
|
||||
use wayland_client::protocol::wl_touch::WlTouch;
|
||||
use wayland_client::Dispatch;
|
||||
use wayland_client::QueueHandle;
|
||||
|
||||
enum PressAction {
|
||||
Pos(f64, f64),
|
||||
|
|
|
|||
|
|
@ -3,24 +3,24 @@
|
|||
* Copyright (c) 2024, Richard Acayan. All rights reserved.
|
||||
*/
|
||||
|
||||
use core::Display;
|
||||
use core::imgref::ImgRefMut;
|
||||
use core::rgb::alt::BGRA;
|
||||
use crate::core::Display;
|
||||
use crate::wayland::Buffer;
|
||||
use crate::wayland::fractional_scale_v1::wp_fractional_scale_manager_v1::WpFractionalScaleManagerV1;
|
||||
use crate::wayland::fractional_scale_v1::wp_fractional_scale_v1::WpFractionalScaleV1;
|
||||
use crate::wayland::viewporter::wp_viewporter::WpViewporter;
|
||||
use crate::wayland::viewporter::wp_viewport::WpViewport;
|
||||
use crate::wayland::wlr_layer_shell_unstable_v1::zwlr_layer_shell_v1;
|
||||
use crate::wayland::wlr_layer_shell_unstable_v1::zwlr_layer_surface_v1;
|
||||
use imgref::ImgRefMut;
|
||||
use rgb::alt::BGRA;
|
||||
use std::io::Error;
|
||||
use wayland::Buffer;
|
||||
use wayland::wayland_client::protocol::wl_buffer::WlBuffer;
|
||||
use wayland::wayland_client::protocol::wl_compositor::WlCompositor;
|
||||
use wayland::wayland_client::protocol::wl_shm_pool::WlShmPool;
|
||||
use wayland::wayland_client::protocol::wl_shm::WlShm;
|
||||
use wayland::wayland_client::protocol::wl_surface::WlSurface;
|
||||
use wayland::wayland_client::Dispatch;
|
||||
use wayland::wayland_client::QueueHandle;
|
||||
use wayland::wlr_layer_shell_unstable_v1::zwlr_layer_shell_v1;
|
||||
use wayland::wlr_layer_shell_unstable_v1::zwlr_layer_surface_v1;
|
||||
use wayland::fractional_scale_v1::wp_fractional_scale_manager_v1::WpFractionalScaleManagerV1;
|
||||
use wayland::fractional_scale_v1::wp_fractional_scale_v1::WpFractionalScaleV1;
|
||||
use wayland::viewporter::wp_viewporter::WpViewporter;
|
||||
use wayland::viewporter::wp_viewport::WpViewport;
|
||||
use wayland_client::protocol::wl_buffer::WlBuffer;
|
||||
use wayland_client::protocol::wl_compositor::WlCompositor;
|
||||
use wayland_client::protocol::wl_shm_pool::WlShmPool;
|
||||
use wayland_client::protocol::wl_shm::WlShm;
|
||||
use wayland_client::protocol::wl_surface::WlSurface;
|
||||
use wayland_client::Dispatch;
|
||||
use wayland_client::QueueHandle;
|
||||
|
||||
pub struct Surface<T> {
|
||||
bufs: [Buffer<T>; 2],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue