WebAnimation.h 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  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 WebAnimation_h
  19. #define WebAnimation_h
  20. #include "BlackBerryGlobal.h"
  21. #include <BlackBerryPlatformPrimitives.h>
  22. namespace BlackBerry {
  23. namespace WebKit {
  24. class WebAnimationPrivate;
  25. /**
  26. * Represents an animation running on an overlay.
  27. *
  28. * WebAnimation is not thread safe, but it is reentrant. This means that
  29. * instances can be created on different threads, but must be used on the
  30. * thread where they were created.
  31. */
  32. class BLACKBERRY_EXPORT WebAnimation {
  33. public:
  34. static WebAnimation fadeAnimation(const BlackBerry::Platform::String& name, float from, float to, double duration);
  35. static WebAnimation shrinkAnimation(const BlackBerry::Platform::String& name, float from, float to, double duration);
  36. WebAnimation();
  37. WebAnimation(const WebAnimation&);
  38. ~WebAnimation();
  39. WebAnimation& operator=(const WebAnimation&);
  40. BlackBerry::Platform::String name() const;
  41. protected:
  42. friend class WebOverlay;
  43. friend class WebOverlayOverride;
  44. friend class WebOverlayPrivate;
  45. WebAnimationPrivate* d;
  46. };
  47. }
  48. }
  49. #endif // WebAnimation_h