All pastes #341545 Raw Edit

Anonymous

public text v1 · immutable
#341545 ·published 2007-02-05 18:46 UTC
rendered paste body
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.

namespace Hildon {

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

#region Autogenerated code
	public  class Caption : Gtk.EventBox {

		~Caption()
		{
			Dispose();
		}

		[Obsolete]
		protected Caption(GLib.GType gtype) : base(gtype) {}
		public Caption(IntPtr raw) : base(raw) {}

		[DllImport("hildon-1")]
		static extern IntPtr hildon_caption_new(IntPtr group, IntPtr value, IntPtr control, IntPtr icon, int flag);

		public Caption (Gtk.SizeGroup group, string value, Gtk.Widget control, Gtk.Widget icon, Hildon.CaptionStatus flag) : base (IntPtr.Zero)
		{
			if (GetType () != typeof (Caption)) {
				throw new InvalidOperationException ("Can't override this constructor.");
			}
			IntPtr value_as_native = GLib.Marshaller.StringToPtrGStrdup (value);
			Raw = hildon_caption_new(group == null ? IntPtr.Zero : group.Handle, value_as_native, control == null ? IntPtr.Zero : control.Handle, icon == null ? IntPtr.Zero : icon.Handle, (int) flag);
			GLib.Marshaller.Free (value_as_native);
		}

		[DllImport("hildon-1")]
		static extern IntPtr hildon_caption_get_size_group(IntPtr raw);

		[DllImport("hildon-1")]
		static extern void hildon_caption_set_size_group(IntPtr raw, IntPtr new_group);

		[GLib.Property ("size_group")]
		public Gtk.SizeGroup SizeGroup {
			get  {
				IntPtr raw_ret = hildon_caption_get_size_group(Handle);
				Gtk.SizeGroup ret = GLib.Object.GetObject(raw_ret) as Gtk.SizeGroup;
				return ret;
			}
			set  {
				hildon_caption_set_size_group(Handle, value == null ? IntPtr.Zero : value.Handle);
			}
		}

		[DllImport("hildon-1")]
		static extern IntPtr hildon_caption_get_label(IntPtr raw);

		[DllImport("hildon-1")]
		static extern void hildon_caption_set_label(IntPtr raw, IntPtr label);

		[GLib.Property ("label")]
		public string Label {
			get  {
				IntPtr raw_ret = hildon_caption_get_label(Handle);
				string ret = GLib.Marshaller.PtrToStringGFree(raw_ret);
				return ret;
			}
			set  {
				IntPtr label_as_native = GLib.Marshaller.StringToPtrGStrdup (value);
				hildon_caption_set_label(Handle, label_as_native);
				GLib.Marshaller.Free (label_as_native);
			}
		}

		[DllImport("hildon-1")]
		static extern IntPtr hildon_caption_get_separator(IntPtr raw);

		[DllImport("hildon-1")]
		static extern void hildon_caption_set_separator(IntPtr raw, IntPtr separator);

		[GLib.Property ("separator")]
		public string Separator {
			get  {
				IntPtr raw_ret = hildon_caption_get_separator(Handle);
				string ret = GLib.Marshaller.PtrToStringGFree(raw_ret);
				return ret;
			}
			set  {
				IntPtr separator_as_native = GLib.Marshaller.StringToPtrGStrdup (value);
				hildon_caption_set_separator(Handle, separator_as_native);
				GLib.Marshaller.Free (separator_as_native);
			}
		}

		[DllImport("hildon-1")]
		static extern int hildon_caption_get_icon_position(IntPtr raw);

		[DllImport("hildon-1")]
		static extern void hildon_caption_set_icon_position(IntPtr raw, int pos);

		[GLib.Property ("icon-position")]
		public Hildon.CaptionIconPosition IconPosition {
			get  {
				int raw_ret = hildon_caption_get_icon_position(Handle);
				Hildon.CaptionIconPosition ret = (Hildon.CaptionIconPosition) raw_ret;
				return ret;
			}
			set  {
				hildon_caption_set_icon_position(Handle, (int) value);
			}
		}

		[GLib.Property ("icon")]
		public Gtk.Widget Icon {
			get {
				GLib.Value val = GetProperty ("icon");
				Gtk.Widget ret = (Gtk.Widget) val;
				val.Dispose ();
				return ret;
			}
			set {
				GLib.Value val = new GLib.Value(value);
				SetProperty("icon", val);
				val.Dispose ();
			}
		}

		[DllImport("hildon-1")]
		static extern int hildon_caption_get_status(IntPtr raw);

		[DllImport("hildon-1")]
		static extern void hildon_caption_set_status(IntPtr raw, int flag);

