123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747 |
- //
- // TODO:
- // * FindNCurses needs to remove the old probing code
- // * Removal of that proxy code
- // * Need to implement reading pointers with the new API
- // * Can remove the manual Dlopen features
- // * initscr() diagnostics based on DLL can be fixed
- //
- // binding.cs.in: Core binding for curses.
- //
- // This file attempts to call into ncurses without relying on Mono's
- // dllmap, so it will work with .NET Core. This means that it needs
- // two sets of bindings, one for "ncurses" which works on OSX, and one
- // that works against "libncursesw.so.5" which is what you find on
- // assorted Linux systems.
- //
- // Additionally, I do not want to rely on an external native library
- // which is why all this pain to bind two separate ncurses is here.
- //
- // Authors:
- // Miguel de Icaza ([email protected])
- //
- // Copyright (C) 2007 Novell (http://www.novell.com)
- //
- // Permission is hereby granted, free of charge, to any person obtaining
- // a copy of this software and associated documentation files (the
- // "Software"), to deal in the Software without restriction, including
- // without limitation the rights to use, copy, modify, merge, publish,
- // distribute, sublicense, and/or sell copies of the Software, and to
- // permit persons to whom the Software is furnished to do so, subject to
- // the following conditions:
- //
- // The above copyright notice and this permission notice shall be
- // included in all copies or substantial portions of the Software.
- //
- // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
- // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- //
- using System.Runtime.InteropServices;
- using Terminal.Gui;
- namespace Unix.Terminal;
- #pragma warning disable CS1591 // Missing XML comment for publicly visible type or member
- public partial class Curses
- {
- // We encode ESC + char (what Alt-char generates) as 0x2000 + char
- public const int KeyAlt = 0x2000;
- private static nint curses_handle, curscr_ptr, lines_ptr, cols_ptr;
- // If true, uses the DllImport into "ncurses", otherwise "libncursesw.so.5"
- //static bool use_naked_driver;
- private static UnmanagedLibrary curses_library;
- private static int lines, cols;
- private static Window main_window;
- private static NativeMethods methods;
- private static char [] r = new char [1];
- private static nint stdscr;
- public static int ColorPairs => methods.COLOR_PAIRS ();
- public static int Cols
- {
- get => cols;
- internal set =>
- // For unit tests
- cols = value;
- }
- public static bool HasColors => methods.has_colors ();
- public static int Lines
- {
- get => lines;
- internal set =>
- // For unit tests
- lines = value;
- }
- //
- // Have to wrap the native addch, as it can not
- // display unicode characters, we have to use addstr
- // for that. but we need addch to render special ACS
- // characters
- //
- public static int addch (int ch)
- {
- if (ch < 127 || ch > 0xffff)
- {
- return methods.addch (ch);
- }
- var c = (char)ch;
- return addwstr (new string (c, 1));
- }
- public static int addstr (string format, params object [] args)
- {
- string s = string.Format (format, args);
- return addwstr (s);
- }
- public static int addwstr (string s) { return methods.addwstr (s); }
- public static int attroff (int attrs) { return methods.attroff (attrs); }
- //static public int wechochar (IntPtr win, int ch) => methods.wechochar (win, ch);
- public static int attron (int attrs) { return methods.attron (attrs); }
- public static int attrset (int attrs) { return methods.attrset (attrs); }
- public static int cbreak () { return methods.cbreak (); }
- //
- // Returns true if the window changed since the last invocation, as a
- // side effect, the Lines and Cols properties are updated
- //
- public static bool CheckWinChange ()
- {
- int l, c;
- console_sharp_get_dims (out l, out c);
- if (l < 1)
- {
- l = 1;
- }
- if (l != lines || c != cols)
- {
- lines = l;
- cols = c;
- return true;
- }
- return false;
- }
- public static int clearok (nint win, bool bf) { return methods.clearok (win, bf); }
- public static int COLOR_PAIRS () { return methods.COLOR_PAIRS (); }
- public static int curs_set (int visibility) { return methods.curs_set (visibility); }
- public static string curses_version ()
- {
- nint v = methods.curses_version ();
- return $"{Marshal.PtrToStringAnsi (v)}, {curses_library.LibraryPath}";
- }
- public static int def_prog_mode () { return methods.def_prog_mode (); }
- public static int def_shell_mode () { return methods.def_shell_mode (); }
- public static int doupdate () { return methods.doupdate (); }
- public static int echo () { return methods.echo (); }
- //static public int addch (int ch) => methods.addch (ch);
- public static int echochar (int ch) { return methods.echochar (ch); }
- //
- // The proxy methods to call into each version
- //
- public static int endwin () { return methods.endwin (); }
- public static int flushinp () { return methods.flushinp (); }
- public static int get_wch (out int sequence) { return methods.get_wch (out sequence); }
- public static int getch () { return methods.getch (); }
- public static uint getmouse (out MouseEvent ev) { return methods.getmouse (out ev); }
- public static int halfdelay (int t) { return methods.halfdelay (t); }
- public static bool has_colors () { return methods.has_colors (); }
- public static void idcok (nint win, bool bf) { methods.idcok (win, bf); }
- public static int idlok (nint win, bool bf) { return methods.idlok (win, bf); }
- public static void immedok (nint win, bool bf) { methods.immedok (win, bf); }
- public static int init_pair (short pair, short f, short b) { return methods.init_pair (pair, f, b); }
- /// <summary>
- /// The init_pair routine changes the definition of a color-pair.It takes three arguments: the number of the
- /// color-pair to be changed, the fore- ground color number, and the background color number.For portable ap-
- /// plications: o The first argument must be a legal color pair value.If default colors are used (see
- /// use_default_colors(3x)) the upper limit is ad- justed to allow for extra pairs which use a default color in fore-
- /// ground and/or background. o The second and third arguments must be legal color values. If the color-pair was
- /// previously initialized, the screen is refreshed and all occurrences of that color-pair are changed to the new
- /// defini- tion. As an extension, ncurses allows you to set color pair 0 via the as- sume_default_colors (3x)
- /// routine, or to specify the use of default col- ors (color number -1) if you first invoke the use_default_colors
- /// (3x) routine.
- /// </summary>
- /// <param name="pair"></param>
- /// <param name="foreground"></param>
- /// <param name="background"></param>
- /// <returns></returns>
- public static int InitColorPair (short pair, short foreground, short background) { return methods.init_pair (pair, foreground, background); }
- public static Window initscr ()
- {
- setlocale (LC_ALL, "");
- FindNCurses ();
- // Prevents the terminal from being locked after exiting.
- reset_shell_mode ();
- main_window = new Window (methods.initscr ());
- try
- {
- console_sharp_get_dims (out lines, out cols);
- }
- catch (DllNotFoundException)
- {
- endwin ();
- Console.Error.WriteLine (
- "Unable to find the @MONO_CURSES@ native library\n"
- + "this is different than the managed mono-curses.dll\n\n"
- + "Typically you need to install to a LD_LIBRARY_PATH directory\n"
- + "or DYLD_LIBRARY_PATH directory or run /sbin/ldconfig"
- );
- Environment.Exit (1);
- }
- //Console.Error.WriteLine ($"using curses {Curses.curses_version ()}");
- return main_window;
- }
- public static int intrflush (nint win, bool bf) { return methods.intrflush (win, bf); }
- public static bool is_term_resized (int lines, int columns) { return methods.is_term_resized (lines, columns); }
- public static int IsAlt (int key)
- {
- if ((key & KeyAlt) != 0)
- {
- return key & ~KeyAlt;
- }
- return 0;
- }
- public static bool isendwin () { return methods.isendwin (); }
- public static int keypad (nint win, bool bf) { return methods.keypad (win, bf); }
- public static int leaveok (nint win, bool bf) { return methods.leaveok (win, bf); }
- public static int meta (nint win, bool bf) { return methods.meta (win, bf); }
- public static int mouseinterval (int interval) { return methods.mouseinterval (interval); }
- public static Event mousemask (Event newmask, out Event oldmask)
- {
- nint e;
- var ret = (Event)methods.mousemask ((nint)newmask, out e);
- oldmask = (Event)e;
- return ret;
- }
- public static int move (int line, int col) { return methods.move (line, col); }
- public static int mvaddch (int y, int x, int ch)
- {
- if (ch < 127 || ch > 0xffff)
- {
- return methods.mvaddch (y, x, ch);
- }
- var c = (char)ch;
- return mvaddwstr (y, x, new string (c, 1));
- }
- public static int mvaddwstr (int y, int x, string s) { return methods.mvaddwstr (y, x, s); }
- public static int mvgetch (int y, int x) { return methods.mvgetch (y, x); }
- public static int nl () { return methods.nl (); }
- public static int nocbreak () { return methods.nocbreak (); }
- public static int noecho () { return methods.noecho (); }
- public static int nonl () { return methods.nonl (); }
- public static void noqiflush () { methods.noqiflush (); }
- public static int noraw () { return methods.noraw (); }
- public static int notimeout (nint win, bool bf) { return methods.notimeout (win, bf); }
- public static void qiflush () { methods.qiflush (); }
- public static int raw () { return methods.raw (); }
- public static int redrawwin (nint win) { return methods.redrawwin (win); }
- public static int refresh () { return methods.refresh (); }
- public static int reset_prog_mode () { return methods.reset_prog_mode (); }
- public static int reset_shell_mode () { return methods.reset_shell_mode (); }
- public static int resetty () { return methods.resetty (); }
- public static int resize_term (int lines, int columns) { return methods.resize_term (lines, columns); }
- public static int resizeterm (int lines, int columns) { return methods.resizeterm (lines, columns); }
- public static int savetty () { return methods.savetty (); }
- public static int scrollok (nint win, bool bf) { return methods.scrollok (win, bf); }
- public static int set_escdelay (int size) { return methods.set_escdelay (size); }
- [DllImport ("libc")]
- public static extern int setlocale (int cate, [MarshalAs (UnmanagedType.LPStr)] string locale);
- public static int setscrreg (int top, int bot) { return methods.setscrreg (top, bot); }
- public static int start_color () { return methods.start_color (); }
- public static int StartColor () { return methods.start_color (); }
- public static int timeout (int delay) { return methods.timeout (delay); }
- public static int typeahead (nint fd) { return methods.typeahead (fd); }
- public static int ungetch (int ch) { return methods.ungetch (ch); }
- public static uint ungetmouse (ref MouseEvent ev) { return methods.ungetmouse (ref ev); }
- public static int use_default_colors () { return methods.use_default_colors (); }
- public static void use_env (bool f) { methods.use_env (f); }
- // TODO: Upgrade to ncurses 6.1 and use the extended version
- //public static int InitExtendedPair (int pair, int foreground, int background) => methods.init_extended_pair (pair, foreground, background);
- public static int UseDefaultColors () { return methods.use_default_colors (); }
- public static int waddch (nint win, int ch) { return methods.waddch (win, ch); }
- public static int wmove (nint win, int line, int col) { return methods.wmove (win, line, col); }
- //static public int wredrawwin (IntPtr win, int beg_line, int num_lines) => methods.wredrawwin (win, beg_line, num_lines);
- public static int wnoutrefresh (nint win) { return methods.wnoutrefresh (win); }
- public static int wrefresh (nint win) { return methods.wrefresh (win); }
- public static int wsetscrreg (nint win, int top, int bot) { return methods.wsetscrreg (win, top, bot); }
- public static int wtimeout (nint win, int delay) { return methods.wtimeout (win, delay); }
- internal static nint console_sharp_get_curscr () { return Marshal.ReadIntPtr (curscr_ptr); }
- internal static void console_sharp_get_dims (out int lines, out int cols)
- {
- lines = Marshal.ReadInt32 (lines_ptr);
- cols = Marshal.ReadInt32 (cols_ptr);
- //int cmd;
- //if (UnmanagedLibrary.IsMacOSPlatform) {
- // cmd = TIOCGWINSZ_MAC;
- //} else {
- // cmd = TIOCGWINSZ;
- //}
- //if (ioctl (1, cmd, out winsize ws) == 0) {
- // lines = ws.ws_row;
- // cols = ws.ws_col;
- // if (lines == Lines && cols == Cols) {
- // return;
- // }
- // resizeterm (lines, cols);
- //} else {
- // lines = Lines;
- // cols = Cols;
- //}
- }
- internal static nint console_sharp_get_stdscr () { return stdscr; }
- internal static nint read_static_ptr (string key)
- {
- nint ptr = get_ptr (key);
- return Marshal.ReadIntPtr (ptr);
- }
- private static void FindNCurses ()
- {
- LoadMethods ();
- curses_handle = methods.UnmanagedLibrary.NativeLibraryHandle;
- stdscr = read_static_ptr ("stdscr");
- curscr_ptr = get_ptr ("curscr");
- lines_ptr = get_ptr ("LINES");
- cols_ptr = get_ptr ("COLS");
- }
- private static nint get_ptr (string key)
- {
- nint ptr = curses_library.LoadSymbol (key);
- if (ptr == nint.Zero)
- {
- throw new Exception ("Could not load the key " + key);
- }
- return ptr;
- }
- //[DllImport ("libc")]
- //public extern static int ioctl (int fd, int cmd, out winsize argp);
- private static void LoadMethods ()
- {
- string [] libs = UnmanagedLibrary.IsMacOSPlatform
- ? new [] { "libncurses.dylib" }
- : new [] { "libncursesw.so.6", "libncursesw.so.5" };
- var attempts = 1;
- while (true)
- {
- try
- {
- curses_library = new UnmanagedLibrary (libs, false);
- methods = new NativeMethods (curses_library);
- break;
- }
- catch (Exception ex)
- {
- if (attempts == 1)
- {
- attempts++;
- (int exitCode, string result) =
- ClipboardProcessRunner.Bash ("cat /etc/os-release", waitForOutput: true);
- if (exitCode == 0 && result.Contains ("opensuse"))
- {
- libs [0] = "libncursesw.so.5";
- }
- }
- else
- {
- throw ex.GetBaseException ();
- }
- }
- }
- }
- //[StructLayout (LayoutKind.Sequential)]
- //public struct winsize {
- // public ushort ws_row;
- // public ushort ws_col;
- // public ushort ws_xpixel; /* unused */
- // public ushort ws_ypixel; /* unused */
- //};
- [StructLayout (LayoutKind.Sequential)]
- public struct MouseEvent
- {
- public short ID;
- public int X, Y, Z;
- public Event ButtonState;
- }
- }
- #pragma warning disable RCS1102 // Make class static.'
- internal class Delegates
- {
- #pragma warning restore RCS1102 // Make class static.
- #pragma warning disable CS8981 // The type name only contains lower-cased ascii characters. Such names may become reserved for the language.
- public delegate nint initscr ();
- public delegate int endwin ();
- public delegate bool isendwin ();
- public delegate int cbreak ();
- public delegate int nocbreak ();
- public delegate int echo ();
- public delegate int noecho ();
- public delegate int halfdelay (int t);
- public delegate int raw ();
- public delegate int noraw ();
- public delegate void noqiflush ();
- public delegate void qiflush ();
- public delegate int typeahead (nint fd);
- public delegate int timeout (int delay);
- public delegate int wtimeout (nint win, int delay);
- public delegate int notimeout (nint win, bool bf);
- public delegate int keypad (nint win, bool bf);
- public delegate int meta (nint win, bool bf);
- public delegate int intrflush (nint win, bool bf);
- public delegate int clearok (nint win, bool bf);
- public delegate int idlok (nint win, bool bf);
- public delegate void idcok (nint win, bool bf);
- public delegate void immedok (nint win, bool bf);
- public delegate int leaveok (nint win, bool bf);
- public delegate int wsetscrreg (nint win, int top, int bot);
- public delegate int scrollok (nint win, bool bf);
- public delegate int nl ();
- public delegate int nonl ();
- public delegate int setscrreg (int top, int bot);
- public delegate int refresh ();
- public delegate int doupdate ();
- public delegate int wrefresh (nint win);
- public delegate int redrawwin (nint win);
- //public delegate int wredrawwin (IntPtr win, int beg_line, int num_lines);
- public delegate int wnoutrefresh (nint win);
- public delegate int move (int line, int col);
- public delegate int curs_set (int visibility);
- public delegate int addch (int ch);
- public delegate int echochar (int ch);
- public delegate int mvaddch (int y, int x, int ch);
- public delegate int addwstr ([MarshalAs (UnmanagedType.LPWStr)] string s);
- public delegate int mvaddwstr (int y, int x, [MarshalAs (UnmanagedType.LPWStr)] string s);
- public delegate int wmove (nint win, int line, int col);
- public delegate int waddch (nint win, int ch);
- public delegate int attron (int attrs);
- public delegate int attroff (int attrs);
- public delegate int attrset (int attrs);
- public delegate int getch ();
- public delegate int get_wch (out int sequence);
- public delegate int ungetch (int ch);
- public delegate int mvgetch (int y, int x);
- public delegate bool has_colors ();
- public delegate int start_color ();
- public delegate int init_pair (short pair, short f, short b);
- public delegate int use_default_colors ();
- public delegate int COLOR_PAIRS ();
- public delegate uint getmouse (out Curses.MouseEvent ev);
- public delegate uint ungetmouse (ref Curses.MouseEvent ev);
- public delegate int mouseinterval (int interval);
- public delegate nint mousemask (nint newmask, out nint oldMask);
- public delegate bool is_term_resized (int lines, int columns);
- public delegate int resize_term (int lines, int columns);
- public delegate int resizeterm (int lines, int columns);
- public delegate void use_env (bool f);
- public delegate int flushinp ();
- public delegate int def_prog_mode ();
- public delegate int def_shell_mode ();
- public delegate int reset_prog_mode ();
- public delegate int reset_shell_mode ();
- public delegate int savetty ();
- public delegate int resetty ();
- public delegate int set_escdelay (int size);
- public delegate nint curses_version ();
- }
- internal class NativeMethods
- {
- public readonly Delegates.addch addch;
- public readonly Delegates.addwstr addwstr;
- public readonly Delegates.attroff attroff;
- //public readonly Delegates.wechochar wechochar;
- public readonly Delegates.attron attron;
- public readonly Delegates.attrset attrset;
- public readonly Delegates.cbreak cbreak;
- public readonly Delegates.clearok clearok;
- public readonly Delegates.COLOR_PAIRS COLOR_PAIRS;
- public readonly Delegates.curs_set curs_set;
- public readonly Delegates.curses_version curses_version;
- public readonly Delegates.def_prog_mode def_prog_mode;
- public readonly Delegates.def_shell_mode def_shell_mode;
- public readonly Delegates.doupdate doupdate;
- public readonly Delegates.echo echo;
- public readonly Delegates.echochar echochar;
- public readonly Delegates.endwin endwin;
- public readonly Delegates.flushinp flushinp;
- public readonly Delegates.get_wch get_wch;
- public readonly Delegates.getch getch;
- public readonly Delegates.getmouse getmouse;
- public readonly Delegates.halfdelay halfdelay;
- public readonly Delegates.has_colors has_colors;
- public readonly Delegates.idcok idcok;
- public readonly Delegates.idlok idlok;
- public readonly Delegates.immedok immedok;
- public readonly Delegates.init_pair init_pair;
- public readonly Delegates.initscr initscr;
- public readonly Delegates.intrflush intrflush;
- public readonly Delegates.is_term_resized is_term_resized;
- public readonly Delegates.isendwin isendwin;
- public readonly Delegates.keypad keypad;
- public readonly Delegates.leaveok leaveok;
- public readonly Delegates.meta meta;
- public readonly Delegates.mouseinterval mouseinterval;
- public readonly Delegates.mousemask mousemask;
- public readonly Delegates.move move;
- public readonly Delegates.mvaddch mvaddch;
- public readonly Delegates.mvaddwstr mvaddwstr;
- public readonly Delegates.mvgetch mvgetch;
- public readonly Delegates.nl nl;
- public readonly Delegates.nocbreak nocbreak;
- public readonly Delegates.noecho noecho;
- public readonly Delegates.nonl nonl;
- public readonly Delegates.noqiflush noqiflush;
- public readonly Delegates.noraw noraw;
- public readonly Delegates.notimeout notimeout;
- public readonly Delegates.qiflush qiflush;
- public readonly Delegates.raw raw;
- public readonly Delegates.redrawwin redrawwin;
- public readonly Delegates.refresh refresh;
- public readonly Delegates.reset_prog_mode reset_prog_mode;
- public readonly Delegates.reset_shell_mode reset_shell_mode;
- public readonly Delegates.resetty resetty;
- public readonly Delegates.resize_term resize_term;
- public readonly Delegates.resizeterm resizeterm;
- public readonly Delegates.savetty savetty;
- public readonly Delegates.scrollok scrollok;
- public readonly Delegates.set_escdelay set_escdelay;
- public readonly Delegates.setscrreg setscrreg;
- public readonly Delegates.start_color start_color;
- public readonly Delegates.timeout timeout;
- public readonly Delegates.typeahead typeahead;
- public readonly Delegates.ungetch ungetch;
- public readonly Delegates.ungetmouse ungetmouse;
- public readonly Delegates.use_default_colors use_default_colors;
- public readonly Delegates.use_env use_env;
- public readonly Delegates.waddch waddch;
- public readonly Delegates.wmove wmove;
- //public readonly Delegates.wredrawwin wredrawwin;
- public readonly Delegates.wnoutrefresh wnoutrefresh;
- public readonly Delegates.wrefresh wrefresh;
- public readonly Delegates.wsetscrreg wsetscrreg;
- public readonly Delegates.wtimeout wtimeout;
- public UnmanagedLibrary UnmanagedLibrary;
- public NativeMethods (UnmanagedLibrary lib)
- {
- UnmanagedLibrary = lib;
- initscr = lib.GetNativeMethodDelegate<Delegates.initscr> ("initscr");
- endwin = lib.GetNativeMethodDelegate<Delegates.endwin> ("endwin");
- isendwin = lib.GetNativeMethodDelegate<Delegates.isendwin> ("isendwin");
- cbreak = lib.GetNativeMethodDelegate<Delegates.cbreak> ("cbreak");
- nocbreak = lib.GetNativeMethodDelegate<Delegates.nocbreak> ("nocbreak");
- echo = lib.GetNativeMethodDelegate<Delegates.echo> ("echo");
- noecho = lib.GetNativeMethodDelegate<Delegates.noecho> ("noecho");
- halfdelay = lib.GetNativeMethodDelegate<Delegates.halfdelay> ("halfdelay");
- raw = lib.GetNativeMethodDelegate<Delegates.raw> ("raw");
- noraw = lib.GetNativeMethodDelegate<Delegates.noraw> ("noraw");
- noqiflush = lib.GetNativeMethodDelegate<Delegates.noqiflush> ("noqiflush");
- qiflush = lib.GetNativeMethodDelegate<Delegates.qiflush> ("qiflush");
- typeahead = lib.GetNativeMethodDelegate<Delegates.typeahead> ("typeahead");
- timeout = lib.GetNativeMethodDelegate<Delegates.timeout> ("timeout");
- wtimeout = lib.GetNativeMethodDelegate<Delegates.wtimeout> ("wtimeout");
- notimeout = lib.GetNativeMethodDelegate<Delegates.notimeout> ("notimeout");
- keypad = lib.GetNativeMethodDelegate<Delegates.keypad> ("keypad");
- meta = lib.GetNativeMethodDelegate<Delegates.meta> ("meta");
- intrflush = lib.GetNativeMethodDelegate<Delegates.intrflush> ("intrflush");
- clearok = lib.GetNativeMethodDelegate<Delegates.clearok> ("clearok");
- idlok = lib.GetNativeMethodDelegate<Delegates.idlok> ("idlok");
- idcok = lib.GetNativeMethodDelegate<Delegates.idcok> ("idcok");
- immedok = lib.GetNativeMethodDelegate<Delegates.immedok> ("immedok");
- leaveok = lib.GetNativeMethodDelegate<Delegates.leaveok> ("leaveok");
- wsetscrreg = lib.GetNativeMethodDelegate<Delegates.wsetscrreg> ("wsetscrreg");
- scrollok = lib.GetNativeMethodDelegate<Delegates.scrollok> ("scrollok");
- nl = lib.GetNativeMethodDelegate<Delegates.nl> ("nl");
- nonl = lib.GetNativeMethodDelegate<Delegates.nonl> ("nonl");
- setscrreg = lib.GetNativeMethodDelegate<Delegates.setscrreg> ("setscrreg");
- refresh = lib.GetNativeMethodDelegate<Delegates.refresh> ("refresh");
- doupdate = lib.GetNativeMethodDelegate<Delegates.doupdate> ("doupdate");
- wrefresh = lib.GetNativeMethodDelegate<Delegates.wrefresh> ("wrefresh");
- redrawwin = lib.GetNativeMethodDelegate<Delegates.redrawwin> ("redrawwin");
- //wredrawwin = lib.GetNativeMethodDelegate<Delegates.wredrawwin> ("wredrawwin");
- wnoutrefresh = lib.GetNativeMethodDelegate<Delegates.wnoutrefresh> ("wnoutrefresh");
- move = lib.GetNativeMethodDelegate<Delegates.move> ("move");
- curs_set = lib.GetNativeMethodDelegate<Delegates.curs_set> ("curs_set");
- addch = lib.GetNativeMethodDelegate<Delegates.addch> ("addch");
- echochar = lib.GetNativeMethodDelegate<Delegates.echochar> ("echochar");
- mvaddch = lib.GetNativeMethodDelegate<Delegates.mvaddch> ("mvaddch");
- addwstr = lib.GetNativeMethodDelegate<Delegates.addwstr> ("addwstr");
- mvaddwstr = lib.GetNativeMethodDelegate<Delegates.mvaddwstr> ("mvaddwstr");
- wmove = lib.GetNativeMethodDelegate<Delegates.wmove> ("wmove");
- waddch = lib.GetNativeMethodDelegate<Delegates.waddch> ("waddch");
- attron = lib.GetNativeMethodDelegate<Delegates.attron> ("attron");
- attroff = lib.GetNativeMethodDelegate<Delegates.attroff> ("attroff");
- attrset = lib.GetNativeMethodDelegate<Delegates.attrset> ("attrset");
- getch = lib.GetNativeMethodDelegate<Delegates.getch> ("getch");
- get_wch = lib.GetNativeMethodDelegate<Delegates.get_wch> ("get_wch");
- ungetch = lib.GetNativeMethodDelegate<Delegates.ungetch> ("ungetch");
- mvgetch = lib.GetNativeMethodDelegate<Delegates.mvgetch> ("mvgetch");
- has_colors = lib.GetNativeMethodDelegate<Delegates.has_colors> ("has_colors");
- start_color = lib.GetNativeMethodDelegate<Delegates.start_color> ("start_color");
- init_pair = lib.GetNativeMethodDelegate<Delegates.init_pair> ("init_pair");
- use_default_colors = lib.GetNativeMethodDelegate<Delegates.use_default_colors> ("use_default_colors");
- COLOR_PAIRS = lib.GetNativeMethodDelegate<Delegates.COLOR_PAIRS> ("COLOR_PAIRS");
- getmouse = lib.GetNativeMethodDelegate<Delegates.getmouse> ("getmouse");
- ungetmouse = lib.GetNativeMethodDelegate<Delegates.ungetmouse> ("ungetmouse");
- mouseinterval = lib.GetNativeMethodDelegate<Delegates.mouseinterval> ("mouseinterval");
- mousemask = lib.GetNativeMethodDelegate<Delegates.mousemask> ("mousemask");
- is_term_resized = lib.GetNativeMethodDelegate<Delegates.is_term_resized> ("is_term_resized");
- resize_term = lib.GetNativeMethodDelegate<Delegates.resize_term> ("resize_term");
- resizeterm = lib.GetNativeMethodDelegate<Delegates.resizeterm> ("resizeterm");
- use_env = lib.GetNativeMethodDelegate<Delegates.use_env> ("use_env");
- flushinp = lib.GetNativeMethodDelegate<Delegates.flushinp> ("flushinp");
- def_prog_mode = lib.GetNativeMethodDelegate<Delegates.def_prog_mode> ("def_prog_mode");
- def_shell_mode = lib.GetNativeMethodDelegate<Delegates.def_shell_mode> ("def_shell_mode");
- reset_prog_mode = lib.GetNativeMethodDelegate<Delegates.reset_prog_mode> ("reset_prog_mode");
- reset_shell_mode = lib.GetNativeMethodDelegate<Delegates.reset_shell_mode> ("reset_shell_mode");
- savetty = lib.GetNativeMethodDelegate<Delegates.savetty> ("savetty");
- resetty = lib.GetNativeMethodDelegate<Delegates.resetty> ("resetty");
- set_escdelay = lib.GetNativeMethodDelegate<Delegates.set_escdelay> ("set_escdelay");
- curses_version = lib.GetNativeMethodDelegate<Delegates.curses_version> ("curses_version");
- }
- }
- #pragma warning restore CS1591 // Missing XML comment for publicly visible type or member
- #pragma warning restore CS8981 // The type name only contains lower-cased ascii characters. Such names may become reserved for the language.
|