Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 3 additions & 7 deletions src/NPlug/IAudioPluginView.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@
// Licensed under the BSD-Clause 2 license.
// See license.txt file in the project root for full license information.

using NPlug.Interop;
using System.Runtime.InteropServices;
using static NPlug.Interop.LibVst;

namespace NPlug;

/// <summary>
Expand Down Expand Up @@ -67,7 +63,7 @@ public interface IAudioPluginView
/// Handling of mouse wheel.
/// </summary>
void OnWheel(float distance);

/// <summary>
/// Handling of keyboard events : Key Down.
/// </summary>
Expand Down Expand Up @@ -97,7 +93,7 @@ public interface IAudioPluginView
/// requests a resize (IPlugFrame::resizeView ()) onSize has to be called afterward.
/// </summary>
void OnSize(ViewRectangle newSize);

/// <summary>
/// Focus changed message.
/// </summary>
Expand All @@ -117,7 +113,7 @@ public interface IAudioPluginView
/// On live resize this is called to check if the view can be resized to the given rect, if not
/// adjust the rect to the allowed size.
/// </summary>
bool CheckSizeConstraint(ViewRectangle rect);
bool CheckSizeConstraint(ref ViewRectangle rect);

/// <summary>
/// This interface communicates the content scale factor from the host to the plug-in view on
Expand Down
2 changes: 1 addition & 1 deletion src/NPlug/Interop/LibVst.IPlugView.cs
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ private static partial ComResult canResize_ToManaged(IPlugView* self)

private static partial ComResult checkSizeConstraint_ToManaged(IPlugView* self, ViewRect* rect)
{
return Get(self).CheckSizeConstraint(*(ViewRectangle*)rect);
return Get(self).CheckSizeConstraint(ref *(ViewRectangle*)rect);
}

private static bool TryGetPlatform(FIDString type, out AudioPluginViewPlatform platform)
Expand Down