use crate::co;
use crate::prelude::*;
#[derive(Clone, Copy, Debug)]
pub struct WndMsg {
pub msg_id: co::WM,
pub wparam: usize,
pub lparam: isize,
}
impl MsgSend for WndMsg {
type RetType = isize;
unsafe fn isize_to_ret(&self, v: isize) -> Self::RetType {
v
}
fn as_generic_wm(&mut self) -> Self {
*self
}
}
impl MsgSendRecv for WndMsg {
unsafe fn from_generic_wm(p: Self) -> Self {
p
}
}
impl WndMsg {
#[must_use]
pub const fn new(msg_id: co::WM, wparam: usize, lparam: isize) -> WndMsg {
Self { msg_id, wparam, lparam }
}
}