Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
N
noVNC
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
rasky
noVNC
Commits
35d7574b
Commit
35d7574b
authored
Mar 11, 2012
by
Joel Martin
Browse files
Options
Browse Files
Download
Plain Diff
Merge commit '
d38db74a
'
Conflicts: README.md
parents
0c4f4b59
d38db74a
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
980 additions
and
11 deletions
+980
-11
README.md
README.md
+1
-0
display.js
include/display.js
+30
-1
jsunzip.js
include/jsunzip.js
+668
-0
rfb.js
include/rfb.js
+278
-10
vnc.js
include/vnc.js
+3
-0
No files found.
README.md
View file @
35d7574b
...
...
@@ -26,6 +26,7 @@ their products including: [Ganeti Web Manager](http://code.osuosl.org/projects/g
*
Easy site integration and theming (3 example themes included)
*
Licensed under the
[
LGPLv3
](
http://www.gnu.org/licenses/lgpl.html
)
*
Support for tight encoding (contributed by Mercuri.ca)
### Screenshots
...
...
include/display.js
View file @
35d7574b
...
...
@@ -20,7 +20,7 @@ var that = {}, // Public API methods
c_forceCanvas
=
false
,
// Predefine function variables (jslint)
imageDataGet
,
bgrxImageData
,
cmapImageData
,
imageDataGet
,
rgbImageData
,
bgrxImageData
,
cmapImageData
,
setFillColor
,
rescale
,
// The full frame buffer (logical canvas) size
...
...
@@ -497,6 +497,26 @@ that.finishTile = function() {
// else: No-op, if not prefer_js then already done by setSubTile
};
rgbImageData
=
function
(
x
,
y
,
width
,
height
,
arr
,
offset
)
{
var
img
,
i
,
j
,
data
,
v
=
viewport
;
/*
if ((x - v.x >= v.w) || (y - v.y >= v.h) ||
(x - v.x + width < 0) || (y - v.y + height < 0)) {
// Skipping because outside of viewport
return;
}
*/
img
=
c_ctx
.
createImageData
(
width
,
height
);
data
=
img
.
data
;
for
(
i
=
0
,
j
=
offset
;
i
<
(
width
*
height
*
4
);
i
=
i
+
4
,
j
=
j
+
3
)
{
data
[
i
]
=
arr
[
j
];
data
[
i
+
1
]
=
arr
[
j
+
1
];
data
[
i
+
2
]
=
arr
[
j
+
2
];
data
[
i
+
3
]
=
255
;
// Set Alpha
}
c_ctx
.
putImageData
(
img
,
x
-
v
.
x
,
y
-
v
.
y
);
};
bgrxImageData
=
function
(
x
,
y
,
width
,
height
,
arr
,
offset
)
{
var
img
,
i
,
j
,
data
,
v
=
viewport
;
/*
...
...
@@ -540,6 +560,15 @@ that.blitImage = function(x, y, width, height, arr, offset) {
}
};
that
.
blitRgbImage
=
function
(
x
,
y
,
width
,
height
,
arr
,
offset
)
{
if
(
conf
.
true_color
)
{
rgbImageData
(
x
,
y
,
width
,
height
,
arr
,
offset
);
}
else
{
// prolly wrong...
cmapImageData
(
x
,
y
,
width
,
height
,
arr
,
offset
);
}
};
that
.
blitStringImage
=
function
(
str
,
x
,
y
)
{
var
img
=
new
Image
();
img
.
onload
=
function
()
{
...
...
include/jsunzip.js
0 → 100755
View file @
35d7574b
This diff is collapsed.
Click to expand it.
include/rfb.js
View file @
35d7574b
This diff is collapsed.
Click to expand it.
include/vnc.js
View file @
35d7574b
...
...
@@ -32,10 +32,13 @@ function get_INCLUDE_URI() {
extra
+=
start
+
"webutil.js"
+
end
;
extra
+=
start
+
"base64.js"
+
end
;
extra
+=
start
+
"websock.js"
+
end
;
// extra += start + "socketio.js" + end;
extra
+=
start
+
"des.js"
+
end
;
extra
+=
start
+
"input.js"
+
end
;
extra
+=
start
+
"display.js"
+
end
;
extra
+=
start
+
"blowfish.js"
+
end
;
extra
+=
start
+
"rfb.js"
+
end
;
extra
+=
start
+
"jsunzip.js"
+
end
;
document
.
write
(
extra
);
}());
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment