2002-12-23 04:35:44 +00:00
|
|
|
// 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
|
|
|
|
{
|
2003-02-22 04:34:56 +00:00
|
|
|
[DllImport("libgdk-win32-2.0-0.dll")]
|
2002-12-23 04:35:44 +00:00
|
|
|
static extern void gdk_threads_init ();
|
|
|
|
|
|
|
|
public static void Init ()
|
|
|
|
{
|
|
|
|
gdk_threads_init ();
|
|
|
|
}
|
|
|
|
|
2003-02-22 04:34:56 +00:00
|
|
|
[DllImport("libgdk-win32-2.0-0.dll")]
|
2002-12-23 04:35:44 +00:00
|
|
|
static extern void gdk_threads_enter ();
|
|
|
|
|
|
|
|
public static void Enter ()
|
|
|
|
{
|
|
|
|
gdk_threads_enter ();
|
|
|
|
}
|
|
|
|
|
2003-02-22 04:34:56 +00:00
|
|
|
[DllImport("libgdk-win32-2.0-0.dll")]
|
2002-12-23 04:35:44 +00:00
|
|
|
static extern void gdk_threads_leave ();
|
|
|
|
|
|
|
|
public static void Leave ()
|
|
|
|
{
|
|
|
|
gdk_threads_leave ();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|