mirror of
https://github.com/danbulant/node-x11
synced 2026-05-24 12:35:39 +00:00
Merge pull request #60 from santigimeno/add_CreateRegionFromWindow
Add create region from window
This commit is contained in:
commit
66e94be8de
2 changed files with 12 additions and 1 deletions
|
|
@ -48,6 +48,11 @@ exports.requireExt = function(display, callback)
|
||||||
X.pack_stream.flush();
|
X.pack_stream.flush();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
ext.WindowRegionKind = {
|
||||||
|
Bounding : 0,
|
||||||
|
Clip : 1
|
||||||
|
};
|
||||||
|
|
||||||
ext.CreateRegion = function(region, rects) {
|
ext.CreateRegion = function(region, rects) {
|
||||||
X.seq_num ++;
|
X.seq_num ++;
|
||||||
var format = 'CCSL';
|
var format = 'CCSL';
|
||||||
|
|
@ -64,6 +69,12 @@ exports.requireExt = function(display, callback)
|
||||||
X.pack_stream.flush();
|
X.pack_stream.flush();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ext.CreateRegionFromWindow = function(region, wid, kind) {
|
||||||
|
X.seq_num ++;
|
||||||
|
X.pack_stream.pack('CCSLLCxxx', [ ext.majorOpcode, 7, 4, region, wid, kind ]);
|
||||||
|
X.pack_stream.flush();
|
||||||
|
}
|
||||||
|
|
||||||
ext.DestroyRegion = function(region) {
|
ext.DestroyRegion = function(region) {
|
||||||
X.seq_num ++;
|
X.seq_num ++;
|
||||||
X.pack_stream.pack('CCSL', [ ext.majorOpcode, 10, 2, region ]);
|
X.pack_stream.pack('CCSL', [ ext.majorOpcode, 10, 2, region ]);
|
||||||
|
|
|
||||||
|
|
@ -171,7 +171,7 @@ exports.requireExt = function(display, callback)
|
||||||
|
|
||||||
pos += 24;
|
pos += 24;
|
||||||
var format = Array(res[2] + 1).join('L');
|
var format = Array(res[2] + 1).join('L');
|
||||||
resources.crcs = buf.unpack(format, pos);
|
resources.crtcs = buf.unpack(format, pos);
|
||||||
pos += res[2] << 2;
|
pos += res[2] << 2;
|
||||||
format = Array(res[3] + 1).join('L');
|
format = Array(res[3] + 1).join('L');
|
||||||
resources.outputs = buf.unpack(format, pos);
|
resources.outputs = buf.unpack(format, pos);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue