diff --git a/BuildTime.txt b/BuildTime.txt
index 1198a6f..d91312e 100644
--- a/BuildTime.txt
+++ b/BuildTime.txt
@@ -1 +1 @@
-2026-03-03 21:19:17
\ No newline at end of file
+2026-03-06 21:05:30
\ No newline at end of file
diff --git a/Driver/VMWareSVGAII.cs b/Driver/VMWareSVGAII.cs
new file mode 100644
index 0000000..08ce56e
--- /dev/null
+++ b/Driver/VMWareSVGAII.cs
@@ -0,0 +1,836 @@
+/*
+BSD 3-Clause License
+
+Copyright (c) 2023, CosmosOS, COSMOS Project
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+1. Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+
+2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+3. Neither the name of the copyright holder nor the names of its
+ contributors may be used to endorse or promote products derived from
+ this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+using Cosmos.Core;
+using Cosmos.HAL;
+using Cosmos.System.Graphics;
+using System;
+
+namespace CMLeonOS.Driver
+{
+ ///
+ /// VMWareSVGAII class.
+ ///
+ public class VMWareSVGAII
+ {
+ ///
+ /// Register values.
+ ///
+ public enum Register : ushort
+ {
+ ///
+ /// ID.
+ ///
+ ID = 0,
+ ///
+ /// Enabled.
+ ///
+ Enable = 1,
+ ///
+ /// Width.
+ ///
+ Width = 2,
+ ///
+ /// Height.
+ ///
+ Height = 3,
+ ///
+ /// Max width.
+ ///
+ MaxWidth = 4,
+ ///
+ /// Max height.
+ ///
+ MaxHeight = 5,
+ ///
+ /// Depth.
+ ///
+ Depth = 6,
+ ///
+ /// Bits per pixel.
+ ///
+ BitsPerPixel = 7,
+ ///
+ /// Pseudo color.
+ ///
+ PseudoColor = 8,
+ ///
+ /// Red mask.
+ ///
+ RedMask = 9,
+ ///
+ /// Green mask.
+ ///
+ GreenMask = 10,
+ ///
+ /// Blue mask.
+ ///
+ BlueMask = 11,
+ ///
+ /// Bytes per line.
+ ///
+ BytesPerLine = 12,
+ ///
+ /// Frame buffer start.
+ ///
+ FrameBufferStart = 13,
+ ///
+ /// Frame buffer offset.
+ ///
+ FrameBufferOffset = 14,
+ ///
+ /// VRAM size.
+ ///
+ VRamSize = 15,
+ ///
+ /// Frame buffer size.
+ ///
+ FrameBufferSize = 16,
+ ///
+ /// Capabilities.
+ ///
+ Capabilities = 17,
+ ///
+ /// Memory start.
+ ///
+ MemStart = 18,
+ ///
+ /// Memory size.
+ ///
+ MemSize = 19,
+ ///
+ /// Config done.
+ ///
+ ConfigDone = 20,
+ ///
+ /// Sync.
+ ///
+ Sync = 21,
+ ///
+ /// Busy.
+ ///
+ Busy = 22,
+ ///
+ /// Guest ID.
+ ///
+ GuestID = 23,
+ ///
+ /// Cursor ID.
+ ///
+ CursorID = 24,
+ ///
+ /// Cursor X.
+ ///
+ CursorX = 25,
+ ///
+ /// Cursor Y.
+ ///
+ CursorY = 26,
+ ///
+ /// Cursor on.
+ ///
+ CursorOn = 27,
+ ///
+ /// Host bits per pixel.
+ ///
+ HostBitsPerPixel = 28,
+ ///
+ /// Scratch size.
+ ///
+ ScratchSize = 29,
+ ///
+ /// Memory registers.
+ ///
+ MemRegs = 30,
+ ///
+ /// Number of displays.
+ ///
+ NumDisplays = 31,
+ ///
+ /// Pitch lock.
+ ///
+ PitchLock = 32,
+ ///
+ /// Indicates maximum size of FIFO Registers.
+ ///
+ FifoNumRegisters = 293
+ }
+
+ ///
+ /// ID values.
+ ///
+ private enum ID : uint
+ {
+ ///
+ /// Magic starting point.
+ ///
+ Magic = 0x900000,
+ ///
+ /// V0.
+ ///
+ V0 = Magic << 8,
+ ///
+ /// V1.
+ ///
+ V1 = (Magic << 8) | 1,
+ ///
+ /// V2.
+ ///
+ V2 = (Magic << 8) | 2,
+ ///
+ /// Invalid
+ ///
+ Invalid = 0xFFFFFFFF
+ }
+
+ ///
+ /// FIFO values.
+ ///
+ public enum FIFO : uint
+ { // values are multiplied by 4 to access the array by byte index
+ ///
+ /// Min.
+ ///
+ Min = 0,
+ ///
+ /// Max.
+ ///
+ Max = 4,
+ ///
+ /// Next command.
+ ///
+ NextCmd = 8,
+ ///
+ /// Stop.
+ ///
+ Stop = 12
+ }
+
+ ///
+ /// FIFO command values.
+ ///
+ private enum FIFOCommand
+ {
+ ///
+ /// Update.
+ ///
+ Update = 1,
+ ///
+ /// Rectange fill.
+ ///
+ RECT_FILL = 2,
+ ///
+ /// Rectange copy.
+ ///
+ RECT_COPY = 3,
+ ///
+ /// Define bitmap.
+ ///
+ DEFINE_BITMAP = 4,
+ ///
+ /// Define bitmap scanline.
+ ///
+ DEFINE_BITMAP_SCANLINE = 5,
+ ///
+ /// Define pixmap.
+ ///
+ DEFINE_PIXMAP = 6,
+ ///
+ /// Define pixmap scanline.
+ ///
+ DEFINE_PIXMAP_SCANLINE = 7,
+ ///
+ /// Rectange bitmap fill.
+ ///
+ RECT_BITMAP_FILL = 8,
+ ///
+ /// Rectange pixmap fill.
+ ///
+ RECT_PIXMAP_FILL = 9,
+ ///
+ /// Rectange bitmap copy.
+ ///
+ RECT_BITMAP_COPY = 10,
+ ///
+ /// Rectange pixmap fill.
+ ///
+ RECT_PIXMAP_COPY = 11,
+ ///
+ /// Free object.
+ ///
+ FREE_OBJECT = 12,
+ ///
+ /// Rectangle raster operation fill.
+ ///
+ RECT_ROP_FILL = 13,
+ ///
+ /// Rectangle raster operation copy.
+ ///
+ RECT_ROP_COPY = 14,
+ ///
+ /// Rectangle raster operation bitmap fill.
+ ///
+ RECT_ROP_BITMAP_FILL = 15,
+ ///
+ /// Rectangle raster operation pixmap fill.
+ ///
+ RECT_ROP_PIXMAP_FILL = 16,
+ ///
+ /// Rectangle raster operation bitmap copy.
+ ///
+ RECT_ROP_BITMAP_COPY = 17,
+ ///
+ /// Rectangle raster operation pixmap copy.
+ ///
+ RECT_ROP_PIXMAP_COPY = 18,
+ ///
+ /// Define cursor.
+ ///
+ DEFINE_CURSOR = 19,
+ ///
+ /// Display cursor.
+ ///
+ DISPLAY_CURSOR = 20,
+ ///
+ /// Move cursor.
+ ///
+ MOVE_CURSOR = 21,
+ ///
+ /// Define alpha cursor.
+ ///
+ DEFINE_ALPHA_CURSOR = 22
+ }
+
+ ///
+ /// IO port offset.
+ ///
+ private enum IOPortOffset : byte
+ {
+ ///
+ /// Index.
+ ///
+ Index = 0,
+ ///
+ /// Value.
+ ///
+ Value = 1,
+ ///
+ /// BIOS.
+ ///
+ Bios = 2,
+ ///
+ /// IRQ.
+ ///
+ IRQ = 3
+ }
+
+ ///
+ /// Capability values.
+ ///
+ [Flags]
+ private enum Capability
+ {
+ ///
+ /// None.
+ ///
+ None = 0,
+ ///
+ /// Rectangle fill.
+ ///
+ RectFill = 1,
+ ///
+ /// Rectangle copy.
+ ///
+ RectCopy = 2,
+ ///
+ /// Rectangle pattern fill.
+ ///
+ RectPatFill = 4,
+ ///
+ /// Lecacy off screen.
+ ///
+ LecacyOffscreen = 8,
+ ///
+ /// Raster operation.
+ ///
+ RasterOp = 16,
+ ///
+ /// Cruser.
+ ///
+ Cursor = 32,
+ ///
+ /// Cursor bypass.
+ ///
+ CursorByPass = 64,
+ ///
+ /// Cursor bypass2.
+ ///
+ CursorByPass2 = 128,
+ ///
+ /// Eigth bit emulation.
+ ///
+ EigthBitEmulation = 256,
+ ///
+ /// Alpha cursor.
+ ///
+ AlphaCursor = 512,
+ ///
+ /// Glyph.
+ ///
+ Glyph = 1024,
+ ///
+ /// Glyph clipping.
+ ///
+ GlyphClipping = 0x00000800,
+ ///
+ /// Offscreen.
+ ///
+ Offscreen1 = 0x00001000,
+ ///
+ /// Alpha blend.
+ ///
+ AlphaBlend = 0x00002000,
+ ///
+ /// Three D.
+ ///
+ ThreeD = 0x00004000,
+ ///
+ /// Extended FIFO.
+ ///
+ ExtendedFifo = 0x00008000,
+ ///
+ /// Multi monitors.
+ ///
+ MultiMon = 0x00010000,
+ ///
+ /// Pitch lock.
+ ///
+ PitchLock = 0x00020000,
+ ///
+ /// IRQ mask.
+ ///
+ IrqMask = 0x00040000,
+ ///
+ /// Display topology.
+ ///
+ DisplayTopology = 0x00080000,
+ ///
+ /// GMR.
+ ///
+ Gmr = 0x00100000,
+ ///
+ /// Traces.
+ ///
+ Traces = 0x00200000,
+ ///
+ /// GMR2.
+ ///
+ Gmr2 = 0x00400000,
+ ///
+ /// Screen objects.
+ ///
+ ScreenObject2 = 0x00800000
+ }
+
+ ///
+ /// Index port.
+ ///
+ private readonly ushort IndexPort;
+ ///
+ /// Value port.
+ ///
+ private readonly ushort ValuePort;
+ ///
+ /// BIOS port.
+ ///
+ private ushort BiosPort;
+ ///
+ /// IRQ port.
+ ///
+ private ushort IRQPort;
+
+ ///
+ /// Video memory block.
+ ///
+ public MemoryBlock VideoMemory;
+ ///
+ /// FIFO memory block.
+ ///
+ private MemoryBlock FIFO_Memory;
+
+ ///
+ /// PCI device.
+ ///
+ private PCIDevice device;
+ ///
+ /// Height.
+ ///
+ private uint height;
+ ///
+ /// Width.
+ ///
+ private uint width;
+ ///
+ /// Depth.
+ ///
+ private uint depth;
+ ///
+ /// Capabilities.
+ ///
+ private uint capabilities;
+
+ public uint FrameSize;
+ public uint FrameOffset;
+
+ ///
+ /// Create new instance of the class.
+ ///
+ public VMWareSVGAII()
+ {
+ device = (PCI.GetDevice(VendorID.VMWare, DeviceID.SVGAIIAdapter));
+ device.EnableMemory(true);
+ uint basePort = device.BaseAddressBar[0].BaseAddress;
+ IndexPort = (ushort)(basePort + (uint)IOPortOffset.Index);
+ ValuePort = (ushort)(basePort + (uint)IOPortOffset.Value);
+ BiosPort = (ushort)(basePort + (uint)IOPortOffset.Bios);
+ IRQPort = (ushort)(basePort + (uint)IOPortOffset.IRQ);
+
+ WriteRegister(Register.ID, (uint)ID.V2);
+ if (ReadRegister(Register.ID) != (uint)ID.V2)
+ return;
+
+ VideoMemory = new MemoryBlock(ReadRegister(Register.FrameBufferStart), ReadRegister(Register.VRamSize));
+ capabilities = ReadRegister(Register.Capabilities);
+ InitializeFIFO();
+ }
+
+ ///
+ /// Initialize FIFO.
+ ///
+ protected void InitializeFIFO()
+ {
+ FIFO_Memory = new MemoryBlock(ReadRegister(Register.MemStart), ReadRegister(Register.MemSize));
+ FIFO_Memory[(uint)FIFO.Min] = (uint)Register.FifoNumRegisters * sizeof(uint);
+ FIFO_Memory[(uint)FIFO.Max] = FIFO_Memory.Size;
+ FIFO_Memory[(uint)FIFO.NextCmd] = FIFO_Memory[(uint)FIFO.Min];
+ FIFO_Memory[(uint)FIFO.Stop] = FIFO_Memory[(uint)FIFO.Min];
+ WriteRegister(Register.ConfigDone, 1);
+ }
+
+ ///
+ /// Set video mode.
+ ///
+ /// Width.
+ /// Height.
+ /// Depth.
+ public void SetMode(uint width, uint height, uint depth = 32)
+ {
+ //Disable the Driver before writing new values and initiating it again to avoid a memory exception
+ //Disable();
+
+ // Depth is color depth in bytes.
+ this.depth = (depth / 8);
+ this.width = width;
+ this.height = height;
+ WriteRegister(Register.Width, width);
+ WriteRegister(Register.Height, height);
+ WriteRegister(Register.BitsPerPixel, depth);
+ Enable();
+ InitializeFIFO();
+
+ FrameSize = ReadRegister(Register.FrameBufferSize);
+ FrameOffset = ReadRegister(Register.FrameBufferOffset);
+ }
+
+ ///
+ /// Write register.
+ ///
+ /// A register.
+ /// A value.
+ protected void WriteRegister(Register register, uint value)
+ {
+ IOPort.Write32(IndexPort, (uint)register);
+ IOPort.Write32(ValuePort, value);
+ }
+
+ ///
+ /// Read register.
+ ///
+ /// A register.
+ /// uint value.
+ protected uint ReadRegister(Register register)
+ {
+ IOPort.Write32(IndexPort, (uint)register);
+ return IOPort.Read32(ValuePort);
+ }
+
+ ///
+ /// Get FIFO.
+ ///
+ /// FIFO command.
+ /// uint value.
+ protected uint GetFIFO(FIFO cmd)
+ {
+ return FIFO_Memory[(uint)cmd];
+ }
+
+ ///
+ /// Set FIFO.
+ ///
+ /// Command.
+ /// Value.
+ ///
+ protected uint SetFIFO(FIFO cmd, uint value)
+ {
+ return FIFO_Memory[(uint)cmd] = value;
+ }
+
+ ///
+ /// Wait for FIFO.
+ ///
+ protected void WaitForFifo()
+ {
+ WriteRegister(Register.Sync, 1);
+ while (ReadRegister(Register.Busy) != 0) { }
+ }
+
+ ///
+ /// Write to FIFO.
+ ///
+ /// Value to write.
+ protected void WriteToFifo(uint value)
+ {
+ if (((GetFIFO(FIFO.NextCmd) == GetFIFO(FIFO.Max) - 4) && GetFIFO(FIFO.Stop) == GetFIFO(FIFO.Min)) ||
+ (GetFIFO(FIFO.NextCmd) + 4 == GetFIFO(FIFO.Stop)))
+ WaitForFifo();
+
+ SetFIFO((FIFO)GetFIFO(FIFO.NextCmd), value);
+ SetFIFO(FIFO.NextCmd, GetFIFO(FIFO.NextCmd) + 4);
+
+ if (GetFIFO(FIFO.NextCmd) == GetFIFO(FIFO.Max))
+ SetFIFO(FIFO.NextCmd, GetFIFO(FIFO.Min));
+ }
+
+ ///
+ /// Update FIFO.
+ ///
+ /// X coordinate.
+ /// Y coordinate.
+ /// Width.
+ /// Height.
+ public void Update(uint x, uint y, uint width, uint height)
+ {
+ WriteToFifo((uint)FIFOCommand.Update);
+ WriteToFifo(x);
+ WriteToFifo(y);
+ WriteToFifo(width);
+ WriteToFifo(height);
+ WaitForFifo();
+ }
+
+ ///
+ /// Update video memory.
+ ///
+ public void DoubleBufferUpdate()
+ {
+ VideoMemory.MoveDown(FrameOffset, FrameSize, FrameSize);
+ Update(0, 0, width, height);
+ }
+
+ ///
+ /// Set pixel.
+ ///
+ /// X coordinate.
+ /// Y coordinate.
+ /// Color.
+ /// Thrown on memory access violation.
+ public void SetPixel(uint x, uint y, uint color)
+ {
+ VideoMemory[((y * width + x) * depth) + FrameSize] = color;
+ }
+
+ ///
+ /// Get pixel.
+ ///
+ /// X coordinate.
+ /// Y coordinate.
+ /// uint value.
+ /// Thrown on memory access violation.
+ public uint GetPixel(uint x, uint y)
+ {
+ return VideoMemory[((y * width + x) * depth) + FrameSize];
+ }
+
+ ///
+ /// Clear screen to specified color.
+ ///
+ /// Color.
+ /// Thrown on memory access violation.
+ /// Thrown if VMWare SVGA 2 has no rectange copy capability
+ public void Clear(uint color)
+ {
+ VideoMemory.Fill(FrameSize, FrameSize, color);
+ }
+
+ ///
+ /// Copy rectangle.
+ ///
+ /// Source X coordinate.
+ /// Source Y coordinate.
+ /// Destination X coordinate.
+ /// Destination Y coordinate.
+ /// Width.
+ /// Height.
+ /// Thrown if VMWare SVGA 2 has no rectange copy capability
+ public void Copy(uint x, uint y, uint newX, uint newY, uint width, uint height)
+ {
+ if ((capabilities & (uint)Capability.RectCopy) != 0)
+ {
+ WriteToFifo((uint)FIFOCommand.RECT_COPY);
+ WriteToFifo(x);
+ WriteToFifo(y);
+ WriteToFifo(newX);
+ WriteToFifo(newY);
+ WriteToFifo(width);
+ WriteToFifo(height);
+ WaitForFifo();
+ }
+ else
+ throw new NotImplementedException("VMWareSVGAII Copy()");
+ }
+
+ ///
+ /// Fill rectangle.
+ ///
+ /// X coordinate.
+ /// Y coordinate.
+ /// Width.
+ /// Height.
+ /// Color.
+ /// Thrown on memory access violation.
+ /// Thrown if VMWare SVGA 2 has no rectange copy capability
+ public void Fill(uint x, uint y, uint width, uint height, uint color)
+ {
+ if ((capabilities & (uint)Capability.RectFill) != 0)
+ {
+ WriteToFifo((uint)FIFOCommand.RECT_FILL);
+ WriteToFifo(color);
+ WriteToFifo(x);
+ WriteToFifo(y);
+ WriteToFifo(width);
+ WriteToFifo(height);
+ WaitForFifo();
+ }
+ else
+ {
+ if ((capabilities & (uint)Capability.RectCopy) != 0)
+ {
+ // fill first line and copy it to all other
+ uint xTarget = (x + width);
+ uint yTarget = (y + height);
+
+ for (uint xTmp = x; xTmp < xTarget; xTmp++)
+ {
+ SetPixel(xTmp, y, color);
+ }
+ // refresh first line for copy process
+ Update(x, y, width, 1);
+ for (uint yTmp = y + 1; yTmp < yTarget; yTmp++)
+ {
+ Copy(x, y, x, yTmp, width, 1);
+ }
+ }
+ else
+ {
+ uint xTarget = (x + width);
+ uint yTarget = (y + height);
+ for (uint xTmp = x; xTmp < xTarget; xTmp++)
+ {
+ for (uint yTmp = y; yTmp < yTarget; yTmp++)
+ {
+ SetPixel(xTmp, yTmp, color);
+ }
+ }
+ Update(x, y, width, height);
+ }
+ }
+ }
+
+ ///
+ /// Define alpha cursor.
+ ///
+ public void DefineAlphaCursor(Bitmap bitmap)
+ {
+ WaitForFifo();
+ WriteToFifo((uint)FIFOCommand.DEFINE_ALPHA_CURSOR);
+ WriteToFifo(0); // ID
+ WriteToFifo(0); // Hotspot X
+ WriteToFifo(0); // Hotspot Y
+ WriteToFifo(bitmap.Width); // Width
+ WriteToFifo(bitmap.Height); // Height
+ for (int i = 0; i < bitmap.RawData.Length; i++)
+ WriteToFifo((uint)bitmap.RawData[i]);
+ WaitForFifo();
+ }
+
+ //Allow to enable the Driver again after it has been disabled (switch between text and graphics mode currently this is SVGA only)
+ ///
+ /// Enable the SVGA Driver , only needed after Disable() has been called
+ ///
+ public void Enable()
+ {
+ WriteRegister(Register.Enable, 1);
+ }
+ ///
+ /// Disable the SVGA Driver , return to text mode
+ ///
+ public void Disable()
+ {
+ WriteRegister(Register.Enable, 0);
+ }
+
+ ///
+ /// Set the cursor visibility and position, once it has been defined with .
+ ///
+ /// If the cursor will be visible.
+ /// The X coordinate of the cursor.
+ /// The UY coordinate of the cursor.
+ public void SetCursor(bool visible, uint x, uint y)
+ {
+ WriteRegister(Register.CursorOn, (uint)(visible ? 1 : 0));
+ WriteRegister(Register.CursorX, x);
+ WriteRegister(Register.CursorY, y);
+ // To-do: Remove these register casts.
+ WriteRegister((Register)0x0C, ReadRegister((Register)0x0C) + 1); // CursorCount
+ }
+ }
+}
\ No newline at end of file
diff --git a/GitCommit.txt b/GitCommit.txt
index b3399a8..2c624a1 100644
--- a/GitCommit.txt
+++ b/GitCommit.txt
@@ -1 +1 @@
-29a68b4
\ No newline at end of file
+6c514df
\ No newline at end of file
diff --git a/Gui/Apps/CodeStudio/Ide.cs b/Gui/Apps/CodeStudio/Ide.cs
index 40954f7..7472353 100644
--- a/Gui/Apps/CodeStudio/Ide.cs
+++ b/Gui/Apps/CodeStudio/Ide.cs
@@ -1,4 +1,4 @@
-using CMLeonOS;
+using CMLeonOS;
using CMLeonOS.Gui.UILib;
using Cosmos.System.Graphics;
using System.Drawing;
@@ -51,6 +51,29 @@ namespace CMLeonOS.Gui.Apps.CodeStudio
UpdateTitle();
}
+
+ private void WindowResized()
+ {
+ int editorHeight = mainWindow.Height - headersHeight - problemsHeight - outputHeight - (headersHeight * 3);
+ editor.Move(0, headersHeight);
+ editor.Resize(mainWindow.Width, editorHeight);
+ editor.MarkAllLines();
+ editor.Render();
+
+ problems.Move(0, headersHeight + editorHeight + headersHeight);
+ problems.Resize(mainWindow.Width, problemsHeight + (headersHeight * 2));
+ problems.MarkAllLines();
+ problems.Render();
+
+ output.Move(0, headersHeight + editorHeight + problemsHeight + (headersHeight * 2));
+ output.Resize(mainWindow.Width, outputHeight + (headersHeight * 2));
+ output.MarkAllLines();
+ output.Render();
+
+ mainWindow.Clear(Theme.Background);
+ mainWindow.DrawString("Problems", Color.White, 0, headersHeight + editorHeight);
+ mainWindow.DrawString("Output", Color.White, 0, headersHeight + editorHeight + problemsHeight + headersHeight);
+ }
private static class Theme
{
@@ -254,6 +277,8 @@ namespace CMLeonOS.Gui.Apps.CodeStudio
mainWindow = new AppWindow(process, 96, 96, 800, 600);
mainWindow.Clear(Theme.Background);
mainWindow.Closing = process.TryStop;
+ mainWindow.CanResize = true;
+ mainWindow.UserResized = WindowResized;
UpdateTitle();
wm.AddWindow(mainWindow);
diff --git a/Gui/UILib/TextBox.cs b/Gui/UILib/TextBox.cs
index b6f20ba..b6b3481 100644
--- a/Gui/UILib/TextBox.cs
+++ b/Gui/UILib/TextBox.cs
@@ -328,10 +328,10 @@ namespace CMLeonOS.Gui.UILib
internal override void Render()
{
+ Clear(_background);
+
if (Text == string.Empty)
{
- Clear(_background);
-
DrawRectangle(0, 0, Width, Height, Color.Gray);
DrawString(PlaceholderText, PlaceholderForeground, 0, 0);
@@ -352,7 +352,6 @@ namespace CMLeonOS.Gui.UILib
for (int i = markedLinesBegin; i <= markedLinesEnd; i++)
{
int lineY = (i * fontHeight) - scrollY;
-
if (lineY < 0) continue;
if (lineY > Height) break;
diff --git a/Gui/WindowManager.cs b/Gui/WindowManager.cs
index 2e3715f..716bd62 100644
--- a/Gui/WindowManager.cs
+++ b/Gui/WindowManager.cs
@@ -3,6 +3,7 @@ using Cosmos.System.Graphics;
using CMLeonOS;
using CMLeonOS.Gui.ShellComponents;
using CMLeonOS.Settings;
+using CMLeonOS.Driver;
using System;
using System.Collections.Generic;
using System.Drawing;
@@ -16,7 +17,7 @@ namespace CMLeonOS.Gui
Critical = true;
}
- private Cosmos.HAL.Drivers.Video.SVGAII.VMWareSVGAII driver;
+ private VMWareSVGAII driver;
internal List Windows = new List();
@@ -122,7 +123,7 @@ namespace CMLeonOS.Gui
for (int y = 0; y < height; y++)
{
int sourceIndex = y * window.Width;
- driver.videoMemory.Copy(aByteOffset: byteOffset, aData: window.Buffer, aIndex: sourceIndex, aCount: width);
+ driver.VideoMemory.Copy(aByteOffset: byteOffset, aData: window.Buffer, aIndex: sourceIndex, aCount: width);
byteOffset += (int)(ScreenWidth * bytesPerPixel);
}
}
@@ -217,7 +218,7 @@ namespace CMLeonOS.Gui
private void SetupDriver()
{
- driver = new Cosmos.HAL.Drivers.Video.SVGAII.VMWareSVGAII();
+ driver = new VMWareSVGAII();
driver.SetMode(ScreenWidth, ScreenHeight, depth: bytesPerPixel * 8);
}
@@ -229,7 +230,7 @@ namespace CMLeonOS.Gui
MouseManager.X = ScreenWidth / 2;
MouseManager.Y = ScreenHeight / 2;
- driver.DefineAlphaCursor(cursorBitmap.Width, cursorBitmap.Height, cursorBitmap.RawData);
+ driver.DefineAlphaCursor(cursorBitmap);
}
private Window GetWindowAtPos(uint x, uint y)
@@ -329,7 +330,7 @@ namespace CMLeonOS.Gui
private void RenderWallpaper()
{
- driver.videoMemory.Copy((int)driver.FrameSize, wallpaperResized.RawData, 0, wallpaperResized.RawData.Length);
+ driver.VideoMemory.Copy((int)driver.FrameSize, wallpaperResized.RawData, 0, wallpaperResized.RawData.Length);
}
private void SetupWallpaper()
diff --git a/LICENSE-SphereOS.txt b/LICENSE-SphereOS.txt
new file mode 100644
index 0000000..e69de29
diff --git a/LISENCE.md b/LICENSE.md
similarity index 100%
rename from LISENCE.md
rename to LICENSE.md
diff --git a/LISENCE-Cosmos.txt b/LISCENSE-Cosmos.txt
similarity index 100%
rename from LISENCE-Cosmos.txt
rename to LISCENSE-Cosmos.txt
diff --git a/utils/SHA256.cs b/utils/SHA256.cs
index 51fc0a9..12d0d5b 100644
--- a/utils/SHA256.cs
+++ b/utils/SHA256.cs
@@ -1,3 +1,25 @@
+/*
+ * Copyright (c) 2010 Yuri K. Schlesner
+ *
+ * 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;
namespace CMLeonOS