mirror of
https://github.com/Ryujinx/GtkSharp.git
synced 2024-12-26 05:35:40 +00:00
0098411b00
* glib/Thread.cs: Add a class for thread awareness * gdk/Threads.cs: ditto svn path=/trunk/gtk-sharp/; revision=9839
39 lines
608 B
C#
39 lines
608 B
C#
// Threads.cs - thread awareness
|
|
//
|
|
// Author: Alp Toker <alp@atoker.com>
|
|
//
|
|
// (c) 2002 Alp Toker
|
|
|
|
namespace Gdk
|
|
{
|
|
using System;
|
|
using System.Runtime.InteropServices;
|
|
|
|
public class Threads
|
|
{
|
|
[DllImport("gdk-x11-2.0")]
|
|
static extern void gdk_threads_init ();
|
|
|
|
public static void Init ()
|
|
{
|
|
gdk_threads_init ();
|
|
}
|
|
|
|
[DllImport("gdk-x11-2.0")]
|
|
static extern void gdk_threads_enter ();
|
|
|
|
public static void Enter ()
|
|
{
|
|
gdk_threads_enter ();
|
|
}
|
|
|
|
[DllImport("gdk-x11-2.0")]
|
|
static extern void gdk_threads_leave ();
|
|
|
|
public static void Leave ()
|
|
{
|
|
gdk_threads_leave ();
|
|
}
|
|
}
|
|
}
|