Sha256: c32b0d4cdd46f730c5fc9409f525452a11c5a7022b545575cacf4be9850c2961

Contents?: true

Size: 932 Bytes

Versions: 11

Compression:

Stored size: 932 Bytes

Contents

/*
*	screen.js
*/
$debug("Initializing Window Screen.");

var $availHeight  = 600,
    $availWidth   = 800,
    $colorDepth    = 16,
    $height       = 600,
    $width        = 800;
    
$w.__defineGetter__("screen", function(){
  return {
    get availHeight(){return $availHeight;},
    get availWidth(){return $availWidth;},
    get colorDepth(){return $colorDepth;},
    get height(){return $height;},
    get width(){return $width;}
  };
});


$w.moveBy = function(dx,dy){
  //TODO
};

$w.moveTo = function(x,y) {
  //TODO
};

/*$w.print = function(){
  //TODO
};*/

$w.resizeBy = function(dw, dh){
  $w.resizeTo($width+dw,$height+dh);
};

$w.resizeTo = function(width, height){
  $width = (width <= $availWidth) ? width : $availWidth;
  $height = (height <= $availHeight) ? height : $availHeight;
};


$w.scroll = function(x,y){
  //TODO
};
$w.scrollBy = function(dx, dy){
  //TODO
};
$w.scrollTo = function(x,y){
  //TODO
};

Version data entries

11 entries across 11 versions & 2 rubygems

Version Path
envjs19-0.3.8.20101029121421 src/window/screen.js
envjs-0.3.8 src/window/screen.js
envjs-0.3.7 src/window/screen.js
envjs-0.3.6 src/window/screen.js
envjs-0.3.5 src/window/screen.js
envjs-0.3.4 src/window/screen.js
envjs-0.3.3 src/window/screen.js
envjs-0.3.2 src/window/screen.js
envjs-0.3.1 src/window/screen.js
envjs-0.3.0 src/window/screen.js
envjs-0.2.0 src/window/screen.js