Sfoglia il codice sorgente

removed unused GetColors api

Tig Kindel 2 anni fa
parent
commit
0dcc69023e

+ 0 - 12
Terminal.Gui/ConsoleDrivers/CursesDriver/CursesDriver.cs

@@ -195,18 +195,6 @@ namespace Terminal.Gui {
 			return MakeColor ((short)MapColor (fore), (short)MapColor (back));
 		}
 
-		Dictionary<int, int> rawPairs = new Dictionary<int, int> ();
-		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) {

+ 0 - 5
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 ()
 		{
 		}

+ 0 - 5
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 ()
 		{
 		}

+ 0 - 5
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 ()
 		{
 		}

+ 0 - 10
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.
-		/// <summary>
-		/// 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.
-		/// </summary>
-		/// <param name="foregroundColorId">Foreground color identifier.</param>
-		/// <param name="backgroundColorId">Background color identifier.</param>
-		public abstract void SetColors (short foregroundColorId, short backgroundColorId);
-
 		/// <summary>
 		/// Gets the foreground and background colors based on the value.
 		/// </summary>