2014-12-13 21:54:59 +00:00
using System ;
using System.Linq ;
using System.Collections.Generic ;
namespace BizHawk.Client.EmuHawk
2013-11-02 19:28:45 +00:00
{
public interface IToolForm
{
/// <summary>
/// Will be called by the client anytime an Update needs to occur, such as after an emulated frame, a loadstate, or a related dialog has made a relevant change
/// </summary>
void UpdateValues ( ) ;
2014-07-25 01:55:21 +00:00
/// <summary>
/// Will be called by the client when performance is critical,
/// The tool should only do the minimum to still function,
/// Drawing should not occur if possible, during a fast update
/// </summary>
void FastUpdate ( ) ;
2013-11-02 19:28:45 +00:00
/// <summary>
/// Will be called anytime the dialog needs to be restarted, such as when a new ROM is loaded
/// The tool implementing this needs to account for a Game and Core change
/// </summary>
void Restart ( ) ;
/// <summary>
/// This gives the opportunity for the tool dialog to ask the user to save changes (such is necessary when
/// This tool dialog edits a file. Returning false will tell the client the user wants to cancel the given action,
/// Return false to tell the client to back out of an action (such as closing the emulator)
/// </summary>
/// <returns></returns>
2014-08-19 19:24:17 +00:00
bool AskSaveChanges ( ) ;
2013-11-02 19:28:45 +00:00
/// <summary>
/// Indicates whether the tool should be updated before a frame loop or after.
/// In general, tools that draw graphics from the core should update before the loop,
/// Information tools such as those that display core ram values should be after.
/// </summary>
bool UpdateBefore { get ; }
//Necessary winform calls
bool Focus ( ) ;
void Show ( ) ;
void Close ( ) ;
2013-11-02 20:13:53 +00:00
bool IsDisposed { get ; }
2014-12-17 03:21:32 +00:00
bool IsHandleCreated { get ; }
2013-11-02 19:28:45 +00:00
}
2014-12-20 17:05:13 +00:00
/// <summary>
/// toolform that takes automatic common configuration infrastructure
/// </summary>
public interface IToolFormAutoConfig : IToolForm
{
}
2014-12-20 21:49:53 +00:00
[AttributeUsage(AttributeTargets.Property)]
public class ConfigPersistAttribute : Attribute
{
}
2013-11-02 19:28:45 +00:00
}