public static T UseGtk3 <T>(this AppBuilderBase <T> builder, bool deferredRendering = true, ICustomGtk3NativeLibraryResolver resolver = null) where T : AppBuilderBase <T>, new() { Resolver.Custom = resolver; Gtk3Platform.UseDeferredRendering = deferredRendering; return(builder.UseWindowingSubsystem(Gtk3Platform.Initialize, "GTK3")); }
public ShellAppBuilder(AppBuilderBase <TAppBuilder> appBuilder, ApplicationInfo appInfo, string[] args) { this.appBuilder = appBuilder ?? throw new ArgumentNullException(nameof(appBuilder)); this.appInfo = appInfo; this.args = args; containerBuilder = new ContainerBuilder(); configurationBuilder = new ConfigurationBuilder(); }
public static ShellAppBuilder <TAppBuilder> ConfigureShellApp <TAppBuilder>(this AppBuilderBase <TAppBuilder> appBuilder, string[] args, Func <ApplicationInfo, ApplicationInfo>?option = null) where TAppBuilder : AppBuilderBase <TAppBuilder>, new() { var appInfo = ApplicationInfo.FromEntryAssembly(); appInfo = option?.Invoke(appInfo) ?? appInfo; return(new ShellAppBuilder <TAppBuilder>(appBuilder, appInfo, args)); }
public static T UseFFMpeg <T>(this AppBuilderBase <T> b, FFOptions fFMpegOptions) where T : AppBuilderBase <T>, new() { return(b.AfterSetup(_ => { GlobalFFOptions.Configure(fFMpegOptions); FFMpegHelper.VerifyFFMpegExists(fFMpegOptions); })); }
public static T UseVLCSharp <T>(this AppBuilderBase <T> b, LibVLCAvaloniaRenderingOptions?renderingOptions = null, string libvlcDirectoryPath = null) where T : AppBuilderBase <T>, new() { if (renderingOptions != null) { LibVLCAvaloniaOptions.RenderingOptions = renderingOptions.Value; } return(b.AfterSetup(_ => Core.Initialize(libvlcDirectoryPath))); }
public static T UseVLCSharp <T>(this AppBuilderBase <T> b, bool?useCutomDrawOperationRendering = null, string libvlcDirectoryPath = null) where T : AppBuilderBase <T>, new() { if (useCutomDrawOperationRendering != null) { LibVLCAvaloniaOptions.UseCustomDrawOperationRendering = useCutomDrawOperationRendering.Value; } return(b.AfterSetup(_ => Core.Initialize(libvlcDirectoryPath))); }
public static AppBuilderBase <T> WithAvaloniaAutomation <T>(this AppBuilderBase <T> aThis) where T : AppBuilderBase <T>, new() { var xEngine = new AutomationEngineImpl(); AvaloniaLocator.CurrentMutable.Bind <IAutomationEngine>().ToConstant(xEngine); xEngine.Initialize(); aThis.Instance.OnExit += (a, b) => xEngine.Shutdown(); return(aThis); }
public static T UseGtk3 <T>(this AppBuilderBase <T> builder, Gtk3PlatformOptions options = null) where T : AppBuilderBase <T>, new() { return(builder.UseWindowingSubsystem(() => Gtk3Platform.Initialize(options ?? new Gtk3PlatformOptions()), "GTK3")); }
public static TAppBuilder UseMovere <TAppBuilder>(this AppBuilderBase <TAppBuilder> builder) where TAppBuilder : AppBuilderBase <TAppBuilder>, new() => builder.AfterSetup(RegisterMovereDialogs);
private static void RegisterMovereDialogs <TAppBuilder>(AppBuilderBase <TAppBuilder> builder) where TAppBuilder : AppBuilderBase <TAppBuilder>, new() => AvaloniaLocator.CurrentMutable.Bind <ISystemDialogImpl>().ToSingleton <MovereSystemDialogImpl>();
public static T UseVLCSharp <T>(this AppBuilderBase <T> b, string libvlcDirectoryPath = null) where T : AppBuilderBase <T>, new() { return(b.AfterSetup(_ => Core.Initialize(libvlcDirectoryPath))); }