webkit  2cdf99a9e3038c7e01b3c37e8ad903ecbe5eecf1
https://github.com/WebKit/webkit
Classes | Public Types | Public Member Functions | Static Public Member Functions | List of all members
WebCore::KeyboardEvent Class Referencefinal

#include <KeyboardEvent.h>

Inheritance diagram for WebCore::KeyboardEvent:
WebCore::UIEventWithKeyState WebCore::UIEventWithKeyState WebCore::UIEvent WebCore::UIEvent WebCore::UIEvent WebCore::UIEvent WebCore::Event WebCore::Event WebCore::Event WebCore::Event WebCore::Event WebCore::Event WebCore::Event WebCore::Event

Classes

struct  Init
 

Public Types

enum  KeyLocationCode {
  DOM_KEY_LOCATION_STANDARD = 0x00, DOM_KEY_LOCATION_LEFT = 0x01, DOM_KEY_LOCATION_RIGHT = 0x02, DOM_KEY_LOCATION_NUMPAD = 0x03,
  DOM_KEY_LOCATION_STANDARD = 0x00, DOM_KEY_LOCATION_LEFT = 0x01, DOM_KEY_LOCATION_RIGHT = 0x02, DOM_KEY_LOCATION_NUMPAD = 0x03
}
 
enum  KeyLocationCode {
  DOM_KEY_LOCATION_STANDARD = 0x00, DOM_KEY_LOCATION_LEFT = 0x01, DOM_KEY_LOCATION_RIGHT = 0x02, DOM_KEY_LOCATION_NUMPAD = 0x03,
  DOM_KEY_LOCATION_STANDARD = 0x00, DOM_KEY_LOCATION_LEFT = 0x01, DOM_KEY_LOCATION_RIGHT = 0x02, DOM_KEY_LOCATION_NUMPAD = 0x03
}
 
- Public Types inherited from WebCore::Event
enum  IsTrusted { IsTrusted::No, IsTrusted::Yes, IsTrusted::No, IsTrusted::Yes }
 
enum  PhaseType {
  NONE = 0, CAPTURING_PHASE = 1, AT_TARGET = 2, BUBBLING_PHASE = 3,
  NONE = 0, CAPTURING_PHASE = 1, AT_TARGET = 2, BUBBLING_PHASE = 3
}
 
enum  IsTrusted { IsTrusted::No, IsTrusted::Yes, IsTrusted::No, IsTrusted::Yes }
 
enum  PhaseType {
  NONE = 0, CAPTURING_PHASE = 1, AT_TARGET = 2, BUBBLING_PHASE = 3,
  NONE = 0, CAPTURING_PHASE = 1, AT_TARGET = 2, BUBBLING_PHASE = 3
}
 

Public Member Functions

virtual ~KeyboardEvent ()
 
WEBCORE_EXPORT void initKeyboardEvent (const AtomicString &type, bool canBubble, bool cancelable, DOMWindow *, const String &keyIdentifier, unsigned location, bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, bool altGraphKey=false)
 
const StringkeyIdentifier () const
 
unsigned location () const
 
bool repeat () const
 
WEBCORE_EXPORT bool getModifierState (const String &keyIdentifier) const
 
const PlatformKeyboardEventkeyEvent () const
 
WEBCORE_EXPORT int keyCode () const
 
WEBCORE_EXPORT int charCode () const
 
EventInterface eventInterface () const final
 
bool isKeyboardEvent () const final
 
int which () const final
 
bool isComposing () const
 
virtual ~KeyboardEvent ()
 
WEBCORE_EXPORT void initKeyboardEvent (const AtomicString &type, bool canBubble, bool cancelable, DOMWindow *, const String &keyIdentifier, unsigned location, bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, bool altGraphKey=false)
 
const StringkeyIdentifier () const
 
unsigned location () const
 
bool repeat () const
 
WEBCORE_EXPORT bool getModifierState (const String &keyIdentifier) const
 
