darwin: temporarily set window background to be transparent. examples: Add core-transparent-window and remove input from core-triangle
This commit is contained in:
parent
f8a2858df8
commit
19040cae25
6 changed files with 226 additions and 17 deletions
22
examples/core-transparent-window/main.zig
Normal file
22
examples/core-transparent-window/main.zig
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
const std = @import("std");
|
||||
const mach = @import("mach");
|
||||
|
||||
// The set of Mach modules our application may use.
|
||||
const Modules = mach.Modules(.{
|
||||
mach.Core,
|
||||
@import("App.zig"),
|
||||
});
|
||||
|
||||
// TODO: move this to a mach "entrypoint" zig module which handles nuances like WASM requires.
|
||||
pub fn main() !void {
|
||||
const allocator = std.heap.c_allocator;
|
||||
|
||||
// The set of Mach modules our application may use.
|
||||
var mods: Modules = undefined;
|
||||
try mods.init(allocator);
|
||||
// TODO: enable mods.deinit(allocator); for allocator leak detection
|
||||
// defer mods.deinit(allocator);
|
||||
|
||||
const app = mods.get(.app);
|
||||
app.run(.main);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue