mirror of
https://github.com/Ryujinx/GtkSharp.git
synced 2024-12-23 20:15:30 +00:00
9abde602ec
Add GDate and GDateTime classes to glib, and map them in the generator's SymbolTable. (The types TimeZone and TimeVal are also added because the Date* types depend on them, but there is no need to map them in the generator.) Also move the TODOs of other auto-generated classes to a single TODO in the Makefile
146 lines
3.8 KiB
C#
146 lines
3.8 KiB
C#
// 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("libglib-2.0-0.dll", 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("libglib-2.0-0.dll", 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("libglib-2.0-0.dll", 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("libglib-2.0-0.dll", 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("libglib-2.0-0.dll", 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("libglib-2.0-0.dll", 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("libglib-2.0-0.dll", 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("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
|
|
static extern IntPtr g_time_zone_new_local();
|
|
|
|
public TimeZone ()
|
|
{
|
|
Raw = g_time_zone_new_local();
|
|
}
|
|
|
|
[DllImport("libglib-2.0-0.dll", 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("libglib-2.0-0.dll", 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("libglib-2.0-0.dll", 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
|
|
}
|
|
} |