-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
39 changed files
with
384 additions
and
383 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,11 @@ | ||
const c = @cImport(@cInclude("wlr/config.h")); | ||
|
||
pub const has_drm_backend = c.WLR_HAS_DRM_BACKEND != 0; | ||
pub const has_libinput_backend = c.WLR_HAS_LIBINPUT_BACKEND != 0; | ||
pub const has_x11_backend = c.WLR_HAS_X11_BACKEND != 0; | ||
|
||
pub const has_gles2_renderer = c.WLR_HAS_GLES2_RENDERER != 0; | ||
|
||
pub const has_vulkan_renderer = c.WLR_HAS_VULKAN_RENDERER != 0; | ||
|
||
pub const has_xwayland = c.WLR_HAS_XWAYLAND != 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
const wlr = @import("../wlroots.zig"); | ||
|
||
const wayland = @import("wayland"); | ||
const wl = wayland.server.wl; | ||
|
||
pub const Allocator = extern struct { | ||
pub const Interface = extern struct { | ||
create_buffer: fn (alloc: *wlr.Allocator, width: c_int, height: c_int, format: *const wlr.DrmFormat) callconv(.C) ?*wlr.Buffer, | ||
destroy: fn (alloc: *wlr.Allocator) callconv(.C) void, | ||
}; | ||
|
||
impl: *const Interface, | ||
|
||
buffer_caps: u32, | ||
|
||
events: extern struct { | ||
destroy: wl.Signal(void), | ||
}, | ||
|
||
extern fn wlr_allocator_init(alloc: *Allocator, impl: *const Interface, buffer_caps: u32) void; | ||
pub const init = wlr_allocator_init; | ||
|
||
extern fn wlr_allocator_autocreate(backend: *wlr.Backend, renderer: *wlr.Renderer) ?*Allocator; | ||
pub fn autocreate(backend: *wlr.Backend, renderer: *wlr.Renderer) !*Allocator { | ||
return wlr_allocator_autocreate(backend, renderer) orelse error.AllocatorCreateFailed; | ||
} | ||
|
||
extern fn wlr_allocator_destroy(alloc: *Allocator) void; | ||
pub const destroy = wlr_allocator_destroy; | ||
|
||
extern fn wlr_allocator_create_buffer(alloc: *Allocator, width: c_int, height: c_int, format: *const wlr.DrmFormat) ?*wlr.Buffer; | ||
pub const createBuffer = wlr_allocator_create_buffer; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.