1. 23 Sep, 2010 1 commit
    • Joel Martin's avatar
      Refactor settings object, add connectTimeout setting. · ff36b127
      Joel Martin authored
      - include/util.js: Add type and desc field to conf_default routine.
        Make comment descriptions of settings into desc parameters that can
        be queried. Also, use set_FOO in conf_default to set or coerce the
        current setting so that we always have the right type for the value.
      
      - include/rfb.js, include/default_config.js: add connectTimeout
        setting to address situations with slow connections that may need
        more than 2 seconds.
      ff36b127
  2. 20 Sep, 2010 1 commit
    • Joel Martin's avatar
      No local cursor by default due to issues #27, #29. · 31a837d5
      Joel Martin authored
      In Safari, local cursor rendering is corrupt. In firefox 3.6.10, local
      cursor rendering causes a segfault. Probable that the .cur format is
      not 100% compliant (even though it works in Chrome and firefox 3.5 and
      firefox 4.0). So just disable it by default until I can figure out how
      to address the problems.
      31a837d5
  3. 08 Sep, 2010 2 commits
  4. 30 Aug, 2010 1 commit
    • Joel Martin's avatar
      Merge init() into the constructor. · 0d1e1b72
      Joel Martin authored
      This is logical now since the external update callback can be provided
      when the object is created so we don't need a separate init function.
      0d1e1b72
  5. 27 Aug, 2010 1 commit
    • Joel Martin's avatar
      Remove psuedo-UTF8 encoding. · 55dee432
      Joel Martin authored
      It's less efficient on average that base64 (150% vs 133%). It's
      non-standard (0 shifted to 256 before encoding). And I rarely use it.
      55dee432
  6. 03 Aug, 2010 1 commit
  7. 02 Aug, 2010 1 commit
    • Joel Martin's avatar
      New API. Refactor Canvas and RFB objects. · 8db09746
      Joel Martin authored
      New API:
      
      To use the RFB object, you now must instantiate it (this allows more
      than one instance of it on the same page).
      
          rfb = new RFB(settings);
      
      The 'settings' variable is a namespace that contains initial default
      settings. These can also be set and read using 'rfb.set_FOO()' and
      'rfb.get_FOO()' where FOO is the setting name. The current settings
      are (and defaults) are:
          - target: the DOM Canvas element to use ('VNC_canvas').
          - encrypt: whether to encrypt the connection (false)
          - true_color: true_color or palette (true)
          - b64encode: base64 encode the WebSockets data (true)
          - local_cursor: use local cursor rendering (true if supported)
          - connectTimeout: milliseconds to wait for connect (2000)
          - updateState: callback when RFB state changes (none)
          - clipboardReceive: callback when clipboard data received (none)
      
      The parameters to the updateState callback have also changed. The
      function spec is now updateState(rfb, state, oldstate, msg):
          - rfb: the RFB object that this state change is for.
          - state: the new state
          - oldstate: the previous state
          - msg: a message associate with the state (not always set).
      
      The clipboardReceive spec is clipboardReceive(rfb, text):
          - rfb: the RFB object that this text is from.
          - text: the clipboard text received.
      
      Changes:
      
      - The RFB and Canvas namespaces are now more proper objects. Private
        implementation is no longer exposed and the public API has been made
        explicit. Also, instantiation allows more than one VNC connection
        on the same page (to complete this, DefaultControls will also need
        this same refactoring).
      
      - Added 'none' logging level.
      
      - Removed automatic stylesheet selection workaround in util.js and
        move it to defaultcontrols so that it doesn't interfere with
        intergration.
      
      - Also, some major JSLinting.
      
      - Fix input, canvas, and cursor tests to work with new model.
      8db09746
  8. 22 Jul, 2010 5 commits
    • Joel Martin's avatar
      Query string cleanup and move it to util.js · a8edf9d8
      Joel Martin authored
      a8edf9d8
    • Joel Martin's avatar
      JSLint. RFB obj to rfb.js; vnc.js the 'loader'. · a7a89626
      Joel Martin authored
      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.
      a7a89626
    • Joel Martin's avatar
      19463eac
    • Joel Martin's avatar
      f7f69d8e
    • Joel Martin's avatar
      API changes. Client cursor and settings menu. · da6dd893
      Joel Martin authored
      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.
      da6dd893
  9. 16 Jul, 2010 1 commit
    • Joel Martin's avatar
      State machine refactoring. · f00b1e37
      Joel Martin authored
      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.
      f00b1e37
  10. 06 Jul, 2010 2 commits
    • Joel Martin's avatar
      Remove unneeded mootools and FABridge test. · 447cd4ad
      Joel Martin authored
      mootools is no longer needed. The bug that the FABridge test was
      testing has been resolved in web-socket-js so it's no longer needed.
      447cd4ad
    • Joel Martin's avatar
      Refactor console logging code. · 81e5adaf
      Joel Martin authored
      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
      81e5adaf
  11. 15 Jun, 2010 3 commits
  12. 13 Jun, 2010 1 commit
  13. 02 Jun, 2010 1 commit
    • Joel Martin's avatar
      Direct example. Move all DOM code default_controls.js. · 91308399
      Joel Martin authored
      Move DOM manipulation into include/default_controls.js and update
      vnc.html to use it.
      
      Add an example vnc_auto.html which automatically connects using
      parameters from the query string and doesn't use default_controls.js.
      
      Reorder functions in vnc.js to put external interface functions at the
      top of the RFB namespace.
      91308399