Question

I have to develop a windowed plugin for some of my requirement using firebreath. I have searched alot on google but did not find any helpful tutorial. This link gives some touch to windowed plugin in firebreath FireBreath Tips: Drawing on Windows. But this is not too much helpful. I am able to create window less plugin in firebreath as it tutorial available but no success for windowed plugin. Any one here knows any best tutorial, link or some code snippets for basic windowed plugin in firebreath then kindly share it.

Was it helpful?

Solution

I think you are misunderstanding some basic terminology here. All FireBreath plugins are windowed unless you specifically make them windowless.

A "windowed" plugin is one that has its own window, but that window is still in the page, positioned according to CSS and HTML, etc. The difference between windowed and windowless is that a windowed plugin can draw whenever it wants and always paints over whatever else is on the page, while a windowless plugin must draw only when the browser tells it to and participates in the z-indexing of the browser. Windowless plugins are nice because you can layer HTML elements on top of them, whereas windowed plugins perform better but always cover any HTML (including modal dialogs, dropdowns, etc) in the page.

Based on your question, I don't think you actually want to create a "windowed plugin", I suspect that you want to create a window from your plugin. If that's the case, basically you do it the same way you would in any C++ windows application, with the caveat that you must not block the main thread. Likely this means you'll want to create another thread to put the window on (assuming you're only caring about windows; other platforms will complicate things further) and then make certain that your other thread has been shut down quickly when the PluginCore::Shutdown method on your main plugin object finishes.

Welcome to plugin land, where your process and resources belong to someone else =]

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top