Skip to content

Commit

Permalink
Remap the Win32 definition of EventRegistrationToken (#3445)
Browse files Browse the repository at this point in the history
  • Loading branch information
kennykerr authored Jan 15, 2025
1 parent 94e56c9 commit 0a2c0b9
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 10 deletions.
2 changes: 2 additions & 0 deletions crates/libs/bindgen/src/type_name.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ impl TypeName {

pub const HResult: Self = Self("Windows.Foundation", "HResult");
pub const EventRegistrationToken: Self = Self("Windows.Foundation", "EventRegistrationToken");
pub const EventRegistrationToken2: Self =
Self("Windows.Win32.System.WinRT", "EventRegistrationToken");

pub const IAsyncAction: Self = Self("Windows.Foundation", "IAsyncAction");
pub const IAsyncActionWithProgress: Self =
Expand Down
1 change: 1 addition & 0 deletions crates/libs/bindgen/src/types/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ impl Type {
TypeName::IUnknown => Remap::Type(Self::IUnknown),
TypeName::Type => Remap::Type(Self::Type),
TypeName::EventRegistrationToken => Remap::Type(Type::I64),
TypeName::EventRegistrationToken2 => Remap::Type(Type::I64),

TypeName::D2D_MATRIX_3X2_F => Remap::Name(TypeName::Matrix3x2),
TypeName::D3DMATRIX => Remap::Name(TypeName::Matrix4x4),
Expand Down
10 changes: 0 additions & 10 deletions crates/libs/windows/src/Windows/Win32/System/WinRT/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -560,16 +560,6 @@ impl Default for DispatcherQueueOptions {
unsafe { core::mem::zeroed() }
}
}
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct EventRegistrationToken {
pub value: i64,
}
impl Default for EventRegistrationToken {
fn default() -> Self {
unsafe { core::mem::zeroed() }
}
}
pub const FullTrust: TrustLevel = TrustLevel(2i32);
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
Expand Down

0 comments on commit 0a2c0b9

Please sign in to comment.