cztomczak / cefpython

Python bindings for the Chromium Embedded Framework (CEF)
Other
3.02k stars 470 forks source link

Touch screen support #57

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago

In CEF 3 we can enable touch events by setting the "touch-events" command line switch [2] to "auto" or "enabled", it can be done through CefApp::OnBeforeCommandLineProcessing() [3], we need to implement the CefApp API.

See Issue 786 "Touch support in CEF1 and CEF3 does not match Chromium browser" [4] in the CEF Issue Tracker for more details on touch screen support in CEF 1 and CEF 3.

See also RegisterTouchWindow() [5] on the MSDN, it might be required to call this function for the main window.

Apparently multitouch works in the cefclient sample application in CEF 3, reported in this topic "Windows touch scroll acting as mouse click event" [6] on the CEF forum. Can someone confirm that?

[1] https://code.google.com/p/chromiumembedded/source/browse/trunk/cef1/libcef/brows er_webkit_init.cc?r=1256#51 [2] https://code.google.com/p/chromium/codesearch#chromium/src/ui/base/ui_base_switc hes.cc&sq=package:chromium&type=cs&l=66&rcl=1369373180 [3] https://code.google.com/p/chromiumembedded/source/browse/trunk/cef3/include/cef_ app.h?r=1256#117 [4] https://code.google.com/p/chromiumembedded/issues/detail?id=786 [5] http://msdn.microsoft.com/en-us/library/windows/desktop/dd317326(v=vs.85).aspx [6] http://www.magpcss.org/ceforum/viewtopic.php?f=6&t=10321

Original issue reported on code.google.com by czarek.t...@gmail.com on 24 May 2013 at 4:03

GoogleCodeExporter commented 8 years ago

When clicking an edit field there is no virtual keyboard appearing, but this could be implemented on your own by injecting javascript on web pages through LoadHandler.OnLoadStart() or OnLoadEnd(), the same can be done for other touch related behavior, when --touch-events=enabled flag is passed then javascript touch events will be enabled (touchstart, touchend, touchmove), allowing you to override the default behavior or implement the missing one.

Original comment by czarek.t...@gmail.com on 1 Jun 2013 at 9:33

GoogleCodeExporter commented 8 years ago

When switches are set programatically they must be set in two places:

Original comment by czarek.t...@gmail.com on 13 Jun 2013 at 7:15

GoogleCodeExporter commented 8 years ago

There is no touch support on Linux yet? https://groups.google.com/a/chromium.org/d/topic/chromium-discuss/p_mI45gP7q8/discussion

Original comment by czarek.t...@gmail.com on 15 Nov 2013 at 9:05

GoogleCodeExporter commented 8 years ago

See Issue 101 (Linux and Aura).

Michael Goffioul has created a port of CEF with Aura support, that adds multitouch support on Linux. See the topic: https://groups.google.com/d/topic/cefpython/qMB6D8xWBC8/discussion

Original comment by czarek.t...@gmail.com on 8 Jan 2014 at 4:01

GoogleCodeExporter commented 8 years ago

See issue 1059 in CEF Issue Tracker:

"Cef3: Multi-touch support with offscreen rendering." https://code.google.com/p/chromiumembedded/issues/detail?id=1059

In comment #7 there is an initial patch for Windows.

Original comment by czarek.t...@gmail.com on 8 Jan 2014 at 4:14

GoogleCodeExporter commented 8 years ago

CEF Python supports setting command line switches programmatically, see Issue 65. This is in regards to the --touch-events=enabled flag.

Original comment by czarek.t...@gmail.com on 8 Jan 2014 at 4:18

54huige commented 3 years ago

Touch screen long press will be killed, is it because of this? tips wrong libcef.dll APPCRASH on windows

chintal commented 2 years ago

What is the current state of work on this issue? I don't see any documentation related to --touch-events=enabled, or touch related events/methods in the Browser API (alongside SendMouse... events). Does --touch-events=enabled have any effect in OSR cefpython?