Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unused DllImports #257

Merged
merged 1 commit into from
Jun 5, 2024
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
3 changes: 0 additions & 3 deletions src/SFML.Audio/Sound.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
6 changes: 0 additions & 6 deletions src/SFML.Graphics/RenderWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down Expand Up @@ -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);

Expand Down
9 changes: 0 additions & 9 deletions src/SFML.Graphics/Text.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand All @@ -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);

Expand Down Expand Up @@ -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);

Expand Down
9 changes: 0 additions & 9 deletions src/SFML.System/Time.cs
Original file line number Diff line number Diff line change
Expand Up @@ -261,15 +261,6 @@ public struct Time : IEquatable<Time>

[DllImport(CSFML.system, CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
private static extern Time sfMicroseconds(long Amount);

[DllImport(CSFML.system, CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
private static extern float sfTime_asSeconds(Time time);

[DllImport(CSFML.system, CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
private static extern int sfTime_asMilliseconds(Time time);

[DllImport(CSFML.system, CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
private static extern long sfTime_asMicroseconds(Time time);
#endregion
}
}
6 changes: 0 additions & 6 deletions src/SFML.Window/Window.cs
Original file line number Diff line number Diff line change
Expand Up @@ -464,9 +464,6 @@ protected override void Destroy(bool disposing)
}

#region Imports
[DllImport(CSFML.window, CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
private static extern IntPtr sfWindow_create(VideoMode Mode, string Title, Styles Style, ref ContextSettings Params);

[DllImport(CSFML.window, CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
private static extern IntPtr sfWindow_createUnicode(VideoMode Mode, IntPtr Title, Styles Style, ref ContextSettings Params);

Expand Down Expand Up @@ -506,9 +503,6 @@ protected override void Destroy(bool disposing)
[DllImport(CSFML.window, CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
private static extern void sfWindow_setSize(IntPtr CPointer, Vector2u size);

[DllImport(CSFML.window, CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
private static extern void sfWindow_setTitle(IntPtr CPointer, string title);

[DllImport(CSFML.window, CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
private static extern void sfWindow_setUnicodeTitle(IntPtr CPointer, IntPtr title);

Expand Down
6 changes: 0 additions & 6 deletions src/SFML.Window/WindowBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -709,9 +709,6 @@ private void CallEventHandler(Event e)
public event EventHandler<SensorEventArgs> SensorChanged = null;

#region Imports
[DllImport(CSFML.window, CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
private static extern IntPtr sfWindowBase_create(VideoMode Mode, string Title, Styles Style);

[DllImport(CSFML.window, CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
private static extern IntPtr sfWindowBase_createUnicode(VideoMode Mode, IntPtr Title, Styles Style);

Expand Down Expand Up @@ -745,9 +742,6 @@ private void CallEventHandler(Event e)
[DllImport(CSFML.window, CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
private static extern void sfWindowBase_setSize(IntPtr CPointer, Vector2u size);

[DllImport(CSFML.window, CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
private static extern void sfWindowBase_setTitle(IntPtr CPointer, string title);

[DllImport(CSFML.window, CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
private static extern void sfWindowBase_setUnicodeTitle(IntPtr CPointer, IntPtr title);

Expand Down