[webkit-help] Firing Touch Events through custom drivers and Custom Event types
julien.chaffraix at gmail.com
Tue Oct 25 08:06:45 PDT 2011
> 1) Trigger the touch events from touch screen through a custom driver. I
> have some doubts if this can really be done in the Core layer or has to be
> port specific due to the screen's drivers.
By itself WebCore (not Core btw) does not know about which toolkit it
is talking to so it has no way of sending a toolkit event to your
driver. Also WebKit is an engine thus driven by the browser which is
the primary receiver of the events (not the other way around).
Now as you seem to be modifying WebCore anyway, you can totally expose
such functionality. As the events are tied to a toolkit, the
implementation of that is very port specific.
> 2) Create custom events which can be registered by elements in the dom tree
> (e.g.: such as elem.onclick= function() or elem.addEventListener). These
> events are also fed through a custom driver which receives input from a
> joystick or a webcam.
This is a huge question! I won't go in the details as 1) it varies
depending on your port or version of WebKit and 2) it would take a
long time. Basically take an event that is similar to what you want
and mirror what it does. Look for the event handlers and add your own.
Also make sure to look at the archives as a lot of the sub-tasks you
will encounter have been already asked.
> 3) Integrate the changes in the build system. From what i can tell, this
> needs to be done a per port basis. Unless, of course, the build-script
> generates these files.
There is no automation here: the build-script (build-webkit) only
calls the different ports' build system based on the parameters you
give and the environment. Each build system needs to be updated
manually. There was some talk about merging our build systems to
simplify the maintenance hassle but it did not go far.
Hope it helps,
More information about the webkit-help