RepositoryKotlin
gtk-kn

gtk-kn/gtk-kn

Kotlin/Native bindings for the GTK and other GObject-based libraries (read only mirror of GitLab)

59sao
2fork
0issue
2lượt xem

🔧 gtk-kn: Binding Kotlin/Native cho GTK và thế giới GObject

Kotlin/Native gặp GTK — kết nối hai thế giới mượt mà qua GObject Introspection.

gtk-kn là dự án cung cấp binding Kotlin/Native cho GTK, cùng các thư viện phụ thuộc và thêm thư viện dựa trên GObject. GTK là một bộ công cụ GUI đa nền tảng với đầy đủ tiện ích để xây dựng ứng dụng đồ họa. Kotlin/Native cho phép mã Kotlin biên dịch thành mã máy nhiên liệu trên nhiều nền tảng.

✨ Điểm nổi bật

  • Binding Kotlin/Native cho GTK: Biên dịch trực tiếp Kotlin thành mã máy, tích hợp sâu với GTK.
  • Hỗ trợ thư viện GObject: Bao gồm cả GTK và các thư viện khác dựa trên GObject.
  • Generator từ file .gir: Phân tích file GObject Introspection .gir và sinh code Kotlin tự động.
  • Wrapper lớp Kotlin tự nhiên: Chuyển đổi lớp, interface, signal, thuộc tính, enum, struct của GObject thành Kotlin idiomatically.
  • Xử lý lỗi GLib: Các hàm dùng GError trả về Result<T> với GlibException.
  • Hỗ trợ signal: Dùng on<SignalName>() để kết nối callback một cách trực quan.
  • CI đa distro Linux: Kiểm thử tự động trên Arch, Fedora, openSUSE, Ubuntu LTS.
  • Ví dụ mẫu đầy đủ: Thư mục samples cung cấp ứng dụng demo như Hello World.

💡 Vì sao đáng chú ý

gtk-kn khác biệt ở chỗ nó không chỉ là binding thuần — mà là một hệ sinh thái sinh code từ .gir, biến mọi thư viện GObject-based thành Kotlin API trực quan. Thay vì gọi C thủ công, bạn dùng Kotlin với constructor, signal handler và enum đẹp. Phù hợp cho nhà phát triển muốn dùng Kotlin để xây dựng ứng dụng desktop hiệu năng cao trên Linux.


#Kotlin #GTK #GObjectIntrospection #Native #OpenSource #TiniX

Dự án tương tự

Khám phá các dự án và mô hình AI khác có sự tương đồng.

RepositoryRust
flxzt/rnote

Sketch and take handwritten notes.

11.9k
Nov 29, 2026
RepositoryCSS
vinceliuice/WhiteSur-gtk-theme

MacOS like theme for all gtk based desktops

9.5k
Sep 11, 2026
RepositoryC#
PintaProject/Pinta

Simple GTK Paint Program

4.2k
Nov 23, 2026
RepositoryPython
nicotine-plus/nicotine-plus

Graphical client for the Soulseek peer-to-peer network

3.3k
Dec 1, 2026
RepositoryRust
Relm4/Relm4

Build truly native applications with ease!

2.0k
Dec 3, 2026
RepositoryRust
JakeStanger/ironbar

Customisable Wayland GTK4 bar written in Rust.

1.5k
Dec 1, 2026
RepositoryPython
qwersyk/Newelle

Newelle - Your Ultimate Virtual Assistant

1.5k
Nov 27, 2026
RepositoryPython
valpackett/awesome-gtk

List of awesome GTK (3/4) applications

1.3k
Nov 28, 2026
RepositoryPython
StreamController/StreamController

An elegant Linux app for the Elgato Stream Deck with support for plugins

1.2k
Sep 21, 2026