glib: Make all DllImports in custom code use a common const

This way there's less redundancy, and if the library name changes in the
future, it will be changed only in one place.

Signed-off-by: Bertrand Lorentz <bertrand.lorentz@gmail.com>
This commit is contained in:
Andrés G. Aragoneses 2013-11-05 11:12:27 +01:00 committed by Bertrand Lorentz
parent d6f06860fb
commit f1005da47c
43 changed files with 506 additions and 503 deletions

View File

@ -30,10 +30,10 @@ namespace GLib {
IntPtr handle;
bool add_progname = false;
[DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr g_malloc(IntPtr size);
[DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern void g_free (IntPtr mem);
~Argv ()

View File

@ -11,42 +11,42 @@ namespace GLib {
#region Autogenerated code
public partial class Cond : GLib.Opaque {
[DllImport("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern void g_cond_broadcast(IntPtr raw);
public void Broadcast() {
g_cond_broadcast(Handle);
}
[DllImport("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern void g_cond_clear(IntPtr raw);
public void Clear() {
g_cond_clear(Handle);
}
[DllImport("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern void g_cond_init(IntPtr raw);
public void Init() {
g_cond_init(Handle);
}
[DllImport("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern void g_cond_signal(IntPtr raw);
public void Signal() {
g_cond_signal(Handle);
}
[DllImport("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern void g_cond_wait(IntPtr raw, IntPtr mutex);
public void Wait(GLib.Mutex mutex) {
g_cond_wait(Handle, mutex == null ? IntPtr.Zero : mutex.Handle);
}
[DllImport("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern bool g_cond_wait_until(IntPtr raw, IntPtr mutex, long end_time);
public bool WaitUntil(GLib.Mutex mutex, long end_time) {

View File

@ -11,7 +11,7 @@ namespace GLib {
#region Autogenerated code
public partial class Date : GLib.Opaque {
[DllImport("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr g_date_get_type();
public static GLib.GType GType {
@ -22,42 +22,42 @@ namespace GLib {
}
}
[DllImport("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern void g_date_add_days(IntPtr raw, uint n_days);
public void AddDays(uint n_days) {
g_date_add_days(Handle, n_days);
}
[DllImport("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern void g_date_add_months(IntPtr raw, uint n_months);
public void AddMonths(uint n_months) {
g_date_add_months(Handle, n_months);
}
[DllImport("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern void g_date_add_years(IntPtr raw, uint n_years);
public void AddYears(uint n_years) {
g_date_add_years(Handle, n_years);
}
[DllImport("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern void g_date_clamp(IntPtr raw, IntPtr min_date, IntPtr max_date);
public void Clamp(GLib.Date min_date, GLib.Date max_date) {
g_date_clamp(Handle, min_date == null ? IntPtr.Zero : min_date.Handle, max_date == null ? IntPtr.Zero : max_date.Handle);
}
[DllImport("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern void g_date_clear(IntPtr raw, uint n_dates);
public void Clear(uint n_dates) {
g_date_clear(Handle, n_dates);
}
[DllImport("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern int g_date_compare(IntPtr raw, IntPtr rhs);
public int Compare(GLib.Date rhs) {
@ -66,7 +66,7 @@ namespace GLib {
return ret;
}
[DllImport("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern int g_date_days_between(IntPtr raw, IntPtr date2);
public int DaysBetween(GLib.Date date2) {
@ -75,10 +75,10 @@ namespace GLib {
return ret;
}
[DllImport("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern byte g_date_get_day(IntPtr raw);
[DllImport("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern void g_date_set_day(IntPtr raw, byte day);
public byte Day {
@ -92,7 +92,7 @@ namespace GLib {
}
}
[DllImport("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern uint g_date_get_day_of_year(IntPtr raw);
public uint DayOfYear {
@ -103,7 +103,7 @@ namespace GLib {
}
}
[DllImport("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern uint g_date_get_iso8601_week_of_year(IntPtr raw);
public uint Iso8601WeekOfYear {
@ -114,10 +114,10 @@ namespace GLib {
}
}
[DllImport("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern uint g_date_get_julian(IntPtr raw);
[DllImport("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern void g_date_set_julian(IntPtr raw, uint julian_date);
public uint Julian {
@ -131,7 +131,7 @@ namespace GLib {
}
}
[DllImport("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern uint g_date_get_monday_week_of_year(IntPtr raw);
public uint MondayWeekOfYear {
@ -142,10 +142,10 @@ namespace GLib {
}
}
[DllImport("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern int g_date_get_month(IntPtr raw);
[DllImport("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern void g_date_set_month(IntPtr raw, int month);
public int Month {
@ -159,7 +159,7 @@ namespace GLib {
}
}
[DllImport("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern uint g_date_get_sunday_week_of_year(IntPtr raw);
public uint SundayWeekOfYear {
@ -170,7 +170,7 @@ namespace GLib {
}
}
[DllImport("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern int g_date_get_weekday(IntPtr raw);
public int Weekday {
@ -181,10 +181,10 @@ namespace GLib {
}
}
[DllImport("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern ushort g_date_get_year(IntPtr raw);
[DllImport("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern void g_date_set_year(IntPtr raw, ushort year);
public ushort Year {
@ -198,7 +198,7 @@ namespace GLib {
}
}
[DllImport("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern bool g_date_is_first_of_month(IntPtr raw);
public bool IsFirstOfMonth {
@ -209,7 +209,7 @@ namespace GLib {
}
}
[DllImport("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern bool g_date_is_last_of_month(IntPtr raw);
public bool IsLastOfMonth {
@ -220,21 +220,21 @@ namespace GLib {
}
}
[DllImport("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern void g_date_order(IntPtr raw, IntPtr date2);
public void Order(GLib.Date date2) {
g_date_order(Handle, date2 == null ? IntPtr.Zero : date2.Handle);
}
[DllImport("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern void g_date_set_dmy(IntPtr raw, byte day, int month, ushort y);
public void SetDmy(byte day, int month, ushort y) {
g_date_set_dmy(Handle, day, month, y);
}
[DllImport("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern void g_date_set_parse(IntPtr raw, IntPtr str);
public string Parse {
@ -245,7 +245,7 @@ namespace GLib {
}
}
[DllImport("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern void g_date_set_time(IntPtr raw, int time_);
[Obsolete]
@ -255,7 +255,7 @@ namespace GLib {
}
}
[DllImport("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern void g_date_set_time_t(IntPtr raw, IntPtr timet);
public long TimeT {
@ -264,7 +264,7 @@ namespace GLib {
}
}
[DllImport("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern void g_date_set_time_val(IntPtr raw, IntPtr value);
public GLib.TimeVal TimeVal {
@ -276,35 +276,35 @@ namespace GLib {
}
}
[DllImport("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern void g_date_subtract_days(IntPtr raw, uint n_days);
public void SubtractDays(uint n_days) {
g_date_subtract_days(Handle, n_days);
}
[DllImport("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern void g_date_subtract_months(IntPtr raw, uint n_months);
public void SubtractMonths(uint n_months) {
g_date_subtract_months(Handle, n_months);
}
[DllImport("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern void g_date_subtract_years(IntPtr raw, uint n_years);
public void SubtractYears(uint n_years) {
g_date_subtract_years(Handle, n_years);
}
[DllImport("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern void g_date_to_struct_tm(IntPtr raw, IntPtr tm);
public void ToStructTm(IntPtr tm) {
g_date_to_struct_tm(Handle, tm);
}
[DllImport("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern bool g_date_valid(IntPtr raw);
public bool Valid() {
@ -313,7 +313,7 @@ namespace GLib {
return ret;
}
[DllImport("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern byte g_date_get_days_in_month(int month, ushort year);
public static byte GetDaysInMonth(int month, ushort year) {
@ -322,7 +322,7 @@ namespace GLib {
return ret;
}
[DllImport("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern byte g_date_get_monday_weeks_in_year(ushort year);
public static byte GetMondayWeeksInYear(ushort year) {
@ -331,7 +331,7 @@ namespace GLib {
return ret;
}
[DllImport("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern byte g_date_get_sunday_weeks_in_year(ushort year);
public static byte GetSundayWeeksInYear(ushort year) {
@ -340,7 +340,7 @@ namespace GLib {
return ret;
}
[DllImport("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern bool g_date_is_leap_year(ushort year);
public static bool IsLeapYear(ushort year) {
@ -349,7 +349,7 @@ namespace GLib {
return ret;
}
[DllImport("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern UIntPtr g_date_strftime(IntPtr s, UIntPtr slen, IntPtr format, IntPtr date);
public static ulong Strftime(string s, string format, GLib.Date date) {
@ -362,7 +362,7 @@ namespace GLib {
return ret;
}
[DllImport("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern bool g_date_valid_day(byte day);
public static bool ValidDay(byte day) {
@ -371,7 +371,7 @@ namespace GLib {
return ret;
}
[DllImport("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern bool g_date_valid_dmy(byte day, int month, ushort year);
public static bool ValidDmy(byte day, int month, ushort year) {
@ -380,7 +380,7 @@ namespace GLib {
return ret;
}
[DllImport("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern bool g_date_valid_julian(uint julian_date);
public static bool ValidJulian(uint julian_date) {
@ -389,7 +389,7 @@ namespace GLib {
return ret;
}
[DllImport("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern bool g_date_valid_month(int month);
public static bool ValidMonth(int month) {
@ -398,7 +398,7 @@ namespace GLib {
return ret;
}
[DllImport("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern bool g_date_valid_weekday(int weekday);
public static bool ValidWeekday(int weekday) {
@ -407,7 +407,7 @@ namespace GLib {
return ret;
}
[DllImport("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern bool g_date_valid_year(ushort year);
public static bool ValidYear(ushort year) {
@ -418,7 +418,7 @@ namespace GLib {
public Date(IntPtr raw) : base(raw) {}
[DllImport("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr g_date_new();
public Date ()
@ -426,7 +426,7 @@ namespace GLib {
Raw = g_date_new();
}
[DllImport("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr g_date_new_dmy(byte day, int month, ushort year);
public Date (byte day, int month, ushort year)
@ -434,7 +434,7 @@ namespace GLib {
Raw = g_date_new_dmy(day, month, year);
}
[DllImport("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr g_date_new_julian(uint julian_day);
public Date (uint julian_day)
@ -442,7 +442,7 @@ namespace GLib {
Raw = g_date_new_julian(julian_day);
}
[DllImport("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern void g_date_free(IntPtr raw);
protected override void Free (IntPtr raw)

View File

@ -11,7 +11,7 @@ namespace GLib {
#region Autogenerated code
public partial class DateTime : GLib.Opaque {
[DllImport("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr g_date_time_get_type();
public static GLib.GType GType {
@ -22,7 +22,7 @@ namespace GLib {
}
}
[DllImport("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr g_date_time_add(IntPtr raw, long timespan);
public GLib.DateTime Add(long timespan) {
@ -31,7 +31,7 @@ namespace GLib {
return ret;
}
[DllImport("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr g_date_time_add_days(IntPtr raw, int days);
public GLib.DateTime AddDays(int days) {
@ -40,7 +40,7 @@ namespace GLib {
return ret;
}
[DllImport("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr g_date_time_add_full(IntPtr raw, int years, int months, int days, int hours, int minutes, double seconds);
public GLib.DateTime AddFull(int years, int months, int days, int hours, int minutes, double seconds) {
@ -49,7 +49,7 @@ namespace GLib {
return ret;
}
[DllImport("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr g_date_time_add_hours(IntPtr raw, int hours);
public GLib.DateTime AddHours(int hours) {
@ -58,7 +58,7 @@ namespace GLib {
return ret;
}
[DllImport("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr g_date_time_add_minutes(IntPtr raw, int minutes);
public GLib.DateTime AddMinutes(int minutes) {
@ -67,7 +67,7 @@ namespace GLib {
return ret;
}
[DllImport("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr g_date_time_add_months(IntPtr raw, int months);
public GLib.DateTime AddMonths(int months) {
@ -76,7 +76,7 @@ namespace GLib {
return ret;
}
[DllImport("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr g_date_time_add_seconds(IntPtr raw, double seconds);
public GLib.DateTime AddSeconds(double seconds) {
@ -85,7 +85,7 @@ namespace GLib {
return ret;
}
[DllImport("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr g_date_time_add_weeks(IntPtr raw, int weeks);
public GLib.DateTime AddWeeks(int weeks) {
@ -94,7 +94,7 @@ namespace GLib {
return ret;
}
[DllImport("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr g_date_time_add_years(IntPtr raw, int years);
public GLib.DateTime AddYears(int years) {
@ -103,7 +103,7 @@ namespace GLib {
return ret;
}
[DllImport("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern long g_date_time_difference(IntPtr raw, IntPtr begin);
public long Difference(GLib.DateTime begin) {
@ -112,7 +112,7 @@ namespace GLib {
return ret;
}
[DllImport("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr g_date_time_format(IntPtr raw, IntPtr format);
public string Format(string format) {
@ -123,7 +123,7 @@ namespace GLib {
return ret;
}
[DllImport("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern int g_date_time_get_day_of_month(IntPtr raw);
public int DayOfMonth {
@ -134,7 +134,7 @@ namespace GLib {
}
}
[DllImport("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern int g_date_time_get_day_of_week(IntPtr raw);
public int DayOfWeek {
@ -145,7 +145,7 @@ namespace GLib {
}
}
[DllImport("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern int g_date_time_get_day_of_year(IntPtr raw);
public int DayOfYear {
@ -156,7 +156,7 @@ namespace GLib {
}
}
[DllImport("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern int g_date_time_get_hour(IntPtr raw);
public int Hour {
@ -167,7 +167,7 @@ namespace GLib {
}
}
[DllImport("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern int g_date_time_get_microsecond(IntPtr raw);
public int Microsecond {
@ -178,7 +178,7 @@ namespace GLib {
}
}
[DllImport("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern int g_date_time_get_minute(IntPtr raw);
public int Minute {
@ -189,7 +189,7 @@ namespace GLib {
}
}
[DllImport("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern int g_date_time_get_month(IntPtr raw);
public int Month {
@ -200,7 +200,7 @@ namespace GLib {
}
}
[DllImport("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern int g_date_time_get_second(IntPtr raw);
public int Second {
@ -211,7 +211,7 @@ namespace GLib {
}
}
[DllImport("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern double g_date_time_get_seconds(IntPtr raw);
public double Seconds {
@ -222,7 +222,7 @@ namespace GLib {
}
}
[DllImport("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr g_date_time_get_timezone_abbreviation(IntPtr raw);
public string TimezoneAbbreviation {
@ -233,7 +233,7 @@ namespace GLib {
}
}
[DllImport("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern long g_date_time_get_utc_offset(IntPtr raw);
public long UtcOffset {
@ -244,7 +244,7 @@ namespace GLib {
}
}
[DllImport("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern int g_date_time_get_week_numbering_year(IntPtr raw);
public int WeekNumberingYear {
@ -255,7 +255,7 @@ namespace GLib {
}
}
[DllImport("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern int g_date_time_get_week_of_year(IntPtr raw);
public int WeekOfYear {
@ -266,7 +266,7 @@ namespace GLib {
}
}
[DllImport("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern int g_date_time_get_year(IntPtr raw);
public int Year {
@ -277,14 +277,14 @@ namespace GLib {
}
}
[DllImport("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern void g_date_time_get_ymd(IntPtr raw, out int year, out int month, out int day);
public void GetYmd(out int year, out int month, out int day) {
g_date_time_get_ymd(Handle, out year, out month, out day);
}
[DllImport("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern bool g_date_time_is_daylight_savings(IntPtr raw);
public bool IsDaylightSavings {
@ -295,7 +295,7 @@ namespace GLib {
}
}
[DllImport("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr g_date_time_to_local(IntPtr raw);
public GLib.DateTime ToLocal() {
@ -304,7 +304,7 @@ namespace GLib {
return ret;
}
[DllImport("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern bool g_date_time_to_timeval(IntPtr raw, IntPtr tv);
public bool ToTimeval(GLib.TimeVal tv) {
@ -316,7 +316,7 @@ namespace GLib {
return ret;
}
[DllImport("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr g_date_time_to_timezone(IntPtr raw, IntPtr tz);
public GLib.DateTime ToTimezone(GLib.TimeZone tz) {
@ -325,7 +325,7 @@ namespace GLib {
return ret;
}
[DllImport("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern long g_date_time_to_unix(IntPtr raw);
public long ToUnix() {
@ -334,7 +334,7 @@ namespace GLib {
return ret;
}
[DllImport("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr g_date_time_to_utc(IntPtr raw);
public GLib.DateTime ToUtc() {
@ -343,7 +343,7 @@ namespace GLib {
return ret;
}
[DllImport("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern int g_date_time_compare(IntPtr dt1, IntPtr dt2);
public static int Compare(IntPtr dt1, IntPtr dt2) {
@ -352,7 +352,7 @@ namespace GLib {
return ret;
}
[DllImport("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern bool g_date_time_equal(IntPtr dt1, IntPtr dt2);
public static bool Equal(IntPtr dt1, IntPtr dt2) {
@ -361,7 +361,7 @@ namespace GLib {
return ret;
}
[DllImport("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern uint g_date_time_hash(IntPtr datetime);
public static uint Hash(IntPtr datetime) {
@ -372,7 +372,7 @@ namespace GLib {
public DateTime(IntPtr raw) : base(raw) {}
[DllImport("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr g_date_time_new(IntPtr tz, int year, int month, int day, int hour, int minute, double seconds);
public DateTime (GLib.TimeZone tz, int year, int month, int day, int hour, int minute, double seconds)
@ -380,7 +380,7 @@ namespace GLib {
Raw = g_date_time_new(tz == null ? IntPtr.Zero : tz.Handle, year, month, day, hour, minute, seconds);
}
[DllImport("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr g_date_time_new_from_timeval_local(IntPtr tv);
public DateTime (GLib.TimeVal tv)
@ -391,7 +391,7 @@ namespace GLib {
Marshal.FreeHGlobal (native_tv);
}
[DllImport("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr g_date_time_new_from_timeval_utc(IntPtr tv);
public static DateTime NewFromTimevalUtc(GLib.TimeVal tv)
@ -403,7 +403,7 @@ namespace GLib {
return result;
}
[DllImport("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr g_date_time_new_from_unix_local(long t);
public DateTime (long t)
@ -411,7 +411,7 @@ namespace GLib {
Raw = g_date_time_new_from_unix_local(t);
}
[DllImport("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr g_date_time_new_from_unix_utc(long t);
public static DateTime NewFromUnixUtc(long t)
@ -420,7 +420,7 @@ namespace GLib {
return result;
}
[DllImport("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr g_date_time_new_local(int year, int month, int day, int hour, int minute, double seconds);
public DateTime (int year, int month, int day, int hour, int minute, double seconds)
@ -428,7 +428,7 @@ namespace GLib {
Raw = g_date_time_new_local(year, month, day, hour, minute, seconds);
}
[DllImport("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr g_date_time_new_now(IntPtr tz);
public DateTime (GLib.TimeZone tz)
@ -436,7 +436,7 @@ namespace GLib {
Raw = g_date_time_new_now(tz == null ? IntPtr.Zero : tz.Handle);
}
[DllImport("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr g_date_time_new_now_local();
public DateTime ()
@ -444,7 +444,7 @@ namespace GLib {
Raw = g_date_time_new_now_local();
}
[DllImport("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr g_date_time_new_now_utc();
public static DateTime NewNowUtc()
@ -453,7 +453,7 @@ namespace GLib {
return result;
}
[DllImport("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr g_date_time_new_utc(int year, int month, int day, int hour, int minute, double seconds);
public static DateTime NewUtc(int year, int month, int day, int hour, int minute, double seconds)
@ -462,7 +462,7 @@ namespace GLib {
return result;
}
[DllImport("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr g_date_time_ref(IntPtr raw);
protected override void Ref (IntPtr raw)
@ -473,7 +473,7 @@ namespace GLib {
}
}
[DllImport("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern void g_date_time_unref(IntPtr raw);
protected override void Unref (IntPtr raw)

View File

@ -26,10 +26,10 @@ namespace GLib {
public class FileUtils
{
[DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
extern static bool g_file_get_contents (IntPtr filename, out IntPtr contents, out int length, out IntPtr error);
[DllImport("libglib-2.0-0.dll")]
[DllImport (Global.GLibNativeDll)]
extern static bool g_file_get_contents_utf8 (IntPtr filename, out IntPtr contents, out int length, out IntPtr error);
public static string GetFileContents (string filename)

View File

@ -60,7 +60,7 @@ namespace GLib {
}
}
[DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern void g_clear_error (ref IntPtr errptr);
~GException ()
{

View File

@ -27,7 +27,7 @@ namespace GLib {
IntPtr handle;
[DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr g_string_free (IntPtr mem, bool free_segments);
~GString ()
@ -35,7 +35,7 @@ namespace GLib {
g_string_free (handle, true);
}
[DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr g_string_new (IntPtr text);
public GString (string text)

22
glib/GType.cs Executable file → Normal file
View File

@ -416,37 +416,37 @@ namespace GLib {
return GType.Is (ValFromInstancePtr (raw), this);
}
[DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr g_type_class_peek (IntPtr gtype);
[DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr g_type_class_ref (IntPtr gtype);
[DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr g_type_default_interface_peek (IntPtr gtype);
[DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr g_type_default_interface_ref (IntPtr gtype);
[DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr g_type_from_name (string name);
[DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern void g_type_init ();
[DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr g_type_name (IntPtr raw);
[DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr g_type_parent (IntPtr type);
[DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern void g_type_query (IntPtr type, out GTypeQuery query);
[DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr g_type_register_static (IntPtr parent, IntPtr name, ref GTypeInfo info, int flags);
[DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern bool g_type_is_a (IntPtr type, IntPtr is_a_type);
}
}

View File

@ -31,6 +31,9 @@ namespace GLib {
//this is a static class
private Global () {}
internal const string GLibNativeDll = "libglib-2.0-0.dll";
internal const string GObjectNativeDll = "libgobject-2.0-0.dll";
internal static bool IsWindowsPlatform {
get {
switch (Environment.OSVersion.Platform) {
@ -56,10 +59,10 @@ namespace GLib {
}
}
[DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern void g_set_prgname (IntPtr name);
[DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr g_get_prgname ();
public static string ApplicationName {
@ -73,13 +76,13 @@ namespace GLib {
}
}
[DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern void g_set_application_name (IntPtr name);
[DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr g_get_application_name ();
[DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr g_format_size_for_display (long size);
static public string FormatSizeForDisplay (long size)

View File

@ -323,103 +323,103 @@ namespace GLib {
return (IOChannelError) g_io_channel_error_from_errno (en);
}
[DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr g_io_channel_unix_new (int fd);
[DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr g_io_channel_new_file (IntPtr filename, IntPtr mode, out IntPtr error);
[DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr g_io_channel_new_file_utf8 (IntPtr filename, IntPtr mode, out IntPtr error);
[DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern int g_io_channel_error_quark ();
[DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern int g_io_channel_error_from_errno (int en);
[DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern int g_io_channel_flush (IntPtr raw, out IntPtr error);
[DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern void g_io_channel_init (IntPtr raw);
[DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern int g_io_channel_read_chars (IntPtr raw, byte[] buf, UIntPtr count, out UIntPtr bytes_read, out IntPtr error);
[DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern int g_io_channel_read_line (IntPtr raw, out IntPtr str_return, IntPtr length, out UIntPtr terminator_pos, out IntPtr error);
[DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern int g_io_channel_read_to_end (IntPtr raw, out IntPtr str_return, out UIntPtr length, out IntPtr error);
[DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern int g_io_channel_read_unichar (IntPtr raw, out uint thechar, out IntPtr error);
[DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern int g_io_channel_seek_position (IntPtr raw, long offset, int type, out IntPtr error);
[DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern int g_io_channel_shutdown (IntPtr raw, bool flush, out IntPtr err);
[DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern int g_io_channel_write_chars (IntPtr raw, byte[] buf, IntPtr count, out UIntPtr bytes_written, out IntPtr error);
[DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern int g_io_channel_write_unichar (IntPtr raw, uint thechar, out IntPtr error);
[DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern int g_io_channel_get_buffer_condition (IntPtr raw);
[DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern bool g_io_channel_get_buffered (IntPtr raw);
[DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern void g_io_channel_set_buffered (IntPtr raw, bool buffered);
[DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern UIntPtr g_io_channel_get_buffer_size (IntPtr raw);
[DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern void g_io_channel_set_buffer_size (IntPtr raw, UIntPtr size);
[DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern bool g_io_channel_get_close_on_unref (IntPtr raw);
[DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern void g_io_channel_set_close_on_unref (IntPtr raw, bool do_close);
[DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr g_io_channel_get_encoding (IntPtr raw);
[DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern int g_io_channel_set_encoding (IntPtr raw, IntPtr encoding, out IntPtr error);
[DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern int g_io_channel_get_flags (IntPtr raw);
[DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern int g_io_channel_set_flags (IntPtr raw, int flags, out IntPtr error);
[DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr g_io_channel_get_line_term (IntPtr raw, out int length);
[DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern void g_io_channel_set_line_term (IntPtr raw, byte[] term, int length);
[DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern int g_io_channel_unix_get_fd (IntPtr raw);
[DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr g_io_channel_ref (IntPtr raw);
[DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern void g_io_channel_unref (IntPtr raw);
[DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern uint g_io_add_watch_full (IntPtr raw, int priority, int condition, IOFuncNative func, IntPtr user_data, DestroyNotify notify);
[DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr g_io_create_watch (IntPtr raw, int condition);
}

6
glib/Idle.cs Executable file → Normal file
View File

@ -89,7 +89,7 @@ namespace GLib {
{
}
[DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern uint g_idle_add (IdleHandlerInternal d, IntPtr data);
public static uint Add (IdleHandler hndlr)
@ -102,7 +102,7 @@ namespace GLib {
return p.ID;
}
[DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern uint g_idle_add_full (int priority, IdleHandlerInternal d, IntPtr data, DestroyNotify notify);
public static uint Add (IdleHandler hndlr, Priority priority)
@ -115,7 +115,7 @@ namespace GLib {
return p.ID;
}
[DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern bool g_source_remove (uint id);
public static void Remove (uint id)

View File

@ -33,7 +33,7 @@ namespace GLib {
}
}
[DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)]
private static extern void g_object_ref_sink (IntPtr raw);
protected override IntPtr Raw {
@ -47,13 +47,13 @@ namespace GLib {
}
}
[DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern bool g_object_is_floating (IntPtr raw);
[DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern void g_object_force_floating (IntPtr raw);
[DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern void g_object_unref (IntPtr raw);
public bool IsFloating {

View File

@ -43,8 +43,6 @@ namespace GLib {
public class KeyFile {
const string dll = "libglib-2.0-0.dll";
IntPtr handle;
bool owned;
@ -540,124 +538,124 @@ namespace GLib {
return ret;
}
[DllImport (dll)]
[DllImport (Global.GLibNativeDll)]
static extern void g_key_file_free (IntPtr raw);
[DllImport (dll)]
[DllImport (Global.GLibNativeDll)]
static extern bool g_key_file_get_boolean (IntPtr raw, IntPtr group_name, IntPtr key, out IntPtr error);
[DllImport (dll)]
[DllImport (Global.GLibNativeDll)]
static extern IntPtr g_key_file_get_boolean_list (IntPtr raw, IntPtr group_name, IntPtr key, out UIntPtr length, out IntPtr error);
[DllImport (dll)]
[DllImport (Global.GLibNativeDll)]
static extern IntPtr g_key_file_get_comment (IntPtr raw, IntPtr group_name, IntPtr key, out IntPtr error);
[DllImport (dll)]
[DllImport (Global.GLibNativeDll)]
static extern double g_key_file_get_double (IntPtr raw, IntPtr group_name, IntPtr key, out IntPtr error);
[DllImport (dll)]
[DllImport (Global.GLibNativeDll)]
static extern IntPtr g_key_file_get_double_list (IntPtr raw, IntPtr group_name, IntPtr key, out UIntPtr length, out IntPtr error);
[DllImport (dll)]
[DllImport (Global.GLibNativeDll)]
static extern IntPtr g_key_file_get_groups (IntPtr raw, IntPtr dummy);
[DllImport (dll)]
[DllImport (Global.GLibNativeDll)]
static extern int g_key_file_get_integer (IntPtr raw, IntPtr group_name, IntPtr key, out IntPtr error);
[DllImport (dll)]
[DllImport (Global.GLibNativeDll)]
static extern IntPtr g_key_file_get_integer_list (IntPtr raw, IntPtr group_name, IntPtr key, out UIntPtr length, out IntPtr error);
[DllImport (dll)]
[DllImport (Global.GLibNativeDll)]
static extern IntPtr g_key_file_get_keys (IntPtr raw, IntPtr group_name, IntPtr dummy, out IntPtr error);
[DllImport (dll)]
[DllImport (Global.GLibNativeDll)]
static extern IntPtr g_key_file_get_locale_string (IntPtr raw, IntPtr group_name, IntPtr key, IntPtr locale, out IntPtr error);
[DllImport (dll)]
[DllImport (Global.GLibNativeDll)]
static extern IntPtr g_key_file_get_locale_string_list (IntPtr raw, IntPtr group_name, IntPtr key, IntPtr locale, IntPtr dummy, out IntPtr error);
[DllImport (dll)]
[DllImport (Global.GLibNativeDll)]
static extern IntPtr g_key_file_get_start_group (IntPtr raw);
[DllImport (dll)]
[DllImport (Global.GLibNativeDll)]
static extern IntPtr g_key_file_get_string (IntPtr raw, IntPtr group_name, IntPtr key, out IntPtr error);
[DllImport (dll)]
[DllImport (Global.GLibNativeDll)]
static extern IntPtr g_key_file_get_string_list (IntPtr raw, IntPtr group_name, IntPtr key, IntPtr dummy, out IntPtr error);
[DllImport (dll)]
[DllImport (Global.GLibNativeDll)]
static extern IntPtr g_key_file_get_value (IntPtr raw, IntPtr group_name, IntPtr key, out IntPtr error);
[DllImport (dll)]
[DllImport (Global.GLibNativeDll)]
static extern bool g_key_file_has_group (IntPtr raw, IntPtr group_name);
[DllImport (dll)]
[DllImport (Global.GLibNativeDll)]
static extern bool g_key_file_has_key (IntPtr raw, IntPtr group_name, IntPtr key, out IntPtr error);
[DllImport (dll)]
[DllImport (Global.GLibNativeDll)]
static extern bool g_key_file_load_from_data (IntPtr raw, byte[] data, UIntPtr length, int flags, out IntPtr error);
[DllImport (dll)]
[DllImport (Global.GLibNativeDll)]
static extern bool g_key_file_load_from_data_dirs (IntPtr raw, IntPtr file, out IntPtr full_path, int flags, out IntPtr error);
[DllImport (dll)]
[DllImport (Global.GLibNativeDll)]
static extern bool g_key_file_load_from_dirs (IntPtr raw, IntPtr file, IntPtr search_dirs, out IntPtr full_path, int flags, out IntPtr error);
[DllImport (dll)]
[DllImport (Global.GLibNativeDll)]
static extern bool g_key_file_load_from_file (IntPtr raw, IntPtr file, int flags, out IntPtr error);
[DllImport (dll)]
[DllImport (Global.GLibNativeDll)]
static extern IntPtr g_key_file_new ();
[DllImport (dll)]
[DllImport (Global.GLibNativeDll)]
static extern bool g_key_file_remove_comment (IntPtr raw, IntPtr group_name, IntPtr key, out IntPtr error);
[DllImport (dll)]
[DllImport (Global.GLibNativeDll)]
static extern bool g_key_file_remove_group (IntPtr raw, IntPtr group_name, out IntPtr error);
[DllImport (dll)]
[DllImport (Global.GLibNativeDll)]
static extern bool g_key_file_remove_key (IntPtr raw, IntPtr group_name, IntPtr key, out IntPtr error);
[DllImport (dll)]
[DllImport (Global.GLibNativeDll)]
static extern void g_key_file_set_boolean (IntPtr raw, IntPtr group_name, IntPtr key, bool value);
[DllImport (dll)]
[DllImport (Global.GLibNativeDll)]
static extern void g_key_file_set_boolean_list (IntPtr raw, IntPtr group_name, IntPtr key, bool[] list, UIntPtr n_list);
[DllImport (dll)]
[DllImport (Global.GLibNativeDll)]
static extern bool g_key_file_set_comment (IntPtr raw, IntPtr group_name, IntPtr key, IntPtr comment, out IntPtr error);
[DllImport (dll)]
[DllImport (Global.GLibNativeDll)]
static extern void g_key_file_set_double (IntPtr raw, IntPtr group_name, IntPtr key, double value);
[DllImport (dll)]
[DllImport (Global.GLibNativeDll)]
static extern void g_key_file_set_double_list (IntPtr raw, IntPtr group_name, IntPtr key, double[] list, UIntPtr n_list);
[DllImport (dll)]
[DllImport (Global.GLibNativeDll)]
static extern void g_key_file_set_integer (IntPtr raw, IntPtr group_name, IntPtr key, int value);
[DllImport (dll)]
[DllImport (Global.GLibNativeDll)]
static extern void g_key_file_set_integer_list (IntPtr raw, IntPtr group_name, IntPtr key, int[] list, UIntPtr n_list);
[DllImport (dll)]
[DllImport (Global.GLibNativeDll)]
static extern void g_key_file_set_list_separator (IntPtr raw, byte separator);
[DllImport (dll)]
[DllImport (Global.GLibNativeDll)]
static extern void g_key_file_set_locale_string (IntPtr raw, IntPtr group_name, IntPtr key, IntPtr locale, IntPtr value);
[DllImport (dll)]
[DllImport (Global.GLibNativeDll)]
static extern void g_key_file_set_locale_string_list (IntPtr raw, IntPtr group_name, IntPtr key, IntPtr locale, IntPtr list, UIntPtr length);
[DllImport (dll)]
[DllImport (Global.GLibNativeDll)]
static extern void g_key_file_set_string (IntPtr raw, IntPtr group_name, IntPtr key, IntPtr value);
[DllImport (dll)]
[DllImport (Global.GLibNativeDll)]
static extern void g_key_file_set_string_list (IntPtr raw, IntPtr group_name, IntPtr key, IntPtr list, UIntPtr n_list);
[DllImport (dll)]
[DllImport (Global.GLibNativeDll)]
static extern void g_key_file_set_value (IntPtr raw, IntPtr group_name, IntPtr key, IntPtr value);
[DllImport (dll)]
[DllImport (Global.GLibNativeDll)]
static extern IntPtr g_key_file_to_data (IntPtr raw, out UIntPtr length, IntPtr dummy);
}

View File

@ -26,7 +26,7 @@ namespace GLib {
public class List : ListBase {
[DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr g_list_copy (IntPtr l);
public override object Clone ()
@ -34,7 +34,7 @@ namespace GLib {
return new List (g_list_copy (Handle));
}
[DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern int g_list_length (IntPtr l);
internal override int Length (IntPtr list)
@ -42,7 +42,7 @@ namespace GLib {
return g_list_length (list);
}
[DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern void g_list_free(IntPtr l);
internal override void Free (IntPtr list)
@ -51,7 +51,7 @@ namespace GLib {
g_list_free (list);
}
[DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr g_list_append (IntPtr l, IntPtr raw);
internal override IntPtr Append (IntPtr list, IntPtr raw)
@ -59,7 +59,7 @@ namespace GLib {
return g_list_append (list, raw);
}
[DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr g_list_prepend (IntPtr l, IntPtr raw);
internal override IntPtr Prepend (IntPtr list, IntPtr raw)
@ -67,7 +67,7 @@ namespace GLib {
return g_list_prepend (list, raw);
}
[DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr g_list_nth_data (IntPtr l, uint n);
internal override IntPtr NthData (uint n)

View File

@ -190,10 +190,10 @@ namespace GLib {
return fullname + "Adapter";
}
[DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern void g_free (IntPtr item);
[DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern void g_object_unref (IntPtr item);
public void Empty ()

View File

@ -123,7 +123,7 @@ namespace GLib {
handlers = new System.Collections.Generic.Dictionary<uint, GCHandle> ();
}
[DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern void g_logv (IntPtr log_domain, LogLevelFlags flags, IntPtr message);
public void WriteLog (string logDomain, LogLevelFlags flags, string format, params object [] args)
@ -135,7 +135,7 @@ namespace GLib {
Marshaller.Free (nmessage);
}
[DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern uint g_log_set_handler (IntPtr log_domain, LogLevelFlags flags, LogFuncNative log_func, IntPtr user_data);
public static uint SetLogHandler (string logDomain, LogLevelFlags flags, LogFunc logFunc)
@ -152,7 +152,7 @@ namespace GLib {
return result;
}
[DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern uint g_log_remove_handler (IntPtr log_domain, uint handler_id);
public static void RemoveLogHandler (string logDomain, uint handlerID)
@ -167,7 +167,7 @@ namespace GLib {
Marshaller.Free (ndom);
}
[DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern PrintFuncNative g_set_print_handler (PrintFuncNative handler);
public static PrintFunc SetPrintHandler (PrintFunc handler)
@ -178,7 +178,7 @@ namespace GLib {
return helper.Invoker;
}
[DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern PrintFuncNative g_set_printerr_handler (PrintFuncNative handler);
public static PrintFunc SetPrintErrorHandler (PrintFunc handler)
@ -189,7 +189,7 @@ namespace GLib {
return helper.Invoker;
}
[DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern void g_log_default_handler (IntPtr log_domain, LogLevelFlags log_level, IntPtr message, IntPtr unused_data);
public static void DefaultHandler (string logDomain, LogLevelFlags logLevel, string message)
@ -202,7 +202,7 @@ namespace GLib {
Marshaller.Free (nmess);
}
[DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
extern static LogLevelFlags g_log_set_always_fatal (LogLevelFlags fatal_mask);
public static LogLevelFlags SetAlwaysFatal (LogLevelFlags fatalMask)
@ -210,7 +210,7 @@ namespace GLib {
return g_log_set_always_fatal (fatalMask);
}
[DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
extern static LogLevelFlags g_log_set_fatal_mask (IntPtr log_domain, LogLevelFlags fatal_mask);
public static LogLevelFlags SetAlwaysFatal (string logDomain, LogLevelFlags fatalMask)
@ -244,7 +244,7 @@ namespace GLib {
}
}
[DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
extern static LogFuncNative g_log_set_default_handler (LogFuncNative log_func, IntPtr user_data);
public static LogFunc SetDefaultHandler (LogFunc log_func)

View File

@ -27,7 +27,7 @@ namespace GLib {
public class MainContext {
IntPtr handle;
[DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr g_main_context_new ();
public MainContext ()
@ -35,7 +35,7 @@ namespace GLib {
handle = g_main_context_new ();
}
[DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern void g_main_context_ref (IntPtr raw);
public MainContext (IntPtr raw)
@ -50,7 +50,7 @@ namespace GLib {
}
}
[DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern void g_main_context_unref (IntPtr raw);
~MainContext ()
@ -59,7 +59,7 @@ namespace GLib {
handle = IntPtr.Zero;
}
[DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr g_main_context_default ();
public static MainContext Default {
@ -68,7 +68,7 @@ namespace GLib {
}
}
[DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr g_main_context_thread_default ();
public MainContext ThreadDefault {
@ -79,7 +79,7 @@ namespace GLib {
}
}
[DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern void g_main_context_push_thread_default (IntPtr raw);
public void PushThreadDefault ()
@ -87,7 +87,7 @@ namespace GLib {
g_main_context_push_thread_default (handle);
}
[DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern void g_main_context_pop_thread_default (IntPtr raw);
public void PopThreadDefault ()
@ -96,7 +96,7 @@ namespace GLib {
}
[DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern bool g_main_context_iteration (IntPtr raw, bool may_block);
public bool RunIteration (bool may_block)
@ -109,7 +109,7 @@ namespace GLib {
return RunIteration (false);
}
[DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern bool g_main_context_pending (IntPtr raw);
public bool HasPendingEvents
@ -119,7 +119,7 @@ namespace GLib {
}
}
[DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern void g_main_context_wakeup (IntPtr raw);
public void Wakeup ()
@ -142,7 +142,7 @@ namespace GLib {
}
[DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern int g_main_depth ();
public static int Depth {
get { return g_main_depth (); }

View File

@ -25,7 +25,7 @@ namespace GLib {
public class MainLoop {
private IntPtr handle;
[DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr g_main_loop_new (IntPtr context, bool isRunning);
public MainLoop () : this (MainContext.Default) { }
@ -37,7 +37,7 @@ namespace GLib {
handle = g_main_loop_new (context.Handle, is_running);
}
[DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern void g_main_loop_unref (IntPtr loop);
~MainLoop ()
@ -46,7 +46,7 @@ namespace GLib {
handle = IntPtr.Zero;
}
[DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern bool g_main_loop_is_running (IntPtr loop);
public bool IsRunning {
@ -55,7 +55,7 @@ namespace GLib {
}
}
[DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern void g_main_loop_run (IntPtr loop);
public void Run ()
@ -63,7 +63,7 @@ namespace GLib {
g_main_loop_run (handle);
}
[DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern void g_main_loop_quit (IntPtr loop);
public void Quit ()
@ -71,7 +71,7 @@ namespace GLib {
g_main_loop_quit (handle);
}
[DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr g_main_loop_get_context (IntPtr loop);
public MainContext Context {

View File

@ -66,7 +66,7 @@ namespace GLib {
static FreeFunc free;
static GType boxed_type = GType.Invalid;
[DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr g_boxed_type_register_static (IntPtr typename, CopyFunc copy_func, FreeFunc free_func);
public static GType GType {

View File

@ -29,7 +29,7 @@ namespace GLib {
public class Markup {
private Markup () {}
[DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr g_markup_escape_text (IntPtr text, int len);
static public string EscapeText (string s)

View File

@ -30,7 +30,7 @@ namespace GLib {
private Marshaller () {}
[DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern void g_free (IntPtr mem);
public static void Free (IntPtr ptr)
@ -47,10 +47,10 @@ namespace GLib {
g_free (ptrs [i]);
}
[DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr g_filename_to_utf8 (IntPtr mem, int len, IntPtr read, out IntPtr written, out IntPtr error);
[DllImport("libglib-2.0-0.dll")]
[DllImport (Global.GLibNativeDll)]
static extern IntPtr g_filename_to_utf8_utf8 (IntPtr mem, int len, IntPtr read, out IntPtr written, out IntPtr error);
public static string FilenamePtrToString (IntPtr ptr)
@ -124,10 +124,10 @@ namespace GLib {
return ret;
}
[DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr g_filename_from_utf8 (IntPtr mem, int len, IntPtr read, out IntPtr written, out IntPtr error);
[DllImport("libglib-2.0-0.dll")]
[DllImport (Global.GLibNativeDll)]
static extern IntPtr g_filename_from_utf8_utf8 (IntPtr mem, int len, IntPtr read, out IntPtr written, out IntPtr error);
public static IntPtr StringToFilenamePtr (string str)
@ -194,7 +194,7 @@ namespace GLib {
return result;
}
[DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern void g_strfreev (IntPtr mem);
public static void StrFreeV (IntPtr null_term_array)
@ -248,7 +248,7 @@ namespace GLib {
// transparently, since we need to alloc buffers of
// [native pointer size] * [count] bytes.
[DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr g_malloc(UIntPtr size);
public static IntPtr Malloc (ulong size)
@ -361,10 +361,10 @@ namespace GLib {
return local_epoch.AddSeconds (time_t.ToInt64 () + utc_offset);
}
[DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr g_malloc0 (UIntPtr size);
[DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern int g_unichar_to_utf8 (uint c, IntPtr buf);
public static char GUnicharToChar (uint ucs4_char)
@ -389,7 +389,7 @@ namespace GLib {
return PtrToStringGFree (buf);
}
[DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr g_utf16_to_ucs4 (ref ushort c, IntPtr len, IntPtr d1, IntPtr d2, IntPtr d3);
public static uint CharToGUnichar (char c)

View File

@ -11,28 +11,28 @@ namespace GLib {
#region Autogenerated code
public partial class Mutex : GLib.Opaque {
[DllImport("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern void g_mutex_clear(IntPtr raw);
public void Clear() {
g_mutex_clear(Handle);
}
[DllImport("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern void g_mutex_init(IntPtr raw);
public void Init() {
g_mutex_init(Handle);
}
[DllImport("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern void g_mutex_lock(IntPtr raw);
public void Lock() {
g_mutex_lock(Handle);
}
[DllImport("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern bool g_mutex_trylock(IntPtr raw);
public bool Trylock() {
@ -41,7 +41,7 @@ namespace GLib {
return ret;
}
[DllImport("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern void g_mutex_unlock(IntPtr raw);
public void Unlock() {

View File

@ -22,7 +22,7 @@ namespace GLib {
public delegate void NotifyHandler (object o, NotifyArgs args);
public class NotifyArgs : GLib.SignalArgs {
[DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr g_param_spec_get_name (IntPtr pspec);
public string Property {

View File

@ -76,10 +76,10 @@ namespace GLib {
public static bool WarnOnFinalize { get; set; }
[DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr g_object_ref (IntPtr raw);
[DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern void g_object_unref (IntPtr raw);
public static Object TryGetObject (IntPtr o)
@ -398,7 +398,7 @@ namespace GLib {
}
}
[DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr g_param_spec_get_name (IntPtr pspec);
static IntPtr ConstructorCallback (IntPtr gtypeval, uint n_construct_properties, IntPtr construct_properties)
@ -430,7 +430,7 @@ namespace GLib {
return raw;
}
[DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern void g_object_class_override_property (IntPtr klass, uint prop_id, IntPtr name);
public static void OverrideProperty (IntPtr oclass, uint property_id, string name)
@ -446,7 +446,7 @@ namespace GLib {
idx++;
}
[DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr g_object_class_find_property (IntPtr klass, IntPtr name);
static IntPtr FindClassProperty (GLib.Object o, string name)
@ -456,7 +456,7 @@ namespace GLib {
return g_object_class_find_property (gobjectclass, native_name);
}
[DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr g_object_interface_find_property (IntPtr klass, IntPtr name);
static IntPtr FindInterfaceProperty (GType type, string name)
@ -466,7 +466,7 @@ namespace GLib {
return g_object_interface_find_property (g_iface, native_name);
}
[DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern void g_object_class_install_property (IntPtr klass, uint prop_id, IntPtr param_spec);
static IntPtr RegisterProperty (GType type, string name, string nick, string blurb, uint property_id, GType property_type, bool can_read, bool can_write)
@ -544,7 +544,7 @@ namespace GLib {
}
}
[DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern void g_type_add_interface_static (IntPtr gtype, IntPtr iface_type, ref GInterfaceInfo info);
protected internal static GType RegisterGType (System.Type t)
@ -582,7 +582,7 @@ namespace GLib {
CreateNativeObject (new string [0], new GLib.Value [0]);
}
[DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr g_object_new (IntPtr gtype, IntPtr dummy);
struct GParameter {
@ -590,7 +590,7 @@ namespace GLib {
public GLib.Value val;
}
[DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr g_object_newv (IntPtr gtype, int n_params, GParameter[] parms);
protected virtual void CreateNativeObject (string[] names, GLib.Value[] vals)
@ -702,7 +702,7 @@ namespace GLib {
}
}
[DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern void g_object_get_property (IntPtr obj, IntPtr name, ref GLib.Value val);
protected GLib.Value GetProperty (string name)
@ -714,7 +714,7 @@ namespace GLib {
return val;
}
[DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern void g_object_set_property (IntPtr obj, IntPtr name, ref GLib.Value val);
protected void SetProperty (string name, GLib.Value val)
@ -724,7 +724,7 @@ namespace GLib {
GLib.Marshaller.Free (native_name);
}
[DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern void g_object_notify (IntPtr obj, IntPtr property_name);
protected void Notify (string property_name)
@ -785,10 +785,10 @@ namespace GLib {
Signal.OverrideDefaultHandler (gtype, name, cb);
}
[DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)]
protected static extern void g_signal_chain_from_overridden (IntPtr args, ref GLib.Value retval);
[DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern bool g_type_check_instance_is_a (IntPtr obj, IntPtr gtype);
internal static bool IsObject (IntPtr obj)

View File

@ -83,7 +83,7 @@ namespace GLib {
return result;
}
[DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr g_type_parent (IntPtr typ);
}
}

View File

@ -143,61 +143,61 @@ namespace GLib {
public uint param_id;
}
[DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr g_param_spec_char (IntPtr name, IntPtr nick, IntPtr blurb, sbyte min, sbyte max, sbyte dval, int flags);
[DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr g_param_spec_uchar (IntPtr name, IntPtr nick, IntPtr blurb, byte min, byte max, byte dval, int flags);
[DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr g_param_spec_boolean (IntPtr name, IntPtr nick, IntPtr blurb, bool dval, int flags);
[DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr g_param_spec_enum (IntPtr name, IntPtr nick, IntPtr blurb, IntPtr enum_type, int dval, int flags);
[DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr g_param_spec_int (IntPtr name, IntPtr nick, IntPtr blurb, int min, int max, int dval, int flags);
[DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr g_param_spec_uint (IntPtr name, IntPtr nick, IntPtr blurb, uint min, uint max, uint dval, int flags);
[DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr g_param_spec_long (IntPtr name, IntPtr nick, IntPtr blurb, IntPtr min, IntPtr max, IntPtr dval, int flags);
[DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr g_param_spec_ulong (IntPtr name, IntPtr nick, IntPtr blurb, UIntPtr min, UIntPtr max, UIntPtr dval, int flags);
[DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr g_param_spec_int64 (IntPtr name, IntPtr nick, IntPtr blurb, long min, long max, long dval, int flags);
[DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr g_param_spec_uint64 (IntPtr name, IntPtr nick, IntPtr blurb, ulong min, ulong max, ulong dval, int flags);
[DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr g_param_spec_float (IntPtr name, IntPtr nick, IntPtr blurb, float min, float max, float dval, int flags);
[DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr g_param_spec_double (IntPtr name, IntPtr nick, IntPtr blurb, double min, double max, double dval, int flags);
[DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr g_param_spec_string (IntPtr name, IntPtr nick, IntPtr blurb, IntPtr dval, int flags);
[DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr g_param_spec_pointer (IntPtr name, IntPtr nick, IntPtr blurb, int flags);
[DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr g_param_spec_gtype (IntPtr name, IntPtr nick, IntPtr blurb, IntPtr dval, int flags);
[DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr g_param_spec_boxed (IntPtr name, IntPtr nick, IntPtr blurb, IntPtr return_type, int flags);
[DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr g_param_spec_object (IntPtr name, IntPtr nick, IntPtr blurb, IntPtr return_type, int flags);
[DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr g_gtype_get_type ();
[DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern bool g_type_is_a (IntPtr a, IntPtr b);
}

View File

@ -24,7 +24,7 @@ namespace GLib {
return (GLib.PollFD) Marshal.PtrToStructure (raw, typeof (GLib.PollFD));
}
[DllImport("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr g_pollfd_get_type();
public static GLib.GType GType {

View File

@ -32,7 +32,7 @@ namespace GLib {
internal bool elements_owned = false;
protected System.Type element_type = null;
[DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr g_ptr_array_sized_new (uint n_preallocs);
public PtrArray (uint n_preallocs, System.Type element_type, bool owned, bool elements_owned)
@ -43,7 +43,7 @@ namespace GLib {
this.elements_owned = elements_owned;
}
[DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr g_ptr_array_new ();
public PtrArray (System.Type element_type, bool owned, bool elements_owned)
@ -77,13 +77,13 @@ namespace GLib {
GC.SuppressFinalize (this);
}
[DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern void g_ptr_array_free (IntPtr raw, bool free_seg);
[DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern void g_object_unref (IntPtr item);
[DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern void g_free (IntPtr item);
void Dispose (bool disposing)
@ -120,7 +120,7 @@ namespace GLib {
}
}
[DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern void g_ptr_array_add (IntPtr raw, IntPtr val);
public void Add (IntPtr val)
@ -128,7 +128,7 @@ namespace GLib {
g_ptr_array_add (Handle, val);
}
[DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern void g_ptr_array_remove (IntPtr raw, IntPtr data);
public void Remove (IntPtr data)
@ -136,7 +136,7 @@ namespace GLib {
g_ptr_array_remove (Handle, data);
}
[DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern void g_ptr_array_remove_range (IntPtr raw, uint index, uint length);
public void RemoveRange (IntPtr data, uint index, uint length)
@ -260,7 +260,7 @@ namespace GLib {
return new ListEnumerator (this);
}
[DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr g_ptr_array_copy (IntPtr raw);
// ICloneable

View File

@ -11,28 +11,28 @@ namespace GLib {
#region Autogenerated code
public partial class RecMutex : GLib.Opaque {
[DllImport("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern void g_rec_mutex_clear(IntPtr raw);
public void Clear() {
g_rec_mutex_clear(Handle);
}
[DllImport("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern void g_rec_mutex_init(IntPtr raw);
public void Init() {
g_rec_mutex_init(Handle);
}
[DllImport("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern void g_rec_mutex_lock(IntPtr raw);
public void Lock() {
g_rec_mutex_lock(Handle);
}
[DllImport("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern bool g_rec_mutex_trylock(IntPtr raw);
public bool Trylock() {
@ -41,7 +41,7 @@ namespace GLib {
return ret;
}
[DllImport("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern void g_rec_mutex_unlock(IntPtr raw);
public void Unlock() {

View File

@ -26,7 +26,7 @@ namespace GLib {
public class SList : ListBase {
[DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr g_slist_copy (IntPtr l);
public override object Clone ()
@ -34,7 +34,7 @@ namespace GLib {
return new SList (g_slist_copy (Handle));
}
[DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern int g_slist_length (IntPtr l);
internal override int Length (IntPtr list)
@ -42,7 +42,7 @@ namespace GLib {
return g_slist_length (list);
}
[DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern void g_slist_free(IntPtr l);
internal override void Free (IntPtr list)
@ -51,7 +51,7 @@ namespace GLib {
g_slist_free (list);
}
[DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr g_slist_append (IntPtr l, IntPtr raw);
internal override IntPtr Append (IntPtr list, IntPtr raw)
@ -59,7 +59,7 @@ namespace GLib {
return g_slist_append (list, raw);
}
[DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr g_slist_prepend (IntPtr l, IntPtr raw);
internal override IntPtr Prepend (IntPtr list, IntPtr raw)
@ -68,7 +68,7 @@ namespace GLib {
}
[DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr g_slist_nth_data (IntPtr l, uint n);
internal override IntPtr NthData (uint n)

View File

@ -357,32 +357,32 @@ namespace GLib {
g_signal_override_class_closure (id, gtype.Val, closure);
}
[DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr g_cclosure_new (Delegate cb, IntPtr data, IntPtr notify);
[DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr g_signal_get_invocation_hint (IntPtr instance);
[DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern void g_signal_emitv (IntPtr instance_and_params, uint signal_id, uint gquark_detail, ref GLib.Value return_value);
[DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern void g_signal_emitv (IntPtr instance_and_params, uint signal_id, uint gquark_detail, IntPtr return_value);
[DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern uint g_signal_lookup (IntPtr name, IntPtr itype);
[DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern void g_signal_override_class_closure (uint id, IntPtr gtype, IntPtr closure);
[DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern void g_signal_query (uint signal_id, out Query query);
//better not to expose g_quark_from_static_string () due to memory allocation issues
[DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern uint g_quark_from_string (IntPtr str);
[DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern ulong g_signal_add_emission_hook (uint signal_id, uint gquark_detail, EmissionHookNative hook_func, IntPtr hook_data, IntPtr data_destroy);
}

View File

@ -201,25 +201,25 @@ namespace GLib {
}
}
[DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr g_cclosure_new (Delegate cb, IntPtr user_data, ClosureNotify notify);
[DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr g_closure_new_simple (int closure_size, IntPtr dummy);
[DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern void g_closure_set_marshal (IntPtr closure, ClosureMarshal marshaler);
[DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern void g_closure_add_finalize_notifier (IntPtr closure, IntPtr dummy, ClosureNotify notify);
[DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern uint g_signal_connect_closure (IntPtr obj, IntPtr name, IntPtr closure, bool is_after);
[DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern void g_signal_handler_disconnect (IntPtr instance, uint handler);
[DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern bool g_signal_handler_is_connected (IntPtr instance, uint handler);
}
}

View File

@ -50,7 +50,7 @@ namespace GLib {
internal static Hashtable source_handlers = new Hashtable ();
[DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern bool g_source_remove (uint tag);
public static bool Remove (uint tag)
@ -60,7 +60,7 @@ namespace GLib {
return g_source_remove (tag);
}
[DllImport("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr g_source_get_context(IntPtr raw);
public GLib.MainContext Context {
@ -71,10 +71,10 @@ namespace GLib {
}
}
[DllImport("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern int g_source_get_priority(IntPtr raw);
[DllImport("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern void g_source_set_priority(IntPtr raw, int priority);
public int Priority {
@ -88,10 +88,10 @@ namespace GLib {
}
}
[DllImport("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr g_source_get_name(IntPtr raw);
[DllImport("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern void g_source_set_name(IntPtr raw, IntPtr name);
public string Name {
@ -107,7 +107,7 @@ namespace GLib {
}
}
[DllImport("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr g_source_get_type();
public static GLib.GType GType {
@ -118,14 +118,14 @@ namespace GLib {
}
}
[DllImport("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern void g_source_add_child_source(IntPtr raw, IntPtr child_source);
public void AddChildSource(GLib.Source child_source) {
g_source_add_child_source(Handle, child_source == null ? IntPtr.Zero : child_source.Handle);
}
[DllImport("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern void g_source_add_poll(IntPtr raw, IntPtr fd);
public void AddPoll(GLib.PollFD fd) {
@ -135,7 +135,7 @@ namespace GLib {
Marshal.FreeHGlobal (native_fd);
}
[DllImport("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern uint g_source_attach(IntPtr raw, IntPtr context);
public uint Attach(GLib.MainContext context) {
@ -148,10 +148,10 @@ namespace GLib {
return Attach (null);
}
[DllImport("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern bool g_source_get_can_recurse(IntPtr raw);
[DllImport("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern void g_source_set_can_recurse(IntPtr raw, bool can_recurse);
public bool CanRecurse {
@ -165,7 +165,7 @@ namespace GLib {
}
}
[DllImport("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern void g_source_get_current_time(IntPtr raw, IntPtr timeval);
[Obsolete]
@ -176,7 +176,7 @@ namespace GLib {
Marshal.FreeHGlobal (native_timeval);
}
[DllImport("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern uint g_source_get_id(IntPtr raw);
public uint Id {
@ -187,10 +187,10 @@ namespace GLib {
}
}
[DllImport("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern long g_source_get_ready_time(IntPtr raw);
[DllImport("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern void g_source_set_ready_time(IntPtr raw, long ready_time);
public long ReadyTime {
@ -204,7 +204,7 @@ namespace GLib {
}
}
[DllImport("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern long g_source_get_time(IntPtr raw);
public long Time {
@ -215,7 +215,7 @@ namespace GLib {
}
}
[DllImport("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern bool g_source_is_destroyed(IntPtr raw);
public bool IsDestroyed {
@ -226,14 +226,14 @@ namespace GLib {
}
}
[DllImport("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern void g_source_modify_unix_fd(IntPtr raw, IntPtr tag, int new_events);
public void ModifyUnixFd(IntPtr tag, GLib.IOCondition new_events) {
g_source_modify_unix_fd(Handle, tag, (int) new_events);
}
[DllImport("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern int g_source_query_unix_fd(IntPtr raw, IntPtr tag);
public GLib.IOCondition QueryUnixFd(IntPtr tag) {
@ -242,14 +242,14 @@ namespace GLib {
return ret;
}
[DllImport("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern void g_source_remove_child_source(IntPtr raw, IntPtr child_source);
public void RemoveChildSource(GLib.Source child_source) {
g_source_remove_child_source(Handle, child_source == null ? IntPtr.Zero : child_source.Handle);
}
[DllImport("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern void g_source_remove_poll(IntPtr raw, IntPtr fd);
public void RemovePoll(GLib.PollFD fd) {
@ -259,14 +259,14 @@ namespace GLib {
Marshal.FreeHGlobal (native_fd);
}
[DllImport("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern void g_source_remove_unix_fd(IntPtr raw, IntPtr tag);
public void RemoveUnixFd(IntPtr tag) {
g_source_remove_unix_fd(Handle, tag);
}
[DllImport("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern void g_source_set_callback_indirect(IntPtr raw, IntPtr callback_data, IntPtr callback_funcs);
public void SetCallbackIndirect(IntPtr callback_data, GLib.SourceCallbackFuncs callback_funcs) {
@ -276,7 +276,7 @@ namespace GLib {
Marshal.FreeHGlobal (native_callback_funcs);
}
[DllImport("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern void g_source_set_funcs(IntPtr raw, IntPtr value);
public GLib.SourceFuncs Funcs {
@ -291,7 +291,7 @@ namespace GLib {
/*
* commented out because there is already a custom implementation for Remove
*
[DllImport("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeLib, CallingConvention = CallingConvention.Cdecl)]
static extern bool g_source_remove(uint tag);
public static bool Remove(uint tag) {
@ -301,7 +301,7 @@ namespace GLib {
}
*/
[DllImport("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern bool g_source_remove_by_funcs_user_data(IntPtr funcs, IntPtr user_data);
public static bool RemoveByFuncsUserData(GLib.SourceFuncs funcs, IntPtr user_data) {
@ -313,7 +313,7 @@ namespace GLib {
return ret;
}
[DllImport("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern bool g_source_remove_by_user_data(IntPtr user_data);
public static bool RemoveByUserData(IntPtr user_data) {
@ -322,7 +322,7 @@ namespace GLib {
return ret;
}
[DllImport("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern void g_source_set_name_by_id(uint tag, IntPtr name);
public static void SetNameById(uint tag, string name) {
@ -333,7 +333,7 @@ namespace GLib {
public Source(IntPtr raw) : base(raw) {}
[DllImport("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr g_source_new(IntPtr source_funcs, uint struct_size);
public Source (GLib.SourceFuncs source_funcs, uint struct_size)
@ -344,7 +344,7 @@ namespace GLib {
Marshal.FreeHGlobal (native_source_funcs);
}
[DllImport("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr g_source_ref(IntPtr raw);
protected override void Ref (IntPtr raw)
@ -355,7 +355,7 @@ namespace GLib {
}
}
[DllImport("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern void g_source_unref(IntPtr raw);
protected override void Unref (IntPtr raw)
@ -366,7 +366,7 @@ namespace GLib {
}
}
[DllImport("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern void g_source_destroy(IntPtr raw);
protected override void Free (IntPtr raw)

View File

@ -102,7 +102,7 @@ namespace GLib {
this.pid = pid;
}
[DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern void g_spawn_close_pid (int pid);
public void Close ()
@ -110,10 +110,10 @@ namespace GLib {
g_spawn_close_pid ((int) pid);
}
[DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern bool g_spawn_async (IntPtr dir, IntPtr[] argv, IntPtr[] envp, int flags, SpawnChildSetupFuncNative func, IntPtr data, out int pid, out IntPtr error);
[DllImport ("libglib-2.0-0.dll")]
[DllImport (Global.GLibNativeDll)]
static extern bool g_spawn_async_utf8 (IntPtr dir, IntPtr[] argv, IntPtr[] envp, int flags, SpawnChildSetupFuncNative func, IntPtr data, out int pid, out IntPtr error);
public static bool SpawnAsync (string working_directory, string[] argv, string[] envp, SpawnFlags flags, SpawnChildSetupFunc child_setup, out Process child_process)
@ -139,10 +139,10 @@ namespace GLib {
return result;
}
[DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern bool g_spawn_async_with_pipes (IntPtr dir, IntPtr[] argv, IntPtr[] envp, int flags, SpawnChildSetupFuncNative func, IntPtr data, out int pid, IntPtr stdin, IntPtr stdout, IntPtr stderr, out IntPtr error);
[DllImport ("libglib-2.0-0.dll")]
[DllImport (Global.GLibNativeDll)]
static extern bool g_spawn_async_with_pipes_utf8 (IntPtr dir, IntPtr[] argv, IntPtr[] envp, int flags, SpawnChildSetupFuncNative func, IntPtr data, out int pid, IntPtr stdin, IntPtr stdout, IntPtr stderr, out IntPtr error);
public static bool SpawnAsyncWithPipes (string working_directory, string[] argv, string[] envp, SpawnFlags flags, SpawnChildSetupFunc child_setup, out Process child_process, ref int stdin, ref int stdout, ref int stderr)
@ -183,10 +183,10 @@ namespace GLib {
return result;
}
[DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern bool g_spawn_sync (IntPtr dir, IntPtr[] argv, IntPtr[] envp, int flags, SpawnChildSetupFuncNative func, IntPtr data, out IntPtr stdout, out IntPtr stderr, out int exit_status, out IntPtr error);
[DllImport ("libglib-2.0-0.dll")]
[DllImport (Global.GLibNativeDll)]
static extern bool g_spawn_sync_utf8 (IntPtr dir, IntPtr[] argv, IntPtr[] envp, int flags, SpawnChildSetupFuncNative func, IntPtr data, out IntPtr stdout, out IntPtr stderr, out int exit_status, out IntPtr error);
public static bool SpawnSync (string working_directory, string[] argv, string[] envp, SpawnFlags flags, SpawnChildSetupFunc child_setup, out string stdout, out string stderr, out int exit_status)
@ -212,10 +212,10 @@ namespace GLib {
return result;
}
[DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern bool g_spawn_command_line_async (IntPtr cmdline, out IntPtr error);
[DllImport ("libglib-2.0-0.dll")]
[DllImport (Global.GLibNativeDll)]
static extern bool g_spawn_command_line_async_utf8 (IntPtr cmdline, out IntPtr error);
public static bool SpawnCommandLineAsync (string command_line)
@ -234,10 +234,10 @@ namespace GLib {
return result;
}
[DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern bool g_spawn_command_line_sync (IntPtr cmdline, out IntPtr stdout, out IntPtr stderr, out int exit_status, out IntPtr error);
[DllImport ("libglib-2.0-0.dll")]
[DllImport (Global.GLibNativeDll)]
static extern bool g_spawn_command_line_sync_utf8 (IntPtr cmdline, out IntPtr stdout, out IntPtr stderr, out int exit_status, out IntPtr error);
public static bool SpawnCommandLineSync (string command_line, out string stdout, out string stderr, out int exit_status)

View File

@ -29,7 +29,9 @@ namespace GLib
private Thread () {}
#if ENABLE_GTHREAD_INIT
[DllImport ("libgthread-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
const string GThreadNativeLib = "libgthread-2.0-0.dll";
[DllImport (GThreadNativeLib, CallingConvention = CallingConvention.Cdecl)]
static extern void g_thread_init (IntPtr i);
public static void Init ()
@ -37,7 +39,7 @@ namespace GLib
g_thread_init (IntPtr.Zero);
}
[DllImport ("libgthread-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (GThreadNativeLib, CallingConvention = CallingConvention.Cdecl)]
static extern bool g_thread_get_initialized ();
public static bool Supported

View File

@ -39,7 +39,7 @@ namespace GLib {
return (GLib.TimeVal) Marshal.PtrToStructure (raw, typeof (GLib.TimeVal));
}
[DllImport("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern void g_time_val_add(IntPtr raw, IntPtr microseconds);
public void Add(long microseconds) {
@ -50,7 +50,7 @@ namespace GLib {
System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
}
[DllImport("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr g_time_val_to_iso8601(IntPtr raw);
public string ToIso8601() {
@ -63,7 +63,7 @@ namespace GLib {
return ret;
}
[DllImport("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern bool g_time_val_from_iso8601(IntPtr iso_date, IntPtr time_);
public static bool FromIso8601(string iso_date, out GLib.TimeVal time_) {

View File

@ -11,7 +11,7 @@ namespace GLib {
#region Autogenerated code
public partial class TimeZone : GLib.Opaque {
[DllImport("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr g_time_zone_get_type();
public static GLib.GType GType {
@ -22,7 +22,7 @@ namespace GLib {
}
}
[DllImport("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[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_) {
@ -31,7 +31,7 @@ namespace GLib {
return ret;
}
[DllImport("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[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_) {
@ -40,7 +40,7 @@ namespace GLib {
return ret;
}
[DllImport("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr g_time_zone_get_abbreviation(IntPtr raw, int interval);
public string GetAbbreviation(int interval) {
@ -49,7 +49,7 @@ namespace GLib {
return ret;
}
[DllImport("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern int g_time_zone_get_offset(IntPtr raw, int interval);
public int GetOffset(int interval) {
@ -58,7 +58,7 @@ namespace GLib {
return ret;
}
[DllImport("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern bool g_time_zone_is_dst(IntPtr raw, int interval);
public bool IsDst(int interval) {
@ -69,7 +69,7 @@ namespace GLib {
public TimeZone(IntPtr raw) : base(raw) {}
[DllImport("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr g_time_zone_new(IntPtr identifier);
public TimeZone (string identifier)
@ -79,7 +79,7 @@ namespace GLib {
GLib.Marshaller.Free (native_identifier);
}
[DllImport("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr g_time_zone_new_local();
public TimeZone ()
@ -87,7 +87,7 @@ namespace GLib {
Raw = g_time_zone_new_local();
}
[DllImport("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr g_time_zone_new_utc();
public static TimeZone NewUtc()
@ -96,7 +96,7 @@ namespace GLib {
return result;
}
[DllImport("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr g_time_zone_ref(IntPtr raw);
protected override void Ref (IntPtr raw)
@ -107,7 +107,7 @@ namespace GLib {
}
}
[DllImport("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern void g_time_zone_unref(IntPtr raw);
protected override void Unref (IntPtr raw)

8
glib/Timeout.cs Executable file → Normal file
View File

@ -83,7 +83,7 @@ namespace GLib {
}
private Timeout () {}
[DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern uint g_timeout_add (uint interval, TimeoutHandlerInternal d, IntPtr data);
public static uint Add (uint interval, TimeoutHandler hndlr)
@ -97,7 +97,7 @@ namespace GLib {
return p.ID;
}
[DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern uint g_timeout_add_full (int priority, uint interval, TimeoutHandlerInternal d, IntPtr data, DestroyNotify notify);
public static uint Add (uint interval, TimeoutHandler hndlr, Priority priority)
@ -111,7 +111,7 @@ namespace GLib {
return p.ID;
}
[DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern uint g_timeout_add_seconds (uint interval, TimeoutHandlerInternal d, IntPtr data);
public static uint AddSeconds (uint interval, TimeoutHandler hndlr)
@ -130,7 +130,7 @@ namespace GLib {
Source.Remove (id);
}
[DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern bool g_source_remove (uint id);
public static bool Remove (TimeoutHandler hndlr)

View File

@ -155,16 +155,16 @@ namespace GLib {
return false;
}
[DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern void g_object_add_toggle_ref (IntPtr raw, ToggleNotifyHandler notify_cb, IntPtr data);
[DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern void g_object_remove_toggle_ref (IntPtr raw, ToggleNotifyHandler notify_cb, IntPtr data);
[DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr g_object_ref (IntPtr raw);
[DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern void g_object_unref (IntPtr raw);
}

90
glib/Value.cs Executable file → Normal file
View File

@ -589,137 +589,137 @@ namespace GLib {
g_value_init (ref this, spec.ValueType.Val);
}
[DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr g_object_class_find_property (IntPtr klass, IntPtr name);
[DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern bool g_type_check_value_holds (ref Value val, IntPtr gtype);
[DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern void g_value_init (ref GLib.Value val, IntPtr gtype);
[DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern void g_value_unset (ref GLib.Value val);
[DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern void g_value_set_boolean (ref Value val, bool data);
[DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern void g_value_set_uchar (ref Value val, byte data);
[DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern void g_value_set_char (ref Value val, sbyte data);
[DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern void g_value_set_boxed (ref Value val, IntPtr data);
[DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern void g_value_set_double (ref Value val, double data);
[DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern void g_value_set_float (ref Value val, float data);
[DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern void g_value_set_int (ref Value val, int data);
[DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern void g_value_set_int64 (ref Value val, long data);
[DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern void g_value_set_long (ref Value val, IntPtr data);
[DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern void g_value_set_long (ref Value val, int data);
[DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern void g_value_set_uint64 (ref Value val, ulong data);
[DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern void g_value_set_object (ref Value val, IntPtr data);
[DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern void g_value_set_param (ref Value val, IntPtr data);
[DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern void g_value_set_pointer (ref Value val, IntPtr data);
[DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern void g_value_set_string (ref Value val, IntPtr data);
[DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern void g_value_set_uint (ref Value val, uint data);
[DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern void g_value_set_ulong (ref Value val, UIntPtr data);
[DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern void g_value_set_ulong (ref Value val, uint data);
[DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern void g_value_set_enum (ref Value val, int data);
[DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern void g_value_set_flags (ref Value val, uint data);
[DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern bool g_value_get_boolean (ref Value val);
[DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern byte g_value_get_uchar (ref Value val);
[DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern sbyte g_value_get_char (ref Value val);
[DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr g_value_get_boxed (ref Value val);
[DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern double g_value_get_double (ref Value val);
[DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern float g_value_get_float (ref Value val);
[DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern int g_value_get_int (ref Value val);
[DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern long g_value_get_int64 (ref Value val);
[DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr g_value_get_long (ref Value val);
[DllImport ("libgobject-2.0-0.dll", EntryPoint = "g_value_get_long", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GObjectNativeDll, EntryPoint = "g_value_get_long", CallingConvention = CallingConvention.Cdecl)]
static extern int g_value_get_long_as_int (ref Value val);
[DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern ulong g_value_get_uint64 (ref Value val);
[DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern UIntPtr g_value_get_ulong (ref Value val);
[DllImport ("libgobject-2.0-0.dll", EntryPoint = "g_value_get_ulong", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GObjectNativeDll, EntryPoint = "g_value_get_ulong", CallingConvention = CallingConvention.Cdecl)]
static extern int g_value_get_ulong_as_uint (ref Value val);
[DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr g_value_get_object (ref Value val);
[DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr g_value_get_param (ref Value val);
[DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr g_value_get_pointer (ref Value val);
[DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr g_value_get_string (ref Value val);
[DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern uint g_value_get_uint (ref Value val);
[DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern int g_value_get_enum (ref Value val);
[DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern uint g_value_get_flags (ref Value val);
[DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr g_strv_get_type ();
}
}

View File

@ -33,7 +33,7 @@ namespace GLib {
static private IList<IntPtr> PendingFrees = new List<IntPtr> ();
static private bool idle_queued = false;
[DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr g_value_array_new (uint n_preallocs);
public ValueArray (uint n_preallocs)
@ -58,7 +58,7 @@ namespace GLib {
GC.SuppressFinalize (this);
}
[DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern void g_value_array_free (IntPtr raw);
void Dispose (bool disposing)
@ -116,7 +116,7 @@ namespace GLib {
get { return Native.values; }
}
[DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern void g_value_array_append (IntPtr raw, ref GLib.Value val);
public void Append (GLib.Value val)
@ -124,7 +124,7 @@ namespace GLib {
g_value_array_append (Handle, ref val);
}
[DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern void g_value_array_insert (IntPtr raw, uint idx, ref GLib.Value val);
public void Insert (uint idx, GLib.Value val)
@ -132,7 +132,7 @@ namespace GLib {
g_value_array_insert (Handle, idx, ref val);
}
[DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern void g_value_array_prepend (IntPtr raw, ref GLib.Value val);
public void Prepend (GLib.Value val)
@ -140,7 +140,7 @@ namespace GLib {
g_value_array_prepend (Handle, ref val);
}
[DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern void g_value_array_remove (IntPtr raw, uint idx);
public void Remove (uint idx)
@ -153,7 +153,7 @@ namespace GLib {
get { return (int) Native.n_values; }
}
[DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr g_value_array_get_nth (IntPtr raw, uint idx);
public object this [int index] {
@ -227,7 +227,7 @@ namespace GLib {
return new ListEnumerator (this);
}
[DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr g_value_array_copy (IntPtr raw);
// ICloneable
@ -236,7 +236,7 @@ namespace GLib {
return new ValueArray (g_value_array_copy (Handle));
}
[DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr g_value_array_get_type ();
public static GLib.GType GType {

View File

@ -37,7 +37,7 @@ namespace GLib {
Dispose (true);
}
[DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern void g_variant_unref (IntPtr handle);
void Dispose (bool disposing)
@ -51,7 +51,7 @@ namespace GLib {
GC.SuppressFinalize (this);
}
[DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr g_variant_ref_sink (IntPtr handle);
public Variant (IntPtr handle)
@ -59,52 +59,52 @@ namespace GLib {
this.handle = g_variant_ref_sink (handle);
}
[DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr g_variant_new_boolean (bool val);
public Variant (bool val) : this (g_variant_new_boolean (val)) {}
[DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr g_variant_new_byte (byte val);
public Variant (byte val) : this (g_variant_new_byte (val)) {}
[DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr g_variant_new_int16 (short val);
public Variant (short val) : this (g_variant_new_int16 (val)) {}
[DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr g_variant_new_uint16 (ushort val);
public Variant (ushort val) : this (g_variant_new_uint16 (val)) {}
[DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr g_variant_new_int32 (int val);
public Variant (int val) : this (g_variant_new_int32 (val)) {}
[DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr g_variant_new_uint32 (uint val);
public Variant (uint val) : this (g_variant_new_uint32 (val)) {}
[DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr g_variant_new_int64 (long val);
public Variant (long val) : this (g_variant_new_int64 (val)) {}
[DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr g_variant_new_uint64 (ulong val);
public Variant (ulong val) : this (g_variant_new_uint64 (val)) {}
[DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr g_variant_new_double (double val);
public Variant (double val) : this (g_variant_new_double (val)) {}
[DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr g_variant_new_string (IntPtr val);
public Variant (string val)
@ -114,7 +114,7 @@ namespace GLib {
Marshaller.Free (native_val);
}
[DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern bool g_variant_get_boolean (IntPtr handle);
public static explicit operator bool (Variant val)
@ -122,7 +122,7 @@ namespace GLib {
return g_variant_get_boolean (val.Handle);
}
[DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern byte g_variant_get_byte (IntPtr handle);
public static explicit operator byte (Variant val)
@ -130,7 +130,7 @@ namespace GLib {
return g_variant_get_byte (val.Handle);
}
[DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern short g_variant_get_int16 (IntPtr handle);
public static explicit operator short (Variant val)
@ -138,7 +138,7 @@ namespace GLib {
return g_variant_get_int16 (val.Handle);
}
[DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern ushort g_variant_get_uint16 (IntPtr handle);
public static explicit operator ushort (Variant val)
@ -146,7 +146,7 @@ namespace GLib {
return g_variant_get_uint16 (val.Handle);
}
[DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern int g_variant_get_int32 (IntPtr handle);
public static explicit operator int (Variant val)
@ -154,7 +154,7 @@ namespace GLib {
return g_variant_get_int32 (val.Handle);
}
[DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern uint g_variant_get_uint32 (IntPtr handle);
public static explicit operator uint (Variant val)
@ -162,7 +162,7 @@ namespace GLib {
return g_variant_get_uint32 (val.Handle);
}
[DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern long g_variant_get_int64 (IntPtr handle);
public static explicit operator long (Variant val)
@ -170,7 +170,7 @@ namespace GLib {
return g_variant_get_int64 (val.Handle);
}
[DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern ulong g_variant_get_uint64 (IntPtr handle);
public static explicit operator ulong (Variant val)
@ -178,7 +178,7 @@ namespace GLib {
return g_variant_get_uint64 (val.Handle);
}
[DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern double g_variant_get_double (IntPtr handle);
public static explicit operator double (Variant val)
@ -186,7 +186,7 @@ namespace GLib {
return g_variant_get_double (val.Handle);
}
[DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr g_variant_get_string (IntPtr handle);
public static explicit operator string (Variant val)

View File

@ -47,7 +47,7 @@ namespace GLib {
public static VariantType ByteString = new VariantType ("ay");
public static VariantType ByteStringArray = new VariantType ("aay");
[DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern bool g_variant_type_string_is_valid (IntPtr type_string);
public static bool StringIsValid (string type_string)
@ -76,7 +76,7 @@ namespace GLib {
Dispose (true);
}
[DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern void g_variant_type_free (IntPtr handle);
void Dispose (bool disposing)
@ -90,7 +90,7 @@ namespace GLib {
GC.SuppressFinalize (this);
}
[DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr g_variant_type_copy (IntPtr handle);
public VariantType (IntPtr handle)
@ -98,7 +98,7 @@ namespace GLib {
this.handle = g_variant_type_copy (handle);
}
[DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr g_variant_type_new (IntPtr type_name);
public VariantType (string type_string)
@ -113,7 +113,7 @@ namespace GLib {
return new VariantType (Handle);
}
[DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern bool g_variant_type_equals (IntPtr a, IntPtr b);
public override bool Equals (object o)
@ -121,7 +121,7 @@ namespace GLib {
return (o is VariantType) && g_variant_type_equals (Handle, (o as VariantType).Handle);
}
[DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern int g_variant_type_hash (IntPtr a);
public override int GetHashCode ()
@ -129,7 +129,7 @@ namespace GLib {
return g_variant_type_hash (Handle);
}
[DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr g_variant_type_peek_string (IntPtr a);
public override string ToString ()
@ -137,7 +137,7 @@ namespace GLib {
return Marshaller.Utf8PtrToString (g_variant_type_peek_string (Handle));
}
[DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern bool g_variant_type_is_array (IntPtr type);
public bool IsArray {
@ -145,56 +145,56 @@ namespace GLib {
}
[DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern bool g_variant_type_is_basic (IntPtr type);
public bool IsBasic {
get { return g_variant_type_is_basic (Handle); }
}
[DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern bool g_variant_type_is_container (IntPtr type);
public bool IsContainer {
get { return g_variant_type_is_container (Handle); }
}
[DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern bool g_variant_type_is_definite (IntPtr type);
public bool IsDefinite {
get { return g_variant_type_is_definite (Handle); }
}
[DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern bool g_variant_type_is_dict_entry (IntPtr type);
public bool IsDictionaryEntry {
get { return g_variant_type_is_dict_entry (Handle); }
}
[DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern bool g_variant_type_is_maybe (IntPtr type);
public bool IsMaybe {
get { return g_variant_type_is_maybe (Handle); }
}
[DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern bool g_variant_type_is_tuple (IntPtr type);
public bool IsTuple {
get { return g_variant_type_is_tuple (Handle); }
}
[DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern bool g_variant_type_is_variant (IntPtr type);
public bool IsVariant {
get { return g_variant_type_is_variant (Handle); }
}
[DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern bool g_variant_type_is_subtype_of (IntPtr type, IntPtr supertype);
public bool IsSubtypeOf (VariantType supertype)
@ -202,7 +202,7 @@ namespace GLib {
return g_variant_type_is_subtype_of (Handle, supertype == null ? IntPtr.Zero : supertype.Handle);
}
[DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr g_variant_type_element (IntPtr type);
public VariantType Element ()
@ -210,7 +210,7 @@ namespace GLib {
return new VariantType (g_variant_type_element (Handle));
}
[DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr g_variant_type_first (IntPtr type);
public VariantType First ()
@ -218,7 +218,7 @@ namespace GLib {
return new VariantType (g_variant_type_first (Handle));
}
[DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr g_variant_type_next (IntPtr type);
public VariantType Next ()
@ -226,7 +226,7 @@ namespace GLib {
return new VariantType (g_variant_type_next (Handle));
}
[DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr g_variant_type_n_items (IntPtr type);
public long NItems ()
@ -234,7 +234,7 @@ namespace GLib {
return g_variant_type_n_items (Handle).ToInt64 ();
}
[DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr g_variant_type_key (IntPtr type);
public VariantType Key ()
@ -242,7 +242,7 @@ namespace GLib {
return new VariantType (g_variant_type_key (Handle));
}
[DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr g_variant_type_value (IntPtr type);
public VariantType Value ()
@ -250,7 +250,7 @@ namespace GLib {
return new VariantType (g_variant_type_value (Handle));
}
[DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr g_variant_type_new_array (IntPtr element);
public static VariantType NewArray (VariantType element)
@ -260,7 +260,7 @@ namespace GLib {
return result;
}
[DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr g_variant_type_new_dict_entry (IntPtr key, IntPtr value);
public static VariantType NewDictionaryEntry (VariantType key, VariantType value)
@ -270,7 +270,7 @@ namespace GLib {
return result;
}
[DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr g_variant_type_new_maybe (IntPtr element);
public static VariantType NewMaybe (VariantType element)
@ -280,7 +280,7 @@ namespace GLib {
return result;
}
[DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)]
static extern IntPtr g_variant_type_new_tuple (IntPtr[] items, int n_items);
public static VariantType NewTuple (VariantType[] items)