Skip to content

Commit

Permalink
feat: Add AppWindowChangedEventArgs
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinZikmund committed Feb 28, 2024
1 parent e0c850b commit 8408032
Show file tree
Hide file tree
Showing 2 changed files with 77 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@
#pragma warning disable 114 // new keyword hiding
namespace Microsoft.UI.Windowing
{
#if __ANDROID__ || __IOS__ || IS_UNIT_TESTS || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__ || __MACOS__
#if false
[global::Uno.NotImplemented]
#endif
public partial class AppWindowChangedEventArgs
{
#if __ANDROID__ || __IOS__ || IS_UNIT_TESTS || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__ || __MACOS__
#if false
internal AppWindowChangedEventArgs()
{
}
#endif
#if __ANDROID__ || __IOS__ || IS_UNIT_TESTS || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__ || __MACOS__
#if false
[global::Uno.NotImplemented("__ANDROID__", "__IOS__", "IS_UNIT_TESTS", "__WASM__", "__SKIA__", "__NETSTD_REFERENCE__", "__MACOS__")]
public bool DidPositionChange
{
Expand All @@ -23,7 +23,7 @@ public bool DidPositionChange
}
}
#endif
#if __ANDROID__ || __IOS__ || IS_UNIT_TESTS || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__ || __MACOS__
#if false
[global::Uno.NotImplemented("__ANDROID__", "__IOS__", "IS_UNIT_TESTS", "__WASM__", "__SKIA__", "__NETSTD_REFERENCE__", "__MACOS__")]
public bool DidPresenterChange
{
Expand All @@ -33,7 +33,7 @@ public bool DidPresenterChange
}
}
#endif
#if __ANDROID__ || __IOS__ || IS_UNIT_TESTS || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__ || __MACOS__
#if false
[global::Uno.NotImplemented("__ANDROID__", "__IOS__", "IS_UNIT_TESTS", "__WASM__", "__SKIA__", "__NETSTD_REFERENCE__", "__MACOS__")]
public bool DidSizeChange
{
Expand All @@ -43,7 +43,7 @@ public bool DidSizeChange
}
}
#endif
#if __ANDROID__ || __IOS__ || IS_UNIT_TESTS || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__ || __MACOS__
#if false
[global::Uno.NotImplemented("__ANDROID__", "__IOS__", "IS_UNIT_TESTS", "__WASM__", "__SKIA__", "__NETSTD_REFERENCE__", "__MACOS__")]
public bool DidVisibilityChange
{
Expand All @@ -53,7 +53,7 @@ public bool DidVisibilityChange
}
}
#endif
#if __ANDROID__ || __IOS__ || IS_UNIT_TESTS || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__ || __MACOS__
#if false
[global::Uno.NotImplemented("__ANDROID__", "__IOS__", "IS_UNIT_TESTS", "__WASM__", "__SKIA__", "__NETSTD_REFERENCE__", "__MACOS__")]
public bool DidZOrderChange
{
Expand All @@ -63,7 +63,7 @@ public bool DidZOrderChange
}
}
#endif
#if __ANDROID__ || __IOS__ || IS_UNIT_TESTS || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__ || __MACOS__
#if false
[global::Uno.NotImplemented("__ANDROID__", "__IOS__", "IS_UNIT_TESTS", "__WASM__", "__SKIA__", "__NETSTD_REFERENCE__", "__MACOS__")]
public bool IsZOrderAtBottom
{
Expand All @@ -73,7 +73,7 @@ public bool IsZOrderAtBottom
}
}
#endif
#if __ANDROID__ || __IOS__ || IS_UNIT_TESTS || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__ || __MACOS__
#if false
[global::Uno.NotImplemented("__ANDROID__", "__IOS__", "IS_UNIT_TESTS", "__WASM__", "__SKIA__", "__NETSTD_REFERENCE__", "__MACOS__")]
public bool IsZOrderAtTop
{
Expand All @@ -83,7 +83,7 @@ public bool IsZOrderAtTop
}
}
#endif
#if __ANDROID__ || __IOS__ || IS_UNIT_TESTS || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__ || __MACOS__
#if false
[global::Uno.NotImplemented("__ANDROID__", "__IOS__", "IS_UNIT_TESTS", "__WASM__", "__SKIA__", "__NETSTD_REFERENCE__", "__MACOS__")]
public global::Microsoft.UI.WindowId ZOrderBelowWindowId
{
Expand Down
67 changes: 67 additions & 0 deletions src/Uno.UWP/Microsoft/UI/Windowing/AppWindowChangedEventArgs.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
namespace Microsoft.UI.Windowing;

/// <summary>
/// Provides data for the AppWindow.Changed event.
/// </summary>
public partial class AppWindowChangedEventArgs
{
internal AppWindowChangedEventArgs(
bool didPositionChange,
bool didPresenterChange,
bool didSizeChange,
bool didVisibilityChange,
bool didZOrderChange,
bool isZOrderAtBottom,
bool isZOrderAtTop,
WindowId zOrderBelowWindowId)
{
DidPositionChange = didPositionChange;
DidPresenterChange = didPresenterChange;
DidSizeChange = didSizeChange;
DidVisibilityChange = didVisibilityChange;
DidZOrderChange = didZOrderChange;
IsZOrderAtBottom = isZOrderAtBottom;
IsZOrderAtTop = isZOrderAtTop;
ZOrderBelowWindowId = zOrderBelowWindowId;
}

/// <summary>
/// Gets a value that indicates whether the AppWindow.Position property changed.
/// </summary>
public bool DidPositionChange { get; }

/// <summary>
/// Gets a value that indicates whether the AppWindow.Presenter property changed.
/// </summary>
public bool DidPresenterChange { get; }

/// <summary>
/// Gets a value that indicates whether the AppWindow.Size property changed.
/// </summary>
public bool DidSizeChange { get; }

/// <summary>
/// Gets a value that indicates whether the AppWindow.IsVisible property changed.
/// </summary>
public bool DidVisibilityChange { get; }

/// <summary>
/// Gets a value that indicates whether the window's position in the Z-order changed.
/// </summary>
public bool DidZOrderChange { get; }

/// <summary>
/// Gets a value that indicates whether the window is now at the bottom of the Z-order.
/// </summary>
public bool IsZOrderAtBottom { get; }

/// <summary>
/// Gets a value that indicates whether the window is now at the top of the Z-order.
/// </summary>
public bool IsZOrderAtTop { get; }

/// <summary>
/// Gets the ID of the window directly above this window in Z-order, if Z-order changed and this window is not the top window.
/// </summary>
public WindowId ZOrderBelowWindowId { get; }
}

0 comments on commit 8408032

Please sign in to comment.