about summary refs log tree commit diff stats
path: root/html/400.mu.html
Commit message (Expand)AuthorAgeFilesLines
* 7476Kartik Agaram2020-12-301-1/+1
* 7335Kartik Agaram2020-12-041-93/+99
* 7311Kartik Agaram2020-12-011-2/+2
* 7306Kartik Agaram2020-11-291-2/+4
* 7249Kartik Agaram2020-11-151-56/+56
* 7227Kartik Agaram2020-11-111-2/+4
* 7162Kartik Agaram2020-11-021-44/+48
* 6958Kartik Agaram2020-10-051-135/+148
* 6774Kartik Agaram2020-09-111-8/+10
* 6746Kartik Agaram2020-09-071-112/+115
* 6724Kartik Agaram2020-08-221-18/+19
* 6716Kartik Agaram2020-08-151-16/+16
* 6693Kartik Agaram2020-07-311-0/+3
* 6685Kartik Agaram2020-07-291-13/+13
* 6673Kartik Agaram2020-07-251-15/+15
* 6632Kartik Agaram2020-07-111-3/+3
* 6631Kartik Agaram2020-07-111-0/+218
ound-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
const notcurseslib = (func(): string =
  when defined(windows): return "libnotcurses-core.dll"
  elif defined(macos): return "libnotcurses-core(|.3|.3.0.8).dylib"
  else: return "libnotcurses-core.so(|.3|.3.0.8)" # assume posix
)()

{.push cdecl, dynlib: notcurseslib.}

const
  NCOPTION_INHIBIT_SETLOCALE* = 0x0001u64
  NCOPTION_NO_CLEAR_BITMAPS* = 0x0002u64
  NCOPTION_NO_WINCH_SIGHANDLER* = 0x0004u64
  NCOPTION_NO_QUIT_SIGHANDLERS* = 0x0008u64
  NCOPTION_PRESERVE_CURSOR* = 0x0010u64
  NCOPTION_SUPPRESS_BANNERS* = 0x0020u64
  NCOPTION_NO_ALTERNATE_SCREEN* = 0x0040u64
  NCOPTION_NO_FONT_CHANGES* = 0x0080u64
  NCOPTION_DRAIN_INPUT* = 0x0100u64
  NCOPTION_SCROLLING* = 0x0200u64

const
  NCDIRECT_OPTION_INHIBIT_SETLOCALE* = 0x0001u64
  NCDIRECT_OPTION_INHIBIT_CBREAK* = 0x0002u64
  NCDIRECT_OPTION_NO_QUIT_SIGHANDLERS* = 0x0008u64
  NCDIRECT_OPTION_VERBOSE* = 0x0010u64
  NCDIRECT_OPTION_VERY_VERBOSE* = 0x0020u64

const NCOPTION_CLI_MODE = NCOPTION_NO_ALTERNATE_SCREEN or
  NCOPTION_NO_CLEAR_BITMAPS or
  NCOPTION_PRESERVE_CURSOR or
  NCOPTION_SCROLLING

type
  ncloglevel_e* {.size: sizeof(cint).} = enum
    NCLOGLEVEL_SILENT  # print nothing once fullscreen service begins
    NCLOGLEVEL_PANIC   # default. print diagnostics before we crash/exit
    NCLOGLEVEL_FATAL   # we're hanging around, but we've had a horrible fault
    NCLOGLEVEL_ERROR   # we can't keep doing this, but we can do other things
    NCLOGLEVEL_WARNING # you probably don't want what's happening to happen
    NCLOGLEVEL_INFO    # "standard information"
    NCLOGLEVEL_VERBOSE # "detailed information"
    NCLOGLEVEL_DEBUG   # this is honestly a bit much
    NCLOGLEVEL_TRACE   # there's probably a better way to do what you want

  notcurses_options_struct* = object
    termtype*: cstring
    loglevel*: ncloglevel_e
    margin_t*: cuint
    margin_r*: cuint
    margin_b*: cuint
    margin_l*: cuint
    flags*: uint64

  notcurses_options* = ptr notcurses_options_struct

  notcurses* = pointer

  ncdirect* = pointer

{.push importc.}

proc ncdirect_core_init*(termtype: cstring, fp: File, flags: uint64): ncdirect
proc ncdirect_stop*(nc: ncdirect): cint

{.pop.}
{.pop.}