Example #1
0
 void Initialize()
 {
     Threading = new InternalPlatformThreadingInterface();
     AvaloniaLocator.CurrentMutable
     .Bind <IStandardCursorFactory>().ToTransient <CursorFactoryStub>()
     .Bind <IKeyboardDevice>().ToConstant(KeyboardDevice)
     .Bind <IPlatformSettings>().ToSingleton <PlatformSettings>()
     .Bind <IPlatformThreadingInterface>().ToConstant(Threading)
     .Bind <IRenderLoop>().ToConstant(Threading);
 }
Example #2
0
 void Initialize()
 {
     Threading = new InternalPlatformThreadingInterface();
     AvaloniaLocator.CurrentMutable
     .Bind <IStandardCursorFactory>().ToTransient <CursorFactoryStub>()
     .Bind <IPlatformSettings>().ToSingleton <PlatformSettings>()
     .Bind <IPlatformThreadingInterface>().ToConstant(Threading)
     .Bind <IRenderLoop>().ToConstant(new RenderLoop())
     .Bind <PlatformHotkeyConfiguration>().ToSingleton <PlatformHotkeyConfiguration>()
     .Bind <IRenderTimer>().ToConstant(Threading);
 }
 void Initialize()
 {
     Threading = new InternalPlatformThreadingInterface();
     if (_fb is IGlOutputBackend gl)
     {
         AvaloniaLocator.CurrentMutable.Bind <IPlatformOpenGlInterface>().ToConstant(gl.PlatformOpenGlInterface);
     }
     AvaloniaLocator.CurrentMutable
     .Bind <IPlatformThreadingInterface>().ToConstant(Threading)
     .Bind <IRenderTimer>().ToConstant(new DefaultRenderTimer(60))
     .Bind <IRenderLoop>().ToConstant(new RenderLoop())
     .Bind <IStandardCursorFactory>().ToTransient <CursorFactoryStub>()
     .Bind <IKeyboardDevice>().ToConstant(new KeyboardDevice())
     .Bind <IPlatformSettings>().ToSingleton <PlatformSettings>()
     .Bind <IRenderLoop>().ToConstant(new RenderLoop())
     .Bind <PlatformHotkeyConfiguration>().ToSingleton <PlatformHotkeyConfiguration>();
 }
        public static void Initialize(IAvaloniaRemoteTransportConnection transport)
        {
            s_transport = transport;
            var instance  = new PreviewerWindowingPlatform();
            var threading = new InternalPlatformThreadingInterface();

            AvaloniaLocator.CurrentMutable
            .Bind <IClipboard>().ToSingleton <ClipboardStub>()
            .Bind <IStandardCursorFactory>().ToSingleton <CursorFactoryStub>()
            .Bind <IKeyboardDevice>().ToConstant(Keyboard)
            .Bind <IPlatformSettings>().ToConstant(instance)
            .Bind <IPlatformThreadingInterface>().ToConstant(threading)
            .Bind <IRenderLoop>().ToConstant(threading)
            .Bind <ISystemDialogImpl>().ToSingleton <SystemDialogsStub>()
            .Bind <IWindowingPlatform>().ToConstant(instance)
            .Bind <IPlatformIconLoader>().ToSingleton <IconLoaderStub>();
        }
Example #5
0
        public static void Initialize(IAvaloniaRemoteTransportConnection transport)
        {
            s_transport = transport;
            var instance  = new PreviewerWindowingPlatform();
            var threading = new InternalPlatformThreadingInterface();

            AvaloniaLocator.CurrentMutable
            .Bind <IClipboard>().ToSingleton <ClipboardStub>()
            .Bind <ICursorFactory>().ToSingleton <CursorFactoryStub>()
            .Bind <IKeyboardDevice>().ToConstant(Keyboard)
            .Bind <IPlatformSettings>().ToConstant(instance)
            .Bind <IPlatformThreadingInterface>().ToConstant(threading)
            .Bind <IRenderLoop>().ToConstant(new RenderLoop())
            .Bind <IRenderTimer>().ToConstant(new DefaultRenderTimer(60))
            .Bind <IWindowingPlatform>().ToConstant(instance)
            .Bind <IPlatformIconLoader>().ToSingleton <IconLoaderStub>()
            .Bind <PlatformHotkeyConfiguration>().ToSingleton <PlatformHotkeyConfiguration>();
        }
        void Initialize()
        {
            Threading = new InternalPlatformThreadingInterface();
            if (_fb is IGlOutputBackend gl)
            {
                AvaloniaLocator.CurrentMutable.Bind <IPlatformOpenGlInterface>().ToConstant(gl.PlatformOpenGlInterface);
            }

            var opts = AvaloniaLocator.Current.GetService <LinuxFramebufferPlatformOptions>() ?? new LinuxFramebufferPlatformOptions();

            AvaloniaLocator.CurrentMutable
            .Bind <IPlatformThreadingInterface>().ToConstant(Threading)
            .Bind <IRenderTimer>().ToConstant(new DefaultRenderTimer(opts.Fps))
            .Bind <IRenderLoop>().ToConstant(new RenderLoop())
            .Bind <ICursorFactory>().ToTransient <CursorFactoryStub>()
            .Bind <IKeyboardDevice>().ToConstant(new KeyboardDevice())
            .Bind <IPlatformSettings>().ToSingleton <PlatformSettings>()
            .Bind <PlatformHotkeyConfiguration>().ToSingleton <PlatformHotkeyConfiguration>();
        }