Added explicitly the calling convention for calls to the CSFML DLLs, to make SFML.Net compatible with .Net 4.0

git-svn-id: https://sfml.svn.sourceforge.net/svnroot/sfml/branches/sfml2@1517 4e206d99-4929-0410-ac5d-dfc041789085
This commit is contained in:
LaurentGom 2010-04-24 12:52:20 +00:00
parent 7a415eea45
commit a48f71ee8e
19 changed files with 345 additions and 345 deletions

View file

@ -496,100 +496,100 @@ namespace SFML
private View myDefaultView = null;
#region Imports
[DllImport("csfml-graphics"), SuppressUnmanagedCodeSecurity]
[DllImport("csfml-graphics", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
static extern IntPtr sfRenderWindow_Create(VideoMode Mode, string Title, Styles Style, ref ContextSettings Params);
[DllImport("csfml-graphics"), SuppressUnmanagedCodeSecurity]
[DllImport("csfml-graphics", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
static extern IntPtr sfRenderWindow_CreateFromHandle(IntPtr Handle, ref ContextSettings Params);
[DllImport("csfml-graphics"), SuppressUnmanagedCodeSecurity]
[DllImport("csfml-graphics", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
static extern void sfRenderWindow_Destroy(IntPtr This);
[DllImport("csfml-graphics"), SuppressUnmanagedCodeSecurity]
[DllImport("csfml-graphics", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
static extern IntPtr sfRenderWindow_GetInput(IntPtr This);
[DllImport("csfml-graphics"), SuppressUnmanagedCodeSecurity]
[DllImport("csfml-graphics", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
static extern bool sfRenderWindow_IsOpened(IntPtr This);
[DllImport("csfml-graphics"), SuppressUnmanagedCodeSecurity]
[DllImport("csfml-graphics", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
static extern void sfRenderWindow_Close(IntPtr This);
[DllImport("csfml-graphics"), SuppressUnmanagedCodeSecurity]
[DllImport("csfml-graphics", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
static extern bool sfRenderWindow_GetEvent(IntPtr This, out Event Evt);
[DllImport("csfml-graphics"), SuppressUnmanagedCodeSecurity]
[DllImport("csfml-graphics", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
static extern bool sfRenderWindow_WaitEvent(IntPtr This, out Event Evt);
[DllImport("csfml-graphics"), SuppressUnmanagedCodeSecurity]
[DllImport("csfml-graphics", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
static extern void sfRenderWindow_Clear(IntPtr This, Color ClearColor);
[DllImport("csfml-graphics"), SuppressUnmanagedCodeSecurity]
[DllImport("csfml-graphics", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
static extern void sfRenderWindow_Display(IntPtr This);
[DllImport("csfml-graphics"), SuppressUnmanagedCodeSecurity]
[DllImport("csfml-graphics", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
static extern uint sfRenderWindow_GetWidth(IntPtr This);
[DllImport("csfml-graphics"), SuppressUnmanagedCodeSecurity]
[DllImport("csfml-graphics", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
static extern uint sfRenderWindow_GetHeight(IntPtr This);
[DllImport("csfml-graphics"), SuppressUnmanagedCodeSecurity]
[DllImport("csfml-graphics", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
static extern ContextSettings sfRenderWindow_GetSettings(IntPtr This);
[DllImport("csfml-graphics"), SuppressUnmanagedCodeSecurity]
[DllImport("csfml-graphics", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
static extern void sfRenderWindow_UseVerticalSync(IntPtr This, bool Enable);
[DllImport("csfml-graphics"), SuppressUnmanagedCodeSecurity]
[DllImport("csfml-graphics", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
static extern void sfRenderWindow_ShowMouseCursor(IntPtr This, bool Show);
[DllImport("csfml-graphics"), SuppressUnmanagedCodeSecurity]
[DllImport("csfml-graphics", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
static extern void sfRenderWindow_SetCursorPosition(IntPtr This, uint X, uint Y);
[DllImport("csfml-graphics"), SuppressUnmanagedCodeSecurity]
[DllImport("csfml-graphics", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
static extern void sfRenderWindow_SetPosition(IntPtr This, int X, int Y);
[DllImport("csfml-graphics"), SuppressUnmanagedCodeSecurity]
[DllImport("csfml-graphics", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
static extern void sfRenderWindow_SetSize(IntPtr This, uint Width, uint Height);
[DllImport("csfml-graphics"), SuppressUnmanagedCodeSecurity]
[DllImport("csfml-graphics", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
static extern void sfRenderWindow_Show(IntPtr This, bool Show);
[DllImport("csfml-graphics"), SuppressUnmanagedCodeSecurity]
[DllImport("csfml-graphics", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
static extern void sfRenderWindow_EnableKeyRepeat(IntPtr This, bool Enable);
[DllImport("csfml-graphics"), SuppressUnmanagedCodeSecurity]
[DllImport("csfml-graphics", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
unsafe static extern void sfRenderWindow_SetIcon(IntPtr This, uint Width, uint Height, byte* Pixels);
[DllImport("csfml-graphics"), SuppressUnmanagedCodeSecurity]
[DllImport("csfml-graphics", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
static extern bool sfRenderWindow_SetActive(IntPtr This, bool Active);
[DllImport("csfml-graphics"), SuppressUnmanagedCodeSecurity]
[DllImport("csfml-graphics", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
static extern bool sfRenderWindow_SaveGLStates(IntPtr This);
[DllImport("csfml-graphics"), SuppressUnmanagedCodeSecurity]
[DllImport("csfml-graphics", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
static extern bool sfRenderWindow_RestoreGLStates(IntPtr This);
[DllImport("csfml-graphics"), SuppressUnmanagedCodeSecurity]
[DllImport("csfml-graphics", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
static extern void sfRenderWindow_SetFramerateLimit(IntPtr This, uint Limit);
[DllImport("csfml-graphics"), SuppressUnmanagedCodeSecurity]
[DllImport("csfml-graphics", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
static extern float sfRenderWindow_GetFrameTime(IntPtr This);
[DllImport("csfml-graphics"), SuppressUnmanagedCodeSecurity]
[DllImport("csfml-graphics", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
static extern void sfRenderWindow_SetJoystickThreshold(IntPtr This, float Threshold);
[DllImport("csfml-graphics"), SuppressUnmanagedCodeSecurity]
[DllImport("csfml-graphics", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
static extern void sfRenderWindow_SetView(IntPtr This, IntPtr View);
[DllImport("csfml-graphics"), SuppressUnmanagedCodeSecurity]
[DllImport("csfml-graphics", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
static extern IntPtr sfRenderWindow_GetView(IntPtr This);
[DllImport("csfml-graphics"), SuppressUnmanagedCodeSecurity]
[DllImport("csfml-graphics", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
static extern IntPtr sfRenderWindow_GetDefaultView(IntPtr This);
[DllImport("csfml-graphics"), SuppressUnmanagedCodeSecurity]
[DllImport("csfml-graphics", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
static extern IntRect sfRenderWindow_GetViewport(IntPtr This, IntPtr TargetView);
[DllImport("csfml-graphics"), SuppressUnmanagedCodeSecurity]
[DllImport("csfml-graphics", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
static extern void sfRenderWindow_ConvertCoords(IntPtr This, uint WindowX, uint WindowY, out float ViewX, out float ViewY, IntPtr TargetView);
#endregion