const PlatformKeyboardEventkeyEvent () const
 
WEBCORE_EXPORT int keyCode () const
 
WEBCORE_EXPORT int charCode () const
 
EventInterface eventInterface () const final
 
bool isKeyboardEvent () const final
 
int which () const final
 
bool isComposing () const
 
- Public Member Functions inherited from WebCore::UIEventWithKeyState
bool ctrlKey () const
 
bool shiftKey () const
 
bool altKey () const
 
bool metaKey () const
 
bool altGraphKey () const
 
bool capsLockKey () const
 
bool ctrlKey () const
 
bool shiftKey () const
 
bool altKey () const
 
bool metaKey () const
 
bool altGraphKey () const
 
bool capsLockKey () const
 
- Public Member Functions inherited from WebCore::UIEvent
virtual ~UIEvent ()
 
WEBCORE_EXPORT void initUIEvent (const AtomicString &type, bool canBubble, bool cancelable, DOMWindow *, int detail)
 
DOMWindowview () const
 
int detail () const
 
virtual int layerX ()
 
virtual int layerY ()
 
virtual int pageX () const
 
virtual int pageY () const
 
virtual ~UIEvent ()
 
WEBCORE_EXPORT void initUIEvent (const AtomicString &type, bool canBubble, bool cancelable, DOMWindow *, int detail)
 
DOMWindowview () const
 
int detail () const
 
EventInterface eventInterface () const override
 
virtual int layerX ()
 
virtual int layerY ()
 
virtual int pageX () const
 
virtual int pageY () const
 
- Public Member Functions inherited from WebCore::Event
virtual ~Event ()
 
WEBCORE_EXPORT void initEvent (const AtomicString &type, bool canBubble, bool cancelable)
 
bool isInitialized () const
 
const AtomicStringtype () const
 
void setType (const AtomicString &type)
 
EventTargettarget () const
 
void setTarget (RefPtr< EventTarget > &&)
 
EventTargetcurrentTarget () const
 
void setCurrentTarget (EventTarget *)
 
unsigned short eventPhase () const
 
void setEventPhase (unsigned short eventPhase)
 
bool bubbles () const
 
bool cancelable () const
 
WEBCORE_EXPORT bool composed () const
 
DOMTimeStamp timeStamp () const
 
void setEventPath (const EventPath &path)
 
void clearEventPath ()
 
Vector< EventTarget * > composedPath () const
 
void stopPropagation ()
 
void stopImmediatePropagation ()
 
bool isTrusted () const
 
void setUntrusted ()
 
EventTargetsrcElement () const
 
bool legacyReturnValue () const
 
void setLegacyReturnValue (bool returnValue)
 
virtual bool isMouseEvent () const
 
virtual bool isFocusEvent () const
 
virtual bool isInputEvent () const
 
virtual bool isCompositionEvent () const
 
virtual bool isTouchEvent () const
 
virtual bool isClipboardEvent () const
 
virtual bool isBeforeTextInsertedEvent () const
 
virtual bool isBeforeUnloadEvent () const
 
virtual bool isErrorEvent () const
 
virtual bool isTextEvent () const
 
virtual bool isWheelEvent () const
 
bool propagationStopped () const
 
bool immediatePropagationStopped () const
 
void resetPropagationFlags ()
 
bool defaultPrevented () const
 
void preventDefault ()
 
void setDefaultPrevented (bool defaultPrevented)
 
bool defaultHandled () const
 
void setDefaultHandled ()
 
void setInPassiveListener (bool value)
 
bool cancelBubble () const
 
void setCancelBubble (bool)
 
EventunderlyingEvent () const
 
void setUnderlyingEvent (Event *)
 
bool isBeingDispatched () const
 
virtual EventTargetrelatedTarget () const
 
virtual ~Event ()
 
WEBCORE_EXPORT void initEvent (const AtomicString &type, bool canBubble, bool cancelable)
 
bool isInitialized () const
 
const AtomicStringtype () const
 
