Update with recovered code from VM binaries (Jan 1)
Recovered from decompiled OpenMaui.Controls.Linux.dll: - SkiaShell.cs: FlyoutHeader, FlyoutFooter, scroll support (918 -> 1325 lines) - X11Window.cs: Cursor support (XCreateFontCursor, XDefineCursor) - All handlers with dark mode support - All services with latest implementations - LinuxApplication with theme change handling
This commit is contained in:
@@ -1,55 +1,43 @@
|
||||
// Licensed to the .NET Foundation under one or more agreements.
|
||||
// The .NET Foundation licenses this file to you under the MIT license.
|
||||
|
||||
using System;
|
||||
using Microsoft.Maui.Handlers;
|
||||
using Microsoft.Maui.Graphics;
|
||||
using SkiaSharp;
|
||||
|
||||
namespace Microsoft.Maui.Platform.Linux.Handlers;
|
||||
|
||||
/// <summary>
|
||||
/// Handler for TabbedPage on Linux using Skia rendering.
|
||||
/// Maps ITabbedView interface to SkiaTabbedPage platform view.
|
||||
/// </summary>
|
||||
public partial class TabbedPageHandler : ViewHandler<ITabbedView, SkiaTabbedPage>
|
||||
public class TabbedPageHandler : ViewHandler<ITabbedView, SkiaTabbedPage>
|
||||
{
|
||||
public static IPropertyMapper<ITabbedView, TabbedPageHandler> Mapper = new PropertyMapper<ITabbedView, TabbedPageHandler>(ViewHandler.ViewMapper)
|
||||
{
|
||||
};
|
||||
public static IPropertyMapper<ITabbedView, TabbedPageHandler> Mapper = (IPropertyMapper<ITabbedView, TabbedPageHandler>)(object)new PropertyMapper<ITabbedView, TabbedPageHandler>((IPropertyMapper[])(object)new IPropertyMapper[1] { (IPropertyMapper)ViewHandler.ViewMapper });
|
||||
|
||||
public static CommandMapper<ITabbedView, TabbedPageHandler> CommandMapper = new(ViewHandler.ViewCommandMapper)
|
||||
{
|
||||
};
|
||||
public static CommandMapper<ITabbedView, TabbedPageHandler> CommandMapper = new CommandMapper<ITabbedView, TabbedPageHandler>((CommandMapper)(object)ViewHandler.ViewCommandMapper);
|
||||
|
||||
public TabbedPageHandler() : base(Mapper, CommandMapper)
|
||||
{
|
||||
}
|
||||
public TabbedPageHandler()
|
||||
: base((IPropertyMapper)(object)Mapper, (CommandMapper)(object)CommandMapper)
|
||||
{
|
||||
}
|
||||
|
||||
public TabbedPageHandler(IPropertyMapper? mapper, CommandMapper? commandMapper = null)
|
||||
: base(mapper ?? Mapper, commandMapper ?? CommandMapper)
|
||||
{
|
||||
}
|
||||
public TabbedPageHandler(IPropertyMapper? mapper, CommandMapper? commandMapper = null)
|
||||
: base((IPropertyMapper)(((object)mapper) ?? ((object)Mapper)), (CommandMapper)(((object)commandMapper) ?? ((object)CommandMapper)))
|
||||
{
|
||||
}
|
||||
|
||||
protected override SkiaTabbedPage CreatePlatformView()
|
||||
{
|
||||
return new SkiaTabbedPage();
|
||||
}
|
||||
protected override SkiaTabbedPage CreatePlatformView()
|
||||
{
|
||||
return new SkiaTabbedPage();
|
||||
}
|
||||
|
||||
protected override void ConnectHandler(SkiaTabbedPage platformView)
|
||||
{
|
||||
base.ConnectHandler(platformView);
|
||||
platformView.SelectedIndexChanged += OnSelectedIndexChanged;
|
||||
}
|
||||
protected override void ConnectHandler(SkiaTabbedPage platformView)
|
||||
{
|
||||
base.ConnectHandler(platformView);
|
||||
platformView.SelectedIndexChanged += OnSelectedIndexChanged;
|
||||
}
|
||||
|
||||
protected override void DisconnectHandler(SkiaTabbedPage platformView)
|
||||
{
|
||||
platformView.SelectedIndexChanged -= OnSelectedIndexChanged;
|
||||
platformView.ClearTabs();
|
||||
base.DisconnectHandler(platformView);
|
||||
}
|
||||
protected override void DisconnectHandler(SkiaTabbedPage platformView)
|
||||
{
|
||||
platformView.SelectedIndexChanged -= OnSelectedIndexChanged;
|
||||
platformView.ClearTabs();
|
||||
base.DisconnectHandler(platformView);
|
||||
}
|
||||
|
||||
private void OnSelectedIndexChanged(object? sender, EventArgs e)
|
||||
{
|
||||
// Notify the virtual view of selection change
|
||||
}
|
||||
private void OnSelectedIndexChanged(object? sender, EventArgs e)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user