Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
2010-12-24 Ryuan Choi <ryuan.choi@samsung.com>
Reviewed by Kenneth Rohde Christiansen. [EFL] Add option to enable Touch Events. https://bugs.webkit.org/show_bug.cgi?id=49125 Add ENABLE_TOUCH_EVENTS option. * cmake/OptionsEfl.cmake: * cmakeconfig.h.cmake: 2010-12-24 Ryuan Choi <ryuan.choi@samsung.com> Reviewed by Kenneth Rohde Christiansen. [EFL] Add option to enable Touch Events. https://bugs.webkit.org/show_bug.cgi?id=49125 Add files for EFL to support TOUCH_EVENTS. * CMakeLists.txt: * CMakeListsEfl.txt: * platform/PlatformTouchEvent.h: Add EFL related constructor. * platform/PlatformTouchPoint.h: ditto. * platform/efl/PlatformTouchEventEfl.cpp: Added. (WebCore::PlatformTouchEvent::PlatformTouchEvent): * platform/efl/PlatformTouchPointEfl.cpp: Added. (WebCore::PlatformTouchPoint::PlatformTouchPoint): 2010-12-24 Ryuan Choi <ryuan.choi@samsung.com> Reviewed by Kenneth Rohde Christiansen. [EFL] Add option to enable Touch Events. https://bugs.webkit.org/show_bug.cgi?id=49125 Implement ewk_frame_feed_touch_event to feed touch events. Because EFL doesn't have touch events, Application should generate and pass it. * WebCoreSupport/ChromeClientEfl.h: (WebCore::ChromeClientEfl::needTouchEvents): * ewk/ewk_frame.cpp: (ewk_frame_feed_touch_event): * ewk/ewk_frame.h: Canonical link: https://commits.webkit.org/64965@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@74626 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
1 parent
dab1ba5
commit 688c22b9a66578ede4aafd7eaf27ef90b6ae91a6
Showing
14 changed files
with
240 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -0,0 +1,74 @@ | ||
/* | ||
* Copyright (C) 2009-2010 Samsung Electronics | ||
* | ||
* All rights reserved. | ||
* | ||
* Redistribution and use in source and binary forms, with or without | ||
* modification, are permitted provided that the following conditions | ||
* are met: | ||
* 1. Redistributions of source code must retain the above copyright | ||
* notice, this list of conditions and the following disclaimer. | ||
* 2. Redistributions in binary form must reproduce the above copyright | ||
* notice, this list of conditions and the following disclaimer in the | ||
* documentation and/or other materials provided with the distribution. | ||
* | ||
* THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY | ||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR | ||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, | ||
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, | ||
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR | ||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY | ||
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | ||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
*/ | ||
|
||
#include "config.h" | ||
#include "PlatformTouchEvent.h" | ||
|
||
#include "ewk_frame.h" | ||
|
||
#if ENABLE(TOUCH_EVENTS) | ||
|
||
namespace WebCore { | ||
|
||
PlatformTouchEvent::PlatformTouchEvent(Eina_List* points, const IntPoint pos, TouchEventType type, int metaState) | ||
: m_type(type) | ||
, m_ctrlKey(false) | ||
, m_altKey(false) | ||
, m_shiftKey(false) | ||
, m_metaKey(false) | ||
{ | ||
void* point; | ||
|
||
EINA_LIST_FREE(points, point) { | ||
Ewk_Touch_Point* p = static_cast<Ewk_Touch_Point*>(point); | ||
IntPoint pnt = IntPoint(p->x - pos.x(), p->y - pos.y()); | ||
|
||
PlatformTouchPoint::State state = PlatformTouchPoint::TouchPressed; | ||
switch (p->state) { | ||
case EWK_TOUCH_POINT_PRESSED: | ||
state = PlatformTouchPoint::TouchPressed; | ||
break; | ||
case EWK_TOUCH_POINT_RELEASED: | ||
state = PlatformTouchPoint::TouchReleased; | ||
break; | ||
case EWK_TOUCH_POINT_MOVED: | ||
state = PlatformTouchPoint::TouchMoved; | ||
break; | ||
case EWK_TOUCH_POINT_CANCELLED: | ||
state = PlatformTouchPoint::TouchCancelled; | ||
break; | ||
} | ||
|
||
m_touchPoints.append(PlatformTouchPoint(p->id, pnt, state)); | ||
} | ||
|
||
// FIXME: We don't support metaState for now. | ||
} | ||
|
||
} | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -0,0 +1,43 @@ | ||
/* | ||
* Copyright (C) 2009-2010 Samsung Electronics | ||
* | ||
* All rights reserved. | ||
* | ||
* Redistribution and use in source and binary forms, with or without | ||
* modification, are permitted provided that the following conditions | ||
* are met: | ||
* 1. Redistributions of source code must retain the above copyright | ||
* notice, this list of conditions and the following disclaimer. | ||
* 2. Redistributions in binary form must reproduce the above copyright | ||
* notice, this list of conditions and the following disclaimer in the | ||
* documentation and/or other materials provided with the distribution. | ||
* | ||
* THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY | ||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR | ||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, | ||
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, | ||
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR | ||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY | ||
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | ||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
*/ | ||
|
||
#include "config.h" | ||
#include "PlatformTouchPoint.h" | ||
|
||
#if ENABLE(TOUCH_EVENTS) | ||
|
||
namespace WebCore { | ||
|
||
PlatformTouchPoint::PlatformTouchPoint(unsigned id, const IntPoint& windowPos, State state) | ||
: m_id(id) | ||
, m_state(state) | ||
, m_screenPos(windowPos) | ||
, m_pos(windowPos) { } | ||
|
||
} | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters