Hi Wynand, > This is meant to run inside a virtual console (like the quake console) > which receive all IO events primarily including mouse and keyboard > events. > > Any help would be greatly appreciated as I have no idea where to > start.
this is not easily possible, there's no libVim. And even if you're willing to modify vim's source, it will be a lot of work because vim insists on "owning" the main loop (ie, code execution sits in vim and it just calls its gui parts every now and then). This is not what you want when you're writing a game. One thing you could try would be running vim in a separate process and talk to it via IPC. To do this, you could add a new GUI to vim which does nothing but forward drawing commands etc to your app and receives key input commands from your app. MacVim takes this approach, you can take a look at it's modifications to vim's source for some ideas ( http://code.google.com/p/macvim/ ). Short overview: MacVim/gui_macvim.m implements the gui functions vim is going to call and forwards them to a MMBackend, which uses OS X' IPC mechanism to send them to another process. Apart from that, you only need to look at the required modifications to vim's core (macvim-*-patch.tar.gz in the downloads section). But it's still a lot of work. Sorry for the bad news :-| Nico --~--~---------~--~----~------------~-------~--~----~ You received this message from the "vim_dev" maillist. For more information, visit http://www.vim.org/maillist.php -~----------~----~----~----~------~----~------~--~---
