GuacLite
view release on metacpan or search on metacpan
share/public/guaclite.js view on Meta::CPAN
*
* @param {String} mimetype
* The mimetype of the data which will be received.
*
* @param {String} name
* The name of the connection parameter whose value is being exposed.
*/
this.onargv = null;
/**
* Fired when the clipboard of the remote client is changing.
*
* @event
* @param {Guacamole.InputStream} stream The stream that will receive
* clipboard data from the server.
* @param {String} mimetype The mimetype of the data which will be received.
*/
this.onclipboard = null;
/**
* Fired when a file stream is created. The stream provided to this event
* handler will contain its own event handlers for received data.
*
* @event
* @param {Guacamole.InputStream} stream The stream that will receive data
* from the server.
* @param {String} mimetype The mimetype of the file received.
* @param {String} filename The name of the file received.
*/
this.onfile = null;
/**
* Fired when a filesystem object is created. The object provided to this
* event handler will contain its own event handlers and functions for
* requesting and handling data.
*
* @event
* @param {Guacamole.Object} object
* The created filesystem object.
*
* @param {String} name
* The name of the filesystem.
*/
this.onfilesystem = null;
/**
* Fired when a pipe stream is created. The stream provided to this event
* handler will contain its own event handlers for received data;
*
* @event
* @param {Guacamole.InputStream} stream The stream that will receive data
* from the server.
* @param {String} mimetype The mimetype of the data which will be received.
* @param {String} name The name of the pipe.
*/
this.onpipe = null;
/**
* Fired when a "required" instruction is received. A required instruction
* indicates that additional parameters are required for the connection to
* continue, such as user credentials.
*
* @event
* @param {String[]} parameters
* The names of the connection parameters that are required to be
* provided for the connection to continue.
*/
this.onrequired = null;
/**
* Fired whenever a sync instruction is received from the server, indicating
* that the server is finished processing any input from the client and
* has sent any results.
*
* @event
* @param {Number} timestamp The timestamp associated with the sync
* instruction.
*/
this.onsync = null;
/**
* Returns the layer with the given index, creating it if necessary.
* Positive indices refer to visible layers, an index of zero refers to
* the default layer, and negative indices refer to buffers.
*
* @private
* @param {Number} index
* The index of the layer to retrieve.
*
* @return {Guacamole.Display.VisibleLayer|Guacamole.Layer}
* The layer having the given index.
*/
var getLayer = function getLayer(index) {
// Get layer, create if necessary
var layer = layers[index];
if (!layer) {
// Create layer based on index
if (index === 0)
layer = display.getDefaultLayer();
else if (index > 0)
layer = display.createLayer();
else
layer = display.createBuffer();
// Add new layer
layers[index] = layer;
}
return layer;
};
/**
* Returns the index passed to getLayer() when the given layer was created.
* Positive indices refer to visible layers, an index of zero refers to the
* default layer, and negative indices refer to buffers.
*
* @param {Guacamole.Display.VisibleLayer|Guacamole.Layer} layer
( run in 2.523 seconds using v1.01-cache-2.11-cpan-437f7b0c052 )