Skip to content

Commit

Permalink
feat: Add Microsoft.UI.Windowing enums
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinZikmund committed Feb 28, 2024
1 parent 30d3cb1 commit e0c850b
Show file tree
Hide file tree
Showing 14 changed files with 197 additions and 30 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,19 @@
#pragma warning disable 114 // new keyword hiding
namespace Microsoft.UI.Windowing
{
#if __ANDROID__ || __IOS__ || IS_UNIT_TESTS || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__ || __MACOS__
#if false
public enum AppWindowPresenterKind
{
#if __ANDROID__ || __IOS__ || IS_UNIT_TESTS || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__ || __MACOS__
#if false
Default = 0,
#endif
#if __ANDROID__ || __IOS__ || IS_UNIT_TESTS || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__ || __MACOS__
#if false
CompactOverlay = 1,
#endif
#if __ANDROID__ || __IOS__ || IS_UNIT_TESTS || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__ || __MACOS__
#if false
FullScreen = 2,
#endif
#if __ANDROID__ || __IOS__ || IS_UNIT_TESTS || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__ || __MACOS__
#if false
Overlapped = 3,
#endif
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@
#pragma warning disable 114 // new keyword hiding
namespace Microsoft.UI.Windowing
{
#if __ANDROID__ || __IOS__ || IS_UNIT_TESTS || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__ || __MACOS__
#if false
public enum CompactOverlaySize
{
#if __ANDROID__ || __IOS__ || IS_UNIT_TESTS || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__ || __MACOS__
#if false
Small = 0,
#endif
#if __ANDROID__ || __IOS__ || IS_UNIT_TESTS || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__ || __MACOS__
#if false
Medium = 1,
#endif
#if __ANDROID__ || __IOS__ || IS_UNIT_TESTS || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__ || __MACOS__
#if false
Large = 2,
#endif
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@
#pragma warning disable 114 // new keyword hiding
namespace Microsoft.UI.Windowing
{
#if __ANDROID__ || __IOS__ || IS_UNIT_TESTS || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__ || __MACOS__
#if false
public enum DisplayAreaFallback
{
#if __ANDROID__ || __IOS__ || IS_UNIT_TESTS || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__ || __MACOS__
#if false
None = 0,
#endif
#if __ANDROID__ || __IOS__ || IS_UNIT_TESTS || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__ || __MACOS__
#if false
Primary = 1,
#endif
#if __ANDROID__ || __IOS__ || IS_UNIT_TESTS || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__ || __MACOS__
#if false
Nearest = 2,
#endif
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,25 @@
#pragma warning disable 114 // new keyword hiding
namespace Microsoft.UI.Windowing
{
#if __ANDROID__ || __IOS__ || IS_UNIT_TESTS || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__ || __MACOS__
#if false
public enum DisplayAreaWatcherStatus
{
#if __ANDROID__ || __IOS__ || IS_UNIT_TESTS || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__ || __MACOS__
#if false
Created = 0,
#endif
#if __ANDROID__ || __IOS__ || IS_UNIT_TESTS || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__ || __MACOS__
#if false
Started = 1,
#endif
#if __ANDROID__ || __IOS__ || IS_UNIT_TESTS || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__ || __MACOS__
#if false
EnumerationCompleted = 2,
#endif
#if __ANDROID__ || __IOS__ || IS_UNIT_TESTS || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__ || __MACOS__
#if false
Stopping = 3,
#endif
#if __ANDROID__ || __IOS__ || IS_UNIT_TESTS || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__ || __MACOS__
#if false
Stopped = 4,
#endif
#if __ANDROID__ || __IOS__ || IS_UNIT_TESTS || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__ || __MACOS__
#if false
Aborted = 5,
#endif
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
#pragma warning disable 114 // new keyword hiding
namespace Microsoft.UI.Windowing
{
#if __ANDROID__ || __IOS__ || IS_UNIT_TESTS || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__ || __MACOS__
#if false
public enum IconShowOptions
{
#if __ANDROID__ || __IOS__ || IS_UNIT_TESTS || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__ || __MACOS__
#if false
ShowIconAndSystemMenu = 0,
#endif
#if __ANDROID__ || __IOS__ || IS_UNIT_TESTS || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__ || __MACOS__
#if false
HideIconAndSystemMenu = 1,
#endif
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@
#pragma warning disable 114 // new keyword hiding
namespace Microsoft.UI.Windowing
{
#if __ANDROID__ || __IOS__ || IS_UNIT_TESTS || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__ || __MACOS__
#if false
public enum OverlappedPresenterState
{
#if __ANDROID__ || __IOS__ || IS_UNIT_TESTS || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__ || __MACOS__
#if false
Maximized = 0,
#endif
#if __ANDROID__ || __IOS__ || IS_UNIT_TESTS || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__ || __MACOS__
#if false
Minimized = 1,
#endif
#if __ANDROID__ || __IOS__ || IS_UNIT_TESTS || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__ || __MACOS__
#if false
Restored = 2,
#endif
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
#pragma warning disable 114 // new keyword hiding
namespace Microsoft.UI.Windowing
{
#if __ANDROID__ || __IOS__ || IS_UNIT_TESTS || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__ || __MACOS__
#if false
public enum TitleBarHeightOption
{
#if __ANDROID__ || __IOS__ || IS_UNIT_TESTS || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__ || __MACOS__
#if false
Standard = 0,
#endif
#if __ANDROID__ || __IOS__ || IS_UNIT_TESTS || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__ || __MACOS__
#if false
Tall = 1,
#endif
}
Expand Down
27 changes: 27 additions & 0 deletions src/Uno.UWP/Microsoft/UI/Windowing/AppWindowPresenterKind.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
namespace Microsoft.UI.Windowing;

/// <summary>
/// Defines constants that specify the kind of presenter the app window uses.
/// </summary>
public enum AppWindowPresenterKind
{
/// <summary>
/// The app window uses the system default presenter.
/// </summary>
Default = 0,

/// <summary>
/// The app window uses a compact overlay (picture-in-picture) presenter.
/// </summary>
CompactOverlay = 1,

/// <summary>
/// The app window uses a full screen presenter.
/// </summary>
FullScreen = 2,

/// <summary>
/// The app window uses an overlapped presenter.
/// </summary>
Overlapped = 3,
}
22 changes: 22 additions & 0 deletions src/Uno.UWP/Microsoft/UI/Windowing/CompactOverlaySize.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
namespace Microsoft.UI.Windowing;

/// <summary>
/// Defines constants that specify the size of a window in CompactOverlay mode.
/// </summary>
public enum CompactOverlaySize
{
/// <summary>
/// Window size is approximately 5% of the display's work area.
/// </summary>
Small = 0,

/// <summary>
/// Window size is approximately 15% of the display's work area.
/// </summary>
Medium = 1,

/// <summary>
/// Window size is approximately 25% of the display's work area.
/// </summary>
Large = 2,
}
25 changes: 25 additions & 0 deletions src/Uno.UWP/Microsoft/UI/Windowing/DisplayAreaFallback.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
// <auto-generated>
#pragma warning disable 108 // new keyword hiding
#pragma warning disable 114 // new keyword hiding
namespace Microsoft.UI.Windowing;

/// <summary>
/// Defines constants that specify which DisplayArea to use if no DisplayArea intersects with the given parameter.
/// </summary>
public enum DisplayAreaFallback
{
/// <summary>
/// Do not use any DisplayArea; return null.
/// </summary>
None = 0,

/// <summary>
/// Use the primary DisplayArea.
/// </summary>
Primary = 1,

/// <summary>
/// Use the nearest DisplayArea.
/// </summary>
Nearest = 2,
}
37 changes: 37 additions & 0 deletions src/Uno.UWP/Microsoft/UI/Windowing/DisplayAreaWatcherStatus.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
namespace Microsoft.UI.Windowing;

/// <summary>
/// Defines constants that specify the status of a DisplayAreaWatcher.
/// </summary>
public enum DisplayAreaWatcherStatus
{
/// <summary>
/// The watcher has been created.
/// </summary>
Created = 0,

/// <summary>
/// The watcher has started.
/// </summary>
Started = 1,

/// <summary>
/// The watcher has finished enumerating the display areas.
/// </summary>
EnumerationCompleted = 2,

/// <summary>
/// The watcher is stopping.
/// </summary>
Stopping = 3,

/// <summary>
/// The watcher has stopped.
/// </summary>
Stopped = 4,

/// <summary>
/// The watcher has stopped before completing enumeration of display areas.
/// </summary>
Aborted = 5,
}
17 changes: 17 additions & 0 deletions src/Uno.UWP/Microsoft/UI/Windowing/IconShowOptions.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
namespace Microsoft.UI.Windowing;

/// <summary>
/// Defines constants that specify options for showing the window icon in the title bar.
/// </summary>
public enum IconShowOptions
{
/// <summary>
/// Show the icon and the system menu.
/// </summary>
ShowIconAndSystemMenu = 0,

/// <summary>
/// Hide the icon and system menu.
/// </summary>
HideIconAndSystemMenu = 1,
}
22 changes: 22 additions & 0 deletions src/Uno.UWP/Microsoft/UI/Windowing/OverlappedPresenterState.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
namespace Microsoft.UI.Windowing;

/// <summary>
/// Defines constants that specify the state of a window in overlapped mode.
/// </summary>
public enum OverlappedPresenterState
{
/// <summary>
/// The window is maximized.
/// </summary>
Maximized = 0,

/// <summary>
/// The window is minimized.
/// </summary>
Minimized = 1,

/// <summary>
/// The window is restored to the size and position it had before it was minimized or maximized.
/// </summary>
Restored = 2,
}
17 changes: 17 additions & 0 deletions src/Uno.UWP/Microsoft/UI/Windowing/TitleBarHeightOption.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
namespace Microsoft.UI.Windowing;

/// <summary>
/// Defines constants that specify the preferred height of an app window title bar.
/// </summary>
public enum TitleBarHeightOption
{
/// <summary>
/// Caption buttons and the default drag region are rendered at the standard height based on system metrics.
/// </summary>
Standard = 0,

/// <summary>
/// Caption buttons and the default drag region are rendered taller than the standard height based on system metrics.
/// </summary>
Tall = 1,
}

0 comments on commit e0c850b

Please sign in to comment.