diff --git a/README.md b/README.md index 2aaa393..4bf2330 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ var client = X11Client(); await client.connect(); var id = client.generateId(); -client.createWindow(id, client.screens[0].window, X11Rectangle(0, 0, 400, 300)); +client.createWindow(id, client.screens[0].window, X11Rectangle(width: 400, height: 300)); await client.changePropertyString(id, 'WM_NAME', 'x11.dart'); client.mapWindow(id); diff --git a/example/dart-logo.dart b/example/dart-logo.dart index 220c9e7..5721960 100644 --- a/example/dart-logo.dart +++ b/example/dart-logo.dart @@ -49,7 +49,7 @@ void main() async { var id = client.generateId(); client.createWindow( - id, client.screens[0].window, X11Rectangle(0, 0, 400, 300), + id, client.screens[0].window, X11Rectangle(width: 400, height: 300), events: {X11EventType.exposure}, backgroundPixel: 0x00000000); await client.changePropertyString(id, 'WM_NAME', 'x11.dart'); client.mapWindow(id); diff --git a/example/example.dart b/example/example.dart index 361b696..f154573 100644 --- a/example/example.dart +++ b/example/example.dart @@ -6,7 +6,7 @@ void main() async { var id = client.generateId(); client.createWindow( - id, client.screens[0].window, X11Rectangle(0, 0, 400, 300)); + id, client.screens[0].window, X11Rectangle(width: 400, height: 300)); await client.changePropertyString(id, 'WM_NAME', 'x11.dart'); client.mapWindow(id); diff --git a/example/font.dart b/example/font.dart index 6908b48..1ac55e6 100644 --- a/example/font.dart +++ b/example/font.dart @@ -16,7 +16,7 @@ void main() async { }); client.createWindow( - window, client.screens[0].window, X11Rectangle(0, 0, 400, 300), + window, client.screens[0].window, X11Rectangle(width: 400, height: 300), events: {X11EventType.exposure}, backgroundPixel: 0x00000000); client.openFont(font, '*'); client.createGC(gc, window, font: font); diff --git a/example/window.dart b/example/window.dart index 6c913b6..12a20ef 100644 --- a/example/window.dart +++ b/example/window.dart @@ -39,7 +39,7 @@ void main() async { var id = client.generateId(); client.createWindow( - id, client.screens[0].window, X11Rectangle(0, 0, 400, 300), + id, client.screens[0].window, X11Rectangle(width: 400, height: 300), events: { X11EventType.keyPress, X11EventType.keyRelease, diff --git a/lib/src/x11_client.dart b/lib/src/x11_client.dart index 6544102..7d4d73f 100644 --- a/lib/src/x11_client.dart +++ b/lib/src/x11_client.dart @@ -1025,7 +1025,7 @@ class X11Client { int warpPointer(X11Point destination, {X11ResourceId destinationWindow = X11ResourceId.None, X11ResourceId sourceWindow = X11ResourceId.None, - X11Rectangle source = const X11Rectangle(0, 0, 0, 0)}) { + X11Rectangle source = const X11Rectangle()}) { var request = X11WarpPointerRequest(destination, destinationWindow: destinationWindow, sourceWindow: sourceWindow, diff --git a/lib/src/x11_damage_events.dart b/lib/src/x11_damage_events.dart index 5b15233..b7ce2db 100644 --- a/lib/src/x11_damage_events.dart +++ b/lib/src/x11_damage_events.dart @@ -34,9 +34,13 @@ class X11DamageNotifyEvent extends X11Event { var geometryHeight = buffer.readUint16(); return X11DamageNotifyEvent(firstEventCode, drawable, damage, level: level, - area: X11Rectangle(areaX, areaY, areaWidth, areaHeight), - geometry: - X11Rectangle(geometryX, geometryY, geometryWidth, geometryHeight), + area: X11Rectangle( + x: areaX, y: areaY, width: areaWidth, height: areaHeight), + geometry: X11Rectangle( + x: geometryX, + y: geometryY, + width: geometryWidth, + height: geometryHeight), timestamp: timestamp); } diff --git a/lib/src/x11_events.dart b/lib/src/x11_events.dart index dba0a7f..2f492a6 100644 --- a/lib/src/x11_events.dart +++ b/lib/src/x11_events.dart @@ -501,7 +501,8 @@ class X11ExposeEvent extends X11Event { var height = buffer.readUint16(); var count = buffer.readUint16(); buffer.skip(2); - return X11ExposeEvent(window, X11Rectangle(x, y, width, height), + return X11ExposeEvent( + window, X11Rectangle(x: x, y: y, width: width, height: height), count: count); } @@ -542,7 +543,10 @@ class X11GraphicsExposureEvent extends X11Event { var majorOpcode = buffer.readUint8(); buffer.skip(3); return X11GraphicsExposureEvent( - drawable, X11Rectangle(x, y, width, height), majorOpcode, minorOpcode, + drawable, + X11Rectangle(x: x, y: y, width: width, height: height), + majorOpcode, + minorOpcode, count: count); } @@ -635,7 +639,7 @@ class X11CreateNotifyEvent extends X11Event { var overrideRedirect = buffer.readBool(); buffer.skip(1); return X11CreateNotifyEvent( - window, parent, X11Rectangle(x, y, width, height), + window, parent, X11Rectangle(x: x, y: y, width: width, height: height), borderWidth: borderWidth, overrideRedirect: overrideRedirect); } @@ -827,7 +831,8 @@ class X11ConfigureNotifyEvent extends X11Event { var borderWidth = buffer.readUint16(); var overrideRedirect = buffer.readBool(); buffer.skip(1); - return X11ConfigureNotifyEvent(window, X11Rectangle(x, y, width, height), + return X11ConfigureNotifyEvent( + window, X11Rectangle(x: x, y: y, width: width, height: height), event: event, aboveSibling: aboveSibling, borderWidth: borderWidth, @@ -878,7 +883,8 @@ class X11ConfigureRequestEvent extends X11Event { var height = buffer.readUint16(); var borderWidth = buffer.readUint16(); var valueMask = buffer.readUint16(); - return X11ConfigureRequestEvent(window, X11Rectangle(x, y, width, height), + return X11ConfigureRequestEvent( + window, X11Rectangle(x: x, y: y, width: width, height: height), stackMode: stackMode, parent: parent, sibling: sibling, @@ -1280,7 +1286,7 @@ class X11ShapeNotifyEvent extends X11Event { X11ShapeNotifyEvent(this.firstEventCode, {this.shapeKind = X11ShapeKind.bounding, this.affectedWindow = X11ResourceId.None, - this.extents = const X11Rectangle(0, 0, 0, 0), + this.extents = const X11Rectangle(), this.serverTime = 0, this.shaped = false}); @@ -1298,7 +1304,11 @@ class X11ShapeNotifyEvent extends X11Event { return X11ShapeNotifyEvent(firstEventCode, shapeKind: shapeKind, affectedWindow: affectedWindow, - extents: X11Rectangle(extentsX, extentsY, extentsWidth, extentsHeight), + extents: X11Rectangle( + x: extentsX, + y: extentsY, + width: extentsWidth, + height: extentsHeight), serverTime: serverTime, shaped: shaped); } diff --git a/lib/src/x11_mit_screen_saver_requests.dart b/lib/src/x11_mit_screen_saver_requests.dart index f54187c..72330b0 100644 --- a/lib/src/x11_mit_screen_saver_requests.dart +++ b/lib/src/x11_mit_screen_saver_requests.dart @@ -308,7 +308,7 @@ class X11ScreensaverSetAttributesRequest extends X11Request { cursor = buffer.readResourceId(); } return X11ScreensaverSetAttributesRequest( - drawable, X11Rectangle(x, y, width, height), + drawable, X11Rectangle(x: x, y: y, width: width, height: height), borderWidth: borderWidth, windowClass: windowClass, depth: depth, diff --git a/lib/src/x11_mit_shm_requests.dart b/lib/src/x11_mit_shm_requests.dart index 8fea18e..e6ebd34 100644 --- a/lib/src/x11_mit_shm_requests.dart +++ b/lib/src/x11_mit_shm_requests.dart @@ -155,7 +155,7 @@ class X11MitShmPutImageRequest extends X11Request { drawable, shmseg, X11Size(totalWidth, totalHeight), - X11Rectangle(srcX, srcY, srcWidth, srcHeight), + X11Rectangle(x: srcX, y: srcY, width: srcWidth, height: srcHeight), X11Point(dstX, dstY), depth: depth, format: format, @@ -213,8 +213,8 @@ class X11MitShmGetImageRequest extends X11Request { buffer.skip(3); var shmseg = buffer.readUint32(); var offset = buffer.readUint32(); - return X11MitShmGetImageRequest( - drawable, X11Rectangle(x, y, width, height), shmseg, + return X11MitShmGetImageRequest(drawable, + X11Rectangle(x: x, y: y, width: width, height: height), shmseg, planeMask: planeMask, format: format, offset: offset); } diff --git a/lib/src/x11_randr_events.dart b/lib/src/x11_randr_events.dart index 3992bae..9ff1968 100644 --- a/lib/src/x11_randr_events.dart +++ b/lib/src/x11_randr_events.dart @@ -104,7 +104,7 @@ class X11RandrCrtcChangeNotifyEvent extends X11Event { this.crtc = X11ResourceId.None, this.mode = X11ResourceId.None, this.rotation = const {X11RandrRotation.rotate0}, - this.area = const X11Rectangle(0, 0, 0, 0), + this.area = const X11Rectangle(), this.timestamp = 0}); factory X11RandrCrtcChangeNotifyEvent.fromBuffer( @@ -124,7 +124,7 @@ class X11RandrCrtcChangeNotifyEvent extends X11Event { crtc: crtc, mode: mode, rotation: rotation, - area: X11Rectangle(x, y, width, height), + area: X11Rectangle(x: x, y: y, width: width, height: height), timestamp: timestamp); } diff --git a/lib/src/x11_randr_requests.dart b/lib/src/x11_randr_requests.dart index aabec98..ba945bb 100644 --- a/lib/src/x11_randr_requests.dart +++ b/lib/src/x11_randr_requests.dart @@ -1270,7 +1270,7 @@ class X11RandrGetCrtcInfoReply extends X11Reply { X11RandrGetCrtcInfoReply( {this.status = X11RandrConfigStatus.success, this.timestamp = 0, - this.area = const X11Rectangle(0, 0, 0, 0), + this.area = const X11Rectangle(), this.mode = X11ResourceId.None, this.rotation = 0, this.rotations = 0, @@ -1294,7 +1294,7 @@ class X11RandrGetCrtcInfoReply extends X11Reply { return X11RandrGetCrtcInfoReply( status: status, timestamp: timestamp, - area: X11Rectangle(x, y, width, height), + area: X11Rectangle(x: x, y: y, width: width, height: height), mode: mode, rotation: rotation, rotations: rotations, @@ -1881,8 +1881,8 @@ class X11RandrGetPanningReply extends X11Reply { X11RandrGetPanningReply( {required this.status, - this.area = const X11Rectangle(0, 0, 0, 0), - this.trackArea = const X11Rectangle(0, 0, 0, 0), + this.area = const X11Rectangle(), + this.trackArea = const X11Rectangle(), required this.borderLeft, required this.borderTop, required this.borderRight, @@ -1906,8 +1906,9 @@ class X11RandrGetPanningReply extends X11Reply { var borderBottom = buffer.readInt16(); return X11RandrGetPanningReply( status: status, - area: X11Rectangle(left, top, width, height), - trackArea: X11Rectangle(trackLeft, trackTop, trackWidth, trackHeight), + area: X11Rectangle(x: left, y: top, width: width, height: height), + trackArea: X11Rectangle( + x: trackLeft, y: trackTop, width: trackWidth, height: trackHeight), borderLeft: borderLeft, borderTop: borderTop, borderRight: borderRight, @@ -1949,8 +1950,8 @@ class X11RandrSetPanningRequest extends X11Request { final int timestamp; X11RandrSetPanningRequest(this.crtc, - {this.area = const X11Rectangle(0, 0, 0, 0), - this.trackArea = const X11Rectangle(0, 0, 0, 0), + {this.area = const X11Rectangle(), + this.trackArea = const X11Rectangle(), this.borderLeft = 0, this.borderTop = 0, this.borderRight = 0, @@ -1973,8 +1974,9 @@ class X11RandrSetPanningRequest extends X11Request { var borderRight = buffer.readInt16(); var borderBottom = buffer.readInt16(); return X11RandrSetPanningRequest(crtc, - area: X11Rectangle(left, top, width, height), - trackArea: X11Rectangle(trackLeft, trackTop, trackWidth, trackHeight), + area: X11Rectangle(x: left, y: top, width: width, height: height), + trackArea: X11Rectangle( + x: trackLeft, y: trackTop, width: trackWidth, height: trackHeight), borderLeft: borderLeft, borderTop: borderTop, borderRight: borderRight, diff --git a/lib/src/x11_render_requests.dart b/lib/src/x11_render_requests.dart index 726c1b9..5c12768 100644 --- a/lib/src/x11_render_requests.dart +++ b/lib/src/x11_render_requests.dart @@ -776,7 +776,7 @@ class X11RenderSetPictureClipRectanglesRequest extends X11Request { var y = buffer.readInt16(); var width = buffer.readUint16(); var height = buffer.readUint16(); - rectangles.add(X11Rectangle(x, y, width, height)); + rectangles.add(X11Rectangle(x: x, y: y, width: width, height: height)); } return X11RenderSetPictureClipRectanglesRequest(picture, rectangles, clipOrigin: X11Point(clipXOrigin, clipYOrigin)); @@ -1226,7 +1226,8 @@ class X11RenderAddGlyphsRequest extends X11Request { var y = buffer.readInt16(); var dx = buffer.readInt16(); var dy = buffer.readInt16(); - glyphs.add(X11GlyphInfo(ids[i], X11Rectangle(x, y, width, height), + glyphs.add(X11GlyphInfo( + ids[i], X11Rectangle(x: x, y: y, width: width, height: height), offset: X11Point(dx, dy))); } var data = buffer.readListOfUint8(buffer.remaining); @@ -1576,7 +1577,7 @@ class X11RenderFillRectanglesRequest extends X11Request { var y = buffer.readInt16(); var width = buffer.readUint16(); var height = buffer.readUint16(); - rectangles.add(X11Rectangle(x, y, width, height)); + rectangles.add(X11Rectangle(x: x, y: y, width: width, height: height)); } return X11RenderFillRectanglesRequest(destinationPicture, rectangles, op: op, color: X11Rgba(red, green, blue, alpha)); diff --git a/lib/src/x11_requests.dart b/lib/src/x11_requests.dart index 8ff0708..101c71c 100644 --- a/lib/src/x11_requests.dart +++ b/lib/src/x11_requests.dart @@ -454,8 +454,8 @@ class X11CreateWindowRequest extends X11Request { if ((valueMask & 0x4000) != 0) { cursor = buffer.readResourceId(); } - return X11CreateWindowRequest( - id, parent, X11Rectangle(x, y, width, height), depth, + return X11CreateWindowRequest(id, parent, + X11Rectangle(x: x, y: y, width: width, height: height), depth, windowClass: windowClass, visual: visual, borderWidth: borderWidth, @@ -1329,7 +1329,10 @@ class X11GetGeometryReply extends X11Reply { var borderWidth = buffer.readUint16(); buffer.skip(10); return X11GetGeometryReply( - root, X11Rectangle(x, y, width, height), depth, borderWidth); + root, + X11Rectangle(x: x, y: y, width: width, height: height), + depth, + borderWidth); } @override @@ -2530,7 +2533,7 @@ class X11WarpPointerRequest extends X11Request { X11WarpPointerRequest(this.destination, {this.destinationWindow = X11ResourceId.None, this.sourceWindow = X11ResourceId.None, - this.source = const X11Rectangle(0, 0, 0, 0)}); + this.source = const X11Rectangle()}); factory X11WarpPointerRequest.fromBuffer(X11ReadBuffer buffer) { buffer.skip(1); @@ -2545,7 +2548,8 @@ class X11WarpPointerRequest extends X11Request { return X11WarpPointerRequest(X11Point(destinationX, destinationY), destinationWindow: destinationWindow, sourceWindow: sourceWindow, - source: X11Rectangle(sourceX, sourceY, sourceWidth, sourceHeight)); + source: X11Rectangle( + x: sourceX, y: sourceY, width: sourceWidth, height: sourceHeight)); } @override @@ -4111,7 +4115,7 @@ class X11SetClipRectanglesRequest extends X11Request { var y = buffer.readInt16(); var width = buffer.readUint16(); var height = buffer.readUint16(); - rectangles.add(X11Rectangle(x, y, width, height)); + rectangles.add(X11Rectangle(x: x, y: y, width: width, height: height)); } return X11SetClipRectanglesRequest(gc, rectangles, clipOrigin: X11Point(clipXOrigin, clipYOrigin), ordering: ordering); @@ -4171,7 +4175,8 @@ class X11ClearAreaRequest extends X11Request { var y = buffer.readInt16(); var width = buffer.readUint16(); var height = buffer.readUint16(); - return X11ClearAreaRequest(window, X11Rectangle(x, y, width, height), + return X11ClearAreaRequest( + window, X11Rectangle(x: x, y: y, width: width, height: height), exposures: exposures); } @@ -4215,7 +4220,7 @@ class X11CopyAreaRequest extends X11Request { sourceDrawable, destinationDrawable, gc, - X11Rectangle(sourceX, sourceY, width, height), + X11Rectangle(x: sourceX, y: sourceY, width: width, height: height), X11Point(destinationX, destinationY)); } @@ -4265,7 +4270,7 @@ class X11CopyPlaneRequest extends X11Request { sourceDrawable, destinationDrawable, gc, - X11Rectangle(sourceX, sourceY, width, height), + X11Rectangle(x: sourceX, y: sourceY, width: width, height: height), X11Point(destinationX, destinationY), bitPlane); } @@ -4425,7 +4430,7 @@ class X11PolyRectangleRequest extends X11Request { var y = buffer.readInt16(); var width = buffer.readUint16(); var height = buffer.readUint16(); - rectangles.add(X11Rectangle(x, y, width, height)); + rectangles.add(X11Rectangle(x: x, y: y, width: width, height: height)); } return X11PolyRectangleRequest(drawable, gc, rectangles); } @@ -4556,7 +4561,7 @@ class X11PolyFillRectangleRequest extends X11Request { var y = buffer.readInt16(); var width = buffer.readUint16(); var height = buffer.readUint16(); - rectangles.add(X11Rectangle(x, y, width, height)); + rectangles.add(X11Rectangle(x: x, y: y, width: width, height: height)); } return X11PolyFillRectangleRequest(drawable, gc, rectangles); } @@ -4653,9 +4658,15 @@ class X11PutImageRequest extends X11Request { while (buffer.remaining > 0) { data.add(buffer.readUint8()); } - return X11PutImageRequest(drawable, gc, - X11Rectangle(destinationX, destinationY, width, height), data, - format: format, depth: depth, leftPad: leftPad); + return X11PutImageRequest( + drawable, + gc, + X11Rectangle( + x: destinationX, y: destinationY, width: width, height: height), + data, + format: format, + depth: depth, + leftPad: leftPad); } @override @@ -4698,7 +4709,8 @@ class X11GetImageRequest extends X11Request { var width = buffer.readUint16(); var height = buffer.readUint16(); var planeMask = buffer.readUint32(); - return X11GetImageRequest(drawable, X11Rectangle(x, y, width, height), + return X11GetImageRequest( + drawable, X11Rectangle(x: x, y: y, width: width, height: height), format: format, planeMask: planeMask); } @@ -7171,7 +7183,7 @@ class X11ShapeRectanglesRequest extends X11Request { var y = buffer.readInt16(); var width = buffer.readUint16(); var height = buffer.readUint16(); - rectangles.add(X11Rectangle(x, y, width, height)); + rectangles.add(X11Rectangle(x: x, y: y, width: width, height: height)); } return X11ShapeRectanglesRequest(window, rectangles, operation: operation, @@ -7356,8 +7368,8 @@ class X11ShapeQueryExtentsReply extends X11Reply { X11ShapeQueryExtentsReply( {this.boundingShaped = true, this.clipShaped = true, - this.boundingShapeExtents = const X11Rectangle(0, 0, 0, 0), - this.clipShapeExtents = const X11Rectangle(0, 0, 0, 0)}); + this.boundingShapeExtents = const X11Rectangle(), + this.clipShapeExtents = const X11Rectangle()}); static X11ShapeQueryExtentsReply fromBuffer(X11ReadBuffer buffer) { buffer.skip(1); @@ -7376,12 +7388,15 @@ class X11ShapeQueryExtentsReply extends X11Reply { boundingShaped: boundingShaped, clipShaped: clipShaped, boundingShapeExtents: X11Rectangle( - boundingShapeExtentsX, - boundingShapeExtentsY, - boundingShapeExtentsWidth, - boundingShapeExtentsHeight), - clipShapeExtents: X11Rectangle(clipShapeExtentsX, clipShapeExtentsY, - clipShapeExtentsWidth, clipShapeExtentsHeight)); + x: boundingShapeExtentsX, + y: boundingShapeExtentsY, + width: boundingShapeExtentsWidth, + height: boundingShapeExtentsHeight), + clipShapeExtents: X11Rectangle( + x: clipShapeExtentsX, + y: clipShapeExtentsY, + width: clipShapeExtentsWidth, + height: clipShapeExtentsHeight)); } @override @@ -7512,7 +7527,7 @@ class X11ShapeGetRectanglesReply extends X11Reply { var y = buffer.readInt16(); var width = buffer.readUint16(); var height = buffer.readUint16(); - rectangles.add(X11Rectangle(x, y, width, height)); + rectangles.add(X11Rectangle(x: x, y: y, width: width, height: height)); } return X11ShapeGetRectanglesReply(rectangles, ordering: ordering); } diff --git a/lib/src/x11_shape_requests.dart b/lib/src/x11_shape_requests.dart index 3e07d71..89294c1 100644 --- a/lib/src/x11_shape_requests.dart +++ b/lib/src/x11_shape_requests.dart @@ -79,7 +79,7 @@ class X11ShapeRectanglesRequest extends X11Request { var y = buffer.readInt16(); var width = buffer.readUint16(); var height = buffer.readUint16(); - rectangles.add(X11Rectangle(x, y, width, height)); + rectangles.add(X11Rectangle(x: x, y: y, width: width, height: height)); } return X11ShapeRectanglesRequest(window, rectangles, operation: operation, @@ -264,8 +264,8 @@ class X11ShapeQueryExtentsReply extends X11Reply { X11ShapeQueryExtentsReply( {this.boundingShaped = true, this.clipShaped = true, - this.boundingShapeExtents = const X11Rectangle(0, 0, 0, 0), - this.clipShapeExtents = const X11Rectangle(0, 0, 0, 0)}); + this.boundingShapeExtents = const X11Rectangle(), + this.clipShapeExtents = const X11Rectangle()}); static X11ShapeQueryExtentsReply fromBuffer(X11ReadBuffer buffer) { buffer.skip(1); @@ -284,12 +284,15 @@ class X11ShapeQueryExtentsReply extends X11Reply { boundingShaped: boundingShaped, clipShaped: clipShaped, boundingShapeExtents: X11Rectangle( - boundingShapeExtentsX, - boundingShapeExtentsY, - boundingShapeExtentsWidth, - boundingShapeExtentsHeight), - clipShapeExtents: X11Rectangle(clipShapeExtentsX, clipShapeExtentsY, - clipShapeExtentsWidth, clipShapeExtentsHeight)); + x: boundingShapeExtentsX, + y: boundingShapeExtentsY, + width: boundingShapeExtentsWidth, + height: boundingShapeExtentsHeight), + clipShapeExtents: X11Rectangle( + x: clipShapeExtentsX, + y: clipShapeExtentsY, + width: clipShapeExtentsWidth, + height: clipShapeExtentsHeight)); } @override @@ -420,7 +423,7 @@ class X11ShapeGetRectanglesReply extends X11Reply { var y = buffer.readInt16(); var width = buffer.readUint16(); var height = buffer.readUint16(); - rectangles.add(X11Rectangle(x, y, width, height)); + rectangles.add(X11Rectangle(x: x, y: y, width: width, height: height)); } return X11ShapeGetRectanglesReply(rectangles, ordering: ordering); } diff --git a/lib/src/x11_types.dart b/lib/src/x11_types.dart index 349ec3a..fcb4e88 100644 --- a/lib/src/x11_types.dart +++ b/lib/src/x11_types.dart @@ -860,10 +860,11 @@ class X11Rectangle { final int width; final int height; - const X11Rectangle(this.x, this.y, this.width, this.height); + const X11Rectangle({this.x = 0, this.y = 0, this.width = 0, this.height = 0}); @override - String toString() => 'X11Rectangle($x, $y, $width, $height)'; + String toString() => + 'X11Rectangle(x: $x, y: $y, width: $width, height: $height)'; } class X11PictFormatInfo { diff --git a/lib/src/x11_xfixes_requests.dart b/lib/src/x11_xfixes_requests.dart index 16fd983..790add1 100644 --- a/lib/src/x11_xfixes_requests.dart +++ b/lib/src/x11_xfixes_requests.dart @@ -246,7 +246,7 @@ class X11XFixesCreateRegionRequest extends X11Request { var y = buffer.readInt16(); var width = buffer.readUint16(); var height = buffer.readUint16(); - rectangles.add(X11Rectangle(x, y, width, height)); + rectangles.add(X11Rectangle(x: x, y: y, width: width, height: height)); } return X11XFixesCreateRegionRequest(id, rectangles); } @@ -403,7 +403,7 @@ class X11XFixesSetRegionRequest extends X11Request { var y = buffer.readInt16(); var width = buffer.readUint16(); var height = buffer.readUint16(); - rectangles.add(X11Rectangle(x, y, width, height)); + rectangles.add(X11Rectangle(x: x, y: y, width: width, height: height)); } return X11XFixesSetRegionRequest(region, rectangles); } @@ -546,8 +546,8 @@ class X11XFixesInvertRegionRequest extends X11Request { var width = buffer.readUint16(); var height = buffer.readUint16(); var region = buffer.readResourceId(); - return X11XFixesInvertRegionRequest( - region, X11Rectangle(x, y, width, height), sourceRegion); + return X11XFixesInvertRegionRequest(region, + X11Rectangle(x: x, y: y, width: width, height: height), sourceRegion); } @override @@ -646,7 +646,7 @@ class X11XFixesFetchRegionReply extends X11Reply { var y = buffer.readInt16(); var width = buffer.readUint16(); var height = buffer.readUint16(); - var extents = X11Rectangle(x, y, width, height); + var extents = X11Rectangle(x: x, y: y, width: width, height: height); buffer.skip(16); var rectangles = []; while (buffer.remaining > 0) { @@ -654,7 +654,7 @@ class X11XFixesFetchRegionReply extends X11Reply { var y = buffer.readInt16(); var width = buffer.readUint16(); var height = buffer.readUint16(); - rectangles.add(X11Rectangle(x, y, width, height)); + rectangles.add(X11Rectangle(x: x, y: y, width: width, height: height)); } return X11XFixesFetchRegionReply(extents: extents, rectangles: rectangles); }