Skip to content

Commit

Permalink
Fix type hint reference for xlib hook
Browse files Browse the repository at this point in the history
  • Loading branch information
kchibisov authored Jul 26, 2022
1 parent 5a0bad1 commit 4fd52af
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/platform/unix.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,11 @@ pub use crate::platform_impl::{x11::util::WindowType as XWindowType, XNotSupport
#[cfg(feature = "wayland")]
pub use crate::window::Theme;

/// The first argument in the provided hook will be the pointer to XDisplay
/// and the second one the pointer to XError. The return `bool` is an indicator
/// whether error was handled by the callback.
/// The first argument in the provided hook will be the pointer to `XDisplay`
/// and the second one the pointer to [`XErrorEvent`]. The returned `bool` is an
/// indicator whether the error was handled by the callback.
///
/// [`XErrorEvent`]: https://linux.die.net/man/3/xerrorevent
#[cfg(feature = "x11")]
pub type XlibErrorHook =
Box<dyn Fn(*mut std::ffi::c_void, *mut std::ffi::c_void) -> bool + Send + Sync>;
Expand Down

0 comments on commit 4fd52af

Please sign in to comment.