		[GLib.Property ("status")]
		public Hildon.CaptionStatus Status {
			get  {
				int raw_ret = hildon_caption_get_status(Handle);
				Hildon.CaptionStatus ret = (Hildon.CaptionStatus) raw_ret;
				return ret;
			}
			set  {
				hildon_caption_set_status(Handle, (int) value);
			}
		}

		public class CaptionChild : Gtk.Container.ContainerChild {
			protected internal CaptionChild (Gtk.Container parent, Gtk.Widget child) : base (parent, child) {}

			[Gtk.ChildProperty ("expand")]
			public bool Expand {
				get {
					GLib.Value val = parent.ChildGetProperty (child, "expand");
					bool ret = (bool) val;
					val.Dispose ();
					return ret;
				}
				set {
					GLib.Value val = new GLib.Value(value);
					parent.ChildSetProperty(child, "expand", val);
					val.Dispose ();
				}
			}

		}

		public override Gtk.Container.ContainerChild this [Gtk.Widget child] {
			get {
				return new CaptionChild (this, child);
			}
		}

		[GLib.CDeclCallback]
		delegate void ActivateVMDelegate (IntPtr widget);

		static ActivateVMDelegate ActivateVMCallback;

		static void activate_cb (IntPtr widget)
		{
			Caption widget_managed = GLib.Object.GetObject (widget, false) as Caption;
			widget_managed.OnActivate ();
		}

		private static void OverrideActivate (GLib.GType gtype)
		{
			if (ActivateVMCallback == null)
				ActivateVMCallback = new ActivateVMDelegate (activate_cb);
			OverrideVirtualMethod (gtype, "activate", ActivateVMCallback);
		}

		[GLib.DefaultSignalHandler(Type=typeof(Hildon.Caption), ConnectionMethod="OverrideActivate")]
		protected virtual void OnActivate ()
		{
			GLib.Value ret = GLib.Value.Empty;
			GLib.ValueArray inst_and_params = new GLib.ValueArray (1);
			GLib.Value[] vals = new GLib.Value [1];
			vals [0] = new GLib.Value (this);
			inst_and_params.Append (vals [0]);
			g_signal_chain_from_overridden (inst_and_params.ArrayPtr, ref ret);
			foreach (GLib.Value v in vals)
				v.Dispose ();
		}

		[GLib.Signal("activate")]
		public event System.EventHandler Activate {
			add {
				GLib.Signal sig = GLib.Signal.Lookup (this, "activate");
				sig.AddDelegate (value);
			}
			remove {
				GLib.Signal sig = GLib.Signal.Lookup (this, "activate");
				sig.RemoveDelegate (value);
			}
		}

		[DllImport("hildon-1")]
		static extern bool hildon_caption_is_mandatory(IntPtr raw);

		public bool IsMandatory { 
			get {
				bool raw_ret = hildon_caption_is_mandatory(Handle);
				bool ret = raw_ret;
				return ret;
			}
		}

		[DllImport("hildon-1")]
		static extern IntPtr hildon_caption_get_icon_image(IntPtr raw);

		[DllImport("hildon-1")]
		static extern void hildon_caption_set_icon_image(IntPtr raw, IntPtr icon);

		public Gtk.Widget IconImage { 
			get {
				IntPtr raw_ret = hildon_caption_get_icon_image(Handle);
				Gtk.Widget ret = GLib.Object.GetObject(raw_ret) as Gtk.Widget;
				return ret;
			}
			set {
				hildon_caption_set_icon_image(Handle, value == null ? IntPtr.Zero : value.Handle);
			}
		}

		[DllImport("hildon-1")]
		static extern float hildon_caption_get_label_alignment(IntPtr raw);

		[DllImport("hildon-1")]
		static extern void hildon_caption_set_label_alignment(IntPtr raw, float alignment);

		public float LabelAlignment { 
			get {
				float raw_ret = hildon_caption_get_label_alignment(Handle);
				float ret = raw_ret;
				return ret;
			}
			set {
				hildon_caption_set_label_alignment(Handle, value);
			}
		}

		[DllImport("hildon-1")]
		static extern bool hildon_caption_get_child_expand(IntPtr raw);

		[DllImport("hildon-1")]
		static extern void hildon_caption_set_child_expand(IntPtr raw, bool expand);

		public bool ChildExpand { 
			get {
				bool raw_ret = hildon_caption_get_child_expand(Handle);
				bool ret = raw_ret;
				return ret;
			}
			set {
				hildon_caption_set_child_expand(Handle, value);
			}
		}

#endregion
	}
}