// 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 FontDescription : GLib.Opaque { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] delegate bool d_pango_font_description_better_match(IntPtr raw, IntPtr old_match, IntPtr new_match); static d_pango_font_description_better_match pango_font_description_better_match = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_font_description_better_match")); public bool BetterMatch(Pango.FontDescription old_match, Pango.FontDescription new_match) { bool raw_ret = pango_font_description_better_match(Handle, old_match == null ? IntPtr.Zero : old_match.Handle, new_match == null ? IntPtr.Zero : new_match.Handle); bool ret = raw_ret; return ret; } [UnmanagedFunctionPointer (CallingConvention.Cdecl)] delegate IntPtr d_pango_font_description_copy(IntPtr raw); static d_pango_font_description_copy pango_font_description_copy = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_font_description_copy")); public Pango.FontDescription Copy() { IntPtr raw_ret = pango_font_description_copy(Handle); Pango.FontDescription ret = raw_ret == IntPtr.Zero ? null : (Pango.FontDescription) GLib.Opaque.GetOpaque (raw_ret, typeof (Pango.FontDescription), true); return ret; } [UnmanagedFunctionPointer (CallingConvention.Cdecl)] delegate IntPtr d_pango_font_description_copy_static(IntPtr raw); static d_pango_font_description_copy_static pango_font_description_copy_static = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_font_description_copy_static")); public Pango.FontDescription CopyStatic() { IntPtr raw_ret = pango_font_description_copy_static(Handle); Pango.FontDescription ret = raw_ret == IntPtr.Zero ? null : (Pango.FontDescription) GLib.Opaque.GetOpaque (raw_ret, typeof (Pango.FontDescription), true); return ret; } [UnmanagedFunctionPointer (CallingConvention.Cdecl)] delegate bool d_pango_font_description_equal(IntPtr raw, IntPtr desc2); static d_pango_font_description_equal pango_font_description_equal = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_font_description_equal")); public bool Equal(Pango.FontDescription desc2) { bool raw_ret = pango_font_description_equal(Handle, desc2 == null ? IntPtr.Zero : desc2.Handle); bool ret = raw_ret; return ret; } [UnmanagedFunctionPointer (CallingConvention.Cdecl)] delegate IntPtr d_pango_font_description_from_string(IntPtr str); static d_pango_font_description_from_string pango_font_description_from_string = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_font_description_from_string")); public static Pango.FontDescription FromString(string str) { IntPtr native_str = GLib.Marshaller.StringToPtrGStrdup (str); IntPtr raw_ret = pango_font_description_from_string(native_str); Pango.FontDescription ret = raw_ret == IntPtr.Zero ? null : (Pango.FontDescription) GLib.Opaque.GetOpaque (raw_ret, typeof (Pango.FontDescription), true); GLib.Marshaller.Free (native_str); return ret; } [UnmanagedFunctionPointer (CallingConvention.Cdecl)] delegate IntPtr d_pango_font_description_get_family(IntPtr raw); static d_pango_font_description_get_family pango_font_description_get_family = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_font_description_get_family")); [UnmanagedFunctionPointer (CallingConvention.Cdecl)] delegate void d_pango_font_description_set_family(IntPtr raw, IntPtr family); static d_pango_font_description_set_family pango_font_description_set_family = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_font_description_set_family")); public string Family { get { IntPtr raw_ret = pango_font_description_get_family(Handle); string ret = GLib.Marshaller.Utf8PtrToString (raw_ret); return ret; } set { IntPtr native_value = GLib.Marshaller.StringToPtrGStrdup (value); pango_font_description_set_family(Handle, native_value); GLib.Marshaller.Free (native_value); } } [UnmanagedFunctionPointer (CallingConvention.Cdecl)] delegate int d_pango_font_description_get_gravity(IntPtr raw); static d_pango_font_description_get_gravity pango_font_description_get_gravity = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_font_description_get_gravity")); [UnmanagedFunctionPointer (CallingConvention.Cdecl)] delegate void d_pango_font_description_set_gravity(IntPtr raw, int gravity); static d_pango_font_description_set_gravity pango_font_description_set_gravity = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_font_description_set_gravity")); public Pango.Gravity Gravity { get { int raw_ret = pango_font_description_get_gravity(Handle); Pango.Gravity ret = (Pango.Gravity) raw_ret; return ret; } set { pango_font_description_set_gravity(Handle, (int) value); } } [UnmanagedFunctionPointer (CallingConvention.Cdecl)] delegate int d_pango_font_description_get_set_fields(IntPtr raw); static d_pango_font_description_get_set_fields pango_font_description_get_set_fields = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_font_description_get_set_fields")); public Pango.FontMask SetFields { get { int raw_ret = pango_font_description_get_set_fields(Handle); Pango.FontMask ret = (Pango.FontMask) raw_ret; return ret; } } [UnmanagedFunctionPointer (CallingConvention.Cdecl)] delegate int d_pango_font_description_get_size(IntPtr raw); static d_pango_font_description_get_size pango_font_description_get_size = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_font_description_get_size")); [UnmanagedFunctionPointer (CallingConvention.Cdecl)] delegate void d_pango_font_description_set_size(IntPtr raw, int size); static d_pango_font_description_set_size pango_font_description_set_size = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_font_description_set_size")); public int Size { get { int raw_ret = pango_font_description_get_size(Handle); int ret = raw_ret; return ret; } set { pango_font_description_set_size(Handle, value); } } [UnmanagedFunctionPointer (CallingConvention.Cdecl)] delegate bool d_pango_font_description_get_size_is_absolute(IntPtr raw); static d_pango_font_description_get_size_is_absolute pango_font_description_get_size_is_absolute = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_font_description_get_size_is_absolute")); public bool SizeIsAbsolute { get { bool raw_ret = pango_font_description_get_size_is_absolute(Handle); bool ret = raw_ret; return ret; } } [UnmanagedFunctionPointer (CallingConvention.Cdecl)] delegate int d_pango_font_description_get_stretch(IntPtr raw); static d_pango_font_description_get_stretch pango_font_description_get_stretch = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_font_description_get_stretch")); [UnmanagedFunctionPointer (CallingConvention.Cdecl)] delegate void d_pango_font_description_set_stretch(IntPtr raw, int stretch); static d_pango_font_description_set_stretch pango_font_description_set_stretch = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_font_description_set_stretch")); public Pango.Stretch Stretch { get { int raw_ret = pango_font_description_get_stretch(Handle); Pango.Stretch ret = (Pango.Stretch) raw_ret; return ret; } set { pango_font_description_set_stretch(Handle, (int) value); } } [UnmanagedFunctionPointer (CallingConvention.Cdecl)] delegate int d_pango_font_description_get_style(IntPtr raw); static d_pango_font_description_get_style pango_font_description_get_style = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_font_description_get_style")); [UnmanagedFunctionPointer (CallingConvention.Cdecl)] delegate void d_pango_font_description_set_style(IntPtr raw, int style); static d_pango_font_description_set_style pango_font_description_set_style = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_font_description_set_style")); public Pango.Style Style { get { int raw_ret = pango_font_description_get_style(Handle); Pango.Style ret = (Pango.Style) raw_ret; return ret; } set { pango_font_description_set_style(Handle, (int) value); } } [UnmanagedFunctionPointer (CallingConvention.Cdecl)] delegate IntPtr d_pango_font_description_get_type(); static d_pango_font_description_get_type pango_font_description_get_type = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_font_description_get_type")); public static GLib.GType GType { get { IntPtr raw_ret = pango_font_description_get_type(); GLib.GType ret = new GLib.GType(raw_ret); return ret; } } [UnmanagedFunctionPointer (CallingConvention.Cdecl)] delegate int d_pango_font_description_get_variant(IntPtr raw); static d_pango_font_description_get_variant pango_font_description_get_variant = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_font_description_get_variant")); [UnmanagedFunctionPointer (CallingConvention.Cdecl)] delegate void d_pango_font_description_set_variant(IntPtr raw, int variant); static d_pango_font_description_set_variant pango_font_description_set_variant = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_font_description_set_variant")); public Pango.Variant Variant { get { int raw_ret = pango_font_description_get_variant(Handle); Pango.Variant ret = (Pango.Variant) raw_ret; return ret; } set { pango_font_description_set_variant(Handle, (int) value); } } [UnmanagedFunctionPointer (CallingConvention.Cdecl)] delegate int d_pango_font_description_get_weight(IntPtr raw); static d_pango_font_description_get_weight pango_font_description_get_weight = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_font_description_get_weight")); [UnmanagedFunctionPointer (CallingConvention.Cdecl)] delegate void d_pango_font_description_set_weight(IntPtr raw, int weight); static d_pango_font_description_set_weight pango_font_description_set_weight = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_font_description_set_weight")); public Pango.Weight Weight { get { int raw_ret = pango_font_description_get_weight(Handle); Pango.Weight ret = (Pango.Weight) raw_ret; return ret; } set { pango_font_description_set_weight(Handle, (int) value); } } [UnmanagedFunctionPointer (CallingConvention.Cdecl)] delegate uint d_pango_font_description_hash(IntPtr raw); static d_pango_font_description_hash pango_font_description_hash = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_font_description_hash")); public uint Hash { get { uint raw_ret = pango_font_description_hash(Handle); uint ret = raw_ret; return ret; } } [UnmanagedFunctionPointer (CallingConvention.Cdecl)] delegate void d_pango_font_description_merge(IntPtr raw, IntPtr desc_to_merge, bool replace_existing); static d_pango_font_description_merge pango_font_description_merge = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_font_description_merge")); public void Merge(Pango.FontDescription desc_to_merge, bool replace_existing) { pango_font_description_merge(Handle, desc_to_merge == null ? IntPtr.Zero : desc_to_merge.Handle, replace_existing); } [UnmanagedFunctionPointer (CallingConvention.Cdecl)] delegate void d_pango_font_description_merge_static(IntPtr raw, IntPtr desc_to_merge, bool replace_existing); static d_pango_font_description_merge_static pango_font_description_merge_static = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_font_description_merge_static")); public void MergeStatic(Pango.FontDescription desc_to_merge, bool replace_existing) { pango_font_description_merge_static(Handle, desc_to_merge == null ? IntPtr.Zero : desc_to_merge.Handle, replace_existing); } [UnmanagedFunctionPointer (CallingConvention.Cdecl)] delegate void d_pango_font_description_set_absolute_size(IntPtr raw, double size); static d_pango_font_description_set_absolute_size pango_font_description_set_absolute_size = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_font_description_set_absolute_size")); public double AbsoluteSize { set { pango_font_description_set_absolute_size(Handle, value); } } [UnmanagedFunctionPointer (CallingConvention.Cdecl)] delegate void d_pango_font_description_set_family_static(IntPtr raw, IntPtr family); static d_pango_font_description_set_family_static pango_font_description_set_family_static = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_font_description_set_family_static")); public string FamilyStatic { set { IntPtr native_value = GLib.Marshaller.StringToPtrGStrdup (value); pango_font_description_set_family_static(Handle, native_value); GLib.Marshaller.Free (native_value); } } [UnmanagedFunctionPointer (CallingConvention.Cdecl)] delegate IntPtr d_pango_font_description_to_filename(IntPtr raw); static d_pango_font_description_to_filename pango_font_description_to_filename = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_font_description_to_filename")); public string ToFilename() { IntPtr raw_ret = pango_font_description_to_filename(Handle); string ret = GLib.Marshaller.PtrToStringGFree(raw_ret); return ret; } [UnmanagedFunctionPointer (CallingConvention.Cdecl)] delegate IntPtr d_pango_font_description_to_string(IntPtr raw); static d_pango_font_description_to_string pango_font_description_to_string = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_font_description_to_string")); public override string ToString() { IntPtr raw_ret = pango_font_description_to_string(Handle); string ret = GLib.Marshaller.PtrToStringGFree(raw_ret); return ret; } [UnmanagedFunctionPointer (CallingConvention.Cdecl)] delegate void d_pango_font_description_unset_fields(IntPtr raw, int to_unset); static d_pango_font_description_unset_fields pango_font_description_unset_fields = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_font_description_unset_fields")); public void UnsetFields(Pango.FontMask to_unset) { pango_font_description_unset_fields(Handle, (int) to_unset); } public FontDescription(IntPtr raw) : base(raw) {} [UnmanagedFunctionPointer (CallingConvention.Cdecl)] delegate IntPtr d_pango_font_description_new(); static d_pango_font_description_new pango_font_description_new = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_font_description_new")); public FontDescription () { Raw = pango_font_description_new(); } [UnmanagedFunctionPointer (CallingConvention.Cdecl)] delegate void d_pango_font_description_free(IntPtr raw); static d_pango_font_description_free pango_font_description_free = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_font_description_free")); protected override void Free (IntPtr raw) { pango_font_description_free (raw); } [Obsolete("Pango.FontDescription is now freed automatically")] public void Free () {} class FinalizerInfo { IntPtr handle; public uint timeoutHandlerId; public FinalizerInfo (IntPtr handle) { this.handle = handle; } public bool Handler () { pango_font_description_free (handle); GLib.Timeout.Remove(timeoutHandlerId); return false; } } ~FontDescription () { if (!Owned) return; FinalizerInfo info = new FinalizerInfo (Handle); info.timeoutHandlerId = GLib.Timeout.Add (50, new GLib.TimeoutHandler (info.Handler)); } // 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{ }); return _abi_info; } } // End of the ABI representation. #endregion } }