Files
RobustToolbox/Robust.Client/Graphics/IClydeInternal.cs
PJB3005 60d26be139 Add devwindow tab listing render targets
Copy TableContainer from content into engine. It's internal though.

Add various stuff to Clyde to allow the UI to access it. Includes a new IClydeInternal.RenderNow() which seems to not completely explode in my face.
2025-09-13 01:21:22 +02:00

93 lines
2.9 KiB
C#

using System;
using System.Collections.Generic;
using Robust.Client.Input;
using Robust.Client.ResourceManagement;
using Robust.Client.UserInterface;
using Robust.Shared.Graphics;
using Robust.Shared.Map;
using Robust.Shared.Maths;
using Robust.Shared.Timing;
namespace Robust.Client.Graphics
{
internal interface IClydeInternal : IClyde, IClipboardManager
{
// Basic main loop hooks.
void Render();
void FrameProcess(FrameEventArgs eventArgs);
void ProcessInput(FrameEventArgs frameEventArgs);
// Init.
bool SeparateWindowThread { get; }
bool InitializePreWindowing();
void EnterWindowLoop();
bool InitializePostWindowing();
void Ready();
void TerminateWindowLoop();
event Action<TextEnteredEventArgs> TextEntered;
event Action<TextEditingEventArgs> TextEditing;
event Action<MouseMoveEventArgs> MouseMove;
event Action<MouseEnterLeaveEventArgs> MouseEnterLeave;
event Action<KeyEventArgs> KeyUp;
event Action<KeyEventArgs> KeyDown;
event Action<MouseWheelEventArgs> MouseWheel;
event Action<WindowRequestClosedEventArgs> CloseWindow;
event Action<WindowDestroyedEventArgs> DestroyWindow;
ClydeHandle LoadShader(ParsedShader shader, string? name = null, Dictionary<string,string>? defines = null);
void ReloadShader(ClydeHandle handle, ParsedShader newShader);
/// <summary>
/// Creates a new instance of a shader.
/// </summary>
ShaderInstance InstanceShader(ShaderSourceResource handle, bool? light = null, ShaderBlendMode? blend = null);
/// <summary>
/// This is purely a hook for <see cref="IInputManager"/>, use that instead.
/// </summary>
ScreenCoordinates MouseScreenPosition { get; }
IClydeDebugInfo DebugInfo { get; }
IClydeDebugStats DebugStats { get; }
Texture GetStockTexture(ClydeStockTexture stockTexture);
IEnumerable<(Clyde.Clyde.ClydeTexture, Clyde.Clyde.LoadedTexture)> GetLoadedTextures();
IEnumerable<(Clyde.Clyde.RenderTargetBase, Clyde.Clyde.LoadedRenderTarget)> GetLoadedRenderTextures();
ClydeDebugLayers DebugLayers { get; set; }
string GetKeyName(Keyboard.Key key);
void Shutdown();
/// <returns>Null if not running on X11.</returns>
uint? GetX11WindowId();
void RegisterGridEcsEvents();
void ShutdownGridEcsEvents();
void RunOnWindowThread(Action action);
IFileDialogManagerImplementation? FileDialogImpl { get; }
bool VsyncEnabled { get; set; }
// Viewports
#if TOOLS
/// <summary>
/// Fires <see cref="IClydeViewport.ClearCachedResources"/> on all viewports. For debugging.
/// </summary>
void ViewportsClearAllCached();
#endif // TOOLS
void RenderNow(IRenderTarget renderTarget, Action<IRenderHandle> callback);
}
}