| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2004, 2005, 2006, 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2004, 2005, 2006, 2009 Apple Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 | 34 |
| 35 #if PLATFORM(GTK) | 35 #if PLATFORM(GTK) |
| 36 typedef struct _GdkEventButton GdkEventButton; | 36 typedef struct _GdkEventButton GdkEventButton; |
| 37 typedef struct _GdkEventMotion GdkEventMotion; | 37 typedef struct _GdkEventMotion GdkEventMotion; |
| 38 #endif | 38 #endif |
| 39 | 39 |
| 40 namespace WebCore { | 40 namespace WebCore { |
| 41 | 41 |
| 42 // These button numbers match the ones used in the DOM API, 0 through 2, exc
ept for NoButton which isn't specified. | 42 // These button numbers match the ones used in the DOM API, 0 through 2, exc
ept for NoButton which isn't specified. |
| 43 enum MouseButton { NoButton = -1, LeftButton, MiddleButton, RightButton }; | 43 enum MouseButton { NoButton = -1, LeftButton, MiddleButton, RightButton }; |
| 44 | |
| 45 #if PLATFORM(BLACKBERRY) | |
| 46 enum MouseInputMethod { PointingDevice, TouchScreen }; | |
| 47 #endif | |
| 48 | 44 |
| 49 class PlatformMouseEvent : public PlatformEvent { | 45 class PlatformMouseEvent : public PlatformEvent { |
| 50 public: | 46 public: |
| 51 PlatformMouseEvent() | 47 PlatformMouseEvent() |
| 52 : PlatformEvent(PlatformEvent::MouseMoved) | 48 : PlatformEvent(PlatformEvent::MouseMoved) |
| 53 , m_button(NoButton) | 49 , m_button(NoButton) |
| 54 , m_clickCount(0) | 50 , m_clickCount(0) |
| 55 , m_modifierFlags(0) | 51 , m_modifierFlags(0) |
| 56 #if PLATFORM(MAC) | 52 #if PLATFORM(MAC) |
| 57 , m_eventNumber(0) | 53 , m_eventNumber(0) |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 #if PLATFORM(MAC) | 93 #if PLATFORM(MAC) |
| 98 int eventNumber() const { return m_eventNumber; } | 94 int eventNumber() const { return m_eventNumber; } |
| 99 #endif | 95 #endif |
| 100 | 96 |
| 101 #if PLATFORM(WIN) | 97 #if PLATFORM(WIN) |
| 102 PlatformMouseEvent(HWND, UINT, WPARAM, LPARAM, bool didActivateWebView =
false); | 98 PlatformMouseEvent(HWND, UINT, WPARAM, LPARAM, bool didActivateWebView =
false); |
| 103 void setClickCount(int count) { m_clickCount = count; } | 99 void setClickCount(int count) { m_clickCount = count; } |
| 104 bool didActivateWebView() const { return m_didActivateWebView; } | 100 bool didActivateWebView() const { return m_didActivateWebView; } |
| 105 #endif | 101 #endif |
| 106 | 102 |
| 107 #if PLATFORM(BLACKBERRY) | |
| 108 PlatformMouseEvent(const IntPoint& eventPosition, const IntPoint& global
Position, const PlatformEvent::Type, int clickCount, MouseButton, bool shiftKey,
bool ctrlKey, bool altKey, MouseInputMethod = PointingDevice); | |
| 109 MouseInputMethod inputMethod() const { return m_inputMethod; } | |
| 110 #endif | |
| 111 protected: | 103 protected: |
| 112 IntPoint m_position; | 104 IntPoint m_position; |
| 113 IntPoint m_globalPosition; | 105 IntPoint m_globalPosition; |
| 114 #if ENABLE(POINTER_LOCK) | 106 #if ENABLE(POINTER_LOCK) |
| 115 IntPoint m_movementDelta; | 107 IntPoint m_movementDelta; |
| 116 #endif | 108 #endif |
| 117 MouseButton m_button; | 109 MouseButton m_button; |
| 118 int m_clickCount; | 110 int m_clickCount; |
| 119 unsigned m_modifierFlags; | 111 unsigned m_modifierFlags; |
| 120 | 112 |
| 121 #if PLATFORM(MAC) | 113 #if PLATFORM(MAC) |
| 122 int m_eventNumber; | 114 int m_eventNumber; |
| 123 #elif PLATFORM(WIN) | 115 #elif PLATFORM(WIN) |
| 124 bool m_didActivateWebView; | 116 bool m_didActivateWebView; |
| 125 #elif PLATFORM(BLACKBERRY) | |
| 126 MouseInputMethod m_inputMethod; | |
| 127 #endif | 117 #endif |
| 128 }; | 118 }; |
| 129 | 119 |
| 130 } // namespace WebCore | 120 } // namespace WebCore |
| 131 | 121 |
| 132 #endif // PlatformMouseEvent_h | 122 #endif // PlatformMouseEvent_h |
| OLD | NEW |