Search code examples
c++npapifirebreath

can Firebreath detect the plugin object's 'width' and 'height' change?


can Firebreath detect the plugin object's 'width' and 'height' change as event, can it?

If no, does that mean I need to periodically check if the plugin object's width and height change. Then inside plugin, I modified my child window size? Does the parent window size even change following the object's width and height?


Solution

  • Things differ a little bit depending on what platform you're on, but generally you'll get a ResizedEvent from FireBreath (through your PluginWindow) whenever it's resized. The browser takes care of resizing.

    If you're using windowless on windows or any mac drawing platform then you'll only be drawing in response to a RefreshEvent (or derivative) and you can get the width and height from the PluginWindow at that time.