remove unused code from windows backend
This commit is contained in:
parent
7ff31ea6f7
commit
cd0d5215d0
|
@ -3,11 +3,11 @@ use winapi::shared::minwindef::{ATOM, FALSE, LPARAM, LRESULT, UINT, WPARAM};
|
||||||
use winapi::shared::windef::{HWND, RECT};
|
use winapi::shared::windef::{HWND, RECT};
|
||||||
use winapi::um::combaseapi::CoCreateGuid;
|
use winapi::um::combaseapi::CoCreateGuid;
|
||||||
use winapi::um::winuser::{
|
use winapi::um::winuser::{
|
||||||
AdjustWindowRectEx, CreateWindowExA, DefWindowProcA, DestroyWindow, DispatchMessageA,
|
AdjustWindowRectEx, CreateWindowExA, DefWindowProcA, DispatchMessageA,
|
||||||
GetMessageA, GetWindowLongPtrA, MessageBoxA, PostMessageA, RegisterClassA, SetTimer,
|
GetMessageA, GetWindowLongPtrA, PostMessageA, RegisterClassA, SetTimer,
|
||||||
SetWindowLongPtrA, TranslateMessage, UnregisterClassA, LoadCursorW,
|
SetWindowLongPtrA, TranslateMessage, UnregisterClassA, LoadCursorW,
|
||||||
CS_OWNDC, GWLP_USERDATA, MB_ICONERROR, IDC_ARROW,
|
CS_OWNDC, GWLP_USERDATA, IDC_ARROW,
|
||||||
MB_OK, MB_TOPMOST, MSG, WM_CLOSE, WM_CREATE, WM_MOUSEMOVE, WM_PAINT, WM_SHOWWINDOW, WM_TIMER,
|
MSG, WM_CLOSE, WM_CREATE, WM_MOUSEMOVE, WM_SHOWWINDOW, WM_TIMER,
|
||||||
WNDCLASSA, WS_CAPTION, WS_CHILD, WS_CLIPSIBLINGS, WS_MAXIMIZEBOX, WS_MINIMIZEBOX,
|
WNDCLASSA, WS_CAPTION, WS_CHILD, WS_CLIPSIBLINGS, WS_MAXIMIZEBOX, WS_MINIMIZEBOX,
|
||||||
WS_POPUPWINDOW, WS_SIZEBOX, WS_VISIBLE, WM_DPICHANGED, WM_CHAR, WM_SYSCHAR, WM_KEYDOWN,
|
WS_POPUPWINDOW, WS_SIZEBOX, WS_VISIBLE, WM_DPICHANGED, WM_CHAR, WM_SYSCHAR, WM_KEYDOWN,
|
||||||
WM_SYSKEYDOWN, WM_KEYUP, WM_SYSKEYUP, WM_INPUTLANGCHANGE,
|
WM_SYSKEYDOWN, WM_KEYUP, WM_SYSKEYUP, WM_INPUTLANGCHANGE,
|
||||||
|
@ -18,7 +18,6 @@ use winapi::um::winuser::{
|
||||||
use std::cell::RefCell;
|
use std::cell::RefCell;
|
||||||
use std::ffi::{CString, c_void};
|
use std::ffi::{CString, c_void};
|
||||||
use std::ptr::null_mut;
|
use std::ptr::null_mut;
|
||||||
use std::rc::Rc;
|
|
||||||
|
|
||||||
use raw_window_handle::{
|
use raw_window_handle::{
|
||||||
windows::WindowsHandle,
|
windows::WindowsHandle,
|
||||||
|
@ -27,19 +26,12 @@ use raw_window_handle::{
|
||||||
};
|
};
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
Event, MouseButton, MouseEvent, Parent::WithParent, ScrollDelta, WindowEvent,
|
Event, MouseButton, MouseEvent, Parent::WithParent, WindowEvent,
|
||||||
WindowHandler, WindowInfo, WindowOpenOptions, WindowScalePolicy, Size, Point, PhySize, PhyPoint,
|
WindowHandler, WindowInfo, WindowOpenOptions, WindowScalePolicy, PhyPoint,
|
||||||
};
|
};
|
||||||
|
|
||||||
use super::keyboard::KeyboardState;
|
use super::keyboard::KeyboardState;
|
||||||
|
|
||||||
|
|
||||||
unsafe fn message_box(title: &str, msg: &str) {
|
|
||||||
let title = (title.to_owned() + "\0").as_ptr() as *const i8;
|
|
||||||
let msg = (msg.to_owned() + "\0").as_ptr() as *const i8;
|
|
||||||
MessageBoxA(null_mut(), msg, title, MB_ICONERROR | MB_OK | MB_TOPMOST);
|
|
||||||
}
|
|
||||||
|
|
||||||
unsafe fn generate_guid() -> String {
|
unsafe fn generate_guid() -> String {
|
||||||
let mut guid: GUID = std::mem::zeroed();
|
let mut guid: GUID = std::mem::zeroed();
|
||||||
CoCreateGuid(&mut guid);
|
CoCreateGuid(&mut guid);
|
||||||
|
|
Loading…
Reference in a new issue