From 401bb91a64ae517a766be2525a237678666797fb Mon Sep 17 00:00:00 2001 From: Tom Barrett Date: Mon, 20 Dec 2021 18:19:19 +0100 Subject: setup --- src/notcurses.zig | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'src/notcurses.zig') 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); } -- cgit v1.2.3