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

namespace Pango {

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

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

		public Pango.Attribute Attr {
			get {
				unsafe {
					IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("attr"));
					return Pango.Attribute.GetAttribute ((*raw_ptr));
				}
			}
			set {
				unsafe {
					IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("attr"));
					*raw_ptr = value.Handle;
				}
			}
		}

		public string Features {
			get {
				unsafe {
					IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("features"));
					return GLib.Marshaller.Utf8PtrToString ((*raw_ptr));
				}
			}
			set {
				unsafe {
					IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("features"));
					*raw_ptr = GLib.Marshaller.StringToPtrGStrdup (value);
				}
			}
		}

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

		[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
		delegate IntPtr d_pango_attr_font_features_new(IntPtr features);
		static d_pango_attr_font_features_new pango_attr_font_features_new = FuncLoader.LoadFunction<d_pango_attr_font_features_new>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_attr_font_features_new"));

		public AttrFontFeatures (string features) 
		{
			IntPtr native_features = GLib.Marshaller.StringToPtrGStrdup (features);
			Raw = pango_attr_font_features_new(native_features);
			GLib.Marshaller.Free (native_features);
		}


		// Internal representation of the wrapped structure ABI.
		static GLib.AbiStruct _abi_info = null;
		static public unsafe GLib.AbiStruct abi_info {
			get {
				if (_abi_info == null)
					_abi_info = new GLib.AbiStruct (new List<GLib.AbiField>{ 
						new GLib.AbiField("attr"
							, 0
							, (uint) Marshal.SizeOf<Pango.Attribute>() // attr
							, null
							, "features"
							, (long) Marshal.OffsetOf<PangoAttrFontFeatures_attrAlign>("attr")
							, 0
							),
						new GLib.AbiField("features"
							, -1
							, (uint) sizeof( IntPtr ) // features
							, "attr"
							, null
							, (uint) sizeof(IntPtr)
							, 0
							),
					});

				return _abi_info;
			}
		}

		[StructLayout(LayoutKind.Sequential)]
		public struct PangoAttrFontFeatures_attrAlign
		{
			sbyte f1;
			private Pango.Attribute attr;
		}


		// End of the ABI representation.

#endregion
	}
}
