Commit Graph

24 Commits

Author SHA1 Message Date
Antoine Mercadal 8d5d2c8230 Split util into two file:
- util.js that contains essential functions
 - webutils.js that contains the GUI utility function.js

this helps to include noVNC in other project, especially Cappuccino Application
i
2010-09-30 03:59:56 +08:00
Joel Martin 5f409eeeeb License header cleanup. 2010-09-08 15:06:34 -05:00
Joel Martin 2a6018df9f web-socket-js: 9e7663771 build and remove source.
web-socket-js now has all the functionality and fixes needed for noVNC
so remove the include/as3crypto_patched directory and the
include/web-socket-js/flash-src directory (i.e. the sources for
web-socket-js). This cleans up almost 3K from the include/ directory.

Update to web-socket-js build based on upstream (gimite/web-socket-js)
9e766377188.
2010-09-08 14:57:32 -05:00
Joel Martin d595e65685 JSLint. 2010-09-08 10:11:11 -05:00
Joel Martin a7a8962676 JSLint. RFB obj to rfb.js; vnc.js the 'loader'.
Move the whole RFB object to rfb.js. vnc.js is now just the loader
file. This allows an integrating project to easily replace vnc.js with
an alternate loader mechanism (or just do it directly in the html
file). Thanks for the idea primalmotion (http://github.com/primalmotion).

Also, JSLint the various files.
2010-07-22 10:54:47 -05:00
Joel Martin da6dd8932e API changes. Client cursor and settings menu.
The following API changes may affect integrators:

    - Settings have been moved out of the RFB.connect() call. Each
      setting now has it's own setter function: setEncrypt, setBase64,
      setTrueColor, setCursor.

    - Encrypt and cursor settings now default to on.

    - CSS changes:
        - VNC_status_bar for input buttons switched to a element class.

        - VNC_buttons split into VNC_buttons_right and
          VNC_buttons_left

        - New id styles for VNC_settings_menu and VNC_setting

Note: the encrypt, true_color and cursor, logging setting can all be
  set on load using query string variables (in addition to host, port
  and password).

Client cursor (cursor pseudo-encoding) support has been polished and
activated.

The RFB settings are now presented as radio button list items in
a drop-down "Settings" menu when using the default controls.

Also, in the settings menu is the ability to select between alternate
style-sheets.

Cookie and stylesheet selection support added to util.js.
2010-07-21 20:34:23 -05:00
Joel Martin f55b6b4185 Fail if initial server connection fails. 2010-07-20 14:54:49 -05:00
Joel Martin 2c2b492c0c Add Cursor pseudo-encoding support (disabled for now).
To change the appearance of the cursor, we use the CSS cursor style
and set the url to a data URI scheme. The image data sent via the
cursor pseudo-encoding has to be encoded to a CUR format file before
being used in the data URI.

During Canvas initialization we try and set a simple cursor to see if
the browser has support. Opera is missing support for data URI scheme
in cursor URLs.

Disabled for now until we have a better way of specifying settings
overall (too many settings for control bar now).
2010-07-20 14:34:44 -05:00
Joel Martin f00b1e3776 State machine refactoring.
Add new states 'loaded', 'connect' and 'fatal':
- Loaded state is first page state. Pass WebSockets mode message using
  this state.
- Connect indicates that the user has issued a "connect" but we
  haven't gotten an WebSockets onopen yet.
- Fatal is a condition that indicates inability to continue on: right
  now, lack of WebSockets/Flash or non-working canvas.

Move much of the actual state transition code into updateState.

Handle 'password' state better in default_controls.js; instead of
disconnecting, prompt for password to send.

Add comments to updateState indicating possible states.
2010-07-15 19:38:25 -05:00
Joel Martin 754e0c0bee UTF-8: send 0 as 256 during encoding too.
0 is valid UTF-8, but in order to avoid WebSockets framing, we
encode/decode it as 256.

Also, be tolerant of 0 length messages.
2010-07-14 16:57:02 -05:00
Joel Martin 77c7a454ac TightPng fixups and thanks to Sentry Data Systems.
- Change tightpng encoding number to -260 (aliguori provided it until
  an official number can be allocated).
2010-07-13 17:51:26 -05:00
Joel Martin 81e5adafef Refactor console logging code.
Util.Debug, Util.Info, Util.Warn, Util.Error routines instead of
direct calls to console.*. Add "logging=XXX" query variable that sets
the logging level (default is "warn").

Logging values:
    debug: code debug logging (many calls in performance path are also
           commented for performance reasons).
    info: informative messages including timing information.
    warn: significant events
    error: something has gone wrong
2010-07-06 11:56:13 -05:00
Joel Martin 351a1da304 Init updated web-socket-js correctly. TODO updates. 2010-07-05 15:54:50 -05:00
Joel Martin a94699265e Remove sequence code in client and proxies. 2010-07-01 12:13:17 -05:00
Joel Martin bc8e3d4db7 Opera fixes and big Opera performance boost.
Add message/state pollling in web-socket-js. Since Opera tends to drop
message events, we can dramatically increase performance by polling
every now for message event data.

Also, add more direct calls to update readyState so that it's not
missed when Opera drops events.
2010-07-01 11:54:44 -05:00
Joel Martin dfa8db8f38 Fix issue #7: security scheme list parsing.
Also, lower connect timeout to 2 seconds.
2010-06-26 17:41:39 -05:00
Joel Martin d93d3e09ab Various cross-browser fixes.
Now working under Arora 0.5.

But not Konqueror 4.2.2 (WebSockets never connects).

IE support with excanvas still pending.
2010-06-23 16:08:36 -05:00
Joel Martin 3915e5365e Update README.md with browser support. 2010-06-21 13:20:57 -05:00
Joel Martin 2a4e7d8a93 Timeout connection. 2010-06-18 15:18:41 -05:00
Joel Martin f755ca9631 Remove debug sendCtrlC function. 2010-06-16 09:48:49 -05:00
Joel Martin 63708ff5a8 Add CtrlAltDel send button to status bar.
Some default_controls.js jslinting.

Needs to be some modularity between controls you probably always want
(like sending CtrlAltDel) and how the interface is presented and
controlled.
2010-06-15 17:47:01 -05:00
Joel Martin 15046f0042 No mootools dep outside of default_controls.js.
Some basic functions from mootools implemented in util.js.

Also, some more DOM separation. Move clipboard focus logic into
default_controls and canvas and out of vnc.js.

JSLint cleanup.
2010-06-15 15:21:41 -05:00
Joel Martin e2e7c22494 Move DOM event handling from vnc.js to canvas.js. 2010-06-15 09:36:23 -05:00
Joel Martin 96a6eaadbc Move vnc.js into include directory.
Also, allow 'include/' to be overridden in VNC_uri_prefix.
2010-06-14 14:56:19 -05:00
Renamed from vnc.js (Browse further)