https://kotlinlang.org logo
Channels
100daysofcode
100daysofkotlin
100daysofkotlin-2021
advent-of-code
aem
ai
alexa
algeria
algolialibraries
amsterdam
android
android-architecture
android-databinding
android-studio
androidgithubprojects
androidthings
androidx
androidx-xprocessing
anime
anko
announcements
apollo-kotlin
appintro
arabic
argentina
arkenv
arksemdevteam
armenia
arrow
arrow-contributors
arrow-meta
ass
atlanta
atm17
atrium
austin
australia
austria
awesome-kotlin
ballast
bangladesh
barcelona
bayarea
bazel
beepiz-libraries
belgium
benchmarks
berlin
big-data
books
boston
brazil
brikk
budapest
build
build-tools
bulgaria
bydgoszcz
cambodia
canada
carrat
carrat-dev
carrat-feed
chicago
chile
china
chucker
cincinnati-user-group
cli
clikt
cloudfoundry
cn
cobalt
code-coverage
codeforces
codemash-precompiler
codereview
codingame
codingconventions
coimbatore
collaborations
colombia
colorado
communities
competitive-programming
competitivecoding
compiler
compose
compose-android
compose-desktop
compose-hiring
compose-ios
compose-mp
compose-ui-showcase
compose-wear
compose-web
confetti
connect-audit-events
corda
cork
coroutines
couchbase
coursera
croatia
cryptography
cscenter-course-2016
cucumber-bdd
cyprus
czech
dagger
data2viz
databinding
datascience
dckotlin
debugging
decompose
decouple
denmark
deprecated
detekt
detekt-hint
dev-core
dfw
docs-revamped
dokka
domain-driven-design
doodle
dsl
dublin
dutch
eap
eclipse
ecuador
edinburgh
education
effective-kotlin
effectivekotlin
emacs
embedded-kotlin
estatik
event21-community-content
events
exposed
failgood
fb-internal-demo
feed
firebase
flow
fluid-libraries
forkhandles
forum
fosdem
fp-in-kotlin
framework-elide
freenode
french
fritz2
fuchsia
functional
funktionale
gamedev
ge-kotlin
general-advice
georgia
geospatial
german-lang
getting-started
github-workflows-kt
glance
godot-kotlin
google-io
gradle
graphic
graphkool
graphql
graphql-kotlin
graviton-browser
greece
grpc
gsoc
gui
hackathons
hacktoberfest
hamburg
hamkrest
helios
helsinki
hexagon
hibernate
hikari-cp
hire-me
hiring
hongkong
hoplite
http4k
hungary
hyderabad
image-processing
india
indonesia
inkremental
intellij
intellij-plugins
intellij-tricks
internships
introduce-yourself
io
ios
iran
israel
istanbulcoders
italian
jackson-kotlin
jadx
japanese
jasync-sql
java-to-kotlin-refactoring
javadevelopers
javafx
javalin
javascript
jdbi
jhipster-kotlin
jobsworldwide
jpa
jshdq
juul-libraries
jvm-ir-backend-feedback
jxadapter
k2-early-adopters
kaal
kafka
kakao
kalasim
kapt
karachi
karg
karlsruhe
kash_shell
kaskade
kbuild
kdbc
kgen-doc-tools
kgraphql
kinta
klaxon
klock
kloudformation
kmdc
kmm-español
kmongo
knbt
knote
koalaql
koans
kobalt
kobweb
kodein
kodex
kohesive
koin
koin-dev
komapper
kondor-json
kong
kontent
kontributors
korau
korean
korge
korim
korio
korlibs
korte
kotest
kotest-contributors
kotless
kotlick
kotlin-asia
kotlin-beam
kotlin-by-example
kotlin-csv
kotlin-data-storage
kotlin-foundation
kotlin-fuel
kotlin-in-action
kotlin-inject
kotlin-latam
kotlin-logging
kotlin-multiplatform-contest
kotlin-mumbai
kotlin-native
kotlin-pakistan
kotlin-plugin
kotlin-pune
kotlin-roadmap
kotlin-samples
kotlin-sap
kotlin-serbia
kotlin-spark
kotlin-szeged
kotlin-website
kotlinacademy
kotlinbot
kotlinconf
kotlindl
kotlinforbeginners
kotlingforbeginners
kotlinlondon
kotlinmad
kotlinprogrammers
kotlinsu
kotlintest
kotlintest-devs
kotlintlv
kotlinultimatechallenge
kotlinx-datetime
kotlinx-files
kotlinx-html
kotrix
kotson
kovenant
kprompt
kraph
krawler
kroto-plus
ksp
ktcc
ktfmt
ktlint
ktor
ktp
kubed
kug-leads
kug-torino
kvision
kweb
lambdaworld_cadiz
lanark
language-evolution
language-proposals
latvia
leakcanary
leedskotlinusergroup
lets-have-fun
libgdx
libkgd
library-development
lincheck
linkeddata
lithuania
london
losangeles
lottie
love
lychee
macedonia
machinelearningbawas
madrid
malaysia
mathematics
meetkotlin
memes
meta
metro-detroit
mexico
miami
micronaut
minnesota
minutest
mirror
mockk
moko
moldova
monsterpuzzle
montreal
moonbean
morocco
motionlayout
mpapt
mu
multiplatform
mumbai
munich
mvikotlin
mvrx
myndocs-oauth2-server
naming
navigation-architecture-component
nepal
new-mexico
new-zealand
newname
nigeria
nodejs
norway
npm-publish
nyc
oceania
ohio-kotlin-users
oldenburg
oolong
opensource
orbit-mvi
osgi
otpisani
package-search
pakistan
panamá
pattern-matching
pbandk
pdx
peru
philippines
phoenix
pinoy
pocketgitclient
polish
popkorn
portugal
practical-functional-programming
proguard
prozis-android-backup
pyhsikal
python
python-contributors
quasar
random
re
react
reaktive
realm
realworldkotlin
reductor
reduks
redux
redux-kotlin
refactoring-to-kotlin
reflect
refreshversions
reports
result
rethink
revolver
rhein-main
rocksdb
romania
room
rpi-pico
rsocket
russian
russian_feed
russian-kotlinasfirst
rx
rxjava
san-diego
science
scotland
scrcast
scrimage
script
scripting
seattle
serialization
server
sg-user-group
singapore
skia-wasm-interop-temp
skrape-it
slovak
snake
sofl-user-group
southafrica
spacemacs
spain
spanish
speaking
spek
spin
splitties
spotify-mobius
spring
spring-security
squarelibraries
stackoverflow
stacks
stayhungrystayfoolish
stdlib
stlouis
strife-discord-lib
strikt
students
stuttgart
sudan
swagger-gradle-codegen
swarm
sweden
swing
swiss-user-group
switzerland
talking-kotlin
tallinn
tampa
teamcity
tegal
tempe
tensorflow
terminal
test
testing
testtestest
texas
tgbotapi
thailand
tornadofx
touchlab-tools
training
tricity-kotlin-user-group
trójmiasto
truth
tunisia
turkey
turkiye
twitter-feed
uae
udacityindia
uk
ukrainian
uniflow
unkonf
uruguay
utah
uuid
vancouver
vankotlin
vertx
videos
vienna
vietnam
vim
vkug
vuejs
web-mpp
webassembly
webrtc
wimix_sentry
wwdc
zircon
Powered by
Title
v

