1
0
Fork 0
forked from wry/wry

ifs: rename data transfer module

This commit is contained in:
kossLAN 2026-05-29 17:57:38 -04:00
parent a038855895
commit d8920ed7a0
No known key found for this signature in database
32 changed files with 43 additions and 43 deletions

View file

@ -10,7 +10,7 @@ use {
ext_image_capture_source_v1::ExtImageCaptureSourceV1, ext_image_capture_source_v1::ExtImageCaptureSourceV1,
ext_image_copy::ext_image_copy_capture_session_v1::ExtImageCopyCaptureSessionV1, ext_image_copy::ext_image_copy_capture_session_v1::ExtImageCopyCaptureSessionV1,
head_management::jay_head_error_v1::JayHeadErrorV1, head_management::jay_head_error_v1::JayHeadErrorV1,
ipc::{ data_transfer::{
data_control::{ data_control::{
ext_data_control_source_v1::ExtDataControlSourceV1, ext_data_control_source_v1::ExtDataControlSourceV1,
zwlr_data_control_source_v1::ZwlrDataControlSourceV1, zwlr_data_control_source_v1::ZwlrDataControlSourceV1,

View file

@ -11,7 +11,7 @@ use {
ext_session_lock_manager_v1::ExtSessionLockManagerV1Global, ext_session_lock_manager_v1::ExtSessionLockManagerV1Global,
head_management::jay_head_manager_v1::JayHeadManagerV1Global, head_management::jay_head_manager_v1::JayHeadManagerV1Global,
hyprland_focus_grab_manager_v1::HyprlandFocusGrabManagerV1Global, hyprland_focus_grab_manager_v1::HyprlandFocusGrabManagerV1Global,
ipc::{ data_transfer::{
data_control::{ data_control::{
ext_data_control_manager_v1::ExtDataControlManagerV1Global, ext_data_control_manager_v1::ExtDataControlManagerV1Global,
zwlr_data_control_manager_v1::ZwlrDataControlManagerV1Global, zwlr_data_control_manager_v1::ZwlrDataControlManagerV1Global,

View file

@ -1,4 +1,5 @@
pub mod color_management; pub mod color_management;
pub mod data_transfer;
pub mod ext_foreign_toplevel_handle_v1; pub mod ext_foreign_toplevel_handle_v1;
pub mod ext_foreign_toplevel_image_capture_source_manager_v1; pub mod ext_foreign_toplevel_image_capture_source_manager_v1;
pub mod ext_foreign_toplevel_list_v1; pub mod ext_foreign_toplevel_list_v1;
@ -12,7 +13,6 @@ pub mod ext_session_lock_v1;
pub mod head_management; pub mod head_management;
pub mod hyprland_focus_grab_manager_v1; pub mod hyprland_focus_grab_manager_v1;
pub mod hyprland_focus_grab_v1; pub mod hyprland_focus_grab_v1;
pub mod ipc;
pub mod jay_client_query; pub mod jay_client_query;
pub mod jay_color_management; pub mod jay_color_management;
pub mod jay_compositor; pub mod jay_compositor;

View file

@ -2,7 +2,7 @@ use {
crate::{ crate::{
client::{Client, ClientError, ClientId}, client::{Client, ClientError, ClientId},
fixed::Fixed, fixed::Fixed,
ifs::{ipc::x_data_device::XIpcDevice, wl_seat::WlSeatGlobal}, ifs::{data_transfer::x_data_device::XIpcDevice, wl_seat::WlSeatGlobal},
utils::{ utils::{
bitflags::BitflagsExt, cell_ext::CellExt, clonecell::CloneCell, numcell::NumCell, bitflags::BitflagsExt, cell_ext::CellExt, clonecell::CloneCell, numcell::NumCell,
smallmap::SmallMap, smallmap::SmallMap,

View file

@ -1,5 +1,5 @@
use { use {
crate::ifs::ipc::{DynDataSource, IpcLocation}, crate::ifs::data_transfer::{DynDataSource, IpcLocation},
std::rc::Rc, std::rc::Rc,
}; };

View file

@ -2,7 +2,7 @@ use {
crate::{ crate::{
client::Client, client::Client,
ifs::{ ifs::{
ipc::data_control::{ data_transfer::data_control::{
ext_data_control_offer_v1::ExtDataControlOfferV1, ext_data_control_offer_v1::ExtDataControlOfferV1,
ext_data_control_source_v1::ExtDataControlSourceV1, ext_data_control_source_v1::ExtDataControlSourceV1,
private::{ private::{

View file

@ -2,7 +2,7 @@ use {
crate::{ crate::{
client::{CAP_DATA_CONTROL_MANAGER, Client, ClientCaps, ClientError}, client::{CAP_DATA_CONTROL_MANAGER, Client, ClientCaps, ClientError},
globals::{Global, GlobalName}, globals::{Global, GlobalName},
ifs::ipc::{ ifs::data_transfer::{
IpcLocation, IpcLocation,
data_control::{ data_control::{
DynDataControlDevice, ext_data_control_device_v1::ExtDataControlDeviceV1, DynDataControlDevice, ext_data_control_device_v1::ExtDataControlDeviceV1,

View file

@ -1,6 +1,6 @@
use { use {
crate::{ crate::{
ifs::ipc::data_control::{ ifs::data_transfer::data_control::{
ext_data_control_device_v1::ExtDataControlIpc, ext_data_control_device_v1::ExtDataControlIpc,
private::{ private::{
DataControlOffer, DataControlOfferData, DataControlOffer, DataControlOfferData,

View file

@ -1,7 +1,7 @@
use { use {
crate::{ crate::{
client::Client, client::Client,
ifs::ipc::{ ifs::data_transfer::{
IpcLocation, SourceData, IpcLocation, SourceData,
data_control::{ data_control::{
ext_data_control_device_v1::ExtDataControlIpc, ext_data_control_device_v1::ExtDataControlIpc,

View file

@ -2,7 +2,7 @@ use {
crate::{ crate::{
client::{Client, ClientError, ClientId, WaylandObject, WaylandObjectLookup}, client::{Client, ClientError, ClientId, WaylandObject, WaylandObjectLookup},
ifs::{ ifs::{
ipc::{ data_transfer::{
DataOffer, DataOfferId, DataSource, DeviceData, DynDataOffer, DynDataSource, DataOffer, DataOfferId, DataSource, DeviceData, DynDataOffer, DynDataSource,
IpcLocation, IpcVtable, OfferData, Role, SourceData, cancel_offer, cancel_offers, IpcLocation, IpcVtable, OfferData, Role, SourceData, cancel_offer, cancel_offers,
data_control::{DataControlDeviceId, DynDataControlDevice}, data_control::{DataControlDeviceId, DynDataControlDevice},
@ -292,7 +292,7 @@ pub mod logic {
crate::{ crate::{
client::ClientError, client::ClientError,
ifs::{ ifs::{
ipc::{ data_transfer::{
IpcLocation, add_data_source_mime_type, break_device_loops, break_offer_loops, IpcLocation, add_data_source_mime_type, break_device_loops, break_offer_loops,
break_source_loops, break_source_loops,
data_control::private::{ data_control::private::{

View file

@ -2,7 +2,7 @@ use {
crate::{ crate::{
client::Client, client::Client,
ifs::{ ifs::{
ipc::data_control::{ data_transfer::data_control::{
private::{ private::{
DataControlDevice, DataControlDeviceData, DataControlIpc, DataControlOfferData, DataControlDevice, DataControlDeviceData, DataControlIpc, DataControlOfferData,
logic::{self, DataControlError}, logic::{self, DataControlError},

View file

@ -2,7 +2,7 @@ use {
crate::{ crate::{
client::{CAP_DATA_CONTROL_MANAGER, Client, ClientCaps, ClientError}, client::{CAP_DATA_CONTROL_MANAGER, Client, ClientCaps, ClientError},
globals::{Global, GlobalName}, globals::{Global, GlobalName},
ifs::ipc::{ ifs::data_transfer::{
IpcLocation, IpcLocation,
data_control::{ data_control::{
DynDataControlDevice, zwlr_data_control_device_v1::ZwlrDataControlDeviceV1, DynDataControlDevice, zwlr_data_control_device_v1::ZwlrDataControlDeviceV1,

View file

@ -1,6 +1,6 @@
use { use {
crate::{ crate::{
ifs::ipc::data_control::{ ifs::data_transfer::data_control::{
private::{ private::{
DataControlOffer, DataControlOfferData, DataControlOffer, DataControlOfferData,
logic::{self, DataControlError}, logic::{self, DataControlError},

View file

@ -1,7 +1,7 @@
use { use {
crate::{ crate::{
client::Client, client::Client,
ifs::ipc::{ ifs::data_transfer::{
IpcLocation, SourceData, IpcLocation, SourceData,
data_control::{ data_control::{
private::{ private::{

View file

@ -3,7 +3,7 @@ use {
client::{Client, ClientError, ClientId}, client::{Client, ClientError, ClientId},
fixed::Fixed, fixed::Fixed,
ifs::{ ifs::{
ipc::{ data_transfer::{
DeviceData, IpcVtable, IterableIpcVtable, OfferData, Role, break_device_loops, DeviceData, IpcVtable, IterableIpcVtable, OfferData, Role, break_device_loops,
destroy_data_device, wl_data_offer::WlDataOffer, wl_data_source::WlDataSource, destroy_data_device, wl_data_offer::WlDataOffer, wl_data_source::WlDataSource,
}, },

View file

@ -2,7 +2,7 @@ use {
crate::{ crate::{
client::{Client, ClientError}, client::{Client, ClientError},
globals::{Global, GlobalName}, globals::{Global, GlobalName},
ifs::ipc::{wl_data_device::WlDataDevice, wl_data_source::WlDataSource}, ifs::data_transfer::{wl_data_device::WlDataDevice, wl_data_source::WlDataSource},
leaks::Tracker, leaks::Tracker,
object::{Object, Version}, object::{Object, Version},
wire::{WlDataDeviceManagerId, wl_data_device_manager::*}, wire::{WlDataDeviceManagerId, wl_data_device_manager::*},

View file

@ -3,7 +3,7 @@ use {
client::{Client, ClientError, ClientId}, client::{Client, ClientError, ClientId},
fixed::Fixed, fixed::Fixed,
ifs::{ ifs::{
ipc::{ data_transfer::{
DataOffer, DataOfferId, DynDataOffer, OFFER_STATE_ACCEPTED, OFFER_STATE_DROPPED, DataOffer, DataOfferId, DynDataOffer, OFFER_STATE_ACCEPTED, OFFER_STATE_DROPPED,
OFFER_STATE_FINISHED, OfferData, Role, SOURCE_STATE_FINISHED, break_offer_loops, OFFER_STATE_FINISHED, OfferData, Role, SOURCE_STATE_FINISHED, break_offer_loops,
cancel_offer, destroy_data_offer, receive_data_offer, cancel_offer, destroy_data_offer, receive_data_offer,

View file

@ -2,7 +2,7 @@ use {
crate::{ crate::{
client::{Client, ClientError}, client::{Client, ClientError},
ifs::{ ifs::{
ipc::{ data_transfer::{
DataSource, DynDataOffer, DynDataSource, OFFER_STATE_ACCEPTED, OFFER_STATE_DROPPED, DataSource, DynDataOffer, DynDataSource, OFFER_STATE_ACCEPTED, OFFER_STATE_DROPPED,
SOURCE_STATE_CANCELLED, SOURCE_STATE_DROPPED, SharedState, SourceData, SOURCE_STATE_CANCELLED, SOURCE_STATE_DROPPED, SharedState, SourceData,
add_data_source_mime_type, break_source_loops, cancel_offers, destroy_data_source, add_data_source_mime_type, break_source_loops, cancel_offers, destroy_data_source,

View file

@ -2,7 +2,7 @@ use {
crate::{ crate::{
client::{Client, ClientError}, client::{Client, ClientError},
ifs::{ ifs::{
ipc::{ data_transfer::{
DeviceData, IpcLocation, IpcVtable, OfferData, Role, x_data_offer::XDataOffer, DeviceData, IpcLocation, IpcVtable, OfferData, Role, x_data_offer::XDataOffer,
x_data_source::XDataSource, x_data_source::XDataSource,
}, },

View file

@ -2,7 +2,7 @@ use {
crate::{ crate::{
client::ClientId, client::ClientId,
ifs::{ ifs::{
ipc::{ data_transfer::{
DataOffer, DataOfferId, DynDataOffer, IpcLocation, OfferData, cancel_offer, DataOffer, DataOfferId, DynDataOffer, IpcLocation, OfferData, cancel_offer,
x_data_device::{XClipboardIpc, XIpcDevice, XPrimarySelectionIpc}, x_data_device::{XClipboardIpc, XIpcDevice, XPrimarySelectionIpc},
}, },

View file

@ -1,7 +1,7 @@
use { use {
crate::{ crate::{
ifs::{ ifs::{
ipc::{ data_transfer::{
DataSource, DynDataSource, IpcLocation, SourceData, cancel_offers, detach_seat, DataSource, DynDataSource, IpcLocation, SourceData, cancel_offers, detach_seat,
x_data_device::XIpcDevice, x_data_device::XIpcDevice,
}, },

View file

@ -2,7 +2,7 @@ use {
crate::{ crate::{
client::{Client, ClientError}, client::{Client, ClientError},
globals::{Global, GlobalName}, globals::{Global, GlobalName},
ifs::ipc::{ ifs::data_transfer::{
zwp_primary_selection_device_v1::ZwpPrimarySelectionDeviceV1, zwp_primary_selection_device_v1::ZwpPrimarySelectionDeviceV1,
zwp_primary_selection_source_v1::ZwpPrimarySelectionSourceV1, zwp_primary_selection_source_v1::ZwpPrimarySelectionSourceV1,
}, },

View file

@ -2,7 +2,7 @@ use {
crate::{ crate::{
client::{Client, ClientError, ClientId}, client::{Client, ClientError, ClientId},
ifs::{ ifs::{
ipc::{ data_transfer::{
DeviceData, IpcVtable, IterableIpcVtable, OfferData, Role, break_device_loops, DeviceData, IpcVtable, IterableIpcVtable, OfferData, Role, break_device_loops,
destroy_data_device, zwp_primary_selection_offer_v1::ZwpPrimarySelectionOfferV1, destroy_data_device, zwp_primary_selection_offer_v1::ZwpPrimarySelectionOfferV1,
zwp_primary_selection_source_v1::ZwpPrimarySelectionSourceV1, zwp_primary_selection_source_v1::ZwpPrimarySelectionSourceV1,

View file

@ -2,7 +2,7 @@ use {
crate::{ crate::{
client::{Client, ClientError, ClientId}, client::{Client, ClientError, ClientId},
ifs::{ ifs::{
ipc::{ data_transfer::{
DataOffer, DataOfferId, DynDataOffer, OfferData, break_offer_loops, cancel_offer, DataOffer, DataOfferId, DynDataOffer, OfferData, break_offer_loops, cancel_offer,
destroy_data_offer, receive_data_offer, destroy_data_offer, receive_data_offer,
zwp_primary_selection_device_v1::{ zwp_primary_selection_device_v1::{

View file

@ -2,7 +2,7 @@ use {
crate::{ crate::{
client::{Client, ClientError}, client::{Client, ClientError},
ifs::{ ifs::{
ipc::{ data_transfer::{
DataSource, DynDataSource, SourceData, add_data_source_mime_type, DataSource, DynDataSource, SourceData, add_data_source_mime_type,
break_source_loops, cancel_offers, destroy_data_source, detach_seat, break_source_loops, cancel_offers, destroy_data_source, detach_seat,
offer_source_to_x, offer_source_to_x,

View file

@ -34,7 +34,7 @@ use {
globals::{Global, GlobalName}, globals::{Global, GlobalName},
ifs::{ ifs::{
ext_idle_notification_v1::ExtIdleNotificationV1, ext_idle_notification_v1::ExtIdleNotificationV1,
ipc::{ data_transfer::{
self, DynDataSource, IpcError, IpcLocation, self, DynDataSource, IpcError, IpcLocation,
data_control::{DataControlDeviceId, DynDataControlDevice}, data_control::{DataControlDeviceId, DynDataControlDevice},
offer_source_to_regular_client, offer_source_to_regular_client,
@ -159,7 +159,7 @@ pub struct DroppedDnd {
impl Drop for DroppedDnd { impl Drop for DroppedDnd {
fn drop(&mut self) { fn drop(&mut self) {
if let Some(src) = self.dnd.src.take() { if let Some(src) = self.dnd.src.take() {
ipc::detach_seat(&*src, &self.dnd.seat); data_transfer::detach_seat(&*src, &self.dnd.seat);
} }
} }
} }
@ -1287,8 +1287,8 @@ impl WlSeatGlobal {
location: IpcLocation, location: IpcLocation,
) -> Result<(), WlSeatError> ) -> Result<(), WlSeatError>
where where
T: ipc::IterableIpcVtable, T: data_transfer::IterableIpcVtable,
X: ipc::IpcVtable<Device = XIpcDevice>, X: data_transfer::IpcVtable<Device = XIpcDevice>,
S: DynDataSource, S: DynDataSource,
{ {
if let (Some(new), Some(old)) = (&src, &field.get()) if let (Some(new), Some(old)) = (&src, &field.get())
@ -1297,7 +1297,7 @@ impl WlSeatGlobal {
return Ok(()); return Ok(());
} }
if let Some(new) = &src { if let Some(new) = &src {
ipc::attach_seat(&**new, self, ipc::Role::Selection)?; data_transfer::attach_seat(&**new, self, data_transfer::Role::Selection)?;
} }
let src_dyn = src.clone().map(|s| s as Rc<dyn DynDataSource>); let src_dyn = src.clone().map(|s| s as Rc<dyn DynDataSource>);
if let Some(old) = field.set(src_dyn) { if let Some(old) = field.set(src_dyn) {
@ -1319,8 +1319,8 @@ impl WlSeatGlobal {
selection: Option<Rc<dyn DynDataSource>>, selection: Option<Rc<dyn DynDataSource>>,
client: &Rc<Client>, client: &Rc<Client>,
) where ) where
T: ipc::IterableIpcVtable, T: data_transfer::IterableIpcVtable,
X: ipc::IpcVtable<Device = XIpcDevice>, X: data_transfer::IpcVtable<Device = XIpcDevice>,
{ {
if let Some(src) = &selection { if let Some(src) = &selection {
src.cancel_unprivileged_offers(); src.cancel_unprivileged_offers();

View file

@ -9,7 +9,7 @@ use {
ei::ei_ifs::ei_seat::EiSeat, ei::ei_ifs::ei_seat::EiSeat,
fixed::Fixed, fixed::Fixed,
ifs::{ ifs::{
ipc::{ data_transfer::{
offer_source_to_regular_client, offer_source_to_regular_client,
wl_data_device::{ClipboardIpc, WlDataDevice}, wl_data_device::{ClipboardIpc, WlDataDevice},
x_data_device::{XClipboardIpc, XPrimarySelectionIpc}, x_data_device::{XClipboardIpc, XPrimarySelectionIpc},

View file

@ -4,8 +4,8 @@ use {
cursor::KnownCursor, cursor::KnownCursor,
fixed::Fixed, fixed::Fixed,
ifs::{ ifs::{
ipc, data_transfer,
ipc::wl_data_source::WlDataSource, data_transfer::wl_data_source::WlDataSource,
wl_seat::{ wl_seat::{
BTN_LEFT, BTN_RIGHT, CHANGE_CURSOR_MOVED, CHANGE_TREE, Dnd, DroppedDnd, BTN_LEFT, BTN_RIGHT, CHANGE_CURSOR_MOVED, CHANGE_TREE, Dnd, DroppedDnd,
NodeSeatState, WlSeatError, WlSeatGlobal, wl_pointer::PendingScroll, NodeSeatState, WlSeatError, WlSeatGlobal, wl_pointer::PendingScroll,
@ -606,7 +606,7 @@ impl PointerOwner for DndPointerOwner {
target.node_on_dnd_leave(&self.dnd); target.node_on_dnd_leave(&self.dnd);
target.node_seat_state().remove_dnd_target(seat); target.node_seat_state().remove_dnd_target(seat);
if !should_drop && let Some(src) = &self.dnd.src { if !should_drop && let Some(src) = &self.dnd.src {
ipc::detach_seat(&**src, seat); data_transfer::detach_seat(&**src, seat);
} }
if let Some(icon) = self.icon.get() { if let Some(icon) = self.icon.get() {
icon.disable(); icon.disable();
@ -651,7 +651,7 @@ impl PointerOwner for DndPointerOwner {
target.node_on_dnd_leave(&self.dnd); target.node_on_dnd_leave(&self.dnd);
target.node_seat_state().remove_dnd_target(seat); target.node_seat_state().remove_dnd_target(seat);
if let Some(src) = &self.dnd.src { if let Some(src) = &self.dnd.src {
ipc::detach_seat(&**src, seat); data_transfer::detach_seat(&**src, seat);
} }
if let Some(icon) = self.icon.get() { if let Some(icon) = self.icon.get() {
icon.disable(); icon.disable();
@ -887,7 +887,7 @@ impl SimplePointerOwnerUsecase for DefaultPointerUsecase {
icon.enable(); icon.enable();
} }
if let Some(new) = &src { if let Some(new) = &src {
ipc::attach_seat(&**new, seat, ipc::Role::Dnd)?; data_transfer::attach_seat(&**new, seat, data_transfer::Role::Dnd)?;
if let Some(drag) = new.toplevel_drag.get() { if let Some(drag) = new.toplevel_drag.get() {
drag.start_drag(); drag.start_drag();
} }

View file

@ -2,7 +2,7 @@ use {
crate::{ crate::{
client::{Client, ClientError}, client::{Client, ClientError},
ifs::{ ifs::{
ipc::wl_data_source::WlDataSource, wl_seat::WlSeatGlobal, data_transfer::wl_data_source::WlDataSource, wl_seat::WlSeatGlobal,
wl_surface::xdg_surface::xdg_toplevel::XdgToplevel, wl_surface::xdg_surface::xdg_toplevel::XdgToplevel,
}, },
leaks::Tracker, leaks::Tracker,

View file

@ -63,7 +63,7 @@ use {
HeadManagers, HeadNames, HeadManagers, HeadNames,
jay_head_manager_session_v1::{HeadManagerEvent, JayHeadManagerSessionV1}, jay_head_manager_session_v1::{HeadManagerEvent, JayHeadManagerSessionV1},
}, },
ipc::{ data_transfer::{
DataOfferIds, DataSourceIds, data_control::DataControlDeviceIds, DataOfferIds, DataSourceIds, data_control::DataControlDeviceIds,
x_data_device::XIpcDeviceIds, x_data_device::XIpcDeviceIds,
}, },

View file

@ -7,7 +7,7 @@ use {
compositor::DISPLAY, compositor::DISPLAY,
forker::{ForkerError, ForkerProxy}, forker::{ForkerError, ForkerProxy},
ifs::{ ifs::{
ipc::{DataOfferId, DataSourceId, IpcLocation, x_data_offer::XDataOffer}, data_transfer::{DataOfferId, DataSourceId, IpcLocation, x_data_offer::XDataOffer},
wl_seat::SeatId, wl_seat::SeatId,
wl_surface::x_surface::xwindow::{Xwindow, XwindowData}, wl_surface::x_surface::xwindow::{Xwindow, XwindowData},
}, },

View file

@ -6,7 +6,7 @@ use {
client::Client, client::Client,
criteria::tlm::{TL_CHANGED_CLASS_INST, TL_CHANGED_ROLE}, criteria::tlm::{TL_CHANGED_CLASS_INST, TL_CHANGED_ROLE},
ifs::{ ifs::{
ipc::{ data_transfer::{
DataOfferId, DataSourceId, DynDataOffer, DynDataSource, IpcLocation, IpcVtable, DataOfferId, DataSourceId, DynDataOffer, DynDataSource, IpcLocation, IpcVtable,
SourceData, add_data_source_mime_type, destroy_data_device, destroy_data_offer, SourceData, add_data_source_mime_type, destroy_data_device, destroy_data_offer,
destroy_data_source, receive_data_offer, destroy_data_source, receive_data_offer,