LeXtudio.UI.Text.Core
1.0.0
Prefix Reserved
dotnet add package LeXtudio.UI.Text.Core --version 1.0.0
NuGet\Install-Package LeXtudio.UI.Text.Core -Version 1.0.0
<PackageReference Include="LeXtudio.UI.Text.Core" Version="1.0.0" />
<PackageVersion Include="LeXtudio.UI.Text.Core" Version="1.0.0" />
<PackageReference Include="LeXtudio.UI.Text.Core" />
paket add LeXtudio.UI.Text.Core --version 1.0.0
#r "nuget: LeXtudio.UI.Text.Core, 1.0.0"
#:package LeXtudio.UI.Text.Core@1.0.0
#addin nuget:?package=LeXtudio.UI.Text.Core&version=1.0.0
#tool nuget:?package=LeXtudio.UI.Text.Core&version=1.0.0
TextCore.Native — UI-agnostic Cross-Platform Core Text APIs
TextCore.Native offers a small, stable set of CoreText/IME primitives editor hosts
can use to implement platform text input and IME support without depending on
Uno Platform, WPF, or any other UI framework. It exposes a managed CoreText*
API surface and uses different approaches for platform integration:
- On Windows, it uses the Win32 IME APIs (user32/imm32) via P/Invoke.
- On macOS, it includes a tiny native macOS helper (
libTextCoreNativeMacInput.dylib) used to surface AppKit text input callbacks to managed code. - On Linux, it uses
libX11via P/Invoke for X11 calls and communicates with IBus over D-Bus using a built-in managed DBus-over-socket implementation (no libibus/libdbus P/Invoke).
Quick start
- Install the NuGet package:
dotnet add package LeXtudio.UI.Text.Core
- Or add a
PackageReferenceto your project file:
<PackageReference Include="LeXtudio.UI.Text.Core" Version="1.*" />
For advanced workflows (consuming from source, building the native macOS helper, or producing packages) see CONTRIBUTING.md.
API overview
CoreTextServicesManager.GetForCurrentView()— factory; callCreateEditContext()to get aCoreTextEditContext.CoreTextEditContext— central event hub. Important events:TextRequestedTextUpdatingSelectionRequestedSelectionUpdatingLayoutRequestedCompositionStarted/CompositionCompleted/FocusRemovedCommandReceived— receives platform command selectors (e.g. AppKitdoCommandBySelector:strings).
Lifecycle methods:
bool AttachToWindowHandle(nint windowHandle, nint displayHandle = 0)— attach to a native window. On macOS pass anNSWindow*; on Windows pass anHWND; on Linux/X11 pass the X11 Window id and the X11 Display pointer.void NotifyCaretRectChanged(double x, double y, double width, double height).void NotifyFocusEnter()/void NotifyFocusLeave().void Dispose().
Minimal usage example
var manager = CoreTextServicesManager.GetForCurrentView();
var ctx = manager.CreateEditContext();
ctx.TextRequested += (s, e) => e.Request.Text = GetDocumentText();
ctx.TextUpdating += (s, e) => ApplyEdit(e.NewText);
ctx.CommandReceived += (s, e) => {
if (e.Command == "deleteBackward:") { Backspace(); e.Handled = true; }
};
ctx.AttachToWindowHandle(hwnd);
ctx.NotifyCaretRectChanged(x, y, w, h);
// ...
ctx.Dispose();
License
This project is licensed under the MIT License. See the LICENSE file for details.
Copyright
(c) 2026 LeXtudio Inc. All rights reserved.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- No dependencies.
NuGet packages (1)
Showing the top 1 NuGet packages that depend on LeXtudio.UI.Text.Core:
| Package | Downloads |
|---|---|
|
LeXtudio.TextBox
A TextBox control with CoreText IME bridge for Uno Platform, with a native WinUI pass-through on Windows. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.0 | 0 | 7/6/2026 |
| 0.2.15 | 125 | 6/10/2026 |
| 0.2.14 | 308 | 5/28/2026 |
| 0.2.13 | 114 | 5/27/2026 |
| 0.2.12 | 105 | 5/27/2026 |
| 0.2.11 | 1,849 | 5/18/2026 |
| 0.2.10 | 117 | 5/17/2026 |
| 0.2.9 | 101 | 5/17/2026 |
| 0.2.8 | 239 | 5/13/2026 |
| 0.2.7 | 121 | 5/13/2026 |
| 0.2.6 | 311 | 4/30/2026 |
| 0.2.5 | 113 | 4/17/2026 |
| 0.2.4 | 128 | 4/16/2026 |
| 0.2.3 | 107 | 4/16/2026 |
| 0.2.2 | 102 | 4/16/2026 |
| 0.2.1 | 111 | 4/16/2026 |
| 0.2.0 | 51 | 4/14/2026 |
| 0.1.0 | 49 | 4/14/2026 |