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 19#ifndef WebOverlayOverride_h 20#define WebOverlayOverride_h 21 22#include "BlackBerryGlobal.h" 23 24#include <BlackBerryPlatformPrimitives.h> 25 26namespace BlackBerry { 27namespace Platform { 28class String; 29} 30 31namespace WebKit { 32 33class WebAnimation; 34class WebOverlayPrivate; 35 36/** 37 * Compositing thread only 38 * 39 * Note that the WebAnimation class is not thread safe, but 40 * reentrant, and have to be created on the thread where they'll be used. 41 */ 42class BLACKBERRY_EXPORT WebOverlayOverride { 43public: 44 // Don't use this, call WebOverlay::override() instead 45 WebOverlayOverride(WebOverlayPrivate*); 46 ~WebOverlayOverride(); 47 48 void setPosition(const Platform::FloatPoint&); 49 void setAnchorPoint(const Platform::FloatPoint&); 50 void setSize(const Platform::FloatSize&); 51 void setTransform(const Platform::TransformationMatrix&); 52 void setOpacity(float); 53 54 void addAnimation(const WebAnimation&); 55 void removeAnimation(const BlackBerry::Platform::String& name); 56 57private: 58 friend class WebOverlayPrivate; 59 60 // Disable copy constructor and operator= 61 WebOverlayOverride(const WebOverlayOverride&); 62 WebOverlayOverride& operator=(const WebOverlayOverride&); 63 64 WebOverlayPrivate* d; 65 bool m_owned; 66}; 67 68} 69} 70 71#endif // WebOverlayOverride_h 72