WebOverlayOverride.h 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. /*
  2. * Copyright (C) 2012 Research In Motion Limited. All rights reserved.
  3. *
  4. * This library is free software; you can redistribute it and/or
  5. * modify it under the terms of the GNU Lesser General Public
  6. * License as published by the Free Software Foundation; either
  7. * version 2 of the License, or (at your option) any later version.
  8. *
  9. * This library is distributed in the hope that it will be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  12. * Lesser General Public License for more details.
  13. *
  14. * You should have received a copy of the GNU Lesser General Public
  15. * License along with this library; if not, write to the Free Software
  16. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  17. */
  18. #ifndef WebOverlayOverride_h
  19. #define WebOverlayOverride_h
  20. #include "BlackBerryGlobal.h"
  21. #include <BlackBerryPlatformPrimitives.h>
  22. namespace BlackBerry {
  23. namespace Platform {
  24. class String;
  25. }
  26. namespace WebKit {
  27. class WebAnimation;
  28. class WebOverlayPrivate;
  29. /**
  30. * Compositing thread only
  31. *
  32. * Note that the WebAnimation class is not thread safe, but
  33. * reentrant, and have to be created on the thread where they'll be used.
  34. */
  35. class BLACKBERRY_EXPORT WebOverlayOverride {
  36. public:
  37. // Don't use this, call WebOverlay::override() instead
  38. WebOverlayOverride(WebOverlayPrivate*);
  39. ~WebOverlayOverride();
  40. void setPosition(const Platform::FloatPoint&);
  41. void setAnchorPoint(const Platform::FloatPoint&);
  42. void setSize(const Platform::FloatSize&);
  43. void setTransform(const Platform::TransformationMatrix&);
  44. void setOpacity(float);
  45. void addAnimation(const WebAnimation&);
  46. void removeAnimation(const BlackBerry::Platform::String& name);
  47. private:
  48. friend class WebOverlayPrivate;
  49. // Disable copy constructor and operator=
  50. WebOverlayOverride(const WebOverlayOverride&);
  51. WebOverlayOverride& operator=(const WebOverlayOverride&);
  52. WebOverlayPrivate* d;
  53. bool m_owned;
  54. };
  55. }
  56. }
  57. #endif // WebOverlayOverride_h