Skip to content

Repository files navigation

june

JUNE is a Nim binding of the JUCE framework, allowing fast prototyping JUCE applications in your favourite compiled programming language.

Build From Source

Build the JUCE shared library.

nimble juce_debug
# nimble juce_release

Then build the nim test (tweak nim.cfg if needed).

nimble app_debug
# nimble app_release

Example Application

A simple example application (subject to changes):

import june
{.emit: """/*INCLUDESECTION*/#include <june.h>""".}
defineCppClassTestApplicationofJUCEApplication:
window: ptrDocumentWindowprocconstructTestApplication*(): TestApplication=result=TestApplication()
proccreateApplication(): ptrJUCEApplication=var application: ptrTestApplication=cnewconstructTestApplication()
application.window =nil
application[].onGetApplicationName =bindClosure(proc(): String="JUNE App")
application[].onGetApplicationVersion =bindClosure(proc(): String="0.1")
application[].onInitialise =bindClosure(proc(commandLine: String) =var windowName = application[].getApplicationName()
application[].window =newDocumentWindow(windowName, makeColour(50'u8, 62'u8, 68'u8, 255'u8), DocumentWindow_allButtons, true)
application[].window[].onCloseButtonPressed =bindClosure(proc() =JUCEApplication.getInstance().systemRequestedQuit())
application[].window[].setResizable(true, true)
application[].window[].centreWithSize(640, 480)
application[].window[].setVisible(true)
)
application[].onShutdown =bindClosure(proc() =cdelete(application[].window)
application[].window =nil
)
application[].onSystemRequestedQuit =bindClosure(proc() = application[].quit())
result= application
whenisMainModule:
START_JUCE_APPLICATION(createApplication)

Will look like this:

https://github.com/kunitoki/june/blob/main/assets/example_app.png?raw=true

About

JUCE Framework Bindings For Nim

Resources

Stars

8 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages