noVNC/include
Joel Martin 54e7cbdf8f Viewport handling in include/display.js
Part of mobile device support:
https://github.com/kanaka/noVNC/issues/48

The Display object is redefined as a larger display region with
an equal or smaller visible viewport. The size of the full display
region is set/changed using resize(). The viewport is set/changed
using viewportChange().

All exposed routines that draw on the display now take coordinates
that are absolute (relative to the full display region). For example,
the result of fillRect(100, 100, 10, 10, [255,0,0]) will appear in the
canvas at (0,0) if the viewport is set to (100,100).

Details:

- Move the generic part of the viewport code from tests/viewport.html
  into include/display.

- Add two new routines to the Display interface:

    - viewportChange(deltaX, deltaY, width, height)
        - This adjusts the position of the visible viewport and/or the
          size of the viewport.

        - deltaX and deltaY specify how the position of the viewport
          should be shifted. The position of the viewport is clamped
          to the full region size (i.e. cannot outside the display
          region).

        - The clean and dirty regions of the display are updated based
          on calls to this routine. For example, if the viewport width
          is increased, then there is now a dirty box on the right
          side of the viewport. Another example, if the viewport is
          shifted down and to the left over the display region, there
          are now two dirty boxes: one on the left side and one
          on the bottom of the viewport.

    - getCleanDirtyReset()
        - This returns an object with the clean box and a list of
          dirty boxes (that need to be redrawn).

            {'cleanBox':
                {'x': x, 'y': y, 'w': w, 'h': h},
             'dirtyBoxes':
                [{'x': x, 'y': y, 'w': w, 'h': h}, ...]
             }

        - The coordinates in the clean and dirty boxes are absolute
          coordinates (relative to the full display region) but they
          are clipped to the visible viewport.

        - Calling this function also resets the clean rectangle to be
          the whole viewport (i.e. nothing visible needs to be redrawn
          dirty) so the caller of this routine is responsible for
          redrawing any
2011-09-13 09:54:44 -05:00
..
web-socket-js Version 0.1, debian packaging, license text. 2011-07-14 15:57:01 -05:00
base64.js API changes/cleanup. 2011-05-11 15:55:44 -05:00
black.css Fix CSS sizes with HTML5 doctype. 2011-02-02 10:48:29 -06:00
des.js include/des.js: trim some fat. 2010-09-30 11:17:52 -05:00
display.js Viewport handling in include/display.js 2011-09-13 09:54:44 -05:00
input.js Touch events and mouse button selectors. 2011-07-23 21:24:59 -05:00
logo.js Add logo, favicon. 2011-02-03 11:04:32 -06:00
mobile.css Viewport handling in include/display.js 2011-09-13 09:54:44 -05:00
plain.css Fix CSS sizes with HTML5 doctype. 2011-02-02 10:48:29 -06:00
playback.js Fix copyright year to 2011. 2011-04-05 14:44:47 -05:00
rfb.js Viewport handling in include/display.js 2011-09-13 09:54:44 -05:00
ui.js Touch events and mouse button selectors. 2011-07-23 21:24:59 -05:00
util.js Touch events and mouse button selectors. 2011-07-23 21:24:59 -05:00
vnc.js API changes/cleanup. 2011-05-11 15:55:44 -05:00
websock.js Catch Mozilla prefixing of WebSocket. 2011-08-02 08:02:51 -05:00
webutil.js include/webutil.js: fix dirObj undefined attribute. 2011-04-05 14:46:22 -05:00