2013-07-24 19:40:05 +00:00
|
|
|
/**
|
|
|
|
* Blessed
|
|
|
|
* A curses-like library for node.js.
|
2015-02-01 15:22:39 +00:00
|
|
|
* Copyright (c) 2013-2015, Christopher Jeffrey and contributors (MIT License).
|
2013-07-24 19:40:05 +00:00
|
|
|
* https://github.com/chjj/blessed
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Modules
|
|
|
|
*/
|
|
|
|
|
2014-01-02 04:43:30 +00:00
|
|
|
var program = require('./program')
|
|
|
|
, tput = require('./tput')
|
|
|
|
, widget = require('./widget')
|
|
|
|
, colors = require('./colors');
|
2013-07-24 19:40:05 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Blessed
|
|
|
|
*/
|
|
|
|
|
|
|
|
function blessed() {
|
2014-01-02 04:43:30 +00:00
|
|
|
return program.apply(null, arguments);
|
2013-07-24 19:40:05 +00:00
|
|
|
}
|
|
|
|
|
2014-01-02 04:43:30 +00:00
|
|
|
blessed.program = blessed.Program = program;
|
|
|
|
blessed.tput = blessed.Tput = tput;
|
|
|
|
blessed.colors = colors;
|
|
|
|
blessed.widget = widget;
|
2013-07-24 19:40:05 +00:00
|
|
|
|
2014-01-02 04:43:30 +00:00
|
|
|
Object.keys(blessed.widget).forEach(function(name) {
|
|
|
|
blessed[name] = blessed.widget[name];
|
2013-07-24 19:40:05 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
blessed.helpers = {
|
2014-01-02 04:43:30 +00:00
|
|
|
sprintf: blessed.tput.sprintf,
|
|
|
|
merge: blessed.tput.merge,
|
|
|
|
tryRead: blessed.tput.tryRead
|
2013-07-24 19:40:05 +00:00
|
|
|
};
|
|
|
|
|
2014-04-26 10:57:37 +00:00
|
|
|
Object.keys(widget.helpers).forEach(function(key) {
|
|
|
|
blessed.helpers[key] = widget.helpers[key];
|
|
|
|
blessed[key] = widget.helpers[key];
|
|
|
|
});
|
|
|
|
|
2013-07-24 19:40:05 +00:00
|
|
|
/**
|
|
|
|
* Expose
|
|
|
|
*/
|
|
|
|
|
|
|
|
module.exports = blessed;
|