Remove xlib_xconnection from public interface

This commit is contained in:
John Nunley 2023-01-10 08:46:48 +00:00 committed by GitHub
parent 4b22ca8daf
commit 490abcad14
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 56 additions and 104 deletions

View file

@ -185,7 +185,7 @@ impl MwmHints {
}
}
pub struct NormalHints<'a> {
pub(crate) struct NormalHints<'a> {
size_hints: XSmartPointer<'a, ffi::XSizeHints>,
}
@ -196,11 +196,6 @@ impl<'a> NormalHints<'a> {
}
}
pub fn get_position(&self) -> Option<(i32, i32)> {
has_flag(self.size_hints.flags, ffi::PPosition)
.then(|| (self.size_hints.x, self.size_hints.y))
}
pub fn get_resize_increments(&self) -> Option<(u32, u32)> {
has_flag(self.size_hints.flags, ffi::PResizeInc).then(|| {
(

View file

@ -2,7 +2,7 @@ use std::ops::{Deref, DerefMut};
use super::*;
pub struct XSmartPointer<'a, T> {
pub(crate) struct XSmartPointer<'a, T> {
xconn: &'a XConnection,
pub ptr: *mut T,
}

View file

@ -17,10 +17,12 @@ mod window_property;
mod wm;
pub use self::{
atom::*, client_msg::*, format::*, geometry::*, hint::*, icon::*, input::*, memory::*,
randr::*, window_property::*, wm::*,
atom::*, client_msg::*, format::*, geometry::*, hint::*, icon::*, input::*, randr::*,
window_property::*, wm::*,
};
pub(crate) use self::memory::*;
use std::{
mem::{self, MaybeUninit},
ops::BitAnd,
@ -48,7 +50,7 @@ where
}
#[must_use = "This request was made asynchronously, and is still in the output buffer. You must explicitly choose to either `.flush()` (empty the output buffer, sending the request now) or `.queue()` (wait to send the request, allowing you to continue to add more requests without additional round-trips). For more information, see the documentation for `util::flush_requests`."]
pub struct Flusher<'a> {
pub(crate) struct Flusher<'a> {
xconn: &'a XConnection,
}

View file

@ -26,13 +26,13 @@ pub enum Modifier {
}
#[derive(Debug, Default)]
pub struct ModifierKeymap {
pub(crate) struct ModifierKeymap {
// Maps keycodes to modifiers
keys: HashMap<ffi::KeyCode, Modifier>,
}
#[derive(Clone, Debug, Default)]
pub struct ModifierKeyState {
pub(crate) struct ModifierKeyState {
// Contains currently pressed modifier keys and their corresponding modifiers
keys: HashMap<ffi::KeyCode, Modifier>,
state: ModifiersState,