void setType (const AtomicString &type)
 
EventTargettarget () const
 
void setTarget (RefPtr< EventTarget > &&)
 
EventTargetcurrentTarget () const
 
void setCurrentTarget (EventTarget *)
 
unsigned short eventPhase () const
 
void setEventPhase (unsigned short eventPhase)
 
bool bubbles () const
 
bool cancelable () const
 
WEBCORE_EXPORT bool composed () const
 
DOMTimeStamp timeStamp () const
 
void setEventPath (const EventPath &path)
 
void clearEventPath ()
 
Vector< EventTarget * > composedPath () const
 
void stopPropagation ()
 
void stopImmediatePropagation ()
 
bool isTrusted () const
 
void setUntrusted ()
 
EventTargetsrcElement () const
 
bool legacyReturnValue () const
 
void setLegacyReturnValue (bool returnValue)
 
virtual bool isMouseEvent () const
 
virtual bool isFocusEvent () const
 
virtual bool isInputEvent () const
 
virtual bool isCompositionEvent () const
 
virtual bool isTouchEvent () const
 
virtual bool isClipboardEvent () const
 
virtual bool isBeforeTextInsertedEvent () const
 
virtual bool isBeforeUnloadEvent () const
 
virtual bool isErrorEvent () const
 
virtual bool isTextEvent () const
 
virtual bool isWheelEvent () const
 
bool propagationStopped () const
 
bool immediatePropagationStopped () const
 
void resetPropagationFlags ()
 
bool defaultPrevented () const
 
void preventDefault ()
 
void setDefaultPrevented (bool defaultPrevented)
 
bool defaultHandled () const
 
void setDefaultHandled ()
 
void setInPassiveListener (bool value)
 
bool cancelBubble () const
 
void setCancelBubble (bool)
 
EventunderlyingEvent () const
 
void setUnderlyingEvent (Event *)
 
bool isBeingDispatched () const
 
virtual EventTargetrelatedTarget () const
 
- Public Member Functions inherited from WebCore::ScriptWrappable
JSDOMObjectwrapper () const
 
void setWrapper (JSDOMObject *, JSC::WeakHandleOwner *, void *)
 
void clearWrapper (JSDOMObject *)
 
JSDOMObjectwrapper () const
 
void setWrapper (JSDOMObject *, JSC::WeakHandleOwner *, void *)
 
void clearWrapper (JSDOMObject *)
 
- Public Member Functions inherited from WTF::RefCounted< Event >
void deref () const
 
void deref () const
 
void deref () const
 
- Public Member Functions inherited from WTF::RefCountedBase
void ref () const
 
bool hasOneRef () const
 
unsigned refCount () const
 
void relaxAdoptionRequirement ()
 
void ref () const
 
bool hasOneRef () const
 
unsigned refCount () const
 
void relaxAdoptionRequirement ()
 
void ref () const
 
bool hasOneRef () const
 
unsigned refCount () const
 
void relaxAdoptionRequirement ()
 

Static Public Member Functions

static Ref< KeyboardEventcreate (const PlatformKeyboardEvent &platformEvent, DOMWindow *view)
 
static Ref< KeyboardEventcreateForBindings ()
 
static Ref< KeyboardEventcreate (const AtomicString &type, const Init &initializer, IsTrusted isTrusted=IsTrusted::No)
 
static Ref< KeyboardEventcreateForDummy ()
 
static Ref< KeyboardEventcreate (const PlatformKeyboardEvent &platformEvent, DOMWindow *view)
 
static Ref< KeyboardEventcreateForBindings ()
 
static Ref< KeyboardEventcreate (const AtomicString &type, const Init &initializer, IsTrusted isTrusted=IsTrusted::No)
 
static Ref< KeyboardEventcreateForDummy ()
 
- Static Public Member Functions inherited from WebCore::UIEvent
static Ref< UIEventcreate (const AtomicString &type, bool canBubble, bool cancelable, DOMWindow *view, int detail)
 
