mirror of
https://github.com/danbulant/node-x11
synced 2026-06-10 18:20:35 +00:00
add VendorPrivate and CreatePixmap
This commit is contained in:
parent
13d3f680b9
commit
10b68eecad
1 changed files with 18 additions and 2 deletions
|
|
@ -49,6 +49,12 @@ exports.requireExt = function(display, callback)
|
|||
X.pack_stream.flush();
|
||||
}
|
||||
|
||||
ext.CreatePixmap = function(screen, visual, pixmap, glxpixmap) {
|
||||
X.seq_num++;
|
||||
X.pack_stream.pack('CCSLLLL', [ext.majorOpcode, 22, 5, screen, pixmap, glxpixmap]);
|
||||
X.pack_stream.flush();
|
||||
}
|
||||
|
||||
ext.QueryExtensionsString = function(screen, callback) {
|
||||
X.seq_num++;
|
||||
X.pack_stream.pack('CCSL', [ext.majorOpcode, 18, 2, screen]);
|
||||
|
|
@ -231,13 +237,23 @@ exports.requireExt = function(display, callback)
|
|||
X.pack_stream.flush();
|
||||
}
|
||||
|
||||
ext.VendorPrivate = function(ctx, code, data) {
|
||||
X.seq_num++;
|
||||
X.pack_stream.pack('CCSLL', [ext.majorOpcode, 16, 3+data.length, code, ctx]);
|
||||
X.pack_stream.write_queue.push(data);
|
||||
X.pack_stream.flush();
|
||||
}
|
||||
|
||||
// VendorPrivateWithReply - opcode 17
|
||||
|
||||
ext.RenderLarge = function(ctx, requestNum, requestTotal, data) {
|
||||
X.seq_num++;
|
||||
|
||||
//var data = Buffer.concat(data);
|
||||
var padLength = data.length % 4;
|
||||
var padLength = 4 - data.length % 4;
|
||||
if (padLength == 4)
|
||||
padLength = 0;
|
||||
var length = 4 + (data.length+padLength) / 4;
|
||||
|
||||
X.pack_stream.pack('CCSLSSL', [ext.majorOpcode, 2, length, ctx, requestNum, requestTotal, data.length]);
|
||||
|
||||
X.pack_stream.write_queue.push(data);
|
||||
|
|
|
|||
Loading…
Reference in a new issue