-
Notifications
You must be signed in to change notification settings - Fork 47
Export Rime::Switcher #92
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Looks good, but do we really need |
I'll try it, but I think
|
Actually we cannot traverse the config untill |
|
OK, Please also commit a simple script that uses |
Line 470 in 0fdf0ad
https://github.com/rime/librime/blob/99e269c8eb251deddbad9b0d2c4d965b228f8006/src/rime/context.h#L21 function init(env)
local commit_notifier=env.engine.context.commit_notifier
env. commit_notifier_connected = commit_notifer:connect( function(ctx) ... end )
env.option_update_notifier_connected=env.engine.context.option_update_notifier:connect( function(ctx,option_name)
if option_name== "ascii_mode" then
end
end
)
end
function fini(env)
env.commit_notifier_connected:disconnect()
env.option_update_notifier_connected:disconnect()
end
|
With the [PR](hchunhui/librime-lua#92) merged, now lua can toggle a switch through selecting a candidate without actually commit the text. Close #36
With the [PR](hchunhui/librime-lua#92) merged, now lua can toggle a switch through selecting a candidate without actually commit the text. Close #36
|
請教一下 SwitcherReg make() 爲何 用 New Switcher(engine) 另外 switcher:active() ,menu 無法操作 |
|
我看到 engine.cc 里直接使用了 以下是我的猜测 第一是因为 第二是 至于 |
This change export
Rime::Switcherto Lua, so that users can directly manipulate it in alua_processor.My situation is to toggle a switch through selecting candidates, instead of key bindings. Following is partial of the
processor's code: