Mon 21 Jul 22:43:21 CEST 2025
This commit is contained in:
parent
0f8e9cac83
commit
bcce248013
26
js/x11/core/ext/big-requests.js
Normal file
26
js/x11/core/ext/big-requests.js
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
// http://www.x.org/releases/X11R7.6/doc/bigreqsproto/bigreq.html
|
||||||
|
|
||||||
|
// TODO: move to templates
|
||||||
|
exports.requireExt = function(display, callback)
|
||||||
|
{
|
||||||
|
var X = display.client;
|
||||||
|
X.QueryExtension('BIG-REQUESTS', function(err, ext) {
|
||||||
|
|
||||||
|
if (!ext.present)
|
||||||
|
return callback(new Error('extension not available'));
|
||||||
|
|
||||||
|
ext.Enable = function( cb )
|
||||||
|
{
|
||||||
|
X.seq_num++;
|
||||||
|
X.pack_stream.pack('CCS', [ext.majorOpcode, 0, 1]);
|
||||||
|
X.replies[X.seq_num] = [
|
||||||
|
function(buf, opt) {
|
||||||
|
return buf.unpack('L')[0];
|
||||||
|
},
|
||||||
|
cb
|
||||||
|
];
|
||||||
|
X.pack_stream.flush();
|
||||||
|
}
|
||||||
|
callback(null, ext);
|
||||||
|
});
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user