static Ref< UIEventcreateForBindings ()
 
static Ref< UIEventcreate (const AtomicString &type, const UIEventInit &initializer, IsTrusted isTrusted=IsTrusted::No)
 
static Ref< UIEventcreate (const AtomicString &type, bool canBubble, bool cancelable, DOMWindow *view, int detail)
 
static Ref< UIEventcreateForBindings ()
 
static Ref< UIEventcreate (const AtomicString &type, const UIEventInit &initializer, IsTrusted isTrusted=IsTrusted::No)
 
- Static Public Member Functions inherited from WebCore::Event
static Ref< Eventcreate (const AtomicString &type, bool canBubble, bool cancelable)
 
static Ref< EventcreateForBindings ()
 
static Ref< Eventcreate (const AtomicString &type, const EventInit &initializer, IsTrusted isTrusted=IsTrusted::No)
 
static Ref< Eventcreate (const AtomicString &type, bool canBubble, bool cancelable)
 
static Ref< EventcreateForBindings ()
 
static Ref< Eventcreate (const AtomicString &type, const EventInit &initializer, IsTrusted isTrusted=IsTrusted::No)
 
- Static Public Member Functions inherited from WebCore::ScriptWrappable
template<typename Derived >
static ptrdiff_t offsetOfWrapper ()
 
template<typename Derived >
static ptrdiff_t offsetOfWrapper ()
 

Additional Inherited Members

- Protected Member Functions inherited from WebCore::UIEventWithKeyState
 UIEventWithKeyState ()=default
 
 UIEventWithKeyState (const AtomicString &type, bool canBubble, bool cancelable, DOMWindow *view, int detail, bool ctrlKey, bool altKey, bool shiftKey, bool metaKey)
 
 UIEventWithKeyState (const AtomicString &type, bool canBubble, bool cancelable, double timestamp, DOMWindow *view, int detail, bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, bool altGraphKey, bool capsLockKey)
 
 UIEventWithKeyState (const AtomicString &type, const EventModifierInit &initializer, IsTrusted isTrusted)
 
 UIEventWithKeyState ()=default
 
 UIEventWithKeyState (const AtomicString &type, bool canBubble, bool cancelable, DOMWindow *view, int detail, bool ctrlKey, bool altKey, bool shiftKey, bool metaKey)
 
 UIEventWithKeyState (const AtomicString &type, bool canBubble, bool cancelable, double timestamp, DOMWindow *view, int detail, bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, bool altGraphKey, bool capsLockKey)
 
 UIEventWithKeyState (const AtomicString &type, const EventModifierInit &initializer, IsTrusted isTrusted)
 
- Protected Member Functions inherited from WebCore::UIEvent
 UIEvent ()
 
 UIEvent (const AtomicString &type, bool canBubble, bool cancelable, DOMWindow *, int detail)
 
 UIEvent (const AtomicString &type, bool canBubble, bool cancelable, double timestamp, DOMWindow *, int detail)
 
 UIEvent (const AtomicString &, const UIEventInit &, IsTrusted)
 
 UIEvent ()
 
 UIEvent (const AtomicString &type, bool canBubble, bool cancelable, DOMWindow *, int detail)
 
 UIEvent (const AtomicString &type, bool canBubble, bool cancelable, double timestamp, DOMWindow *, int detail)
 
 UIEvent (const AtomicString &, const UIEventInit &, IsTrusted)
 
- Protected Member Functions inherited from WebCore::Event
 Event (IsTrusted=IsTrusted::No)
 
WEBCORE_EXPORT Event (const AtomicString &type, bool canBubble, bool cancelable)
 
 Event (const AtomicString &type, bool canBubble, bool cancelable, double timestamp)
 
 Event (const AtomicString &type, const EventInit &, IsTrusted)
 
virtual void receivedTarget ()
 
bool dispatched () const
 
 Event (IsTrusted=IsTrusted::No)
 
