pub struct AtlThunk { /* private fields */ }Expand description
Rust wrapper of ATL thunk type. It is used as a window procedure with associated data.
Implementations§
Source§impl AtlThunk
impl AtlThunk
Sourcepub fn try_new() -> Result<Self>
pub fn try_new() -> Result<Self>
Creates a new AtlThunk object. For more information, see document for
AtlThunk_AllocateData.
Sourcepub fn try_new_with(
window_procedure: unsafe extern "system" fn(HWND, u32, WPARAM, LPARAM) -> LRESULT,
first_parameter: HWND,
) -> Result<Self>
pub fn try_new_with( window_procedure: unsafe extern "system" fn(HWND, u32, WPARAM, LPARAM) -> LRESULT, first_parameter: HWND, ) -> Result<Self>
Creates a new AtlThunk object from specified window procedure and associated first parameter value. For more
information, see document for
AtlThunk_AllocateData
and
AtlThunk_InitData.
Sourcepub fn as_window_procedure(
&self,
) -> unsafe extern "system" fn(HWND, u32, WPARAM, LPARAM) -> LRESULT
pub fn as_window_procedure( &self, ) -> unsafe extern "system" fn(HWND, u32, WPARAM, LPARAM) -> LRESULT
Returns a wrapped window procedure. The returned function pointer is only valid if the following conditions are met:
- Associated data has been set through either
AtlThunk::try_new_withorAtlThunk::set_data. - The originating
AtlThunkobject has not been dropped. - There is no concurrent
AtlThunk::set_dataoperating on the originatingAtlThunkobject.
For more information, see document for
AtlThunk_DataToCode.
Trait Implementations§
Source§impl Drop for AtlThunk
impl Drop for AtlThunk
Source§fn drop(&mut self)
fn drop(&mut self)
For more information, see document for
AtlThunk_FreeData.
impl Send for AtlThunk
impl Sync for AtlThunk
Auto Trait Implementations§
impl Freeze for AtlThunk
impl RefUnwindSafe for AtlThunk
impl Unpin for AtlThunk
impl UnwindSafe for AtlThunk
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more