public WindowImpl() { _touchDevice = new TouchDevice(); _mouseDevice = new WindowsMouseDevice(); #if USE_MANAGED_DRAG _managedDrag = new ManagedWindowResizeDragHelper(this, capture => { if (capture) UnmanagedMethods.SetCapture(Handle.Handle); else UnmanagedMethods.ReleaseCapture(); }); #endif _windowProperties = new WindowProperties { ShowInTaskbar = false, IsResizable = true, Decorations = SystemDecorations.Full }; _rendererLock = new ManagedDeferredRendererLock(); CreateWindow(); _framebuffer = new FramebufferManager(_hwnd); if (Win32GlManager.EglFeature != null) _gl = new EglGlPlatformSurface(Win32GlManager.EglFeature.DeferredContext, this); Screen = new ScreenImpl(); _nativeControlHost = new Win32NativeControlHost(this); s_instances.Add(this); }
public WindowImpl() { _touchDevice = new TouchDevice(); _mouseDevice = new WindowsMouseDevice(); #if USE_MANAGED_DRAG _managedDrag = new ManagedWindowResizeDragHelper(this, capture => { if (capture) { UnmanagedMethods.SetCapture(Handle.Handle); } else { UnmanagedMethods.ReleaseCapture(); } }); #endif _windowProperties = new WindowProperties { ShowInTaskbar = false, IsResizable = true, Decorations = SystemDecorations.Full }; _rendererLock = new ManagedDeferredRendererLock(); CreateWindow(); _framebuffer = new FramebufferManager(_hwnd); var glPlatform = AvaloniaLocator.Current.GetService <IPlatformOpenGlInterface>(); if (glPlatform is EglPlatformOpenGlInterface egl) { _gl = new EglGlPlatformSurface(egl, this); } else if (glPlatform is WglPlatformOpenGlInterface wgl) { _gl = new WglGlPlatformSurface(wgl.PrimaryContext, this); } Screen = new ScreenImpl(); _nativeControlHost = new Win32NativeControlHost(this); s_instances.Add(this); }