Unfortunately, as I said, I don’t have a ready-made example, though there are plenty of FFI snippets for other things in those links and elsewhere. I only brought it up on the off chance somebody might run with it.
That said, some windowing stuff is a decent idea for a sample to include whenever I do find a chance to work on the plugin again.