Files
sbox-public/engine/Sandbox.Engine/Core/Context/IToolsDll.cs
2026-07-10 15:52:53 +02:00

61 lines
1.6 KiB
C#

using Editor;
using NativeEngine;
namespace Sandbox.Engine;
internal unsafe interface IToolsDll
{
public static IToolsDll Current { get; set; }
public void Bootstrap();
public Task Initialize();
public void Tick();
public void RunEvent( string name );
public void RunEvent( string name, object argument );
public void RunEvent( string name, object arg0, object arg1 );
public void RunEvent<T>( Action<T> action );
public void Exiting();
public bool ConsoleFocus();
public void SetPlaying();
public void ExitPlaymode();
public void Spin();
public void RunFrame();
public void OnRender();
public void OnFunctionKey( ButtonCode key, KeyboardModifiers modifiers );
/// <summary>
/// Registers exclusive Sandbox.Tools <see cref="Sandbox.IHandle"/> types
/// </summary>
public int RegisterHandle( IntPtr ptr, uint type );
/// <summary>
/// Load the startup project for the first time
/// </summary>
public Task LoadProject();
public object InspectedObject { get; set; }
/// <summary>
/// Is the game view visible, or is it in a tab in the background?
/// </summary>
public bool IsGameViewVisible { get; }
/// <summary>
/// A public interface to the active editor system
/// </summary>
public EditorSystem ActiveEditor { get; }
/// <summary>
/// Called after the host network system is initialised, used to add additional package references etc. to dev servers
/// </summary>
public Task OnInitializeHost();
/// <summary>
/// Get a thumbnail for the specified asset.Can return null if not immediately available.
/// </summary>
Task<Bitmap> GetThumbnail( string filename );
}