2011-07-29 18:48:43 +00:00
|
|
|
// vim: et:ts=4:sw=4:sts=4:ft=javascript
|
2011-05-16 08:24:46 +00:00
|
|
|
/*@
|
2011-05-16 10:49:48 +00:00
|
|
|
Ox.Clipboard <o> Basic clipboard handler
|
2011-09-09 10:41:13 +00:00
|
|
|
copy <f> Copy data to clipboard
|
|
|
|
(data) -> <u> undefined
|
|
|
|
paste <f> Paste data from clipboard
|
|
|
|
() -> <*> Clipboard data
|
2011-05-16 08:24:46 +00:00
|
|
|
@*/
|
2011-04-22 22:03:10 +00:00
|
|
|
Ox.Clipboard = function() {
|
|
|
|
var clipboard = {};
|
|
|
|
return {
|
|
|
|
_print: function() {
|
|
|
|
Ox.print(JSON.stringify(clipboard));
|
|
|
|
},
|
|
|
|
copy: function(data) {
|
|
|
|
clipboard = data;
|
|
|
|
Ox.print('copy', JSON.stringify(clipboard));
|
|
|
|
},
|
|
|
|
paste: function(type) {
|
|
|
|
return clipboard;
|
|
|
|
}
|
|
|
|
};
|
|
|
|
}();
|