Skip to content

Commit df8feab

Browse files
gdk: allow modifying Rectangle fields
1 parent ea68a23 commit df8feab

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

gdk4/src/rectangle.rs

+16
Original file line numberDiff line numberDiff line change
@@ -23,17 +23,33 @@ impl Rectangle {
2323
self.inner.x
2424
}
2525

26+
pub fn set_x(&mut self, x: i32) {
27+
self.inner.x = x;
28+
}
29+
2630
pub fn y(&self) -> i32 {
2731
self.inner.y
2832
}
2933

34+
pub fn set_y(&mut self, y: i32) {
35+
self.inner.y = y;
36+
}
37+
3038
pub fn width(&self) -> i32 {
3139
self.inner.width
3240
}
3341

42+
pub fn set_width(&mut self, width: i32) {
43+
self.inner.width = width;
44+
}
45+
3446
pub fn height(&self) -> i32 {
3547
self.inner.height
3648
}
49+
50+
pub fn set_height(&mut self, height: i32) {
51+
self.inner.height = height;
52+
}
3753
}
3854

3955
impl fmt::Debug for Rectangle {

0 commit comments

Comments
 (0)