Merge branch 'flibitijibibo/master'

This commit is contained in:
Dean Herbert 2022-05-09 19:01:28 +09:00
commit 36ca8b2802
3 changed files with 459 additions and 1 deletions

1
README
View file

@ -19,6 +19,7 @@ is written in a way that can be used for any general C# application.
The wrapper provides bindings for the following libraries: The wrapper provides bindings for the following libraries:
- SDL2 - SDL2
- SDL2_gfx
- SDL2_image - SDL2_image
- SDL2_mixer - SDL2_mixer
- SDL2_ttf - SDL2_ttf

View file

@ -729,6 +729,36 @@ namespace SDL2
public const string SDL_HINT_LINUX_JOYSTICK_CLASSIC = public const string SDL_HINT_LINUX_JOYSTICK_CLASSIC =
"SDL_LINUX_JOYSTICK_CLASSIC"; "SDL_LINUX_JOYSTICK_CLASSIC";
/* Only available in 2.0.20 or higher. */
public const string SDL_HINT_RENDER_LINE_METHOD =
"SDL_RENDER_LINE_METHOD";
/* Only available in 2.0.22 or higher. */
public const string SDL_HINT_FORCE_RAISEWINDOW =
"SDL_HINT_FORCE_RAISEWINDOW";
public const string SDL_HINT_IME_SUPPORT_EXTENDED_TEXT =
"SDL_IME_SUPPORT_EXTENDED_TEXT";
public const string SDL_HINT_JOYSTICK_GAMECUBE_RUMBLE_BRAKE =
"SDL_JOYSTICK_GAMECUBE_RUMBLE_BRAKE";
public const string SDL_HINT_JOYSTICK_ROG_CHAKRAM =
"SDL_JOYSTICK_ROG_CHAKRAM";
public const string SDL_HINT_MOUSE_RELATIVE_MODE_CENTER =
"SDL_MOUSE_RELATIVE_MODE_CENTER";
public const string SDL_HINT_MOUSE_AUTO_CAPTURE =
"SDL_MOUSE_AUTO_CAPTURE";
public const string SDL_HINT_VITA_TOUCH_MOUSE_DEVICE =
"SDL_HINT_VITA_TOUCH_MOUSE_DEVICE";
public const string SDL_HINT_VIDEO_WAYLAND_PREFER_LIBDECOR =
"SDL_VIDEO_WAYLAND_PREFER_LIBDECOR";
public const string SDL_HINT_VIDEO_FOREIGN_WINDOW_OPENGL =
"SDL_VIDEO_FOREIGN_WINDOW_OPENGL";
public const string SDL_HINT_VIDEO_FOREIGN_WINDOW_VULKAN =
"SDL_VIDEO_FOREIGN_WINDOW_VULKAN";
public const string SDL_HINT_X11_WINDOW_TYPE =
"SDL_X11_WINDOW_TYPE";
public const string SDL_HINT_QUIT_ON_LAST_WINDOW_CLOSE =
"SDL_QUIT_ON_LAST_WINDOW_CLOSE";
public enum SDL_HintPriority public enum SDL_HintPriority
{ {
SDL_HINT_DEFAULT, SDL_HINT_DEFAULT,
@ -1302,7 +1332,7 @@ namespace SDL2
*/ */
public const int SDL_MAJOR_VERSION = 2; public const int SDL_MAJOR_VERSION = 2;
public const int SDL_MINOR_VERSION = 0; public const int SDL_MINOR_VERSION = 0;
public const int SDL_PATCHLEVEL = 18; public const int SDL_PATCHLEVEL = 22;
public static readonly int SDL_COMPILEDVERSION = SDL_VERSIONNUM( public static readonly int SDL_COMPILEDVERSION = SDL_VERSIONNUM(
SDL_MAJOR_VERSION, SDL_MAJOR_VERSION,
@ -4351,6 +4381,21 @@ namespace SDL2
int dst_pitch int dst_pitch
); );
/* src and dst are void* pointers
* Only available in 2.0.18 or higher.
*/
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int SDL_PremultiplyAlpha(
int width,
int height,
uint src_format,
IntPtr src,
int src_pitch,
uint dst_format,
IntPtr dst,
int dst_pitch
);
/* IntPtr refers to an SDL_Surface* /* IntPtr refers to an SDL_Surface*
* src refers to an SDL_Surface* * src refers to an SDL_Surface*
* fmt refers to an SDL_PixelFormat* * fmt refers to an SDL_PixelFormat*
@ -4727,6 +4772,7 @@ namespace SDL2
SDL_TEXTEDITING, SDL_TEXTEDITING,
SDL_TEXTINPUT, SDL_TEXTINPUT,
SDL_KEYMAPCHANGED, SDL_KEYMAPCHANGED,
SDL_TEXTEDITING_EXT,
/* Mouse events */ /* Mouse events */
SDL_MOUSEMOTION = 0x400, SDL_MOUSEMOTION = 0x400,
@ -4881,6 +4927,17 @@ namespace SDL2
public Int32 length; public Int32 length;
} }
[StructLayout(LayoutKind.Sequential)]
public unsafe struct SDL_TextEditingExtEvent
{
public SDL_EventType type;
public UInt32 timestamp;
public UInt32 windowID;
public IntPtr text; /* char*, free with SDL_free */
public Int32 start;
public Int32 length;
}
[StructLayout(LayoutKind.Sequential)] [StructLayout(LayoutKind.Sequential)]
public unsafe struct SDL_TextInputEvent public unsafe struct SDL_TextInputEvent
{ {
@ -5225,6 +5282,8 @@ namespace SDL2
[FieldOffset(0)] [FieldOffset(0)]
public SDL_TextEditingEvent edit; public SDL_TextEditingEvent edit;
[FieldOffset(0)] [FieldOffset(0)]
public SDL_TextEditingExtEvent editExt;
[FieldOffset(0)]
public SDL_TextInputEvent text; public SDL_TextInputEvent text;
[FieldOffset(0)] [FieldOffset(0)]
public SDL_MouseMotionEvent motion; public SDL_MouseMotionEvent motion;
@ -6100,6 +6159,12 @@ namespace SDL2
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void SDL_StopTextInput(); public static extern void SDL_StopTextInput();
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void SDL_ClearComposition();
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern SDL_bool SDL_IsTextInputShown();
/* Set the rectangle used for text input, hint for IME */ /* Set the rectangle used for text input, hint for IME */
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void SDL_SetTextInputRect(ref SDL_Rect rect); public static extern void SDL_SetTextInputRect(ref SDL_Rect rect);
@ -8483,6 +8548,8 @@ namespace SDL2
public IntPtr egl_window; // Refers to an egl_window*, requires >= 2.0.16 public IntPtr egl_window; // Refers to an egl_window*, requires >= 2.0.16
public IntPtr xdg_surface; // Refers to an xdg_surface*, requires >= 2.0.16 public IntPtr xdg_surface; // Refers to an xdg_surface*, requires >= 2.0.16
public IntPtr xdg_toplevel; // Referes to an xdg_toplevel*, requires >= 2.0.18 public IntPtr xdg_toplevel; // Referes to an xdg_toplevel*, requires >= 2.0.18
public IntPtr xdg_popup;
public IntPtr xdg_positioner;
} }
[StructLayout(LayoutKind.Sequential)] [StructLayout(LayoutKind.Sequential)]

