-
-
Save iffy/1515cda0c1bc1af77ae2cf6c61fdfe2b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jclass org.wiish.wiishexample.WiishActivity of JVMObject: | |
proc evalJavaScript(js: string) | |
type | |
WebviewWindow = ref object of BaseWindow | |
wiishActivity: WiishActivity | |
proc nimwin() : WebviewWindow {.exportc.} = app.window | |
proc executeSomeJS(js:string) = | |
app.window.wiishActivity.evalJavaScript("somefunc();") | |
{.emit: """ | |
JNIEXPORT void JNICALL Java_org_wiish_exampleapp_WiishActivity_wiish_1init | |
(JNIEnv * env, jobject obj) { | |
NimMain(); | |
nimwin()->wiishActivity = obj; | |
} | |
""" .} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment