Browse Source

Add stubs for transparency in other toplevel impls.

pull/3962/head
Dan Walmsley 6 years ago
parent
commit
30b81f1ded
  1. 6
      src/Avalonia.Controls/Embedding/Offscreen/OffscreenTopLevelImpl.cs
  2. 4
      src/Avalonia.DesignerSupport/Remote/Stubs.cs
  3. 4
      src/Avalonia.Native/WindowImplBase.cs
  4. 4
      src/Avalonia.X11/X11Window.cs
  5. 6
      src/Linux/Avalonia.LinuxFramebuffer/FramebufferToplevelImpl.cs

6
src/Avalonia.Controls/Embedding/Offscreen/OffscreenTopLevelImpl.cs

@ -49,6 +49,9 @@ namespace Avalonia.Controls.Embedding.Offscreen
public Action<Rect> Paint { get; set; } public Action<Rect> Paint { get; set; }
public Action<Size> Resized { get; set; } public Action<Size> Resized { get; set; }
public Action<double> ScalingChanged { get; set; } public Action<double> ScalingChanged { get; set; }
public Action<WindowTransparencyLevel> TransparencyLevelChanged { get; set; }
public void SetInputRoot(IInputRoot inputRoot) => InputRoot = inputRoot; public void SetInputRoot(IInputRoot inputRoot) => InputRoot = inputRoot;
public virtual Point PointToClient(PixelPoint point) => point.ToPoint(1); public virtual Point PointToClient(PixelPoint point) => point.ToPoint(1);
@ -61,6 +64,9 @@ namespace Avalonia.Controls.Embedding.Offscreen
public Action Closed { get; set; } public Action Closed { get; set; }
public abstract IMouseDevice MouseDevice { get; } public abstract IMouseDevice MouseDevice { get; }
public WindowTransparencyLevel TransparencyLevel { get => WindowTransparencyLevel.None; set { } }
public IPopupImpl CreatePopup() => null; public IPopupImpl CreatePopup() => null;
} }
} }

4
src/Avalonia.DesignerSupport/Remote/Stubs.cs

@ -37,6 +37,8 @@ namespace Avalonia.DesignerSupport.Remote
public WindowState WindowState { get; set; } public WindowState WindowState { get; set; }
public Action<WindowState> WindowStateChanged { get; set; } public Action<WindowState> WindowStateChanged { get; set; }
public Action<WindowTransparencyLevel> TransparencyLevelChanged { get; set; }
public WindowStub(IWindowImpl parent = null) public WindowStub(IWindowImpl parent = null)
{ {
if (parent != null) if (parent != null)
@ -141,6 +143,8 @@ namespace Avalonia.DesignerSupport.Remote
public IPopupPositioner PopupPositioner { get; } public IPopupPositioner PopupPositioner { get; }
public Action GotInputWhenDisabled { get; set; } public Action GotInputWhenDisabled { get; set; }
public WindowTransparencyLevel TransparencyLevel { get => WindowTransparencyLevel.None; set { } }
} }
class ClipboardStub : IClipboard class ClipboardStub : IClipboard

4
src/Avalonia.Native/WindowImplBase.cs

@ -369,6 +369,8 @@ namespace Avalonia.Native
Action<double> ITopLevelImpl.ScalingChanged { get; set; } Action<double> ITopLevelImpl.ScalingChanged { get; set; }
public Action<WindowTransparencyLevel> TransparencyLevelChanged { get; set; }
public IScreenImpl Screen { get; private set; } public IScreenImpl Screen { get; private set; }
// TODO // TODO
@ -389,6 +391,8 @@ namespace Avalonia.Native
_native.BeginDragAndDropOperation(effects, point, clipboard, callback, sourceHandle); _native.BeginDragAndDropOperation(effects, point, clipboard, callback, sourceHandle);
} }
public WindowTransparencyLevel TransparencyLevel { get => WindowTransparencyLevel.None; set { } }
public IPlatformHandle Handle { get; private set; } public IPlatformHandle Handle { get; private set; }
} }
} }

4
src/Avalonia.X11/X11Window.cs

@ -300,6 +300,9 @@ namespace Avalonia.X11
public Action Activated { get; set; } public Action Activated { get; set; }
public Func<bool> Closing { get; set; } public Func<bool> Closing { get; set; }
public Action<WindowState> WindowStateChanged { get; set; } public Action<WindowState> WindowStateChanged { get; set; }
public Action<WindowTransparencyLevel> TransparencyLevelChanged { get; set; }
public Action Closed { get; set; } public Action Closed { get; set; }
public Action<PixelPoint> PositionChanged { get; set; } public Action<PixelPoint> PositionChanged { get; set; }
@ -1083,5 +1086,6 @@ namespace Avalonia.X11
public IPopupPositioner PopupPositioner { get; } public IPopupPositioner PopupPositioner { get; }
public ITopLevelNativeMenuExporter NativeMenuExporter { get; } public ITopLevelNativeMenuExporter NativeMenuExporter { get; }
public WindowTransparencyLevel TransparencyLevel { get; set; }
} }
} }

6
src/Linux/Avalonia.LinuxFramebuffer/FramebufferToplevelImpl.cs

@ -1,5 +1,6 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using Avalonia.Controls;
using Avalonia.Input; using Avalonia.Input;
using Avalonia.Input.Raw; using Avalonia.Input.Raw;
using Avalonia.LinuxFramebuffer.Input; using Avalonia.LinuxFramebuffer.Input;
@ -70,6 +71,9 @@ namespace Avalonia.LinuxFramebuffer
public Action<Rect> Paint { get; set; } public Action<Rect> Paint { get; set; }
public Action<Size> Resized { get; set; } public Action<Size> Resized { get; set; }
public Action<double> ScalingChanged { get; set; } public Action<double> ScalingChanged { get; set; }
public Action<WindowTransparencyLevel> TransparencyLevelChanged { get; set; }
public Action Closed { get; set; } public Action Closed { get; set; }
public event Action LostFocus public event Action LostFocus
{ {
@ -78,5 +82,7 @@ namespace Avalonia.LinuxFramebuffer
} }
public Size ScaledSize => _outputBackend.PixelSize.ToSize(Scaling); public Size ScaledSize => _outputBackend.PixelSize.ToSize(Scaling);
public WindowTransparencyLevel TransparencyLevel { get => WindowTransparencyLevel.None; set { } }
} }
} }

Loading…
Cancel
Save