390
src/SDL2_gfx.cs Normal file
View file

@ -0,0 +1,390 @@
#region License
/* SDL2# - C# Wrapper for SDL2
*
* Copyright (c) 2013-2021 Ethan Lee.
*
* This software is provided 'as-is', without any express or implied warranty.
* In no event will the authors be held liable for any damages arising from
* the use of this software.
*
* Permission is granted to anyone to use this software for any purpose,
* including commercial applications, and to alter it and redistribute it
* freely, subject to the following restrictions:
*
* 1. The origin of this software must not be misrepresented; you must not
* claim that you wrote the original software. If you use this software in a
* product, an acknowledgment in the product documentation would be
* appreciated but is not required.
*
* 2. Altered source versions must be plainly marked as such, and must not be
* misrepresented as being the original software.
*
* 3. This notice may not be removed or altered from any source distribution.
*
* Ethan "flibitijibibo" Lee <flibitijibibo@flibitijibibo.com>
*
*/
#endregion
#region Using Statements
using System;
using System.Runtime.InteropServices;
#endregion
namespace SDL2
{
public static class SDL_gfx
{
#region SDL2# Variables
/* Used by DllImport to load the native library. */
private const string nativeLibName = "SDL2_gfx";
#endregion
public const double M_PI = 3.1415926535897932384626433832795;
#region SDL2_gfxPrimitives.h
public const uint SDL2_GFXPRIMITIVES_MAJOR = 1;
public const uint SDL2_GFXPRIMITIVES_MINOR = 0;
public const uint SDL2_GFXPRIMITIVES_MICRO = 1;
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int pixelColor(IntPtr renderer, short x, short y, uint color);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int pixelRGBA(IntPtr renderer, short x, short y, byte r, byte g, byte b, byte a);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int hlineColor(IntPtr renderer, short x1, short x2, short y, uint color);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int hlineRGBA(IntPtr renderer, short x1, short x2, short y, byte r, byte g, byte b, byte a);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int vlineColor(IntPtr renderer, short x, short y1, short y2, uint color);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int vlineRGBA(IntPtr renderer, short x, short y1, short y2, byte r, byte g, byte b, byte a);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int rectangleColor(IntPtr renderer, short x1, short y1, short x2, short y2, uint color);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int rectangleRGBA(IntPtr renderer, short x1, short y1, short x2, short y2, byte r, byte g, byte b, byte a);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int roundedRectangleColor(IntPtr renderer, short x1, short y1, short x2, short y2, short rad, uint color);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int roundedRectangleRGBA(IntPtr renderer, short x1, short y1, short x2, short y2, short rad, byte r, byte g, byte b, byte a);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int boxColor(IntPtr renderer, short x1, short y1, short x2, short y2, uint color);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int boxRGBA(IntPtr renderer, short x1, short y1, short x2, short y2, byte r, byte g, byte b, byte a);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int roundedBoxColor(IntPtr renderer, short x1, short y1, short x2, short y2, short rad, uint color);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int roundedBoxRGBA(IntPtr renderer, short x1, short y1, short x2, short y2, short rad, byte r, byte g, byte b, byte a);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int lineColor(IntPtr renderer, short x1, short y1, short x2, short y2, uint color);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int lineRGBA(IntPtr renderer, short x1, short y1, short x2, short y2, byte r, byte g, byte b, byte a);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int aalineColor(IntPtr renderer, short x1, short y1, short x2, short y2, uint color);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int aalineRGBA(IntPtr renderer, short x1, short y1, short x2, short y2, byte r, byte g, byte b, byte a);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int thickLineColor(IntPtr renderer, short x1, short y1, short x2, short y2, byte width, uint color);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int thickLineRGBA(IntPtr renderer, short x1, short y1, short x2, short y2, byte width, byte r, byte g, byte b, byte a);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int circleColor(IntPtr renderer, short x, short y, short rad, uint color);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int circleRGBA(IntPtr renderer, short x, short y, short rad, byte r, byte g, byte b, byte a);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int arcColor(IntPtr renderer, short x, short y, short rad, short start, short end, uint color);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int arcRGBA(IntPtr renderer, short x, short y, short rad, short start, short end, byte r, byte g, byte b, byte a);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int aacircleColor(IntPtr renderer, short x, short y, short rad, uint color);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int aacircleRGBA(IntPtr renderer, short x, short y, short rad, byte r, byte g, byte b, byte a);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int filledCircleColor(IntPtr renderer, short x, short y, short rad, uint color);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int filledCircleRGBA(IntPtr renderer, short x, short y, short rad, byte r, byte g, byte b, byte a);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int ellipseColor(IntPtr renderer, short x, short y, short rx, short ry, uint color);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int ellipseRGBA(IntPtr renderer, short x, short y, short rx, short ry, byte r, byte g, byte b, byte a);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int aaellipseColor(IntPtr renderer, short x, short y, short rx, short ry, uint color);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int aaellipseRGBA(IntPtr renderer, short x, short y, short rx, short ry, byte r, byte g, byte b, byte a);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int filledEllipseColor(IntPtr renderer, short x, short y, short rx, short ry, uint color);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int filledEllipseRGBA(IntPtr renderer, short x, short y, short rx, short ry, byte r, byte g, byte b, byte a);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int pieColor(IntPtr renderer, short x, short y, short rad, short start, short end, uint color);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int pieRGBA(IntPtr renderer, short x, short y, short rad, short start, short end, byte r, byte g, byte b, byte a);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int filledPieColor(IntPtr renderer, short x, short y, short rad, short start, short end, uint color);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int filledPieRGBA(IntPtr renderer, short x, short y, short rad, short start, short end, byte r, byte g, byte b, byte a);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int trigonColor(IntPtr renderer, short x1, short y1, short x2, short y2, short x3, short y3, uint color);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int trigonRGBA(IntPtr renderer, short x1, short y1, short x2, short y2, short x3, short y3, byte r, byte g, byte b, byte a);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int aatrigonColor(IntPtr renderer, short x1, short y1, short x2, short y2, short x3, short y3, uint color);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int aatrigonRGBA(IntPtr renderer, short x1, short y1, short x2, short y2, short x3, short y3, byte r, byte g, byte b, byte a);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int filledTrigonColor(IntPtr renderer, short x1, short y1, short x2, short y2, short x3, short y3, uint color);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int filledTrigonRGBA(IntPtr renderer, short x1, short y1, short x2, short y2, short x3, short y3, byte r, byte g, byte b, byte a);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int polygonColor(IntPtr renderer, [In] short[] vx, [In] short[] vy, int n, uint color);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int polygonRGBA(IntPtr renderer, [In] short[] vx, [In] short[] vy, int n, byte r, byte g, byte b, byte a);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int aapolygonColor(IntPtr renderer, [In] short[] vx, [In] short[] vy, int n, uint color);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int aapolygonRGBA(IntPtr renderer, [In] short[] vx, [In] short[] vy, int n, byte r, byte g, byte b, byte a);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int filledPolygonColor(IntPtr renderer, [In] short[] vx, [In] short[] vy, int n, uint color);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int filledPolygonRGBA(IntPtr renderer, [In] short[] vx, [In] short[] vy, int n, byte r, byte g, byte b, byte a);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int texturedPolygon(IntPtr renderer, [In] short[] vx, [In] short[] vy, int n, IntPtr texture, int texture_dx, int texture_dy);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int bezierColor(IntPtr renderer, [In] short[] vx, [In] short[] vy, int n, int s, uint color);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int bezierRGBA(IntPtr renderer, [In] short[] vx, [In] short[] vy, int n, int s, byte r, byte g, byte b, byte a);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void gfxPrimitivesSetFont([In] byte[] fontdata, uint cw, uint ch);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void gfxPrimitivesSetFontRotation(uint rotation);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int characterColor(IntPtr renderer, short x, short y, char c, uint color);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int characterRGBA(IntPtr renderer, short x, short y, char c, byte r, byte g, byte b, byte a);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int stringColor(IntPtr renderer, short x, short y, string s, uint color);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int stringRGBA(IntPtr renderer, short x, short y, string s, byte r, byte g, byte b, byte a);
#endregion
#region SDL2_rotozoom.h
public const int SMOOTHING_OFF = 0;
public const int SMOOTHING_ON = 1;
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern IntPtr rotozoomSurface(IntPtr src, double angle, double zoom, int smooth);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern IntPtr rotozoomSurfaceXY(IntPtr src, double angle, double zoomx, double zoomy, int smooth);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void rotozoomSurfaceSize(int width, int height, double angle, double zoom, out int dstwidth, out int dstheight);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void rotozoomSurfaceSizeXY(int width, int height, double angle, double zoomx, double zoomy, out int dstwidth, out int dstheight);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern IntPtr zoomSurface(IntPtr src, double zoomx, double zoomy, int smooth);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void zoomSurfaceSize(int width, int height, double zoomx, double zoomy, out int dstwidth, out int dstheight);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern IntPtr shrinkSurface(IntPtr src, int factorx, int factory);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern IntPtr rotateSurface90Degrees(IntPtr src, int numClockwiseTurns);
#endregion
#region SDL2_framerate.h
public const int FPS_UPPER_LIMIT = 200;
public const int FPS_LOWER_LIMIT = 1;
public const int FPS_DEFAULT = 30;
[StructLayout(LayoutKind.Sequential)]
public struct FPSmanager
{
public uint framecount;
public float rateticks;
public uint baseticks;
public uint lastticks;
public uint rate;
}
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void SDL_initFramerate(ref FPSmanager manager);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int SDL_setFramerate(ref FPSmanager manager, uint rate);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int SDL_getFramerate(ref FPSmanager manager);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int SDL_getFramecount(ref FPSmanager manager);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern uint SDL_framerateDelay(ref FPSmanager manager);
#endregion
#region SDL2_imageFilter.h
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int SDL_imageFilterMMXdetect();
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void SDL_imageFilterMMXoff();
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void SDL_imageFilterMMXon();
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int SDL_imageFilterAdd([In] byte[] src1, [In] byte[] src2, [Out] byte[] dest, uint length);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int SDL_imageFilterMean([In] byte[] src1, [In] byte[] src2, [Out] byte[] dest, uint length);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int SDL_imageFilterSub([In] byte[] src1, [In] byte[] src2, [Out] byte[] dest, uint length);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int SDL_imageFilterAbsDiff([In] byte[] src1, [In] byte[] src2, [Out] byte[] dest, uint length);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int SDL_imageFilterMult([In] byte[] src1, [In] byte[] src2, [Out] byte[] dest, uint length);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int SDL_imageFilterMultNor([In] byte[] src1, [In] byte[] src2, [Out] byte[] dest, uint length);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int SDL_imageFilterMultDivby2([In] byte[] src1, [In] byte[] src2, [Out] byte[] dest, uint length);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int SDL_imageFilterMultDivby4([In] byte[] src1, [In] byte[] src2, [Out] byte[] dest, uint length);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int SDL_imageFilterBitAnd([In] byte[] src1, [In] byte[] src2, [Out] byte[] dest, uint length);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int SDL_imageFilterBitOr([In] byte[] src1, [In] byte[] src2, [Out] byte[] dest, uint length);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int SDL_imageFilterDiv([In] byte[] src1, [In] byte[] src2, [Out] byte[] dest, uint length);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int SDL_imageFilterBitNegation([In] byte[] src1, [Out] byte[] dest, uint length);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int SDL_imageFilterAddByte([In] byte[] src1, [Out] byte[] dest, uint length, byte c);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int SDL_imageFilterAddUint([In] byte[] src1, [Out] byte[] dest, uint length, uint c);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int SDL_imageFilterAddByteToHalf([In] byte[] src1, [Out] byte[] dest, uint length, byte c);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int SDL_imageFilterSubByte([In] byte[] src1, [Out] byte[] dest, uint length, byte c);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int SDL_imageFilterSubUint([In] byte[] src1, [Out] byte[] dest, uint length, uint c);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int SDL_imageFilterShiftRight([In] byte[] src1, [Out] byte[] dest, uint length, byte n);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int SDL_imageFilterShiftRightUint([In] byte[] src1, [Out] byte[] dest, uint length, byte n);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int SDL_imageFilterMultByByte([In] byte[] src1, [Out] byte[] dest, uint length, byte c);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int SDL_imageFilterShiftRightAndMultByByte([In] byte[] src1, [Out] byte[] dest, uint length, byte n, byte c);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int SDL_imageFilterShiftLeftByte([In] byte[] src1, [Out] byte[] dest, uint length, byte n);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int SDL_imageFilterShiftLeftUint([In] byte[] src1, [Out] byte[] dest, uint length, byte n);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int SDL_imageFilterShiftLeft([In] byte[] src1, [Out] byte[] dest, uint length, byte n);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int SDL_imageFilterBinarizeUsingThreshold([In] byte[] src1, [Out] byte[] dest, uint length, byte t);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int SDL_imageFilterClipToRange([In] byte[] src1, [Out] byte[] dest, uint length, byte tmin, byte tmax);
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern int SDL_imageFilterNormalizeLinear([In] byte[] src1, [Out] byte[] dest, uint length, int cmin, int cmax, int nmin, int nmax);
#endregion
}
}