context: // This file was generated by the Gtk# code generator.
  // Any changes made will be lost if regenerated.
  
  namespace Gnome {
  
  	using System;
  	using System.Collections;
  	using System.Runtime.InteropServices;
  
  #region Autogenerated code
  	[Obsolete]
  	public class FontPicker : Gtk.Button {
  
  		[Obsolete]
  		protected FontPicker(GLib.GType gtype) : base(gtype) {}
  		public FontPicker(IntPtr raw) : base(raw) {}
  
  		[DllImport("gnomeui-2", CallingConvention = CallingConvention.Cdecl)]
  		static extern IntPtr gnome_font_picker_new();
  
  		public FontPicker () : base (IntPtr.Zero)
  		{
  			if (GetType () != typeof (FontPicker)) {
  				CreateNativeObject (new string [0], new GLib.Value[0]);
  				return;
  			}
  			Raw = gnome_font_picker_new();
  		}
  
  		[GLib.Property ("font")]
  		public IntPtr Font {
  			get {
  				GLib.Value val = GetProperty ("font");
  				IntPtr ret = (IntPtr) val;
  				val.Dispose ();
  				return ret;
  			}
  		}
  
  		[DllImport("gnomeui-2", CallingConvention = CallingConvention.Cdecl)]
  		static extern IntPtr gnome_font_picker_get_preview_text(IntPtr raw);
  
  		[DllImport("gnomeui-2", CallingConvention = CallingConvention.Cdecl)]
  		static extern void gnome_font_picker_set_preview_text(IntPtr raw, IntPtr text);
  
  		[GLib.Property ("preview_text")]
  		public string PreviewText {
  			get  {
  				IntPtr raw_ret = gnome_font_picker_get_preview_text(Handle);
  				string ret = GLib.Marshaller.Utf8PtrToString (raw_ret);
  				return ret;
  			}
  			set  {
  				IntPtr native_value = GLib.Marshaller.StringToPtrGStrdup (value);
  				gnome_font_picker_set_preview_text(Handle, native_value);
  				GLib.Marshaller.Free (native_value);
  			}
  		}
  
  		[GLib.Property ("label-font-size")]
  		public int LabelFontSize {
  			get {
  				GLib.Value val = GetProperty ("label-font-size");
  				int ret = (int) val;
  				val.Dispose ();
  				return ret;
  			}
  			set {
  				GLib.Value val = new GLib.Value(value);
  				SetProperty("label-font-size", val);
  				val.Dispose ();
  			}
  		}
  
  		[DllImport("gnomeui-2", CallingConvention = CallingConvention.Cdecl)]
  		static extern IntPtr gnome_font_picker_get_font_name(IntPtr raw);
  
  		[GLib.Property ("font_name")]
  		public string FontName {
  			get  {
  				IntPtr raw_ret = gnome_font_picker_get_font_name(Handle);
  				string ret = GLib.Marshaller.Utf8PtrToString (raw_ret);
  				return ret;
  			}
  			set {
  				GLib.Value val = new GLib.Value(value);
  				SetProperty("font_name", val);
  				val.Dispose ();
  			}
  		}
  
  		[DllImport("gnomeui-2", CallingConvention = CallingConvention.Cdecl)]
  		static extern int gnome_font_picker_get_mode(IntPtr raw);
  
  		[DllImport("gnomeui-2", CallingConvention = CallingConvention.Cdecl)]
  		static extern void gnome_font_picker_set_mode(IntPtr raw, int mode);
  
  		[GLib.Property ("mode")]
  		public Gnome.FontPickerMode Mode {
  			get  {
  				int raw_ret = gnome_font_picker_get_mode(Handle);
  				Gnome.FontPickerMode ret = (Gnome.FontPickerMode) raw_ret;
  				return ret;
  			}
  			set  {
  				gnome_font_picker_set_mode(Handle, (int) value);
  			}
  		}
  
  		[GLib.Property ("use-font-in-label")]
  		public bool UseFontInLabel {
  			get {
  				GLib.Value val = GetProperty ("use-font-in-label");
  				bool ret = (bool) val;
  				val.Dispose ();
  				return ret;
  			}
  			set {
  				GLib.Value val = new GLib.Value(value);
  				SetProperty("use-font-in-label", val);
  				val.Dispose ();
  			}
  		}
  
  		[DllImport("gnomeui-2", CallingConvention = CallingConvention.Cdecl)]
  		static extern IntPtr gnome_font_picker_get_title(IntPtr raw);
  
  		[DllImport("gnomeui-2", CallingConvention = CallingConvention.Cdecl)]
  		static extern void gnome_font_picker_set_title(IntPtr raw, IntPtr title);
  
  		[GLib.Property ("title")]
  		public string Title {
  			get  {
  				IntPtr raw_ret = gnome_font_picker_get_title(Handle);
  				string ret = GLib.Marshaller.Utf8PtrToString (raw_ret);
  				return ret;
  			}
  			set  {
  				IntPtr native_value = GLib.Marshaller.StringToPtrGStrdup (value);
  				gnome_font_picker_set_title(Handle, native_value);
  				GLib.Marshaller.Free (native_value);
  			}
  		}
  
  		[GLib.Property ("show-size")]
  		public bool ShowSize {
  			get {
  				GLib.Value val = GetProperty ("show-size");
  				bool ret = (bool) val;
  				val.Dispose ();
  				return ret;
  			}
  			set {
  				GLib.Value val = new GLib.Value(value);
  				SetProperty("show-size", val);
  				val.Dispose ();
  			}
  		}
  
  		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
  		delegate void FontSetVMDelegate (IntPtr gfp, IntPtr font_name);
  
  		[DllImport ("gnomesharpglue-2", CallingConvention = CallingConvention.Cdecl)]
  		static extern void gnomesharp_fontpicker_override_font_set (IntPtr gtype, FontSetVMDelegate cb);
  
  		static FontSetVMDelegate FontSetVMCallback;
  
  		static void fontset_cb (IntPtr gfp, IntPtr font_name)
  		{
  			try {
  				FontPicker gfp_managed = GLib.Object.GetObject (gfp, false) as FontPicker;
  				gfp_managed.OnFontSet (GLib.Marshaller.Utf8PtrToString (font_name));
  			} catch (Exception e) {
  				GLib.ExceptionManager.RaiseUnhandledException (e, false);
  			}
  		}
  
  		private static void OverrideFontSet (GLib.GType gtype)
  		{
  			if (FontSetVMCallback == null)
  				FontSetVMCallback = new FontSetVMDelegate (fontset_cb);
  			gnomesharp_fontpicker_override_font_set (gtype.Val, FontSetVMCallback);
  		}
  
  		[DllImport ("gnomesharpglue-2", CallingConvention = CallingConvention.Cdecl)]
  		static extern void gnomesharp_fontpicker_base_font_set (IntPtr gfp, IntPtr font_name);
  
  		[GLib.DefaultSignalHandler(Type=typeof(Gnome.FontPicker), ConnectionMethod="OverrideFontSet")]
  		protected virtual void OnFontSet (string font_name)
  		{
  			IntPtr native_font_name = GLib.Marshaller.StringToPtrGStrdup (font_name);
  			gnomesharp_fontpicker_base_font_set (Handle, native_font_name);
  			GLib.Marshaller.Free (native_font_name);
  		}
  
  		[GLib.Signal("font_set")]
  		public event Gnome.FontSetHandler FontSet {
  			add {
  				GLib.Signal sig = GLib.Signal.Lookup (this, "font_set", typeof (Gnome.FontSetArgs));
  				sig.AddDelegate (value);
  			}
  			remove {
  				GLib.Signal sig = GLib.Signal.Lookup (this, "font_set", typeof (Gnome.FontSetArgs));
  				sig.RemoveDelegate (value);
  			}
  		}
  
  		[DllImport("gnomeui-2", CallingConvention = CallingConvention.Cdecl)]
  		static extern IntPtr gnome_font_picker_uw_get_widget(IntPtr raw);
  
  		public Gtk.Widget UwGetWidget() {
  			IntPtr raw_ret = gnome_font_picker_uw_get_widget(Handle);
  			Gtk.Widget ret = GLib.Object.GetObject(raw_ret) as Gtk.Widget;
  			return ret;
  		}
  
  		[DllImport("gnomeui-2", CallingConvention = CallingConvention.Cdecl)]
  		static extern bool gnome_font_picker_set_font_name(IntPtr raw, IntPtr fontname);
  
  		public bool SetFontName(string fontname) {
  			IntPtr native_fontname = GLib.Marshaller.StringToPtrGStrdup (fontname);
  			bool raw_ret = gnome_font_picker_set_font_name(Handle, native_fontname);
  			bool ret = raw_ret;
  			GLib.Marshaller.Free (native_fontname);
  			return ret;
  		}
  
  		[DllImport("gnomeui-2", CallingConvention = CallingConvention.Cdecl)]
  		static extern void gnome_font_picker_fi_set_show_size(IntPtr raw, bool show_size);
  
  		public void FiSetShowSize(bool show_size) {
  			gnome_font_picker_fi_set_show_size(Handle, show_size);
  		}
  
  		[DllImport("gnomeui-2", CallingConvention = CallingConvention.Cdecl)]
  		static extern void gnome_font_picker_fi_set_use_font_in_label(IntPtr raw, bool use_font_in_label, int size);
  
  		public void FiSetUseFontInLabel(bool use_font_in_label, int size) {
  			gnome_font_picker_fi_set_use_font_in_label(Handle, use_font_in_label, size);
  		}
  
  		[DllImport("gnomeui-2", CallingConvention = CallingConvention.Cdecl)]
  		static extern void gnome_font_picker_uw_set_widget(IntPtr raw, IntPtr widget);
  
  		public void UwSetWidget(Gtk.Widget widget) {
  			gnome_font_picker_uw_set_widget(Handle, widget == null ? IntPtr.Zero : widget.Handle);
  		}
  
  		[DllImport("gnomeui-2", CallingConvention = CallingConvention.Cdecl)]
  		static extern IntPtr gnome_font_picker_get_type();
  
  		public static new GLib.GType GType { 
  			get {
  				IntPtr raw_ret = gnome_font_picker_get_type();
  
gt: 				GLib.GType ret = new GLib.GType(raw_ret);