WEBCORE_EXPORT Event (const AtomicString &type, bool canBubble, bool cancelable)
 
 Event (const AtomicString &type, bool canBubble, bool cancelable, double timestamp)
 
 Event (const AtomicString &type, const EventInit &, IsTrusted)
 
virtual void receivedTarget ()
 
bool dispatched () const
 
- Protected Member Functions inherited from WebCore::ScriptWrappable
 ~ScriptWrappable ()
 
 ~ScriptWrappable ()
 
- Protected Member Functions inherited from WTF::RefCounted< Event >
 RefCounted ()
 
 RefCounted ()
 
 RefCounted ()
 
 ~RefCounted ()
 
 ~RefCounted ()
 
 ~RefCounted ()
 
- Protected Member Functions inherited from WTF::RefCountedBase
 RefCountedBase ()
 
 ~RefCountedBase ()
 
bool derefBase () const
 
bool deletionHasBegun () const
 
 RefCountedBase ()
 
 ~RefCountedBase ()
 
bool derefBase () const
 
bool deletionHasBegun () const
 
 RefCountedBase ()
 
 ~RefCountedBase ()
 
bool derefBase () const
 
bool deletionHasBegun () const
 
- Protected Attributes inherited from WebCore::UIEventWithKeyState
bool m_ctrlKey { false }
 
bool m_altKey { false }
 
bool m_shiftKey { false }
 
bool m_metaKey { false }
 
bool m_altGraphKey { false }
 
bool m_capsLockKey { false }
 

Member Enumeration Documentation

◆ KeyLocationCode [1/2]

Enumerator
DOM_KEY_LOCATION_STANDARD 
DOM_KEY_LOCATION_LEFT 
DOM_KEY_LOCATION_RIGHT 
DOM_KEY_LOCATION_NUMPAD 
DOM_KEY_LOCATION_STANDARD 
DOM_KEY_LOCATION_LEFT 
DOM_KEY_LOCATION_RIGHT 
DOM_KEY_LOCATION_NUMPAD 

◆ KeyLocationCode [2/2]

Enumerator
DOM_KEY_LOCATION_STANDARD 
DOM_KEY_LOCATION_LEFT 
DOM_KEY_LOCATION_RIGHT 
DOM_KEY_LOCATION_NUMPAD 
DOM_KEY_LOCATION_STANDARD 
DOM_KEY_LOCATION_LEFT 
DOM_KEY_LOCATION_RIGHT 
DOM_KEY_LOCATION_NUMPAD 

Constructor & Destructor Documentation

◆ ~KeyboardEvent() [1/2]

KeyboardEvent::~KeyboardEvent ( )
virtual

◆ ~KeyboardEvent() [2/2]

virtual WebCore::KeyboardEvent::~KeyboardEvent ( )
virtual

Member Function Documentation

◆ charCode() [1/2]

int KeyboardEvent::charCode ( ) const

◆ charCode() [2/2]

WEBCORE_EXPORT int WebCore::KeyboardEvent::charCode ( ) const

◆ create() [1/4]

static Ref<KeyboardEvent> WebCore::KeyboardEvent::create ( const PlatformKeyboardEvent platformEvent,
DOMWindow view 
)
inlinestatic

◆ create() [2/4]

static Ref<KeyboardEvent> WebCore::KeyboardEvent::create ( const PlatformKeyboardEvent platformEvent,
DOMWindow view 
)
inlinestatic

◆ create() [3/4]

static Ref<KeyboardEvent> WebCore::KeyboardEvent::create ( const AtomicString type,
const Init initializer,
IsTrusted  isTrusted = IsTrusted::No 
)
inlinestatic

◆ create() [4/4]

static Ref<KeyboardEvent> WebCore::KeyboardEvent::create ( const AtomicString type,
const Init initializer,
IsTrusted  isTrusted = IsTrusted::No 
)
inlinestatic

◆ createForBindings() [1/2]

static Ref<KeyboardEvent> WebCore::KeyboardEvent::createForBindings ( )
inlinestatic

