diff --git a/Avalonia.sln b/Avalonia.sln
index 79829e8fdf..5dfd11b671 100644
--- a/Avalonia.sln
+++ b/Avalonia.sln
@@ -274,12 +274,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Avalonia.Headless.NUnit.Uni
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Avalonia.Headless.XUnit.UnitTests", "tests\Avalonia.Headless.XUnit.UnitTests\Avalonia.Headless.XUnit.UnitTests.csproj", "{F83FC908-A4E3-40DE-B4CF-A4BA1E92CDB3}"
EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tizen", "Tizen", "{D1300000-7217-4693-8B0F-57CBD5814302}"
-EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Avalonia.Tizen", "src\Tizen\Avalonia.Tizen\Avalonia.Tizen.csproj", "{DFFBDBF5-5DBE-47ED-9EAE-D40B75AC99E8}"
-EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ControlCatalog.Tizen", "samples\ControlCatalog.Tizen\ControlCatalog.Tizen.csproj", "{A0B29221-2B6F-4B29-A4D5-2227811B5915}"
-EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Avalonia.Metal", "src\Avalonia.Metal\Avalonia.Metal.csproj", "{60B4ED1F-ECFA-453B-8A70-1788261C8355}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Avalonia.Build.Tasks.UnitTest", "tests\Avalonia.Build.Tasks.UnitTest\Avalonia.Build.Tasks.UnitTest.csproj", "{B0FD6A48-FBAB-4676-B36A-DE76B0922B12}"
@@ -666,16 +660,6 @@ Global
{F83FC908-A4E3-40DE-B4CF-A4BA1E92CDB3}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F83FC908-A4E3-40DE-B4CF-A4BA1E92CDB3}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F83FC908-A4E3-40DE-B4CF-A4BA1E92CDB3}.Release|Any CPU.Build.0 = Release|Any CPU
- {DFFBDBF5-5DBE-47ED-9EAE-D40B75AC99E8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {DFFBDBF5-5DBE-47ED-9EAE-D40B75AC99E8}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {DFFBDBF5-5DBE-47ED-9EAE-D40B75AC99E8}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {DFFBDBF5-5DBE-47ED-9EAE-D40B75AC99E8}.Release|Any CPU.Build.0 = Release|Any CPU
- {A0B29221-2B6F-4B29-A4D5-2227811B5915}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {A0B29221-2B6F-4B29-A4D5-2227811B5915}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {A0B29221-2B6F-4B29-A4D5-2227811B5915}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
- {A0B29221-2B6F-4B29-A4D5-2227811B5915}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {A0B29221-2B6F-4B29-A4D5-2227811B5915}.Release|Any CPU.Build.0 = Release|Any CPU
- {A0B29221-2B6F-4B29-A4D5-2227811B5915}.Release|Any CPU.Deploy.0 = Release|Any CPU
{60B4ED1F-ECFA-453B-8A70-1788261C8355}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{60B4ED1F-ECFA-453B-8A70-1788261C8355}.Debug|Any CPU.Build.0 = Debug|Any CPU
{60B4ED1F-ECFA-453B-8A70-1788261C8355}.Release|Any CPU.ActiveCfg = Release|Any CPU
@@ -797,8 +781,6 @@ Global
{4B8EBBEB-A1AD-49EC-8B69-B93ED15BFA64} = {C5A00AC3-B34C-4564-9BDD-2DA473EF4D8B}
{2999D79E-3C20-4A90-B651-CA7E0AC92D35} = {C5A00AC3-B34C-4564-9BDD-2DA473EF4D8B}
{F83FC908-A4E3-40DE-B4CF-A4BA1E92CDB3} = {C5A00AC3-B34C-4564-9BDD-2DA473EF4D8B}
- {DFFBDBF5-5DBE-47ED-9EAE-D40B75AC99E8} = {D1300000-7217-4693-8B0F-57CBD5814302}
- {A0B29221-2B6F-4B29-A4D5-2227811B5915} = {9B9E3891-2366-4253-A952-D08BCEB71098}
{B0FD6A48-FBAB-4676-B36A-DE76B0922B12} = {C5A00AC3-B34C-4564-9BDD-2DA473EF4D8B}
{9D6AEF22-221F-4F4B-B335-A4BA510F002C} = {C5A00AC3-B34C-4564-9BDD-2DA473EF4D8B}
{5BF0C3B8-E595-4940-AB30-2DA206C2F085} = {9D6AEF22-221F-4F4B-B335-A4BA510F002C}
diff --git a/build/DevSingleProject.targets b/build/DevSingleProject.targets
index f6b9b54d02..6387123429 100644
--- a/build/DevSingleProject.targets
+++ b/build/DevSingleProject.targets
@@ -9,8 +9,6 @@
-
-
diff --git a/build/TargetFrameworks.props b/build/TargetFrameworks.props
index e48c9933f3..f14a3876ff 100644
--- a/build/TargetFrameworks.props
+++ b/build/TargetFrameworks.props
@@ -8,8 +8,6 @@
$(AvsCurrentTargetFramework)-ios17.0
$(AvsCurrentTargetFramework)-tvos17.0
$(AvsCurrentTargetFramework)-browser
- $(AvsCurrentTargetFramework)-tizen
- 8.0.155
net6.0
@@ -22,7 +20,6 @@
13.0
13.0
13.1
- 6.5
21.0
diff --git a/dirs.proj b/dirs.proj
index 3f5e8a3f25..43de2e0b55 100644
--- a/dirs.proj
+++ b/dirs.proj
@@ -14,7 +14,6 @@
-
@@ -23,11 +22,6 @@
-
-
-
-
-
diff --git a/packages/Avalonia/AvaloniaSingleProject.targets b/packages/Avalonia/AvaloniaSingleProject.targets
index 17b456f145..a776f12a7d 100644
--- a/packages/Avalonia/AvaloniaSingleProject.targets
+++ b/packages/Avalonia/AvaloniaSingleProject.targets
@@ -278,7 +278,7 @@
Include="$(TizenSharedPrefix)\**\*"
Exclude="$(DefaultItemExcludes);$(DefaultExcludesInProjectFolder);@(TizenTpkUserExcludeFiles)" />
-
+
diff --git a/samples/ControlCatalog.Tizen/ControlCatalog.Tizen.csproj b/samples/ControlCatalog.Tizen/ControlCatalog.Tizen.csproj
deleted file mode 100644
index 4b12a096d4..0000000000
--- a/samples/ControlCatalog.Tizen/ControlCatalog.Tizen.csproj
+++ /dev/null
@@ -1,25 +0,0 @@
-
-
-
- $(AvsCurrentTizenTargetFramework)
- Exe
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/samples/ControlCatalog.Tizen/EmbedSampleNuiTizen.cs b/samples/ControlCatalog.Tizen/EmbedSampleNuiTizen.cs
deleted file mode 100644
index 728ea58e3b..0000000000
--- a/samples/ControlCatalog.Tizen/EmbedSampleNuiTizen.cs
+++ /dev/null
@@ -1,41 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using Avalonia.Platform;
-using Avalonia.Tizen;
-using ControlCatalog.Pages;
-using Tizen.NUI.BaseComponents;
-using Tizen.NUI.Components;
-using Tizen.Pims.Contacts.ContactsViews;
-
-namespace ControlCatalog.Tizen;
-public class EmbedSampleNuiTizen : INativeDemoControl
-{
- public IPlatformHandle CreateControl(bool isSecond, IPlatformHandle parent, Func createDefault)
- {
- if (isSecond)
- {
- var webView = new WebView();
- webView.LoadUrl("https://avaloniaui.net/");
- return new NuiViewControlHandle(webView);
- }
- else
- {
- var clickCount = 0;
- var button = new Button
- {
- Text = "Hello world"
- };
-
- button.Clicked += (sender, e) =>
- {
- clickCount++;
- button.Text = $"Click count {clickCount}";
- };
-
- return new NuiViewControlHandle(button);
- }
- }
-}
diff --git a/samples/ControlCatalog.Tizen/Main.cs b/samples/ControlCatalog.Tizen/Main.cs
deleted file mode 100644
index 2d611ef5a3..0000000000
--- a/samples/ControlCatalog.Tizen/Main.cs
+++ /dev/null
@@ -1,23 +0,0 @@
-using System;
-using Avalonia;
-using Avalonia.Tizen;
-using ElmSharp;
-using SkiaSharp;
-using Tizen.Applications;
-
-namespace ControlCatalog.Tizen;
-
-class Program : NuiTizenApplication
-{
- protected override AppBuilder CustomizeAppBuilder(AppBuilder builder) =>
- base.CustomizeAppBuilder(builder).AfterSetup(_ =>
- {
- Pages.EmbedSample.Implementation = new EmbedSampleNuiTizen();
- });
-
- static void Main(string[] args)
- {
- var app = new Program();
- app.Run(args);
- }
-}
diff --git a/samples/ControlCatalog.Tizen/shared/res/Avalonia.png b/samples/ControlCatalog.Tizen/shared/res/Avalonia.png
deleted file mode 100644
index ea0bb4986f..0000000000
Binary files a/samples/ControlCatalog.Tizen/shared/res/Avalonia.png and /dev/null differ
diff --git a/samples/ControlCatalog.Tizen/tizen-manifest.xml b/samples/ControlCatalog.Tizen/tizen-manifest.xml
deleted file mode 100644
index 50101d37ff..0000000000
--- a/samples/ControlCatalog.Tizen/tizen-manifest.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-
-
-
-
-
- Avalonia.png
-
-
-
-
-
- http://tizen.org/privilege/appdir.shareddata
- http://tizen.org/privilege/appmanager.launch
- http://tizen.org/privilege/externalstorage
- http://tizen.org/privilege/externalstorage.appdata
- http://tizen.org/privilege/internet
- http://tizen.org/privilege/network.get
-
-
-
- http://tizen.org/feature/opengles.surfaceless_context
- http://tizen.org/feature/opengles.version.2_0
-
diff --git a/samples/SingleProjectSandbox/Platforms/Tizen/Main.cs b/samples/SingleProjectSandbox/Platforms/Tizen/Main.cs
deleted file mode 100644
index 94e621ec25..0000000000
--- a/samples/SingleProjectSandbox/Platforms/Tizen/Main.cs
+++ /dev/null
@@ -1,16 +0,0 @@
-using Avalonia;
-using Avalonia.Tizen;
-
-namespace SingleProjectSandbox;
-
-internal class Program : NuiTizenApplication
-{
- protected override AppBuilder CreateAppBuilder() =>
- App.BuildAvaloniaApp().UseTizen();
-
- internal static void Main(string[] args)
- {
- var app = new Program();
- app.Run(args);
- }
-}
diff --git a/samples/SingleProjectSandbox/Platforms/Tizen/shared/res/Avalonia.png b/samples/SingleProjectSandbox/Platforms/Tizen/shared/res/Avalonia.png
deleted file mode 100644
index ea0bb4986f..0000000000
Binary files a/samples/SingleProjectSandbox/Platforms/Tizen/shared/res/Avalonia.png and /dev/null differ
diff --git a/samples/SingleProjectSandbox/Platforms/Tizen/tizen-manifest.xml b/samples/SingleProjectSandbox/Platforms/Tizen/tizen-manifest.xml
deleted file mode 100644
index 3ba13e8946..0000000000
--- a/samples/SingleProjectSandbox/Platforms/Tizen/tizen-manifest.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-
-
-
-
-
- Avalonia.png
-
-
-
-
-
- http://tizen.org/privilege/appdir.shareddata
- http://tizen.org/privilege/appmanager.launch
- http://tizen.org/privilege/externalstorage
- http://tizen.org/privilege/externalstorage.appdata
- http://tizen.org/privilege/internet
- http://tizen.org/privilege/network.get
-
-
-
- http://tizen.org/feature/opengles.surfaceless_context
- http://tizen.org/feature/opengles.version.2_0
-
diff --git a/samples/SingleProjectSandbox/SingleProjectSandbox.csproj b/samples/SingleProjectSandbox/SingleProjectSandbox.csproj
index bbf83d66fa..4c7c49ed3e 100644
--- a/samples/SingleProjectSandbox/SingleProjectSandbox.csproj
+++ b/samples/SingleProjectSandbox/SingleProjectSandbox.csproj
@@ -3,7 +3,6 @@
$(AvsCurrentTargetFramework);$(AvsCurrentAndroidTargetFramework);$(AvsCurrentBrowserTargetFramework)
$(TargetFrameworks);$(AvsCurrentIOSTargetFramework)
$(TargetFrameworks);$(AvsCurrentMacOSTargetFramework)
- $(TargetFrameworks);$(AvsCurrentTizenTargetFramework)
Exe
true
enable
diff --git a/src/Tizen/Avalonia.Tizen/Avalonia.Tizen.csproj b/src/Tizen/Avalonia.Tizen/Avalonia.Tizen.csproj
deleted file mode 100644
index 76654fc64a..0000000000
--- a/src/Tizen/Avalonia.Tizen/Avalonia.Tizen.csproj
+++ /dev/null
@@ -1,26 +0,0 @@
-
-
-
- $(AvsCurrentTizenTargetFramework)
- $(AvsMinSupportedTizenVersion)
- enable
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/Tizen/Avalonia.Tizen/ITizenView.cs b/src/Tizen/Avalonia.Tizen/ITizenView.cs
deleted file mode 100644
index 87ddba0b6b..0000000000
--- a/src/Tizen/Avalonia.Tizen/ITizenView.cs
+++ /dev/null
@@ -1,12 +0,0 @@
-using Avalonia.Controls.Platform;
-using Avalonia.Input;
-
-namespace Avalonia.Tizen;
-
-internal interface ITizenView
-{
- Size ClientSize { get; }
- double Scaling { get; }
- IInputRoot InputRoot { get; set; }
- INativeControlHostImpl NativeControlHost { get; }
-}
diff --git a/src/Tizen/Avalonia.Tizen/NuiAvaloniaView.cs b/src/Tizen/Avalonia.Tizen/NuiAvaloniaView.cs
deleted file mode 100644
index 8118ae2707..0000000000
--- a/src/Tizen/Avalonia.Tizen/NuiAvaloniaView.cs
+++ /dev/null
@@ -1,188 +0,0 @@
-using Avalonia.Controls;
-using Avalonia.Controls.Embedding;
-using Avalonia.Controls.Platform;
-using Avalonia.Input;
-using Avalonia.Input.TextInput;
-using Avalonia.Rendering;
-using Avalonia.Rendering.Composition;
-using Avalonia.Rendering.Composition.Server;
-using Tizen.NUI;
-using Tizen.NUI.BaseComponents;
-
-namespace Avalonia.Tizen;
-
-///
-/// Avalonia View for Tizen NUI controls
-///
-public class NuiAvaloniaView : GLView, ITizenView, ITextInputMethodImpl
-{
- private readonly NuiKeyboardHandler _keyboardHandler;
- private readonly NuiTouchHandler _touchHandler;
- private readonly NuiAvaloniaViewTextEditable _textEditor;
- private TizenRenderTimer? _renderTimer;
- private TopLevelImpl? _topLevelImpl;
- private EmbeddableControlRoot? _topLevel;
- private readonly TouchDevice _device = new();
- private ServerCompositionTarget? _compositionTargetServer;
- private IInputRoot? _inputRoot;
-
- public INativeControlHostImpl NativeControlHost { get; }
- public double Scaling => 1;
- public Size ClientSize => new(Size.Width, Size.Height);
-
- public IInputRoot InputRoot
- {
- get => _inputRoot ?? throw new InvalidOperationException($"{nameof(InputRoot)} hasn't been set");
- set => _inputRoot = value;
- }
-
- internal TopLevel TopLevel
- => _topLevel ?? throw new InvalidOperationException($"{nameof(NuiAvaloniaView)} hasn't been initialized");
-
- internal TopLevelImpl TopLevelImpl
- => _topLevelImpl ?? throw new InvalidOperationException($"{nameof(NuiAvaloniaView)} hasn't been initialized");
-
- public Control? Content
- {
- get => TopLevel.Content as Control;
- set => TopLevel.Content = value;
- }
-
- internal NuiAvaloniaViewTextEditable TextEditor => _textEditor;
- internal NuiKeyboardHandler KeyboardHandler => _keyboardHandler;
-
- #region Setup
-
- public event Action? OnSurfaceInit;
-
- public NuiAvaloniaView() : base(ColorFormat.RGBA8888)
- {
- RenderingMode = GLRenderingMode.OnDemand;
- SetGraphicsConfig(true, true, 0, GLESVersion.Version30);
- RegisterGLCallbacks(GlInit, GlRenderFrame, GlTerminate);
-
- _textEditor = new NuiAvaloniaViewTextEditable(this);
- _keyboardHandler = new NuiKeyboardHandler(this);
- _touchHandler = new NuiTouchHandler(this);
- NativeControlHost = new NuiNativeControlHostImpl(this);
-
- Layout = new CustomLayout
- {
- SizeUpdated = OnResized
- };
-
- TouchEvent += OnTouchEvent;
- WheelEvent += OnWheelEvent;
- }
-
- private void GlInit()
- {
- OnSurfaceInit?.Invoke();
- }
-
- private int GlRenderFrame()
- {
- if (_renderTimer == null || _compositionTargetServer == null)
- return 0;
-
- var rev = _compositionTargetServer.Revision;
- _renderTimer.ManualTick();
- return rev == _compositionTargetServer.Revision ? 0 : 1;
- }
-
- private void GlTerminate()
- {
- }
-
- internal void Initialise()
- {
- _topLevelImpl = new TopLevelImpl(this, new[] { new NuiGlLayerSurface(this) });
- _topLevelImpl.Compositor.AfterCommit += RenderOnce;
- TizenPlatform.ThreadingInterface.TickExecuted += RenderOnce;
-
- _topLevel = new(_topLevelImpl);
- _topLevel.Prepare();
- _topLevel.StartRendering();
-
- _compositionTargetServer = ((CompositingRenderer)((IRenderRoot)_topLevel).Renderer).CompositionTarget.Server;
-
- _renderTimer = (TizenRenderTimer)AvaloniaLocator.Current.GetRequiredService();
- _renderTimer.RenderTick += RenderOnce;
-
- OnResized();
- }
-
- #endregion
-
- #region Resize and layout
-
- private class CustomLayout : AbsoluteLayout
- {
- float _width;
- float _height;
-
- public Action? SizeUpdated { get; set; }
-
- protected override void OnLayout(bool changed, LayoutLength left, LayoutLength top, LayoutLength right, LayoutLength bottom)
- {
- var sizeChanged = _width != Owner.SizeWidth || _height != Owner.SizeHeight;
- _width = Owner.SizeWidth;
- _height = Owner.SizeHeight;
- if (sizeChanged)
- {
- SizeUpdated?.Invoke();
- }
- base.OnLayout(changed, left, top, right, bottom);
- }
- }
-
- protected void OnResized()
- {
- if (Size.Width == 0 || Size.Height == 0)
- return;
-
- _topLevelImpl?.Resized?.Invoke(_topLevelImpl.ClientSize, WindowResizeReason.Layout);
- }
-
- #endregion
-
- #region Event handlers
-
- private bool OnTouchEvent(object source, TouchEventArgs e)
- {
- _touchHandler.Handle(e);
- return true;
- }
-
- private bool OnWheelEvent(object source, WheelEventArgs e)
- {
- _touchHandler.Handle(e);
- return true;
- }
-
- public void SetClient(TextInputMethodClient? client)
- {
- _textEditor.SetClient(client);
- }
-
- public void SetCursorRect(Rect rect)
- {
- }
-
- public void SetOptions(TextInputOptions options) =>
- _textEditor.SetOptions(options);
-
- #endregion
-
- protected override void Dispose(bool disposing)
- {
- if (disposing)
- {
- _topLevel?.StopRendering();
- _topLevel?.Dispose();
- _topLevelImpl?.Dispose();
- _device.Dispose();
- }
- base.Dispose(disposing);
- }
-}
diff --git a/src/Tizen/Avalonia.Tizen/NuiAvaloniaViewTextEditable.cs b/src/Tizen/Avalonia.Tizen/NuiAvaloniaViewTextEditable.cs
deleted file mode 100644
index c7e05afc52..0000000000
--- a/src/Tizen/Avalonia.Tizen/NuiAvaloniaViewTextEditable.cs
+++ /dev/null
@@ -1,211 +0,0 @@
-using Avalonia.Input.TextInput;
-using Tizen.NUI;
-using Tizen.NUI.BaseComponents;
-using Window = Tizen.NUI.Window;
-
-namespace Avalonia.Tizen;
-
-internal class NuiAvaloniaViewTextEditable
-{
- private readonly NuiAvaloniaView _avaloniaView;
-
- private INuiTextInput TextInput => _multiline ? _multiLineTextInput : _singleLineTextInput;
- private readonly NuiSingleLineTextInput _singleLineTextInput;
- private readonly NuiMultiLineTextInput _multiLineTextInput;
- private bool _updating;
- private bool _keyboardPresented;
- private bool _multiline;
-
- private TextInputMethodClient? _client;
-
- public bool IsActive => _client != null && _keyboardPresented;
-
- public NuiAvaloniaViewTextEditable(NuiAvaloniaView avaloniaView)
- {
- _avaloniaView = avaloniaView;
- _singleLineTextInput = new NuiSingleLineTextInput
- {
- HeightResizePolicy = ResizePolicyType.Fixed,
- WidthResizePolicy = ResizePolicyType.Fixed,
- Size = new(1, 1),
- Position = new Position(-1000, -1000),
- FontSizeScale = 0.1f,
- };
-
- _multiLineTextInput = new NuiMultiLineTextInput
- {
- HeightResizePolicy = ResizePolicyType.Fixed,
- WidthResizePolicy = ResizePolicyType.Fixed,
- Size = new(1, 1),
- Position = new Position(-1000, -1000),
- FontSizeScale = 0.1f,
- };
-
- SetupTextInput(_singleLineTextInput);
- SetupTextInput(_multiLineTextInput);
- }
-
- private void SetupTextInput(INuiTextInput input)
- {
- input.Hide();
-
- input.GetInputMethodContext().StatusChanged += OnStatusChanged;
- input.GetInputMethodContext().EventReceived += OnEventReceived;
- }
-
- private InputMethodContext.CallbackData OnEventReceived(object source, InputMethodContext.EventReceivedEventArgs e)
- {
- switch (e.EventData.EventName)
- {
- case InputMethodContext.EventType.Preedit:
- _client?.SetPreeditText(e.EventData.PredictiveString);
- break;
- case InputMethodContext.EventType.Commit:
- _client?.SetPreeditText(null);
- _avaloniaView.TopLevelImpl.TextInput(e.EventData.PredictiveString);
- break;
- }
-
- return new InputMethodContext.CallbackData();
- }
-
- private void OnStatusChanged(object? sender, InputMethodContext.StatusChangedEventArgs e)
- {
- _keyboardPresented = e.StatusChanged;
- if (!_keyboardPresented)
- DettachAndHide();
- }
-
- internal void SetClient(TextInputMethodClient? client)
- {
- if (client == null || !_keyboardPresented)
- DettachAndHide();
-
- if (client != null)
- AttachAndShow(client);
- }
-
- internal void SetOptions(TextInputOptions options)
- {
- //TODO: This should be revert when Avalonia used Multiline property
- _multiline = true;
- //if (_multiline != options.Multiline)
- //{
- // DettachAndHide();
- // _multiline = options.Multiline;
- //}
-
- TextInput.Sensitive = options.IsSensitive;
- }
-
- private void AttachAndShow(TextInputMethodClient client)
- {
- _updating = true;
- try
- {
- TextInput.Text = client.SurroundingText;
- TextInput.PrimaryCursorPosition = client.Selection.Start;
- Window.Instance.GetDefaultLayer().Add((View)TextInput);
- TextInput.Show();
- TextInput.EnableSelection = true;
-
- var inputContext = TextInput.GetInputMethodContext();
- inputContext.Activate();
- inputContext.ShowInputPanel();
- inputContext.RestoreAfterFocusLost();
-
- _client = client;
- client.TextViewVisualChanged += OnTextViewVisualChanged;
- client.SurroundingTextChanged += OnSurroundingTextChanged;
- client.SelectionChanged += OnClientSelectionChanged;
- client.InputPaneActivationRequested += OnInputPaneActivationRequested;
-
- TextInput.SelectWholeText();
- OnClientSelectionChanged(this, EventArgs.Empty);
- }
- finally { _updating = false; }
- }
-
- private void OnInputPaneActivationRequested(object? sender, EventArgs e)
- {
- var inputContext = TextInput.GetInputMethodContext();
- inputContext.ShowInputPanel();
- }
-
- private void OnClientSelectionChanged(object? sender, EventArgs e) => InvokeUpdate(client =>
- {
- if (client.Selection.End == 0 || client.Selection.Start == client.Selection.End)
- TextInput.PrimaryCursorPosition = client.Selection.Start;
- else
- TextInput.SelectText(client.Selection.Start, client.Selection.End);
- });
-
- private void OnSurroundingTextChanged(object? sender, EventArgs e) => InvokeUpdate(client =>
- {
- TextInput.Text = client.SurroundingText;
- TextInput.GetInputMethodContext().SetSurroundingText(client.SurroundingText);
- OnClientSelectionChanged(sender, e);
- });
-
- private void OnTextViewVisualChanged(object? sender, EventArgs e) => InvokeUpdate(client =>
- {
- TextInput.Text = client.SurroundingText;
- });
-
- private void DettachAndHide()
- {
- if (IsActive)
- {
- _client!.TextViewVisualChanged -= OnTextViewVisualChanged;
- _client!.SurroundingTextChanged -= OnSurroundingTextChanged;
- _client!.SelectionChanged -= OnClientSelectionChanged;
- _client!.InputPaneActivationRequested -= OnInputPaneActivationRequested;
- }
-
- if (Window.Instance.GetDefaultLayer().Children.Contains((View)TextInput))
- Window.Instance.GetDefaultLayer().Remove((View)TextInput);
-
- TextInput.Hide();
-
- var inputContext = TextInput.GetInputMethodContext();
- inputContext.Deactivate();
- inputContext.HideInputPanel();
- }
-
- private void InvokeUpdate(Action action)
- {
- if (_updating || !IsActive)
- return;
-
- _updating = true;
- try
- {
- action(_client!);
- }
- finally { _updating = false; }
- }
-}
-
-internal interface INuiTextInput
-{
- string Text { get; set; }
- int PrimaryCursorPosition { get; set; }
- bool EnableSelection { get; set; }
- bool Sensitive { get; set; }
- int SelectedTextStart { get; }
- int SelectedTextEnd { get; }
-
- void Show();
- InputMethodContext GetInputMethodContext();
- void Hide();
- void SelectText(int selectedTextStart, int value);
- void SelectWholeText();
-}
-
-public class NuiMultiLineTextInput : TextEditor, INuiTextInput
-{
-}
-
-public class NuiSingleLineTextInput : TextField, INuiTextInput
-{
-}
diff --git a/src/Tizen/Avalonia.Tizen/NuiClipboardImpl.cs b/src/Tizen/Avalonia.Tizen/NuiClipboardImpl.cs
deleted file mode 100644
index f13134d668..0000000000
--- a/src/Tizen/Avalonia.Tizen/NuiClipboardImpl.cs
+++ /dev/null
@@ -1,98 +0,0 @@
-using Avalonia.Input;
-using Avalonia.Input.Platform;
-using Avalonia.Threading;
-using Tizen.NUI;
-using Tizen.NUI.BaseComponents;
-
-namespace Avalonia.Tizen;
-
-internal class NuiClipboardImpl : IClipboardImpl, IAsyncDataTransfer, IAsyncDataTransferItem
-{
- private readonly DataFormat[] _formats;
- private readonly IAsyncDataTransferItem[] _items;
- private readonly TextEditor _textEditor;
-
- public NuiClipboardImpl()
- {
- _formats = [DataFormat.Text];
- _items = [this];
-
- _textEditor = new TextEditor()
- {
- HeightResizePolicy = ResizePolicyType.Fixed,
- WidthResizePolicy = ResizePolicyType.Fixed,
- Position = new Position(-1000, -1000),
- Size = new(1, 1)
- };
-
- Window.Instance.GetDefaultLayer().Add(_textEditor);
- _textEditor.LowerToBottom();
- }
-
- IReadOnlyList IAsyncDataTransfer.Formats
- => _formats;
-
- IReadOnlyList IAsyncDataTransferItem.Formats
- => _formats;
-
- IReadOnlyList IAsyncDataTransfer.Items
- => _items;
-
- public Task ClearAsync()
- => SetTextAsync(string.Empty);
-
- public Task TryGetDataAsync()
- => Task.FromResult(this);
-
- public async Task SetDataAsync(IAsyncDataTransfer dataTransfer)
- {
- var text = await dataTransfer.TryGetTextAsync();
- await SetTextAsync(text ?? string.Empty);
- }
-
- public Task