From 0dcc69023e0fda605e1e684df302a5051af58ce5 Mon Sep 17 00:00:00 2001 From: Tig Kindel Date: Mon, 6 Feb 2023 11:26:36 +0900 Subject: [PATCH] removed unused GetColors api --- .../ConsoleDrivers/CursesDriver/CursesDriver.cs | 12 ------------ Terminal.Gui/ConsoleDrivers/FakeDriver/FakeDriver.cs | 5 ----- Terminal.Gui/ConsoleDrivers/NetDriver.cs | 5 ----- Terminal.Gui/ConsoleDrivers/WindowsDriver.cs | 5 ----- Terminal.Gui/Core/ConsoleDriver.cs | 10 ---------- 5 files changed, 37 deletions(-) diff --git a/Terminal.Gui/ConsoleDrivers/CursesDriver/CursesDriver.cs b/Terminal.Gui/ConsoleDrivers/CursesDriver/CursesDriver.cs index 7c828afd5..e7ebc03f8 100644 --- a/Terminal.Gui/ConsoleDrivers/CursesDriver/CursesDriver.cs +++ b/Terminal.Gui/ConsoleDrivers/CursesDriver/CursesDriver.cs @@ -195,18 +195,6 @@ namespace Terminal.Gui { return MakeColor ((short)MapColor (fore), (short)MapColor (back)); } - Dictionary rawPairs = new Dictionary (); - public override void SetColors (short foreColorId, short backgroundColorId) - { - // BUGBUG: This code is never called ?? See Issue #2300 - int key = ((ushort)foreColorId << 16) | (ushort)backgroundColorId; - if (!rawPairs.TryGetValue (key, out var v)) { - v = MakeColor (foreColorId, backgroundColorId); - rawPairs [key] = v; - } - SetAttribute (v); - } - static Key MapCursesKey (int cursesKey) { switch (cursesKey) { diff --git a/Terminal.Gui/ConsoleDrivers/FakeDriver/FakeDriver.cs b/Terminal.Gui/ConsoleDrivers/FakeDriver/FakeDriver.cs index 0b22e30e8..27d038982 100644 --- a/Terminal.Gui/ConsoleDrivers/FakeDriver/FakeDriver.cs +++ b/Terminal.Gui/ConsoleDrivers/FakeDriver/FakeDriver.cs @@ -654,11 +654,6 @@ namespace Terminal.Gui { { } - public override void SetColors (short foregroundColorId, short backgroundColorId) - { - throw new NotImplementedException (); - } - public override void CookMouse () { } diff --git a/Terminal.Gui/ConsoleDrivers/NetDriver.cs b/Terminal.Gui/ConsoleDrivers/NetDriver.cs index 2726d38da..bad3d940e 100644 --- a/Terminal.Gui/ConsoleDrivers/NetDriver.cs +++ b/Terminal.Gui/ConsoleDrivers/NetDriver.cs @@ -2001,11 +2001,6 @@ namespace Terminal.Gui { } #region Unused - - public override void SetColors (short foregroundColorId, short backgroundColorId) - { - } - public override void CookMouse () { } diff --git a/Terminal.Gui/ConsoleDrivers/WindowsDriver.cs b/Terminal.Gui/ConsoleDrivers/WindowsDriver.cs index fcb128e28..59a3d9674 100644 --- a/Terminal.Gui/ConsoleDrivers/WindowsDriver.cs +++ b/Terminal.Gui/ConsoleDrivers/WindowsDriver.cs @@ -1769,11 +1769,6 @@ namespace Terminal.Gui { } #region Unused - - public override void SetColors (short foregroundColorId, short backgroundColorId) - { - } - public override void Suspend () { } diff --git a/Terminal.Gui/Core/ConsoleDriver.cs b/Terminal.Gui/Core/ConsoleDriver.cs index 518771801..7e6eb0953 100644 --- a/Terminal.Gui/Core/ConsoleDriver.cs +++ b/Terminal.Gui/Core/ConsoleDriver.cs @@ -905,16 +905,6 @@ namespace Terminal.Gui { CurrentAttribute = c; } - // Advanced uses - set colors to any pre-set pairs, you would need to init_color - // that independently with the R, G, B values. - /// - /// Advanced uses - set colors to any pre-set pairs, you would need to init_color - /// that independently with the R, G, B values. Not implemented by any driver: See Issue #2300. - /// - /// Foreground color identifier. - /// Background color identifier. - public abstract void SetColors (short foregroundColorId, short backgroundColorId); - /// /// Gets the foreground and background colors based on the value. ///