mirror of
https://github.com/Ryujinx/Opentk.git
synced 2024-12-29 08:25:30 +00:00
22 lines
486 B
C#
22 lines
486 B
C#
|
using System.Runtime.InteropServices;
|
|||
|
using System;
|
|||
|
|
|||
|
namespace OpenTK.Platform.MacOS
|
|||
|
{
|
|||
|
static class Class
|
|||
|
{
|
|||
|
[DllImport (Cocoa.LibObjC)]
|
|||
|
extern static IntPtr objc_getClass(string name);
|
|||
|
|
|||
|
public static IntPtr Get(string name)
|
|||
|
{
|
|||
|
var id = objc_getClass(name);
|
|||
|
if (id == IntPtr.Zero)
|
|||
|
{
|
|||
|
throw new ArgumentException("Unknown class: " + name);
|
|||
|
}
|
|||
|
return id;
|
|||
|
}
|
|||
|
}
|
|||
|
}
|