The JUCE cross-platform C++ framework, with DISTRHO/KXStudio specific changes
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

74 lines
2.8KB

  1. /*
  2. ==============================================================================
  3. This file is part of the JUCE library - "Jules' Utility Class Extensions"
  4. Copyright 2004-11 by Raw Material Software Ltd.
  5. ------------------------------------------------------------------------------
  6. JUCE can be redistributed and/or modified under the terms of the GNU General
  7. Public License (Version 2), as published by the Free Software Foundation.
  8. A copy of the license is included in the JUCE distribution, or can be found
  9. online at www.gnu.org/licenses.
  10. JUCE is distributed in the hope that it will be useful, but WITHOUT ANY
  11. WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
  12. A PARTICULAR PURPOSE. See the GNU General Public License for more details.
  13. ------------------------------------------------------------------------------
  14. To release a closed-source product which uses JUCE, commercial licenses are
  15. available: visit www.rawmaterialsoftware.com/juce for more information.
  16. ==============================================================================
  17. */
  18. #ifndef __JUCE_BROWSERPLUGINCOMPONENT_JUCEHEADER__
  19. #define __JUCE_BROWSERPLUGINCOMPONENT_JUCEHEADER__
  20. //==============================================================================
  21. /**
  22. Base class for a browser plugin object.
  23. You need to implement a createBrowserPlugin() function that the host will call
  24. when it needs a new instance of your BrowserPluginComponent subclass. The host will
  25. delete the BrowserPluginComponent later when the user navigates away from the
  26. page.
  27. */
  28. class BrowserPluginComponent : public Component
  29. {
  30. public:
  31. //==============================================================================
  32. /**
  33. Creates a browser plugin object.
  34. @see createBrowserPlugin
  35. */
  36. BrowserPluginComponent();
  37. /** Destructor. */
  38. ~BrowserPluginComponent();
  39. //==============================================================================
  40. /** Returns a string describing the host browser version.
  41. */
  42. String getBrowserVersion() const;
  43. /** Returns the URL that the browser is currently showing.
  44. */
  45. String getBrowserURL() const;
  46. /** The plugin must implement this method to return a variant object whose
  47. properties and methods can be accessed by javascript in the browser.
  48. If your plugin doesn't need to represent itself, you can just return
  49. a void var() object here.
  50. */
  51. virtual var getJavascriptObject() = 0;
  52. private:
  53. //==============================================================================
  54. JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (BrowserPluginComponent);
  55. };
  56. #endif // __JUCE_BROWSERPLUGINCOMPONENT_JUCEHEADER__