Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > by-pkgid > c666225e9320ba81ae98e96d07a5fcf5 > files > 120

gtk-sharp2-doc-2.12.9-1mdv2010.0.i586.rpm

// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.

namespace Gtksharp {

	using System;
	using System.Collections;
	using System.Runtime.InteropServices;

#region Autogenerated code
	public class Opaque : GLib.Opaque {

		[DllImport("libopaque.dll")]
		static extern IntPtr gtksharp_opaque_get_friend(IntPtr raw);

		[DllImport("libopaque.dll")]
		static extern void gtksharp_opaque_set_friend(IntPtr raw, IntPtr friend);

		public Gtksharp.Opaque Friend {
			get  {
				IntPtr raw_ret = gtksharp_opaque_get_friend(Handle);
				Gtksharp.Opaque ret = raw_ret == IntPtr.Zero ? null : (Gtksharp.Opaque) GLib.Opaque.GetOpaque (raw_ret, typeof (Gtksharp.Opaque), false);
				return ret;
			}
			set  {
				gtksharp_opaque_set_friend(Handle, value == null ? IntPtr.Zero : value.Handle);
			}
		}

		[DllImport("libopaque.dll")]
		static extern int gtksharp_opaque_get_serial(IntPtr raw);

		public int Serial {
			get  {
				int raw_ret = gtksharp_opaque_get_serial(Handle);
				int ret = raw_ret;
				return ret;
			}
		}

		[DllImport("libopaque.dll")]
		static extern IntPtr gtksharp_opaque_check(GtksharpSharp.OpaqueReturnFuncNative func, GtksharpSharp.GCFuncNative gc);

		public static Gtksharp.Opaque Check(Gtksharp.OpaqueReturnFunc func, Gtksharp.GCFunc gc) {
			GtksharpSharp.OpaqueReturnFuncWrapper func_wrapper = new GtksharpSharp.OpaqueReturnFuncWrapper (func);
			GtksharpSharp.GCFuncWrapper gc_wrapper = new GtksharpSharp.GCFuncWrapper (gc);
			IntPtr raw_ret = gtksharp_opaque_check(func_wrapper.NativeDelegate, gc_wrapper.NativeDelegate);
			Gtksharp.Opaque ret = raw_ret == IntPtr.Zero ? null : (Gtksharp.Opaque) GLib.Opaque.GetOpaque (raw_ret, typeof (Gtksharp.Opaque), false);
			return ret;
		}

		[DllImport("libopaque.dll")]
		static extern IntPtr gtksharp_opaque_copy(IntPtr raw);

		public Gtksharp.Opaque Copy() {
			IntPtr raw_ret = gtksharp_opaque_copy(Handle);
			Gtksharp.Opaque ret = raw_ret == IntPtr.Zero ? null : (Gtksharp.Opaque) GLib.Opaque.GetOpaque (raw_ret, typeof (Gtksharp.Opaque), true);
			return ret;
		}

		[DllImport("libopaque.dll")]
		static extern IntPtr gtksharp_opaque_check_free(GtksharpSharp.OpaqueReturnFuncNative func, GtksharpSharp.GCFuncNative gc);

		public static Gtksharp.Opaque CheckFree(Gtksharp.OpaqueReturnFunc func, Gtksharp.GCFunc gc) {
			GtksharpSharp.OpaqueReturnFuncWrapper func_wrapper = new GtksharpSharp.OpaqueReturnFuncWrapper (func);
			GtksharpSharp.GCFuncWrapper gc_wrapper = new GtksharpSharp.GCFuncWrapper (gc);
			IntPtr raw_ret = gtksharp_opaque_check_free(func_wrapper.NativeDelegate, gc_wrapper.NativeDelegate);
			Gtksharp.Opaque ret = raw_ret == IntPtr.Zero ? null : (Gtksharp.Opaque) GLib.Opaque.GetOpaque (raw_ret, typeof (Gtksharp.Opaque), false);
			return ret;
		}

		[DllImport("libopaque.dll")]
		static extern int gtksharp_opaque_get_last_serial();

		public static int LastSerial { 
			get {
				int raw_ret = gtksharp_opaque_get_last_serial();
				int ret = raw_ret;
				return ret;
			}
		}

		public Opaque(IntPtr raw) : base(raw) {}

		[DllImport("libopaque.dll")]
		static extern IntPtr gtksharp_opaque_new();

		public Opaque () 
		{
			Raw = gtksharp_opaque_new();
		}

		[DllImport("libopaque.dll")]
		static extern void gtksharp_opaque_free(IntPtr raw);

		protected override void Free (IntPtr raw)
		{
			gtksharp_opaque_free (raw);
		}

		class FinalizerInfo {
			IntPtr handle;

			public FinalizerInfo (IntPtr handle)
			{
				this.handle = handle;
			}

			public bool Handler ()
			{
				gtksharp_opaque_free (handle);
				return false;
			}
		}

		~Opaque ()
		{
			if (!Owned)
				return;
			FinalizerInfo info = new FinalizerInfo (Handle);
			GLib.Timeout.Add (50, new GLib.TimeoutHandler (info.Handler));
		}

#endregion
	}
}