Skip to content

Commit

Permalink
Bump to latest
Browse files Browse the repository at this point in the history
- Apply to patch related to Animation (dotnet#1436)
- Apply to register Microsoft.Maui.Graphics Platforms (dotnet#1441)
- and so on.
  • Loading branch information
rookiejava authored and myroot committed Aug 25, 2022
1 parent 9a02642 commit 9c27d5d
Show file tree
Hide file tree
Showing 4 changed files with 73 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#nullable enable

using System;
using System.Threading.Tasks;

namespace Microsoft.Maui.Controls.Platform
{
internal partial class ModalNavigationService
{
public Task<Page> PopModalAsync(bool animated)
{
// TODO: Need to implementation
throw new NotImplementedException();
}

public Task PushModalAsync(Page modal, bool animated)
{
// TODO: Need to implementation
throw new NotImplementedException();
}
}
}
42 changes: 42 additions & 0 deletions src/Core/src/Animations/NativeTicker.Tizen.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
using System.Threading;
using Tizen.Applications;

namespace Microsoft.Maui.Animations
{
public class NativeTicker : Ticker
{
readonly Timer _timer;
readonly SynchronizationContext? _context;
bool _isRunning;

public override bool IsRunning => _isRunning;

public NativeTicker()
{
if (SynchronizationContext.Current == null)
{
TizenSynchronizationContext.Initialize();
}

_context = SynchronizationContext.Current;
_timer = new Timer((object o) => HandleElapsed(o), this, Timeout.Infinite, Timeout.Infinite);
}

public override void Start()
{
_timer.Change(16, 16);
_isRunning = true;
}

public override void Stop()
{
_timer.Change(-1, -1);
_isRunning = false;
}

void HandleElapsed(object state)
{
_context?.Post((o) => Fire?.Invoke(), null);
}
}
}
5 changes: 4 additions & 1 deletion src/Core/src/Platform/Tizen/MauiApplication.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,10 @@ protected override void OnPreCreate()

Services = _applicationContext.Services;

Current.Services?.InvokeLifecycleEvents<TizenLifecycle.OnPreCreate>(del => del(this));
if (Services == null)
throw new InvalidOperationException($"The {nameof(IServiceProvider)} instance was not found.");

Current.Services.InvokeLifecycleEvents<TizenLifecycle.OnPreCreate>(del => del(this));
}

protected override void OnCreate()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,5 +90,10 @@ public BitmapExportContext CreateBitmapExportContext(int width, int height, floa
{
return new SkiaBitmapExportContext(width, height, displayScale, 72, false);
}

public RectangleF GetPathBounds(PathF path)
{
return path.GetBoundsByFlattening();
}
}
}

0 comments on commit 9c27d5d

Please sign in to comment.