예제 #1
0
        internal WindowImpl(IAvaloniaNativeFactory factory, AvaloniaNativePlatformOptions opts,
                            AvaloniaNativePlatformOpenGlInterface glFeature) : base(opts, glFeature)
        {
            _factory           = factory;
            _opts              = opts;
            _glFeature         = glFeature;
            _doubleClickHelper = new DoubleClickHelper();

            using (var e = new WindowEvents(this))
            {
                var context = _opts.UseGpu ? glFeature?.MainContext : null;
                Init(_native = factory.CreateWindow(e, context?.Context), factory.CreateScreens(), context);
            }

            NativeMenuExporter = new AvaloniaNativeMenuExporter(_native, factory);
        }
예제 #2
0
 public PopupImpl(IAvaloniaNativeFactory factory,
                  AvaloniaNativePlatformOptions opts,
                  AvaloniaNativePlatformOpenGlInterface glFeature,
                  IWindowBaseImpl parent) : base(opts, glFeature)
 {
     _factory   = factory;
     _opts      = opts;
     _glFeature = glFeature;
     _parent    = parent;
     using (var e = new PopupEvents(this))
     {
         var context = _opts.UseGpu ? glFeature?.MainContext : null;
         Init(factory.CreatePopup(e, context?.Context), factory.CreateScreens(), context);
     }
     PopupPositioner = new ManagedPopupPositioner(new ManagedPopupPositionerPopupImplHelper(parent, MoveResize));
 }
예제 #3
0
        internal WindowImpl(IAvaloniaNativeFactory factory, AvaloniaNativePlatformOptions opts,
                            GlPlatformFeature glFeature) : base(opts, glFeature)
        {
            _factory   = factory;
            _opts      = opts;
            _glFeature = glFeature;
            using (var e = new WindowEvents(this))
            {
                Init(_native = factory.CreateWindow(e,
                                                    _opts.UseGpu ? glFeature?.DeferredContext.Context : null), factory.CreateScreens());
            }

            NativeMenuExporter = new AvaloniaNativeMenuExporter(_native, factory);
        }
예제 #4
0
 public PopupImpl(IAvaloniaNativeFactory factory,
                  AvaloniaNativePlatformOptions opts,
                  GlPlatformFeature glFeature,
                  IWindowBaseImpl parent) : base(opts, glFeature)
 {
     _factory   = factory;
     _opts      = opts;
     _glFeature = glFeature;
     using (var e = new PopupEvents(this))
     {
         Init(factory.CreatePopup(e, _opts.UseGpu ? glFeature?.DeferredContext.Context : null), factory.CreateScreens());
     }
     PopupPositioner = new ManagedPopupPositioner(new OsxManagedPopupPositionerPopupImplHelper(parent, MoveResize));
 }
예제 #5
0
 public WindowImpl(IAvaloniaNativeFactory factory)
 {
     using (var e = new WindowEvents(this))
         Init(_native = factory.CreateWindow(e), factory.CreateScreens());
 }
예제 #6
0
 public PopupImpl(IAvaloniaNativeFactory factory)
 {
     using (var e = new PopupEvents(this))
         Init(_native = factory.CreatePopup(e), factory.CreateScreens());
 }