mirror of
https://github.com/Ryujinx/Opentk.git
synced 2025-01-12 00:55:35 +00:00
Suppressed a large amount of warnings for unused methods / fields in the platform bindings.
Replaced tab stops with spaces.
This commit is contained in:
parent
39710404ee
commit
8da8023c97
|
@ -13,6 +13,8 @@ using System.Runtime.InteropServices;
|
||||||
|
|
||||||
namespace OpenTK.Platform.MacOS
|
namespace OpenTK.Platform.MacOS
|
||||||
{
|
{
|
||||||
|
#pragma warning disable 0169
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Macintosh device type.
|
** Macintosh device type.
|
||||||
*/
|
*/
|
||||||
|
@ -35,19 +37,19 @@ namespace OpenTK.Platform.MacOS
|
||||||
|
|
||||||
unsafe static partial class Agl
|
unsafe static partial class Agl
|
||||||
{
|
{
|
||||||
|
|
||||||
const string agl = "/System/Library/Frameworks/AGL.framework/Versions/Current/AGL";
|
const string agl = "/System/Library/Frameworks/AGL.framework/Versions/Current/AGL";
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** AGL API version.
|
** AGL API version.
|
||||||
*/
|
*/
|
||||||
const int AGL_VERSION_2_0 = 1;
|
const int AGL_VERSION_2_0 = 1;
|
||||||
|
|
||||||
/************************************************************************/
|
/************************************************************************/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Attribute names for aglChoosePixelFormat and aglDescribePixelFormat.
|
** Attribute names for aglChoosePixelFormat and aglDescribePixelFormat.
|
||||||
*/
|
*/
|
||||||
internal enum PixelFormatAttribute
|
internal enum PixelFormatAttribute
|
||||||
{
|
{
|
||||||
AGL_NONE = 0,
|
AGL_NONE = 0,
|
||||||
|
@ -82,8 +84,8 @@ namespace OpenTK.Platform.MacOS
|
||||||
AGL_SAMPLE_ALPHA = 61,
|
AGL_SAMPLE_ALPHA = 61,
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
** Extended attributes
|
** Extended attributes
|
||||||
*/
|
*/
|
||||||
internal enum ExtendedAttribute
|
internal enum ExtendedAttribute
|
||||||
{
|
{
|
||||||
AGL_PIXEL_SIZE = 50, /* frame buffer bits per pixel */
|
AGL_PIXEL_SIZE = 50, /* frame buffer bits per pixel */
|
||||||
|
@ -100,8 +102,8 @@ namespace OpenTK.Platform.MacOS
|
||||||
AGL_SAMPLE_ALPHA = 61, /* request alpha filtering */
|
AGL_SAMPLE_ALPHA = 61, /* request alpha filtering */
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
** Renderer management
|
** Renderer management
|
||||||
*/
|
*/
|
||||||
internal enum RendererManagement
|
internal enum RendererManagement
|
||||||
{
|
{
|
||||||
AGL_RENDERER_ID = 70, /* request renderer by ID */
|
AGL_RENDERER_ID = 70, /* request renderer by ID */
|
||||||
|
@ -119,11 +121,11 @@ namespace OpenTK.Platform.MacOS
|
||||||
AGL_COMPLIANT = 83, /* renderer is opengl compliant */
|
AGL_COMPLIANT = 83, /* renderer is opengl compliant */
|
||||||
|
|
||||||
AGL_PBUFFER = 90, /* can be used to render to a pbuffer */
|
AGL_PBUFFER = 90, /* can be used to render to a pbuffer */
|
||||||
AGL_REMOTE_PBUFFER = 91, /* can be used to render offline to a pbuffer */
|
AGL_REMOTE_PBUFFER = 91, /* can be used to render offline to a pbuffer */
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
** Property names for aglDescribeRenderer
|
** Property names for aglDescribeRenderer
|
||||||
*/
|
*/
|
||||||
internal enum RendererProperties
|
internal enum RendererProperties
|
||||||
{
|
{
|
||||||
/* const int AGL_OFFSCREEN = 53 */
|
/* const int AGL_OFFSCREEN = 53 */
|
||||||
|
@ -150,8 +152,8 @@ namespace OpenTK.Platform.MacOS
|
||||||
AGL_RENDERER_COUNT = 128,
|
AGL_RENDERER_COUNT = 128,
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
** Integer parameter names
|
** Integer parameter names
|
||||||
*/
|
*/
|
||||||
internal enum ParameterNames
|
internal enum ParameterNames
|
||||||
{
|
{
|
||||||
AGL_SWAP_RECT = 200, /* Enable or set the swap rectangle */
|
AGL_SWAP_RECT = 200, /* Enable or set the swap rectangle */
|
||||||
|
@ -175,8 +177,8 @@ namespace OpenTK.Platform.MacOS
|
||||||
AGL_SURFACE_VOLATILE = 306, /* Flag surface to candidate for deletion */
|
AGL_SURFACE_VOLATILE = 306, /* Flag surface to candidate for deletion */
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
** Option names for aglConfigure.
|
** Option names for aglConfigure.
|
||||||
*/
|
*/
|
||||||
internal enum OptionName
|
internal enum OptionName
|
||||||
{
|
{
|
||||||
AGL_FORMAT_CACHE_SIZE = 501, /* Set the size of the pixel format cache */
|
AGL_FORMAT_CACHE_SIZE = 501, /* Set the size of the pixel format cache */
|
||||||
|
@ -212,7 +214,7 @@ namespace OpenTK.Platform.MacOS
|
||||||
AGL_64_BIT = 0x00004000,
|
AGL_64_BIT = 0x00004000,
|
||||||
AGL_96_BIT = 0x00008000,
|
AGL_96_BIT = 0x00008000,
|
||||||
AGL_128_BIT = 0x00010000,
|
AGL_128_BIT = 0x00010000,
|
||||||
}
|
}
|
||||||
/* color modes */
|
/* color modes */
|
||||||
internal enum ColorModes
|
internal enum ColorModes
|
||||||
{
|
{
|
||||||
|
@ -241,7 +243,7 @@ namespace OpenTK.Platform.MacOS
|
||||||
AGL_RGB161616_BIT = 0x00400000, /* 64 rgb bit/pixel, R=47:32, G=31:16, B=15:0 */
|
AGL_RGB161616_BIT = 0x00400000, /* 64 rgb bit/pixel, R=47:32, G=31:16, B=15:0 */
|
||||||
AGL_ARGB16161616_BIT = 0x00800000, /* 64 argb bit/pixel, A=63:48, R=47:32, G=31:16, B=15:0 */
|
AGL_ARGB16161616_BIT = 0x00800000, /* 64 argb bit/pixel, A=63:48, R=47:32, G=31:16, B=15:0 */
|
||||||
AGL_INDEX8_BIT = 0x20000000, /* 8 bit color look up table (deprecated) */
|
AGL_INDEX8_BIT = 0x20000000, /* 8 bit color look up table (deprecated) */
|
||||||
AGL_INDEX16_BIT = 0x40000000, /* 16 bit color look up table (deprecated) */
|
AGL_INDEX16_BIT = 0x40000000, /* 16 bit color look up table (deprecated) */
|
||||||
AGL_RGBFLOAT64_BIT = 0x01000000, /* 64 rgb bit/pixel, half float */
|
AGL_RGBFLOAT64_BIT = 0x01000000, /* 64 rgb bit/pixel, half float */
|
||||||
AGL_RGBAFLOAT64_BIT = 0x02000000, /* 64 argb bit/pixel, half float */
|
AGL_RGBAFLOAT64_BIT = 0x02000000, /* 64 argb bit/pixel, half float */
|
||||||
AGL_RGBFLOAT128_BIT = 0x04000000, /* 128 rgb bit/pixel, ieee float */
|
AGL_RGBFLOAT128_BIT = 0x04000000, /* 128 rgb bit/pixel, ieee float */
|
||||||
|
@ -250,12 +252,12 @@ namespace OpenTK.Platform.MacOS
|
||||||
AGL_RGBAFLOAT256_BIT = 0x20000000, /* 256 argb bit/pixel, ieee double */
|
AGL_RGBAFLOAT256_BIT = 0x20000000, /* 256 argb bit/pixel, ieee double */
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
** Error return values from aglGetError.
|
** Error return values from aglGetError.
|
||||||
*/
|
*/
|
||||||
internal enum AglError
|
internal enum AglError
|
||||||
{
|
{
|
||||||
NoError = 0, /* no error */
|
NoError = 0, /* no error */
|
||||||
|
|
||||||
BadAttribute = 10000, /* invalid pixel format attribute */
|
BadAttribute = 10000, /* invalid pixel format attribute */
|
||||||
BadProperty = 10001, /* invalid renderer property */
|
BadProperty = 10001, /* invalid renderer property */
|
||||||
BadPixelFormat = 10002, /* invalid pixel format */
|
BadPixelFormat = 10002, /* invalid pixel format */
|
||||||
|
@ -276,40 +278,40 @@ namespace OpenTK.Platform.MacOS
|
||||||
BadConnection = 10017, /* invalid CoreGraphics connection */
|
BadConnection = 10017, /* invalid CoreGraphics connection */
|
||||||
}
|
}
|
||||||
/************************************************************************/
|
/************************************************************************/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Pixel format functions
|
** Pixel format functions
|
||||||
*/
|
*/
|
||||||
[DllImport(agl)] internal static extern AGLPixelFormat aglChoosePixelFormat(ref AGLDevice gdevs, int ndev, int []attribs);
|
[DllImport(agl)] internal static extern AGLPixelFormat aglChoosePixelFormat(ref AGLDevice gdevs, int ndev, int []attribs);
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Use this overload only with IntPtr.Zero for the first argument.
|
/// Use this overload only with IntPtr.Zero for the first argument.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="gdevs">
|
/// <param name="gdevs">
|
||||||
/// </param>
|
/// </param>
|
||||||
/// <param name="ndev">
|
/// <param name="ndev">
|
||||||
/// </param>
|
/// </param>
|
||||||
/// <param name="attribs">
|
/// <param name="attribs">
|
||||||
/// </param>
|
/// </param>
|
||||||
/// <returns>
|
/// <returns>
|
||||||
/// </returns>
|
/// </returns>
|
||||||
[DllImport(agl)] internal static extern AGLPixelFormat aglChoosePixelFormat(IntPtr gdevs, int ndev, int []attribs);
|
[DllImport(agl)] internal static extern AGLPixelFormat aglChoosePixelFormat(IntPtr gdevs, int ndev, int []attribs);
|
||||||
[DllImport(agl)] internal static extern void aglDestroyPixelFormat(AGLPixelFormat pix);
|
[DllImport(agl)] internal static extern void aglDestroyPixelFormat(AGLPixelFormat pix);
|
||||||
[DllImport(agl)] internal static extern AGLPixelFormat aglNextPixelFormat(AGLPixelFormat pix);
|
[DllImport(agl)] internal static extern AGLPixelFormat aglNextPixelFormat(AGLPixelFormat pix);
|
||||||
[DllImport(agl)] static extern byte aglDescribePixelFormat(AGLPixelFormat pix, int attrib, out int value);
|
[DllImport(agl)] static extern byte aglDescribePixelFormat(AGLPixelFormat pix, int attrib, out int value);
|
||||||
[Obsolete("Use aglDisplaysOfPixelFormat instead.")]
|
[Obsolete("Use aglDisplaysOfPixelFormat instead.")]
|
||||||
[DllImport(agl)] static extern AGLDevice *aglDevicesOfPixelFormat(AGLPixelFormat pix, int *ndevs);
|
[DllImport(agl)] static extern AGLDevice *aglDevicesOfPixelFormat(AGLPixelFormat pix, int *ndevs);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Renderer information functions
|
** Renderer information functions
|
||||||
*/
|
*/
|
||||||
[DllImport(agl)] static extern AGLRendererInfo aglQueryRendererInfo(AGLDevice[] gdevs, int ndev);
|
[DllImport(agl)] static extern AGLRendererInfo aglQueryRendererInfo(AGLDevice[] gdevs, int ndev);
|
||||||
[DllImport(agl)] static extern void aglDestroyRendererInfo(AGLRendererInfo rend);
|
[DllImport(agl)] static extern void aglDestroyRendererInfo(AGLRendererInfo rend);
|
||||||
[DllImport(agl)] static extern AGLRendererInfo aglNextRendererInfo(AGLRendererInfo rend);
|
[DllImport(agl)] static extern AGLRendererInfo aglNextRendererInfo(AGLRendererInfo rend);
|
||||||
[DllImport(agl)] static extern byte aglDescribeRenderer(AGLRendererInfo rend, int prop, out int value);
|
[DllImport(agl)] static extern byte aglDescribeRenderer(AGLRendererInfo rend, int prop, out int value);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Context functions
|
** Context functions
|
||||||
*/
|
*/
|
||||||
[DllImport(agl)] internal static extern AGLContext aglCreateContext(AGLPixelFormat pix, AGLContext share);
|
[DllImport(agl)] internal static extern AGLContext aglCreateContext(AGLPixelFormat pix, AGLContext share);
|
||||||
[DllImport(agl,EntryPoint="aglDestroyContext")] static extern byte _aglDestroyContext(AGLContext ctx);
|
[DllImport(agl,EntryPoint="aglDestroyContext")] static extern byte _aglDestroyContext(AGLContext ctx);
|
||||||
internal static bool aglDestroyContext(AGLContext context)
|
internal static bool aglDestroyContext(AGLContext context)
|
||||||
|
@ -339,11 +341,11 @@ namespace OpenTK.Platform.MacOS
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
[DllImport(agl)] internal static extern AGLContext aglGetCurrentContext();
|
[DllImport(agl)] internal static extern AGLContext aglGetCurrentContext();
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Drawable Functions
|
** Drawable Functions
|
||||||
*/
|
*/
|
||||||
[DllImport(agl,EntryPoint="aglSetDrawable")]
|
[DllImport(agl,EntryPoint="aglSetDrawable")]
|
||||||
static extern byte _aglSetDrawable(AGLContext ctx, AGLDrawable draw);
|
static extern byte _aglSetDrawable(AGLContext ctx, AGLDrawable draw);
|
||||||
|
|
||||||
|
@ -379,29 +381,29 @@ namespace OpenTK.Platform.MacOS
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
** Virtual screen functions
|
** Virtual screen functions
|
||||||
*/
|
*/
|
||||||
[DllImport(agl)] static extern byte aglSetVirtualScreen(AGLContext ctx, int screen);
|
[DllImport(agl)] static extern byte aglSetVirtualScreen(AGLContext ctx, int screen);
|
||||||
[DllImport(agl)] static extern int aglGetVirtualScreen(AGLContext ctx);
|
[DllImport(agl)] static extern int aglGetVirtualScreen(AGLContext ctx);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Obtain version numbers
|
** Obtain version numbers
|
||||||
*/
|
*/
|
||||||
[DllImport(agl)] static extern void aglGetVersion(int *major, int *minor);
|
[DllImport(agl)] static extern void aglGetVersion(int *major, int *minor);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Global library options
|
** Global library options
|
||||||
*/
|
*/
|
||||||
[DllImport(agl)] static extern byte aglConfigure(GLenum pname, uint param);
|
[DllImport(agl)] static extern byte aglConfigure(GLenum pname, uint param);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Swap functions
|
** Swap functions
|
||||||
*/
|
*/
|
||||||
[DllImport(agl)] internal static extern void aglSwapBuffers(AGLContext ctx);
|
[DllImport(agl)] internal static extern void aglSwapBuffers(AGLContext ctx);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Per context options
|
** Per context options
|
||||||
*/
|
*/
|
||||||
[DllImport(agl)] internal static extern byte aglEnable(AGLContext ctx, ParameterNames pname);
|
[DllImport(agl)] internal static extern byte aglEnable(AGLContext ctx, ParameterNames pname);
|
||||||
[DllImport(agl)] internal static extern byte aglDisable(AGLContext ctx, ParameterNames pname);
|
[DllImport(agl)] internal static extern byte aglDisable(AGLContext ctx, ParameterNames pname);
|
||||||
[DllImport(agl)] static extern byte aglIsEnabled(AGLContext ctx, GLenum pname);
|
[DllImport(agl)] static extern byte aglIsEnabled(AGLContext ctx, GLenum pname);
|
||||||
|
@ -413,50 +415,51 @@ namespace OpenTK.Platform.MacOS
|
||||||
static extern byte aglGetInteger(AGLContext ctx, GLenum pname, int* @params);
|
static extern byte aglGetInteger(AGLContext ctx, GLenum pname, int* @params);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Font function
|
** Font function
|
||||||
*/
|
*/
|
||||||
// TODO: face parameter should be of type StyleParameter in QuickDraw.
|
// TODO: face parameter should be of type StyleParameter in QuickDraw.
|
||||||
[DllImport(agl)] static extern byte aglUseFont(AGLContext ctx, int fontID, int face, int size, int first, int count, int @base);
|
[DllImport(agl)] static extern byte aglUseFont(AGLContext ctx, int fontID, int face, int size, int first, int count, int @base);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Error functions
|
** Error functions
|
||||||
*/
|
*/
|
||||||
[DllImport(agl,EntryPoint="aglGetError")] internal static extern AglError GetError();
|
[DllImport(agl,EntryPoint="aglGetError")] internal static extern AglError GetError();
|
||||||
[DllImport(agl,EntryPoint="aglErrorString")] static extern IntPtr _aglErrorString(AglError code);
|
[DllImport(agl,EntryPoint="aglErrorString")] static extern IntPtr _aglErrorString(AglError code);
|
||||||
internal static string ErrorString(AglError code)
|
internal static string ErrorString(AglError code)
|
||||||
{
|
{
|
||||||
return Marshal.PtrToStringAnsi(_aglErrorString(code));
|
return Marshal.PtrToStringAnsi(_aglErrorString(code));
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Soft reset function
|
** Soft reset function
|
||||||
*/
|
*/
|
||||||
[DllImport(agl)] static extern void aglResetLibrary();
|
[DllImport(agl)] static extern void aglResetLibrary();
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Surface texture function
|
** Surface texture function
|
||||||
*/
|
*/
|
||||||
[DllImport(agl)] static extern void aglSurfaceTexture (AGLContext context, GLenum target, GLenum internalformat, AGLContext surfacecontext) ;
|
[DllImport(agl)] static extern void aglSurfaceTexture (AGLContext context, GLenum target, GLenum internalformat, AGLContext surfacecontext) ;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** PBuffer functions
|
** PBuffer functions
|
||||||
*/
|
*/
|
||||||
[DllImport(agl)] static extern byte aglCreatePBuffer (int width, int height, GLenum target, GLenum internalFormat, long max_level, AGLPbuffer *pbuffer);
|
[DllImport(agl)] static extern byte aglCreatePBuffer (int width, int height, GLenum target, GLenum internalFormat, long max_level, AGLPbuffer *pbuffer);
|
||||||
[DllImport(agl)] static extern byte aglDestroyPBuffer (AGLPbuffer pbuffer);
|
[DllImport(agl)] static extern byte aglDestroyPBuffer (AGLPbuffer pbuffer);
|
||||||
[DllImport(agl)] static extern byte aglDescribePBuffer (AGLPbuffer pbuffer, int *width, int *height, GLenum *target, GLenum *internalFormat, int *max_level);
|
[DllImport(agl)] static extern byte aglDescribePBuffer (AGLPbuffer pbuffer, int *width, int *height, GLenum *target, GLenum *internalFormat, int *max_level);
|
||||||
[DllImport(agl)] static extern byte aglTexImagePBuffer (AGLContext ctx, AGLPbuffer pbuffer, int source);
|
[DllImport(agl)] static extern byte aglTexImagePBuffer (AGLContext ctx, AGLPbuffer pbuffer, int source);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Pbuffer Drawable Functions
|
** Pbuffer Drawable Functions
|
||||||
*/
|
*/
|
||||||
[DllImport(agl)] static extern byte aglSetPBuffer (AGLContext ctx, AGLPbuffer pbuffer, int face, int level, int screen) ;
|
[DllImport(agl)] static extern byte aglSetPBuffer (AGLContext ctx, AGLPbuffer pbuffer, int face, int level, int screen) ;
|
||||||
[DllImport(agl)] static extern byte aglGetPBuffer (AGLContext ctx, AGLPbuffer *pbuffer, int *face, int *level, int *screen) ;
|
[DllImport(agl)] static extern byte aglGetPBuffer (AGLContext ctx, AGLPbuffer *pbuffer, int *face, int *level, int *screen) ;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** CGL functions
|
** CGL functions
|
||||||
*/
|
*/
|
||||||
[DllImport(agl)] static extern byte aglGetCGLContext(AGLContext ctx, void **cgl_ctx) ;
|
[DllImport(agl)] static extern byte aglGetCGLContext(AGLContext ctx, void **cgl_ctx) ;
|
||||||
[DllImport(agl)] static extern byte aglGetCGLPixelFormat(AGLPixelFormat pix, void **cgl_pix);
|
[DllImport(agl)] static extern byte aglGetCGLPixelFormat(AGLPixelFormat pix, void **cgl_pix);
|
||||||
|
|
||||||
}
|
#pragma warning restore 0169
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -45,36 +45,36 @@ namespace OpenTK.Platform.MacOS.Carbon
|
||||||
right = (short)(_left + _width);
|
right = (short)(_left + _width);
|
||||||
}
|
}
|
||||||
|
|
||||||
internal short X
|
internal short X
|
||||||
{
|
{
|
||||||
get { return left; }
|
get { return left; }
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
short width = Width;
|
short width = Width;
|
||||||
left = value;
|
left = value;
|
||||||
right = (short)(left + width);
|
right = (short)(left + width);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
internal short Y
|
internal short Y
|
||||||
{
|
{
|
||||||
get { return top; }
|
get { return top; }
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
short height = Height;
|
short height = Height;
|
||||||
top = value;
|
top = value;
|
||||||
bottom = (short)(top + height);
|
bottom = (short)(top + height);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
internal short Width
|
internal short Width
|
||||||
{
|
{
|
||||||
get { return (short)(right - left); }
|
get { return (short)(right - left); }
|
||||||
set { right = (short)(left + value); }
|
set { right = (short)(left + value); }
|
||||||
}
|
}
|
||||||
internal short Height
|
internal short Height
|
||||||
{
|
{
|
||||||
get { return (short)(bottom - top); }
|
get { return (short)(bottom - top); }
|
||||||
set { bottom = (short)(top + value); }
|
set { bottom = (short)(top + value); }
|
||||||
}
|
}
|
||||||
|
|
||||||
public override string ToString()
|
public override string ToString()
|
||||||
{
|
{
|
||||||
|
@ -792,15 +792,15 @@ namespace OpenTK.Platform.MacOS.Carbon
|
||||||
|
|
||||||
[DllImport(carbon,EntryPoint="ChangeWindowAttributes")]
|
[DllImport(carbon,EntryPoint="ChangeWindowAttributes")]
|
||||||
static extern OSStatus _ChangeWindowAttributes(IntPtr windowRef, WindowAttributes setTheseAttributes, WindowAttributes clearTheseAttributes);
|
static extern OSStatus _ChangeWindowAttributes(IntPtr windowRef, WindowAttributes setTheseAttributes, WindowAttributes clearTheseAttributes);
|
||||||
internal static void ChangeWindowAttributes(IntPtr windowRef, WindowAttributes setTheseAttributes, WindowAttributes clearTheseAttributes)
|
internal static void ChangeWindowAttributes(IntPtr windowRef, WindowAttributes setTheseAttributes, WindowAttributes clearTheseAttributes)
|
||||||
{
|
{
|
||||||
OSStatus error = _ChangeWindowAttributes(windowRef, setTheseAttributes, clearTheseAttributes);
|
OSStatus error = _ChangeWindowAttributes(windowRef, setTheseAttributes, clearTheseAttributes);
|
||||||
|
|
||||||
if (error != OSStatus.NoError)
|
if (error != OSStatus.NoError)
|
||||||
{
|
{
|
||||||
throw new MacOSException(error);
|
throw new MacOSException(error);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[DllImport(carbon)]
|
[DllImport(carbon)]
|
||||||
static extern IntPtr __CFStringMakeConstantString(string cStr);
|
static extern IntPtr __CFStringMakeConstantString(string cStr);
|
||||||
|
@ -876,7 +876,7 @@ namespace OpenTK.Platform.MacOS.Carbon
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -18,11 +18,11 @@ using System.Security;
|
||||||
|
|
||||||
#pragma warning disable 3019 // CLS-compliance checking
|
#pragma warning disable 3019 // CLS-compliance checking
|
||||||
#pragma warning disable 0649 // struct members not explicitly initialized
|
#pragma warning disable 0649 // struct members not explicitly initialized
|
||||||
|
#pragma warning disable 0169 // field / method is never used.
|
||||||
|
#pragma warning disable 0414 // field assigned but never used.
|
||||||
|
|
||||||
namespace OpenTK.Platform.Windows
|
namespace OpenTK.Platform.Windows
|
||||||
{
|
{
|
||||||
#pragma warning disable 3019
|
|
||||||
|
|
||||||
#region Type aliases
|
#region Type aliases
|
||||||
|
|
||||||
using HWND = System.IntPtr;
|
using HWND = System.IntPtr;
|
||||||
|
@ -296,7 +296,7 @@ namespace OpenTK.Platform.Windows
|
||||||
/// <returns>
|
/// <returns>
|
||||||
/// Nonzero indicates that the function retrieves a message other than WM_QUIT.
|
/// Nonzero indicates that the function retrieves a message other than WM_QUIT.
|
||||||
/// Zero indicates that the function retrieves the WM_QUIT message, or that lpMsg is an invalid pointer.
|
/// Zero indicates that the function retrieves the WM_QUIT message, or that lpMsg is an invalid pointer.
|
||||||
/// –1 indicates that an error occurred — for example, the function fails if hWnd is an invalid window handle.
|
/// 1 indicates that an error occurred for example, the function fails if hWnd is an invalid window handle.
|
||||||
/// To get extended error information, call GetLastError.
|
/// To get extended error information, call GetLastError.
|
||||||
/// </returns>
|
/// </returns>
|
||||||
[System.Security.SuppressUnmanagedCodeSecurity]
|
[System.Security.SuppressUnmanagedCodeSecurity]
|
||||||
|
@ -1431,8 +1431,6 @@ namespace OpenTK.Platform.Windows
|
||||||
|
|
||||||
#region PixelFormatDescriptor
|
#region PixelFormatDescriptor
|
||||||
|
|
||||||
#pragma warning disable 0169
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Describes a pixel format. It is used when interfacing with the WINAPI to create a new Context.
|
/// Describes a pixel format. It is used when interfacing with the WINAPI to create a new Context.
|
||||||
/// Found in WinGDI.h
|
/// Found in WinGDI.h
|
||||||
|
@ -1468,8 +1466,6 @@ namespace OpenTK.Platform.Windows
|
||||||
internal int DamageMask;
|
internal int DamageMask;
|
||||||
}
|
}
|
||||||
|
|
||||||
#pragma warning restore 0169
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region internal class LayerPlaneDescriptor
|
#region internal class LayerPlaneDescriptor
|
||||||
|
@ -1481,31 +1477,31 @@ namespace OpenTK.Platform.Windows
|
||||||
internal struct LayerPlaneDescriptor
|
internal struct LayerPlaneDescriptor
|
||||||
{
|
{
|
||||||
internal static readonly WORD Size = (WORD)Marshal.SizeOf(typeof(LayerPlaneDescriptor));
|
internal static readonly WORD Size = (WORD)Marshal.SizeOf(typeof(LayerPlaneDescriptor));
|
||||||
internal WORD Version;
|
internal WORD Version;
|
||||||
internal DWORD Flags;
|
internal DWORD Flags;
|
||||||
internal BYTE PixelType;
|
internal BYTE PixelType;
|
||||||
internal BYTE ColorBits;
|
internal BYTE ColorBits;
|
||||||
internal BYTE RedBits;
|
internal BYTE RedBits;
|
||||||
internal BYTE RedShift;
|
internal BYTE RedShift;
|
||||||
internal BYTE GreenBits;
|
internal BYTE GreenBits;
|
||||||
internal BYTE GreenShift;
|
internal BYTE GreenShift;
|
||||||
internal BYTE BlueBits;
|
internal BYTE BlueBits;
|
||||||
internal BYTE BlueShift;
|
internal BYTE BlueShift;
|
||||||
internal BYTE AlphaBits;
|
internal BYTE AlphaBits;
|
||||||
internal BYTE AlphaShift;
|
internal BYTE AlphaShift;
|
||||||
internal BYTE AccumBits;
|
internal BYTE AccumBits;
|
||||||
internal BYTE AccumRedBits;
|
internal BYTE AccumRedBits;
|
||||||
internal BYTE AccumGreenBits;
|
internal BYTE AccumGreenBits;
|
||||||
internal BYTE AccumBlueBits;
|
internal BYTE AccumBlueBits;
|
||||||
internal BYTE AccumAlphaBits;
|
internal BYTE AccumAlphaBits;
|
||||||
internal BYTE DepthBits;
|
internal BYTE DepthBits;
|
||||||
internal BYTE StencilBits;
|
internal BYTE StencilBits;
|
||||||
internal BYTE AuxBuffers;
|
internal BYTE AuxBuffers;
|
||||||
internal BYTE LayerPlane;
|
internal BYTE LayerPlane;
|
||||||
BYTE Reserved;
|
BYTE Reserved;
|
||||||
internal COLORREF crTransparent;
|
internal COLORREF crTransparent;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region GlyphMetricsFloat
|
#region GlyphMetricsFloat
|
||||||
|
@ -3416,15 +3412,15 @@ namespace OpenTK.Platform.Windows
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Windows 2000 and higher only.
|
/// Windows 2000 and higher only.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
XBUTTONDOWN = 0x020B,
|
XBUTTONDOWN = 0x020B,
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Windows 2000 and higher only.
|
/// Windows 2000 and higher only.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
XBUTTONUP = 0x020C,
|
XBUTTONUP = 0x020C,
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Windows 2000 and higher only.
|
/// Windows 2000 and higher only.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
XBUTTONDBLCLK = 0x020D,
|
XBUTTONDBLCLK = 0x020D,
|
||||||
PARENTNOTIFY = 0x0210,
|
PARENTNOTIFY = 0x0210,
|
||||||
ENTERMENULOOP = 0x0211,
|
ENTERMENULOOP = 0x0211,
|
||||||
EXITMENULOOP = 0x0212,
|
EXITMENULOOP = 0x0212,
|
||||||
|
@ -3716,3 +3712,8 @@ namespace OpenTK.Platform.Windows
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#pragma warning restore 3019
|
||||||
|
#pragma warning restore 0649
|
||||||
|
#pragma warning restore 0169
|
||||||
|
#pragma warning restore 0414
|
|
@ -11,6 +11,11 @@ using System.Text;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
|
|
||||||
|
#pragma warning disable 3019 // CLS-compliance checking
|
||||||
|
#pragma warning disable 0649 // struct members not explicitly initialized
|
||||||
|
#pragma warning disable 0169 // field / method is never used.
|
||||||
|
#pragma warning disable 0414 // field assigned but never used.
|
||||||
|
|
||||||
namespace OpenTK.Platform.X11
|
namespace OpenTK.Platform.X11
|
||||||
{
|
{
|
||||||
#region Types
|
#region Types
|
||||||
|
@ -700,22 +705,16 @@ XF86VidModeGetGammaRampSize(
|
||||||
|
|
||||||
#region internal struct XRRScreenSize
|
#region internal struct XRRScreenSize
|
||||||
|
|
||||||
#pragma warning disable 0169, 0649
|
|
||||||
|
|
||||||
internal struct XRRScreenSize
|
internal struct XRRScreenSize
|
||||||
{
|
{
|
||||||
internal int Width, Height;
|
internal int Width, Height;
|
||||||
internal int MWidth, MHeight;
|
internal int MWidth, MHeight;
|
||||||
};
|
};
|
||||||
|
|
||||||
#pragma warning restore 0169, 0649
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region unsafe internal struct Screen
|
#region unsafe internal struct Screen
|
||||||
|
|
||||||
#pragma warning disable 0169
|
|
||||||
|
|
||||||
unsafe internal struct Screen
|
unsafe internal struct Screen
|
||||||
{
|
{
|
||||||
XExtData ext_data; /* hook for extension to hang buffer */
|
XExtData ext_data; /* hook for extension to hang buffer */
|
||||||
|
@ -737,14 +736,10 @@ XF86VidModeGetGammaRampSize(
|
||||||
long root_input_mask; /* initial root input mask */
|
long root_input_mask; /* initial root input mask */
|
||||||
}
|
}
|
||||||
|
|
||||||
#pragma warning restore 0169
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region unsafe internal class XExtData
|
#region unsafe internal class XExtData
|
||||||
|
|
||||||
#pragma warning disable 0169, 0649
|
|
||||||
|
|
||||||
unsafe internal class XExtData
|
unsafe internal class XExtData
|
||||||
{
|
{
|
||||||
int number; /* number returned by XRegisterExtension */
|
int number; /* number returned by XRegisterExtension */
|
||||||
|
@ -754,8 +749,6 @@ XF86VidModeGetGammaRampSize(
|
||||||
XPointer private_data; /* buffer private to this extension. */
|
XPointer private_data; /* buffer private to this extension. */
|
||||||
};
|
};
|
||||||
|
|
||||||
#pragma warning restore 0169, 0649
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Motif
|
#region Motif
|
||||||
|
@ -1593,3 +1586,8 @@ XF86VidModeGetGammaRampSize(
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#pragma warning restore 3019
|
||||||
|
#pragma warning restore 0649
|
||||||
|
#pragma warning restore 0169
|
||||||
|
#pragma warning restore 0414
|
Loading…
Reference in a new issue