00001 using System;
00002 using System.Runtime.InteropServices;
00003 using System.Diagnostics;
00004
00005
00006 namespace OpenTK.Platform.MacOS.Carbon
00007 {
00008
00009
00010 enum CGDisplayErr
00011 {
00012
00013 }
00014
00015 internal static class CG
00016 {
00017 const string appServices = "/System/Library/Frameworks/ApplicationServices.framework/Versions/Current/ApplicationServices";
00018
00019
00020
00021
00022
00023 [DllImport(appServices,EntryPoint="CGGetActiveDisplayList")]
00024 internal unsafe static extern CGDisplayErr GetActiveDisplayList(int maxDisplays, IntPtr* activeDspys, out int dspyCnt);
00025
00026 [DllImport(appServices,EntryPoint="CGMainDisplayID")]
00027 internal static extern IntPtr MainDisplayID();
00028
00029 [DllImport(appServices, EntryPoint = "CGDisplayBounds")]
00030 internal unsafe static extern HIRect DisplayBounds(IntPtr display);
00031
00032 [DllImport(appServices,EntryPoint="CGDisplayPixelsWide")]
00033 internal static extern int DisplayPixelsWide(IntPtr display);
00034
00035 [DllImport(appServices,EntryPoint="CGDisplayPixelsHigh")]
00036 internal static extern int DisplayPixelsHigh(IntPtr display);
00037
00038 [DllImport(appServices,EntryPoint="CGDisplayCurrentMode")]
00039 internal static extern IntPtr DisplayCurrentMode(IntPtr display);
00040
00041 [DllImport(appServices,EntryPoint="CGDisplayCapture")]
00042 internal static extern CGDisplayErr DisplayCapture(IntPtr display);
00043
00044 [DllImport(appServices,EntryPoint="CGDisplayRelease")]
00045 internal static extern CGDisplayErr DisplayRelease(IntPtr display);
00046
00047 [DllImport(appServices, EntryPoint = "CGDisplayAvailableModes")]
00048 internal static extern IntPtr DisplayAvailableModes(IntPtr display);
00049
00050 [DllImport(appServices, EntryPoint = "CGDisplaySwitchToMode")]
00051 internal static extern IntPtr DisplaySwitchToMode(IntPtr display, IntPtr displayMode);
00052
00053 }
00054 }