mirror of
https://github.com/italicsjenga/winit-sonoma-fix.git
synced 2024-12-25 06:41:31 +11:00
commit
bbf037a4a3
1
build.rs
1
build.rs
|
@ -1,4 +1,3 @@
|
||||||
#![feature(path)]
|
|
||||||
extern crate gl_generator;
|
extern crate gl_generator;
|
||||||
extern crate khronos_api;
|
extern crate khronos_api;
|
||||||
|
|
||||||
|
|
|
@ -211,7 +211,9 @@ pub struct PixelFormat {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Attributes
|
/// Attributes
|
||||||
struct BuilderAttribs<'a> {
|
// FIXME: remove `pub` (https://github.com/rust-lang/rust/issues/23585)
|
||||||
|
#[doc(hidden)]
|
||||||
|
pub struct BuilderAttribs<'a> {
|
||||||
#[allow(dead_code)]
|
#[allow(dead_code)]
|
||||||
headless: bool,
|
headless: bool,
|
||||||
strict: bool,
|
strict: bool,
|
||||||
|
|
|
@ -36,8 +36,9 @@ fn send_event(input_window: winapi::HWND, event: Event) {
|
||||||
/// This is the callback that is called by `DispatchMessage` in the events loop.
|
/// This is the callback that is called by `DispatchMessage` in the events loop.
|
||||||
///
|
///
|
||||||
/// Returning 0 tells the Win32 API that the message has been processed.
|
/// Returning 0 tells the Win32 API that the message has been processed.
|
||||||
pub extern "system" fn callback(window: winapi::HWND, msg: winapi::UINT,
|
pub unsafe extern "system" fn callback(window: winapi::HWND, msg: winapi::UINT,
|
||||||
wparam: winapi::WPARAM, lparam: winapi::LPARAM) -> winapi::LRESULT
|
wparam: winapi::WPARAM, lparam: winapi::LPARAM)
|
||||||
|
-> winapi::LRESULT
|
||||||
{
|
{
|
||||||
match msg {
|
match msg {
|
||||||
winapi::WM_DESTROY => {
|
winapi::WM_DESTROY => {
|
||||||
|
|
|
@ -49,7 +49,9 @@ unsafe impl Send for Window {}
|
||||||
unsafe impl Sync for Window {}
|
unsafe impl Sync for Window {}
|
||||||
|
|
||||||
/// A simple wrapper that destroys the context when it is destroyed.
|
/// A simple wrapper that destroys the context when it is destroyed.
|
||||||
struct ContextWrapper(pub winapi::HGLRC);
|
// FIXME: remove `pub` (https://github.com/rust-lang/rust/issues/23585)
|
||||||
|
#[doc(hidden)]
|
||||||
|
pub struct ContextWrapper(pub winapi::HGLRC);
|
||||||
|
|
||||||
impl Drop for ContextWrapper {
|
impl Drop for ContextWrapper {
|
||||||
fn drop(&mut self) {
|
fn drop(&mut self) {
|
||||||
|
@ -60,7 +62,9 @@ impl Drop for ContextWrapper {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// A simple wrapper that destroys the window when it is destroyed.
|
/// A simple wrapper that destroys the window when it is destroyed.
|
||||||
struct WindowWrapper(pub winapi::HWND, pub winapi::HDC);
|
// FIXME: remove `pub` (https://github.com/rust-lang/rust/issues/23585)
|
||||||
|
#[doc(hidden)]
|
||||||
|
pub struct WindowWrapper(pub winapi::HWND, pub winapi::HDC);
|
||||||
|
|
||||||
impl Drop for WindowWrapper {
|
impl Drop for WindowWrapper {
|
||||||
fn drop(&mut self) {
|
fn drop(&mut self) {
|
||||||
|
|
Loading…
Reference in a new issue