hicms / cefpython

Automatically exported from code.google.com/p/cefpython
0 stars 0 forks source link

Touch screen support #57

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
To enable touch screen support for CEF 1 we would have to introduce
a CEF command line option and call WebKit::WebRuntimeFeatures::enableTouch()
with false/true according to the value in libcef/browser_webkit_init.cc [1].
This would require patching CEF C++ sources.

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 9 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 9 years ago
When switches are set programatically they must be set in two places:
 * CefApp::OnBeforeCommandLineProcessing()
 * CefBrowserProcessHandler::OnBeforeChildProcessLaunch()

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

GoogleCodeExporter commented 9 years ago
There is no touch support on Linux yet?
https://groups.google.com/a/chromium.org/d/topic/chromium-discuss/p_mI45gP7q8/di
scussion

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

GoogleCodeExporter commented 9 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 9 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 9 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

GoogleCodeExporter commented 9 years ago
Project will move to Github. Find this issue at the new address (soon): 
https://github.com/cztomczak/cefpython/issues/57

Original comment by czarek.t...@gmail.com on 24 Aug 2015 at 6:30