Skip to content

Commit

Permalink
merge
Browse files Browse the repository at this point in the history
  • Loading branch information
kennykerr committed Dec 13, 2024
1 parent e5dd8c1 commit 880d882
Showing 1 changed file with 23 additions and 14 deletions.
37 changes: 23 additions & 14 deletions crates/tests/winrt/events/src/bindings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -232,27 +232,33 @@ impl IClassStatics_Vtbl {
value: i32,
result__: *mut i32,
) -> windows_core::HRESULT {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IClassStatics_Impl::StaticSignal(this, value) {
Ok(ok__) => {
result__.write(core::mem::transmute_copy(&ok__));
windows_core::HRESULT(0)
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IClassStatics_Impl::StaticSignal(this, value) {
Ok(ok__) => {
result__.write(core::mem::transmute_copy(&ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
Err(err) => err.into(),
}
}
unsafe extern "system" fn StaticEvent<Identity: IClassStatics_Impl, const OFFSET: isize>(
this: *mut core::ffi::c_void,
handler: *mut core::ffi::c_void,
result__: *mut i64,
) -> windows_core::HRESULT {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IClassStatics_Impl::StaticEvent(this, core::mem::transmute_copy(&handler)) {
Ok(ok__) => {
result__.write(core::mem::transmute_copy(&ok__));
windows_core::HRESULT(0)
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
match IClassStatics_Impl::StaticEvent(this, core::mem::transmute_copy(&handler)) {
Ok(ok__) => {
result__.write(core::mem::transmute_copy(&ok__));
windows_core::HRESULT(0)
}
Err(err) => err.into(),
}
Err(err) => err.into(),
}
}
unsafe extern "system" fn RemoveStaticEvent<
Expand All @@ -262,8 +268,11 @@ impl IClassStatics_Vtbl {
this: *mut core::ffi::c_void,
token: i64,
) -> windows_core::HRESULT {
let this: &Identity = &*((this as *const *const ()).offset(OFFSET) as *const Identity);
IClassStatics_Impl::RemoveStaticEvent(this, token).into()
unsafe {
let this: &Identity =
&*((this as *const *const ()).offset(OFFSET) as *const Identity);
IClassStatics_Impl::RemoveStaticEvent(this, token).into()
}
}
Self {
base__: windows_core::IInspectable_Vtbl::new::<Identity, IClassStatics, OFFSET>(),
Expand Down

0 comments on commit 880d882

Please sign in to comment.