Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Plug-in mechanism for global scripts #281
Comment 1 by jteh on 2009-02-21 17:06
Mick and i were discussing a plugin mechanism a while ago. Basically, all modules in a plugins folder would be imported and certain code executed. This would allow global scripts to be bound, etc. However, it is important to note that all of these would be loaded at startup. On demand loading is not possible because NVDA has no way to know what scripts it will find in each module without importing it.
Comment 4 by aleksey_s on 2010-09-26 06:51
Comment 5 by jteh (in reply to comment 4) on 2010-09-29 06:20
Don't know much about that. However, if you think there are advantages to using it, please do tell.
This should be fairly easy if we do it similar to the way we list and load braille display/synth drivers.
In principle, I agree. However, experience has shown us that a terminate() method tends to be necessary for cleanup, as you can't guarantee when the destructor will be called. For example, you probably want it to be called before we terminate other NVDA components, but you can't guarantee that.
I assume you mean a map of event names to lists of plugin instances? In practical terms, I'm not sure how much this will actually matter and it does introduce an extra level of complication, but I agree that it's an optimisation worth considering.
I'd prefer just copy to enable. Simple and reduces confusion.
I think we should probably wait until input framework is done before major work begins on key bindings for plugins.
Agreed. We'll need to allow plugins to provide locale files.
I agree that this is needed, but imo, this ticket should focus on the core framework and other features should be dealt with later. For what it's worth, initially, I think we can just provide access to some core GUI stuff and let people add menu items using wx. We can think about nicer APIs later if they're really necessary.
See above; let's handle this later. However, as food for thought, I guess we could allow a plugin to specify a config spec and config section name.
Comment 8 by jteh on 2010-11-29 03:22
Comment 9 by aleksey_s (in reply to comment 8) on 2010-11-29 23:18
They should; consider making a plugin, which will play a sound icon depending on a state of an object in focus.