public WindowImpl() { #if USE_MANAGED_DRAG _managedDrag = new ManagedWindowResizeDragHelper(this, capture => { if (capture) { UnmanagedMethods.SetCapture(Handle.Handle); } else { UnmanagedMethods.ReleaseCapture(); } }); #endif CreateWindow(); _framebuffer = new FramebufferManager(_hwnd); if (Win32GlManager.EglFeature != null) { _gl = new EglGlPlatformSurface((EglDisplay)Win32GlManager.EglFeature.Display, Win32GlManager.EglFeature.DeferredContext, 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(); var glPlatform = AvaloniaLocator.Current.GetService <IPlatformOpenGlInterface>(); var compositionConnector = AvaloniaLocator.Current.GetService <WinUICompositorConnection>(); _isUsingComposition = compositionConnector is { } &&
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 WindowBaseImpl() { _managedDrag = new ManagedWindowResizeDragHelper(this, _ => { }, ResizeForManagedDrag); // ReSharper disable once VirtualMemberCallInConstructor Window = CreateCustomWindow(); Window.StyleMask = NSWindowStyle.Titled; Window.BackingType = NSBackingStore.Buffered; Window.ContentView = View; // ReSharper disable once VirtualMemberCallInConstructor Window.Delegate = CreateWindowDelegate(); }
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); }
public WindowImpl() { #if USE_MANAGED_DRAG _managedDrag = new ManagedWindowResizeDragHelper(this, capture => { if (capture) { UnmanagedMethods.SetCapture(Handle.Handle); } else { UnmanagedMethods.ReleaseCapture(); } }); #endif CreateWindow(); _framebuffer = new FramebufferManager(_hwnd); s_instances.Add(this); }