aboutsummaryrefslogtreecommitdiff
path: root/src/box.zig
blob: 2d28a1c43ab712c167be934352900f890ed4bb9d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
const Self = @This();

const c = @import("c.zig");

x: i32,
y: i32,
width: u32,
height: u32,

pub fn toWlrBox(self: Self) c.wlr_box {
    return c.wlr_box{
        .x = @intCast(c_int, self.x),
        .y = @intCast(c_int, self.y),
        .width = @intCast(c_int, self.width),
        .height = @intCast(c_int, self.height),
    };
}