Ejemplo n.º 1
0
        public virtual void Dispose()
        {
            _native?.Close();
            _native?.Dispose();
            _native = null;

            (Screen as ScreenImpl)?.Dispose();
        }
Ejemplo n.º 2
0
 protected void Init(IAvnWindowBase window, IAvnScreens screens)
 {
     _native           = window;
     _glSurface        = new GlPlatformSurface(window);
     Screen            = new ScreenImpl(screens);
     _savedLogicalSize = ClientSize;
     _savedScaling     = Scaling;
 }
Ejemplo n.º 3
0
        protected void Init(IAvnWindowBase window, IAvnScreens screens)
        {
            _native = window;

            Screen            = new ScreenImpl(screens);
            _savedLogicalSize = ClientSize;
            _savedScaling     = Scaling;
        }
Ejemplo n.º 4
0
 public DeferredRendererProxy(IRenderRoot root, IAvnWindowBase window)
 {
     if (window != null)
     {
         _useLock = true;
         window.AddRef();
         _window = new IAvnWindowBase(window.NativePointer);
     }
     _renderer     = new DeferredRenderer(root, this);
     _rendererTask = (IRenderLoopTask)_renderer;
 }
        protected void Init(IAvnWindowBase window, IAvnScreens screens)
        {
            _native           = window;
            _glSurface        = new GlPlatformSurface(window);
            Screen            = new ScreenImpl(screens);
            _savedLogicalSize = ClientSize;
            _savedScaling     = Scaling;

            var monitor = Screen.AllScreens.OrderBy(x => x.PixelDensity)
                          .FirstOrDefault(m => m.Bounds.Contains(Position));

            Resize(new Size(monitor.WorkingArea.Width * 0.75d, monitor.WorkingArea.Height * 0.7d));
        }
Ejemplo n.º 6
0
        protected void Init(IAvnWindowBase window, IAvnScreens screens, IGlContext glContext)
        {
            _native    = window;
            _glContext = glContext;

            Handle = new MacOSTopLevelWindowHandle(window);
            if (_gpu)
            {
                _glSurface = new GlPlatformSurface(window, _glContext);
            }
            Screen             = new ScreenImpl(screens);
            _savedLogicalSize  = ClientSize;
            _savedScaling      = Scaling;
            _nativeControlHost = new NativeControlHostImpl(_native.CreateNativeControlHost());

            var monitor = Screen.AllScreens.OrderBy(x => x.PixelDensity)
                          .FirstOrDefault(m => m.Bounds.Contains(Position));

            Resize(new Size(monitor.WorkingArea.Width * 0.75d, monitor.WorkingArea.Height * 0.7d));
        }
Ejemplo n.º 7
0
 public MacOSTopLevelWindowHandle(IAvnWindowBase native)
 {
     _native = native;
 }
 public GlPlatformSurface(IAvnWindowBase window, IGlContext context)
 {
     _window  = window;
     _context = context;
 }
Ejemplo n.º 9
0
 protected void Init(IAvnWindowBase window)
 {
     _native = window;
 }
Ejemplo n.º 10
0
 public void Dispose()
 {
     _native.Close();
     _native.Dispose();
     _native = null;
 }
 public GlPlatformSurface(IAvnWindowBase window)
 {
     _window = window;
 }
 public AvaloniaNativeDeferredRendererLock(IAvnWindowBase window)
 {
     _window = window;
 }
 public UnlockDisposable(IAvnWindowBase window)
 {
     _window = window;
 }