◆ createForBindings() [2/2]

static Ref<KeyboardEvent> WebCore::KeyboardEvent::createForBindings ( )
inlinestatic

◆ createForDummy() [1/2]

static Ref<KeyboardEvent> WebCore::KeyboardEvent::createForDummy ( )
inlinestatic

◆ createForDummy() [2/2]

static Ref<KeyboardEvent> WebCore::KeyboardEvent::createForDummy ( )
inlinestatic

◆ eventInterface() [1/2]

EventInterface KeyboardEvent::eventInterface ( ) const
finalvirtual

Reimplemented from WebCore::Event.

◆ eventInterface() [2/2]

EventInterface WebCore::KeyboardEvent::eventInterface ( ) const
finalvirtual

Reimplemented from WebCore::UIEvent.

◆ getModifierState() [1/2]

bool KeyboardEvent::getModifierState ( const String keyIdentifier) const

◆ getModifierState() [2/2]

WEBCORE_EXPORT bool WebCore::KeyboardEvent::getModifierState ( const String keyIdentifier) const

◆ initKeyboardEvent() [1/2]

void KeyboardEvent::initKeyboardEvent ( const AtomicString type,
bool  canBubble,
bool  cancelable,
DOMWindow view,
const String keyIdentifier,
unsigned  location,
bool  ctrlKey,
bool  altKey,
bool  shiftKey,
bool  metaKey,
bool  altGraphKey = false 
)

◆ initKeyboardEvent() [2/2]

WEBCORE_EXPORT void WebCore::KeyboardEvent::initKeyboardEvent ( const AtomicString type,
bool  canBubble,
bool  cancelable,
DOMWindow ,
const String keyIdentifier,
unsigned  location,
bool  ctrlKey,
bool  altKey,
bool  shiftKey,
bool  metaKey,
bool  altGraphKey = false 
)

◆ isComposing() [1/2]

bool WebCore::KeyboardEvent::isComposing ( ) const
inline

◆ isComposing() [2/2]

bool WebCore::KeyboardEvent::isComposing ( ) const
inline

◆ isKeyboardEvent() [1/2]

bool KeyboardEvent::isKeyboardEvent ( ) const
finalvirtual

Reimplemented from WebCore::Event.

◆ isKeyboardEvent() [2/2]

bool WebCore::KeyboardEvent::isKeyboardEvent ( ) const
finalvirtual

Reimplemented from WebCore::Event.

◆ keyCode() [1/2]

int KeyboardEvent::keyCode ( ) const

◆ keyCode() [2/2]

WEBCORE_EXPORT int WebCore::KeyboardEvent::keyCode ( ) const

◆ keyEvent() [1/2]

const PlatformKeyboardEvent* WebCore::KeyboardEvent::keyEvent ( ) const
inline

◆ keyEvent() [2/2]

const PlatformKeyboardEvent* WebCore::KeyboardEvent::keyEvent ( ) const
inline

◆ keyIdentifier() [1/2]

const String& WebCore::KeyboardEvent::keyIdentifier ( ) const
inline

◆ keyIdentifier() [2/2]

const String& WebCore::KeyboardEvent::keyIdentifier ( ) const
inline

◆ location() [1/2]

unsigned WebCore::KeyboardEvent::location ( ) const
inline

◆ location() [2/2]

unsigned WebCore::KeyboardEvent::location ( ) const
inline

◆ repeat() [1/2]

bool WebCore::KeyboardEvent::repeat ( ) const
inline

◆ repeat() [2/2]

bool WebCore::KeyboardEvent::repeat ( ) const
inline

◆ which() [1/2]

int KeyboardEvent::which ( ) const
finalvirtual

Reimplemented from WebCore::UIEvent.

◆ which() [2/2]

int WebCore::KeyboardEvent::which ( ) const
finalvirtual

Reimplemented from WebCore::UIEvent.


The documentation for this class was generated from the following files: