diff --git a/Terminal.Gui/Drivers/CursesDriver.cs b/Terminal.Gui/Drivers/CursesDriver.cs index 1e10cf2f5..56a1c07c3 100644 --- a/Terminal.Gui/Drivers/CursesDriver.cs +++ b/Terminal.Gui/Drivers/CursesDriver.cs @@ -16,7 +16,7 @@ namespace Terminal.Gui { /// /// This is the Curses driver for the gui.cs/Terminal framework. /// - internal class CursesDriver : ConsoleDriver { + public class CursesDriver : ConsoleDriver { Action terminalResized; public override int Cols => Curses.Cols; @@ -70,9 +70,16 @@ namespace Terminal.Gui { public Curses.Window window; static short last_color_pair = 16; - static Attribute MakeColor (short f, short b) + + /// + /// Creates a curses color from the provided foreground and background colors + /// + /// Contains the curses attributes for the foreground (color, plus any attributes) + /// Contains the curses attributes for the background (color, plus any attributes) + /// + public static Attribute MakeColor (short foreground, short background) { - Curses.InitColorPair (++last_color_pair, f, b); + Curses.InitColorPair (++last_color_pair, foreground, background); return new Attribute () { value = Curses.ColorPair (last_color_pair) }; } diff --git a/Terminal.Gui/MonoCurses/binding.cs b/Terminal.Gui/MonoCurses/binding.cs index d8224e802..99d9b8662 100644 --- a/Terminal.Gui/MonoCurses/binding.cs +++ b/Terminal.Gui/MonoCurses/binding.cs @@ -48,9 +48,9 @@ using Mono.Terminal.Internal; namespace Unix.Terminal { - internal partial class Curses { + public partial class Curses { [StructLayout (LayoutKind.Sequential)] - internal struct MouseEvent { + public struct MouseEvent { public short ID; public int X, Y, Z; public Event ButtonState; diff --git a/Terminal.Gui/MonoCurses/constants.cs b/Terminal.Gui/MonoCurses/constants.cs index 6ea941463..068bf0eb5 100644 --- a/Terminal.Gui/MonoCurses/constants.cs +++ b/Terminal.Gui/MonoCurses/constants.cs @@ -5,7 +5,7 @@ using System; namespace Unix.Terminal { - internal partial class Curses { + public partial class Curses { public const int A_NORMAL = unchecked((int)0x0); public const int A_STANDOUT = unchecked((int)0x10000); public const int A_UNDERLINE = unchecked((int)0x20000); @@ -49,7 +49,7 @@ namespace Unix.Terminal { public const int COLOR_CYAN = unchecked((int)0x6); public const int COLOR_WHITE = unchecked((int)0x7); public const int KEY_CODE_YES = unchecked((int)0x100); - internal enum Event : long { + public enum Event : long { Button1Pressed = unchecked((int)0x2), Button1Released = unchecked((int)0x1), Button1Clicked = unchecked((int)0x4), diff --git a/Terminal.Gui/MonoCurses/handles.cs b/Terminal.Gui/MonoCurses/handles.cs index 7562cb2ae..85a1b6ac2 100644 --- a/Terminal.Gui/MonoCurses/handles.cs +++ b/Terminal.Gui/MonoCurses/handles.cs @@ -30,8 +30,8 @@ using System.Runtime.InteropServices; namespace Unix.Terminal { - internal partial class Curses { - internal class Window { + public partial class Curses { + public class Window { public readonly IntPtr Handle; static Window curscr; static Window stdscr;