Download RV Manual - Tweak Software

Transcript
CHAPTER 9. WEBKIT JAVASCRIPT INTEGRATION
Argument
eventName
Description
The name of the RV event. For example ”new-source”
x
The horizonital position of the mouse as an integer
y
w
h
startX
startY
buttonStates
The veritical position of the mouse as an integer
The width of the event domain as an integer
The height of the event domain as an integer
The starting horizontal position of a mouse down event
The starting vertical position of a mouse down event
An integer the lower order five bits of which indicate the
mouse button states
The relative time at which button activation occured or 0
for regular pointer events
activationTime
Table 9.4: eventPointer Signal Arguments
Argument
eventName
Description
The name of the RV event. For example ”new-source”
x
The horizonital position of the mouse as an integer
y
w
h
startX
startY
buttonStates
The veritical position of the mouse as an integer
The width of the event domain as an integer
The height of the event domain as an integer
The starting horizontal position of a mouse down event
The starting vertical position of a mouse down event
An integer the lower order five bits of which indicate the
mouse button states
A string the value of which will be one of ”enter”, ”leave”,
”move”, or ”release”
A string the value of which will be one of ”file”, ”url”, or
”text”
The contents of the drag and drop event as a string
dragDropType
contentType
stringContent
Table 9.5: eventDragDrop Signal Arguments
9.3
Using the webview Example Package
This package creates one or more docked QWebView instances, configurable from
described below. JavaScript code running in the webviews can execute arbitrary Mu
the rvsession.evaluate() function. This package is intended as an example.
These command-line options should be passed to RV after the -flags option.
below are shown with their default values, and all of them can apply to any of four
Right, Top, and Bottom dock locations.
the command line as
code in RV by calling
The webview options
webviews in the Left,
shell> rv -flags ModeManagerPreload=webview
The above forces the load of the webview package which will display an example web page. Additional
arguments can be supplied to load specific web pages into additional panes. While this will just show
the sample html/javascript file that comes with the package in a webview docked on the right. To see
what’s happening in this example, bring up the Session Manager so you can see the Sources appearing and
disappearing, or switch to the defaultLayout view. Note that you can play while reconfiguring the session
with the javascript checkboxes.
The following additional arguments can be passed via the -flags mechanism. In the below, POS
should be replaced by one of Left, Right, Bottom, or Top.
ModeManagerPreload=webview Force loading of the webview package. The package should not be
56