Far API entrypoint - technical intro chapter required

A place where plug-in developers can share their knowledge and experience.
Locked
techie
Posts: 28
Joined: Thu Feb 23, 2006 8:11 pm

Far API entrypoint - technical intro chapter required

Post by techie »

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
User avatar
t-rex
Admin
Posts: 417
Joined: Sun Mar 20, 2005 6:10 pm
Location: Ashdod
Contact:

Post by t-rex »

techie
You are welcome to write one.
techie
Posts: 28
Joined: Thu Feb 23, 2006 8:11 pm

Post by techie »

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?
User avatar
t-rex
Admin
Posts: 417
Joined: Sun Mar 20, 2005 6:10 pm
Location: Ashdod
Contact:

Post by t-rex »

techie wrote: I guess SetStartupInfo is the first call and it is done only once per far session.
Yep.
techie wrote: The second seems to be GetPluginInfo and it is also called only once.
No, it's called many times - before showing plugins menu, drives menu, etc.
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.
They do not spawn.
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?
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: P.S. Shouldn't OpenPlugin be present in Common functions part of this list?
Hm, maybe.
Locked