vbsteven

04/23/2023, 1:15 PM
Introducing gtk-kn: GTK for Kotlin/Native We've been working on generating Kotlin Native bindings for GTK and other GObject Introspection-based libraries (Gio, Pango, Adwaita, GtkSourceView,...) A quick non-exhaustive list of what is already possible right now: • Build UI in code using widgets from the Gtk4 and Adwaita libraries • Load and use
.ui
resource files • Connect signal handlers • Use property binding on all objects and widgets • Work with `ListModel`/`ListStore`/`Listview` • Define your own
GObject
types with support for properties • Use various Gio abstractions including the file system API, menus, actions and resources We have not published the artefacts to MavenCentral yet. However, you can still use it in your projects by building locally and deploying to MavenLocal. The current focus is on Linux, but we're also looking at Windows/MacOS support in the future. We would love to hear some feedback on the project, so if you're interested in testing it out, head over to our GitLab page https://gitlab.com/gtk-kn/gtk-kn to learn more. Also, if you have any questions or want to get involved in development discussions, we mostly hang out on our Matrix room at https://matrix.to/#/#gtk-kn:matrix.org.
c

CLOVIS

04/24/2023, 7:54 PM
Hey! I'm the author of #decouple. My goal is to create a Compose-based widget set that is truly native on all platforms (DOM on the web, GTK on Linux…). This is done by creating a common module that declares components as interfaces, and implementing them on each platform by delegating to feature-full libraries. The project is currently a prototype that demonstrates this is, in fact, feasible—but it needs a lot more breadth before being usage in real projects. I'm very interested in talking about your experience making this library, would that be interesting to you?
v

