From 09d8912d4ea2cc64b9ad637e7e583f4d2624ea3c Mon Sep 17 00:00:00 2001 From: nick black Date: Thu, 2 Apr 2020 21:27:21 -0400 Subject: [PATCH] notcurses-keyplot #430 --- include/notcurses/notcurses.h | 4 ++++ src/input/keyplot.cpp | 10 +++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/include/notcurses/notcurses.h b/include/notcurses/notcurses.h index fff78a91c..3f6f7a9cd 100644 --- a/include/notcurses/notcurses.h +++ b/include/notcurses/notcurses.h @@ -2531,6 +2531,10 @@ typedef struct ncplot_options { // of keys. for a time range, say the previous hour sampled with second // resolution, the independent variable would be the range [0..3960). int64_t minx, maxx; + // y axis min and max. set the two equal (to any stand-in value; 0 is + // recommended) for autodiscovery of range. + int64_t miny, maxy; + bool exponentialy; // is y-axis exponential? } ncplot_options; API struct ncplot* ncplot_create(struct ncplane* n, const ncplot_options* opts); diff --git a/src/input/keyplot.cpp b/src/input/keyplot.cpp index 3dd248c66..0fc88821a 100644 --- a/src/input/keyplot.cpp +++ b/src/input/keyplot.cpp @@ -2,5 +2,13 @@ #include int main(void){ - return EXIT_FAILURE; // FIXME + if(setlocale(LC_ALL, "") == nullptr){ + return EXIT_FAILURE; + } + ncpp::NotCurses nc; + if(!nc.mouse_enable()){ + return EXIT_FAILURE; + } + // FIXME + return EXIT_SUCCESS; }