From b93dcfb7972e62cf81fccbe74d5c83500dbdf59d Mon Sep 17 00:00:00 2001 From: Janis Date: Sat, 17 Dec 2022 15:12:18 +0100 Subject: [PATCH] renamed cairo to Cairo --- main.zig | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/main.zig b/main.zig index 475789c..991c2cb 100644 --- a/main.zig +++ b/main.zig @@ -11,7 +11,7 @@ const xkb = @cImport({ @cInclude("xkbcommon/xkbcommon.h"); }); -const cairo = @cImport({ +const Cairo = @cImport({ @cInclude("cairo/cairo.h"); }); @@ -53,8 +53,8 @@ const Buffer = struct { buffer: *wl.Buffer = undefined, cairo: struct { - surface: *cairo.cairo_surface_t = undefined, - ctx: *cairo.cairo_t = undefined, + surface: *Cairo.cairo_surface_t = undefined, + ctx: *Cairo.cairo_t = undefined, } = .{}, size: Size = .{}, data: []u8 = undefined, @@ -99,15 +99,15 @@ const Buffer = struct { .argb8888, ); - const surface = cairo.cairo_image_surface_create_for_data( + const surface = Cairo.cairo_image_surface_create_for_data( @ptrCast([*c]u8, data), - cairo.CAIRO_FORMAT_ARGB32, + Cairo.CAIRO_FORMAT_ARGB32, @intCast(c_int, size.width), @intCast(c_int, size.height), @intCast(c_int, stride), ) orelse return error.NoCairoSurface; - const cairo_ctx = cairo.cairo_create(surface) orelse return error.NoCairoContext; + const cairo_ctx = Cairo.cairo_create(surface) orelse return error.NoCairoContext; self.* = .{ .buffer = buffer, @@ -124,8 +124,8 @@ const Buffer = struct { std.os.munmap(@alignCast(0x1000, self.data)); self.buffer.destroy(); - cairo.cairo_destroy(self.cairo.ctx); - cairo.cairo_surface_destroy(self.cairo.surface); + Cairo.cairo_destroy(self.cairo.ctx); + Cairo.cairo_surface_destroy(self.cairo.surface); } };