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.

88 lines
3.2KB

  1. /*
  2. ==============================================================================
  3. This file is part of the JUCE library - "Jules' Utility Class Extensions"
  4. Copyright 2004-9 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. #include "../../../../juce/juce_amalgamated.h"
  21. //==============================================================================
  22. /**
  23. Base class for a browser plugin object.
  24. You need to implement a createBrowserPlugin() function that the host will call
  25. when it needs a new instance of your BrowserPluginComponent subclass. The host will
  26. delete the BrowserPluginComponent later when the user navigates away from the
  27. page.
  28. */
  29. class BrowserPluginComponent : public Component
  30. {
  31. public:
  32. //==============================================================================
  33. /**
  34. Creates a browser plugin object.
  35. @see createBrowserPlugin
  36. */
  37. BrowserPluginComponent();
  38. /** Destructor. */
  39. ~BrowserPluginComponent();
  40. //==============================================================================
  41. /** Returns a string describing the host browser version.
  42. */
  43. const String getBrowserVersion() const;
  44. /** Returns the URL that the browser is currently showing.
  45. */
  46. const String getBrowserURL() const;
  47. /** The plugin must implement this method to return a variant object whose
  48. properties and methods can be accessed by javascript in the browser.
  49. If your plugin doesn't need to represent itself, you can just return
  50. a void var() object here.
  51. */
  52. virtual const var getJavascriptObject() = 0;
  53. //==============================================================================
  54. juce_UseDebuggingNewOperator
  55. };
  56. //==============================================================================
  57. /**
  58. This function must be implemented somewhere in your code to create the actual
  59. plugin object that you want to use.
  60. Obviously multiple instances may be used simultaneously, so be VERY cautious
  61. in your use of static variables!
  62. */
  63. BrowserPluginComponent* JUCE_CALLTYPE createBrowserPlugin();
  64. #endif // __JUCE_BROWSERPLUGINCOMPONENT_JUCEHEADER__