Heh-heh...
> I'm not a big believer in custom DLL extension interfaces
I'm not a big fan either--I always say 90+% of the time, if you need
to make a new interface... you're probably missing something.
Which, is why before I even started I went back thru the mailing list
to see how DLL extension for SciTE are made, just so I didn't have to
modify SciTE itself.
Once I found that there wasn't... I looked at the DirectorExtension,
but it had some drawbacks:
- Out of proc.... not a big fan of that, and because it's out of
proc,
- didn't support synchronous calls, which I wanted
- it also was likely to be underperforming for some low-latency,
high volume events (OnKey)
- I wasn't thrilled about all the string encoding/decoding.
- I think one of the things I'm doing might want access to the
Scintilla buffer.
So, I started with simply adding as little as possible to the Director
Extension, figuring I would try to not invent anything not absoluetly
neccesary, but it was clear that it was still going to sub-optimal.
> .. COM (and similar) was supposed to enable in a better way.
LOL... I guess I'm glad that you never decided to add a COM interface
to ScITE.. [shudder]...
That all being said, maybe I need to think this through once more...
*thinks hard*
Hang on here... maybe I *can* make it a bit simpler, and less
"original"
Perhaps I'll drop the string message parameters alltogether, and
instead, use a single function which has a more familiar
declaration...
ExtensionMsgProc( UINT iMessage, WPARAM wParam, LPARAM lParam )
If I do that, I'll just simply use the (prexisting) appopriate Message
identifiers for all the events. well... at that point i might as well
also add a lower-level hook into SciTEWin::WndProc, so that the
extension can handle/consume what ever it likes.
That would drop all the rest of the unnecessary string handling, and
the "unhandled-message-happy-path" would be really really tight--the
extension can do a switch on the message and return nearly instantly.
Hmm... I can drop the DynamicExtension's handling/replaying of messges
that I'd get from hooking into WndProc, and keep only the functions
that I won't get at the appropriate time by handling SC_NOTIFICATION:
Initialise,Finalise, OnMacro(?), OnExecute, OnSwitchFile,
ActivateBuffer,
InitBuffer, Load, Close, RemoveBuffer, OnOpen, OnBeforeSave,
OnSave, Clear
...
This would make it no harder--hell, probably even *easier* to
implement an extension DLL, and pretty much removes all the
limitations.
I think I have some more codin' to do!
thanks,
G