mirror of
https://github.com/Ryujinx/GtkSharp.git
synced 2024-09-09 00:13:20 +02:00
2002-12-23 Alp Toker <alp@atoker.com>
* glib/Thread.cs: Add a class for thread awareness * gdk/Threads.cs: ditto svn path=/trunk/gtk-sharp/; revision=9839
This commit is contained in:
parent
5bc31b52ca
commit
0098411b00
@ -1,3 +1,8 @@
|
|||||||
|
2002-12-23 Alp Toker <alp@atoker.com>
|
||||||
|
|
||||||
|
* glib/Thread.cs: Add a class for thread awareness
|
||||||
|
* gdk/Threads.cs: ditto
|
||||||
|
|
||||||
2002-12-22 Kristian Rietveld <kris@gtk.org>
|
2002-12-22 Kristian Rietveld <kris@gtk.org>
|
||||||
|
|
||||||
* sources/Gnome.metadata: add out param rules for a bunch of Canvas
|
* sources/Gnome.metadata: add out param rules for a bunch of Canvas
|
||||||
|
38
gdk/Threads.cs
Normal file
38
gdk/Threads.cs
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
// 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 ();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
22
glib/Thread.cs
Normal file
22
glib/Thread.cs
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
// Thread.cs - thread awareness
|
||||||
|
//
|
||||||
|
// Author: Alp Toker <alp@atoker.com>
|
||||||
|
//
|
||||||
|
// (c) 2002 Alp Toker
|
||||||
|
|
||||||
|
namespace GLib
|
||||||
|
{
|
||||||
|
using System;
|
||||||
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
|
public class Thread
|
||||||
|
{
|
||||||
|
[DllImport("gthread-2.0")]
|
||||||
|
static extern void g_thread_init (IntPtr i);
|
||||||
|
|
||||||
|
public static void Init ()
|
||||||
|
{
|
||||||
|
g_thread_init (IntPtr.Zero);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user