Skip to content

Commit

Permalink
feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
BenjaminBrienen committed Sep 22, 2024
1 parent 4cd85e1 commit b1108ee
Showing 1 changed file with 4 additions and 14 deletions.
18 changes: 4 additions & 14 deletions platforms/windows/src/window_handle.rs
Original file line number Diff line number Diff line change
@@ -1,21 +1,17 @@
use core::ffi::c_void;
// Copyright 2024 The AccessKit Authors. All rights reserved.
// Licensed under the Apache License, Version 2.0 (found in
// the LICENSE-APACHE file) or the MIT license (found in
// the LICENSE-MIT file), at your option.

use windows::Win32::Foundation::HWND;

// pub struct HWND(pub *mut core::ffi::c_void);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub struct WindowHandle(pub HWND);

unsafe impl Send for WindowHandle {}
unsafe impl Sync for WindowHandle {}

impl From<*mut c_void> for WindowHandle {
fn from(value: *mut c_void) -> Self {
Self(HWND(value))
}
}

impl From<HWND> for WindowHandle {
fn from(value: HWND) -> Self {
Self(value)
Expand All @@ -28,12 +24,6 @@ impl From<WindowHandle> for HWND {
}
}

impl Default for WindowHandle {
fn default() -> Self {
Self(Default::default())
}
}

mod tests {
use super::*;

Expand Down

0 comments on commit b1108ee

Please sign in to comment.