#ifndef DeviceOrientationEvent_h
#define DeviceOrientationEvent_h
#include "core/events/Event.h"
#include "heap/Handle.h"
namespace WebCore {
class DeviceOrientationData;
class DeviceOrientationEvent FINAL : public Event {
public:
virtual ~DeviceOrientationEvent();
static PassRefPtrWillBeRawPtr<DeviceOrientationEvent> create()
{
return adoptRefWillBeNoop(new DeviceOrientationEvent);
}
static PassRefPtrWillBeRawPtr<DeviceOrientationEvent> create(const AtomicString& eventType, DeviceOrientationData* orientation)
{
return adoptRefWillBeNoop(new DeviceOrientationEvent(eventType, orientation));
}
void initDeviceOrientationEvent(const AtomicString& type, bool bubbles, bool cancelable, DeviceOrientationData*);
DeviceOrientationData* orientation() const { return m_orientation.get(); }
double alpha(bool& isNull) const;
double beta(bool& isNull) const;
double gamma(bool& isNull) const;
bool absolute(bool& isNull) const;
virtual const AtomicString& interfaceName() const OVERRIDE;
virtual void trace(Visitor*) OVERRIDE;
private:
DeviceOrientationEvent();
DeviceOrientationEvent(const AtomicString& eventType, DeviceOrientationData*);
RefPtrWillBeMember<DeviceOrientationData> m_orientation;
};
DEFINE_TYPE_CASTS(DeviceOrientationEvent, Event, event, event->interfaceName() == EventNames::DeviceOrientationEvent, event.interfaceName() == EventNames::DeviceOrientationEvent);
}
#endif