From 82bc2fa697411337ce28d223ef2db9aff10ef784 Mon Sep 17 00:00:00 2001 From: Miron Alexandru Date: Tue, 4 Jun 2024 22:30:31 +0300 Subject: [PATCH] Remove unused DllImports --- src/SFML.Audio/Sound.cs | 3 --- src/SFML.Graphics/RenderWindow.cs | 6 ------ src/SFML.Graphics/Text.cs | 9 --------- src/SFML.System/Time.cs | 9 --------- src/SFML.Window/Window.cs | 6 ------ src/SFML.Window/WindowBase.cs | 6 ------ 6 files changed, 39 deletions(-) diff --git a/src/SFML.Audio/Sound.cs b/src/SFML.Audio/Sound.cs index 9e2c19d5..02a87072 100644 --- a/src/SFML.Audio/Sound.cs +++ b/src/SFML.Audio/Sound.cs @@ -318,9 +318,6 @@ protected override void Destroy(bool disposing) [DllImport(CSFML.audio, CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] private static extern void sfSound_setBuffer(IntPtr Sound, IntPtr Buffer); - [DllImport(CSFML.audio, CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] - private static extern IntPtr sfSound_getBuffer(IntPtr Sound); - [DllImport(CSFML.audio, CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] private static extern void sfSound_setLoop(IntPtr Sound, bool Loop); diff --git a/src/SFML.Graphics/RenderWindow.cs b/src/SFML.Graphics/RenderWindow.cs index 4bb0a2e3..3120f9ff 100644 --- a/src/SFML.Graphics/RenderWindow.cs +++ b/src/SFML.Graphics/RenderWindow.cs @@ -818,9 +818,6 @@ private void Initialize() private View myDefaultView = null; #region Imports - [DllImport(CSFML.graphics, CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] - private static extern IntPtr sfRenderWindow_create(VideoMode Mode, string Title, Styles Style, ref ContextSettings Params); - [DllImport(CSFML.graphics, CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] private static extern IntPtr sfRenderWindow_createUnicode(VideoMode Mode, IntPtr Title, Styles Style, ref ContextSettings Params); @@ -860,9 +857,6 @@ private void Initialize() [DllImport(CSFML.graphics, CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] private static extern void sfRenderWindow_setSize(IntPtr CPointer, Vector2u size); - [DllImport(CSFML.graphics, CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] - private static extern void sfRenderWindow_setTitle(IntPtr CPointer, string title); - [DllImport(CSFML.graphics, CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] private static extern void sfRenderWindow_setUnicodeTitle(IntPtr CPointer, IntPtr title); diff --git a/src/SFML.Graphics/Text.cs b/src/SFML.Graphics/Text.cs index 7df99617..438ee72c 100644 --- a/src/SFML.Graphics/Text.cs +++ b/src/SFML.Graphics/Text.cs @@ -384,9 +384,6 @@ protected override void Destroy(bool disposing) [DllImport(CSFML.graphics, CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] private static extern void sfText_destroy(IntPtr CPointer); - [DllImport(CSFML.graphics, CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity, Obsolete] - private static extern void sfText_setColor(IntPtr CPointer, Color Color); - [DllImport(CSFML.graphics, CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] private static extern void sfText_setFillColor(IntPtr CPointer, Color Color); @@ -396,9 +393,6 @@ protected override void Destroy(bool disposing) [DllImport(CSFML.graphics, CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] private static extern void sfText_setOutlineThickness(IntPtr CPointer, float thickness); - [DllImport(CSFML.graphics, CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity, Obsolete] - private static extern Color sfText_getColor(IntPtr CPointer); - [DllImport(CSFML.graphics, CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] private static extern Color sfText_getFillColor(IntPtr CPointer); @@ -432,9 +426,6 @@ protected override void Destroy(bool disposing) [DllImport(CSFML.graphics, CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] private static extern void sfText_setStyle(IntPtr CPointer, Styles Style); - [DllImport(CSFML.graphics, CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] - private static extern IntPtr sfText_getString(IntPtr CPointer); - [DllImport(CSFML.graphics, CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] private static extern IntPtr sfText_getUnicodeString(IntPtr CPointer); diff --git a/src/SFML.System/Time.cs b/src/SFML.System/Time.cs index ff815ec9..8bd6dc37 100644 --- a/src/SFML.System/Time.cs +++ b/src/SFML.System/Time.cs @@ -261,15 +261,6 @@ public struct Time : IEquatable