百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
K

kotlin-desktop-toolkit

> 编程语言
开源

Kotlin 窗口管理库 Kotlin 窗口管理是一款将操作系统特定的窗口管理 API 包装成 Kotlin 语法的库。

187 stars0 点赞0 次浏览
访问官网GitHub

工具介绍

Kotlin 窗口管理库 Kotlin 窗口管理是一款将操作系统特定的窗口管理 API 包装成 Kotlin 语法的库。

Kotlin Window Management library

Kotlin Window Management is a library that wraps OS-specific window management APIs into an idiomatic Kotlin interface.

The library serves as a foundation for the UI framework used in Air and will later provide an OS integration layer for Compose for Desktop.

Goals

  • Provide a simple Kotlin API for OS features needed to build desktop applications
  • Support all major desktop platforms: Linux (both X11 and Wayland), macOS and Windows
  • Flatten OS quirks or at least document them
  • Provide a safe API. Incorrect usage of the API should lead to Kotlin exceptions but not crashes
  • Provide rendering contexts compatible with Skia, e.g., via skiko
  • Make it Kotlin Multiplatform in the future

Non-Goals

  • Providing bindings for Android or iOS, they are too different from desktop
  • Bindings for browser APIs
  • API alignment across platforms. Desktop platforms differ in their capabilities; we do not intend to hide these differences

Status

✅ - implemented

  • in progress, partially implemented

❌ - not implemented yet

➖ - not applicable

Application

MacOS Wayland Windows X11
Run event loop ✅ ✅ ✅ ✅
Invoke on Main thread ✅ ✅ ✅ ✅
List screens ✅ ✅ ✅ ✅
Terminate application ✅ ✅ ✅ ✅
Show notification ✅ ✅ ❌ ✅
System tray ❌ ❌ ❌ ❌
Application icon ✅ ➖ ❌
Application menu ✅ ❌ ➖ ❌
Accessibility ❌ ❌ ❌ ❌
File choose dialog ✅ ✅

Window

MacOS Wayland Windows X11
Position ✅ ➖ (startMove) ✅ ❌ (startMove)
Size ✅ ➖ (startResize) ✅ ❌ (startResize)
Max/Min size ✅ ✅ ✅ (setMinSize)
Content size ✅ ➖ ✅ ❌
Current screen ✅ ✅ ✅ ❌
Full screen ✅ ✅ ❌ ✅
Maximize/Minimize ✅ ✅ ✅ ✅
Request focus ✅ ✅ ✅ ✅
Set cursor icon ✅ ✅ ✅ ✅
Transparency ✅ ✅ ✅ ✅
Background effects ✅ ❌ ✅ ❌
Close window ✅ ✅ ✅ ✅

Rendering

MacOS Wayland Windows X11
Metal ✅ ➖ ➖ ➖
ANGLE ❌ ❌ ✅(DX11) ❌
DirectX12 ➖ ➖ ❌ ➖
OpenGL ➖ ✅ ❌ ✅
Vulkan ❌ ❌ ❌ ❌
Software ❌ ✅ ✅(WARP) ❌

Events

MacOS Wayland Windows X11
KeyDown ✅ ✅ ✅ ✅
KeyUp ✅ ✅ ✅ ✅
ModifiersChanged ✅ ✅ ➖ ✅
MouseMoved ✅ ✅ ✅ ✅
MouseDragged ✅ ❌ ❌ ❌
MouseEntered ✅ ✅ ✅ ✅
MouseExited ✅ ✅ ✅ ✅
MouseDown ✅ ✅ ✅ ✅
MouseUp ✅ ✅ ✅ ✅
ScrollWheel ✅ ✅ ✅ ✅
WindowSizeChange ✅ ✅ ✅ ✅
WindowResize ✅ ✅ ✅ ✅
WindowMove ✅ ➖ ✅ ❌
WindowFocusChange ✅ ✅ ✅ ✅
WindowCloseRequest ✅ ✅ ✅ ✅
WindowFullScreenToggle ✅ ✅ ❌ ✅
WindowChangedOcclusionState ✅ ❌ ❌
DisplayConfigurationChange ✅ ✅ ❌
ApplicationOpenURL ✅ ✅ ✅ ✅
ApplicationAppearanceChange ✅ ✅ ✅ ✅
ApplicationDidFinishLaunching ✅ ✅ ✅* ✅

* On Windows, a callback is currently enqueued before starting the event loop. This may be replaced with an ApplicationDidFinishLaunching event in the future.

Theme

MacOS Wayland Windows X11
isDark/isLight ✅ ✅ ✅ ✅
Sync with OS ✅ ✅ ✅ ✅

Input Methods

MacOS Wayland Windows X11
Custom text input context ✅ ✅ ❌ ✅
Order emoji popup ✅ ➖ ❌ ❌

Clipboard

MacOS Wayland Windows X11
Simple text copy/paste ✅ ✅ ✅ ✅
Copy files ✅ ✅ ✅ ✅
System defined clipboard types ✅ ➖ ✅ ✅
Custom binary clipboard content ✅ ✅ ✅ ✅
Lazy fetch of clipboard content ❌ ✅ ❌ ✅

Screen

MacOS Wayland Windows X11
ScreenId ✅ ✅ ➖ ✅
IsPrimary ✅ ❌ ✅ ❌
Name ✅ ✅ ✅ ✅
Origin ✅ ✅ ✅ ✅
Size ✅ ✅ ✅ ✅
Scale ✅ ❌ ✅ ✅
FPS ✅ ✅ ✅ ✅
Color space ❌ ❌ ❌ ❌
Persistent identity ✅ ❌ ❌

Drag and Drop

MacOS Wayland Windows X11
Window as drag target ✅ ✅ ✅ ✅
Drag entered ✅ ✅ ✅ ✅
Drag updated ✅ ✅ ✅ ✅
Drag exited ✅ ✅ ✅ ✅
Drag performed ✅ ✅ ✅ ✅
Drag source ✅ ✅ ✅ ✅

Acknowledgements

Many libraries tackle the same problem from different angles, but each makes slightly different trade-offs compared to KDT.

To name a few:

  • AWT
  • gpui.rs
  • JWM
  • JavaFX
  • GLFW
  • SDL
  • Electron

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Rust

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月18日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言