It will be nice to see diagram of Far interaction with plugins before the list of exported functions. For example - with information in which order and when specific functions are executed?
For now these are actual - SetStartupInfo, OpenPlugin, GetPluginInfo,
GetOpenPluginInfo
Far API entrypoint - technical intro chapter required
Well, it is possible if only somebody will supply me with info and physical write privileges (it looks like I've already got verbal ones). =) But my free time is very limited sometimes so I can't guarantee anything.
I guess SetStartupInfo is the first call and it is done only once per far session.
The second seems to be GetPluginInfo and it is also called only once.
Then OpenPlugin - called every time user makes interaction with plugin - either from cmd prefix or from plugins menu. Right? When every time I call a plugin I get another instance in memory. How can I keep only one plugin instance then? I do not want them to spawn endlessly.
And GetOpenPluginInfo seems to be called completely randomly, but definitely after ones above. I do not possess the logic to know when exactly and why. Any clues?
P.S. Shouldn't OpenPlugin be present in Common functions part of this list?
I guess SetStartupInfo is the first call and it is done only once per far session.
The second seems to be GetPluginInfo and it is also called only once.
Then OpenPlugin - called every time user makes interaction with plugin - either from cmd prefix or from plugins menu. Right? When every time I call a plugin I get another instance in memory. How can I keep only one plugin instance then? I do not want them to spawn endlessly.
And GetOpenPluginInfo seems to be called completely randomly, but definitely after ones above. I do not possess the logic to know when exactly and why. Any clues?
P.S. Shouldn't OpenPlugin be present in Common functions part of this list?
Yep.techie wrote: I guess SetStartupInfo is the first call and it is done only once per far session.
No, it's called many times - before showing plugins menu, drives menu, etc.techie wrote: The second seems to be GetPluginInfo and it is also called only once.
They do not spawn.techie wrote: Then OpenPlugin - called every time user makes interaction with plugin - either from cmd prefix or from plugins menu. Right? When every time I call a plugin I get another instance in memory. How can I keep only one plugin instance then? I do not want them to spawn endlessly.
GetOpenPluginInfo is called only if a plugin has an open panel, it's called many times to get info on plugin's panel state when user interacts with the plugin's panel.techie wrote: And GetOpenPluginInfo seems to be called completely randomly, but definitely after ones above. I do not possess the logic to know when exactly and why. Any clues?
Hm, maybe.techie wrote: P.S. Shouldn't OpenPlugin be present in Common functions part of this list?