Fix duplicate `XEvent` struct definitions

This commit is contained in:
Susko3 2024-04-06 01:34:10 +02:00
parent a8553fab6e
commit b01fa42bff
6 changed files with 12 additions and 26 deletions

View File

@ -28,11 +28,6 @@ using System.Runtime.Versioning;
namespace SDL
{
[StructLayout(LayoutKind.Explicit)]
public partial struct _XEvent
{
}
public static unsafe partial class SDL3
{
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]

View File

@ -28,11 +28,6 @@ using System.Runtime.Versioning;
namespace SDL
{
[StructLayout(LayoutKind.Explicit)]
public partial struct _XEvent
{
}
public enum SDL_WinRT_Path
{
SDL_WINRT_PATH_INSTALLED_LOCATION,

View File

@ -32,11 +32,6 @@ namespace SDL
{
}
[StructLayout(LayoutKind.Explicit)]
public partial struct _XEvent
{
}
public partial struct XTaskQueueObject
{
}

View File

@ -23,19 +23,15 @@
3. This notice may not be removed or altered from any source distribution.
*/
using System;
using System.Runtime.InteropServices;
namespace SDL
{
[StructLayout(LayoutKind.Explicit)]
public partial struct _XEvent
{
}
public static unsafe partial class SDL3
{
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
public static extern void SDL_SetX11EventHook([NativeTypeName("SDL_X11EventHook")] delegate* unmanaged[Cdecl]<void*, _XEvent*, int> callback, void* userdata);
public static extern void SDL_SetX11EventHook([NativeTypeName("SDL_X11EventHook")] delegate* unmanaged[Cdecl]<void*, IntPtr, int> callback, void* userdata);
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]
[return: NativeTypeName("SDL_bool")]

View File

@ -28,11 +28,6 @@ using System.Runtime.Versioning;
namespace SDL
{
[StructLayout(LayoutKind.Explicit)]
public partial struct _XEvent
{
}
public static unsafe partial class SDL3
{
[DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)]

View File

@ -0,0 +1,10 @@
# Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
# See the LICENCE file in the repository root for full licence text.
# Exclude struct forward declaration
--exclude
_XEvent
# Remap removed struct pointer to generic pointer
--remap
_XEvent*=IntPtr