OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006 Apple Computer, Inc. | 2 * Copyright (C) 2006 Apple Computer, Inc. |
3 * Copyright (C) 2009 Torch Mobile Inc. http://www.torchmobile.com/ | 3 * Copyright (C) 2009 Torch Mobile Inc. http://www.torchmobile.com/ |
4 * Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies) | 4 * Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies) |
5 * | 5 * |
6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
10 * | 10 * |
(...skipping 16 matching lines...) Expand all Loading... |
27 | 27 |
28 class HitTestRequest { | 28 class HitTestRequest { |
29 public: | 29 public: |
30 enum RequestType { | 30 enum RequestType { |
31 ReadOnly = 1 << 1, | 31 ReadOnly = 1 << 1, |
32 Active = 1 << 2, | 32 Active = 1 << 2, |
33 Move = 1 << 3, | 33 Move = 1 << 3, |
34 Release = 1 << 4, | 34 Release = 1 << 4, |
35 IgnoreClipping = 1 << 5, | 35 IgnoreClipping = 1 << 5, |
36 SVGClipContent = 1 << 6, | 36 SVGClipContent = 1 << 6, |
37 TouchEvent = 1 << 7, | |
38 IgnorePointerEventsNone = 1 << 8, | 37 IgnorePointerEventsNone = 1 << 8, |
39 }; | 38 }; |
40 | 39 |
41 typedef unsigned HitTestRequestType; | 40 typedef unsigned HitTestRequestType; |
42 | 41 |
43 HitTestRequest(HitTestRequestType requestType) | 42 HitTestRequest(HitTestRequestType requestType) |
44 : m_requestType(requestType) | 43 : m_requestType(requestType) |
45 { | 44 { |
46 } | 45 } |
47 | 46 |
48 bool readOnly() const { return m_requestType & ReadOnly; } | 47 bool readOnly() const { return m_requestType & ReadOnly; } |
49 bool active() const { return m_requestType & Active; } | 48 bool active() const { return m_requestType & Active; } |
50 bool move() const { return m_requestType & Move; } | 49 bool move() const { return m_requestType & Move; } |
51 bool release() const { return m_requestType & Release; } | 50 bool release() const { return m_requestType & Release; } |
52 bool ignoreClipping() const { return m_requestType & IgnoreClipping; } | 51 bool ignoreClipping() const { return m_requestType & IgnoreClipping; } |
53 bool svgClipContent() const { return m_requestType & SVGClipContent; } | 52 bool svgClipContent() const { return m_requestType & SVGClipContent; } |
54 bool touchEvent() const { return m_requestType & TouchEvent; } | |
55 bool ignorePointerEventsNone() const { return m_requestType & IgnorePointerE
ventsNone; } | 53 bool ignorePointerEventsNone() const { return m_requestType & IgnorePointerE
ventsNone; } |
56 | 54 |
57 // Convenience functions | |
58 bool touchMove() const { return move() && touchEvent(); } | |
59 | |
60 HitTestRequestType type() const { return m_requestType; } | 55 HitTestRequestType type() const { return m_requestType; } |
61 | 56 |
62 private: | 57 private: |
63 HitTestRequestType m_requestType; | 58 HitTestRequestType m_requestType; |
64 }; | 59 }; |
65 | 60 |
66 } // namespace blink | 61 } // namespace blink |
67 | 62 |
68 #endif // SKY_ENGINE_CORE_RENDERING_HITTESTREQUEST_H_ | 63 #endif // SKY_ENGINE_CORE_RENDERING_HITTESTREQUEST_H_ |
OLD | NEW |