This example program enumerates all visible windows. It allocates a
WNDENUMPROC
callback functions that is called by
EnumWindows
for each window. The callback function is implemented in Kotlin.
The project uses Gradle with the Kotlin DSL, and the code is in Kotlin.
The Windows API Generator plugin is configured to generate the code
for a number of functions. The additional elements such the WNDENUMPROC
callback function and the WINDOWINFO struct are automatically added
as they are parameters of the requested functions.