-
Notifications
You must be signed in to change notification settings - Fork 405
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Implements tizen platform * Apply review comment * Update src/CommunityToolkit.Maui/Alerts/Snackbar/Snackbar.tizen.cs * Update src/CommunityToolkit.Maui/Alerts/Snackbar/Snackbar.tizen.cs * Update src/CommunityToolkit.Maui/Alerts/Snackbar/Snackbar.tizen.cs * Update src/CommunityToolkit.Maui/Alerts/Snackbar/Snackbar.tizen.cs Co-authored-by: Pedro Jesus <pedrojesus.cefet@gmail.com> * Apply review comment * attempt to use 6.0.300 * 6.0.400 * 6.0.424 * 486 * 540 * Update azure-pipelines.yml * Formatting Updates * Add * Remove duplicate enums * Fix variable conflicts * Defer to thread pool thread * Fix MauiPopup anchor position * Apply review comment * Fix GetImageStream without await * Add UnsupportedOSPlatform attribute on unsupported behaviors Co-authored-by: Vladislav Antonyuk <33021114+VladislavAntonyuk@users.noreply.github.com> Co-authored-by: Pedro Jesus <pedrojesus.cefet@gmail.com> Co-authored-by: Brandon Minnick <13558917+brminnick@users.noreply.github.com> Co-authored-by: Jay Cho <chojoong@gmail.com>
- Loading branch information
1 parent
1ea488c
commit e80192b
Showing
27 changed files
with
901 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
samples/CommunityToolkit.Maui.Sample/Platforms/Tizen/Main.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
using System; | ||
using Microsoft.Maui; | ||
using Microsoft.Maui.Hosting; | ||
|
||
namespace CommunityToolkit.Maui.Sample; | ||
|
||
class Program : MauiApplication | ||
{ | ||
protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp(); | ||
|
||
static void Main(string[] args) | ||
{ | ||
var app = new Program(); | ||
app.Run(args); | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
samples/CommunityToolkit.Maui.Sample/Platforms/Tizen/tizen-manifest.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<manifest package="maui-application-id-placeholder" version="0.0.0" api-version="7" xmlns="http://tizen.org/ns/packages"> | ||
<profile name="common" /> | ||
<ui-application appid="maui-application-id-placeholder" exec="CommunityToolkit.Maui.Sample.dll" multiple="false" nodisplay="false" taskmanage="true" type="dotnet" launch_mode="single"> | ||
<label>maui-application-title-placeholder</label> | ||
<icon>maui-appicon-placeholder</icon> | ||
<metadata key="http://tizen.org/metadata/prefer_dotnet_aot" value="true" /> | ||
</ui-application> | ||
<shortcut-list /> | ||
<privileges> | ||
<privilege>http://tizen.org/privilege/internet</privilege> | ||
</privileges> | ||
<dependencies /> | ||
<provides-appdefined-privileges /> | ||
</manifest> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
103 changes: 103 additions & 0 deletions
103
src/CommunityToolkit.Maui.Core/Handlers/Popup/PopupHandler.tizen.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
using CommunityToolkit.Maui.Core.Views; | ||
using Tizen.UIExtensions.NUI; | ||
|
||
namespace CommunityToolkit.Maui.Core.Handlers; | ||
|
||
public partial class PopupHandler : Microsoft.Maui.Handlers.ElementHandler<IPopup, MauiPopup> | ||
{ | ||
/// <summary> | ||
/// Action that's triggered when the Popup is closed. | ||
/// </summary> | ||
/// <param name="handler">An instance of <see cref="PopupHandler"/>.</param> | ||
/// <param name="view">An instance of <see cref="IPopup"/>.</param> | ||
/// <param name="result">The result that should return from this Popup.</param> | ||
public static void MapOnClosed(PopupHandler handler, IPopup view, object? result) | ||
{ | ||
var popup = handler.PlatformView; | ||
|
||
if (popup.IsOpen) | ||
{ | ||
popup.Close(); | ||
} | ||
|
||
handler.DisconnectHandler(popup); | ||
} | ||
|
||
/// <summary> | ||
/// Action that's triggered when the Popup is Opened. | ||
/// </summary> | ||
/// <param name="handler">An instance of <see cref="PopupHandler"/>.</param> | ||
/// <param name="view">An instance of <see cref="IPopup"/>.</param> | ||
/// <param name="result">We don't need to provide the result parameter here.</param> | ||
public static void MapOnOpened(PopupHandler handler, IPopup view, object? result) | ||
{ | ||
handler.PlatformView.ShowPopup(); | ||
} | ||
|
||
/// <summary> | ||
/// Action that's triggered when the Popup is dismissed by tapping outside of the Popup. | ||
/// </summary> | ||
/// <param name="handler">An instance of <see cref="PopupHandler"/>.</param> | ||
/// <param name="view">An instance of <see cref="IPopup"/>.</param> | ||
/// <param name="result">The result that should return from this Popup.</param> | ||
public static void MapOnDismissedByTappingOutsideOfPopup(PopupHandler handler, IPopup view, object? result) | ||
{ | ||
if (view.CanBeDismissedByTappingOutsideOfPopup) | ||
{ | ||
view.OnDismissedByTappingOutsideOfPopup(); | ||
} | ||
} | ||
|
||
/// <summary> | ||
/// Action that's triggered when the Popup <see cref="IPopup.Anchor"/> property changes. | ||
/// </summary> | ||
/// <param name="handler">An instance of <see cref="PopupHandler"/>.</param> | ||
/// <param name="view">An instance of <see cref="IPopup"/>.</param> | ||
public static void MapAnchor(PopupHandler handler, IPopup view) | ||
{ | ||
// On Tizen, Anchor only update when popup is opened | ||
} | ||
|
||
/// <summary> | ||
/// Action that's triggered when the Popup <see cref="IPopup.CanBeDismissedByTappingOutsideOfPopup"/> property changes. | ||
/// </summary> | ||
/// <param name="handler">An instance of <see cref="PopupHandler"/>.</param> | ||
/// <param name="view">An instance of <see cref="IPopup"/>.</param> | ||
public static void MapCanBeDismissedByTappingOutsideOfPopup(PopupHandler handler, IPopup view) | ||
{ | ||
// this property directly access on platform view | ||
} | ||
|
||
/// <summary> | ||
/// Action that's triggered when the Popup <see cref="IPopup.Color"/> property changes. | ||
/// </summary> | ||
/// <param name="handler">An instance of <see cref="PopupHandler"/>.</param> | ||
/// <param name="view">An instance of <see cref="IPopup"/>.</param> | ||
public static void MapColor(PopupHandler handler, IPopup view) | ||
{ | ||
// this property directly access on platform view | ||
} | ||
|
||
/// <summary> | ||
/// Action that's triggered when the Popup <see cref="IPopup.Size"/> property changes. | ||
/// </summary> | ||
/// <param name="handler">An instance of <see cref="PopupHandler"/>.</param> | ||
/// <param name="view">An instance of <see cref="IPopup"/>.</param> | ||
public static void MapSize(PopupHandler handler, IPopup view) | ||
{ | ||
handler.PlatformView.UpdateContentSize(); | ||
} | ||
|
||
/// <inheritdoc/> | ||
protected override void ConnectHandler(MauiPopup platformView) | ||
{ | ||
platformView.SetElement(VirtualView); | ||
} | ||
|
||
/// <inheritdoc/> | ||
protected override MauiPopup CreatePlatformElement() | ||
{ | ||
var mauiContext = MauiContext ?? throw new InvalidOperationException("${nameof(MauiContext)} cannot be null"); | ||
return new MauiPopup(mauiContext); | ||
} | ||
} |
18 changes: 18 additions & 0 deletions
18
src/CommunityToolkit.Maui.Core/Platform/StatusBar/StatusBar.tizen.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
using System.Runtime.Versioning; | ||
using Microsoft.Maui.Platform; | ||
|
||
namespace CommunityToolkit.Maui.Core.Platform; | ||
|
||
[UnsupportedOSPlatform("Tizen")] | ||
static partial class StatusBar | ||
{ | ||
static void PlatformSetColor(Color color) | ||
{ | ||
throw new NotSupportedException("Tizen does not currently support changing the status bar color"); | ||
} | ||
|
||
static void PlatformSetStyle(StatusBarStyle style) | ||
{ | ||
throw new NotSupportedException("Tizen does not currently support changing the status bar color"); | ||
} | ||
} |
Oops, something went wrong.