TolkLua is a a bridge of Tolk library and Lua. Here is fully provided all API of.
- Place the Tolk DLLS either into your project directory or into Lua distributive binaries directory.
- Place the bridge DLL either into your project directory or into your Lua distributive directory where Lua searches the modules (see at package.path).
Please note that both the Tolk content and this Tolk bridge should be positioned at the same directory.
The bridge translates all API functions presented in Tolk library in mixed case excluding the status Tolk loading check. All types converts to appropriated native, so you not have to convert it by itself.
When you include the bridge it returns the table with all methods without "Tolk_" prefix and in mixed case on successfull loading.
tolk = require "tolklua"
if tolk then
print("Tolk successfully loaded!")
else
Print("An error has occurred when Tolk loading. The library is not loaded.")
end
As I said above, all types converts into native type both one way and the other.
tolk.hasSpeech()
> true
tolk.output("This is a test", true)
> true
You don't need to do any manipulations with returning and passing strings.
tolk.detectScreenReader()
> NVDA
tolk.speak("This is a test", true)
Please note: you have not need to unload the Tolk library using "Tolk_Unload()" method. Lua will do it itself when either script will be ended or when Lua garbage cleaner will decide collect this object due non-using in your code.
I am gonna replenish the tests examples where you can look how it works and how it can be used. Please look at "test" directory and explore the interesting one. Please note: if you would run these test examples, you have to either place the tolk content and this bridge to main Lua distributive directory or place it at the tests directory before run each of (see the installation section).
This bridge obeys under Tolk library license. Please look it at main Tolk repository.
This bridge written in collaboration of Sergey Parshakoff. Sergey teaches me in programming skills from 2015-th and we made many projects together. When I've asked him the help to understand this trouble, he has started this first, then I've kept developing and finalizing of. Thank you, Sergey!