diff options
author | Tom Barrett <tom@tombarrett.xyz> | 2021-12-20 18:19:19 +0100 |
---|---|---|
committer | Tom Barrett <tom@tombarrett.xyz> | 2021-12-20 18:19:19 +0100 |
commit | 401bb91a64ae517a766be2525a237678666797fb (patch) | |
tree | 18b236253da5732d1c02fc58ea1056b5c6677a8b /src/notcurses.zig | |
parent | 83c27ccc818df03c906ddc90357b99fddbfafbc0 (diff) |
setup
Diffstat (limited to 'src/notcurses.zig')
-rw-r--r-- | src/notcurses.zig | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/src/notcurses.zig b/src/notcurses.zig index 4a790b8..2adba41 100644 --- a/src/notcurses.zig +++ b/src/notcurses.zig @@ -1,18 +1,18 @@ -const std = @import("std"); -const notcurses = @cImport(@cInclude("notcurses/notcurses.h")); +//const std = @import("std"); +const nc = @cImport(@cInclude("notcurses/notcurses.h")); -pub const default_notcurses_options = notcurses.notcurses_options{ - .termtype = null, - //.renderfp = null, - .loglevel = notcurses.ncloglevel_e.NCLOGLEVEL_SILENT, - .margin_t = 0, - .margin_r = 0, - .margin_b = 0, - .margin_l = 0, - .flags = 0, -}; +pub fn init() ?*nc.notcurses { + return nc.notcurses_init(null, null); +} + +pub fn stdplane(runtime: ?*nc.notcurses) ?*nc.ncplane { + return nc.notcurses_stdplane(runtime); +} + +pub fn plane_putchar_yx(plane: ?*nc.ncplane, y: u8, x: u8, c: u8) void { + var ret = nc.ncplane_putchar_yx(plane, y, x, c); +} -pub fn init() ?*notcurses.notcurses { - var options = default_notcurses_options; - return notcurses.notcurses_init(&options, null); +pub fn render(runtime: ?*nc.notcurses) void { + var ret = nc.notcurses_render(runtime); } |