1. 17 Oct, 2012 1 commit
  2. 15 Oct, 2012 2 commits
    • Joel Martin's avatar
      e16ad2fd
    • Joel Martin's avatar
      Change noVNC license to from LGPLv3 to MPL 2.0 · 1d728ace
      Joel Martin authored
      The MPL 2.0 license is a "file-level" copyleft license vs the
      "project-level" nature of the L/GPL. The intention of noVNC has
      always been that it should be easy to incorporate into existing
      projects and sites whether free/open or proprietary/commercial. The MPL
      2.0 is designed for this sort of combination project but still
      requires that any distributed modifications to noVNC source files must
      also be published under the same license.
      
      In addition, the MPL 2.0 allows the code to be used in L/GPL projects
      (the secondary license clause). This means that any projects that are
      already incorporating noVNC should not be impacted by this change and
      in fact it should clarify the licensing situation (the exact
      application of the L/GPL to web applications and interpreted code is
      somewhat ambiguous).
      
      The HTML, CSS, image and font files continue to be under more
      permissive licenses (see LICENSE.txt). The included websockify python
      code remains under a LGPLv3 license although the include/websock.js
      file from the websockify component is now under MPL 2.0 as well.
      
      Permission was received from other noVNC authors to make this change to their
      code license on the following dates:
      
          - Chris Gordon (UI): Jun 24, 2012
          - Antoine Mercadal (DOM,*util.js): Oct 10, 2012
          - William Lightning (UltraVNC repeater): Oct 10, 2012
          - Mike Tinglof (tight encoding): Oct 15, 2012
      1d728ace
  3. 24 Jun, 2012 1 commit
    • Joel Martin's avatar
      License clarification: HTML,CSS,images,fonts under permissive licenses. · d58f8b51
      Joel Martin authored
      Clarify in LICENSE.txt that the noVNC core library is the part that is
      LGPLv3 licensed. The HTML, CSS, images and fonts are separate from the
      core library and can be modified and distributed with the noVNC core
      but under their own license conditions.
      
      HTML and CSS: 2-Clause BSD
      Fonts: SIL OFL 1.1
      Images: CC BY SA 3.0
      
      In other words, you can modify the layout and appearance of of noVNC
      to integrate with an existing or new web site or application without
      having to publish the source for those modifications under the LGPLv3.
      However, use of and modification of the noVNC core library (i.e. the
      core Javascript that makes up noVNC) must still be according to the
      LGPLv3.
      
      Chris Gordon was the other contributor to the HTML, CSS, and images
      included with noVNC and gave permission for this license clarification
      on June 23, 2012.
      d58f8b51
  4. 17 May, 2012 2 commits
    • Joel Martin's avatar
      rfb: Use the render queue for copyrect. · 72a5596e
      Joel Martin authored
      This will keep copyrect rendering actions in order with tight and tightPNG
      rendering actions (otherwise you can get visual image corruption when
      they are mixed together).
      
      Warning:
      
      RAW, RRE and HEXTILE still use immediate render commands so there is
      still the risk of out-of-order rendering if RAW, RRE, and HEXTILE are
      mixed with tight and tightPNG. Copyrect will work with either because
      the renderQ_push function will render copyrects immediately if they
      are the only thing being pushed on the queue.
      72a5596e
    • Joel Martin's avatar
      Move render queue processing to Display and use requestAnimationFrame · 34d8b844
      Joel Martin authored
      The imgQ code in RFB should be a generic rendering queue system in
      Display.
      
      The reason for the render queue in the first place is that images
      loaded from raw data URI strings aren't immediately ready to display
      so we have to wait for them to complete 'loading'. However, when data
      URI images are mixed with other types of rendering actions then things
      can get out of order. This is the reason for the rendering queue.
      
      Currently this only keeps display actions for tight and tightPNG
      related actions in order (because they use a mix of fills, raw pixel
      data and data URI images).
      34d8b844
  5. 10 May, 2012 1 commit
  6. 25 Jan, 2012 1 commit
  7. 12 Jan, 2012 1 commit
  8. 26 Sep, 2011 2 commits
    • Joel Martin's avatar
      Move viewport functions. · 7cd6118c
      Joel Martin authored
      Move viewportChange(), getCleanDirtyReset(), absX() and absY() to the
      public API section. Also add some function comments.
      7cd6118c
    • Joel Martin's avatar
      Remove support for non-HTML5 browsers. · 490d471c
      Joel Martin authored
      Display API change:
          - getTile -> startTile (no longer returns a tile)
          - setSubTile -> subTile (drop img/tile first parameter)
          - putTile -> finishTile (no longer takes img/tile paramter)
      
      The Display tile logic uses canvas image data directly and
      caches/reuses a 16x16 imageData tile (for other sizes, the tile is
      create for each call). This gives a 30% speedup on Chrome
      13 (and no significant change for Firefox 3.6/4.0).
      
      Other:
      
      - Remove rgbxImageFill and cmapImageFill routines.
      
      - Simplify constructor tests and just error if createImageData is not
        supported by canvas instead of .
      
      - Remove webkit canvas bug workaround that effects Chrome 7. Chrome
        7 usage share is now less than 0.5 percent and the workaround is
        ugly. Drop the function wrapping in the constructor and the canvas
        flush() routine.
      
      - Remove support for getImageData (Opera 11+ now required)
      
      Update browser support list:
      
          - Chrome 8+ (really any except 7)
          - Firefox 3.6+
          - Safari 4+
          - Opera 11+
          - IE9+
          - iOS 4.2+
      490d471c
  9. 23 Sep, 2011 1 commit
    • Joel Martin's avatar
      Only show move/drag button when clipping. Cleanup. · c506a481
      Joel Martin authored
      Cleanup:
      
      - remove unused changeViewportMeta function from include/ui.js
      - remove some debug output and debug CSS.
      - rename panel toggle functions and put them in same location in the
        code.
      - refactor some code from updateState to updateVisualState routine
        (renamed from updateSettingsState).
      c506a481
  10. 22 Sep, 2011 1 commit
    • Joel Martin's avatar
      Viewport clip/drag for mobile/touchscreen devices. · a5df24b4
      Joel Martin authored
      API changes (forward compatible):
      
      - Display: add 'viewport' conf option to turn on and off viewport
        mode.
      - RFB: add 'viewportDrag' option to enable/disable viewport dragging
        mode.
      
      Other:
      
      - Add clip mode setting to default UI. For touch devices, clipping is
        forced on.
      - Use CSS media queries to adjust visual elements based on screen
        size. Especially disconnected logo size/position and button text size.
      - Catch page unload while connected and give a confirm dialog.
      - Change mouse button selector to a single button that changes between
        ' ', 'L', 'M', 'R' when clicked (empty means mouse is just being
        moved and doesn't send clicks).
      - include/ui.js:setViewClip() routine sets the clipping of the
        viewport to the current size of the viewport area (if clipping is
        enabled).
      - include/ui.js:setViewDrag() toggles/enables/disables viewport
        dragging mode.
      - Add several images for the UI and for Apple devices:
          - images/clipboard.png: clipboard menu icon
          - images/connect.png: connect menu icon
          - images/disconnect.png: disconnect button icon
          - images/keyboard.png: show keyboard button
          - images/move.png: viewport drag/move toggle button
          - images/settings.png: settings menu icon
          - images/screen_320x460.png: iOS app/desktop link start image
          - images/screen_57x57.png: iOS app icon
          - images/screen_700x700.png: full size noVNC image
      a5df24b4
  11. 14 Sep, 2011 1 commit
  12. 13 Sep, 2011 1 commit
    • Joel Martin's avatar
      Viewport handling in include/display.js · 54e7cbdf
      Joel Martin authored
      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
      54e7cbdf
  13. 18 Jul, 2011 1 commit
    • Joel Martin's avatar
      Change default PixelFormat. Fix canvas test. · ac99a1f7
      Joel Martin authored
      Instead of R,G,B (red-shift of 0, green-shift of 8, and blue-shift
      of 16), use the default ordering of B,G,R (red-shift of 16, green-shift of 8, and blue-shift
      of 0) that tightvncserver uses (and that VMWare's VNC server seems to
      require). Also, warn in the console if the server does not default to
      the new format.
      
      Fix the tests/canvas.html test. This is a general fix with regards to
      the rename/refactor of canvas.js into display.js and not specific to
      the color re-ordering.
      ac99a1f7
  14. 11 May, 2011 2 commits
    • Joel Martin's avatar
      Refactor configuration attributes. · 5210330a
      Joel Martin authored
      - Add conf_defaults which accepts an array of configuration
        attributes.
      - Split out user configuration defaults from the actual configuration
        object.
      - Add mode field and enforce read-only, write-once, read-write modes.
      5210330a
    • Joel Martin's avatar
      API changes/cleanup. · d890e864
      Joel Martin authored
      API changes:
          - include/canvas.js renamed to include/display.js
          - Display.rescale() method removed from API. Use Display.set_scale() instead.
          - Make logo configuration attribute of Display and display it when
            clear() is called if it is set.
      
      API deprecations:
          - use RFB onUpdateState instead of updateState.
          - use RFB onClipboard instead of clipboardReceive.
      
      See https://github.com/kanaka/noVNC/wiki/ModuleAPI for detailed noVNC
      modules and API description.
      
      Expand and normalize the event/callback interfaces. Standize on
      "onEventName" form for callbacks.
      
          Callback Renames:
              - RFB updateState -> onUpdateState
              - RFB clipboardReceive -> onClipboard
              - Keyboard keyPress -> onKeyPress
              - Mouse mouseButton -> onMouseButton
              - Mouse mouseMove -> onMouseMove
      
          Callback Additions:
              - RFB onPasswordRequired
              - RFB onBell
              - RFB onFBUReceive
              - RFB onFBUComplete
      
      Other:
      - Add array type support to Util.conf_default()
      - Removed a bunch of routines from the Display API that were just used
        internally and not actually by noVNC: flush, setFillColor,
        imageDataGet, imageDataCreate, rgbxImageData, rgbxImageFill,
        cmapImageData, cmapImageFill.
      - More keyboard/mouse logging when debug turned on.
      - Some JSLinting
      d890e864
  15. 29 Apr, 2011 2 commits
  16. 05 Apr, 2011 1 commit
  17. 03 Apr, 2011 2 commits
  18. 29 Mar, 2011 1 commit
    • Joel Martin's avatar
      IE9 fixes: mouse, doctype. Adobe Flash link. · f8990704
      Joel Martin authored
      Fix mouse button mapping in IE9. All browsers have converged on
      a standard left=0, middle=1, right=2 ... all except IE that is.
      
      Add html5 doctype to tests.
      
      In vnc_perf test, use do_test instead of start for function name since
      start is a keyword in IE.
      
      In error about Flash give a link to Adobe's download page.
      f8990704
  19. 19 Feb, 2011 1 commit
  20. 24 Jan, 2011 1 commit
    • Joel Martin's avatar
      Opera 11 WebSockets and Opera '-' key mapping fix. · 7cc5fbc5
      Joel Martin authored
      Opera 11 native WebSockets (if enabled) seems to have bad behavior for
      the bufferedAmount so add change from websockify project to allow max
      bufferedAmount (before send queue is delay) to be configured.
      
      Also, Opera 11 and 10.60 behave like Mozilla regarding the '-' key so
      translate it correctly.
      7cc5fbc5
  21. 19 Jan, 2011 2 commits
  22. 18 Jan, 2011 1 commit
  23. 17 Jan, 2011 1 commit
  24. 12 Jan, 2011 1 commit
    • Joel Martin's avatar
      wsproxy, wstelnet: wrap command, WS telnet client. · f2538f33
      Joel Martin authored
      wswrapper:
      
          Getting the wswrapper.c LD_PRELOAD model working has turned out to
          involve too many dark corners of the glibc/POSIX file descriptor
          space. I realized that 95% of what I want can be accomplished by
          adding a "wrap command" mode to wsproxy.
      
          The code is still there for now, but consider it experimental at
          best. Minor fix to dup2 and add dup and dup3 logging.
      
      wsproxy Wrap Command:
      
          In wsproxy wrap command mode, a command line is specified instead
          of a target address and port. wsproxy then uses a much simpler
          LD_PRELOAD library, rebind.so, to move intercept any bind() system
          calls made by the program. If the bind() call is for the wsproxy
          listen port number then the real bind() system call is issued for
          an alternate (free high) port on loopback/localhost.  wsproxy then
          forwards from the listen address/port to the moved port.
      
          The --wrap-mode argument takes three options that determine the
          behavior of wsproxy when the wrapped command returns an exit code
          (exit or daemonizing): ignore, exit, respawn.
      
          For example, this runs vncserver on turns port 5901 into
          a WebSockets port (rebind.so must be built first):
      
              ./utils/wsproxy.py --wrap-mode=ignore 5901 -- vncserver :1
      
          The vncserver command backgrounds itself so the wrap mode is set
          to "ignore" so that wsproxy keeps running even after it receives
          an exit code from vncserver.
      
      wstelnet:
      
          To demonstrate the wrap command mode, I added WebSockets telnet
          client.
      
          For example, this runs telnetd (krb5-telnetd) on turns port 2023
          into a WebSockets port (using "respawn" mode since telnetd exits
          after each connection closes):
      
              sudo ./utils/wsproxy.py --wrap-mode=respawn 2023 -- telnetd -debug 2023
      
          Then the utils/wstelnet.html page can be used to connect to the
          telnetd server on port 2023. The telnet client includes VT100.js
          (from http://code.google.com/p/sshconsole) which handles the
          terminal emulation and rendering.
      
      rebind:
      
          The rebind LD_PRELOAD library is used by wsproxy in wrap command
          mode to intercept bind() system calls and move the port to
          a different port on loopback/localhost. The rebind.so library can
          be built by running make in the utils directory.
      
          The rebind library can be used separately from wsproxy by setting
          the REBIND_OLD_PORT and REBIND_NEW_PORT environment variables
          prior to executing a command. For example:
      
              export export REBIND_PORT_OLD="23"
              export export REBIND_PORT_NEW="65023"
              LD_PRELOAD=./rebind.so telnetd -debug 23
      
          Alternately, the rebind script does the same thing:
      
              rebind 23 65023 telnetd -debug 23
      
      Other changes/notes:
      
      - wsproxy no longer daemonizes by default. Remove -f/--foreground
        option and add -D/--deamon option.
      
      - When wsproxy is used to wrap a command in "respawn" mode, the
        command will not be respawn more often than 3 times within 10
        seconds.
      
      - Move getKeysym routine out of Canvas object so that it can be called
        directly.
      f2538f33
  25. 04 Jan, 2011 1 commit
  26. 03 Jan, 2011 1 commit
  27. 10 Dec, 2010 1 commit
    • Joel Martin's avatar
      Make compatible with jQuery. Slight API change. · e4671910
      Joel Martin authored
      Rename the $() selector to $D() so that it doesn't collide with
      the jQuery name.
      
      The API change is that the 'target' option for Canvas and RFB objects
      must now be a DOM Canvas element. A string is no longer accepted
      because this requires that a DOM lookup is done and the Canvas and RFB
      should have no UI code in them. Modularity.
      e4671910
  28. 06 Nov, 2010 3 commits
    • Joel Martin's avatar
      Fix flush with strict DOCTYPE. · c1d008f1
      Joel Martin authored
      - With a strict doctype, the margin size needs a "px" suffix.
      c1d008f1
    • Joel Martin's avatar
      canvas.js: workaround WebKit bug, issue #28. · cdb55d26
      Joel Martin authored
      This is WebKit bug https://bugs.webkit.org/show_bug.cgi?id=46319
      
      The workaround is to wrap Canvas render functions with a function that
      sets a flush timer. The flush function sets the right margin and then
      1ms later sets it back. This triggers the canvas to redraw with the
      correct contents.
      
      Two downsides:
      - rendering is slower, but only on the busted versions of webkit.
        Correct and useful is better than fast and useless.
      - There is a barely perceptible jitter of the control buttons because
        the canvas size is changing by one pixel.
      
      To support this functionality, we also have to read out the exact
      webkit version from the user agent in the render engine detection code
      in include/util.js.
      cdb55d26
    • Joel Martin's avatar
      default_controls.js: canvas fail fix. Misc cleanup. · 455e4657
      Joel Martin authored
      - Make sure that canvas exists (i.e. didn't throw an error) before
        trying to call canvas method get_canvas_uri.
      
      - Typos in HTML render engine debug output.
      455e4657
  29. 18 Oct, 2010 1 commit
  30. 24 Sep, 2010 1 commit
  31. 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