Skip to content

Commit

Permalink
Fix CI issues
Browse files Browse the repository at this point in the history
Signed-off-by: John Nunley <[email protected]>
  • Loading branch information
notgull committed Sep 2, 2023
1 parent 4711c95 commit 62c92c2
Show file tree
Hide file tree
Showing 9 changed files with 37 additions and 35 deletions.
4 changes: 2 additions & 2 deletions src/android.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use core::ptr::NonNull;

/// Raw display handle for Android.
#[non_exhaustive]
#[derive(Debug, Clone, PartialEq)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct AndroidDisplayHandle {}

impl AndroidDisplayHandle {
Expand All @@ -23,7 +23,7 @@ impl AndroidDisplayHandle {

/// Raw window handle for Android NDK.
#[non_exhaustive]
#[derive(Debug, Clone, PartialEq)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct AndroidNdkWindowHandle {
/// A pointer to an `ANativeWindow`.
pub a_native_window: NonNull<c_void>,
Expand Down
4 changes: 2 additions & 2 deletions src/appkit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use core::ptr::NonNull;

/// Raw display handle for AppKit.
#[non_exhaustive]
#[derive(Debug, Clone, PartialEq)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct AppKitDisplayHandle {}

impl AppKitDisplayHandle {
Expand All @@ -23,7 +23,7 @@ impl AppKitDisplayHandle {

/// Raw window handle for AppKit.
#[non_exhaustive]
#[derive(Debug, Clone, PartialEq)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct AppKitWindowHandle {
/// A pointer to an `NSView` object.
pub ns_view: NonNull<c_void>,
Expand Down
4 changes: 2 additions & 2 deletions src/haiku.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use core::ptr::NonNull;

/// Raw display handle for Haiku.
#[non_exhaustive]
#[derive(Debug, Clone, PartialEq)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct HaikuDisplayHandle {}

impl HaikuDisplayHandle {
Expand All @@ -23,7 +23,7 @@ impl HaikuDisplayHandle {

/// Raw window handle for Haiku.
#[non_exhaustive]
#[derive(Debug, Clone, PartialEq)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct HaikuWindowHandle {
/// A pointer to a BWindow object
pub b_window: NonNull<c_void>,
Expand Down
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ unsafe impl<T: HasRawWindowHandle + ?Sized> HasRawWindowHandle for alloc::sync::
/// [`RawWindowHandle::Xlib`] on macOS, it would just be weird, and probably
/// requires something like XQuartz be used).
#[non_exhaustive]
#[derive(Debug, Clone, PartialEq)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub enum RawWindowHandle {
/// A raw window handle for UIKit (Apple's non-macOS windowing library).
///
Expand Down Expand Up @@ -291,7 +291,7 @@ unsafe impl<T: HasRawDisplayHandle + ?Sized> HasRawDisplayHandle for alloc::sync
/// [`RawDisplayHandle::Xlib`] on macOS, it would just be weird, and probably
/// requires something like XQuartz be used).
#[non_exhaustive]
#[derive(Debug, Clone, PartialEq)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub enum RawDisplayHandle {
/// A raw display handle for UIKit (Apple's non-macOS windowing library).
///
Expand Down
4 changes: 2 additions & 2 deletions src/redox.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use core::ptr::NonNull;

/// Raw display handle for the Redox operating system.
#[non_exhaustive]
#[derive(Debug, Clone, PartialEq)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct OrbitalDisplayHandle {}

impl OrbitalDisplayHandle {
Expand All @@ -23,7 +23,7 @@ impl OrbitalDisplayHandle {

/// Raw window handle for the Redox operating system.
#[non_exhaustive]
#[derive(Debug, Clone, PartialEq)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct OrbitalWindowHandle {
/// A pointer to an orbclient window.
// TODO(madsmtm): I think this is a file descriptor, so perhaps it should
Expand Down
4 changes: 2 additions & 2 deletions src/uikit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use core::ptr::NonNull;

/// Raw display handle for UIKit.
#[non_exhaustive]
#[derive(Debug, Clone, PartialEq)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct UiKitDisplayHandle {}

impl UiKitDisplayHandle {
Expand All @@ -23,7 +23,7 @@ impl UiKitDisplayHandle {

/// Raw window handle for UIKit.
#[non_exhaustive]
#[derive(Debug, Clone, PartialEq)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct UiKitWindowHandle {
/// A pointer to an `UIView` object.
pub ui_view: NonNull<c_void>,
Expand Down
20 changes: 10 additions & 10 deletions src/unix.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use core::ptr::NonNull;

/// Raw display handle for Xlib.
#[non_exhaustive]
#[derive(Debug, Clone, PartialEq)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct XlibDisplayHandle {
/// A pointer to an Xlib `Display`.
///
Expand Down Expand Up @@ -44,7 +44,7 @@ impl XlibDisplayHandle {

/// Raw window handle for Xlib.
#[non_exhaustive]
#[derive(Debug, Clone, PartialEq)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct XlibWindowHandle {
/// An Xlib `Window`.
pub window: c_ulong,
Expand Down Expand Up @@ -78,7 +78,7 @@ impl XlibWindowHandle {

/// Raw display handle for Xcb.
#[non_exhaustive]
#[derive(Debug, Clone, PartialEq)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct XcbDisplayHandle {
/// A pointer to an X server `xcb_connection_t`.
///
Expand Down Expand Up @@ -118,7 +118,7 @@ impl XcbDisplayHandle {

/// Raw window handle for Xcb.
#[non_exhaustive]
#[derive(Debug, Clone, PartialEq)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct XcbWindowHandle {
/// An X11 `xcb_window_t`.
pub window: NonZeroU32, // Based on xproto.h
Expand Down Expand Up @@ -152,7 +152,7 @@ impl XcbWindowHandle {

/// Raw display handle for Wayland.
#[non_exhaustive]
#[derive(Debug, Clone, PartialEq)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct WaylandDisplayHandle {
/// A pointer to a `wl_display`.
pub display: NonNull<c_void>,
Expand Down Expand Up @@ -180,7 +180,7 @@ impl WaylandDisplayHandle {

/// Raw window handle for Wayland.
#[non_exhaustive]
#[derive(Debug, Clone, PartialEq)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct WaylandWindowHandle {
/// A pointer to a `wl_surface`.
pub surface: NonNull<c_void>,
Expand Down Expand Up @@ -208,7 +208,7 @@ impl WaylandWindowHandle {

/// Raw display handle for the Linux Kernel Mode Set/Direct Rendering Manager.
#[non_exhaustive]
#[derive(Debug, Clone, PartialEq)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct DrmDisplayHandle {
/// The drm file descriptor.
// TODO: Use `std::os::fd::RawFd`?
Expand All @@ -235,7 +235,7 @@ impl DrmDisplayHandle {

/// Raw window handle for the Linux Kernel Mode Set/Direct Rendering Manager.
#[non_exhaustive]
#[derive(Debug, Clone, PartialEq)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct DrmWindowHandle {
/// The primary drm plane handle.
pub plane: u32,
Expand All @@ -261,7 +261,7 @@ impl DrmWindowHandle {

/// Raw display handle for the Linux Generic Buffer Manager.
#[non_exhaustive]
#[derive(Debug, Clone, PartialEq)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct GbmDisplayHandle {
/// The gbm device.
pub gbm_device: NonNull<c_void>,
Expand Down Expand Up @@ -289,7 +289,7 @@ impl GbmDisplayHandle {

/// Raw window handle for the Linux Generic Buffer Manager.
#[non_exhaustive]
#[derive(Debug, Clone, PartialEq)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct GbmWindowHandle {
/// The gbm surface.
pub gbm_surface: NonNull<c_void>,
Expand Down
22 changes: 12 additions & 10 deletions src/web.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use core::ptr::NonNull;

/// Raw display handle for the Web.
#[non_exhaustive]
#[derive(Debug, Clone, PartialEq)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct WebDisplayHandle {}

impl WebDisplayHandle {
Expand All @@ -23,7 +23,7 @@ impl WebDisplayHandle {

/// Raw window handle for the Web.
#[non_exhaustive]
#[derive(Debug, Clone, PartialEq)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct WebWindowHandle {
/// An ID value inserted into the [data attributes] of the canvas element as '`raw-handle`'.
///
Expand Down Expand Up @@ -56,16 +56,17 @@ impl WebWindowHandle {
///
/// ## Construction
/// ```no_run
/// # use raw_window_handle::{Wbg02CanvasWindowHandle, Wbg02Object};
/// # fn get_canvas() -> Wbg02Object { unimplemented!() }
/// let obj: Wbg02Object = get_canvas();
/// # use raw_window_handle::Wbg02CanvasWindowHandle;
/// # use core::{ffi::c_void, ptr::NonNull};
/// # fn get_canvas() -> NonNull<c_void> { unimplemented!() }
/// let obj: NonNull<c_void> = get_canvas();
/// let mut window_handle = Wbg02CanvasWindowHandle::new(obj);
/// /* set fields */
/// ```
///
/// [`wasm-bindgen`]: https://crates.io/crates/wasm-bindgen
#[non_exhaustive]
#[derive(Debug, Clone, PartialEq)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct Wbg02CanvasWindowHandle {
/// The object representing the [`HtmlCanvasElement`].
///
Expand Down Expand Up @@ -133,16 +134,17 @@ impl Wbg02CanvasWindowHandle {
///
/// ## Construction
/// ```no_run
/// # use raw_window_handle::{Wbg02OffscreenCanvasWindowHandle, Wbg02Object};
/// # fn get_offscreen_canvas() -> Wbg02Object { unimplemented!() }
/// let obj: Wbg02Object = get_offscreen_canvas();
/// # use raw_window_handle::Wbg02OffscreenCanvasWindowHandle;
/// # use core::{ffi::c_void, ptr::NonNull};
/// # fn get_offscreen_canvas() -> NonNull<c_void> { unimplemented!() }
/// let obj: NonNull<c_void> = get_offscreen_canvas();
/// let mut window_handle = Wbg02OffscreenCanvasWindowHandle::new(obj);
/// /* set fields */
/// ```
///
/// [`wasm-bindgen`]: https://crates.io/crates/wasm-bindgen
#[non_exhaustive]
#[derive(Debug, Clone, PartialEq)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct Wbg02OffscreenCanvasWindowHandle {
/// The object representing the [`OffscreenCanvas`].
///
Expand Down
6 changes: 3 additions & 3 deletions src/windows.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use core::ptr::NonNull;
///
/// It can be used regardless of Windows window backend.
#[non_exhaustive]
#[derive(Debug, Clone, PartialEq)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct WindowsDisplayHandle {}

impl WindowsDisplayHandle {
Expand All @@ -26,7 +26,7 @@ impl WindowsDisplayHandle {

/// Raw window handle for Win32.
#[non_exhaustive]
#[derive(Debug, Clone, PartialEq)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct Win32WindowHandle {
/// A Win32 `HWND` handle.
pub hwnd: NonZeroIsize,
Expand Down Expand Up @@ -64,7 +64,7 @@ impl Win32WindowHandle {

/// Raw window handle for WinRT.
#[non_exhaustive]
#[derive(Debug, Clone, PartialEq)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct WinRtWindowHandle {
/// A WinRT `CoreWindow` handle.
pub core_window: NonNull<c_void>,
Expand Down

0 comments on commit 62c92c2

Please sign in to comment.