00001 namespace OpenTK.Platform.Windows
00002 {
00003 using System;
00004 using System.Runtime.InteropServices;
00005 #pragma warning disable 3019
00006 #pragma warning disable 1591
00007
00008 partial class Wgl
00009 {
00010
00011 internal static partial class Imports
00012 {
00013
00014 [System.Security.SuppressUnmanagedCodeSecurity()]
00015 [System.Runtime.InteropServices.DllImport(Wgl.Library, EntryPoint = "wglCreateContext", ExactSpelling = true, SetLastError=true)]
00016 internal extern static IntPtr CreateContext(IntPtr hDc);
00017 [System.Security.SuppressUnmanagedCodeSecurity()]
00018 [System.Runtime.InteropServices.DllImport(Wgl.Library, EntryPoint = "wglDeleteContext", ExactSpelling = true, SetLastError = true)]
00019 internal extern static Boolean DeleteContext(IntPtr oldContext);
00020 [System.Security.SuppressUnmanagedCodeSecurity()]
00021 [System.Runtime.InteropServices.DllImport(Wgl.Library, EntryPoint = "wglGetCurrentContext", ExactSpelling = true, SetLastError=true)]
00022 internal extern static IntPtr GetCurrentContext();
00023 [System.Security.SuppressUnmanagedCodeSecurity()]
00024 [System.Runtime.InteropServices.DllImport(Wgl.Library, EntryPoint = "wglMakeCurrent", ExactSpelling = true, SetLastError=true)]
00025 internal extern static Boolean MakeCurrent(IntPtr hDc, IntPtr newContext);
00026 [System.Security.SuppressUnmanagedCodeSecurity()]
00027 [System.Runtime.InteropServices.DllImport(Wgl.Library, EntryPoint = "wglCopyContext", ExactSpelling = true, SetLastError = true)]
00028 internal extern static Boolean CopyContext(IntPtr hglrcSrc, IntPtr hglrcDst, UInt32 mask);
00029 [System.Security.SuppressUnmanagedCodeSecurity()]
00030 [System.Runtime.InteropServices.DllImport(Wgl.Library, EntryPoint = "wglChoosePixelFormat", ExactSpelling = true, SetLastError = true)]
00031 internal extern static unsafe int ChoosePixelFormat(IntPtr hDc, PixelFormatDescriptor* pPfd);
00032 [System.Security.SuppressUnmanagedCodeSecurity()]
00033 [System.Runtime.InteropServices.DllImport(Wgl.Library, EntryPoint = "wglDescribePixelFormat", ExactSpelling = true, SetLastError = true)]
00034 internal extern static unsafe int DescribePixelFormat(IntPtr hdc, int ipfd, UInt32 cjpfd, PixelFormatDescriptor* ppfd);
00035 [System.Security.SuppressUnmanagedCodeSecurity()]
00036 [System.Runtime.InteropServices.DllImport(Wgl.Library, EntryPoint = "wglGetCurrentDC", ExactSpelling = true, SetLastError = true)]
00037 internal extern static IntPtr GetCurrentDC();
00038 [System.Security.SuppressUnmanagedCodeSecurity()]
00039 [System.Runtime.InteropServices.DllImport(Wgl.Library, EntryPoint = "wglGetDefaultProcAddress", ExactSpelling = true, SetLastError = true)]
00040 internal extern static IntPtr GetDefaultProcAddress(String lpszProc);
00041 [System.Security.SuppressUnmanagedCodeSecurity()]
00042 [System.Runtime.InteropServices.DllImport(Wgl.Library, EntryPoint = "wglGetProcAddress", ExactSpelling = true, SetLastError = true)]
00043 internal extern static IntPtr GetProcAddress(String lpszProc);
00044 [System.Security.SuppressUnmanagedCodeSecurity()]
00045 [System.Runtime.InteropServices.DllImport(Wgl.Library, EntryPoint = "wglGetPixelFormat", ExactSpelling = true, SetLastError = true)]
00046 internal extern static int GetPixelFormat(IntPtr hdc);
00047 [System.Security.SuppressUnmanagedCodeSecurity()]
00048 [System.Runtime.InteropServices.DllImport(Wgl.Library, EntryPoint = "wglSetPixelFormat", ExactSpelling = true, SetLastError = true)]
00049 internal extern static unsafe Boolean SetPixelFormat(IntPtr hdc, int ipfd, PixelFormatDescriptor* ppfd);
00050 [System.Security.SuppressUnmanagedCodeSecurity()]
00051 [System.Runtime.InteropServices.DllImport(Wgl.Library, EntryPoint = "wglSwapBuffers", ExactSpelling = true, SetLastError = true)]
00052 internal extern static Boolean SwapBuffers(IntPtr hdc);
00053 [System.Security.SuppressUnmanagedCodeSecurity()]
00054 [System.Runtime.InteropServices.DllImport(Wgl.Library, EntryPoint = "wglShareLists", ExactSpelling = true, SetLastError = true)]
00055 internal extern static Boolean ShareLists(IntPtr hrcSrvShare, IntPtr hrcSrvSource);
00056 [System.Security.SuppressUnmanagedCodeSecurity()]
00057 [System.Runtime.InteropServices.DllImport(Wgl.Library, EntryPoint = "wglCreateLayerContext", ExactSpelling = true, SetLastError = true)]
00058 internal extern static IntPtr CreateLayerContext(IntPtr hDc, int level);
00059 [System.Security.SuppressUnmanagedCodeSecurity()]
00060 [System.Runtime.InteropServices.DllImport(Wgl.Library, EntryPoint = "wglDescribeLayerPlane", ExactSpelling = true)]
00061 internal extern static unsafe Boolean DescribeLayerPlane(IntPtr hDc, int pixelFormat, int layerPlane, UInt32 nBytes, LayerPlaneDescriptor* plpd);
00062 [System.Security.SuppressUnmanagedCodeSecurity()]
00063 [System.Runtime.InteropServices.DllImport(Wgl.Library, EntryPoint = "wglSetLayerPaletteEntries", ExactSpelling = true)]
00064 internal extern static unsafe int SetLayerPaletteEntries(IntPtr hdc, int iLayerPlane, int iStart, int cEntries, Int32* pcr);
00065 [System.Security.SuppressUnmanagedCodeSecurity()]
00066 [System.Runtime.InteropServices.DllImport(Wgl.Library, EntryPoint = "wglGetLayerPaletteEntries", ExactSpelling = true)]
00067 internal extern static unsafe int GetLayerPaletteEntries(IntPtr hdc, int iLayerPlane, int iStart, int cEntries, Int32* pcr);
00068 [System.Security.SuppressUnmanagedCodeSecurity()]
00069 [System.Runtime.InteropServices.DllImport(Wgl.Library, EntryPoint = "wglRealizeLayerPalette", ExactSpelling = true)]
00070 internal extern static Boolean RealizeLayerPalette(IntPtr hdc, int iLayerPlane, Boolean bRealize);
00071 [System.Security.SuppressUnmanagedCodeSecurity()]
00072 [System.Runtime.InteropServices.DllImport(Wgl.Library, EntryPoint = "wglSwapLayerBuffers", ExactSpelling = true)]
00073 internal extern static Boolean SwapLayerBuffers(IntPtr hdc, UInt32 fuFlags);
00074 [System.Security.SuppressUnmanagedCodeSecurity()]
00075 [System.Runtime.InteropServices.DllImport(Wgl.Library, EntryPoint = "wglUseFontBitmapsA", CharSet = CharSet.Auto)]
00076 internal extern static Boolean UseFontBitmapsA(IntPtr hDC, Int32 first, Int32 count, Int32 listBase);
00077 [System.Security.SuppressUnmanagedCodeSecurity()]
00078 [System.Runtime.InteropServices.DllImport(Wgl.Library, EntryPoint = "wglUseFontBitmapsW", CharSet = CharSet.Auto)]
00079 internal extern static Boolean UseFontBitmapsW(IntPtr hDC, Int32 first, Int32 count, Int32 listBase);
00080 [System.Security.SuppressUnmanagedCodeSecurity()]
00081 [System.Runtime.InteropServices.DllImport(Wgl.Library, EntryPoint = "wglUseFontOutlinesA", CharSet = CharSet.Auto)]
00082 internal extern static unsafe Boolean UseFontOutlinesA(IntPtr hDC, Int32 first, Int32 count, Int32 listBase, float thickness, float deviation, Int32 fontMode, GlyphMetricsFloat* glyphMetrics);
00083 [System.Security.SuppressUnmanagedCodeSecurity()]
00084 [System.Runtime.InteropServices.DllImport(Wgl.Library, EntryPoint = "wglUseFontOutlinesW", CharSet = CharSet.Auto)]
00085 internal extern static unsafe Boolean UseFontOutlinesW(IntPtr hDC, Int32 first, Int32 count, Int32 listBase, float thickness, float deviation, Int32 fontMode, GlyphMetricsFloat* glyphMetrics);
00086 [System.Security.SuppressUnmanagedCodeSecurity()]
00087 [System.Runtime.InteropServices.DllImport(Wgl.Library, EntryPoint = "wglMakeContextCurrentEXT", ExactSpelling = true, SetLastError = true)]
00088 internal extern static Boolean MakeContextCurrentEXT(IntPtr hDrawDC, IntPtr hReadDC, IntPtr hglrc);
00089 [System.Security.SuppressUnmanagedCodeSecurity()]
00090 [System.Runtime.InteropServices.DllImport(Wgl.Library, EntryPoint = "wglChoosePixelFormatEXT", ExactSpelling = true, SetLastError = true)]
00091 internal extern static unsafe Boolean ChoosePixelFormatEXT(IntPtr hdc, int* piAttribIList, Single* pfAttribFList, UInt32 nMaxFormats, [Out] int* piFormats, [Out] UInt32* nNumFormats);
00092 }
00093 }
00094 }