Remove xlib_xconnection from public interface
This commit is contained in:
parent
4b22ca8daf
commit
490abcad14
16 changed files with 56 additions and 104 deletions
|
|
@ -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(|| {
|
||||
(
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue