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
6.1KB

  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_BROWSER_PLUGIN_JUCEHEADER__
  19. #define __JUCE_BROWSER_PLUGIN_JUCEHEADER__
  20. #include "../juce_gui_basics/juce_gui_basics.h"
  21. //=============================================================================
  22. /** Config: JUCE_BUILD_NPAPI
  23. Use this flag to enable or disable the building of an NPAPI verstion of your plugin.
  24. */
  25. #ifndef JUCE_BUILD_NPAPI
  26. #define JUCE_BUILD_NPAPI 1
  27. #endif
  28. /** Config: JUCE_BUILD_ACTIVEX
  29. Use this flag to enable or disable the building of an ActiveX verstion of your plugin.
  30. */
  31. #if JUCE_WINDOWS && ! defined (JUCE_BUILD_ACTIVEX)
  32. #define JUCE_BUILD_ACTIVEX 1
  33. #endif
  34. //=============================================================================
  35. /** JuceBrowserPlugin_Company
  36. This should be a quoted string containing the name of your company.
  37. */
  38. #ifndef JuceBrowserPlugin_Company
  39. #error "You must define the JuceBrowserPlugin_Company macro before including juce_browser_plugin.h!"
  40. #endif
  41. /** JuceBrowserPlugin_Name
  42. This should be a quoted string containing the name of your plugin.
  43. */
  44. #ifndef JuceBrowserPlugin_Name
  45. #error "You must define the JuceBrowserPlugin_Name macro before including juce_browser_plugin.h!"
  46. #endif
  47. /** JuceBrowserPlugin_Desc
  48. This should be a quoted string containing a description of your plugin.
  49. */
  50. #ifndef JuceBrowserPlugin_Desc
  51. #error "You must define the JuceBrowserPlugin_Desc macro before including juce_browser_plugin.h!"
  52. #endif
  53. //==============================================================================
  54. /** JuceBrowserPlugin_Desc
  55. This should be a quoted string containing a version number for your plugin, e.g. "1.0.0"
  56. The same version number must also be provided in the JuceBrowserPlugin_WinVersion setting.
  57. */
  58. #ifndef JuceBrowserPlugin_Version
  59. #error "You must define the JuceBrowserPlugin_Version macro before including juce_browser_plugin.h!"
  60. #endif
  61. /** JuceBrowserPlugin_Desc
  62. This should be a comma-separated windows resource version number for your plugin, e.g. 0, 1, 0, 0.
  63. It must be the same number as the JuceBrowserPlugin_Version setting.
  64. */
  65. #ifndef JuceBrowserPlugin_WinVersion
  66. #error "You must define the JuceBrowserPlugin_WinVersion macro before including juce_browser_plugin.h!"
  67. #endif
  68. //==============================================================================
  69. /** JuceBrowserPlugin_MimeType_Raw
  70. In your HTML, this is the 'type' parameter of the embed tag, e.g.
  71. <embed id="plugin" type="application/npjucedemo-plugin" width=90% height=500>
  72. Both the JuceBrowserPlugin_MimeType_Raw and JuceBrowserPlugin_MimeType must be the same string,
  73. but JuceBrowserPlugin_MimeType_Raw must have no quotes, whereas JuceBrowserPlugin_MimeType must be quoted.
  74. */
  75. #ifndef JuceBrowserPlugin_MimeType_Raw
  76. #error "You must define the JuceBrowserPlugin_MimeType_Raw macro before including juce_browser_plugin.h!"
  77. #endif
  78. /** JuceBrowserPlugin_MimeType
  79. In your HTML, this is the 'type' parameter of the embed tag, e.g.
  80. <embed id="plugin" type="application/npjucedemo-plugin" width=90% height=500>
  81. Both the JuceBrowserPlugin_MimeType_Raw and JuceBrowserPlugin_MimeType must be the same string,
  82. but JuceBrowserPlugin_MimeType_Raw must have no quotes, whereas JuceBrowserPlugin_MimeType must be quoted.
  83. */
  84. #ifndef JuceBrowserPlugin_MimeType
  85. #error "You must define the JuceBrowserPlugin_MimeType macro before including juce_browser_plugin.h!"
  86. #endif
  87. //==============================================================================
  88. /** JuceBrowserPlugin_FileSuffix
  89. Because plugins are associated with a file-type, this is the suffix of the file type the plugin
  90. can open. If you don't need to use it, just use a made-up name here, e.g. ".jucedemo". The string
  91. must be quoted.
  92. */
  93. #ifndef JuceBrowserPlugin_FileSuffix
  94. #error "You must define the JuceBrowserPlugin_FileSuffix macro before including juce_browser_plugin.h!"
  95. #endif
  96. /** JuceBrowserPlugin_ActiveXCLSID
  97. If you're building an ActiveX plugin, you'll need to create a unique GUID for
  98. your plugin. Use a tool like uuidgen.exe to create this. The guid must be defined here as a quoted
  99. string, e.g. "F683B990-3ADF-11DE-BDFE-F9CB55D89593".
  100. */
  101. #if JUCE_BUILD_ACTIVEX && ! defined (JuceBrowserPlugin_ActiveXCLSID)
  102. #error "You must define the JuceBrowserPlugin_ActiveXCLSID macro before including juce_browser_plugin.h!"
  103. #endif
  104. //=============================================================================
  105. BEGIN_JUCE_NAMESPACE
  106. #include "wrapper/juce_BrowserPluginComponent.h"
  107. END_JUCE_NAMESPACE
  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_JUCEHEADER__