39 lines
1.3 KiB
C#
39 lines
1.3 KiB
C#
using System;
|
|
using System.IO;
|
|
using System.Windows.Media;
|
|
using System.Threading.Tasks;
|
|
using bts.spark;
|
|
using System.Collections.Generic;
|
|
|
|
namespace mbts.ui
|
|
{
|
|
public interface IShellModule : IDisposable
|
|
{
|
|
ImageSource icon { get; }
|
|
string name { get; }
|
|
|
|
// Load priority. Higher numbers are initialized later and show up further down in the UI.
|
|
int priority { get; }
|
|
|
|
IEnumerable<SparkCommand> actions { get; }
|
|
|
|
// When restoring a saved session the data returned from
|
|
// IShellWindow::GetState is passed back to the module here.
|
|
// Most apps will chose to re-create the window from that state.
|
|
Task<IShellWindow> create(Stream load_stream);
|
|
}
|
|
|
|
// ILazyModule may also impement IShellMenu to get opening/closing notification
|
|
public interface ILazyMenuModule : IShellModule { }
|
|
|
|
public interface IPersistShellModule : IShellModule {
|
|
// Called at startup before the UI is shown
|
|
// This is an opportunity for you to kick off background services
|
|
// or connect to network resources to prepare the module.
|
|
void load_state(Stream state = null);
|
|
|
|
// Save any running state such as launched exes here.
|
|
void get_state(Stream save_here);
|
|
}
|
|
}
|