You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The comms thread passes events to the main Odilia even loop (it'll have a Sender<OdiliaEvent>).
It will also have a Received<AtspiEvent> to send events to each plugin:
// Vec<wasmer::Instance> for instance in instances {let func = instant.get_function(func_name)?;func(&event);}
I'm on mobile, so excuse the mess, but I think this is a good start. We need pre_* and post_* hooks for atspi events, Odilia events, SSIP commands, and module loading itself (basically init and cleanup).
Init should probably return a ModuleOptions
enumHookSystem{OdiliaEvents,AtspiEvents,SsipCommands,ModuleLoading}enumHookSide{Pre,Post,Core,// implement/override core functionality}structHook{side:HookSide,system:HookSystem,}structModuleOptions{hooks:Vec<Hook>,core_mod:bool,// is a core module that overrides standard behaviour. Without it, a Hook which uses rhe HookSide::Core value will be rejected. Also nore that only one core mod per system is permitted.id:String,// a unique string to identify your module. If not unique, Odilia will remove the module with the same name, and load this one. This should not change wirh versions.version:String,// the version of the plugin being used}
Any comments? I realixe it'll be annoying to pass all those messages around, but I can't think of a better way.
EDIT: Tired and on mobile, will fix up grammsr/spelling later.
The text was updated successfully, but these errors were encountered:
Another thing to consider: threre is a reasonable chance that plugins may want to communicate with one another. I'm not sure how to cover this case easily.
We could have a dedicated communication thread between the SR and plugins—which is running on a blocking task.
Basically:
Plugin <-> Comm. Thread <-> SR
The comm thread will also be how we run each plugins' functions.
So let's say we had a
event(ev: Event)
for each plugin, so they could, in theory, do something based on an event, we would write the following:In the plugin,
beep-on-blank-line
The comms thread passes events to the main Odilia even loop (it'll have a
Sender<OdiliaEvent>
).It will also have a
Received<AtspiEvent>
to send events to each plugin:Finally, there is our atspi even loop:
I'm on mobile, so excuse the mess, but I think this is a good start. We need pre_* and post_* hooks for atspi events, Odilia events, SSIP commands, and module loading itself (basically init and cleanup).
Init should probably return a
ModuleOptions
Any comments? I realixe it'll be annoying to pass all those messages around, but I can't think of a better way.
EDIT: Tired and on mobile, will fix up grammsr/spelling later.
The text was updated successfully, but these errors were encountered: