зеркало из https://github.com/AvaloniaUI/Avalonia.git
Made the pinvoke calls private
Changed SetWindowLongPtr calls to SetWindowLong in Win32/WindowImpl
This commit is contained in:
Родитель
8f006ff655
Коммит
7605909c79
|
@ -717,10 +717,10 @@ namespace Avalonia.Win32.Interop
|
|||
}
|
||||
|
||||
[DllImport("user32.dll", SetLastError = true, EntryPoint = "SetWindowLong")]
|
||||
public static extern uint SetWindowLong32b(IntPtr hWnd, int nIndex, uint value);
|
||||
private static extern uint SetWindowLong32b(IntPtr hWnd, int nIndex, uint value);
|
||||
|
||||
[DllImport("user32.dll", SetLastError = true)]
|
||||
public static extern uint SetWindowLongPtr(IntPtr hWnd, int nIndex, uint value);
|
||||
private static extern uint SetWindowLongPtr(IntPtr hWnd, int nIndex, uint value);
|
||||
|
||||
public static uint SetWindowLong(IntPtr hWnd, int nIndex, uint value)
|
||||
{
|
||||
|
|
|
@ -66,8 +66,8 @@ namespace Avalonia.Win32
|
|||
{
|
||||
get
|
||||
{
|
||||
var style = UnmanagedMethods.GetWindowLongPtr(_hwnd, -16);
|
||||
var exStyle = UnmanagedMethods.GetWindowLongPtr(_hwnd, -20);
|
||||
var style = UnmanagedMethods.GetWindowLong(_hwnd, -16);
|
||||
var exStyle = UnmanagedMethods.GetWindowLong(_hwnd, -20);
|
||||
var padding = new UnmanagedMethods.RECT();
|
||||
|
||||
if (UnmanagedMethods.AdjustWindowRectEx(ref padding, style, false, exStyle))
|
||||
|
@ -219,7 +219,7 @@ namespace Avalonia.Win32
|
|||
return;
|
||||
}
|
||||
|
||||
var style = (UnmanagedMethods.WindowStyles)UnmanagedMethods.GetWindowLongPtr(_hwnd, -16);
|
||||
var style = (UnmanagedMethods.WindowStyles)UnmanagedMethods.GetWindowLong(_hwnd, -16);
|
||||
|
||||
style |= UnmanagedMethods.WindowStyles.WS_OVERLAPPEDWINDOW;
|
||||
|
||||
|
@ -235,7 +235,7 @@ namespace Avalonia.Win32
|
|||
Rect newRect;
|
||||
var oldThickness = BorderThickness;
|
||||
|
||||
UnmanagedMethods.SetWindowLongPtr(_hwnd, -16, (uint)style);
|
||||
UnmanagedMethods.SetWindowLong(_hwnd, -16, (uint)style);
|
||||
|
||||
if (value)
|
||||
{
|
||||
|
|
Загрузка…
Ссылка в новой задаче