vbsteven

04/25/2023, 7:18 AM
Sure, I'm always happy to talk about it and share experiences. I'm available here on the Kotlin Slack and the Matrix space
m

Miroslav Sobotka

04/25/2023, 7:49 AM
macosArm64 🙂
v

vbsteven

04/25/2023, 7:51 AM
Very nice! Did you need lots of changes to the def files? And are you interested in contributing this work?
m

Miroslav Sobotka

04/25/2023, 8:12 AM
Install the dependencies via
homebrew
:
brew install libadwaita
brew install gdk-pixbuf
brew install gobject-introspection
brew install gtk4
brew install pango
brew install libpango
brew install libconfig
and apply the attached patch (basically the changes for the
cflags
and
libs
). The right values are provided for example as
/opt/homebrew/bin/pkg-config --libs libadwaita-1
(note the
pkg-config
from
homebrew
, not from system) It is little bit quick and dirty 😄 The "problems" to solve are: •
gio/gdesktopappinfo.h
vs
gio/gosxappinfo.h
girBaseDir
PS: enabled the basic c support over
#language=c
in
.def
files 😄
v

vbsteven

04/25/2023, 8:17 AM
Thanks a lot for this already, I expected issues with things like
gdesktopappinfo
, it is on my todo list for macos and windows support but focus has mainly been on the generator itself for now. The current idea is to not officially support macos/windows on the master branch yet, but keep alternative "unsupported" branches in the repo containing the "quickfix" patches until I find some time to properly support it.
m

Miroslav Sobotka

04/25/2023, 8:18 AM
This was the first running version. What is to do, is to replace the fixed versions in path with related ones, for example:
$ ls -l /opt/homebrew/include/glib*
/opt/homebrew/include/glib-2.0 -> ../Cellar/glib/2.76.1/include/glib-2.0/
v

vbsteven

04/25/2023, 8:21 AM
work is ongoing for a gradle plugin, and that work already supports invoking
pkg-config
for an unrelated thing (resource compilation). Eventually we would like to also run
pkg-config
for the .def files, so that should fix the paths
m

Miroslav Sobotka

04/25/2023, 8:23 AM
Eventually we would like to also run
pkg-config
for the .def files, so that should fix the paths
Basically yes, but not 1:1, because for example this was added extra by me:
-DGDK_PIXBUF_ENABLE_BACKEND=1
v

vbsteven

04/25/2023, 8:24 AM
I also expected some changes required on different platforms, which is why I want to take some time later to figure out how we can get it all nice and integrated into the build, and we can "get by" with some temporary windows/macos branches until those build changes land
m

Miroslav Sobotka

04/25/2023, 8:25 AM
@vbsteven I can create a merge request with this patch, if you want. Or as you said, an experimental branch with support. 😉
v

vbsteven

04/25/2023, 8:26 AM
an MR would be very much appreciated, You can mark it as
draft
and point it to master for now, and I'll create the platform branches and update the MR target branch when I get to it