Language Binding for Kotlin/Native

What are the requirements for a language binding to be included officially by GTK?

Currently I’m developing a kotlin wrapper, And I want to know what to develop for.

Currently I’m developing kotlinx-gtk for gtk3 with plans for gtk4 once I’m done. (To allow for users to choose between and maintain legacy support) (also currently for the Linux version only)

Another thing I am wondering on is what License should be used? Currently I have it just set to AGPL but I’m willing to change to conform to requirements.

3 Likes

There are no requirements, because there is no “official” set of bindings. Every language binding is developed independently from GTK.

Bindings authors can send a merge request to the GTK website if they want to have their binding listed; of course, we’re not going to add an hello world on the main landing page for every single binding, but we can add pages in the appropriate section.

I’d recommend targeting the current stable versions of GTK, so GTK4 and GTK3 in that order.

As for the license: your binding can use any license compatible with the license of GTK, since it has to link to the library. AGPL is an interesting choice, given that it would require providing access to the sources even when used server side, which is somewhat odd. Most bindings are either using LGPL-2.1-or-later, like GTK; the Rust bindings are released under a BSD license, which is somewhat iffy because the documentation of the library is under LGPL, and that means the Rust bindings maintainers have to allow building their project without the documentation.

I’ve separated my dsl from my wrappers now. And have mastered converting the signals of gtk3.

I’ve seen in GTK dev blogs images of a test application with each widget in it. Where is the code for that? (So I can attempt to replicate it)

It’s the GTK widget factory, and it’s part of the GTK demos.

Alright, So I’ve been developing for awhile and I have hit a road block. I am absolutely utterly confused on what is going on with MenuBars in GTK.

I can make them, but how do I get a callback? What is a GVariant, Why do GVariants exist, What is a GVariantType, How am I supposed to lookup a GMenuItem?

Those questions are far too generic.

I’d recommend:

Also: open a new topic if you want to ask questions about this aspect of the API.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.