-
I'm using SDL to create a window for plugins to render on, and while I've been able to get the initial render to work correctly, the plugin doesn't respond to keyboard and mouse events. I assume this means that I need to forward events from SDL to the plugin, but there is no interface in the CLAP API to do so. How is this supposed to work? Do frameworks like JUCE have some way of registering plugins in its top level event loop, or are plugins responsible for their own event loop? And if the latter, how are hosts supposed to give plugins time to process GUI events? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 6 replies
-
What’s your os and daw? Mouse and keyboard are different and keyboard is tricky in some daws but basically yes you create a top level component which does a WM_MOUSE or the cocoa equiv or xembed so forth and that’s the component you return from gui create into the window object if you are in Linux then folks generally use the clap posix fd and timer extensions to setup callbacks into their loops. with keyboard some daws require settings to send kb events to the plugin |
Beta Was this translation helpful? Give feedback.
-
Sorry of me be a bit more precise the plugin gets handed an HWND nswindow erc and then it is the plugin responsibility to add itself to that component Line 178 in 41964fa so the daw job is to create an appropriate os level container with events erc and then pass it to the plugin using that api. My prior comment had the creation order a bit upside down (since plugins generally make a component of their own to reparent into that element) |
Beta Was this translation helpful? Give feedback.
One thing you could do is just not have embedded plugin windows. That is, write a tiny bit of WIN32 to open an entire new top level window and host in there as a popout. Bespoke uses that strategy (it even uses Juce windows) and basically so does Logic and Live. May be something which could make your life a lot easier?