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.

147 lines
5.9KB

  1. /*
  2. ==============================================================================
  3. This file is part of the JUCE library.
  4. Copyright (c) 2013 - Raw Material Software Ltd.
  5. Permission is granted to use this software under the terms of either:
  6. a) the GPL v2 (or any later version)
  7. b) the Affero GPL v3
  8. Details of these licenses can be found at: www.gnu.org/licenses
  9. JUCE is distributed in the hope that it will be useful, but WITHOUT ANY
  10. WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
  11. A PARTICULAR PURPOSE. See the GNU General Public License for more details.
  12. ------------------------------------------------------------------------------
  13. To release a closed-source product which uses JUCE, commercial licenses are
  14. available: visit www.juce.com for more information.
  15. ==============================================================================
  16. */
  17. #ifndef JUCE_BROWSER_PLUGIN_H_INCLUDED
  18. #define JUCE_BROWSER_PLUGIN_H_INCLUDED
  19. #include "../juce_gui_basics/juce_gui_basics.h"
  20. //=============================================================================
  21. /** Config: JUCE_BUILD_NPAPI
  22. Use this flag to enable or disable the building of an NPAPI verstion of your plugin.
  23. */
  24. #ifndef JUCE_BUILD_NPAPI
  25. #define JUCE_BUILD_NPAPI 1
  26. #endif
  27. /** Config: JUCE_BUILD_ACTIVEX
  28. Use this flag to enable or disable the building of an ActiveX verstion of your plugin.
  29. */
  30. #if JUCE_WINDOWS && ! defined (JUCE_BUILD_ACTIVEX)
  31. #define JUCE_BUILD_ACTIVEX 1
  32. #endif
  33. //=============================================================================
  34. /** JuceBrowserPlugin_Company
  35. This should be a quoted string containing the name of your company.
  36. */
  37. #ifndef JuceBrowserPlugin_Company
  38. #error "You must define the JuceBrowserPlugin_Company macro before including juce_browser_plugin.h!"
  39. #endif
  40. /** JuceBrowserPlugin_Name
  41. This should be a quoted string containing the name of your plugin.
  42. */
  43. #ifndef JuceBrowserPlugin_Name
  44. #error "You must define the JuceBrowserPlugin_Name macro before including juce_browser_plugin.h!"
  45. #endif
  46. /** JuceBrowserPlugin_Desc
  47. This should be a quoted string containing a description of your plugin.
  48. */
  49. #ifndef JuceBrowserPlugin_Desc
  50. #error "You must define the JuceBrowserPlugin_Desc macro before including juce_browser_plugin.h!"
  51. #endif
  52. //==============================================================================
  53. /** JuceBrowserPlugin_Desc
  54. This should be a quoted string containing a version number for your plugin, e.g. "1.0.0"
  55. The same version number must also be provided in the JuceBrowserPlugin_WinVersion setting.
  56. */
  57. #ifndef JuceBrowserPlugin_Version
  58. #error "You must define the JuceBrowserPlugin_Version macro before including juce_browser_plugin.h!"
  59. #endif
  60. /** JuceBrowserPlugin_Desc
  61. This should be a comma-separated windows resource version number for your plugin, e.g. 0, 1, 0, 0.
  62. It must be the same number as the JuceBrowserPlugin_Version setting.
  63. */
  64. #ifndef JuceBrowserPlugin_WinVersion
  65. #error "You must define the JuceBrowserPlugin_WinVersion macro before including juce_browser_plugin.h!"
  66. #endif
  67. //==============================================================================
  68. /** JuceBrowserPlugin_MimeType_Raw
  69. In your HTML, this is the 'type' parameter of the embed tag, e.g.
  70. <embed id="plugin" type="application/npjucedemo-plugin" width=90% height=500>
  71. Both the JuceBrowserPlugin_MimeType_Raw and JuceBrowserPlugin_MimeType must be the same string,
  72. but JuceBrowserPlugin_MimeType_Raw must have no quotes, whereas JuceBrowserPlugin_MimeType must be quoted.
  73. */
  74. #ifndef JuceBrowserPlugin_MimeType_Raw
  75. #error "You must define the JuceBrowserPlugin_MimeType_Raw macro before including juce_browser_plugin.h!"
  76. #endif
  77. /** JuceBrowserPlugin_MimeType
  78. In your HTML, this is the 'type' parameter of the embed tag, e.g.
  79. <embed id="plugin" type="application/npjucedemo-plugin" width=90% height=500>
  80. Both the JuceBrowserPlugin_MimeType_Raw and JuceBrowserPlugin_MimeType must be the same string,
  81. but JuceBrowserPlugin_MimeType_Raw must have no quotes, whereas JuceBrowserPlugin_MimeType must be quoted.
  82. */
  83. #ifndef JuceBrowserPlugin_MimeType
  84. #error "You must define the JuceBrowserPlugin_MimeType macro before including juce_browser_plugin.h!"
  85. #endif
  86. //==============================================================================
  87. /** JuceBrowserPlugin_FileSuffix
  88. Because plugins are associated with a file-type, this is the suffix of the file type the plugin
  89. can open. If you don't need to use it, just use a made-up name here, e.g. ".jucedemo". The string
  90. must be quoted.
  91. */
  92. #ifndef JuceBrowserPlugin_FileSuffix
  93. #error "You must define the JuceBrowserPlugin_FileSuffix macro before including juce_browser_plugin.h!"
  94. #endif
  95. /** JuceBrowserPlugin_ActiveXCLSID
  96. If you're building an ActiveX plugin, you'll need to create a unique GUID for
  97. your plugin. Use a tool like uuidgen.exe to create this. The guid must be defined here as a quoted
  98. string, e.g. "F683B990-3ADF-11DE-BDFE-F9CB55D89593".
  99. */
  100. #if JUCE_BUILD_ACTIVEX && ! defined (JuceBrowserPlugin_ActiveXCLSID)
  101. #error "You must define the JuceBrowserPlugin_ActiveXCLSID macro before including juce_browser_plugin.h!"
  102. #endif
  103. //=============================================================================
  104. namespace juce
  105. {
  106. #include "wrapper/juce_BrowserPluginComponent.h"
  107. }
  108. //==============================================================================
  109. /**
  110. This function must be implemented somewhere in your code to create the actual
  111. plugin object that you want to use.
  112. Obviously multiple instances may be used simultaneously, so be VERY cautious
  113. in your use of static variables!
  114. */
  115. juce::BrowserPluginComponent* JUCE_CALLTYPE createBrowserPlugin();
  116. #endif // JUCE_BROWSER_PLUGIN_H_INCLUDED