Commit Graph

23 Commits

Author SHA1 Message Date
Joel Martin f9583f1f98 Move canvas.js to include/canvas.js. 2010-05-15 15:45:09 -05:00
Joel Martin c4164bda1d JSLint and "use strict". 2010-05-15 14:28:55 -05:00
Joel Martin 753bde8f53 Cleanup output, trap exceptions, timing output, fixes.
Fixes:
- Make sure that failed state messages stay around until next connect.
- Get status message font colors working.
- Clear RQ_reorder list on re-connect.
2010-05-15 12:38:50 -05:00
Joel Martin 3875f847f1 Double hextile rendering performance in Chrome.
- For webkit engines, do array manipulation for each tile subrectangle
  and only use the array for putImageData after rendering is finished.

In Chrome 5.0.375.29 beta, the time to render a full 800x600 hextile
image dropped from 500ms to 250ms or so. Firefox 3.5.3 rendering of
a full 800x600 hextile image is about 2300ms.
2010-05-15 12:27:44 -05:00
Joel Martin 8759ea6f90 Status/error refactor. Fix firefox bugs.
- All state/status updates go through updateState routine which
  updates the status line also.

- Old firefox (and opera) don't support canvas createImageData, so use
  getImageData as replacement.

- Add console.warn and console.error stubs so that firefox without
  firebug doesn't crap out.

- If no WebSockets then error if no flash or if URL is location (flash
  will refuse to load the object for security reasons).
2010-04-18 18:43:03 -05:00
Joel Martin 9fec75c08f Fix firefox '-' key mapping. 2010-04-18 16:19:10 -05:00
Joel Martin 6321aff0cf stop routine stops mouseMove events too. 2010-04-14 23:40:29 -05:00
Joel Martin 8cf206154c Working VNC client! Add mouse movement support.
- Mouse movements are accumulated and sent about 5 times a second.
- Normal polling happens at about 1.5 seconds intervals.

This commit represents a very functional VNC client under Google
Chrome.

Remaining work:

    - Cut and paste support.

    - Framing bugs when using RRE encoding.

    - Better status and error feedback.

    - Get working in firefox using flash web-socket-js:
        http://github.com/gimite/web-socket-js

    - Version without mootools (but test cross-browser).
2010-04-14 12:44:47 -05:00
Joel Martin 48ebcdb110 Rename canvas.js routines to not have "rfb" prefix.
- Also, try making set fillStyle called less often.
2010-04-14 12:22:47 -05:00
Joel Martin 31af85b996 Don't clear canvas if debug mode 2010-04-14 12:13:59 -05:00
Joel Martin d064769ccf Initial mouse support. Down and Up only. 2010-04-13 17:39:01 -05:00
Joel Martin 2bcb2d5b15 Remove event handlers on disconnect. 2010-04-13 09:39:29 -05:00
Joel Martin b7ec54870a Switch to much faster console.log and separate utils into util.js. 2010-04-13 09:28:53 -05:00
Joel Martin cf67217cbf Change to RGB ordering. 2010-04-12 11:21:03 -05:00
Joel Martin ed7e776db2 First pass at RRE encoding 2010-04-11 23:11:21 -05:00
Joel Martin 4b835baeb9 Change depth to count down correctly. Trim long lines. 2010-04-10 12:00:35 -04:00
Joel Martin 48617e27bc Fix Copy-Rect encoding. 2010-04-06 22:44:12 -05:00
Joel Martin d9cbdc7d85 Create getKeysym to lookup keysym from keyCode.
- Most of the keyboard is now functional.
2010-04-06 16:24:09 -05:00
Joel Martin 532a9fd92e Better interface, support user provided VNC password.
- host, port and password input boxes (populated by URL values).
- clear canvas on disconnect.
- Dotted border around VNC area.
- mirror bits for VNC password.
2010-04-06 13:49:49 -05:00
Joel Martin 8580b98979 Got DES encryption of password working and colors corrected.
- DES encryption for VNC bit mirrors every bytes of the password. This
  commit has a hard-coded mirrored password. Need to ask user and bit
  mirror it.

- With image data across the wire it's Blue,Green,Red, so twiddle
  things around a bit.
2010-04-06 10:35:25 -05:00
Joel Martin 64ab5c4ded Working with Raw rectangles and capital letter keys. 2010-04-05 23:54:30 -05:00
Joel Martin c8460b0310 Cleanup canvas and vnc code so they can be used together. 2010-04-04 16:08:55 -05:00
Joel Martin f272267bf7 Add Canvas and event experiments.
Correctly handles all three mouse buttons and key presses on firefox
and Chrome.

Has a decent obj properties lister (dirObj).
2010-04-04 15:46:39 -05:00