Files
RobustToolbox/Robust.Client/Graphics/Clyde/Windowing/IWindowingImpl.cs
PJB3005 02b64b7386 Show task bar progress bar for loading progress
Using the new API in SDL 3.4.0
2026-01-18 23:30:15 +01:00

77 lines
2.6 KiB
C#

using System;
using System.Threading.Tasks;
using Robust.Client.Input;
using Robust.Shared.Maths;
using SixLabors.ImageSharp;
using SixLabors.ImageSharp.PixelFormats;
namespace Robust.Client.Graphics.Clyde
{
partial class Clyde
{
private interface IWindowingImpl
{
// Lifecycle stuff
bool Init();
void Shutdown();
// Window loop
void EnterWindowLoop();
void PollEvents();
void TerminateWindowLoop();
// Event pump
void ProcessEvents(bool single=false);
void FlushDispose();
// Cursor
ICursor CursorGetStandard(StandardCursorShape shape);
ICursor CursorCreate(Image<Rgba32> image, Vector2i hotSpot);
void CursorSet(WindowReg window, ICursor? cursor);
// Window API.
(WindowReg?, string? error) WindowCreate(
GLContextSpec? spec,
WindowCreateParameters parameters,
WindowReg? share,
WindowReg? owner);
void WindowDestroy(WindowReg reg);
void WindowSetTitle(WindowReg window, string title);
void WindowSetMonitor(WindowReg window, IClydeMonitor monitor);
void WindowSetSize(WindowReg window, Vector2i size);
void WindowSetVisible(WindowReg window, bool visible);
void WindowRequestAttention(WindowReg window);
void WindowSetProgress(WindowReg reg, WindowProgressState state, float value);
void WindowSwapBuffers(WindowReg window);
uint? WindowGetX11Id(WindowReg window);
nint? WindowGetX11Display(WindowReg window);
nint? WindowGetWin32Window(WindowReg window);
// Keyboard
string? KeyGetName(Keyboard.Key key);
// Clipboard
Task<string> ClipboardGetText(WindowReg mainWindow);
void ClipboardSetText(WindowReg mainWindow, string text);
void UpdateMainWindowMode();
// OpenGL-related stuff.
// Note: you should probably go through GLContextBase instead, which calls these functions.
void GLMakeContextCurrent(WindowReg? reg);
void GLSwapInterval(WindowReg reg, int interval);
unsafe void* GLGetProcAddress(string procName);
// Misc
void RunOnWindowThread(Action a);
// IME
void TextInputSetRect(WindowReg reg, UIBox2i rect, int cursor);
void TextInputStart(WindowReg reg);
void TextInputStop(WindowReg reg);
string GetDescription();
}
}
}