1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146
|
// 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 {
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr 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;
}
}
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern int g_time_zone_adjust_time(IntPtr raw, int type, long 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;
}
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern int g_time_zone_find_interval(IntPtr raw, int type, long time_);
public int FindInterval(int type, long time_) {
int raw_ret = g_time_zone_find_interval(Handle, type, time_);
int ret = raw_ret;
return ret;
}
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr g_time_zone_get_abbreviation(IntPtr raw, int interval);
public string GetAbbreviation(int interval) {
IntPtr raw_ret = g_time_zone_get_abbreviation(Handle, interval);
string ret = GLib.Marshaller.Utf8PtrToString (raw_ret);
return ret;
}
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern int g_time_zone_get_offset(IntPtr raw, int interval);
public int GetOffset(int interval) {
int raw_ret = g_time_zone_get_offset(Handle, interval);
int ret = raw_ret;
return ret;
}
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern bool g_time_zone_is_dst(IntPtr raw, int interval);
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) {}
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr g_time_zone_new(IntPtr identifier);
public TimeZone (string identifier)
{
IntPtr native_identifier = GLib.Marshaller.StringToPtrGStrdup (identifier);
Raw = g_time_zone_new(native_identifier);
GLib.Marshaller.Free (native_identifier);
}
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr g_time_zone_new_local();
public TimeZone ()
{
Raw = g_time_zone_new_local();
}
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr g_time_zone_new_utc();
public static TimeZone NewUtc()
{
TimeZone result = new TimeZone (g_time_zone_new_utc());
return result;
}
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr g_time_zone_ref(IntPtr raw);
protected override void Ref (IntPtr raw)
{
if (!Owned) {
g_time_zone_ref (raw);
Owned = true;
}
}
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern void g_time_zone_unref(IntPtr raw);
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
}
}
|