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.

129 lines
3.1KB

  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. // (This file gets included by juce_linux_NativeCode.cpp, rather than being
  19. // compiled on its own).
  20. #ifdef JUCE_INCLUDED_FILE
  21. #if JUCE_WEB_BROWSER
  22. /*
  23. Sorry.. This class isn't implemented on Linux!
  24. */
  25. //==============================================================================
  26. WebBrowserComponent::WebBrowserComponent()
  27. : browser (0),
  28. blankPageShown (false)
  29. {
  30. setOpaque (true);
  31. }
  32. WebBrowserComponent::~WebBrowserComponent()
  33. {
  34. }
  35. //==============================================================================
  36. void WebBrowserComponent::goToURL (const String& url,
  37. const StringArray* headers,
  38. const MemoryBlock* postData)
  39. {
  40. lastURL = url;
  41. lastHeaders.clear();
  42. if (headers != 0)
  43. lastHeaders = *headers;
  44. lastPostData.setSize (0);
  45. if (postData != 0)
  46. lastPostData = *postData;
  47. blankPageShown = false;
  48. }
  49. void WebBrowserComponent::stop()
  50. {
  51. }
  52. void WebBrowserComponent::goBack()
  53. {
  54. lastURL = String::empty;
  55. blankPageShown = false;
  56. }
  57. void WebBrowserComponent::goForward()
  58. {
  59. lastURL = String::empty;
  60. }
  61. void WebBrowserComponent::refresh()
  62. {
  63. }
  64. //==============================================================================
  65. void WebBrowserComponent::paint (Graphics& g)
  66. {
  67. g.fillAll (Colours::white);
  68. }
  69. void WebBrowserComponent::checkWindowAssociation()
  70. {
  71. }
  72. void WebBrowserComponent::reloadLastURL()
  73. {
  74. if (lastURL.isNotEmpty())
  75. {
  76. goToURL (lastURL, &lastHeaders, &lastPostData);
  77. lastURL = String::empty;
  78. }
  79. }
  80. void WebBrowserComponent::parentHierarchyChanged()
  81. {
  82. checkWindowAssociation();
  83. }
  84. void WebBrowserComponent::resized()
  85. {
  86. }
  87. void WebBrowserComponent::visibilityChanged()
  88. {
  89. checkWindowAssociation();
  90. }
  91. bool WebBrowserComponent::pageAboutToLoad (const String& url)
  92. {
  93. return true;
  94. }
  95. #endif
  96. #endif