Files
kotlin-fork/kotlin-native/samples/gtk
Stanislav Erokhin f624800b84 Move everything under kotlin-native folder
I was forced to manually do update the following files, because otherwise
they would be ignored according .gitignore settings. Probably they
should be deleted from repo.

Interop/.idea/compiler.xml
Interop/.idea/gradle.xml
Interop/.idea/libraries/Gradle__org_jetbrains_kotlin_kotlin_runtime_1_0_3.xml
Interop/.idea/libraries/Gradle__org_jetbrains_kotlin_kotlin_stdlib_1_0_3.xml
Interop/.idea/modules.xml
Interop/.idea/modules/Indexer/Indexer.iml
Interop/.idea/modules/Runtime/Runtime.iml
Interop/.idea/modules/StubGenerator/StubGenerator.iml
backend.native/backend.native.iml
backend.native/bc.frontend/bc.frontend.iml
backend.native/cli.bc/cli.bc.iml
backend.native/cli.bc/src/org/jetbrains/kotlin/cli/bc/K2Native.kt
backend.native/cli.bc/src/org/jetbrains/kotlin/cli/bc/K2NativeCompilerArguments.kt
backend.native/tests/link/lib/foo.kt
backend.native/tests/link/lib/foo2.kt
backend.native/tests/teamcity-test.property
2020-10-27 21:00:28 +03:00
..

GTK application

This example shows how one may use Kotlin/Native to build GUI applications with the GTK toolkit.

To build use ../gradlew assemble.

Do not forget to install GTK3. See bellow.

To run on Mac also install XQuartz X server (https://www.xquartz.org/), and then ../gradlew runReleaseExecutableGtk or execute the program directly:

./build/bin/gtk/main/release/executable/gtk.kexe

Dialog box with the button will be shown, and application will print message and terminate on button click.

GTK3 Install

on Mac use

brew install gtk+3

or

port install gtk3

on Debian flavours of Linux

sudo apt-get install libgtk-3-dev

on Fedora

sudo dnf install gtk3-devel

on Windows in MinGW64 console, if you do not have MSYS2-MinGW64 installed - install it first as described in http://www.msys2.org

pacman -S mingw-w64-x86_64-gtk3