public TestServices( IAssetLoader assetLoader = null, IFocusManager focusManager = null, IInputManager inputManager = null, Func <IKeyboardDevice> keyboardDevice = null, ILayoutManager layoutManager = null, IRuntimePlatform platform = null, IRenderer renderer = null, IPlatformRenderInterface renderInterface = null, IRenderLoop renderLoop = null, IScheduler scheduler = null, IStandardCursorFactory standardCursorFactory = null, IStyler styler = null, Func <Styles> theme = null, IPlatformThreadingInterface threadingInterface = null, IWindowingPlatform windowingPlatform = null) { AssetLoader = assetLoader; FocusManager = focusManager; InputManager = inputManager; KeyboardDevice = keyboardDevice; LayoutManager = layoutManager; Platform = platform; Renderer = renderer; RenderInterface = renderInterface; RenderLoop = renderLoop; Scheduler = scheduler; StandardCursorFactory = standardCursorFactory; Styler = styler; Theme = theme; ThreadingInterface = threadingInterface; WindowingPlatform = windowingPlatform; }
static AvaloniaGlobals() { RuntimePlatform = new StandardRuntimePlatform(); var runtime = RuntimePlatform.GetRuntimeInfo(); if (runtime.OperatingSystem == OperatingSystemType.WinNT) { Win32Platform.Initialize(); PlatformThreadingInterface = Win32Platform.Instance; WindowingInterface = Win32Platform.Instance; StandardCursorFactory = CursorFactory.Instance; } else if (runtime.OperatingSystem == OperatingSystemType.Linux) { var x11 = new AvaloniaX11Platform(); x11.Initialize(new X11PlatformOptions()); WindowingInterface = x11; PlatformThreadingInterface = new X11PlatformThreading(x11); StandardCursorFactory = new X11CursorFactory(x11.Display); } else { throw new InvalidOperationException("Unrecognized Operating System"); } }
public TestServices( IAssetLoader assetLoader = null, IFocusManager focusManager = null, IInputManager inputManager = null, Func <IKeyboardDevice> keyboardDevice = null, IKeyboardNavigationHandler keyboardNavigation = null, Func <IMouseDevice> mouseDevice = null, IRuntimePlatform platform = null, IPlatformRenderInterface renderInterface = null, IRenderLoop renderLoop = null, IScheduler scheduler = null, IStandardCursorFactory standardCursorFactory = null, IStyler styler = null, Func <Styles> theme = null, IPlatformThreadingInterface threadingInterface = null, IWindowImpl windowImpl = null, IWindowingPlatform windowingPlatform = null) { AssetLoader = assetLoader; FocusManager = focusManager; InputManager = inputManager; KeyboardDevice = keyboardDevice; KeyboardNavigation = keyboardNavigation; MouseDevice = mouseDevice; Platform = platform; RenderInterface = renderInterface; Scheduler = scheduler; StandardCursorFactory = standardCursorFactory; Styler = styler; Theme = theme; ThreadingInterface = threadingInterface; WindowImpl = windowImpl; WindowingPlatform = windowingPlatform; }
public TestServices With( IAssetLoader assetLoader = null, IFocusManager focusManager = null, IInputManager inputManager = null, Func <IKeyboardDevice> keyboardDevice = null, ILayoutManager layoutManager = null, IRuntimePlatform platform = null, IRenderer renderer = null, IPlatformRenderInterface renderInterface = null, IRenderLoop renderLoop = null, IScheduler scheduler = null, IStandardCursorFactory standardCursorFactory = null, IStyler styler = null, Func <Styles> theme = null, IPlatformThreadingInterface threadingInterface = null, IWindowImpl windowImpl = null, IWindowingPlatform windowingPlatform = null) { return(new TestServices( assetLoader: assetLoader ?? AssetLoader, focusManager: focusManager ?? FocusManager, inputManager: inputManager ?? InputManager, keyboardDevice: keyboardDevice ?? KeyboardDevice, layoutManager: layoutManager ?? LayoutManager, platform: platform ?? Platform, renderer: renderer ?? Renderer, renderInterface: renderInterface ?? RenderInterface, renderLoop: renderLoop ?? RenderLoop, scheduler: scheduler ?? Scheduler, standardCursorFactory: standardCursorFactory ?? StandardCursorFactory, styler: styler ?? Styler, theme: theme ?? Theme, threadingInterface: threadingInterface ?? ThreadingInterface, windowingPlatform: windowingPlatform ?? WindowingPlatform)); }
public TestServices( IAssetLoader assetLoader = null, IInputManager inputManager = null, ILayoutManager layoutManager = null, IPclPlatformWrapper platformWrapper = null, IPlatformRenderInterface renderInterface = null, IStandardCursorFactory standardCursorFactory = null, IStyler styler = null, Func <Styles> theme = null, IPlatformThreadingInterface threadingInterface = null, IWindowImpl windowImpl = null, IWindowingPlatform windowingPlatform = null) { AssetLoader = assetLoader; InputManager = inputManager; LayoutManager = layoutManager; PlatformWrapper = platformWrapper; RenderInterface = renderInterface; StandardCursorFactory = standardCursorFactory; Styler = styler; Theme = theme; ThreadingInterface = threadingInterface; WindowImpl = windowImpl; WindowingPlatform = windowingPlatform; }
public TestServices With( IAssetLoader assetLoader = null, IFocusManager focusManager = null, IInputManager inputManager = null, Func <IKeyboardDevice> keyboardDevice = null, IKeyboardNavigationHandler keyboardNavigation = null, Func <IMouseDevice> mouseDevice = null, IRuntimePlatform platform = null, IPlatformRenderInterface renderInterface = null, IRenderLoop renderLoop = null, IScheduler scheduler = null, IStandardCursorFactory standardCursorFactory = null, IStyler styler = null, Func <Styles> theme = null, IPlatformThreadingInterface threadingInterface = null, IWindowImpl windowImpl = null, IWindowingPlatform windowingPlatform = null) { return(new TestServices( assetLoader: assetLoader ?? AssetLoader, focusManager: focusManager ?? FocusManager, inputManager: inputManager ?? InputManager, keyboardDevice: keyboardDevice ?? KeyboardDevice, keyboardNavigation: keyboardNavigation ?? KeyboardNavigation, mouseDevice: mouseDevice ?? MouseDevice, platform: platform ?? Platform, renderInterface: renderInterface ?? RenderInterface, scheduler: scheduler ?? Scheduler, standardCursorFactory: standardCursorFactory ?? StandardCursorFactory, styler: styler ?? Styler, theme: theme ?? Theme, threadingInterface: threadingInterface ?? ThreadingInterface, windowingPlatform: windowingPlatform ?? WindowingPlatform, windowImpl: windowImpl ?? WindowImpl)); }
private static void InitializeWindows() { Win32Platform.Initialize(); PlatformThreadingInterface = Win32Platform.Instance; WindowingInterface = Win32Platform.Instance; StandardCursorFactory = CursorFactory.Instance; }
public TestServices With( IAssetLoader assetLoader = null, IInputManager inputManager = null, ILayoutManager layoutManager = null, IPclPlatformWrapper platformWrapper = null, IPlatformRenderInterface renderInterface = null, IStandardCursorFactory standardCursorFactory = null, IStyler styler = null, Func <Styles> theme = null, IPlatformThreadingInterface threadingInterface = null, IWindowImpl windowImpl = null, IWindowingPlatform windowingPlatform = null) { return(new TestServices( assetLoader: assetLoader ?? AssetLoader, inputManager: inputManager ?? InputManager, layoutManager: layoutManager ?? LayoutManager, platformWrapper: platformWrapper ?? PlatformWrapper, renderInterface: renderInterface ?? RenderInterface, standardCursorFactory: standardCursorFactory ?? StandardCursorFactory, styler: styler ?? Styler, theme: theme ?? Theme, threadingInterface: threadingInterface ?? ThreadingInterface, windowImpl: windowImpl ?? WindowImpl, windowingPlatform: windowingPlatform ?? WindowingPlatform)); }
public TestServices( IAssetLoader assetLoader = null, IFocusManager focusManager = null, IInputManager inputManager = null, Func<IKeyboardDevice> keyboardDevice = null, ILayoutManager layoutManager = null, IPclPlatformWrapper platformWrapper = null, IPlatformRenderInterface renderInterface = null, IStandardCursorFactory standardCursorFactory = null, IStyler styler = null, Func<Styles> theme = null, IPlatformThreadingInterface threadingInterface = null, IWindowImpl windowImpl = null, IWindowingPlatform windowingPlatform = null) { AssetLoader = assetLoader; FocusManager = focusManager; InputManager = inputManager; KeyboardDevice = keyboardDevice; LayoutManager = layoutManager; PlatformWrapper = platformWrapper; RenderInterface = renderInterface; StandardCursorFactory = standardCursorFactory; Styler = styler; Theme = theme; ThreadingInterface = threadingInterface; WindowImpl = windowImpl; WindowingPlatform = windowingPlatform; }
private static void InitializeOSX() { var platform = Native.AvaloniaNativePlatform.Initialize(); WindowingInterface = platform; PlatformThreadingInterface = new Native.PlatformThreadingInterface(platform.Factory.CreatePlatformThreadingInterface()); StandardCursorFactory = new Native.CursorFactory(platform.Factory.CreateCursorFactory()); }
internal WindowBaseImpl(AvaloniaNativePlatformOptions opts, GlPlatformFeature glFeature) { _gpu = opts.UseGpu && glFeature != null; _deferredRendering = opts.UseDeferredRendering; _keyboard = AvaloniaLocator.Current.GetService <IKeyboardDevice>(); _mouse = new MouseDevice(); _cursorFactory = AvaloniaLocator.Current.GetService <IStandardCursorFactory>(); }
public WindowBaseImpl(AvaloniaNativePlatformOptions opts) { _gpu = opts.UseGpu; _deferredRendering = opts.UseDeferredRendering; _keyboard = AvaloniaLocator.Current.GetService <IKeyboardDevice>(); _mouse = AvaloniaLocator.Current.GetService <IMouseDevice>(); _cursorFactory = AvaloniaLocator.Current.GetService <IStandardCursorFactory>(); }
private static void InitializeLinux() { var x11 = new AvaloniaX11Platform(); x11.Initialize(new X11PlatformOptions()); WindowingInterface = x11; PlatformThreadingInterface = new X11PlatformThreading(x11); StandardCursorFactory = new X11CursorFactory(x11.Display); }
public TestServices With( IAssetLoader assetLoader = null, IFocusManager focusManager = null, IInputManager inputManager = null, Func<IKeyboardDevice> keyboardDevice = null, ILayoutManager layoutManager = null, IPclPlatformWrapper platformWrapper = null, IPlatformRenderInterface renderInterface = null, IStandardCursorFactory standardCursorFactory = null, IStyler styler = null, Func<Styles> theme = null, IPlatformThreadingInterface threadingInterface = null, IWindowImpl windowImpl = null, IWindowingPlatform windowingPlatform = null) { return new TestServices( assetLoader: assetLoader ?? AssetLoader, focusManager: focusManager ?? FocusManager, inputManager: inputManager ?? InputManager, keyboardDevice: keyboardDevice ?? KeyboardDevice, layoutManager: layoutManager ?? LayoutManager, platformWrapper: platformWrapper ?? PlatformWrapper, renderInterface: renderInterface ?? RenderInterface, standardCursorFactory: standardCursorFactory ?? StandardCursorFactory, styler: styler ?? Styler, theme: theme ?? Theme, threadingInterface: threadingInterface ?? ThreadingInterface, windowImpl: windowImpl ?? WindowImpl, windowingPlatform: windowingPlatform ?? WindowingPlatform); }