// This file was generated by the Gtk# code generator. // Any changes made will be lost if regenerated. namespace GLib { using System; using System.Collections; using System.Collections.Generic; using System.Runtime.InteropServices; #region Autogenerated code public partial class TimeZone : GLib.Opaque { delegate IntPtr d_g_time_zone_get_type(); static d_g_time_zone_get_type g_time_zone_get_type = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_time_zone_get_type")); public static GLib.GType GType { get { IntPtr raw_ret = g_time_zone_get_type(); GLib.GType ret = new GLib.GType(raw_ret); return ret; } } delegate int d_g_time_zone_adjust_time(IntPtr raw, int type, long time_); static d_g_time_zone_adjust_time g_time_zone_adjust_time = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_time_zone_adjust_time")); public int AdjustTime(int type, long time_) { int raw_ret = g_time_zone_adjust_time(Handle, type, time_); int ret = raw_ret; return ret; } delegate int d_g_time_zone_find_interval(IntPtr raw, int type, long time_); static d_g_time_zone_find_interval g_time_zone_find_interval = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_time_zone_find_interval")); public int FindInterval(int type, long time_) { int raw_ret = g_time_zone_find_interval(Handle, type, time_); int ret = raw_ret; return ret; } delegate IntPtr d_g_time_zone_get_abbreviation(IntPtr raw, int interval); static d_g_time_zone_get_abbreviation g_time_zone_get_abbreviation = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_time_zone_get_abbreviation")); public string GetAbbreviation(int interval) { IntPtr raw_ret = g_time_zone_get_abbreviation(Handle, interval); string ret = GLib.Marshaller.Utf8PtrToString (raw_ret); return ret; } delegate int d_g_time_zone_get_offset(IntPtr raw, int interval); static d_g_time_zone_get_offset g_time_zone_get_offset = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_time_zone_get_offset")); public int GetOffset(int interval) { int raw_ret = g_time_zone_get_offset(Handle, interval); int ret = raw_ret; return ret; } delegate bool d_g_time_zone_is_dst(IntPtr raw, int interval); static d_g_time_zone_is_dst g_time_zone_is_dst = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_time_zone_is_dst")); public bool IsDst(int interval) { bool raw_ret = g_time_zone_is_dst(Handle, interval); bool ret = raw_ret; return ret; } public TimeZone(IntPtr raw) : base(raw) {} delegate IntPtr d_g_time_zone_new(IntPtr identifier); static d_g_time_zone_new g_time_zone_new = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_time_zone_new")); public TimeZone (string identifier) { IntPtr native_identifier = GLib.Marshaller.StringToPtrGStrdup (identifier); Raw = g_time_zone_new(native_identifier); GLib.Marshaller.Free (native_identifier); } delegate IntPtr d_g_time_zone_new_local(); static d_g_time_zone_new_local g_time_zone_new_local = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_time_zone_new_local")); public TimeZone () { Raw = g_time_zone_new_local(); } delegate IntPtr d_g_time_zone_new_utc(); static d_g_time_zone_new_utc g_time_zone_new_utc = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_time_zone_new_utc")); public static TimeZone NewUtc() { TimeZone result = new TimeZone (g_time_zone_new_utc()); return result; } delegate IntPtr d_g_time_zone_ref(IntPtr raw); static d_g_time_zone_ref g_time_zone_ref = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_time_zone_ref")); protected override void Ref (IntPtr raw) { if (!Owned) { g_time_zone_ref (raw); Owned = true; } } delegate void d_g_time_zone_unref(IntPtr raw); static d_g_time_zone_unref g_time_zone_unref = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_time_zone_unref")); protected override void Unref (IntPtr raw) { if (Owned) { g_time_zone_unref (raw); Owned = false; } } class FinalizerInfo { IntPtr handle; public FinalizerInfo (IntPtr handle) { this.handle = handle; } public bool Handler () { g_time_zone_unref (handle); return false; } } ~TimeZone () { if (!Owned) return; FinalizerInfo info = new FinalizerInfo (Handle); GLib.Timeout.Add (50, new GLib.TimeoutHandler (info.Handler)); } #endregion } }