no more submodule

This commit is contained in:
2024-09-15 22:40:48 +02:00
parent df3b8a3135
commit 0234b33671
5804 changed files with 943618 additions and 1 deletions

View File

@@ -0,0 +1,24 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace GLib {
using System;
public delegate void AcceptCertificateHandler(object o, AcceptCertificateArgs args);
public class AcceptCertificateArgs : GLib.SignalArgs {
public GLib.TlsCertificate PeerCert{
get {
return (GLib.TlsCertificate) Args [0];
}
}
public GLib.TlsCertificateFlags Errors{
get {
return (GLib.TlsCertificateFlags) Args [1];
}
}
}
}

View File

@@ -0,0 +1,389 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace GLib {
using System;
using System.Runtime.InteropServices;
#region Autogenerated code
public partial class ActionAdapter : GLib.GInterfaceAdapter, GLib.IAction {
[StructLayout (LayoutKind.Sequential)]
struct GActionInterface {
public GetNameNativeDelegate GetName;
public GetParameterTypeNativeDelegate GetParameterType;
public GetStateTypeNativeDelegate GetStateType;
public GetStateHintNativeDelegate GetStateHint;
public GetEnabledNativeDelegate GetEnabled;
public GetStateNativeDelegate GetState;
public ChangeStateNativeDelegate ChangeState;
public ActivateNativeDelegate Activate;
}
static GActionInterface iface;
static ActionAdapter ()
{
GLib.GType.Register (_gtype, typeof (ActionAdapter));
iface.GetName = new GetNameNativeDelegate (GetName_cb);
iface.GetParameterType = new GetParameterTypeNativeDelegate (GetParameterType_cb);
iface.GetStateType = new GetStateTypeNativeDelegate (GetStateType_cb);
iface.GetStateHint = new GetStateHintNativeDelegate (GetStateHint_cb);
iface.GetEnabled = new GetEnabledNativeDelegate (GetEnabled_cb);
iface.GetState = new GetStateNativeDelegate (GetState_cb);
iface.ChangeState = new ChangeStateNativeDelegate (ChangeState_cb);
iface.Activate = new ActivateNativeDelegate (Activate_cb);
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate IntPtr GetNameNativeDelegate (IntPtr inst);
static IntPtr GetName_cb (IntPtr inst)
{
try {
IActionImplementor __obj = GLib.Object.GetObject (inst, false) as IActionImplementor;
string __result;
__result = __obj.Name;
return GLib.Marshaller.StringToPtrGStrdup(__result);
} catch (Exception e) {
GLib.ExceptionManager.RaiseUnhandledException (e, true);
// NOTREACHED: above call does not return.
throw;
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate IntPtr GetParameterTypeNativeDelegate (IntPtr inst);
static IntPtr GetParameterType_cb (IntPtr inst)
{
try {
IActionImplementor __obj = GLib.Object.GetObject (inst, false) as IActionImplementor;
GLib.VariantType __result;
__result = __obj.ParameterType;
return __result == null ? IntPtr.Zero : __result.Handle;
} catch (Exception e) {
GLib.ExceptionManager.RaiseUnhandledException (e, true);
// NOTREACHED: above call does not return.
throw;
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate IntPtr GetStateTypeNativeDelegate (IntPtr inst);
static IntPtr GetStateType_cb (IntPtr inst)
{
try {
IActionImplementor __obj = GLib.Object.GetObject (inst, false) as IActionImplementor;
GLib.VariantType __result;
__result = __obj.StateType;
return __result == null ? IntPtr.Zero : __result.Handle;
} catch (Exception e) {
GLib.ExceptionManager.RaiseUnhandledException (e, true);
// NOTREACHED: above call does not return.
throw;
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate IntPtr GetStateHintNativeDelegate (IntPtr inst);
static IntPtr GetStateHint_cb (IntPtr inst)
{
try {
IActionImplementor __obj = GLib.Object.GetObject (inst, false) as IActionImplementor;
GLib.Variant __result;
__result = __obj.StateHint;
return __result == null ? IntPtr.Zero : __result.Handle;
} catch (Exception e) {
GLib.ExceptionManager.RaiseUnhandledException (e, true);
// NOTREACHED: above call does not return.
throw;
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate bool GetEnabledNativeDelegate (IntPtr inst);
static bool GetEnabled_cb (IntPtr inst)
{
try {
IActionImplementor __obj = GLib.Object.GetObject (inst, false) as IActionImplementor;
bool __result;
__result = __obj.Enabled;
return __result;
} catch (Exception e) {
GLib.ExceptionManager.RaiseUnhandledException (e, true);
// NOTREACHED: above call does not return.
throw;
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate IntPtr GetStateNativeDelegate (IntPtr inst);
static IntPtr GetState_cb (IntPtr inst)
{
try {
IActionImplementor __obj = GLib.Object.GetObject (inst, false) as IActionImplementor;
GLib.Variant __result;
__result = __obj.State;
return __result == null ? IntPtr.Zero : __result.Handle;
} catch (Exception e) {
GLib.ExceptionManager.RaiseUnhandledException (e, true);
// NOTREACHED: above call does not return.
throw;
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate void ChangeStateNativeDelegate (IntPtr inst, IntPtr value);
static void ChangeState_cb (IntPtr inst, IntPtr value)
{
try {
IActionImplementor __obj = GLib.Object.GetObject (inst, false) as IActionImplementor;
__obj.ChangeState (new GLib.Variant(value));
} catch (Exception e) {
GLib.ExceptionManager.RaiseUnhandledException (e, false);
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate void ActivateNativeDelegate (IntPtr inst, IntPtr parameter);
static void Activate_cb (IntPtr inst, IntPtr parameter)
{
try {
IActionImplementor __obj = GLib.Object.GetObject (inst, false) as IActionImplementor;
__obj.Activate (new GLib.Variant(parameter));
} catch (Exception e) {
GLib.ExceptionManager.RaiseUnhandledException (e, false);
}
}
static int class_offset = 2 * IntPtr.Size;
static void Initialize (IntPtr ptr, IntPtr data)
{
IntPtr ifaceptr = new IntPtr (ptr.ToInt64 () + class_offset);
GActionInterface native_iface = (GActionInterface) Marshal.PtrToStructure (ifaceptr, typeof (GActionInterface));
native_iface.GetName = iface.GetName;
native_iface.GetParameterType = iface.GetParameterType;
native_iface.GetStateType = iface.GetStateType;
native_iface.GetStateHint = iface.GetStateHint;
native_iface.GetEnabled = iface.GetEnabled;
native_iface.GetState = iface.GetState;
native_iface.ChangeState = iface.ChangeState;
native_iface.Activate = iface.Activate;
Marshal.StructureToPtr (native_iface, ifaceptr, false);
}
GLib.Object implementor;
public ActionAdapter ()
{
InitHandler = new GLib.GInterfaceInitHandler (Initialize);
}
public ActionAdapter (IActionImplementor implementor)
{
if (implementor == null)
throw new ArgumentNullException ("implementor");
else if (!(implementor is GLib.Object))
throw new ArgumentException ("implementor must be a subclass of GLib.Object");
this.implementor = implementor as GLib.Object;
}
public ActionAdapter (IntPtr handle)
{
if (!_gtype.IsInstance (handle))
throw new ArgumentException ("The gobject doesn't implement the GInterface of this adapter", "handle");
implementor = GLib.Object.GetObject (handle);
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate IntPtr d_g_action_get_type();
static d_g_action_get_type g_action_get_type = FuncLoader.LoadFunction<d_g_action_get_type>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_action_get_type"));
private static GLib.GType _gtype = new GLib.GType (g_action_get_type ());
public static GLib.GType GType {
get {
return _gtype;
}
}
public override GLib.GType GInterfaceGType {
get {
return _gtype;
}
}
public override IntPtr Handle {
get {
return implementor.Handle;
}
}
public IntPtr OwnedHandle {
get {
return implementor.OwnedHandle;
}
}
public static IAction GetObject (IntPtr handle, bool owned)
{
GLib.Object obj = GLib.Object.GetObject (handle, owned);
return GetObject (obj);
}
public static IAction GetObject (GLib.Object obj)
{
if (obj == null)
return null;
else if (obj is IActionImplementor)
return new ActionAdapter (obj as IActionImplementor);
else if (obj as IAction == null)
return new ActionAdapter (obj.Handle);
else
return obj as IAction;
}
public IActionImplementor Implementor {
get {
return implementor as IActionImplementor;
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate void d_g_action_activate(IntPtr raw, IntPtr parameter);
static d_g_action_activate g_action_activate = FuncLoader.LoadFunction<d_g_action_activate>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_action_activate"));
public void Activate(GLib.Variant parameter) {
g_action_activate(Handle, parameter == null ? IntPtr.Zero : parameter.Handle);
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate void d_g_action_change_state(IntPtr raw, IntPtr value);
static d_g_action_change_state g_action_change_state = FuncLoader.LoadFunction<d_g_action_change_state>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_action_change_state"));
public void ChangeState(GLib.Variant value) {
g_action_change_state(Handle, value == null ? IntPtr.Zero : value.Handle);
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate bool d_g_action_get_enabled(IntPtr raw);
static d_g_action_get_enabled g_action_get_enabled = FuncLoader.LoadFunction<d_g_action_get_enabled>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_action_get_enabled"));
public bool Enabled {
get {
bool raw_ret = g_action_get_enabled(Handle);
bool ret = raw_ret;
return ret;
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate IntPtr d_g_action_get_name(IntPtr raw);
static d_g_action_get_name g_action_get_name = FuncLoader.LoadFunction<d_g_action_get_name>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_action_get_name"));
public string Name {
get {
IntPtr raw_ret = g_action_get_name(Handle);
string ret = GLib.Marshaller.Utf8PtrToString (raw_ret);
return ret;
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate IntPtr d_g_action_get_parameter_type(IntPtr raw);
static d_g_action_get_parameter_type g_action_get_parameter_type = FuncLoader.LoadFunction<d_g_action_get_parameter_type>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_action_get_parameter_type"));
public GLib.VariantType ParameterType {
get {
IntPtr raw_ret = g_action_get_parameter_type(Handle);
GLib.VariantType ret = new GLib.VariantType(raw_ret);
return ret;
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate IntPtr d_g_action_get_state(IntPtr raw);
static d_g_action_get_state g_action_get_state = FuncLoader.LoadFunction<d_g_action_get_state>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_action_get_state"));
public GLib.Variant State {
get {
IntPtr raw_ret = g_action_get_state(Handle);
GLib.Variant ret = new GLib.Variant(raw_ret);
return ret;
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate IntPtr d_g_action_get_state_hint(IntPtr raw);
static d_g_action_get_state_hint g_action_get_state_hint = FuncLoader.LoadFunction<d_g_action_get_state_hint>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_action_get_state_hint"));
public GLib.Variant StateHint {
get {
IntPtr raw_ret = g_action_get_state_hint(Handle);
GLib.Variant ret = new GLib.Variant(raw_ret);
return ret;
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate IntPtr d_g_action_get_state_type(IntPtr raw);
static d_g_action_get_state_type g_action_get_state_type = FuncLoader.LoadFunction<d_g_action_get_state_type>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_action_get_state_type"));
public GLib.VariantType StateType {
get {
IntPtr raw_ret = g_action_get_state_type(Handle);
GLib.VariantType ret = new GLib.VariantType(raw_ret);
return ret;
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate bool d_g_action_name_is_valid(IntPtr action_name);
static d_g_action_name_is_valid g_action_name_is_valid = FuncLoader.LoadFunction<d_g_action_name_is_valid>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_action_name_is_valid"));
public static bool NameIsValid(string action_name) {
IntPtr native_action_name = GLib.Marshaller.StringToPtrGStrdup (action_name);
bool raw_ret = g_action_name_is_valid(native_action_name);
bool ret = raw_ret;
GLib.Marshaller.Free (native_action_name);
return ret;
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate bool d_g_action_parse_detailed_name(IntPtr detailed_name, IntPtr action_name, IntPtr target_value, out IntPtr error);
static d_g_action_parse_detailed_name g_action_parse_detailed_name = FuncLoader.LoadFunction<d_g_action_parse_detailed_name>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_action_parse_detailed_name"));
public static bool ParseDetailedName(string detailed_name, string action_name, GLib.Variant target_value) {
IntPtr native_detailed_name = GLib.Marshaller.StringToPtrGStrdup (detailed_name);
IntPtr error = IntPtr.Zero;
bool raw_ret = g_action_parse_detailed_name(native_detailed_name, GLib.Marshaller.StringToPtrGStrdup(action_name), target_value == null ? IntPtr.Zero : target_value.Handle, out error);
bool ret = raw_ret;
GLib.Marshaller.Free (native_detailed_name);
if (error != IntPtr.Zero) throw new GLib.GException (error);
return ret;
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate IntPtr d_g_action_print_detailed_name(IntPtr action_name, IntPtr target_value);
static d_g_action_print_detailed_name g_action_print_detailed_name = FuncLoader.LoadFunction<d_g_action_print_detailed_name>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_action_print_detailed_name"));
public static string PrintDetailedName(string action_name, GLib.Variant target_value) {
IntPtr native_action_name = GLib.Marshaller.StringToPtrGStrdup (action_name);
IntPtr raw_ret = g_action_print_detailed_name(native_action_name, target_value == null ? IntPtr.Zero : target_value.Handle);
string ret = GLib.Marshaller.PtrToStringGFree(raw_ret);
GLib.Marshaller.Free (native_action_name);
return ret;
}
#endregion
}
}

View File

@@ -0,0 +1,18 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace GLib {
using System;
public delegate void ActionAddedHandler(object o, ActionAddedArgs args);
public class ActionAddedArgs : GLib.SignalArgs {
public string ActionName{
get {
return (string) Args [0];
}
}
}
}

View File

@@ -0,0 +1,24 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace GLib {
using System;
public delegate void ActionEnabledChangedHandler(object o, ActionEnabledChangedArgs args);
public class ActionEnabledChangedArgs : GLib.SignalArgs {
public string ActionName{
get {
return (string) Args [0];
}
}
public bool Enabled{
get {
return (bool) Args [1];
}
}
}
}

View File

@@ -0,0 +1,49 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace GLib {
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.InteropServices;
#region Autogenerated code
[StructLayout(LayoutKind.Sequential)]
public partial struct ActionEntry : IEquatable<ActionEntry> {
public string Name;
public string ParameterType;
public string State;
[MarshalAs (UnmanagedType.ByValArray, SizeConst=3)]
private ulong[] Padding;
public static GLib.ActionEntry Zero = new GLib.ActionEntry ();
public static GLib.ActionEntry New(IntPtr raw) {
if (raw == IntPtr.Zero)
return GLib.ActionEntry.Zero;
return (GLib.ActionEntry) Marshal.PtrToStructure (raw, typeof (GLib.ActionEntry));
}
public bool Equals (ActionEntry other)
{
return true && Name.Equals (other.Name) && ParameterType.Equals (other.ParameterType) && State.Equals (other.State);
}
public override bool Equals (object other)
{
return other is ActionEntry && Equals ((ActionEntry) other);
}
public override int GetHashCode ()
{
return this.GetType ().FullName.GetHashCode () ^ Name.GetHashCode () ^ ParameterType.GetHashCode () ^ State.GetHashCode ();
}
private static GLib.GType GType {
get { return GLib.GType.Pointer; }
}
#endregion
}
}

View File

@@ -0,0 +1,501 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace GLib {
using System;
using System.Runtime.InteropServices;
#region Autogenerated code
public partial class ActionGroupAdapter : GLib.GInterfaceAdapter, GLib.IActionGroup {
[StructLayout (LayoutKind.Sequential)]
struct GActionGroupInterface {
public HasActionNativeDelegate HasAction;
public ListActionsNativeDelegate ListActions;
public GetActionEnabledNativeDelegate GetActionEnabled;
public GetActionParameterTypeNativeDelegate GetActionParameterType;
public GetActionStateTypeNativeDelegate GetActionStateType;
public GetActionStateHintNativeDelegate GetActionStateHint;
public GetActionStateNativeDelegate GetActionState;
public ChangeActionStateNativeDelegate ChangeActionState;
public ActivateActionNativeDelegate ActivateAction;
IntPtr ActionAdded;
IntPtr ActionRemoved;
IntPtr ActionEnabledChanged;
IntPtr ActionStateChanged;
public QueryActionNativeDelegate QueryAction;
}
static GActionGroupInterface iface;
static ActionGroupAdapter ()
{
GLib.GType.Register (_gtype, typeof (ActionGroupAdapter));
iface.HasAction = new HasActionNativeDelegate (HasAction_cb);
iface.ListActions = new ListActionsNativeDelegate (ListActions_cb);
iface.GetActionEnabled = new GetActionEnabledNativeDelegate (GetActionEnabled_cb);
iface.GetActionParameterType = new GetActionParameterTypeNativeDelegate (GetActionParameterType_cb);
iface.GetActionStateType = new GetActionStateTypeNativeDelegate (GetActionStateType_cb);
iface.GetActionStateHint = new GetActionStateHintNativeDelegate (GetActionStateHint_cb);
iface.GetActionState = new GetActionStateNativeDelegate (GetActionState_cb);
iface.ChangeActionState = new ChangeActionStateNativeDelegate (ChangeActionState_cb);
iface.ActivateAction = new ActivateActionNativeDelegate (ActivateAction_cb);
iface.QueryAction = new QueryActionNativeDelegate (QueryAction_cb);
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate bool HasActionNativeDelegate (IntPtr inst, IntPtr action_name);
static bool HasAction_cb (IntPtr inst, IntPtr action_name)
{
try {
IActionGroupImplementor __obj = GLib.Object.GetObject (inst, false) as IActionGroupImplementor;
bool __result;
__result = __obj.HasAction (GLib.Marshaller.Utf8PtrToString (action_name));
return __result;
} catch (Exception e) {
GLib.ExceptionManager.RaiseUnhandledException (e, true);
// NOTREACHED: above call does not return.
throw;
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate IntPtr ListActionsNativeDelegate (IntPtr inst);
static IntPtr ListActions_cb (IntPtr inst)
{
try {
IActionGroupImplementor __obj = GLib.Object.GetObject (inst, false) as IActionGroupImplementor;
string[] __result;
__result = __obj.ListActions ();
return GLib.Marshaller.StringArrayToNullTermStrvPointer (__result);
} catch (Exception e) {
GLib.ExceptionManager.RaiseUnhandledException (e, true);
// NOTREACHED: above call does not return.
throw;
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate bool GetActionEnabledNativeDelegate (IntPtr inst, IntPtr action_name);
static bool GetActionEnabled_cb (IntPtr inst, IntPtr action_name)
{
try {
IActionGroupImplementor __obj = GLib.Object.GetObject (inst, false) as IActionGroupImplementor;
bool __result;
__result = __obj.GetActionEnabled (GLib.Marshaller.Utf8PtrToString (action_name));
return __result;
} catch (Exception e) {
GLib.ExceptionManager.RaiseUnhandledException (e, true);
// NOTREACHED: above call does not return.
throw;
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate IntPtr GetActionParameterTypeNativeDelegate (IntPtr inst, IntPtr action_name);
static IntPtr GetActionParameterType_cb (IntPtr inst, IntPtr action_name)
{
try {
IActionGroupImplementor __obj = GLib.Object.GetObject (inst, false) as IActionGroupImplementor;
GLib.VariantType __result;
__result = __obj.GetActionParameterType (GLib.Marshaller.Utf8PtrToString (action_name));
return __result == null ? IntPtr.Zero : __result.Handle;
} catch (Exception e) {
GLib.ExceptionManager.RaiseUnhandledException (e, true);
// NOTREACHED: above call does not return.
throw;
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate IntPtr GetActionStateTypeNativeDelegate (IntPtr inst, IntPtr action_name);
static IntPtr GetActionStateType_cb (IntPtr inst, IntPtr action_name)
{
try {
IActionGroupImplementor __obj = GLib.Object.GetObject (inst, false) as IActionGroupImplementor;
GLib.VariantType __result;
__result = __obj.GetActionStateType (GLib.Marshaller.Utf8PtrToString (action_name));
return __result == null ? IntPtr.Zero : __result.Handle;
} catch (Exception e) {
GLib.ExceptionManager.RaiseUnhandledException (e, true);
// NOTREACHED: above call does not return.
throw;
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate IntPtr GetActionStateHintNativeDelegate (IntPtr inst, IntPtr action_name);
static IntPtr GetActionStateHint_cb (IntPtr inst, IntPtr action_name)
{
try {
IActionGroupImplementor __obj = GLib.Object.GetObject (inst, false) as IActionGroupImplementor;
GLib.Variant __result;
__result = __obj.GetActionStateHint (GLib.Marshaller.Utf8PtrToString (action_name));
return __result == null ? IntPtr.Zero : __result.Handle;
} catch (Exception e) {
GLib.ExceptionManager.RaiseUnhandledException (e, true);
// NOTREACHED: above call does not return.
throw;
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate IntPtr GetActionStateNativeDelegate (IntPtr inst, IntPtr action_name);
static IntPtr GetActionState_cb (IntPtr inst, IntPtr action_name)
{
try {
IActionGroupImplementor __obj = GLib.Object.GetObject (inst, false) as IActionGroupImplementor;
GLib.Variant __result;
__result = __obj.GetActionState (GLib.Marshaller.Utf8PtrToString (action_name));
return __result == null ? IntPtr.Zero : __result.Handle;
} catch (Exception e) {
GLib.ExceptionManager.RaiseUnhandledException (e, true);
// NOTREACHED: above call does not return.
throw;
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate void ChangeActionStateNativeDelegate (IntPtr inst, IntPtr action_name, IntPtr value);
static void ChangeActionState_cb (IntPtr inst, IntPtr action_name, IntPtr value)
{
try {
IActionGroupImplementor __obj = GLib.Object.GetObject (inst, false) as IActionGroupImplementor;
__obj.ChangeActionState (GLib.Marshaller.Utf8PtrToString (action_name), new GLib.Variant(value));
} catch (Exception e) {
GLib.ExceptionManager.RaiseUnhandledException (e, false);
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate void ActivateActionNativeDelegate (IntPtr inst, IntPtr action_name, IntPtr parameter);
static void ActivateAction_cb (IntPtr inst, IntPtr action_name, IntPtr parameter)
{
try {
IActionGroupImplementor __obj = GLib.Object.GetObject (inst, false) as IActionGroupImplementor;
__obj.ActivateAction (GLib.Marshaller.Utf8PtrToString (action_name), new GLib.Variant(parameter));
} catch (Exception e) {
GLib.ExceptionManager.RaiseUnhandledException (e, false);
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate bool QueryActionNativeDelegate (IntPtr inst, IntPtr action_name, out bool enabled, IntPtr parameter_type, IntPtr state_type, IntPtr state_hint, IntPtr state);
static bool QueryAction_cb (IntPtr inst, IntPtr action_name, out bool enabled, IntPtr parameter_type, IntPtr state_type, IntPtr state_hint, IntPtr state)
{
try {
IActionGroupImplementor __obj = GLib.Object.GetObject (inst, false) as IActionGroupImplementor;
bool __result;
__result = __obj.QueryAction (GLib.Marshaller.Utf8PtrToString (action_name), out enabled, new GLib.VariantType(parameter_type), new GLib.VariantType(state_type), new GLib.Variant(state_hint), new GLib.Variant(state));
return __result;
} catch (Exception e) {
GLib.ExceptionManager.RaiseUnhandledException (e, true);
// NOTREACHED: above call does not return.
throw;
}
}
static int class_offset = 2 * IntPtr.Size;
static void Initialize (IntPtr ptr, IntPtr data)
{
IntPtr ifaceptr = new IntPtr (ptr.ToInt64 () + class_offset);
GActionGroupInterface native_iface = (GActionGroupInterface) Marshal.PtrToStructure (ifaceptr, typeof (GActionGroupInterface));
native_iface.HasAction = iface.HasAction;
native_iface.ListActions = iface.ListActions;
native_iface.GetActionEnabled = iface.GetActionEnabled;
native_iface.GetActionParameterType = iface.GetActionParameterType;
native_iface.GetActionStateType = iface.GetActionStateType;
native_iface.GetActionStateHint = iface.GetActionStateHint;
native_iface.GetActionState = iface.GetActionState;
native_iface.ChangeActionState = iface.ChangeActionState;
native_iface.ActivateAction = iface.ActivateAction;
native_iface.QueryAction = iface.QueryAction;
Marshal.StructureToPtr (native_iface, ifaceptr, false);
}
GLib.Object implementor;
public ActionGroupAdapter ()
{
InitHandler = new GLib.GInterfaceInitHandler (Initialize);
}
public ActionGroupAdapter (IActionGroupImplementor implementor)
{
if (implementor == null)
throw new ArgumentNullException ("implementor");
else if (!(implementor is GLib.Object))
throw new ArgumentException ("implementor must be a subclass of GLib.Object");
this.implementor = implementor as GLib.Object;
}
public ActionGroupAdapter (IntPtr handle)
{
if (!_gtype.IsInstance (handle))
throw new ArgumentException ("The gobject doesn't implement the GInterface of this adapter", "handle");
implementor = GLib.Object.GetObject (handle);
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate IntPtr d_g_action_group_get_type();
static d_g_action_group_get_type g_action_group_get_type = FuncLoader.LoadFunction<d_g_action_group_get_type>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_action_group_get_type"));
private static GLib.GType _gtype = new GLib.GType (g_action_group_get_type ());
public static GLib.GType GType {
get {
return _gtype;
}
}
public override GLib.GType GInterfaceGType {
get {
return _gtype;
}
}
public override IntPtr Handle {
get {
return implementor.Handle;
}
}
public IntPtr OwnedHandle {
get {
return implementor.OwnedHandle;
}
}
public static IActionGroup GetObject (IntPtr handle, bool owned)
{
GLib.Object obj = GLib.Object.GetObject (handle, owned);
return GetObject (obj);
}
public static IActionGroup GetObject (GLib.Object obj)
{
if (obj == null)
return null;
else if (obj is IActionGroupImplementor)
return new ActionGroupAdapter (obj as IActionGroupImplementor);
else if (obj as IActionGroup == null)
return new ActionGroupAdapter (obj.Handle);
else
return obj as IActionGroup;
}
public IActionGroupImplementor Implementor {
get {
return implementor as IActionGroupImplementor;
}
}
[GLib.Signal("action-state-changed")]
public event GLib.ActionStateChangedHandler ActionStateChanged {
add {
GLib.Object.GetObject (Handle).AddSignalHandler ("action-state-changed", value, typeof (GLib.ActionStateChangedArgs));
}
remove {
GLib.Object.GetObject (Handle).RemoveSignalHandler ("action-state-changed", value);
}
}
[GLib.Signal("action-removed")]
public event GLib.ActionRemovedHandler ActionRemoved {
add {
GLib.Object.GetObject (Handle).AddSignalHandler ("action-removed", value, typeof (GLib.ActionRemovedArgs));
}
remove {
GLib.Object.GetObject (Handle).RemoveSignalHandler ("action-removed", value);
}
}
[GLib.Signal("action-added")]
public event GLib.ActionAddedHandler ActionAdded {
add {
GLib.Object.GetObject (Handle).AddSignalHandler ("action-added", value, typeof (GLib.ActionAddedArgs));
}
remove {
GLib.Object.GetObject (Handle).RemoveSignalHandler ("action-added", value);
}
}
[GLib.Signal("action-enabled-changed")]
public event GLib.ActionEnabledChangedHandler ActionEnabledChanged {
add {
GLib.Object.GetObject (Handle).AddSignalHandler ("action-enabled-changed", value, typeof (GLib.ActionEnabledChangedArgs));
}
remove {
GLib.Object.GetObject (Handle).RemoveSignalHandler ("action-enabled-changed", value);
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate void d_g_action_group_action_added(IntPtr raw, IntPtr action_name);
static d_g_action_group_action_added g_action_group_action_added = FuncLoader.LoadFunction<d_g_action_group_action_added>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_action_group_action_added"));
public void EmitActionAdded(string action_name) {
IntPtr native_action_name = GLib.Marshaller.StringToPtrGStrdup (action_name);
g_action_group_action_added(Handle, native_action_name);
GLib.Marshaller.Free (native_action_name);
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate void d_g_action_group_action_enabled_changed(IntPtr raw, IntPtr action_name, bool enabled);
static d_g_action_group_action_enabled_changed g_action_group_action_enabled_changed = FuncLoader.LoadFunction<d_g_action_group_action_enabled_changed>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_action_group_action_enabled_changed"));
public void EmitActionEnabledChanged(string action_name, bool enabled) {
IntPtr native_action_name = GLib.Marshaller.StringToPtrGStrdup (action_name);
g_action_group_action_enabled_changed(Handle, native_action_name, enabled);
GLib.Marshaller.Free (native_action_name);
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate void d_g_action_group_action_removed(IntPtr raw, IntPtr action_name);
static d_g_action_group_action_removed g_action_group_action_removed = FuncLoader.LoadFunction<d_g_action_group_action_removed>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_action_group_action_removed"));
public void EmitActionRemoved(string action_name) {
IntPtr native_action_name = GLib.Marshaller.StringToPtrGStrdup (action_name);
g_action_group_action_removed(Handle, native_action_name);
GLib.Marshaller.Free (native_action_name);
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate void d_g_action_group_action_state_changed(IntPtr raw, IntPtr action_name, IntPtr state);
static d_g_action_group_action_state_changed g_action_group_action_state_changed = FuncLoader.LoadFunction<d_g_action_group_action_state_changed>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_action_group_action_state_changed"));
public void EmitActionStateChanged(string action_name, GLib.Variant state) {
IntPtr native_action_name = GLib.Marshaller.StringToPtrGStrdup (action_name);
g_action_group_action_state_changed(Handle, native_action_name, state == null ? IntPtr.Zero : state.Handle);
GLib.Marshaller.Free (native_action_name);
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate void d_g_action_group_activate_action(IntPtr raw, IntPtr action_name, IntPtr parameter);
static d_g_action_group_activate_action g_action_group_activate_action = FuncLoader.LoadFunction<d_g_action_group_activate_action>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_action_group_activate_action"));
public void ActivateAction(string action_name, GLib.Variant parameter) {
IntPtr native_action_name = GLib.Marshaller.StringToPtrGStrdup (action_name);
g_action_group_activate_action(Handle, native_action_name, parameter == null ? IntPtr.Zero : parameter.Handle);
GLib.Marshaller.Free (native_action_name);
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate void d_g_action_group_change_action_state(IntPtr raw, IntPtr action_name, IntPtr value);
static d_g_action_group_change_action_state g_action_group_change_action_state = FuncLoader.LoadFunction<d_g_action_group_change_action_state>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_action_group_change_action_state"));
public void ChangeActionState(string action_name, GLib.Variant value) {
IntPtr native_action_name = GLib.Marshaller.StringToPtrGStrdup (action_name);
g_action_group_change_action_state(Handle, native_action_name, value == null ? IntPtr.Zero : value.Handle);
GLib.Marshaller.Free (native_action_name);
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate bool d_g_action_group_get_action_enabled(IntPtr raw, IntPtr action_name);
static d_g_action_group_get_action_enabled g_action_group_get_action_enabled = FuncLoader.LoadFunction<d_g_action_group_get_action_enabled>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_action_group_get_action_enabled"));
public bool GetActionEnabled(string action_name) {
IntPtr native_action_name = GLib.Marshaller.StringToPtrGStrdup (action_name);
bool raw_ret = g_action_group_get_action_enabled(Handle, native_action_name);
bool ret = raw_ret;
GLib.Marshaller.Free (native_action_name);
return ret;
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate IntPtr d_g_action_group_get_action_parameter_type(IntPtr raw, IntPtr action_name);
static d_g_action_group_get_action_parameter_type g_action_group_get_action_parameter_type = FuncLoader.LoadFunction<d_g_action_group_get_action_parameter_type>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_action_group_get_action_parameter_type"));
public GLib.VariantType GetActionParameterType(string action_name) {
IntPtr native_action_name = GLib.Marshaller.StringToPtrGStrdup (action_name);
IntPtr raw_ret = g_action_group_get_action_parameter_type(Handle, native_action_name);
GLib.VariantType ret = new GLib.VariantType(raw_ret);
GLib.Marshaller.Free (native_action_name);
return ret;
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate IntPtr d_g_action_group_get_action_state(IntPtr raw, IntPtr action_name);
static d_g_action_group_get_action_state g_action_group_get_action_state = FuncLoader.LoadFunction<d_g_action_group_get_action_state>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_action_group_get_action_state"));
public GLib.Variant GetActionState(string action_name) {
IntPtr native_action_name = GLib.Marshaller.StringToPtrGStrdup (action_name);
IntPtr raw_ret = g_action_group_get_action_state(Handle, native_action_name);
GLib.Variant ret = new GLib.Variant(raw_ret);
GLib.Marshaller.Free (native_action_name);
return ret;
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate IntPtr d_g_action_group_get_action_state_hint(IntPtr raw, IntPtr action_name);
static d_g_action_group_get_action_state_hint g_action_group_get_action_state_hint = FuncLoader.LoadFunction<d_g_action_group_get_action_state_hint>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_action_group_get_action_state_hint"));
public GLib.Variant GetActionStateHint(string action_name) {
IntPtr native_action_name = GLib.Marshaller.StringToPtrGStrdup (action_name);
IntPtr raw_ret = g_action_group_get_action_state_hint(Handle, native_action_name);
GLib.Variant ret = new GLib.Variant(raw_ret);
GLib.Marshaller.Free (native_action_name);
return ret;
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate IntPtr d_g_action_group_get_action_state_type(IntPtr raw, IntPtr action_name);
static d_g_action_group_get_action_state_type g_action_group_get_action_state_type = FuncLoader.LoadFunction<d_g_action_group_get_action_state_type>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_action_group_get_action_state_type"));
public GLib.VariantType GetActionStateType(string action_name) {
IntPtr native_action_name = GLib.Marshaller.StringToPtrGStrdup (action_name);
IntPtr raw_ret = g_action_group_get_action_state_type(Handle, native_action_name);
GLib.VariantType ret = new GLib.VariantType(raw_ret);
GLib.Marshaller.Free (native_action_name);
return ret;
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate bool d_g_action_group_has_action(IntPtr raw, IntPtr action_name);
static d_g_action_group_has_action g_action_group_has_action = FuncLoader.LoadFunction<d_g_action_group_has_action>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_action_group_has_action"));
public bool HasAction(string action_name) {
IntPtr native_action_name = GLib.Marshaller.StringToPtrGStrdup (action_name);
bool raw_ret = g_action_group_has_action(Handle, native_action_name);
bool ret = raw_ret;
GLib.Marshaller.Free (native_action_name);
return ret;
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate IntPtr d_g_action_group_list_actions(IntPtr raw);
static d_g_action_group_list_actions g_action_group_list_actions = FuncLoader.LoadFunction<d_g_action_group_list_actions>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_action_group_list_actions"));
public string[] ListActions() {
IntPtr raw_ret = g_action_group_list_actions(Handle);
string[] ret = GLib.Marshaller.NullTermPtrToStringArray (raw_ret, true);
return ret;
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate bool d_g_action_group_query_action(IntPtr raw, IntPtr action_name, out bool enabled, IntPtr parameter_type, IntPtr state_type, IntPtr state_hint, IntPtr state);
static d_g_action_group_query_action g_action_group_query_action = FuncLoader.LoadFunction<d_g_action_group_query_action>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_action_group_query_action"));
public bool QueryAction(string action_name, out bool enabled, GLib.VariantType parameter_type, GLib.VariantType state_type, GLib.Variant state_hint, GLib.Variant state) {
IntPtr native_action_name = GLib.Marshaller.StringToPtrGStrdup (action_name);
bool raw_ret = g_action_group_query_action(Handle, native_action_name, out enabled, parameter_type == null ? IntPtr.Zero : parameter_type.Handle, state_type == null ? IntPtr.Zero : state_type.Handle, state_hint == null ? IntPtr.Zero : state_hint.Handle, state == null ? IntPtr.Zero : state.Handle);
bool ret = raw_ret;
GLib.Marshaller.Free (native_action_name);
return ret;
}
#endregion
}
}

View File

@@ -0,0 +1,203 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace GLib {
using System;
using System.Runtime.InteropServices;
#region Autogenerated code
public partial class ActionMapAdapter : GLib.GInterfaceAdapter, GLib.IActionMap {
[StructLayout (LayoutKind.Sequential)]
struct GActionMapInterface {
public LookupActionNativeDelegate LookupAction;
public AddActionNativeDelegate AddAction;
public RemoveActionNativeDelegate RemoveAction;
}
static GActionMapInterface iface;
static ActionMapAdapter ()
{
GLib.GType.Register (_gtype, typeof (ActionMapAdapter));
iface.LookupAction = new LookupActionNativeDelegate (LookupAction_cb);
iface.AddAction = new AddActionNativeDelegate (AddAction_cb);
iface.RemoveAction = new RemoveActionNativeDelegate (RemoveAction_cb);
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate IntPtr LookupActionNativeDelegate (IntPtr inst, IntPtr action_name);
static IntPtr LookupAction_cb (IntPtr inst, IntPtr action_name)
{
try {
IActionMapImplementor __obj = GLib.Object.GetObject (inst, false) as IActionMapImplementor;
GLib.IAction __result;
__result = __obj.LookupAction (GLib.Marshaller.Utf8PtrToString (action_name));
return __result == null ? IntPtr.Zero : ((__result is GLib.Object) ? (__result as GLib.Object).Handle : (__result as GLib.ActionAdapter).Handle);
} catch (Exception e) {
GLib.ExceptionManager.RaiseUnhandledException (e, true);
// NOTREACHED: above call does not return.
throw;
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate void AddActionNativeDelegate (IntPtr inst, IntPtr action);
static void AddAction_cb (IntPtr inst, IntPtr action)
{
try {
IActionMapImplementor __obj = GLib.Object.GetObject (inst, false) as IActionMapImplementor;
__obj.AddAction (GLib.ActionAdapter.GetObject (action, false));
} catch (Exception e) {
GLib.ExceptionManager.RaiseUnhandledException (e, false);
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate void RemoveActionNativeDelegate (IntPtr inst, IntPtr action_name);
static void RemoveAction_cb (IntPtr inst, IntPtr action_name)
{
try {
IActionMapImplementor __obj = GLib.Object.GetObject (inst, false) as IActionMapImplementor;
__obj.RemoveAction (GLib.Marshaller.Utf8PtrToString (action_name));
} catch (Exception e) {
GLib.ExceptionManager.RaiseUnhandledException (e, false);
}
}
static int class_offset = 2 * IntPtr.Size;
static void Initialize (IntPtr ptr, IntPtr data)
{
IntPtr ifaceptr = new IntPtr (ptr.ToInt64 () + class_offset);
GActionMapInterface native_iface = (GActionMapInterface) Marshal.PtrToStructure (ifaceptr, typeof (GActionMapInterface));
native_iface.LookupAction = iface.LookupAction;
native_iface.AddAction = iface.AddAction;
native_iface.RemoveAction = iface.RemoveAction;
Marshal.StructureToPtr (native_iface, ifaceptr, false);
}
GLib.Object implementor;
public ActionMapAdapter ()
{
InitHandler = new GLib.GInterfaceInitHandler (Initialize);
}
public ActionMapAdapter (IActionMapImplementor implementor)
{
if (implementor == null)
throw new ArgumentNullException ("implementor");
else if (!(implementor is GLib.Object))
throw new ArgumentException ("implementor must be a subclass of GLib.Object");
this.implementor = implementor as GLib.Object;
}
public ActionMapAdapter (IntPtr handle)
{
if (!_gtype.IsInstance (handle))
throw new ArgumentException ("The gobject doesn't implement the GInterface of this adapter", "handle");
implementor = GLib.Object.GetObject (handle);
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate IntPtr d_g_action_map_get_type();
static d_g_action_map_get_type g_action_map_get_type = FuncLoader.LoadFunction<d_g_action_map_get_type>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_action_map_get_type"));
private static GLib.GType _gtype = new GLib.GType (g_action_map_get_type ());
public static GLib.GType GType {
get {
return _gtype;
}
}
public override GLib.GType GInterfaceGType {
get {
return _gtype;
}
}
public override IntPtr Handle {
get {
return implementor.Handle;
}
}
public IntPtr OwnedHandle {
get {
return implementor.OwnedHandle;
}
}
public static IActionMap GetObject (IntPtr handle, bool owned)
{
GLib.Object obj = GLib.Object.GetObject (handle, owned);
return GetObject (obj);
}
public static IActionMap GetObject (GLib.Object obj)
{
if (obj == null)
return null;
else if (obj is IActionMapImplementor)
return new ActionMapAdapter (obj as IActionMapImplementor);
else if (obj as IActionMap == null)
return new ActionMapAdapter (obj.Handle);
else
return obj as IActionMap;
}
public IActionMapImplementor Implementor {
get {
return implementor as IActionMapImplementor;
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate void d_g_action_map_add_action(IntPtr raw, IntPtr action);
static d_g_action_map_add_action g_action_map_add_action = FuncLoader.LoadFunction<d_g_action_map_add_action>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_action_map_add_action"));
public void AddAction(GLib.IAction action) {
g_action_map_add_action(Handle, action == null ? IntPtr.Zero : ((action is GLib.Object) ? (action as GLib.Object).Handle : (action as GLib.ActionAdapter).Handle));
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate void d_g_action_map_add_action_entries(IntPtr raw, IntPtr entries, int n_entries, IntPtr user_data);
static d_g_action_map_add_action_entries g_action_map_add_action_entries = FuncLoader.LoadFunction<d_g_action_map_add_action_entries>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_action_map_add_action_entries"));
public void AddActionEntries(GLib.ActionEntry entries, int n_entries, IntPtr user_data) {
IntPtr native_entries = GLib.Marshaller.StructureToPtrAlloc (entries);
g_action_map_add_action_entries(Handle, native_entries, n_entries, user_data);
Marshal.FreeHGlobal (native_entries);
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate IntPtr d_g_action_map_lookup_action(IntPtr raw, IntPtr action_name);
static d_g_action_map_lookup_action g_action_map_lookup_action = FuncLoader.LoadFunction<d_g_action_map_lookup_action>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_action_map_lookup_action"));
public GLib.IAction LookupAction(string action_name) {
IntPtr native_action_name = GLib.Marshaller.StringToPtrGStrdup (action_name);
IntPtr raw_ret = g_action_map_lookup_action(Handle, native_action_name);
GLib.IAction ret = GLib.ActionAdapter.GetObject (raw_ret, false);
GLib.Marshaller.Free (native_action_name);
return ret;
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate void d_g_action_map_remove_action(IntPtr raw, IntPtr action_name);
static d_g_action_map_remove_action g_action_map_remove_action = FuncLoader.LoadFunction<d_g_action_map_remove_action>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_action_map_remove_action"));
public void RemoveAction(string action_name) {
IntPtr native_action_name = GLib.Marshaller.StringToPtrGStrdup (action_name);
g_action_map_remove_action(Handle, native_action_name);
GLib.Marshaller.Free (native_action_name);
}
#endregion
}
}

View File

@@ -0,0 +1,18 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace GLib {
using System;
public delegate void ActionRemovedHandler(object o, ActionRemovedArgs args);
public class ActionRemovedArgs : GLib.SignalArgs {
public string ActionName{
get {
return (string) Args [0];
}
}
}
}

View File

@@ -0,0 +1,24 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace GLib {
using System;
public delegate void ActionStateChangedHandler(object o, ActionStateChangedArgs args);
public class ActionStateChangedArgs : GLib.SignalArgs {
public string ActionName{
get {
return (string) Args [0];
}
}
public GLib.Variant State{
get {
return (GLib.Variant) Args [1];
}
}
}
}

View File

@@ -0,0 +1,18 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace GLib {
using System;
public delegate void ActivatedHandler(object o, ActivatedArgs args);
public class ActivatedArgs : GLib.SignalArgs {
public GLib.Variant P0{
get {
return (GLib.Variant) Args [0];
}
}
}
}

View File

@@ -0,0 +1,471 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace GLib {
using System;
using System.Runtime.InteropServices;
#region Autogenerated code
public partial class AppInfoAdapter : GLib.GInterfaceAdapter, GLib.IAppInfo {
GLib.Object implementor;
public AppInfoAdapter (IntPtr handle)
{
if (!_gtype.IsInstance (handle))
throw new ArgumentException ("The gobject doesn't implement the GInterface of this adapter", "handle");
implementor = GLib.Object.GetObject (handle);
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate IntPtr d_g_app_info_get_type();
static d_g_app_info_get_type g_app_info_get_type = FuncLoader.LoadFunction<d_g_app_info_get_type>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_app_info_get_type"));
private static GLib.GType _gtype = new GLib.GType (g_app_info_get_type ());
public static GLib.GType GType {
get {
return _gtype;
}
}
public override GLib.GType GInterfaceGType {
get {
return _gtype;
}
}
public override IntPtr Handle {
get {
return implementor.Handle;
}
}
public IntPtr OwnedHandle {
get {
return implementor.OwnedHandle;
}
}
public static IAppInfo GetObject (IntPtr handle, bool owned)
{
GLib.Object obj = GLib.Object.GetObject (handle, owned);
return GetObject (obj);
}
public static IAppInfo GetObject (GLib.Object obj)
{
if (obj == null)
return null;
else if (obj as IAppInfo == null)
return new AppInfoAdapter (obj.Handle);
else
return obj as IAppInfo;
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate bool d_g_app_info_add_supports_type(IntPtr raw, IntPtr content_type, out IntPtr error);
static d_g_app_info_add_supports_type g_app_info_add_supports_type = FuncLoader.LoadFunction<d_g_app_info_add_supports_type>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_app_info_add_supports_type"));
public bool AddSupportsType(string content_type) {
IntPtr native_content_type = GLib.Marshaller.StringToPtrGStrdup (content_type);
IntPtr error = IntPtr.Zero;
bool raw_ret = g_app_info_add_supports_type(Handle, native_content_type, out error);
bool ret = raw_ret;
GLib.Marshaller.Free (native_content_type);
if (error != IntPtr.Zero) throw new GLib.GException (error);
return ret;
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate bool d_g_app_info_can_delete(IntPtr raw);
static d_g_app_info_can_delete g_app_info_can_delete = FuncLoader.LoadFunction<d_g_app_info_can_delete>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_app_info_can_delete"));
public bool CanDelete() {
bool raw_ret = g_app_info_can_delete(Handle);
bool ret = raw_ret;
return ret;
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate bool d_g_app_info_can_remove_supports_type(IntPtr raw);
static d_g_app_info_can_remove_supports_type g_app_info_can_remove_supports_type = FuncLoader.LoadFunction<d_g_app_info_can_remove_supports_type>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_app_info_can_remove_supports_type"));
public bool CanRemoveSupportsType {
get {
bool raw_ret = g_app_info_can_remove_supports_type(Handle);
bool ret = raw_ret;
return ret;
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate IntPtr d_g_app_info_create_from_commandline(IntPtr commandline, IntPtr application_name, int flags, out IntPtr error);
static d_g_app_info_create_from_commandline g_app_info_create_from_commandline = FuncLoader.LoadFunction<d_g_app_info_create_from_commandline>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_app_info_create_from_commandline"));
public static GLib.IAppInfo CreateFromCommandline(string commandline, string application_name, GLib.AppInfoCreateFlags flags) {
IntPtr native_commandline = GLib.Marshaller.StringToPtrGStrdup (commandline);
IntPtr native_application_name = GLib.Marshaller.StringToPtrGStrdup (application_name);
IntPtr error = IntPtr.Zero;
IntPtr raw_ret = g_app_info_create_from_commandline(native_commandline, native_application_name, (int) flags, out error);
GLib.IAppInfo ret = GLib.AppInfoAdapter.GetObject (raw_ret, false);
GLib.Marshaller.Free (native_commandline);
GLib.Marshaller.Free (native_application_name);
if (error != IntPtr.Zero) throw new GLib.GException (error);
return ret;
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate bool d_g_app_info_delete(IntPtr raw);
static d_g_app_info_delete g_app_info_delete = FuncLoader.LoadFunction<d_g_app_info_delete>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_app_info_delete"));
public bool Delete() {
bool raw_ret = g_app_info_delete(Handle);
bool ret = raw_ret;
return ret;
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate IntPtr d_g_app_info_dup(IntPtr raw);
static d_g_app_info_dup g_app_info_dup = FuncLoader.LoadFunction<d_g_app_info_dup>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_app_info_dup"));
public GLib.IAppInfo Dup() {
IntPtr raw_ret = g_app_info_dup(Handle);
GLib.IAppInfo ret = GLib.AppInfoAdapter.GetObject (raw_ret, false);
return ret;
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate bool d_g_app_info_equal(IntPtr raw, IntPtr appinfo2);
static d_g_app_info_equal g_app_info_equal = FuncLoader.LoadFunction<d_g_app_info_equal>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_app_info_equal"));
public bool Equal(GLib.IAppInfo appinfo2) {
bool raw_ret = g_app_info_equal(Handle, appinfo2 == null ? IntPtr.Zero : ((appinfo2 is GLib.Object) ? (appinfo2 as GLib.Object).Handle : (appinfo2 as GLib.AppInfoAdapter).Handle));
bool ret = raw_ret;
return ret;
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate IntPtr d_g_app_info_get_all_for_type(IntPtr content_type);
static d_g_app_info_get_all_for_type g_app_info_get_all_for_type = FuncLoader.LoadFunction<d_g_app_info_get_all_for_type>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_app_info_get_all_for_type"));
public static GLib.IAppInfo[] GetAllForType(string content_type) {
IntPtr native_content_type = GLib.Marshaller.StringToPtrGStrdup (content_type);
IntPtr raw_ret = g_app_info_get_all_for_type(native_content_type);
GLib.IAppInfo[] ret = GLib.Marshaller.ListPtrToArray<GLib.IAppInfo, GLib.IAppInfo> (raw_ret, true, false);
GLib.Marshaller.Free (native_content_type);
return ret;
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate IntPtr d_g_app_info_get_commandline(IntPtr raw);
static d_g_app_info_get_commandline g_app_info_get_commandline = FuncLoader.LoadFunction<d_g_app_info_get_commandline>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_app_info_get_commandline"));
public string Commandline {
get {
IntPtr raw_ret = g_app_info_get_commandline(Handle);
string ret = GLib.Marshaller.Utf8PtrToString (raw_ret);
return ret;
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate IntPtr d_g_app_info_get_default_for_type(IntPtr content_type, bool must_support_uris);
static d_g_app_info_get_default_for_type g_app_info_get_default_for_type = FuncLoader.LoadFunction<d_g_app_info_get_default_for_type>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_app_info_get_default_for_type"));
public static GLib.IAppInfo GetDefaultForType(string content_type, bool must_support_uris) {
IntPtr native_content_type = GLib.Marshaller.StringToPtrGStrdup (content_type);
IntPtr raw_ret = g_app_info_get_default_for_type(native_content_type, must_support_uris);
GLib.IAppInfo ret = GLib.AppInfoAdapter.GetObject (raw_ret, false);
GLib.Marshaller.Free (native_content_type);
return ret;
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate IntPtr d_g_app_info_get_default_for_uri_scheme(IntPtr uri_scheme);
static d_g_app_info_get_default_for_uri_scheme g_app_info_get_default_for_uri_scheme = FuncLoader.LoadFunction<d_g_app_info_get_default_for_uri_scheme>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_app_info_get_default_for_uri_scheme"));
public static GLib.IAppInfo GetDefaultForUriScheme(string uri_scheme) {
IntPtr native_uri_scheme = GLib.Marshaller.StringToPtrGStrdup (uri_scheme);
IntPtr raw_ret = g_app_info_get_default_for_uri_scheme(native_uri_scheme);
GLib.IAppInfo ret = GLib.AppInfoAdapter.GetObject (raw_ret, false);
GLib.Marshaller.Free (native_uri_scheme);
return ret;
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate IntPtr d_g_app_info_get_description(IntPtr raw);
static d_g_app_info_get_description g_app_info_get_description = FuncLoader.LoadFunction<d_g_app_info_get_description>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_app_info_get_description"));
public string Description {
get {
IntPtr raw_ret = g_app_info_get_description(Handle);
string ret = GLib.Marshaller.Utf8PtrToString (raw_ret);
return ret;
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate IntPtr d_g_app_info_get_display_name(IntPtr raw);
static d_g_app_info_get_display_name g_app_info_get_display_name = FuncLoader.LoadFunction<d_g_app_info_get_display_name>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_app_info_get_display_name"));
public string DisplayName {
get {
IntPtr raw_ret = g_app_info_get_display_name(Handle);
string ret = GLib.Marshaller.Utf8PtrToString (raw_ret);
return ret;
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate IntPtr d_g_app_info_get_executable(IntPtr raw);
static d_g_app_info_get_executable g_app_info_get_executable = FuncLoader.LoadFunction<d_g_app_info_get_executable>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_app_info_get_executable"));
public string Executable {
get {
IntPtr raw_ret = g_app_info_get_executable(Handle);
string ret = GLib.Marshaller.Utf8PtrToString (raw_ret);
return ret;
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate IntPtr d_g_app_info_get_fallback_for_type(IntPtr content_type);
static d_g_app_info_get_fallback_for_type g_app_info_get_fallback_for_type = FuncLoader.LoadFunction<d_g_app_info_get_fallback_for_type>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_app_info_get_fallback_for_type"));
public static GLib.IAppInfo[] GetFallbackForType(string content_type) {
IntPtr native_content_type = GLib.Marshaller.StringToPtrGStrdup (content_type);
IntPtr raw_ret = g_app_info_get_fallback_for_type(native_content_type);
GLib.IAppInfo[] ret = GLib.Marshaller.ListPtrToArray<GLib.IAppInfo, GLib.IAppInfo> (raw_ret, true, true);
GLib.Marshaller.Free (native_content_type);
return ret;
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate IntPtr d_g_app_info_get_icon(IntPtr raw);
static d_g_app_info_get_icon g_app_info_get_icon = FuncLoader.LoadFunction<d_g_app_info_get_icon>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_app_info_get_icon"));
public GLib.IIcon Icon {
get {
IntPtr raw_ret = g_app_info_get_icon(Handle);
GLib.IIcon ret = GLib.IconAdapter.GetObject (raw_ret, false);
return ret;
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate IntPtr d_g_app_info_get_id(IntPtr raw);
static d_g_app_info_get_id g_app_info_get_id = FuncLoader.LoadFunction<d_g_app_info_get_id>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_app_info_get_id"));
public string Id {
get {
IntPtr raw_ret = g_app_info_get_id(Handle);
string ret = GLib.Marshaller.Utf8PtrToString (raw_ret);
return ret;
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate IntPtr d_g_app_info_get_name(IntPtr raw);
static d_g_app_info_get_name g_app_info_get_name = FuncLoader.LoadFunction<d_g_app_info_get_name>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_app_info_get_name"));
public string Name {
get {
IntPtr raw_ret = g_app_info_get_name(Handle);
string ret = GLib.Marshaller.Utf8PtrToString (raw_ret);
return ret;
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate IntPtr d_g_app_info_get_recommended_for_type(IntPtr content_type);
static d_g_app_info_get_recommended_for_type g_app_info_get_recommended_for_type = FuncLoader.LoadFunction<d_g_app_info_get_recommended_for_type>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_app_info_get_recommended_for_type"));
public static GLib.IAppInfo[] GetRecommendedForType(string content_type) {
IntPtr native_content_type = GLib.Marshaller.StringToPtrGStrdup (content_type);
IntPtr raw_ret = g_app_info_get_recommended_for_type(native_content_type);
GLib.IAppInfo[] ret = GLib.Marshaller.ListPtrToArray<GLib.IAppInfo, GLib.IAppInfo> (raw_ret, true, true);
GLib.Marshaller.Free (native_content_type);
return ret;
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate IntPtr d_g_app_info_get_supported_types(IntPtr raw);
static d_g_app_info_get_supported_types g_app_info_get_supported_types = FuncLoader.LoadFunction<d_g_app_info_get_supported_types>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_app_info_get_supported_types"));
public string SupportedTypes {
get {
IntPtr raw_ret = g_app_info_get_supported_types(Handle);
string ret = GLib.Marshaller.Utf8PtrToString (raw_ret);
return ret;
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate bool d_g_app_info_launch(IntPtr raw, IntPtr files, IntPtr launch_context, out IntPtr error);
static d_g_app_info_launch g_app_info_launch = FuncLoader.LoadFunction<d_g_app_info_launch>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_app_info_launch"));
public bool Launch(GLib.List files, GLib.AppLaunchContext launch_context) {
IntPtr error = IntPtr.Zero;
bool raw_ret = g_app_info_launch(Handle, files == null ? IntPtr.Zero : files.Handle, launch_context == null ? IntPtr.Zero : launch_context.Handle, out error);
bool ret = raw_ret;
if (error != IntPtr.Zero) throw new GLib.GException (error);
return ret;
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate bool d_g_app_info_launch_default_for_uri(IntPtr uri, IntPtr launch_context, out IntPtr error);
static d_g_app_info_launch_default_for_uri g_app_info_launch_default_for_uri = FuncLoader.LoadFunction<d_g_app_info_launch_default_for_uri>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_app_info_launch_default_for_uri"));
public static bool LaunchDefaultForUri(string uri, GLib.AppLaunchContext launch_context) {
IntPtr native_uri = GLib.Marshaller.StringToPtrGStrdup (uri);
IntPtr error = IntPtr.Zero;
bool raw_ret = g_app_info_launch_default_for_uri(native_uri, launch_context == null ? IntPtr.Zero : launch_context.Handle, out error);
bool ret = raw_ret;
GLib.Marshaller.Free (native_uri);
if (error != IntPtr.Zero) throw new GLib.GException (error);
return ret;
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate void d_g_app_info_launch_default_for_uri_async(IntPtr uri, IntPtr launch_context, IntPtr cancellable, GLibSharp.AsyncReadyCallbackNative cb, IntPtr user_data);
static d_g_app_info_launch_default_for_uri_async g_app_info_launch_default_for_uri_async = FuncLoader.LoadFunction<d_g_app_info_launch_default_for_uri_async>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_app_info_launch_default_for_uri_async"));
public static void LaunchDefaultForUriAsync(string uri, GLib.AppLaunchContext launch_context, GLib.Cancellable cancellable, GLib.AsyncReadyCallback cb) {
IntPtr native_uri = GLib.Marshaller.StringToPtrGStrdup (uri);
GLibSharp.AsyncReadyCallbackWrapper cb_wrapper = new GLibSharp.AsyncReadyCallbackWrapper (cb);
cb_wrapper.PersistUntilCalled ();
g_app_info_launch_default_for_uri_async(native_uri, launch_context == null ? IntPtr.Zero : launch_context.Handle, cancellable == null ? IntPtr.Zero : cancellable.Handle, cb_wrapper.NativeDelegate, IntPtr.Zero);
GLib.Marshaller.Free (native_uri);
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate bool d_g_app_info_launch_default_for_uri_finish(IntPtr result, out IntPtr error);
static d_g_app_info_launch_default_for_uri_finish g_app_info_launch_default_for_uri_finish = FuncLoader.LoadFunction<d_g_app_info_launch_default_for_uri_finish>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_app_info_launch_default_for_uri_finish"));
public static bool LaunchDefaultForUriFinish(GLib.IAsyncResult result) {
IntPtr error = IntPtr.Zero;
bool raw_ret = g_app_info_launch_default_for_uri_finish(result == null ? IntPtr.Zero : ((result is GLib.Object) ? (result as GLib.Object).Handle : (result as GLib.AsyncResultAdapter).Handle), out error);
bool ret = raw_ret;
if (error != IntPtr.Zero) throw new GLib.GException (error);
return ret;
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate bool d_g_app_info_launch_uris(IntPtr raw, IntPtr uris, IntPtr launch_context, out IntPtr error);
static d_g_app_info_launch_uris g_app_info_launch_uris = FuncLoader.LoadFunction<d_g_app_info_launch_uris>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_app_info_launch_uris"));
public bool LaunchUris(GLib.List uris, GLib.AppLaunchContext launch_context) {
IntPtr error = IntPtr.Zero;
bool raw_ret = g_app_info_launch_uris(Handle, uris == null ? IntPtr.Zero : uris.Handle, launch_context == null ? IntPtr.Zero : launch_context.Handle, out error);
bool ret = raw_ret;
if (error != IntPtr.Zero) throw new GLib.GException (error);
return ret;
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate bool d_g_app_info_remove_supports_type(IntPtr raw, IntPtr content_type, out IntPtr error);
static d_g_app_info_remove_supports_type g_app_info_remove_supports_type = FuncLoader.LoadFunction<d_g_app_info_remove_supports_type>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_app_info_remove_supports_type"));
public bool RemoveSupportsType(string content_type) {
IntPtr native_content_type = GLib.Marshaller.StringToPtrGStrdup (content_type);
IntPtr error = IntPtr.Zero;
bool raw_ret = g_app_info_remove_supports_type(Handle, native_content_type, out error);
bool ret = raw_ret;
GLib.Marshaller.Free (native_content_type);
if (error != IntPtr.Zero) throw new GLib.GException (error);
return ret;
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate void d_g_app_info_reset_type_associations(IntPtr content_type);
static d_g_app_info_reset_type_associations g_app_info_reset_type_associations = FuncLoader.LoadFunction<d_g_app_info_reset_type_associations>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_app_info_reset_type_associations"));
public static void ResetTypeAssociations(string content_type) {
IntPtr native_content_type = GLib.Marshaller.StringToPtrGStrdup (content_type);
g_app_info_reset_type_associations(native_content_type);
GLib.Marshaller.Free (native_content_type);
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate bool d_g_app_info_set_as_default_for_extension(IntPtr raw, IntPtr extension, out IntPtr error);
static d_g_app_info_set_as_default_for_extension g_app_info_set_as_default_for_extension = FuncLoader.LoadFunction<d_g_app_info_set_as_default_for_extension>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_app_info_set_as_default_for_extension"));
public bool SetAsDefaultForExtension(string extension) {
IntPtr native_extension = GLib.Marshaller.StringToPtrGStrdup (extension);
IntPtr error = IntPtr.Zero;
bool raw_ret = g_app_info_set_as_default_for_extension(Handle, native_extension, out error);
bool ret = raw_ret;
GLib.Marshaller.Free (native_extension);
if (error != IntPtr.Zero) throw new GLib.GException (error);
return ret;
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate bool d_g_app_info_set_as_default_for_type(IntPtr raw, IntPtr content_type, out IntPtr error);
static d_g_app_info_set_as_default_for_type g_app_info_set_as_default_for_type = FuncLoader.LoadFunction<d_g_app_info_set_as_default_for_type>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_app_info_set_as_default_for_type"));
public bool SetAsDefaultForType(string content_type) {
IntPtr native_content_type = GLib.Marshaller.StringToPtrGStrdup (content_type);
IntPtr error = IntPtr.Zero;
bool raw_ret = g_app_info_set_as_default_for_type(Handle, native_content_type, out error);
bool ret = raw_ret;
GLib.Marshaller.Free (native_content_type);
if (error != IntPtr.Zero) throw new GLib.GException (error);
return ret;
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate bool d_g_app_info_set_as_last_used_for_type(IntPtr raw, IntPtr content_type, out IntPtr error);
static d_g_app_info_set_as_last_used_for_type g_app_info_set_as_last_used_for_type = FuncLoader.LoadFunction<d_g_app_info_set_as_last_used_for_type>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_app_info_set_as_last_used_for_type"));
public bool SetAsLastUsedForType(string content_type) {
IntPtr native_content_type = GLib.Marshaller.StringToPtrGStrdup (content_type);
IntPtr error = IntPtr.Zero;
bool raw_ret = g_app_info_set_as_last_used_for_type(Handle, native_content_type, out error);
bool ret = raw_ret;
GLib.Marshaller.Free (native_content_type);
if (error != IntPtr.Zero) throw new GLib.GException (error);
return ret;
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate bool d_g_app_info_should_show(IntPtr raw);
static d_g_app_info_should_show g_app_info_should_show = FuncLoader.LoadFunction<d_g_app_info_should_show>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_app_info_should_show"));
public bool ShouldShow {
get {
bool raw_ret = g_app_info_should_show(Handle);
bool ret = raw_ret;
return ret;
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate bool d_g_app_info_supports_files(IntPtr raw);
static d_g_app_info_supports_files g_app_info_supports_files = FuncLoader.LoadFunction<d_g_app_info_supports_files>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_app_info_supports_files"));
public bool SupportsFiles {
get {
bool raw_ret = g_app_info_supports_files(Handle);
bool ret = raw_ret;
return ret;
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate bool d_g_app_info_supports_uris(IntPtr raw);
static d_g_app_info_supports_uris g_app_info_supports_uris = FuncLoader.LoadFunction<d_g_app_info_supports_uris>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_app_info_supports_uris"));
public bool SupportsUris {
get {
bool raw_ret = g_app_info_supports_uris(Handle);
bool ret = raw_ret;
return ret;
}
}
#endregion
}
}

View File

@@ -0,0 +1,32 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace GLib {
using System;
using System.Runtime.InteropServices;
#region Autogenerated code
[Flags]
[GLib.GType (typeof (GLib.AppInfoCreateFlagsGType))]
public enum AppInfoCreateFlags {
None,
NeedsTerminal = 1 << 0,
SupportsUris = 1 << 1,
SupportsStartupNotification = 1 << 2,
}
internal class AppInfoCreateFlagsGType {
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate IntPtr d_g_app_info_create_flags_get_type();
static d_g_app_info_create_flags_get_type g_app_info_create_flags_get_type = FuncLoader.LoadFunction<d_g_app_info_create_flags_get_type>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_app_info_create_flags_get_type"));
public static GLib.GType GType {
get {
return new GLib.GType (g_app_info_create_flags_get_type ());
}
}
}
#endregion
}

View File

@@ -0,0 +1,135 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace GLib {
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.InteropServices;
using static GLib.AbiStructExtension;
#region Autogenerated code
public partial class AppInfoMonitor : GLib.Object {
public AppInfoMonitor (IntPtr raw) : base(raw) {}
protected AppInfoMonitor() : base(IntPtr.Zero)
{
CreateNativeObject (Array.Empty<string> (), Array.Empty<GLib.Value> ());
}
[GLib.Signal("changed")]
public event System.EventHandler Changed {
add {
this.AddSignalHandler ("changed", value);
}
remove {
this.RemoveSignalHandler ("changed", value);
}
}
static ChangedNativeDelegate Changed_cb_delegate;
static ChangedNativeDelegate ChangedVMCallback {
get {
if (Changed_cb_delegate == null)
Changed_cb_delegate = new ChangedNativeDelegate (Changed_cb);
return Changed_cb_delegate;
}
}
static void OverrideChanged (GLib.GType gtype)
{
OverrideChanged (gtype, ChangedVMCallback);
}
static void OverrideChanged (GLib.GType gtype, ChangedNativeDelegate callback)
{
OverrideVirtualMethod (gtype, "changed", callback);
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate void ChangedNativeDelegate (IntPtr inst);
static void Changed_cb (IntPtr inst)
{
try {
AppInfoMonitor __obj = GLib.Object.GetObject (inst, false) as AppInfoMonitor;
__obj.OnChanged ();
} catch (Exception e) {
GLib.ExceptionManager.RaiseUnhandledException (e, false);
}
}
[GLib.DefaultSignalHandler(Type=typeof(GLib.AppInfoMonitor), ConnectionMethod="OverrideChanged")]
protected virtual void OnChanged ()
{
InternalChanged ();
}
private void InternalChanged ()
{
GLib.Value ret = GLib.Value.Empty;
GLib.ValueArray inst_and_params = new GLib.ValueArray (1);
GLib.Value[] vals = new GLib.Value [1];
vals [0] = new GLib.Value (this);
inst_and_params.Append (vals [0]);
g_signal_chain_from_overridden (inst_and_params.ArrayPtr, ref ret);
foreach (GLib.Value v in vals)
v.Dispose ();
}
// Internal representation of the wrapped structure ABI.
static GLib.AbiStruct _class_abi = null;
static public unsafe new GLib.AbiStruct class_abi {
get {
if (_class_abi == null)
_class_abi = new GLib.AbiStruct (GLib.Object.class_abi.Fields);
return _class_abi;
}
}
// End of the ABI representation.
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate IntPtr d_g_app_info_monitor_get();
static d_g_app_info_monitor_get g_app_info_monitor_get = FuncLoader.LoadFunction<d_g_app_info_monitor_get>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_app_info_monitor_get"));
public static GLib.AppInfoMonitor Get() {
IntPtr raw_ret = g_app_info_monitor_get();
GLib.AppInfoMonitor ret = GLib.Object.GetObject(raw_ret) as GLib.AppInfoMonitor;
return ret;
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate IntPtr d_g_app_info_monitor_get_type();
static d_g_app_info_monitor_get_type g_app_info_monitor_get_type = FuncLoader.LoadFunction<d_g_app_info_monitor_get_type>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_app_info_monitor_get_type"));
public static new GLib.GType GType {
get {
IntPtr raw_ret = g_app_info_monitor_get_type();
GLib.GType ret = new GLib.GType(raw_ret);
return ret;
}
}
// Internal representation of the wrapped structure ABI.
static GLib.AbiStruct _abi_info = null;
static public unsafe new GLib.AbiStruct abi_info {
get {
if (_abi_info == null)
_abi_info = new GLib.AbiStruct (GLib.Object.abi_info.Fields);
return _abi_info;
}
}
// End of the ABI representation.
#endregion
}
}

View File

@@ -0,0 +1,440 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace GLib {
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.InteropServices;
using static GLib.AbiStructExtension;
#region Autogenerated code
public partial class AppLaunchContext : GLib.Object {
public AppLaunchContext (IntPtr raw) : base(raw) {}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate IntPtr d_g_app_launch_context_new();
static d_g_app_launch_context_new g_app_launch_context_new = FuncLoader.LoadFunction<d_g_app_launch_context_new>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_app_launch_context_new"));
public AppLaunchContext () : base (IntPtr.Zero)
{
if (GetType () != typeof (AppLaunchContext)) {
CreateNativeObject (Array.Empty<string> (), Array.Empty<GLib.Value> ());
return;
}
Raw = g_app_launch_context_new();
}
[GLib.Signal("launched")]
public event GLib.LaunchedHandler Launched {
add {
this.AddSignalHandler ("launched", value, typeof (GLib.LaunchedArgs));
}
remove {
this.RemoveSignalHandler ("launched", value);
}
}
[GLib.Signal("launch-failed")]
public event GLib.LaunchedFailedHandler LaunchedFailed {
add {
this.AddSignalHandler ("launch-failed", value, typeof (GLib.LaunchedFailedArgs));
}
remove {
this.RemoveSignalHandler ("launch-failed", value);
}
}
static GetDisplayNativeDelegate GetDisplay_cb_delegate;
static GetDisplayNativeDelegate GetDisplayVMCallback {
get {
if (GetDisplay_cb_delegate == null)
GetDisplay_cb_delegate = new GetDisplayNativeDelegate (GetDisplay_cb);
return GetDisplay_cb_delegate;
}
}
static void OverrideGetDisplay (GLib.GType gtype)
{
OverrideGetDisplay (gtype, GetDisplayVMCallback);
}
static void OverrideGetDisplay (GLib.GType gtype, GetDisplayNativeDelegate callback)
{
unsafe {
IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("get_display"));
*raw_ptr = Marshal.GetFunctionPointerForDelegate(callback);
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate IntPtr GetDisplayNativeDelegate (IntPtr inst, IntPtr info, IntPtr files);
static IntPtr GetDisplay_cb (IntPtr inst, IntPtr info, IntPtr files)
{
try {
AppLaunchContext __obj = GLib.Object.GetObject (inst, false) as AppLaunchContext;
string __result;
__result = __obj.OnGetDisplay (GLib.AppInfoAdapter.GetObject (info, false), new GLib.List(files));
return GLib.Marshaller.StringToPtrGStrdup(__result);
} catch (Exception e) {
GLib.ExceptionManager.RaiseUnhandledException (e, true);
// NOTREACHED: above call does not return.
throw;
}
}
[GLib.DefaultSignalHandler(Type=typeof(GLib.AppLaunchContext), ConnectionMethod="OverrideGetDisplay")]
protected virtual string OnGetDisplay (GLib.IAppInfo info, GLib.List files)
{
return InternalGetDisplay (info, files);
}
private string InternalGetDisplay (GLib.IAppInfo info, GLib.List files)
{
GetDisplayNativeDelegate unmanaged = class_abi.BaseOverride<GetDisplayNativeDelegate>(this.LookupGType(), "get_display");
if (unmanaged == null) return null;
IntPtr __result = unmanaged (this.Handle, info == null ? IntPtr.Zero : ((info is GLib.Object) ? (info as GLib.Object).Handle : (info as GLib.AppInfoAdapter).Handle), files == null ? IntPtr.Zero : files.Handle);
return GLib.Marshaller.PtrToStringGFree(__result);
}
static GetStartupNotifyIdNativeDelegate GetStartupNotifyId_cb_delegate;
static GetStartupNotifyIdNativeDelegate GetStartupNotifyIdVMCallback {
get {
if (GetStartupNotifyId_cb_delegate == null)
GetStartupNotifyId_cb_delegate = new GetStartupNotifyIdNativeDelegate (GetStartupNotifyId_cb);
return GetStartupNotifyId_cb_delegate;
}
}
static void OverrideGetStartupNotifyId (GLib.GType gtype)
{
OverrideGetStartupNotifyId (gtype, GetStartupNotifyIdVMCallback);
}
static void OverrideGetStartupNotifyId (GLib.GType gtype, GetStartupNotifyIdNativeDelegate callback)
{
unsafe {
IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("get_startup_notify_id"));
*raw_ptr = Marshal.GetFunctionPointerForDelegate(callback);
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate IntPtr GetStartupNotifyIdNativeDelegate (IntPtr inst, IntPtr info, IntPtr files);
static IntPtr GetStartupNotifyId_cb (IntPtr inst, IntPtr info, IntPtr files)
{
try {
AppLaunchContext __obj = GLib.Object.GetObject (inst, false) as AppLaunchContext;
string __result;
__result = __obj.OnGetStartupNotifyId (GLib.AppInfoAdapter.GetObject (info, false), new GLib.List(files));
return GLib.Marshaller.StringToPtrGStrdup(__result);
} catch (Exception e) {
GLib.ExceptionManager.RaiseUnhandledException (e, true);
// NOTREACHED: above call does not return.
throw;
}
}
[GLib.DefaultSignalHandler(Type=typeof(GLib.AppLaunchContext), ConnectionMethod="OverrideGetStartupNotifyId")]
protected virtual string OnGetStartupNotifyId (GLib.IAppInfo info, GLib.List files)
{
return InternalGetStartupNotifyId (info, files);
}
private string InternalGetStartupNotifyId (GLib.IAppInfo info, GLib.List files)
{
GetStartupNotifyIdNativeDelegate unmanaged = class_abi.BaseOverride<GetStartupNotifyIdNativeDelegate>(this.LookupGType(), "get_startup_notify_id");
if (unmanaged == null) return null;
IntPtr __result = unmanaged (this.Handle, info == null ? IntPtr.Zero : ((info is GLib.Object) ? (info as GLib.Object).Handle : (info as GLib.AppInfoAdapter).Handle), files == null ? IntPtr.Zero : files.Handle);
return GLib.Marshaller.PtrToStringGFree(__result);
}
static LaunchedFailedNativeDelegate LaunchedFailed_cb_delegate;
static LaunchedFailedNativeDelegate LaunchedFailedVMCallback {
get {
if (LaunchedFailed_cb_delegate == null)
LaunchedFailed_cb_delegate = new LaunchedFailedNativeDelegate (LaunchedFailed_cb);
return LaunchedFailed_cb_delegate;
}
}
static void OverrideLaunchedFailed (GLib.GType gtype)
{
OverrideLaunchedFailed (gtype, LaunchedFailedVMCallback);
}
static void OverrideLaunchedFailed (GLib.GType gtype, LaunchedFailedNativeDelegate callback)
{
unsafe {
IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("launch_failed"));
*raw_ptr = Marshal.GetFunctionPointerForDelegate(callback);
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate void LaunchedFailedNativeDelegate (IntPtr inst, IntPtr startup_notify_id);
static void LaunchedFailed_cb (IntPtr inst, IntPtr startup_notify_id)
{
try {
AppLaunchContext __obj = GLib.Object.GetObject (inst, false) as AppLaunchContext;
__obj.OnLaunchedFailed (GLib.Marshaller.Utf8PtrToString (startup_notify_id));
} catch (Exception e) {
GLib.ExceptionManager.RaiseUnhandledException (e, false);
}
}
[GLib.DefaultSignalHandler(Type=typeof(GLib.AppLaunchContext), ConnectionMethod="OverrideLaunchedFailed")]
protected virtual void OnLaunchedFailed (string startup_notify_id)
{
InternalLaunchedFailed (startup_notify_id);
}
private void InternalLaunchedFailed (string startup_notify_id)
{
LaunchedFailedNativeDelegate unmanaged = class_abi.BaseOverride<LaunchedFailedNativeDelegate>(this.LookupGType(), "launch_failed");
if (unmanaged == null) return;
IntPtr native_startup_notify_id = GLib.Marshaller.StringToPtrGStrdup (startup_notify_id);
unmanaged (this.Handle, native_startup_notify_id);
GLib.Marshaller.Free (native_startup_notify_id);
}
static LaunchedNativeDelegate Launched_cb_delegate;
static LaunchedNativeDelegate LaunchedVMCallback {
get {
if (Launched_cb_delegate == null)
Launched_cb_delegate = new LaunchedNativeDelegate (Launched_cb);
return Launched_cb_delegate;
}
}
static void OverrideLaunched (GLib.GType gtype)
{
OverrideLaunched (gtype, LaunchedVMCallback);
}
static void OverrideLaunched (GLib.GType gtype, LaunchedNativeDelegate callback)
{
unsafe {
IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("launched"));
*raw_ptr = Marshal.GetFunctionPointerForDelegate(callback);
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate void LaunchedNativeDelegate (IntPtr inst, IntPtr info, IntPtr platform_data);
static void Launched_cb (IntPtr inst, IntPtr info, IntPtr platform_data)
{
try {
AppLaunchContext __obj = GLib.Object.GetObject (inst, false) as AppLaunchContext;
__obj.OnLaunched (GLib.AppInfoAdapter.GetObject (info, false), new GLib.Variant(platform_data));
} catch (Exception e) {
GLib.ExceptionManager.RaiseUnhandledException (e, false);
}
}
[GLib.DefaultSignalHandler(Type=typeof(GLib.AppLaunchContext), ConnectionMethod="OverrideLaunched")]
protected virtual void OnLaunched (GLib.IAppInfo info, GLib.Variant platform_data)
{
InternalLaunched (info, platform_data);
}
private void InternalLaunched (GLib.IAppInfo info, GLib.Variant platform_data)
{
LaunchedNativeDelegate unmanaged = class_abi.BaseOverride<LaunchedNativeDelegate>(this.LookupGType(), "launched");
if (unmanaged == null) return;
unmanaged (this.Handle, info == null ? IntPtr.Zero : ((info is GLib.Object) ? (info as GLib.Object).Handle : (info as GLib.AppInfoAdapter).Handle), platform_data == null ? IntPtr.Zero : platform_data.Handle);
}
// Internal representation of the wrapped structure ABI.
static GLib.AbiStruct _class_abi = null;
static public unsafe new GLib.AbiStruct class_abi {
get {
if (_class_abi == null)
_class_abi = new GLib.AbiStruct (new List<GLib.AbiField>{
new GLib.AbiField("get_display"
, GLib.Object.class_abi.Fields
, (uint) sizeof( IntPtr ) // get_display
, null
, "get_startup_notify_id"
, (uint) sizeof(IntPtr)
, 0
),
new GLib.AbiField("get_startup_notify_id"
, -1
, (uint) sizeof( IntPtr ) // get_startup_notify_id
, "get_display"
, "launch_failed"
, (uint) sizeof(IntPtr)
, 0
),
new GLib.AbiField("launch_failed"
, -1
, (uint) sizeof( IntPtr ) // launch_failed
, "get_startup_notify_id"
, "launched"
, (uint) sizeof(IntPtr)
, 0
),
new GLib.AbiField("launched"
, -1
, (uint) sizeof( IntPtr ) // launched
, "launch_failed"
, "_g_reserved1"
, (uint) sizeof(IntPtr)
, 0
),
new GLib.AbiField("_g_reserved1"
, -1
, (uint) sizeof( IntPtr ) // _g_reserved1
, "launched"
, "_g_reserved2"
, (uint) sizeof(IntPtr)
, 0
),
new GLib.AbiField("_g_reserved2"
, -1
, (uint) sizeof( IntPtr ) // _g_reserved2
, "_g_reserved1"
, "_g_reserved3"
, (uint) sizeof(IntPtr)
, 0
),
new GLib.AbiField("_g_reserved3"
, -1
, (uint) sizeof( IntPtr ) // _g_reserved3
, "_g_reserved2"
, "_g_reserved4"
, (uint) sizeof(IntPtr)
, 0
),
new GLib.AbiField("_g_reserved4"
, -1
, (uint) sizeof( IntPtr ) // _g_reserved4
, "_g_reserved3"
, null
, (uint) sizeof(IntPtr)
, 0
),
});
return _class_abi;
}
}
// End of the ABI representation.
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate IntPtr d_g_app_launch_context_get_display(IntPtr raw, IntPtr info, IntPtr files);
static d_g_app_launch_context_get_display g_app_launch_context_get_display = FuncLoader.LoadFunction<d_g_app_launch_context_get_display>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_app_launch_context_get_display"));
public string GetDisplay(GLib.IAppInfo info, GLib.List files) {
IntPtr raw_ret = g_app_launch_context_get_display(Handle, info == null ? IntPtr.Zero : ((info is GLib.Object) ? (info as GLib.Object).Handle : (info as GLib.AppInfoAdapter).Handle), files == null ? IntPtr.Zero : files.Handle);
string ret = GLib.Marshaller.PtrToStringGFree(raw_ret);
return ret;
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate IntPtr d_g_app_launch_context_get_environment(IntPtr raw);
static d_g_app_launch_context_get_environment g_app_launch_context_get_environment = FuncLoader.LoadFunction<d_g_app_launch_context_get_environment>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_app_launch_context_get_environment"));
public string Environment {
get {
IntPtr raw_ret = g_app_launch_context_get_environment(Handle);
string ret = GLib.Marshaller.PtrToStringGFree(raw_ret);
return ret;
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate IntPtr d_g_app_launch_context_get_startup_notify_id(IntPtr raw, IntPtr info, IntPtr files);
static d_g_app_launch_context_get_startup_notify_id g_app_launch_context_get_startup_notify_id = FuncLoader.LoadFunction<d_g_app_launch_context_get_startup_notify_id>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_app_launch_context_get_startup_notify_id"));
public string GetStartupNotifyId(GLib.IAppInfo info, GLib.List files) {
IntPtr raw_ret = g_app_launch_context_get_startup_notify_id(Handle, info == null ? IntPtr.Zero : ((info is GLib.Object) ? (info as GLib.Object).Handle : (info as GLib.AppInfoAdapter).Handle), files == null ? IntPtr.Zero : files.Handle);
string ret = GLib.Marshaller.PtrToStringGFree(raw_ret);
return ret;
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate IntPtr d_g_app_launch_context_get_type();
static d_g_app_launch_context_get_type g_app_launch_context_get_type = FuncLoader.LoadFunction<d_g_app_launch_context_get_type>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_app_launch_context_get_type"));
public static new GLib.GType GType {
get {
IntPtr raw_ret = g_app_launch_context_get_type();
GLib.GType ret = new GLib.GType(raw_ret);
return ret;
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate void d_g_app_launch_context_launch_failed(IntPtr raw, IntPtr startup_notify_id);
static d_g_app_launch_context_launch_failed g_app_launch_context_launch_failed = FuncLoader.LoadFunction<d_g_app_launch_context_launch_failed>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_app_launch_context_launch_failed"));
public void LaunchFailed(string startup_notify_id) {
IntPtr native_startup_notify_id = GLib.Marshaller.StringToPtrGStrdup (startup_notify_id);
g_app_launch_context_launch_failed(Handle, native_startup_notify_id);
GLib.Marshaller.Free (native_startup_notify_id);
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate void d_g_app_launch_context_setenv(IntPtr raw, IntPtr variable, IntPtr value);
static d_g_app_launch_context_setenv g_app_launch_context_setenv = FuncLoader.LoadFunction<d_g_app_launch_context_setenv>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_app_launch_context_setenv"));
public void Setenv(string variable, string value) {
IntPtr native_variable = GLib.Marshaller.StringToPtrGStrdup (variable);
IntPtr native_value = GLib.Marshaller.StringToPtrGStrdup (value);
g_app_launch_context_setenv(Handle, native_variable, native_value);
GLib.Marshaller.Free (native_variable);
GLib.Marshaller.Free (native_value);
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate void d_g_app_launch_context_unsetenv(IntPtr raw, IntPtr variable);
static d_g_app_launch_context_unsetenv g_app_launch_context_unsetenv = FuncLoader.LoadFunction<d_g_app_launch_context_unsetenv>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_app_launch_context_unsetenv"));
public void Unsetenv(string variable) {
IntPtr native_variable = GLib.Marshaller.StringToPtrGStrdup (variable);
g_app_launch_context_unsetenv(Handle, native_variable);
GLib.Marshaller.Free (native_variable);
}
// Internal representation of the wrapped structure ABI.
static GLib.AbiStruct _abi_info = null;
static public unsafe new GLib.AbiStruct abi_info {
get {
if (_abi_info == null)
_abi_info = new GLib.AbiStruct (new List<GLib.AbiField>{
new GLib.AbiField("priv"
, GLib.Object.abi_info.Fields
, (uint) sizeof( IntPtr ) // priv
, null
, null
, (uint) sizeof(IntPtr)
, 0
),
});
return _abi_info;
}
}
// End of the ABI representation.
#endregion
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,378 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace GLib {
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.InteropServices;
using static GLib.AbiStructExtension;
#region Autogenerated code
public partial class ApplicationCommandLine : GLib.Object {
public ApplicationCommandLine (IntPtr raw) : base(raw) {}
protected ApplicationCommandLine() : base(IntPtr.Zero)
{
CreateNativeObject (Array.Empty<string> (), Array.Empty<GLib.Value> ());
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate bool d_g_application_command_line_get_is_remote(IntPtr raw);
static d_g_application_command_line_get_is_remote g_application_command_line_get_is_remote = FuncLoader.LoadFunction<d_g_application_command_line_get_is_remote>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_application_command_line_get_is_remote"));
[GLib.Property ("is-remote")]
public bool IsRemote {
get {
bool raw_ret = g_application_command_line_get_is_remote(Handle);
bool ret = raw_ret;
return ret;
}
}
static PrintLiteralNativeDelegate PrintLiteral_cb_delegate;
static PrintLiteralNativeDelegate PrintLiteralVMCallback {
get {
if (PrintLiteral_cb_delegate == null)
PrintLiteral_cb_delegate = new PrintLiteralNativeDelegate (PrintLiteral_cb);
return PrintLiteral_cb_delegate;
}
}
static void OverridePrintLiteral (GLib.GType gtype)
{
OverridePrintLiteral (gtype, PrintLiteralVMCallback);
}
static void OverridePrintLiteral (GLib.GType gtype, PrintLiteralNativeDelegate callback)
{
unsafe {
IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("print_literal"));
*raw_ptr = Marshal.GetFunctionPointerForDelegate(callback);
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate void PrintLiteralNativeDelegate (IntPtr inst, IntPtr message);
static void PrintLiteral_cb (IntPtr inst, IntPtr message)
{
try {
ApplicationCommandLine __obj = GLib.Object.GetObject (inst, false) as ApplicationCommandLine;
__obj.OnPrintLiteral (GLib.Marshaller.Utf8PtrToString (message));
} catch (Exception e) {
GLib.ExceptionManager.RaiseUnhandledException (e, false);
}
}
[GLib.DefaultSignalHandler(Type=typeof(GLib.ApplicationCommandLine), ConnectionMethod="OverridePrintLiteral")]
protected virtual void OnPrintLiteral (string message)
{
InternalPrintLiteral (message);
}
private void InternalPrintLiteral (string message)
{
PrintLiteralNativeDelegate unmanaged = class_abi.BaseOverride<PrintLiteralNativeDelegate>(this.LookupGType(), "print_literal");
if (unmanaged == null) return;
IntPtr native_message = GLib.Marshaller.StringToPtrGStrdup (message);
unmanaged (this.Handle, native_message);
GLib.Marshaller.Free (native_message);
}
static PrinterrLiteralNativeDelegate PrinterrLiteral_cb_delegate;
static PrinterrLiteralNativeDelegate PrinterrLiteralVMCallback {
get {
if (PrinterrLiteral_cb_delegate == null)
PrinterrLiteral_cb_delegate = new PrinterrLiteralNativeDelegate (PrinterrLiteral_cb);
return PrinterrLiteral_cb_delegate;
}
}
static void OverridePrinterrLiteral (GLib.GType gtype)
{
OverridePrinterrLiteral (gtype, PrinterrLiteralVMCallback);
}
static void OverridePrinterrLiteral (GLib.GType gtype, PrinterrLiteralNativeDelegate callback)
{
unsafe {
IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("printerr_literal"));
*raw_ptr = Marshal.GetFunctionPointerForDelegate(callback);
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate void PrinterrLiteralNativeDelegate (IntPtr inst, IntPtr message);
static void PrinterrLiteral_cb (IntPtr inst, IntPtr message)
{
try {
ApplicationCommandLine __obj = GLib.Object.GetObject (inst, false) as ApplicationCommandLine;
__obj.OnPrinterrLiteral (GLib.Marshaller.Utf8PtrToString (message));
} catch (Exception e) {
GLib.ExceptionManager.RaiseUnhandledException (e, false);
}
}
[GLib.DefaultSignalHandler(Type=typeof(GLib.ApplicationCommandLine), ConnectionMethod="OverridePrinterrLiteral")]
protected virtual void OnPrinterrLiteral (string message)
{
InternalPrinterrLiteral (message);
}
private void InternalPrinterrLiteral (string message)
{
PrinterrLiteralNativeDelegate unmanaged = class_abi.BaseOverride<PrinterrLiteralNativeDelegate>(this.LookupGType(), "printerr_literal");
if (unmanaged == null) return;
IntPtr native_message = GLib.Marshaller.StringToPtrGStrdup (message);
unmanaged (this.Handle, native_message);
GLib.Marshaller.Free (native_message);
}
static GetStdinNativeDelegate GetStdin_cb_delegate;
static GetStdinNativeDelegate GetStdinVMCallback {
get {
if (GetStdin_cb_delegate == null)
GetStdin_cb_delegate = new GetStdinNativeDelegate (GetStdin_cb);
return GetStdin_cb_delegate;
}
}
static void OverrideGetStdin (GLib.GType gtype)
{
OverrideGetStdin (gtype, GetStdinVMCallback);
}
static void OverrideGetStdin (GLib.GType gtype, GetStdinNativeDelegate callback)
{
unsafe {
IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("get_stdin"));
*raw_ptr = Marshal.GetFunctionPointerForDelegate(callback);
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate IntPtr GetStdinNativeDelegate (IntPtr inst);
static IntPtr GetStdin_cb (IntPtr inst)
{
try {
ApplicationCommandLine __obj = GLib.Object.GetObject (inst, false) as ApplicationCommandLine;
GLib.InputStream __result;
__result = __obj.OnGetStdin ();
return __result == null ? IntPtr.Zero : __result.Handle;
} catch (Exception e) {
GLib.ExceptionManager.RaiseUnhandledException (e, true);
// NOTREACHED: above call does not return.
throw;
}
}
[GLib.DefaultSignalHandler(Type=typeof(GLib.ApplicationCommandLine), ConnectionMethod="OverrideGetStdin")]
protected virtual GLib.InputStream OnGetStdin ()
{
return InternalGetStdin ();
}
private GLib.InputStream InternalGetStdin ()
{
GetStdinNativeDelegate unmanaged = class_abi.BaseOverride<GetStdinNativeDelegate>(this.LookupGType(), "get_stdin");
if (unmanaged == null) return null;
IntPtr __result = unmanaged (this.Handle);
return GLib.Object.GetObject(__result) as GLib.InputStream;
}
// Internal representation of the wrapped structure ABI.
static GLib.AbiStruct _class_abi = null;
static public unsafe new GLib.AbiStruct class_abi {
get {
if (_class_abi == null)
_class_abi = new GLib.AbiStruct (new List<GLib.AbiField>{
new GLib.AbiField("print_literal"
, GLib.Object.class_abi.Fields
, (uint) sizeof( IntPtr ) // print_literal
, null
, "printerr_literal"
, (uint) sizeof(IntPtr)
, 0
),
new GLib.AbiField("printerr_literal"
, -1
, (uint) sizeof( IntPtr ) // printerr_literal
, "print_literal"
, "get_stdin"
, (uint) sizeof(IntPtr)
, 0
),
new GLib.AbiField("get_stdin"
, -1
, (uint) sizeof( IntPtr ) // get_stdin
, "printerr_literal"
, "padding"
, (uint) sizeof(IntPtr)
, 0
),
new GLib.AbiField("padding"
, -1
, (uint) sizeof( IntPtr ) * 11 // padding
, "get_stdin"
, null
, (uint) sizeof(IntPtr)
, 0
),
});
return _class_abi;
}
}
// End of the ABI representation.
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate IntPtr d_g_application_command_line_create_file_for_arg(IntPtr raw, IntPtr arg);
static d_g_application_command_line_create_file_for_arg g_application_command_line_create_file_for_arg = FuncLoader.LoadFunction<d_g_application_command_line_create_file_for_arg>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_application_command_line_create_file_for_arg"));
public GLib.IFile CreateFileForArg(string arg) {
IntPtr native_arg = GLib.Marshaller.StringToPtrGStrdup (arg);
IntPtr raw_ret = g_application_command_line_create_file_for_arg(Handle, native_arg);
GLib.IFile ret = GLib.FileAdapter.GetObject (raw_ret, false);
GLib.Marshaller.Free (native_arg);
return ret;
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate IntPtr d_g_application_command_line_get_arguments(IntPtr raw, out int argc);
static d_g_application_command_line_get_arguments g_application_command_line_get_arguments = FuncLoader.LoadFunction<d_g_application_command_line_get_arguments>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_application_command_line_get_arguments"));
public string GetArguments(out int argc) {
IntPtr raw_ret = g_application_command_line_get_arguments(Handle, out argc);
string ret = GLib.Marshaller.PtrToStringGFree(raw_ret);
return ret;
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate IntPtr d_g_application_command_line_get_cwd(IntPtr raw);
static d_g_application_command_line_get_cwd g_application_command_line_get_cwd = FuncLoader.LoadFunction<d_g_application_command_line_get_cwd>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_application_command_line_get_cwd"));
public string Cwd {
get {
IntPtr raw_ret = g_application_command_line_get_cwd(Handle);
string ret = GLib.Marshaller.Utf8PtrToString (raw_ret);
return ret;
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate IntPtr d_g_application_command_line_get_environ(IntPtr raw);
static d_g_application_command_line_get_environ g_application_command_line_get_environ = FuncLoader.LoadFunction<d_g_application_command_line_get_environ>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_application_command_line_get_environ"));
public string Environ {
get {
IntPtr raw_ret = g_application_command_line_get_environ(Handle);
string ret = GLib.Marshaller.Utf8PtrToString (raw_ret);
return ret;
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate int d_g_application_command_line_get_exit_status(IntPtr raw);
static d_g_application_command_line_get_exit_status g_application_command_line_get_exit_status = FuncLoader.LoadFunction<d_g_application_command_line_get_exit_status>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_application_command_line_get_exit_status"));
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate void d_g_application_command_line_set_exit_status(IntPtr raw, int exit_status);
static d_g_application_command_line_set_exit_status g_application_command_line_set_exit_status = FuncLoader.LoadFunction<d_g_application_command_line_set_exit_status>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_application_command_line_set_exit_status"));
public int ExitStatus {
get {
int raw_ret = g_application_command_line_get_exit_status(Handle);
int ret = raw_ret;
return ret;
}
set {
g_application_command_line_set_exit_status(Handle, value);
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate IntPtr d_g_application_command_line_get_platform_data(IntPtr raw);
static d_g_application_command_line_get_platform_data g_application_command_line_get_platform_data = FuncLoader.LoadFunction<d_g_application_command_line_get_platform_data>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_application_command_line_get_platform_data"));
public GLib.Variant PlatformData {
get {
IntPtr raw_ret = g_application_command_line_get_platform_data(Handle);
GLib.Variant ret = new GLib.Variant(raw_ret);
return ret;
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate IntPtr d_g_application_command_line_get_stdin(IntPtr raw);
static d_g_application_command_line_get_stdin g_application_command_line_get_stdin = FuncLoader.LoadFunction<d_g_application_command_line_get_stdin>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_application_command_line_get_stdin"));
public GLib.InputStream Stdin {
get {
IntPtr raw_ret = g_application_command_line_get_stdin(Handle);
GLib.InputStream ret = GLib.Object.GetObject(raw_ret) as GLib.InputStream;
return ret;
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate IntPtr d_g_application_command_line_get_type();
static d_g_application_command_line_get_type g_application_command_line_get_type = FuncLoader.LoadFunction<d_g_application_command_line_get_type>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_application_command_line_get_type"));
public static new GLib.GType GType {
get {
IntPtr raw_ret = g_application_command_line_get_type();
GLib.GType ret = new GLib.GType(raw_ret);
return ret;
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate IntPtr d_g_application_command_line_getenv(IntPtr raw, IntPtr name);
static d_g_application_command_line_getenv g_application_command_line_getenv = FuncLoader.LoadFunction<d_g_application_command_line_getenv>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_application_command_line_getenv"));
public string Getenv(string name) {
IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name);
IntPtr raw_ret = g_application_command_line_getenv(Handle, native_name);
string ret = GLib.Marshaller.Utf8PtrToString (raw_ret);
GLib.Marshaller.Free (native_name);
return ret;
}
// Internal representation of the wrapped structure ABI.
static GLib.AbiStruct _abi_info = null;
static public unsafe new GLib.AbiStruct abi_info {
get {
if (_abi_info == null)
_abi_info = new GLib.AbiStruct (new List<GLib.AbiField>{
new GLib.AbiField("priv"
, GLib.Object.abi_info.Fields
, (uint) sizeof( IntPtr ) // priv
, null
, null
, (uint) sizeof(IntPtr)
, 0
),
});
return _abi_info;
}
}
// End of the ABI representation.
#endregion
}
}

View File

@@ -0,0 +1,36 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace GLib {
using System;
using System.Runtime.InteropServices;
#region Autogenerated code
[Flags]
[GLib.GType (typeof (GLib.ApplicationFlagsGType))]
public enum ApplicationFlags {
None,
IsService = 1 << 0,
IsLauncher = 1 << 1,
HandlesOpen = 1 << 2,
HandlesCommandLine = 1 << 3,
SendEnvironment = 1 << 4,
NonUnique = 1 << 5,
CanOverrideAppId = 1 << 6,
}
internal class ApplicationFlagsGType {
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate IntPtr d_g_application_flags_get_type();
static d_g_application_flags_get_type g_application_flags_get_type = FuncLoader.LoadFunction<d_g_application_flags_get_type>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_application_flags_get_type"));
public static GLib.GType GType {
get {
return new GLib.GType (g_application_flags_get_type ());
}
}
}
#endregion
}

View File

@@ -0,0 +1,33 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace GLib {
using System;
using System.Runtime.InteropServices;
#region Autogenerated code
[Flags]
[GLib.GType (typeof (GLib.AskPasswordFlagsGType))]
public enum AskPasswordFlags {
NeedPassword = 1 << 0,
NeedUsername = 1 << 1,
NeedDomain = 1 << 2,
SavingSupported = 1 << 3,
AnonymousSupported = 1 << 4,
}
internal class AskPasswordFlagsGType {
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate IntPtr d_g_ask_password_flags_get_type();
static d_g_ask_password_flags_get_type g_ask_password_flags_get_type = FuncLoader.LoadFunction<d_g_ask_password_flags_get_type>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_ask_password_flags_get_type"));
public static GLib.GType GType {
get {
return new GLib.GType (g_ask_password_flags_get_type ());
}
}
}
#endregion
}

View File

@@ -0,0 +1,36 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace GLib {
using System;
public delegate void AskPasswordHandler(object o, AskPasswordArgs args);
public class AskPasswordArgs : GLib.SignalArgs {
public string Message{
get {
return (string) Args [0];
}
}
public string DefaultUser{
get {
return (string) Args [1];
}
}
public string DefaultDomain{
get {
return (string) Args [2];
}
}
public GLib.AskPasswordFlags Flags{
get {
return (GLib.AskPasswordFlags) Args [3];
}
}
}
}

View File

@@ -0,0 +1,24 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace GLib {
using System;
public delegate void AskQuestionHandler(object o, AskQuestionArgs args);
public class AskQuestionArgs : GLib.SignalArgs {
public string Message{
get {
return (string) Args [0];
}
}
public string[] Choices{
get {
return (string[]) Args [1];
}
}
}
}

View File

@@ -0,0 +1,172 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace GLib {
using System;
using System.Runtime.InteropServices;
#region Autogenerated code
public partial class AsyncInitableAdapter : GLib.GInterfaceAdapter, GLib.IAsyncInitable {
[StructLayout (LayoutKind.Sequential)]
struct GAsyncInitableIface {
public InitAsyncNativeDelegate InitAsync;
public InitFinishNativeDelegate InitFinish;
}
static GAsyncInitableIface iface;
static AsyncInitableAdapter ()
{
GLib.GType.Register (_gtype, typeof (AsyncInitableAdapter));
iface.InitAsync = new InitAsyncNativeDelegate (InitAsync_cb);
iface.InitFinish = new InitFinishNativeDelegate (InitFinish_cb);
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate void InitAsyncNativeDelegate (IntPtr inst, int io_priority, IntPtr cancellable, GLibSharp.AsyncReadyCallbackNative cb, IntPtr user_data);
static void InitAsync_cb (IntPtr inst, int io_priority, IntPtr cancellable, GLibSharp.AsyncReadyCallbackNative cb, IntPtr user_data)
{
try {
IAsyncInitableImplementor __obj = GLib.Object.GetObject (inst, false) as IAsyncInitableImplementor;
GLibSharp.AsyncReadyCallbackInvoker cb_invoker = new GLibSharp.AsyncReadyCallbackInvoker (cb, user_data);
__obj.InitAsync (io_priority, GLib.Object.GetObject(cancellable) as GLib.Cancellable, cb_invoker.Handler);
} catch (Exception e) {
GLib.ExceptionManager.RaiseUnhandledException (e, false);
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate bool InitFinishNativeDelegate (IntPtr inst, IntPtr res, out IntPtr error);
static bool InitFinish_cb (IntPtr inst, IntPtr res, out IntPtr error)
{
error = IntPtr.Zero;
try {
IAsyncInitableImplementor __obj = GLib.Object.GetObject (inst, false) as IAsyncInitableImplementor;
bool __result;
__result = __obj.InitFinish (GLib.AsyncResultAdapter.GetObject (res, false));
return __result;
} catch (Exception e) {
GLib.ExceptionManager.RaiseUnhandledException (e, true);
// NOTREACHED: above call does not return.
throw;
}
}
static int class_offset = 2 * IntPtr.Size;
static void Initialize (IntPtr ptr, IntPtr data)
{
IntPtr ifaceptr = new IntPtr (ptr.ToInt64 () + class_offset);
GAsyncInitableIface native_iface = (GAsyncInitableIface) Marshal.PtrToStructure (ifaceptr, typeof (GAsyncInitableIface));
native_iface.InitAsync = iface.InitAsync;
native_iface.InitFinish = iface.InitFinish;
Marshal.StructureToPtr (native_iface, ifaceptr, false);
}
GLib.Object implementor;
public AsyncInitableAdapter ()
{
InitHandler = new GLib.GInterfaceInitHandler (Initialize);
}
public AsyncInitableAdapter (IAsyncInitableImplementor implementor)
{
if (implementor == null)
throw new ArgumentNullException ("implementor");
else if (!(implementor is GLib.Object))
throw new ArgumentException ("implementor must be a subclass of GLib.Object");
this.implementor = implementor as GLib.Object;
}
public AsyncInitableAdapter (IntPtr handle)
{
if (!_gtype.IsInstance (handle))
throw new ArgumentException ("The gobject doesn't implement the GInterface of this adapter", "handle");
implementor = GLib.Object.GetObject (handle);
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate IntPtr d_g_async_initable_get_type();
static d_g_async_initable_get_type g_async_initable_get_type = FuncLoader.LoadFunction<d_g_async_initable_get_type>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_async_initable_get_type"));
private static GLib.GType _gtype = new GLib.GType (g_async_initable_get_type ());
public static GLib.GType GType {
get {
return _gtype;
}
}
public override GLib.GType GInterfaceGType {
get {
return _gtype;
}
}
public override IntPtr Handle {
get {
return implementor.Handle;
}
}
public IntPtr OwnedHandle {
get {
return implementor.OwnedHandle;
}
}
public static IAsyncInitable GetObject (IntPtr handle, bool owned)
{
GLib.Object obj = GLib.Object.GetObject (handle, owned);
return GetObject (obj);
}
public static IAsyncInitable GetObject (GLib.Object obj)
{
if (obj == null)
return null;
else if (obj is IAsyncInitableImplementor)
return new AsyncInitableAdapter (obj as IAsyncInitableImplementor);
else if (obj as IAsyncInitable == null)
return new AsyncInitableAdapter (obj.Handle);
else
return obj as IAsyncInitable;
}
public IAsyncInitableImplementor Implementor {
get {
return implementor as IAsyncInitableImplementor;
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate void d_g_async_initable_init_async(IntPtr raw, int io_priority, IntPtr cancellable, GLibSharp.AsyncReadyCallbackNative cb, IntPtr user_data);
static d_g_async_initable_init_async g_async_initable_init_async = FuncLoader.LoadFunction<d_g_async_initable_init_async>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_async_initable_init_async"));
public void InitAsync(int io_priority, GLib.Cancellable cancellable, GLib.AsyncReadyCallback cb) {
GLibSharp.AsyncReadyCallbackWrapper cb_wrapper = new GLibSharp.AsyncReadyCallbackWrapper (cb);
cb_wrapper.PersistUntilCalled ();
g_async_initable_init_async(Handle, io_priority, cancellable == null ? IntPtr.Zero : cancellable.Handle, cb_wrapper.NativeDelegate, IntPtr.Zero);
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate bool d_g_async_initable_init_finish(IntPtr raw, IntPtr res, out IntPtr error);
static d_g_async_initable_init_finish g_async_initable_init_finish = FuncLoader.LoadFunction<d_g_async_initable_init_finish>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_async_initable_init_finish"));
public bool InitFinish(GLib.IAsyncResult res) {
IntPtr error = IntPtr.Zero;
bool raw_ret = g_async_initable_init_finish(Handle, res == null ? IntPtr.Zero : ((res is GLib.Object) ? (res as GLib.Object).Handle : (res as GLib.AsyncResultAdapter).Handle), out error);
bool ret = raw_ret;
if (error != IntPtr.Zero) throw new GLib.GException (error);
return ret;
}
#endregion
}
}

View File

@@ -0,0 +1,10 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace GLib {
using System;
public delegate void AsyncReadyCallback(GLib.Object source_object, GLib.IAsyncResult res);
}

View File

@@ -0,0 +1,217 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace GLib {
using System;
using System.Runtime.InteropServices;
#region Autogenerated code
public partial class AsyncResultAdapter : GLib.GInterfaceAdapter, GLib.IAsyncResult {
[StructLayout (LayoutKind.Sequential)]
struct GAsyncResultIface {
public GetUserDataNativeDelegate GetUserData;
public GetSourceObjectNativeDelegate GetSourceObject;
public IsTaggedNativeDelegate IsTagged;
}
static GAsyncResultIface iface;
static AsyncResultAdapter ()
{
GLib.GType.Register (_gtype, typeof (AsyncResultAdapter));
iface.GetUserData = new GetUserDataNativeDelegate (GetUserData_cb);
iface.GetSourceObject = new GetSourceObjectNativeDelegate (GetSourceObject_cb);
iface.IsTagged = new IsTaggedNativeDelegate (IsTagged_cb);
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate IntPtr GetUserDataNativeDelegate (IntPtr inst);
static IntPtr GetUserData_cb (IntPtr inst)
{
try {
IAsyncResultImplementor __obj = GLib.Object.GetObject (inst, false) as IAsyncResultImplementor;
IntPtr __result;
__result = __obj.UserData;
return __result;
} catch (Exception e) {
GLib.ExceptionManager.RaiseUnhandledException (e, true);
// NOTREACHED: above call does not return.
throw;
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate IntPtr GetSourceObjectNativeDelegate (IntPtr inst);
static IntPtr GetSourceObject_cb (IntPtr inst)
{
try {
IAsyncResultImplementor __obj = GLib.Object.GetObject (inst, false) as IAsyncResultImplementor;
GLib.Object __result;
__result = __obj.SourceObject;
return __result == null ? IntPtr.Zero : __result.Handle;
} catch (Exception e) {
GLib.ExceptionManager.RaiseUnhandledException (e, true);
// NOTREACHED: above call does not return.
throw;
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate bool IsTaggedNativeDelegate (IntPtr inst, IntPtr source_tag);
static bool IsTagged_cb (IntPtr inst, IntPtr source_tag)
{
try {
IAsyncResultImplementor __obj = GLib.Object.GetObject (inst, false) as IAsyncResultImplementor;
bool __result;
__result = __obj.IsTagged (source_tag);
return __result;
} catch (Exception e) {
GLib.ExceptionManager.RaiseUnhandledException (e, true);
// NOTREACHED: above call does not return.
throw;
}
}
static int class_offset = 2 * IntPtr.Size;
static void Initialize (IntPtr ptr, IntPtr data)
{
IntPtr ifaceptr = new IntPtr (ptr.ToInt64 () + class_offset);
GAsyncResultIface native_iface = (GAsyncResultIface) Marshal.PtrToStructure (ifaceptr, typeof (GAsyncResultIface));
native_iface.GetUserData = iface.GetUserData;
native_iface.GetSourceObject = iface.GetSourceObject;
native_iface.IsTagged = iface.IsTagged;
Marshal.StructureToPtr (native_iface, ifaceptr, false);
}
GLib.Object implementor;
public AsyncResultAdapter ()
{
InitHandler = new GLib.GInterfaceInitHandler (Initialize);
}
public AsyncResultAdapter (IAsyncResultImplementor implementor)
{
if (implementor == null)
throw new ArgumentNullException ("implementor");
else if (!(implementor is GLib.Object))
throw new ArgumentException ("implementor must be a subclass of GLib.Object");
this.implementor = implementor as GLib.Object;
}
public AsyncResultAdapter (IntPtr handle)
{
if (!_gtype.IsInstance (handle))
throw new ArgumentException ("The gobject doesn't implement the GInterface of this adapter", "handle");
implementor = GLib.Object.GetObject (handle);
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate IntPtr d_g_async_result_get_type();
static d_g_async_result_get_type g_async_result_get_type = FuncLoader.LoadFunction<d_g_async_result_get_type>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_async_result_get_type"));
private static GLib.GType _gtype = new GLib.GType (g_async_result_get_type ());
public static GLib.GType GType {
get {
return _gtype;
}
}
public override GLib.GType GInterfaceGType {
get {
return _gtype;
}
}
public override IntPtr Handle {
get {
return implementor.Handle;
}
}
public IntPtr OwnedHandle {
get {
return implementor.OwnedHandle;
}
}
public static IAsyncResult GetObject (IntPtr handle, bool owned)
{
GLib.Object obj = GLib.Object.GetObject (handle, owned);
return GetObject (obj);
}
public static IAsyncResult GetObject (GLib.Object obj)
{
if (obj == null)
return null;
else if (obj is IAsyncResultImplementor)
return new AsyncResultAdapter (obj as IAsyncResultImplementor);
else if (obj as IAsyncResult == null)
return new AsyncResultAdapter (obj.Handle);
else
return obj as IAsyncResult;
}
public IAsyncResultImplementor Implementor {
get {
return implementor as IAsyncResultImplementor;
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate IntPtr d_g_async_result_get_source_object(IntPtr raw);
static d_g_async_result_get_source_object g_async_result_get_source_object = FuncLoader.LoadFunction<d_g_async_result_get_source_object>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_async_result_get_source_object"));
public GLib.Object SourceObject {
get {
IntPtr raw_ret = g_async_result_get_source_object(Handle);
GLib.Object ret = GLib.Object.GetObject (raw_ret);
return ret;
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate IntPtr d_g_async_result_get_user_data(IntPtr raw);
static d_g_async_result_get_user_data g_async_result_get_user_data = FuncLoader.LoadFunction<d_g_async_result_get_user_data>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_async_result_get_user_data"));
public IntPtr UserData {
get {
IntPtr raw_ret = g_async_result_get_user_data(Handle);
IntPtr ret = raw_ret;
return ret;
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate bool d_g_async_result_is_tagged(IntPtr raw, IntPtr source_tag);
static d_g_async_result_is_tagged g_async_result_is_tagged = FuncLoader.LoadFunction<d_g_async_result_is_tagged>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_async_result_is_tagged"));
public bool IsTagged(IntPtr source_tag) {
bool raw_ret = g_async_result_is_tagged(Handle, source_tag);
bool ret = raw_ret;
return ret;
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate bool d_g_async_result_legacy_propagate_error(IntPtr raw, out IntPtr error);
static d_g_async_result_legacy_propagate_error g_async_result_legacy_propagate_error = FuncLoader.LoadFunction<d_g_async_result_legacy_propagate_error>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_async_result_legacy_propagate_error"));
public bool LegacyPropagateError() {
IntPtr error = IntPtr.Zero;
bool raw_ret = g_async_result_legacy_propagate_error(Handle, out error);
bool ret = raw_ret;
if (error != IntPtr.Zero) throw new GLib.GException (error);
return ret;
}
#endregion
}
}

View File

@@ -0,0 +1,497 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace GLib {
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.InteropServices;
using static GLib.AbiStructExtension;
#region Autogenerated code
public partial class BufferedInputStream : GLib.FilterInputStream, GLib.ISeekable {
public BufferedInputStream (IntPtr raw) : base(raw) {}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate IntPtr d_g_buffered_input_stream_new(IntPtr base_stream);
static d_g_buffered_input_stream_new g_buffered_input_stream_new = FuncLoader.LoadFunction<d_g_buffered_input_stream_new>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_buffered_input_stream_new"));
public BufferedInputStream (GLib.InputStream base_stream) : base (IntPtr.Zero)
{
if (GetType () != typeof (BufferedInputStream)) {
var vals = new List<GLib.Value> ();
var names = new List<string> ();
if (base_stream != null) {
names.Add ("base_stream");
vals.Add (new GLib.Value (base_stream));
}
CreateNativeObject (names.ToArray (), vals.ToArray ());
return;
}
Raw = g_buffered_input_stream_new(base_stream == null ? IntPtr.Zero : base_stream.Handle);
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate IntPtr d_g_buffered_input_stream_new_sized(IntPtr base_stream, UIntPtr size);
static d_g_buffered_input_stream_new_sized g_buffered_input_stream_new_sized = FuncLoader.LoadFunction<d_g_buffered_input_stream_new_sized>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_buffered_input_stream_new_sized"));
public BufferedInputStream (GLib.InputStream base_stream, ulong size) : base (IntPtr.Zero)
{
if (GetType () != typeof (BufferedInputStream)) {
var vals = new List<GLib.Value> ();
var names = new List<string> ();
if (base_stream != null) {
names.Add ("base_stream");
vals.Add (new GLib.Value (base_stream));
}
CreateNativeObject (names.ToArray (), vals.ToArray ());
return;
}
Raw = g_buffered_input_stream_new_sized(base_stream == null ? IntPtr.Zero : base_stream.Handle, new UIntPtr (size));
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate UIntPtr d_g_buffered_input_stream_get_buffer_size(IntPtr raw);
static d_g_buffered_input_stream_get_buffer_size g_buffered_input_stream_get_buffer_size = FuncLoader.LoadFunction<d_g_buffered_input_stream_get_buffer_size>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_buffered_input_stream_get_buffer_size"));
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate void d_g_buffered_input_stream_set_buffer_size(IntPtr raw, UIntPtr size);
static d_g_buffered_input_stream_set_buffer_size g_buffered_input_stream_set_buffer_size = FuncLoader.LoadFunction<d_g_buffered_input_stream_set_buffer_size>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_buffered_input_stream_set_buffer_size"));
[GLib.Property ("buffer-size")]
public ulong BufferSize {
get {
UIntPtr raw_ret = g_buffered_input_stream_get_buffer_size(Handle);
ulong ret = (ulong) raw_ret;
return ret;
}
set {
g_buffered_input_stream_set_buffer_size(Handle, new UIntPtr (value));
}
}
static FillNativeDelegate Fill_cb_delegate;
static FillNativeDelegate FillVMCallback {
get {
if (Fill_cb_delegate == null)
Fill_cb_delegate = new FillNativeDelegate (Fill_cb);
return Fill_cb_delegate;
}
}
static void OverrideFill (GLib.GType gtype)
{
OverrideFill (gtype, FillVMCallback);
}
static void OverrideFill (GLib.GType gtype, FillNativeDelegate callback)
{
unsafe {
IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("fill"));
*raw_ptr = Marshal.GetFunctionPointerForDelegate(callback);
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate IntPtr FillNativeDelegate (IntPtr inst, IntPtr count, IntPtr cancellable, out IntPtr error);
static IntPtr Fill_cb (IntPtr inst, IntPtr count, IntPtr cancellable, out IntPtr error)
{
error = IntPtr.Zero;
try {
BufferedInputStream __obj = GLib.Object.GetObject (inst, false) as BufferedInputStream;
long __result;
__result = __obj.OnFill ((long) count, GLib.Object.GetObject(cancellable) as GLib.Cancellable);
return new IntPtr (__result);
} catch (Exception e) {
GLib.ExceptionManager.RaiseUnhandledException (e, true);
// NOTREACHED: above call does not return.
throw;
}
}
[GLib.DefaultSignalHandler(Type=typeof(GLib.BufferedInputStream), ConnectionMethod="OverrideFill")]
protected virtual long OnFill (long count, GLib.Cancellable cancellable)
{
return InternalFill (count, cancellable);
}
private long InternalFill (long count, GLib.Cancellable cancellable)
{
FillNativeDelegate unmanaged = class_abi.BaseOverride<FillNativeDelegate>(this.LookupGType(), "fill");
if (unmanaged == null) throw new InvalidOperationException ("No base method to invoke");
IntPtr error = IntPtr.Zero;
IntPtr __result = unmanaged (this.Handle, new IntPtr (count), cancellable == null ? IntPtr.Zero : cancellable.Handle, out error);
return (long) __result;
}
static FillAsyncNativeDelegate FillAsync_cb_delegate;
static FillAsyncNativeDelegate FillAsyncVMCallback {
get {
if (FillAsync_cb_delegate == null)
FillAsync_cb_delegate = new FillAsyncNativeDelegate (FillAsync_cb);
return FillAsync_cb_delegate;
}
}
static void OverrideFillAsync (GLib.GType gtype)
{
OverrideFillAsync (gtype, FillAsyncVMCallback);
}
static void OverrideFillAsync (GLib.GType gtype, FillAsyncNativeDelegate callback)
{
unsafe {
IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("fill_async"));
*raw_ptr = Marshal.GetFunctionPointerForDelegate(callback);
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate void FillAsyncNativeDelegate (IntPtr inst, IntPtr count, int io_priority, IntPtr cancellable, GLibSharp.AsyncReadyCallbackNative cb, IntPtr user_data);
static void FillAsync_cb (IntPtr inst, IntPtr count, int io_priority, IntPtr cancellable, GLibSharp.AsyncReadyCallbackNative cb, IntPtr user_data)
{
try {
BufferedInputStream __obj = GLib.Object.GetObject (inst, false) as BufferedInputStream;
GLibSharp.AsyncReadyCallbackInvoker cb_invoker = new GLibSharp.AsyncReadyCallbackInvoker (cb, user_data);
__obj.OnFillAsync ((long) count, io_priority, GLib.Object.GetObject(cancellable) as GLib.Cancellable, cb_invoker.Handler);
} catch (Exception e) {
GLib.ExceptionManager.RaiseUnhandledException (e, false);
}
}
[GLib.DefaultSignalHandler(Type=typeof(GLib.BufferedInputStream), ConnectionMethod="OverrideFillAsync")]
protected virtual void OnFillAsync (long count, int io_priority, GLib.Cancellable cancellable, GLib.AsyncReadyCallback cb)
{
InternalFillAsync (count, io_priority, cancellable, cb);
}
private void InternalFillAsync (long count, int io_priority, GLib.Cancellable cancellable, GLib.AsyncReadyCallback cb)
{
FillAsyncNativeDelegate unmanaged = class_abi.BaseOverride<FillAsyncNativeDelegate>(this.LookupGType(), "fill_async");
if (unmanaged == null) return;
GLibSharp.AsyncReadyCallbackWrapper cb_wrapper = new GLibSharp.AsyncReadyCallbackWrapper (cb);
cb_wrapper.PersistUntilCalled ();
unmanaged (this.Handle, new IntPtr (count), io_priority, cancellable == null ? IntPtr.Zero : cancellable.Handle, cb_wrapper.NativeDelegate, IntPtr.Zero);
}
static FillFinishNativeDelegate FillFinish_cb_delegate;
static FillFinishNativeDelegate FillFinishVMCallback {
get {
if (FillFinish_cb_delegate == null)
FillFinish_cb_delegate = new FillFinishNativeDelegate (FillFinish_cb);
return FillFinish_cb_delegate;
}
}
static void OverrideFillFinish (GLib.GType gtype)
{
OverrideFillFinish (gtype, FillFinishVMCallback);
}
static void OverrideFillFinish (GLib.GType gtype, FillFinishNativeDelegate callback)
{
unsafe {
IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("fill_finish"));
*raw_ptr = Marshal.GetFunctionPointerForDelegate(callback);
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate IntPtr FillFinishNativeDelegate (IntPtr inst, IntPtr result, out IntPtr error);
static IntPtr FillFinish_cb (IntPtr inst, IntPtr result, out IntPtr error)
{
error = IntPtr.Zero;
try {
BufferedInputStream __obj = GLib.Object.GetObject (inst, false) as BufferedInputStream;
long __result;
__result = __obj.OnFillFinish (GLib.AsyncResultAdapter.GetObject (result, false));
return new IntPtr (__result);
} catch (Exception e) {
GLib.ExceptionManager.RaiseUnhandledException (e, true);
// NOTREACHED: above call does not return.
throw;
}
}
[GLib.DefaultSignalHandler(Type=typeof(GLib.BufferedInputStream), ConnectionMethod="OverrideFillFinish")]
protected virtual long OnFillFinish (GLib.IAsyncResult result)
{
return InternalFillFinish (result);
}
private long InternalFillFinish (GLib.IAsyncResult result)
{
FillFinishNativeDelegate unmanaged = class_abi.BaseOverride<FillFinishNativeDelegate>(this.LookupGType(), "fill_finish");
if (unmanaged == null) throw new InvalidOperationException ("No base method to invoke");
IntPtr error = IntPtr.Zero;
IntPtr __result = unmanaged (this.Handle, result == null ? IntPtr.Zero : ((result is GLib.Object) ? (result as GLib.Object).Handle : (result as GLib.AsyncResultAdapter).Handle), out error);
return (long) __result;
}
// Internal representation of the wrapped structure ABI.
static GLib.AbiStruct _class_abi = null;
static public unsafe new GLib.AbiStruct class_abi {
get {
if (_class_abi == null)
_class_abi = new GLib.AbiStruct (new List<GLib.AbiField>{
new GLib.AbiField("fill"
, GLib.FilterInputStream.class_abi.Fields
, (uint) sizeof( IntPtr ) // fill
, null
, "fill_async"
, (uint) sizeof(IntPtr)
, 0
),
new GLib.AbiField("fill_async"
, -1
, (uint) sizeof( IntPtr ) // fill_async
, "fill"
, "fill_finish"
, (uint) sizeof(IntPtr)
, 0
),
new GLib.AbiField("fill_finish"
, -1
, (uint) sizeof( IntPtr ) // fill_finish
, "fill_async"
, "_g_reserved1"
, (uint) sizeof(IntPtr)
, 0
),
new GLib.AbiField("_g_reserved1"
, -1
, (uint) sizeof( IntPtr ) // _g_reserved1
, "fill_finish"
, "_g_reserved2"
, (uint) sizeof(IntPtr)
, 0
),
new GLib.AbiField("_g_reserved2"
, -1
, (uint) sizeof( IntPtr ) // _g_reserved2
, "_g_reserved1"
, "_g_reserved3"
, (uint) sizeof(IntPtr)
, 0
),
new GLib.AbiField("_g_reserved3"
, -1
, (uint) sizeof( IntPtr ) // _g_reserved3
, "_g_reserved2"
, "_g_reserved4"
, (uint) sizeof(IntPtr)
, 0
),
new GLib.AbiField("_g_reserved4"
, -1
, (uint) sizeof( IntPtr ) // _g_reserved4
, "_g_reserved3"
, "_g_reserved5"
, (uint) sizeof(IntPtr)
, 0
),
new GLib.AbiField("_g_reserved5"
, -1
, (uint) sizeof( IntPtr ) // _g_reserved5
, "_g_reserved4"
, null
, (uint) sizeof(IntPtr)
, 0
),
});
return _class_abi;
}
}
// End of the ABI representation.
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate IntPtr d_g_buffered_input_stream_fill(IntPtr raw, IntPtr count, IntPtr cancellable, out IntPtr error);
static d_g_buffered_input_stream_fill g_buffered_input_stream_fill = FuncLoader.LoadFunction<d_g_buffered_input_stream_fill>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_buffered_input_stream_fill"));
public unsafe long Fill(long count, GLib.Cancellable cancellable) {
IntPtr error = IntPtr.Zero;
IntPtr raw_ret = g_buffered_input_stream_fill(Handle, new IntPtr (count), cancellable == null ? IntPtr.Zero : cancellable.Handle, out error);
long ret = (long) raw_ret;
if (error != IntPtr.Zero) throw new GLib.GException (error);
return ret;
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate void d_g_buffered_input_stream_fill_async(IntPtr raw, IntPtr count, int io_priority, IntPtr cancellable, GLibSharp.AsyncReadyCallbackNative cb, IntPtr user_data);
static d_g_buffered_input_stream_fill_async g_buffered_input_stream_fill_async = FuncLoader.LoadFunction<d_g_buffered_input_stream_fill_async>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_buffered_input_stream_fill_async"));
public void FillAsync(long count, int io_priority, GLib.Cancellable cancellable, GLib.AsyncReadyCallback cb) {
GLibSharp.AsyncReadyCallbackWrapper cb_wrapper = new GLibSharp.AsyncReadyCallbackWrapper (cb);
cb_wrapper.PersistUntilCalled ();
g_buffered_input_stream_fill_async(Handle, new IntPtr (count), io_priority, cancellable == null ? IntPtr.Zero : cancellable.Handle, cb_wrapper.NativeDelegate, IntPtr.Zero);
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate IntPtr d_g_buffered_input_stream_fill_finish(IntPtr raw, IntPtr result, out IntPtr error);
static d_g_buffered_input_stream_fill_finish g_buffered_input_stream_fill_finish = FuncLoader.LoadFunction<d_g_buffered_input_stream_fill_finish>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_buffered_input_stream_fill_finish"));
public unsafe long FillFinish(GLib.IAsyncResult result) {
IntPtr error = IntPtr.Zero;
IntPtr raw_ret = g_buffered_input_stream_fill_finish(Handle, result == null ? IntPtr.Zero : ((result is GLib.Object) ? (result as GLib.Object).Handle : (result as GLib.AsyncResultAdapter).Handle), out error);
long ret = (long) raw_ret;
if (error != IntPtr.Zero) throw new GLib.GException (error);
return ret;
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate UIntPtr d_g_buffered_input_stream_get_available(IntPtr raw);
static d_g_buffered_input_stream_get_available g_buffered_input_stream_get_available = FuncLoader.LoadFunction<d_g_buffered_input_stream_get_available>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_buffered_input_stream_get_available"));
public ulong Available {
get {
UIntPtr raw_ret = g_buffered_input_stream_get_available(Handle);
ulong ret = (ulong) raw_ret;
return ret;
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate IntPtr d_g_buffered_input_stream_get_type();
static d_g_buffered_input_stream_get_type g_buffered_input_stream_get_type = FuncLoader.LoadFunction<d_g_buffered_input_stream_get_type>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_buffered_input_stream_get_type"));
public static new GLib.GType GType {
get {
IntPtr raw_ret = g_buffered_input_stream_get_type();
GLib.GType ret = new GLib.GType(raw_ret);
return ret;
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate UIntPtr d_g_buffered_input_stream_peek(IntPtr raw, IntPtr buffer, UIntPtr offset, UIntPtr count);
static d_g_buffered_input_stream_peek g_buffered_input_stream_peek = FuncLoader.LoadFunction<d_g_buffered_input_stream_peek>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_buffered_input_stream_peek"));
public ulong Peek(IntPtr buffer, ulong offset, ulong count) {
UIntPtr raw_ret = g_buffered_input_stream_peek(Handle, buffer, new UIntPtr (offset), new UIntPtr (count));
ulong ret = (ulong) raw_ret;
return ret;
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate IntPtr d_g_buffered_input_stream_peek_buffer(IntPtr raw, out UIntPtr count);
static d_g_buffered_input_stream_peek_buffer g_buffered_input_stream_peek_buffer = FuncLoader.LoadFunction<d_g_buffered_input_stream_peek_buffer>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_buffered_input_stream_peek_buffer"));
public IntPtr PeekBuffer(out ulong count) {
UIntPtr native_count;
IntPtr raw_ret = g_buffered_input_stream_peek_buffer(Handle, out native_count);
IntPtr ret = raw_ret;
count = (ulong) native_count;
return ret;
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate int d_g_buffered_input_stream_read_byte(IntPtr raw, IntPtr cancellable, out IntPtr error);
static d_g_buffered_input_stream_read_byte g_buffered_input_stream_read_byte = FuncLoader.LoadFunction<d_g_buffered_input_stream_read_byte>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_buffered_input_stream_read_byte"));
public unsafe int ReadByte(GLib.Cancellable cancellable) {
IntPtr error = IntPtr.Zero;
int raw_ret = g_buffered_input_stream_read_byte(Handle, cancellable == null ? IntPtr.Zero : cancellable.Handle, out error);
int ret = raw_ret;
if (error != IntPtr.Zero) throw new GLib.GException (error);
return ret;
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate bool d_g_seekable_can_seek(IntPtr raw);
static d_g_seekable_can_seek g_seekable_can_seek = FuncLoader.LoadFunction<d_g_seekable_can_seek>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_seekable_can_seek"));
public bool CanSeek {
get {
bool raw_ret = g_seekable_can_seek(Handle);
bool ret = raw_ret;
return ret;
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate bool d_g_seekable_can_truncate(IntPtr raw);
static d_g_seekable_can_truncate g_seekable_can_truncate = FuncLoader.LoadFunction<d_g_seekable_can_truncate>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_seekable_can_truncate"));
public bool CanTruncate() {
bool raw_ret = g_seekable_can_truncate(Handle);
bool ret = raw_ret;
return ret;
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate bool d_g_seekable_seek(IntPtr raw, long offset, int type, IntPtr cancellable, out IntPtr error);
static d_g_seekable_seek g_seekable_seek = FuncLoader.LoadFunction<d_g_seekable_seek>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_seekable_seek"));
public bool Seek(long offset, GLib.SeekType type, GLib.Cancellable cancellable) {
IntPtr error = IntPtr.Zero;
bool raw_ret = g_seekable_seek(Handle, offset, (int) type, cancellable == null ? IntPtr.Zero : cancellable.Handle, out error);
bool ret = raw_ret;
if (error != IntPtr.Zero) throw new GLib.GException (error);
return ret;
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate long d_g_seekable_tell(IntPtr raw);
static d_g_seekable_tell g_seekable_tell = FuncLoader.LoadFunction<d_g_seekable_tell>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_seekable_tell"));
public long Position {
get {
long raw_ret = g_seekable_tell(Handle);
long ret = raw_ret;
return ret;
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate bool d_g_seekable_truncate(IntPtr raw, long offset, IntPtr cancellable, out IntPtr error);
static d_g_seekable_truncate g_seekable_truncate = FuncLoader.LoadFunction<d_g_seekable_truncate>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_seekable_truncate"));
public bool Truncate(long offset, GLib.Cancellable cancellable) {
IntPtr error = IntPtr.Zero;
bool raw_ret = g_seekable_truncate(Handle, offset, cancellable == null ? IntPtr.Zero : cancellable.Handle, out error);
bool ret = raw_ret;
if (error != IntPtr.Zero) throw new GLib.GException (error);
return ret;
}
// Internal representation of the wrapped structure ABI.
static GLib.AbiStruct _abi_info = null;
static public unsafe new GLib.AbiStruct abi_info {
get {
if (_abi_info == null)
_abi_info = new GLib.AbiStruct (new List<GLib.AbiField>{
new GLib.AbiField("priv"
, GLib.FilterInputStream.abi_info.Fields
, (uint) sizeof( IntPtr ) // priv
, null
, null
, (uint) sizeof(IntPtr)
, 0
),
});
return _abi_info;
}
}
// End of the ABI representation.
#endregion
}
}

View File

@@ -0,0 +1,223 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace GLib {
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.InteropServices;
using static GLib.AbiStructExtension;
#region Autogenerated code
public partial class BufferedOutputStream : GLib.FilterOutputStream, GLib.ISeekable {
public BufferedOutputStream (IntPtr raw) : base(raw) {}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate IntPtr d_g_buffered_output_stream_new(IntPtr base_stream);
static d_g_buffered_output_stream_new g_buffered_output_stream_new = FuncLoader.LoadFunction<d_g_buffered_output_stream_new>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_buffered_output_stream_new"));
public BufferedOutputStream (GLib.OutputStream base_stream) : base (IntPtr.Zero)
{
if (GetType () != typeof (BufferedOutputStream)) {
var vals = new List<GLib.Value> ();
var names = new List<string> ();
if (base_stream != null) {
names.Add ("base_stream");
vals.Add (new GLib.Value (base_stream));
}
CreateNativeObject (names.ToArray (), vals.ToArray ());
return;
}
Raw = g_buffered_output_stream_new(base_stream == null ? IntPtr.Zero : base_stream.Handle);
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate IntPtr d_g_buffered_output_stream_new_sized(IntPtr base_stream, UIntPtr size);
static d_g_buffered_output_stream_new_sized g_buffered_output_stream_new_sized = FuncLoader.LoadFunction<d_g_buffered_output_stream_new_sized>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_buffered_output_stream_new_sized"));
public BufferedOutputStream (GLib.OutputStream base_stream, ulong size) : base (IntPtr.Zero)
{
if (GetType () != typeof (BufferedOutputStream)) {
var vals = new List<GLib.Value> ();
var names = new List<string> ();
if (base_stream != null) {
names.Add ("base_stream");
vals.Add (new GLib.Value (base_stream));
}
CreateNativeObject (names.ToArray (), vals.ToArray ());
return;
}
Raw = g_buffered_output_stream_new_sized(base_stream == null ? IntPtr.Zero : base_stream.Handle, new UIntPtr (size));
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate UIntPtr d_g_buffered_output_stream_get_buffer_size(IntPtr raw);
static d_g_buffered_output_stream_get_buffer_size g_buffered_output_stream_get_buffer_size = FuncLoader.LoadFunction<d_g_buffered_output_stream_get_buffer_size>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_buffered_output_stream_get_buffer_size"));
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate void d_g_buffered_output_stream_set_buffer_size(IntPtr raw, UIntPtr size);
static d_g_buffered_output_stream_set_buffer_size g_buffered_output_stream_set_buffer_size = FuncLoader.LoadFunction<d_g_buffered_output_stream_set_buffer_size>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_buffered_output_stream_set_buffer_size"));
[GLib.Property ("buffer-size")]
public ulong BufferSize {
get {
UIntPtr raw_ret = g_buffered_output_stream_get_buffer_size(Handle);
ulong ret = (ulong) raw_ret;
return ret;
}
set {
g_buffered_output_stream_set_buffer_size(Handle, new UIntPtr (value));
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate bool d_g_buffered_output_stream_get_auto_grow(IntPtr raw);
static d_g_buffered_output_stream_get_auto_grow g_buffered_output_stream_get_auto_grow = FuncLoader.LoadFunction<d_g_buffered_output_stream_get_auto_grow>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_buffered_output_stream_get_auto_grow"));
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate void d_g_buffered_output_stream_set_auto_grow(IntPtr raw, bool auto_grow);
static d_g_buffered_output_stream_set_auto_grow g_buffered_output_stream_set_auto_grow = FuncLoader.LoadFunction<d_g_buffered_output_stream_set_auto_grow>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_buffered_output_stream_set_auto_grow"));
[GLib.Property ("auto-grow")]
public bool AutoGrow {
get {
bool raw_ret = g_buffered_output_stream_get_auto_grow(Handle);
bool ret = raw_ret;
return ret;
}
set {
g_buffered_output_stream_set_auto_grow(Handle, value);
}
}
// Internal representation of the wrapped structure ABI.
static GLib.AbiStruct _class_abi = null;
static public unsafe new GLib.AbiStruct class_abi {
get {
if (_class_abi == null)
_class_abi = new GLib.AbiStruct (new List<GLib.AbiField>{
new GLib.AbiField("_g_reserved1"
, GLib.FilterOutputStream.class_abi.Fields
, (uint) sizeof( IntPtr ) // _g_reserved1
, null
, "_g_reserved2"
, (uint) sizeof(IntPtr)
, 0
),
new GLib.AbiField("_g_reserved2"
, -1
, (uint) sizeof( IntPtr ) // _g_reserved2
, "_g_reserved1"
, null
, (uint) sizeof(IntPtr)
, 0
),
});
return _class_abi;
}
}
// End of the ABI representation.
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate IntPtr d_g_buffered_output_stream_get_type();
static d_g_buffered_output_stream_get_type g_buffered_output_stream_get_type = FuncLoader.LoadFunction<d_g_buffered_output_stream_get_type>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_buffered_output_stream_get_type"));
public static new GLib.GType GType {
get {
IntPtr raw_ret = g_buffered_output_stream_get_type();
GLib.GType ret = new GLib.GType(raw_ret);
return ret;
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate bool d_g_seekable_can_seek(IntPtr raw);
static d_g_seekable_can_seek g_seekable_can_seek = FuncLoader.LoadFunction<d_g_seekable_can_seek>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_seekable_can_seek"));
public bool CanSeek {
get {
bool raw_ret = g_seekable_can_seek(Handle);
bool ret = raw_ret;
return ret;
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate bool d_g_seekable_can_truncate(IntPtr raw);
static d_g_seekable_can_truncate g_seekable_can_truncate = FuncLoader.LoadFunction<d_g_seekable_can_truncate>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_seekable_can_truncate"));
public bool CanTruncate() {
bool raw_ret = g_seekable_can_truncate(Handle);
bool ret = raw_ret;
return ret;
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate bool d_g_seekable_seek(IntPtr raw, long offset, int type, IntPtr cancellable, out IntPtr error);
static d_g_seekable_seek g_seekable_seek = FuncLoader.LoadFunction<d_g_seekable_seek>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_seekable_seek"));
public bool Seek(long offset, GLib.SeekType type, GLib.Cancellable cancellable) {
IntPtr error = IntPtr.Zero;
bool raw_ret = g_seekable_seek(Handle, offset, (int) type, cancellable == null ? IntPtr.Zero : cancellable.Handle, out error);
bool ret = raw_ret;
if (error != IntPtr.Zero) throw new GLib.GException (error);
return ret;
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate long d_g_seekable_tell(IntPtr raw);
static d_g_seekable_tell g_seekable_tell = FuncLoader.LoadFunction<d_g_seekable_tell>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_seekable_tell"));
public long Position {
get {
long raw_ret = g_seekable_tell(Handle);
long ret = raw_ret;
return ret;
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate bool d_g_seekable_truncate(IntPtr raw, long offset, IntPtr cancellable, out IntPtr error);
static d_g_seekable_truncate g_seekable_truncate = FuncLoader.LoadFunction<d_g_seekable_truncate>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_seekable_truncate"));
public bool Truncate(long offset, GLib.Cancellable cancellable) {
IntPtr error = IntPtr.Zero;
bool raw_ret = g_seekable_truncate(Handle, offset, cancellable == null ? IntPtr.Zero : cancellable.Handle, out error);
bool ret = raw_ret;
if (error != IntPtr.Zero) throw new GLib.GException (error);
return ret;
}
// Internal representation of the wrapped structure ABI.
static GLib.AbiStruct _abi_info = null;
static public unsafe new GLib.AbiStruct abi_info {
get {
if (_abi_info == null)
_abi_info = new GLib.AbiStruct (new List<GLib.AbiField>{
new GLib.AbiField("priv"
, GLib.FilterOutputStream.abi_info.Fields
, (uint) sizeof( IntPtr ) // priv
, null
, null
, (uint) sizeof(IntPtr)
, 0
),
});
return _abi_info;
}
}
// End of the ABI representation.
#endregion
}
}

View File

@@ -0,0 +1,31 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace GLib {
using System;
using System.Runtime.InteropServices;
#region Autogenerated code
[Flags]
[GLib.GType (typeof (GLib.BusNameOwnerFlagsGType))]
public enum BusNameOwnerFlags {
None,
AllowReplacement = 1 << 0,
Replace = 1 << 1,
}
internal class BusNameOwnerFlagsGType {
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate IntPtr d_g_bus_name_owner_flags_get_type();
static d_g_bus_name_owner_flags_get_type g_bus_name_owner_flags_get_type = FuncLoader.LoadFunction<d_g_bus_name_owner_flags_get_type>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_bus_name_owner_flags_get_type"));
public static GLib.GType GType {
get {
return new GLib.GType (g_bus_name_owner_flags_get_type ());
}
}
}
#endregion
}

View File

@@ -0,0 +1,30 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace GLib {
using System;
using System.Runtime.InteropServices;
#region Autogenerated code
[Flags]
[GLib.GType (typeof (GLib.BusNameWatcherFlagsGType))]
public enum BusNameWatcherFlags {
None,
AutoStart = 1 << 0,
}
internal class BusNameWatcherFlagsGType {
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate IntPtr d_g_bus_name_watcher_flags_get_type();
static d_g_bus_name_watcher_flags_get_type g_bus_name_watcher_flags_get_type = FuncLoader.LoadFunction<d_g_bus_name_watcher_flags_get_type>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_bus_name_watcher_flags_get_type"));
public static GLib.GType GType {
get {
return new GLib.GType (g_bus_name_watcher_flags_get_type ());
}
}
}
#endregion
}

View File

@@ -0,0 +1,31 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace GLib {
using System;
using System.Runtime.InteropServices;
#region Autogenerated code
[GLib.GType (typeof (GLib.BusTypeGType))]
public enum BusType {
Starter = -1,
None,
System = 1,
Session = 2,
}
internal class BusTypeGType {
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate IntPtr d_g_bus_type_get_type();
static d_g_bus_type_get_type g_bus_type_get_type = FuncLoader.LoadFunction<d_g_bus_type_get_type>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_bus_type_get_type"));
public static GLib.GType GType {
get {
return new GLib.GType (g_bus_type_get_type ());
}
}
}
#endregion
}

View File

@@ -0,0 +1,125 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace GLib {
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.InteropServices;
using static GLib.AbiStructExtension;
#region Autogenerated code
public partial class BytesIcon : GLib.Object, GLib.IIcon, GLib.ILoadableIcon {
public BytesIcon (IntPtr raw) : base(raw) {}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate IntPtr d_g_bytes_icon_new(IntPtr bytes);
static d_g_bytes_icon_new g_bytes_icon_new = FuncLoader.LoadFunction<d_g_bytes_icon_new>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_bytes_icon_new"));
public BytesIcon (GLib.Bytes bytes) : base (IntPtr.Zero)
{
if (GetType () != typeof (BytesIcon)) {
var vals = new List<GLib.Value> ();
var names = new List<string> ();
names.Add ("bytes");
vals.Add (new GLib.Value (bytes));
CreateNativeObject (names.ToArray (), vals.ToArray ());
return;
}
Raw = g_bytes_icon_new(bytes == null ? IntPtr.Zero : bytes.Handle);
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate IntPtr d_g_bytes_icon_get_bytes(IntPtr raw);
static d_g_bytes_icon_get_bytes g_bytes_icon_get_bytes = FuncLoader.LoadFunction<d_g_bytes_icon_get_bytes>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_bytes_icon_get_bytes"));
[GLib.Property ("bytes")]
public GLib.Bytes Bytes {
get {
IntPtr raw_ret = g_bytes_icon_get_bytes(Handle);
GLib.Bytes ret = new GLib.Bytes(raw_ret);
return ret;
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate IntPtr d_g_bytes_icon_get_type();
static d_g_bytes_icon_get_type g_bytes_icon_get_type = FuncLoader.LoadFunction<d_g_bytes_icon_get_type>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_bytes_icon_get_type"));
public static new GLib.GType GType {
get {
IntPtr raw_ret = g_bytes_icon_get_type();
GLib.GType ret = new GLib.GType(raw_ret);
return ret;
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate bool d_g_icon_equal(IntPtr raw, IntPtr icon2);
static d_g_icon_equal g_icon_equal = FuncLoader.LoadFunction<d_g_icon_equal>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_icon_equal"));
public bool Equal(GLib.IIcon icon2) {
bool raw_ret = g_icon_equal(Handle, icon2 == null ? IntPtr.Zero : ((icon2 is GLib.Object) ? (icon2 as GLib.Object).Handle : (icon2 as GLib.IconAdapter).Handle));
bool ret = raw_ret;
return ret;
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate IntPtr d_g_icon_serialize(IntPtr raw);
static d_g_icon_serialize g_icon_serialize = FuncLoader.LoadFunction<d_g_icon_serialize>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_icon_serialize"));
public GLib.Variant Serialize() {
IntPtr raw_ret = g_icon_serialize(Handle);
GLib.Variant ret = new GLib.Variant(raw_ret);
return ret;
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate IntPtr d_g_icon_to_string(IntPtr raw);
static d_g_icon_to_string g_icon_to_string = FuncLoader.LoadFunction<d_g_icon_to_string>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_icon_to_string"));
public override string ToString() {
IntPtr raw_ret = g_icon_to_string(Handle);
string ret = GLib.Marshaller.PtrToStringGFree(raw_ret);
return ret;
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate IntPtr d_g_loadable_icon_load(IntPtr raw, int size, IntPtr type, IntPtr cancellable, out IntPtr error);
static d_g_loadable_icon_load g_loadable_icon_load = FuncLoader.LoadFunction<d_g_loadable_icon_load>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_loadable_icon_load"));
public GLib.InputStream Load(int size, string type, GLib.Cancellable cancellable) {
IntPtr error = IntPtr.Zero;
IntPtr raw_ret = g_loadable_icon_load(Handle, size, GLib.Marshaller.StringToPtrGStrdup(type), cancellable == null ? IntPtr.Zero : cancellable.Handle, out error);
GLib.InputStream ret = GLib.Object.GetObject(raw_ret) as GLib.InputStream;
if (error != IntPtr.Zero) throw new GLib.GException (error);
return ret;
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate void d_g_loadable_icon_load_async(IntPtr raw, int size, IntPtr cancellable, GLibSharp.AsyncReadyCallbackNative cb, IntPtr user_data);
static d_g_loadable_icon_load_async g_loadable_icon_load_async = FuncLoader.LoadFunction<d_g_loadable_icon_load_async>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_loadable_icon_load_async"));
public void LoadAsync(int size, GLib.Cancellable cancellable, GLib.AsyncReadyCallback cb) {
GLibSharp.AsyncReadyCallbackWrapper cb_wrapper = new GLibSharp.AsyncReadyCallbackWrapper (cb);
cb_wrapper.PersistUntilCalled ();
g_loadable_icon_load_async(Handle, size, cancellable == null ? IntPtr.Zero : cancellable.Handle, cb_wrapper.NativeDelegate, IntPtr.Zero);
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate IntPtr d_g_loadable_icon_load_finish(IntPtr raw, IntPtr res, IntPtr type, out IntPtr error);
static d_g_loadable_icon_load_finish g_loadable_icon_load_finish = FuncLoader.LoadFunction<d_g_loadable_icon_load_finish>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_loadable_icon_load_finish"));
public GLib.InputStream LoadFinish(GLib.IAsyncResult res, string type) {
IntPtr error = IntPtr.Zero;
IntPtr raw_ret = g_loadable_icon_load_finish(Handle, res == null ? IntPtr.Zero : ((res is GLib.Object) ? (res as GLib.Object).Handle : (res as GLib.AsyncResultAdapter).Handle), GLib.Marshaller.StringToPtrGStrdup(type), out error);
GLib.InputStream ret = GLib.Object.GetObject(raw_ret) as GLib.InputStream;
if (error != IntPtr.Zero) throw new GLib.GException (error);
return ret;
}
#endregion
}
}

View File

@@ -0,0 +1,307 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace GLib {
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.InteropServices;
using static GLib.AbiStructExtension;
#region Autogenerated code
public partial class Cancellable : GLib.Object {
public Cancellable (IntPtr raw) : base(raw) {}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate IntPtr d_g_cancellable_new();
static d_g_cancellable_new g_cancellable_new = FuncLoader.LoadFunction<d_g_cancellable_new>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_cancellable_new"));
public Cancellable () : base (IntPtr.Zero)
{
if (GetType () != typeof (Cancellable)) {
CreateNativeObject (Array.Empty<string> (), Array.Empty<GLib.Value> ());
return;
}
Raw = g_cancellable_new();
}
[GLib.Signal("cancelled")]
public event System.EventHandler Cancelled {
add {
this.AddSignalHandler ("cancelled", value);
}
remove {
this.RemoveSignalHandler ("cancelled", value);
}
}
static CancelledNativeDelegate Cancelled_cb_delegate;
static CancelledNativeDelegate CancelledVMCallback {
get {
if (Cancelled_cb_delegate == null)
Cancelled_cb_delegate = new CancelledNativeDelegate (Cancelled_cb);
return Cancelled_cb_delegate;
}
}
static void OverrideCancelled (GLib.GType gtype)
{
OverrideCancelled (gtype, CancelledVMCallback);
}
static void OverrideCancelled (GLib.GType gtype, CancelledNativeDelegate callback)
{
unsafe {
IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("cancelled"));
*raw_ptr = Marshal.GetFunctionPointerForDelegate(callback);
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate void CancelledNativeDelegate (IntPtr inst);
static void Cancelled_cb (IntPtr inst)
{
try {
Cancellable __obj = GLib.Object.GetObject (inst, false) as Cancellable;
__obj.OnCancelled ();
} catch (Exception e) {
GLib.ExceptionManager.RaiseUnhandledException (e, false);
}
}
[GLib.DefaultSignalHandler(Type=typeof(GLib.Cancellable), ConnectionMethod="OverrideCancelled")]
protected virtual void OnCancelled ()
{
InternalCancelled ();
}
private void InternalCancelled ()
{
CancelledNativeDelegate unmanaged = class_abi.BaseOverride<CancelledNativeDelegate>(this.LookupGType(), "cancelled");
if (unmanaged == null) return;
unmanaged (this.Handle);
}
// Internal representation of the wrapped structure ABI.
static GLib.AbiStruct _class_abi = null;
static public unsafe new GLib.AbiStruct class_abi {
get {
if (_class_abi == null)
_class_abi = new GLib.AbiStruct (new List<GLib.AbiField>{
new GLib.AbiField("cancelled"
, GLib.Object.class_abi.Fields
, (uint) sizeof( IntPtr ) // cancelled
, null
, "_g_reserved1"
, (uint) sizeof(IntPtr)
, 0
),
new GLib.AbiField("_g_reserved1"
, -1
, (uint) sizeof( IntPtr ) // _g_reserved1
, "cancelled"
, "_g_reserved2"
, (uint) sizeof(IntPtr)
, 0
),
new GLib.AbiField("_g_reserved2"
, -1
, (uint) sizeof( IntPtr ) // _g_reserved2
, "_g_reserved1"
, "_g_reserved3"
, (uint) sizeof(IntPtr)
, 0
),
new GLib.AbiField("_g_reserved3"
, -1
, (uint) sizeof( IntPtr ) // _g_reserved3
, "_g_reserved2"
, "_g_reserved4"
, (uint) sizeof(IntPtr)
, 0
),
new GLib.AbiField("_g_reserved4"
, -1
, (uint) sizeof( IntPtr ) // _g_reserved4
, "_g_reserved3"
, "_g_reserved5"
, (uint) sizeof(IntPtr)
, 0
),
new GLib.AbiField("_g_reserved5"
, -1
, (uint) sizeof( IntPtr ) // _g_reserved5
, "_g_reserved4"
, null
, (uint) sizeof(IntPtr)
, 0
),
});
return _class_abi;
}
}
// End of the ABI representation.
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate void d_g_cancellable_cancel(IntPtr raw);
static d_g_cancellable_cancel g_cancellable_cancel = FuncLoader.LoadFunction<d_g_cancellable_cancel>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_cancellable_cancel"));
public void Cancel() {
g_cancellable_cancel(Handle);
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate void d_g_cancellable_disconnect(IntPtr raw, UIntPtr handler_id);
static d_g_cancellable_disconnect g_cancellable_disconnect = FuncLoader.LoadFunction<d_g_cancellable_disconnect>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_cancellable_disconnect"));
public void Disconnect(ulong handler_id) {
g_cancellable_disconnect(Handle, new UIntPtr (handler_id));
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate IntPtr d_g_cancellable_get_current();
static d_g_cancellable_get_current g_cancellable_get_current = FuncLoader.LoadFunction<d_g_cancellable_get_current>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_cancellable_get_current"));
public static GLib.Cancellable Current {
get {
IntPtr raw_ret = g_cancellable_get_current();
GLib.Cancellable ret = GLib.Object.GetObject(raw_ret) as GLib.Cancellable;
return ret;
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate int d_g_cancellable_get_fd(IntPtr raw);
static d_g_cancellable_get_fd g_cancellable_get_fd = FuncLoader.LoadFunction<d_g_cancellable_get_fd>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_cancellable_get_fd"));
public int Fd {
get {
int raw_ret = g_cancellable_get_fd(Handle);
int ret = raw_ret;
return ret;
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate IntPtr d_g_cancellable_get_type();
static d_g_cancellable_get_type g_cancellable_get_type = FuncLoader.LoadFunction<d_g_cancellable_get_type>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_cancellable_get_type"));
public static new GLib.GType GType {
get {
IntPtr raw_ret = g_cancellable_get_type();
GLib.GType ret = new GLib.GType(raw_ret);
return ret;
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate bool d_g_cancellable_is_cancelled(IntPtr raw);
static d_g_cancellable_is_cancelled g_cancellable_is_cancelled = FuncLoader.LoadFunction<d_g_cancellable_is_cancelled>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_cancellable_is_cancelled"));
public bool IsCancelled {
get {
bool raw_ret = g_cancellable_is_cancelled(Handle);
bool ret = raw_ret;
return ret;
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate bool d_g_cancellable_make_pollfd(IntPtr raw, out GLib.PollFD pollfd);
static d_g_cancellable_make_pollfd g_cancellable_make_pollfd = FuncLoader.LoadFunction<d_g_cancellable_make_pollfd>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_cancellable_make_pollfd"));
public bool MakePollfd(out GLib.PollFD pollfd) {
bool raw_ret = g_cancellable_make_pollfd(Handle, out pollfd);
bool ret = raw_ret;
return ret;
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate void d_g_cancellable_pop_current(IntPtr raw);
static d_g_cancellable_pop_current g_cancellable_pop_current = FuncLoader.LoadFunction<d_g_cancellable_pop_current>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_cancellable_pop_current"));
public void PopCurrent() {
g_cancellable_pop_current(Handle);
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate void d_g_cancellable_push_current(IntPtr raw);
static d_g_cancellable_push_current g_cancellable_push_current = FuncLoader.LoadFunction<d_g_cancellable_push_current>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_cancellable_push_current"));
public void PushCurrent() {
g_cancellable_push_current(Handle);
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate void d_g_cancellable_release_fd(IntPtr raw);
static d_g_cancellable_release_fd g_cancellable_release_fd = FuncLoader.LoadFunction<d_g_cancellable_release_fd>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_cancellable_release_fd"));
public void ReleaseFd() {
g_cancellable_release_fd(Handle);
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate void d_g_cancellable_reset(IntPtr raw);
static d_g_cancellable_reset g_cancellable_reset = FuncLoader.LoadFunction<d_g_cancellable_reset>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_cancellable_reset"));
public void Reset() {
g_cancellable_reset(Handle);
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate bool d_g_cancellable_set_error_if_cancelled(IntPtr raw, out IntPtr error);
static d_g_cancellable_set_error_if_cancelled g_cancellable_set_error_if_cancelled = FuncLoader.LoadFunction<d_g_cancellable_set_error_if_cancelled>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_cancellable_set_error_if_cancelled"));
public unsafe bool SetErrorIfCancelled() {
IntPtr error = IntPtr.Zero;
bool raw_ret = g_cancellable_set_error_if_cancelled(Handle, out error);
bool ret = raw_ret;
if (error != IntPtr.Zero) throw new GLib.GException (error);
return ret;
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate IntPtr d_g_cancellable_source_new(IntPtr raw);
static d_g_cancellable_source_new g_cancellable_source_new = FuncLoader.LoadFunction<d_g_cancellable_source_new>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_cancellable_source_new"));
public GLib.Source SourceNew() {
IntPtr raw_ret = g_cancellable_source_new(Handle);
GLib.Source ret = new GLib.Source(raw_ret);
return ret;
}
// Internal representation of the wrapped structure ABI.
static GLib.AbiStruct _abi_info = null;
static public unsafe new GLib.AbiStruct abi_info {
get {
if (_abi_info == null)
_abi_info = new GLib.AbiStruct (new List<GLib.AbiField>{
new GLib.AbiField("priv"
, GLib.Object.abi_info.Fields
, (uint) sizeof( IntPtr ) // priv
, null
, null
, (uint) sizeof(IntPtr)
, 0
),
});
return _abi_info;
}
}
// End of the ABI representation.
#endregion
}
}

View File

@@ -0,0 +1,10 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace GLib {
using System;
public delegate bool CancellableSourceFunc(GLib.Cancellable cancellable);
}

View File

@@ -0,0 +1,24 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace GLib {
using System;
public delegate void ChangeEventHandler(object o, ChangeEventArgs args);
public class ChangeEventArgs : GLib.SignalArgs {
public int Keys{
set {
Args[0] = (int)value;
}
}
public int NKeys{
get {
return (int) Args [1];
}
}
}
}

View File

@@ -0,0 +1,18 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace GLib {
using System;
public delegate void ChangedHandler(object o, ChangedArgs args);
public class ChangedArgs : GLib.SignalArgs {
public string Key{
get {
return (string) Args [0];
}
}
}
}

View File

@@ -0,0 +1,174 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace GLib {
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.InteropServices;
using static GLib.AbiStructExtension;
#region Autogenerated code
public partial class CharsetConverter : GLib.Object, GLib.IConverter, GLib.IInitable {
public CharsetConverter (IntPtr raw) : base(raw) {}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate IntPtr d_g_charset_converter_new(IntPtr to_charset, IntPtr from_charset, out IntPtr error);
static d_g_charset_converter_new g_charset_converter_new = FuncLoader.LoadFunction<d_g_charset_converter_new>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_charset_converter_new"));
public unsafe CharsetConverter (string to_charset, string from_charset) : base (IntPtr.Zero)
{
if (GetType () != typeof (CharsetConverter)) {
var vals = new List<GLib.Value> ();
var names = new List<string> ();
names.Add ("to_charset");
vals.Add (new GLib.Value (to_charset));
names.Add ("from_charset");
vals.Add (new GLib.Value (from_charset));
CreateNativeObject (names.ToArray (), vals.ToArray ());
return;
}
IntPtr native_to_charset = GLib.Marshaller.StringToPtrGStrdup (to_charset);
IntPtr native_from_charset = GLib.Marshaller.StringToPtrGStrdup (from_charset);
IntPtr error = IntPtr.Zero;
Raw = g_charset_converter_new(native_to_charset, native_from_charset, out error);
GLib.Marshaller.Free (native_to_charset);
GLib.Marshaller.Free (native_from_charset);
if (error != IntPtr.Zero) throw new GLib.GException (error);
}
[GLib.Property ("to-charset")]
public string ToCharset {
get {
GLib.Value val = GetProperty ("to-charset");
string ret = (string) val;
val.Dispose ();
return ret;
}
}
[GLib.Property ("from-charset")]
public string FromCharset {
get {
GLib.Value val = GetProperty ("from-charset");
string ret = (string) val;
val.Dispose ();
return ret;
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate bool d_g_charset_converter_get_use_fallback(IntPtr raw);
static d_g_charset_converter_get_use_fallback g_charset_converter_get_use_fallback = FuncLoader.LoadFunction<d_g_charset_converter_get_use_fallback>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_charset_converter_get_use_fallback"));
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate void d_g_charset_converter_set_use_fallback(IntPtr raw, bool use_fallback);
static d_g_charset_converter_set_use_fallback g_charset_converter_set_use_fallback = FuncLoader.LoadFunction<d_g_charset_converter_set_use_fallback>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_charset_converter_set_use_fallback"));
[GLib.Property ("use-fallback")]
public bool UseFallback {
get {
bool raw_ret = g_charset_converter_get_use_fallback(Handle);
bool ret = raw_ret;
return ret;
}
set {
g_charset_converter_set_use_fallback(Handle, value);
}
}
// Internal representation of the wrapped structure ABI.
static GLib.AbiStruct _class_abi = null;
static public unsafe new GLib.AbiStruct class_abi {
get {
if (_class_abi == null)
_class_abi = new GLib.AbiStruct (GLib.Object.class_abi.Fields);
return _class_abi;
}
}
// End of the ABI representation.
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate uint d_g_charset_converter_get_num_fallbacks(IntPtr raw);
static d_g_charset_converter_get_num_fallbacks g_charset_converter_get_num_fallbacks = FuncLoader.LoadFunction<d_g_charset_converter_get_num_fallbacks>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_charset_converter_get_num_fallbacks"));
public uint NumFallbacks {
get {
uint raw_ret = g_charset_converter_get_num_fallbacks(Handle);
uint ret = raw_ret;
return ret;
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate IntPtr d_g_charset_converter_get_type();
static d_g_charset_converter_get_type g_charset_converter_get_type = FuncLoader.LoadFunction<d_g_charset_converter_get_type>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_charset_converter_get_type"));
public static new GLib.GType GType {
get {
IntPtr raw_ret = g_charset_converter_get_type();
GLib.GType ret = new GLib.GType(raw_ret);
return ret;
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate int d_g_converter_convert(IntPtr raw, IntPtr inbuf, UIntPtr inbuf_size, IntPtr outbuf, UIntPtr outbuf_size, int flags, out UIntPtr bytes_read, out UIntPtr bytes_written, out IntPtr error);
static d_g_converter_convert g_converter_convert = FuncLoader.LoadFunction<d_g_converter_convert>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_converter_convert"));
public GLib.ConverterResult Convert(IntPtr inbuf, ulong inbuf_size, IntPtr outbuf, ulong outbuf_size, GLib.ConverterFlags flags, out ulong bytes_read, out ulong bytes_written) {
UIntPtr native_bytes_read;
UIntPtr native_bytes_written;
IntPtr error = IntPtr.Zero;
int raw_ret = g_converter_convert(Handle, inbuf, new UIntPtr (inbuf_size), outbuf, new UIntPtr (outbuf_size), (int) flags, out native_bytes_read, out native_bytes_written, out error);
GLib.ConverterResult ret = (GLib.ConverterResult) raw_ret;
bytes_read = (ulong) native_bytes_read;
bytes_written = (ulong) native_bytes_written;
if (error != IntPtr.Zero) throw new GLib.GException (error);
return ret;
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate void d_g_converter_reset(IntPtr raw);
static d_g_converter_reset g_converter_reset = FuncLoader.LoadFunction<d_g_converter_reset>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_converter_reset"));
public void Reset() {
g_converter_reset(Handle);
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate bool d_g_initable_init(IntPtr raw, IntPtr cancellable, out IntPtr error);
static d_g_initable_init g_initable_init = FuncLoader.LoadFunction<d_g_initable_init>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_initable_init"));
public bool Init(GLib.Cancellable cancellable) {
IntPtr error = IntPtr.Zero;
bool raw_ret = g_initable_init(Handle, cancellable == null ? IntPtr.Zero : cancellable.Handle, out error);
bool ret = raw_ret;
if (error != IntPtr.Zero) throw new GLib.GException (error);
return ret;
}
// Internal representation of the wrapped structure ABI.
static GLib.AbiStruct _abi_info = null;
static public unsafe new GLib.AbiStruct abi_info {
get {
if (_abi_info == null)
_abi_info = new GLib.AbiStruct (GLib.Object.abi_info.Fields);
return _abi_info;
}
}
// End of the ABI representation.
#endregion
}
}

View File

@@ -0,0 +1,34 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace GLib {
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.InteropServices;
#region Autogenerated code
public partial class CocoaNotificationBackend : GLib.Opaque {
public CocoaNotificationBackend(IntPtr raw) : base(raw) {}
// Internal representation of the wrapped structure ABI.
static GLib.AbiStruct _abi_info = null;
static public unsafe GLib.AbiStruct abi_info {
get {
if (_abi_info == null)
_abi_info = new GLib.AbiStruct (new List<GLib.AbiField>{
});
return _abi_info;
}
}
// End of the ABI representation.
#endregion
}
}

View File

@@ -0,0 +1,18 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace GLib {
using System;
public delegate void CommandLineHandler(object o, CommandLineArgs args);
public class CommandLineArgs : GLib.SignalArgs {
public GLib.ApplicationCommandLine CommandLine{
get {
return (GLib.ApplicationCommandLine) Args [0];
}
}
}
}

View File

@@ -0,0 +1,172 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace GLib {
using System;
using System.Runtime.InteropServices;
#region Autogenerated code
public partial class ContentType {
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate bool d_g_content_type_can_be_executable(IntPtr type);
static d_g_content_type_can_be_executable g_content_type_can_be_executable = FuncLoader.LoadFunction<d_g_content_type_can_be_executable>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_content_type_can_be_executable"));
public static bool CanBeExecutable(string type) {
IntPtr native_type = GLib.Marshaller.StringToPtrGStrdup (type);
bool raw_ret = g_content_type_can_be_executable(native_type);
bool ret = raw_ret;
GLib.Marshaller.Free (native_type);
return ret;
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate bool d_g_content_type_equals(IntPtr type1, IntPtr type2);
static d_g_content_type_equals g_content_type_equals = FuncLoader.LoadFunction<d_g_content_type_equals>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_content_type_equals"));
public static bool Equals(string type1, string type2) {
IntPtr native_type1 = GLib.Marshaller.StringToPtrGStrdup (type1);
IntPtr native_type2 = GLib.Marshaller.StringToPtrGStrdup (type2);
bool raw_ret = g_content_type_equals(native_type1, native_type2);
bool ret = raw_ret;
GLib.Marshaller.Free (native_type1);
GLib.Marshaller.Free (native_type2);
return ret;
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate IntPtr d_g_content_type_from_mime_type(IntPtr mime_type);
static d_g_content_type_from_mime_type g_content_type_from_mime_type = FuncLoader.LoadFunction<d_g_content_type_from_mime_type>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_content_type_from_mime_type"));
public static string FromMimeType(string mime_type) {
IntPtr native_mime_type = GLib.Marshaller.StringToPtrGStrdup (mime_type);
IntPtr raw_ret = g_content_type_from_mime_type(native_mime_type);
string ret = GLib.Marshaller.PtrToStringGFree(raw_ret);
GLib.Marshaller.Free (native_mime_type);
return ret;
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate IntPtr d_g_content_type_get_description(IntPtr type);
static d_g_content_type_get_description g_content_type_get_description = FuncLoader.LoadFunction<d_g_content_type_get_description>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_content_type_get_description"));
public static string GetDescription(string type) {
IntPtr native_type = GLib.Marshaller.StringToPtrGStrdup (type);
IntPtr raw_ret = g_content_type_get_description(native_type);
string ret = GLib.Marshaller.PtrToStringGFree(raw_ret);
GLib.Marshaller.Free (native_type);
return ret;
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate IntPtr d_g_content_type_get_generic_icon_name(IntPtr type);
static d_g_content_type_get_generic_icon_name g_content_type_get_generic_icon_name = FuncLoader.LoadFunction<d_g_content_type_get_generic_icon_name>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_content_type_get_generic_icon_name"));
public static string TypeGetGenericIconName(string type) {
IntPtr native_type = GLib.Marshaller.StringToPtrGStrdup (type);
IntPtr raw_ret = g_content_type_get_generic_icon_name(native_type);
string ret = GLib.Marshaller.PtrToStringGFree(raw_ret);
GLib.Marshaller.Free (native_type);
return ret;
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate IntPtr d_g_content_type_get_icon(IntPtr type);
static d_g_content_type_get_icon g_content_type_get_icon = FuncLoader.LoadFunction<d_g_content_type_get_icon>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_content_type_get_icon"));
public static GLib.IIcon GetIcon(string type) {
IntPtr native_type = GLib.Marshaller.StringToPtrGStrdup (type);
IntPtr raw_ret = g_content_type_get_icon(native_type);
GLib.IIcon ret = GLib.IconAdapter.GetObject (raw_ret, false);
GLib.Marshaller.Free (native_type);
return ret;
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate IntPtr d_g_content_type_get_mime_type(IntPtr type);
static d_g_content_type_get_mime_type g_content_type_get_mime_type = FuncLoader.LoadFunction<d_g_content_type_get_mime_type>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_content_type_get_mime_type"));
public static string GetMimeType(string type) {
IntPtr native_type = GLib.Marshaller.StringToPtrGStrdup (type);
IntPtr raw_ret = g_content_type_get_mime_type(native_type);
string ret = GLib.Marshaller.PtrToStringGFree(raw_ret);
GLib.Marshaller.Free (native_type);
return ret;
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate IntPtr d_g_content_type_get_symbolic_icon(IntPtr type);
static d_g_content_type_get_symbolic_icon g_content_type_get_symbolic_icon = FuncLoader.LoadFunction<d_g_content_type_get_symbolic_icon>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_content_type_get_symbolic_icon"));
public static GLib.IIcon TypeGetSymbolicIcon(string type) {
IntPtr native_type = GLib.Marshaller.StringToPtrGStrdup (type);
IntPtr raw_ret = g_content_type_get_symbolic_icon(native_type);
GLib.IIcon ret = GLib.IconAdapter.GetObject (raw_ret, false);
GLib.Marshaller.Free (native_type);
return ret;
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate IntPtr d_g_content_type_guess(IntPtr filename, byte[] data, UIntPtr n_data, out bool result_uncertain);
static d_g_content_type_guess g_content_type_guess = FuncLoader.LoadFunction<d_g_content_type_guess>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_content_type_guess"));
public static string Guess(string filename, byte[] data, out bool result_uncertain) {
IntPtr native_filename = GLib.Marshaller.StringToPtrGStrdup (filename);
IntPtr raw_ret = g_content_type_guess(native_filename, data, new UIntPtr ((ulong) (data == null ? 0 : data.Length)), out result_uncertain);
string ret = GLib.Marshaller.PtrToStringGFree(raw_ret);
GLib.Marshaller.Free (native_filename);
return ret;
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate IntPtr d_g_content_type_guess_for_tree(IntPtr root);
static d_g_content_type_guess_for_tree g_content_type_guess_for_tree = FuncLoader.LoadFunction<d_g_content_type_guess_for_tree>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_content_type_guess_for_tree"));
public static string GuessForTree(GLib.IFile root) {
IntPtr raw_ret = g_content_type_guess_for_tree(root == null ? IntPtr.Zero : ((root is GLib.Object) ? (root as GLib.Object).Handle : (root as GLib.FileAdapter).Handle));
string ret = GLib.Marshaller.PtrToStringGFree(raw_ret);
return ret;
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate bool d_g_content_type_is_a(IntPtr type, IntPtr supertype);
static d_g_content_type_is_a g_content_type_is_a = FuncLoader.LoadFunction<d_g_content_type_is_a>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_content_type_is_a"));
public static bool IsA(string type, string supertype) {
IntPtr native_type = GLib.Marshaller.StringToPtrGStrdup (type);
IntPtr native_supertype = GLib.Marshaller.StringToPtrGStrdup (supertype);
bool raw_ret = g_content_type_is_a(native_type, native_supertype);
bool ret = raw_ret;
GLib.Marshaller.Free (native_type);
GLib.Marshaller.Free (native_supertype);
return ret;
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate bool d_g_content_type_is_unknown(IntPtr type);
static d_g_content_type_is_unknown g_content_type_is_unknown = FuncLoader.LoadFunction<d_g_content_type_is_unknown>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_content_type_is_unknown"));
public static bool IsUnknown(string type) {
IntPtr native_type = GLib.Marshaller.StringToPtrGStrdup (type);
bool raw_ret = g_content_type_is_unknown(native_type);
bool ret = raw_ret;
GLib.Marshaller.Free (native_type);
return ret;
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate IntPtr d_g_content_types_get_registered();
static d_g_content_types_get_registered g_content_types_get_registered = FuncLoader.LoadFunction<d_g_content_types_get_registered>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_content_types_get_registered"));
public static string[] Registered {
get {
IntPtr raw_ret = g_content_types_get_registered();
string[] ret = GLib.Marshaller.ListPtrToArray<string, string> (raw_ret, true, true);
return ret;
}
}
#endregion
}
}

View File

@@ -0,0 +1,177 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace GLib {
using System;
using System.Runtime.InteropServices;
#region Autogenerated code
public partial class ConverterAdapter : GLib.GInterfaceAdapter, GLib.IConverter {
[StructLayout (LayoutKind.Sequential)]
struct GConverterIface {
public ConvertNativeDelegate Convert;
public ResetNativeDelegate Reset;
}
static GConverterIface iface;
static ConverterAdapter ()
{
GLib.GType.Register (_gtype, typeof (ConverterAdapter));
iface.Convert = new ConvertNativeDelegate (Convert_cb);
iface.Reset = new ResetNativeDelegate (Reset_cb);
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate int ConvertNativeDelegate (IntPtr inst, IntPtr inbuf, UIntPtr inbuf_size, IntPtr outbuf, UIntPtr outbuf_size, int flags, out UIntPtr bytes_read, out UIntPtr bytes_written, out IntPtr error);
static int Convert_cb (IntPtr inst, IntPtr inbuf, UIntPtr inbuf_size, IntPtr outbuf, UIntPtr outbuf_size, int flags, out UIntPtr bytes_read, out UIntPtr bytes_written, out IntPtr error)
{
error = IntPtr.Zero;
try {
IConverterImplementor __obj = GLib.Object.GetObject (inst, false) as IConverterImplementor;
GLib.ConverterResult __result;
ulong mybytes_read;
ulong mybytes_written;
__result = __obj.Convert (inbuf, (ulong) inbuf_size, outbuf, (ulong) outbuf_size, (GLib.ConverterFlags) flags, out mybytes_read, out mybytes_written);
bytes_read = new UIntPtr (mybytes_read);
bytes_written = new UIntPtr (mybytes_written);
return (int) __result;
} catch (Exception e) {
GLib.ExceptionManager.RaiseUnhandledException (e, true);
// NOTREACHED: above call does not return.
throw;
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate void ResetNativeDelegate (IntPtr inst);
static void Reset_cb (IntPtr inst)
{
try {
IConverterImplementor __obj = GLib.Object.GetObject (inst, false) as IConverterImplementor;
__obj.Reset ();
} catch (Exception e) {
GLib.ExceptionManager.RaiseUnhandledException (e, false);
}
}
static int class_offset = 2 * IntPtr.Size;
static void Initialize (IntPtr ptr, IntPtr data)
{
IntPtr ifaceptr = new IntPtr (ptr.ToInt64 () + class_offset);
GConverterIface native_iface = (GConverterIface) Marshal.PtrToStructure (ifaceptr, typeof (GConverterIface));
native_iface.Convert = iface.Convert;
native_iface.Reset = iface.Reset;
Marshal.StructureToPtr (native_iface, ifaceptr, false);
}
GLib.Object implementor;
public ConverterAdapter ()
{
InitHandler = new GLib.GInterfaceInitHandler (Initialize);
}
public ConverterAdapter (IConverterImplementor implementor)
{
if (implementor == null)
throw new ArgumentNullException ("implementor");
else if (!(implementor is GLib.Object))
throw new ArgumentException ("implementor must be a subclass of GLib.Object");
this.implementor = implementor as GLib.Object;
}
public ConverterAdapter (IntPtr handle)
{
if (!_gtype.IsInstance (handle))
throw new ArgumentException ("The gobject doesn't implement the GInterface of this adapter", "handle");
implementor = GLib.Object.GetObject (handle);
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate IntPtr d_g_converter_get_type();
static d_g_converter_get_type g_converter_get_type = FuncLoader.LoadFunction<d_g_converter_get_type>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_converter_get_type"));
private static GLib.GType _gtype = new GLib.GType (g_converter_get_type ());
public static GLib.GType GType {
get {
return _gtype;
}
}
public override GLib.GType GInterfaceGType {
get {
return _gtype;
}
}
public override IntPtr Handle {
get {
return implementor.Handle;
}
}
public IntPtr OwnedHandle {
get {
return implementor.OwnedHandle;
}
}
public static IConverter GetObject (IntPtr handle, bool owned)
{
GLib.Object obj = GLib.Object.GetObject (handle, owned);
return GetObject (obj);
}
public static IConverter GetObject (GLib.Object obj)
{
if (obj == null)
return null;
else if (obj is IConverterImplementor)
return new ConverterAdapter (obj as IConverterImplementor);
else if (obj as IConverter == null)
return new ConverterAdapter (obj.Handle);
else
return obj as IConverter;
}
public IConverterImplementor Implementor {
get {
return implementor as IConverterImplementor;
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate int d_g_converter_convert(IntPtr raw, IntPtr inbuf, UIntPtr inbuf_size, IntPtr outbuf, UIntPtr outbuf_size, int flags, out UIntPtr bytes_read, out UIntPtr bytes_written, out IntPtr error);
static d_g_converter_convert g_converter_convert = FuncLoader.LoadFunction<d_g_converter_convert>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_converter_convert"));
public GLib.ConverterResult Convert(IntPtr inbuf, ulong inbuf_size, IntPtr outbuf, ulong outbuf_size, GLib.ConverterFlags flags, out ulong bytes_read, out ulong bytes_written) {
UIntPtr native_bytes_read;
UIntPtr native_bytes_written;
IntPtr error = IntPtr.Zero;
int raw_ret = g_converter_convert(Handle, inbuf, new UIntPtr (inbuf_size), outbuf, new UIntPtr (outbuf_size), (int) flags, out native_bytes_read, out native_bytes_written, out error);
GLib.ConverterResult ret = (GLib.ConverterResult) raw_ret;
bytes_read = (ulong) native_bytes_read;
bytes_written = (ulong) native_bytes_written;
if (error != IntPtr.Zero) throw new GLib.GException (error);
return ret;
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate void d_g_converter_reset(IntPtr raw);
static d_g_converter_reset g_converter_reset = FuncLoader.LoadFunction<d_g_converter_reset>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_converter_reset"));
public void Reset() {
g_converter_reset(Handle);
}
#endregion
}
}

View File

@@ -0,0 +1,31 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace GLib {
using System;
using System.Runtime.InteropServices;
#region Autogenerated code
[Flags]
[GLib.GType (typeof (GLib.ConverterFlagsGType))]
public enum ConverterFlags {
NoFlags,
InputAtEnd = 1 << 0,
Flush = 1 << 1,
}
internal class ConverterFlagsGType {
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate IntPtr d_g_converter_flags_get_type();
static d_g_converter_flags_get_type g_converter_flags_get_type = FuncLoader.LoadFunction<d_g_converter_flags_get_type>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_converter_flags_get_type"));
public static GLib.GType GType {
get {
return new GLib.GType (g_converter_flags_get_type ());
}
}
}
#endregion
}

View File

@@ -0,0 +1,147 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace GLib {
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.InteropServices;
using static GLib.AbiStructExtension;
#region Autogenerated code
public partial class ConverterInputStream : GLib.FilterInputStream {
public ConverterInputStream (IntPtr raw) : base(raw) {}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate IntPtr d_g_converter_input_stream_new(IntPtr base_stream, IntPtr converter);
static d_g_converter_input_stream_new g_converter_input_stream_new = FuncLoader.LoadFunction<d_g_converter_input_stream_new>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_converter_input_stream_new"));
public ConverterInputStream (GLib.InputStream base_stream, GLib.IConverter converter) : base (IntPtr.Zero)
{
if (GetType () != typeof (ConverterInputStream)) {
var vals = new List<GLib.Value> ();
var names = new List<string> ();
if (base_stream != null) {
names.Add ("base_stream");
vals.Add (new GLib.Value (base_stream));
}
if (converter != null) {
names.Add ("converter");
vals.Add (new GLib.Value (converter));
}
CreateNativeObject (names.ToArray (), vals.ToArray ());
return;
}
Raw = g_converter_input_stream_new(base_stream == null ? IntPtr.Zero : base_stream.Handle, converter == null ? IntPtr.Zero : ((converter is GLib.Object) ? (converter as GLib.Object).Handle : (converter as GLib.ConverterAdapter).Handle));
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate IntPtr d_g_converter_input_stream_get_converter(IntPtr raw);
static d_g_converter_input_stream_get_converter g_converter_input_stream_get_converter = FuncLoader.LoadFunction<d_g_converter_input_stream_get_converter>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_converter_input_stream_get_converter"));
[GLib.Property ("converter")]
public GLib.IConverter Converter {
get {
IntPtr raw_ret = g_converter_input_stream_get_converter(Handle);
GLib.IConverter ret = GLib.ConverterAdapter.GetObject (raw_ret, false);
return ret;
}
}
// Internal representation of the wrapped structure ABI.
static GLib.AbiStruct _class_abi = null;
static public unsafe new GLib.AbiStruct class_abi {
get {
if (_class_abi == null)
_class_abi = new GLib.AbiStruct (new List<GLib.AbiField>{
new GLib.AbiField("_g_reserved1"
, GLib.FilterInputStream.class_abi.Fields
, (uint) sizeof( IntPtr ) // _g_reserved1
, null
, "_g_reserved2"
, (uint) sizeof(IntPtr)
, 0
),
new GLib.AbiField("_g_reserved2"
, -1
, (uint) sizeof( IntPtr ) // _g_reserved2
, "_g_reserved1"
, "_g_reserved3"
, (uint) sizeof(IntPtr)
, 0
),
new GLib.AbiField("_g_reserved3"
, -1
, (uint) sizeof( IntPtr ) // _g_reserved3
, "_g_reserved2"
, "_g_reserved4"
, (uint) sizeof(IntPtr)
, 0
),
new GLib.AbiField("_g_reserved4"
, -1
, (uint) sizeof( IntPtr ) // _g_reserved4
, "_g_reserved3"
, "_g_reserved5"
, (uint) sizeof(IntPtr)
, 0
),
new GLib.AbiField("_g_reserved5"
, -1
, (uint) sizeof( IntPtr ) // _g_reserved5
, "_g_reserved4"
, null
, (uint) sizeof(IntPtr)
, 0
),
});
return _class_abi;
}
}
// End of the ABI representation.
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate IntPtr d_g_converter_input_stream_get_type();
static d_g_converter_input_stream_get_type g_converter_input_stream_get_type = FuncLoader.LoadFunction<d_g_converter_input_stream_get_type>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_converter_input_stream_get_type"));
public static new GLib.GType GType {
get {
IntPtr raw_ret = g_converter_input_stream_get_type();
GLib.GType ret = new GLib.GType(raw_ret);
return ret;
}
}
// Internal representation of the wrapped structure ABI.
static GLib.AbiStruct _abi_info = null;
static public unsafe new GLib.AbiStruct abi_info {
get {
if (_abi_info == null)
_abi_info = new GLib.AbiStruct (new List<GLib.AbiField>{
new GLib.AbiField("priv"
, GLib.FilterInputStream.abi_info.Fields
, (uint) sizeof( IntPtr ) // priv
, null
, null
, (uint) sizeof(IntPtr)
, 0
),
});
return _abi_info;
}
}
// End of the ABI representation.
#endregion
}
}

View File

@@ -0,0 +1,147 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace GLib {
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.InteropServices;
using static GLib.AbiStructExtension;
#region Autogenerated code
public partial class ConverterOutputStream : GLib.FilterOutputStream {
public ConverterOutputStream (IntPtr raw) : base(raw) {}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate IntPtr d_g_converter_output_stream_new(IntPtr base_stream, IntPtr converter);
static d_g_converter_output_stream_new g_converter_output_stream_new = FuncLoader.LoadFunction<d_g_converter_output_stream_new>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_converter_output_stream_new"));
public ConverterOutputStream (GLib.OutputStream base_stream, GLib.IConverter converter) : base (IntPtr.Zero)
{
if (GetType () != typeof (ConverterOutputStream)) {
var vals = new List<GLib.Value> ();
var names = new List<string> ();
if (base_stream != null) {
names.Add ("base_stream");
vals.Add (new GLib.Value (base_stream));
}
if (converter != null) {
names.Add ("converter");
vals.Add (new GLib.Value (converter));
}
CreateNativeObject (names.ToArray (), vals.ToArray ());
return;
}
Raw = g_converter_output_stream_new(base_stream == null ? IntPtr.Zero : base_stream.Handle, converter == null ? IntPtr.Zero : ((converter is GLib.Object) ? (converter as GLib.Object).Handle : (converter as GLib.ConverterAdapter).Handle));
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate IntPtr d_g_converter_output_stream_get_converter(IntPtr raw);
static d_g_converter_output_stream_get_converter g_converter_output_stream_get_converter = FuncLoader.LoadFunction<d_g_converter_output_stream_get_converter>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_converter_output_stream_get_converter"));
[GLib.Property ("converter")]
public GLib.IConverter Converter {
get {
IntPtr raw_ret = g_converter_output_stream_get_converter(Handle);
GLib.IConverter ret = GLib.ConverterAdapter.GetObject (raw_ret, false);
return ret;
}
}
// Internal representation of the wrapped structure ABI.
static GLib.AbiStruct _class_abi = null;
static public unsafe new GLib.AbiStruct class_abi {
get {
if (_class_abi == null)
_class_abi = new GLib.AbiStruct (new List<GLib.AbiField>{
new GLib.AbiField("_g_reserved1"
, GLib.FilterOutputStream.class_abi.Fields
, (uint) sizeof( IntPtr ) // _g_reserved1
, null
, "_g_reserved2"
, (uint) sizeof(IntPtr)
, 0
),
new GLib.AbiField("_g_reserved2"
, -1
, (uint) sizeof( IntPtr ) // _g_reserved2
, "_g_reserved1"
, "_g_reserved3"
, (uint) sizeof(IntPtr)
, 0
),
new GLib.AbiField("_g_reserved3"
, -1
, (uint) sizeof( IntPtr ) // _g_reserved3
, "_g_reserved2"
, "_g_reserved4"
, (uint) sizeof(IntPtr)
, 0
),
new GLib.AbiField("_g_reserved4"
, -1
, (uint) sizeof( IntPtr ) // _g_reserved4
, "_g_reserved3"
, "_g_reserved5"
, (uint) sizeof(IntPtr)
, 0
),
new GLib.AbiField("_g_reserved5"
, -1
, (uint) sizeof( IntPtr ) // _g_reserved5
, "_g_reserved4"
, null
, (uint) sizeof(IntPtr)
, 0
),
});
return _class_abi;
}
}
// End of the ABI representation.
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate IntPtr d_g_converter_output_stream_get_type();
static d_g_converter_output_stream_get_type g_converter_output_stream_get_type = FuncLoader.LoadFunction<d_g_converter_output_stream_get_type>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_converter_output_stream_get_type"));
public static new GLib.GType GType {
get {
IntPtr raw_ret = g_converter_output_stream_get_type();
GLib.GType ret = new GLib.GType(raw_ret);
return ret;
}
}
// Internal representation of the wrapped structure ABI.
static GLib.AbiStruct _abi_info = null;
static public unsafe new GLib.AbiStruct abi_info {
get {
if (_abi_info == null)
_abi_info = new GLib.AbiStruct (new List<GLib.AbiField>{
new GLib.AbiField("priv"
, GLib.FilterOutputStream.abi_info.Fields
, (uint) sizeof( IntPtr ) // priv
, null
, null
, (uint) sizeof(IntPtr)
, 0
),
});
return _abi_info;
}
}
// End of the ABI representation.
#endregion
}
}

View File

@@ -0,0 +1,31 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace GLib {
using System;
using System.Runtime.InteropServices;
#region Autogenerated code
[GLib.GType (typeof (GLib.ConverterResultGType))]
public enum ConverterResult {
Error,
Converted = 1,
Finished = 2,
Flushed = 3,
}
internal class ConverterResultGType {
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate IntPtr d_g_converter_result_get_type();
static d_g_converter_result_get_type g_converter_result_get_type = FuncLoader.LoadFunction<d_g_converter_result_get_type>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_converter_result_get_type"));
public static GLib.GType GType {
get {
return new GLib.GType (g_converter_result_get_type ());
}
}
}
#endregion
}

View File

@@ -0,0 +1,114 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace GLib {
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.InteropServices;
using static GLib.AbiStructExtension;
#region Autogenerated code
public partial class Credentials : GLib.Object {
public Credentials (IntPtr raw) : base(raw) {}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate IntPtr d_g_credentials_new();
static d_g_credentials_new g_credentials_new = FuncLoader.LoadFunction<d_g_credentials_new>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_credentials_new"));
public Credentials () : base (IntPtr.Zero)
{
if (GetType () != typeof (Credentials)) {
CreateNativeObject (Array.Empty<string> (), Array.Empty<GLib.Value> ());
return;
}
Raw = g_credentials_new();
}
// Internal representation of the wrapped structure ABI.
static GLib.AbiStruct _class_abi = null;
static public unsafe new GLib.AbiStruct class_abi {
get {
if (_class_abi == null)
_class_abi = new GLib.AbiStruct (GLib.Object.class_abi.Fields);
return _class_abi;
}
}
// End of the ABI representation.
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate IntPtr d_g_credentials_get_native(IntPtr raw, int native_type);
static d_g_credentials_get_native g_credentials_get_native = FuncLoader.LoadFunction<d_g_credentials_get_native>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_credentials_get_native"));
public IntPtr GetNative(GLib.CredentialsType native_type) {
IntPtr raw_ret = g_credentials_get_native(Handle, (int) native_type);
IntPtr ret = raw_ret;
return ret;
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate IntPtr d_g_credentials_get_type();
static d_g_credentials_get_type g_credentials_get_type = FuncLoader.LoadFunction<d_g_credentials_get_type>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_credentials_get_type"));
public static new GLib.GType GType {
get {
IntPtr raw_ret = g_credentials_get_type();
GLib.GType ret = new GLib.GType(raw_ret);
return ret;
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate bool d_g_credentials_is_same_user(IntPtr raw, IntPtr other_credentials, out IntPtr error);
static d_g_credentials_is_same_user g_credentials_is_same_user = FuncLoader.LoadFunction<d_g_credentials_is_same_user>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_credentials_is_same_user"));
public unsafe bool IsSameUser(GLib.Credentials other_credentials) {
IntPtr error = IntPtr.Zero;
bool raw_ret = g_credentials_is_same_user(Handle, other_credentials == null ? IntPtr.Zero : other_credentials.Handle, out error);
bool ret = raw_ret;
if (error != IntPtr.Zero) throw new GLib.GException (error);
return ret;
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate void d_g_credentials_set_native(IntPtr raw, int native_type, IntPtr native);
static d_g_credentials_set_native g_credentials_set_native = FuncLoader.LoadFunction<d_g_credentials_set_native>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_credentials_set_native"));
public void SetNative(GLib.CredentialsType native_type, IntPtr native) {
g_credentials_set_native(Handle, (int) native_type, native);
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate IntPtr d_g_credentials_to_string(IntPtr raw);
static d_g_credentials_to_string g_credentials_to_string = FuncLoader.LoadFunction<d_g_credentials_to_string>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_credentials_to_string"));
public override string ToString() {
IntPtr raw_ret = g_credentials_to_string(Handle);
string ret = GLib.Marshaller.PtrToStringGFree(raw_ret);
return ret;
}
// Internal representation of the wrapped structure ABI.
static GLib.AbiStruct _abi_info = null;
static public unsafe new GLib.AbiStruct abi_info {
get {
if (_abi_info == null)
_abi_info = new GLib.AbiStruct (GLib.Object.abi_info.Fields);
return _abi_info;
}
}
// End of the ABI representation.
#endregion
}
}

View File

@@ -0,0 +1,33 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace GLib {
using System;
using System.Runtime.InteropServices;
#region Autogenerated code
[GLib.GType (typeof (GLib.CredentialsTypeGType))]
public enum CredentialsType {
Invalid,
LinuxUcred,
FreebsdCmsgcred,
OpenbsdSockpeercred,
SolarisUcred,
NetbsdUnpcbid,
}
internal class CredentialsTypeGType {
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate IntPtr d_g_credentials_type_get_type();
static d_g_credentials_type_get_type g_credentials_type_get_type = FuncLoader.LoadFunction<d_g_credentials_type_get_type>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_credentials_type_get_type"));
public static GLib.GType GType {
get {
return new GLib.GType (g_credentials_type_get_type ());
}
}
}
#endregion
}

View File

@@ -0,0 +1,34 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace GLib {
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.InteropServices;
#region Autogenerated code
public partial class DBusActionGroup : GLib.Opaque {
public DBusActionGroup(IntPtr raw) : base(raw) {}
// Internal representation of the wrapped structure ABI.
static GLib.AbiStruct _abi_info = null;
static public unsafe GLib.AbiStruct abi_info {
get {
if (_abi_info == null)
_abi_info = new GLib.AbiStruct (new List<GLib.AbiField>{
});
return _abi_info;
}
}
// End of the ABI representation.
#endregion
}
}

View File

@@ -0,0 +1,34 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace GLib {
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.InteropServices;
#region Autogenerated code
public partial class DBusAnnotationInfo : GLib.Opaque {
public DBusAnnotationInfo(IntPtr raw) : base(raw) {}
// Internal representation of the wrapped structure ABI.
static GLib.AbiStruct _abi_info = null;
static public unsafe GLib.AbiStruct abi_info {
get {
if (_abi_info == null)
_abi_info = new GLib.AbiStruct (new List<GLib.AbiField>{
});
return _abi_info;
}
}
// End of the ABI representation.
#endregion
}
}

View File

@@ -0,0 +1,34 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace GLib {
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.InteropServices;
#region Autogenerated code
public partial class DBusArgInfo : GLib.Opaque {
public DBusArgInfo(IntPtr raw) : base(raw) {}
// Internal representation of the wrapped structure ABI.
static GLib.AbiStruct _abi_info = null;
static public unsafe GLib.AbiStruct abi_info {
get {
if (_abi_info == null)
_abi_info = new GLib.AbiStruct (new List<GLib.AbiField>{
});
return _abi_info;
}
}
// End of the ABI representation.
#endregion
}
}

View File

@@ -0,0 +1,34 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace GLib {
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.InteropServices;
#region Autogenerated code
public partial class DBusAuthObserver : GLib.Opaque {
public DBusAuthObserver(IntPtr raw) : base(raw) {}
// Internal representation of the wrapped structure ABI.
static GLib.AbiStruct _abi_info = null;
static public unsafe GLib.AbiStruct abi_info {
get {
if (_abi_info == null)
_abi_info = new GLib.AbiStruct (new List<GLib.AbiField>{
});
return _abi_info;
}
}
// End of the ABI representation.
#endregion
}
}

View File

@@ -0,0 +1,34 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace GLib {
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.InteropServices;
#region Autogenerated code
public partial class DBusAuthObserverClass : GLib.Opaque {
public DBusAuthObserverClass(IntPtr raw) : base(raw) {}
// Internal representation of the wrapped structure ABI.
static GLib.AbiStruct _abi_info = null;
static public unsafe GLib.AbiStruct abi_info {
get {
if (_abi_info == null)
_abi_info = new GLib.AbiStruct (new List<GLib.AbiField>{
});
return _abi_info;
}
}
// End of the ABI representation.
#endregion
}
}

View File

@@ -0,0 +1,18 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace GLib {
using System;
using System.Runtime.InteropServices;
#region Autogenerated code
[Flags]
public enum DBusCallFlags {
None,
NoAutoStart = 1 << 0,
AllowInteractiveAuthorization = 1 << 1,
}
#endregion
}

View File

@@ -0,0 +1,17 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace GLib {
using System;
using System.Runtime.InteropServices;
#region Autogenerated code
[Flags]
public enum DBusCapabilityFlags {
None,
UnixFdPassing = 1 << 0,
}
#endregion
}

View File

@@ -0,0 +1,78 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace GLib {
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.InteropServices;
#region Autogenerated code
public partial class DBusConnection : GLib.Opaque {
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate uint d_g_dbus_connection_export_action_group(IntPtr raw, IntPtr object_path, IntPtr action_group, out IntPtr error);
static d_g_dbus_connection_export_action_group g_dbus_connection_export_action_group = FuncLoader.LoadFunction<d_g_dbus_connection_export_action_group>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_dbus_connection_export_action_group"));
public unsafe uint ExportActionGroup(string object_path, GLib.IActionGroup action_group) {
IntPtr native_object_path = GLib.Marshaller.StringToPtrGStrdup (object_path);
IntPtr error = IntPtr.Zero;
uint raw_ret = g_dbus_connection_export_action_group(Handle, native_object_path, action_group == null ? IntPtr.Zero : ((action_group is GLib.Object) ? (action_group as GLib.Object).Handle : (action_group as GLib.ActionGroupAdapter).Handle), out error);
uint ret = raw_ret;
GLib.Marshaller.Free (native_object_path);
if (error != IntPtr.Zero) throw new GLib.GException (error);
return ret;
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate uint d_g_dbus_connection_export_menu_model(IntPtr raw, IntPtr object_path, IntPtr menu, out IntPtr error);
static d_g_dbus_connection_export_menu_model g_dbus_connection_export_menu_model = FuncLoader.LoadFunction<d_g_dbus_connection_export_menu_model>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_dbus_connection_export_menu_model"));
public unsafe uint ExportMenuModel(string object_path, GLib.MenuModel menu) {
IntPtr native_object_path = GLib.Marshaller.StringToPtrGStrdup (object_path);
IntPtr error = IntPtr.Zero;
uint raw_ret = g_dbus_connection_export_menu_model(Handle, native_object_path, menu == null ? IntPtr.Zero : menu.Handle, out error);
uint ret = raw_ret;
GLib.Marshaller.Free (native_object_path);
if (error != IntPtr.Zero) throw new GLib.GException (error);
return ret;
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate void d_g_dbus_connection_unexport_action_group(IntPtr raw, uint export_id);
static d_g_dbus_connection_unexport_action_group g_dbus_connection_unexport_action_group = FuncLoader.LoadFunction<d_g_dbus_connection_unexport_action_group>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_dbus_connection_unexport_action_group"));
public void UnexportActionGroup(uint export_id) {
g_dbus_connection_unexport_action_group(Handle, export_id);
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate void d_g_dbus_connection_unexport_menu_model(IntPtr raw, uint export_id);
static d_g_dbus_connection_unexport_menu_model g_dbus_connection_unexport_menu_model = FuncLoader.LoadFunction<d_g_dbus_connection_unexport_menu_model>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_dbus_connection_unexport_menu_model"));
public void UnexportMenuModel(uint export_id) {
g_dbus_connection_unexport_menu_model(Handle, export_id);
}
public DBusConnection(IntPtr raw) : base(raw) {}
// Internal representation of the wrapped structure ABI.
static GLib.AbiStruct _abi_info = null;
static public unsafe GLib.AbiStruct abi_info {
get {
if (_abi_info == null)
_abi_info = new GLib.AbiStruct (new List<GLib.AbiField>{
});
return _abi_info;
}
}
// End of the ABI representation.
#endregion
}
}

View File

@@ -0,0 +1,34 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace GLib {
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.InteropServices;
#region Autogenerated code
public partial class DBusConnectionClass : GLib.Opaque {
public DBusConnectionClass(IntPtr raw) : base(raw) {}
// Internal representation of the wrapped structure ABI.
static GLib.AbiStruct _abi_info = null;
static public unsafe GLib.AbiStruct abi_info {
get {
if (_abi_info == null)
_abi_info = new GLib.AbiStruct (new List<GLib.AbiField>{
});
return _abi_info;
}
}
// End of the ABI representation.
#endregion
}
}

View File

@@ -0,0 +1,21 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace GLib {
using System;
using System.Runtime.InteropServices;
#region Autogenerated code
[Flags]
public enum DBusConnectionFlags {
None,
AuthenticationClient = 1 << 0,
AuthenticationServer = 1 << 1,
AuthenticationAllowAnonymous = 1 << 2,
MessageBusConnection = 1 << 3,
DelayMessageProcessing = 1 << 4,
}
#endregion
}

View File

@@ -0,0 +1,59 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace GLib {
using System;
using System.Runtime.InteropServices;
#region Autogenerated code
public enum DBusError {
Failed,
NoMemory,
ServiceUnknown,
NameHasNoOwner,
NoReply,
IoError,
BadAddress,
NotSupported,
LimitsExceeded,
AccessDenied,
AuthFailed,
NoServer,
Timeout,
NoNetwork,
AddressInUse,
Disconnected,
InvalidArgs,
FileNotFound,
FileExists,
UnknownMethod,
TimedOut,
MatchRuleNotFound,
MatchRuleInvalid,
SpawnExecFailed,
SpawnForkFailed,
SpawnChildExited,
SpawnChildSignaled,
SpawnFailed,
SpawnSetupFailed,
SpawnConfigInvalid,
SpawnServiceInvalid,
SpawnServiceNotFound,
SpawnPermissionsInvalid,
SpawnFileInvalid,
SpawnNoMemory,
UnixProcessIdUnknown,
InvalidSignature,
InvalidFileContent,
SelinuxSecurityContextUnknown,
AdtAuditDataUnknown,
ObjectPathInUse,
UnknownObject,
UnknownInterface,
UnknownProperty,
PropertyReadOnly,
}
#endregion
}

View File

@@ -0,0 +1,34 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace GLib {
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.InteropServices;
#region Autogenerated code
public partial class DBusErrorEntry : GLib.Opaque {
public DBusErrorEntry(IntPtr raw) : base(raw) {}
// Internal representation of the wrapped structure ABI.
static GLib.AbiStruct _abi_info = null;
static public unsafe GLib.AbiStruct abi_info {
get {
if (_abi_info == null)
_abi_info = new GLib.AbiStruct (new List<GLib.AbiField>{
});
return _abi_info;
}
}
// End of the ABI representation.
#endregion
}
}

View File

@@ -0,0 +1,34 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace GLib {
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.InteropServices;
#region Autogenerated code
public partial class DBusInterface : GLib.Opaque {
public DBusInterface(IntPtr raw) : base(raw) {}
// Internal representation of the wrapped structure ABI.
static GLib.AbiStruct _abi_info = null;
static public unsafe GLib.AbiStruct abi_info {
get {
if (_abi_info == null)
_abi_info = new GLib.AbiStruct (new List<GLib.AbiField>{
});
return _abi_info;
}
}
// End of the ABI representation.
#endregion
}
}

View File

@@ -0,0 +1,34 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace GLib {
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.InteropServices;
#region Autogenerated code
public partial class DBusInterfaceInfo : GLib.Opaque {
public DBusInterfaceInfo(IntPtr raw) : base(raw) {}
// Internal representation of the wrapped structure ABI.
static GLib.AbiStruct _abi_info = null;
static public unsafe GLib.AbiStruct abi_info {
get {
if (_abi_info == null)
_abi_info = new GLib.AbiStruct (new List<GLib.AbiField>{
});
return _abi_info;
}
}
// End of the ABI representation.
#endregion
}
}

View File

@@ -0,0 +1,34 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace GLib {
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.InteropServices;
#region Autogenerated code
public partial class DBusInterfaceSkeleton : GLib.Opaque {
public DBusInterfaceSkeleton(IntPtr raw) : base(raw) {}
// Internal representation of the wrapped structure ABI.
static GLib.AbiStruct _abi_info = null;
static public unsafe GLib.AbiStruct abi_info {
get {
if (_abi_info == null)
_abi_info = new GLib.AbiStruct (new List<GLib.AbiField>{
});
return _abi_info;
}
}
// End of the ABI representation.
#endregion
}
}

View File

@@ -0,0 +1,17 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace GLib {
using System;
using System.Runtime.InteropServices;
#region Autogenerated code
[Flags]
public enum DBusInterfaceSkeletonFlags {
None,
HandleMethodInvocationsInThread = 1 << 0,
}
#endregion
}

View File

@@ -0,0 +1,34 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace GLib {
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.InteropServices;
#region Autogenerated code
public partial class DBusInterfaceVTable : GLib.Opaque {
public DBusInterfaceVTable(IntPtr raw) : base(raw) {}
// Internal representation of the wrapped structure ABI.
static GLib.AbiStruct _abi_info = null;
static public unsafe GLib.AbiStruct abi_info {
get {
if (_abi_info == null)
_abi_info = new GLib.AbiStruct (new List<GLib.AbiField>{
});
return _abi_info;
}
}
// End of the ABI representation.
#endregion
}
}

View File

@@ -0,0 +1,34 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace GLib {
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.InteropServices;
#region Autogenerated code
public partial class DBusMenuGroup : GLib.Opaque {
public DBusMenuGroup(IntPtr raw) : base(raw) {}
// Internal representation of the wrapped structure ABI.
static GLib.AbiStruct _abi_info = null;
static public unsafe GLib.AbiStruct abi_info {
get {
if (_abi_info == null)
_abi_info = new GLib.AbiStruct (new List<GLib.AbiField>{
});
return _abi_info;
}
}
// End of the ABI representation.
#endregion
}
}

View File

@@ -0,0 +1,34 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace GLib {
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.InteropServices;
#region Autogenerated code
public partial class DBusMenuPath : GLib.Opaque {
public DBusMenuPath(IntPtr raw) : base(raw) {}
// Internal representation of the wrapped structure ABI.
static GLib.AbiStruct _abi_info = null;
static public unsafe GLib.AbiStruct abi_info {
get {
if (_abi_info == null)
_abi_info = new GLib.AbiStruct (new List<GLib.AbiField>{
});
return _abi_info;
}
}
// End of the ABI representation.
#endregion
}
}

View File

@@ -0,0 +1,34 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace GLib {
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.InteropServices;
#region Autogenerated code
public partial class DBusMessage : GLib.Opaque {
public DBusMessage(IntPtr raw) : base(raw) {}
// Internal representation of the wrapped structure ABI.
static GLib.AbiStruct _abi_info = null;
static public unsafe GLib.AbiStruct abi_info {
get {
if (_abi_info == null)
_abi_info = new GLib.AbiStruct (new List<GLib.AbiField>{
});
return _abi_info;
}
}
// End of the ABI representation.
#endregion
}
}

View File

@@ -0,0 +1,16 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace GLib {
using System;
using System.Runtime.InteropServices;
#region Autogenerated code
public enum DBusMessageByteOrder {
BigEndian = 'B',
LittleEndian = 'l',
}
#endregion
}

View File

@@ -0,0 +1,34 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace GLib {
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.InteropServices;
#region Autogenerated code
public partial class DBusMessageClass : GLib.Opaque {
public DBusMessageClass(IntPtr raw) : base(raw) {}
// Internal representation of the wrapped structure ABI.
static GLib.AbiStruct _abi_info = null;
static public unsafe GLib.AbiStruct abi_info {
get {
if (_abi_info == null)
_abi_info = new GLib.AbiStruct (new List<GLib.AbiField>{
});
return _abi_info;
}
}
// End of the ABI representation.
#endregion
}
}

View File

@@ -0,0 +1,19 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace GLib {
using System;
using System.Runtime.InteropServices;
#region Autogenerated code
[Flags]
public enum DBusMessageFlags {
None,
NoReplyExpected = 1 << 0,
NoAutoStart = 1 << 1,
AllowInteractiveAuthorization = 1 << 2,
}
#endregion
}

View File

@@ -0,0 +1,24 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace GLib {
using System;
using System.Runtime.InteropServices;
#region Autogenerated code
public enum DBusMessageHeaderField {
Invalid,
Path,
Interface,
Member,
ErrorName,
ReplySerial,
Destination,
Sender,
Signature,
NumUnixFds,
}
#endregion
}

View File

@@ -0,0 +1,19 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace GLib {
using System;
using System.Runtime.InteropServices;
#region Autogenerated code
public enum DBusMessageType {
Invalid,
MethodCall,
MethodReturn,
Error,
Signal,
}
#endregion
}

View File

@@ -0,0 +1,34 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace GLib {
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.InteropServices;
#region Autogenerated code
public partial class DBusMethodInfo : GLib.Opaque {
public DBusMethodInfo(IntPtr raw) : base(raw) {}
// Internal representation of the wrapped structure ABI.
static GLib.AbiStruct _abi_info = null;
static public unsafe GLib.AbiStruct abi_info {
get {
if (_abi_info == null)
_abi_info = new GLib.AbiStruct (new List<GLib.AbiField>{
});
return _abi_info;
}
}
// End of the ABI representation.
#endregion
}
}

View File

@@ -0,0 +1,34 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace GLib {
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.InteropServices;
#region Autogenerated code
public partial class DBusMethodInvocation : GLib.Opaque {
public DBusMethodInvocation(IntPtr raw) : base(raw) {}
// Internal representation of the wrapped structure ABI.
static GLib.AbiStruct _abi_info = null;
static public unsafe GLib.AbiStruct abi_info {
get {
if (_abi_info == null)
_abi_info = new GLib.AbiStruct (new List<GLib.AbiField>{
});
return _abi_info;
}
}
// End of the ABI representation.
#endregion
}
}

View File

@@ -0,0 +1,34 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace GLib {
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.InteropServices;
#region Autogenerated code
public partial class DBusMethodInvocationClass : GLib.Opaque {
public DBusMethodInvocationClass(IntPtr raw) : base(raw) {}
// Internal representation of the wrapped structure ABI.
static GLib.AbiStruct _abi_info = null;
static public unsafe GLib.AbiStruct abi_info {
get {
if (_abi_info == null)
_abi_info = new GLib.AbiStruct (new List<GLib.AbiField>{
});
return _abi_info;
}
}
// End of the ABI representation.
#endregion
}
}

View File

@@ -0,0 +1,34 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace GLib {
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.InteropServices;
#region Autogenerated code
public partial class DBusNodeInfo : GLib.Opaque {
public DBusNodeInfo(IntPtr raw) : base(raw) {}
// Internal representation of the wrapped structure ABI.
static GLib.AbiStruct _abi_info = null;
static public unsafe GLib.AbiStruct abi_info {
get {
if (_abi_info == null)
_abi_info = new GLib.AbiStruct (new List<GLib.AbiField>{
});
return _abi_info;
}
}
// End of the ABI representation.
#endregion
}
}

View File

@@ -0,0 +1,34 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace GLib {
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.InteropServices;
#region Autogenerated code
public partial class DBusObject : GLib.Opaque {
public DBusObject(IntPtr raw) : base(raw) {}
// Internal representation of the wrapped structure ABI.
static GLib.AbiStruct _abi_info = null;
static public unsafe GLib.AbiStruct abi_info {
get {
if (_abi_info == null)
_abi_info = new GLib.AbiStruct (new List<GLib.AbiField>{
});
return _abi_info;
}
}
// End of the ABI representation.
#endregion
}
}

View File

@@ -0,0 +1,34 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace GLib {
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.InteropServices;
#region Autogenerated code
public partial class DBusObjectManager : GLib.Opaque {
public DBusObjectManager(IntPtr raw) : base(raw) {}
// Internal representation of the wrapped structure ABI.
static GLib.AbiStruct _abi_info = null;
static public unsafe GLib.AbiStruct abi_info {
get {
if (_abi_info == null)
_abi_info = new GLib.AbiStruct (new List<GLib.AbiField>{
});
return _abi_info;
}
}
// End of the ABI representation.
#endregion
}
}

View File

@@ -0,0 +1,34 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace GLib {
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.InteropServices;
#region Autogenerated code
public partial class DBusObjectManagerClient : GLib.Opaque {
public DBusObjectManagerClient(IntPtr raw) : base(raw) {}
// Internal representation of the wrapped structure ABI.
static GLib.AbiStruct _abi_info = null;
static public unsafe GLib.AbiStruct abi_info {
get {
if (_abi_info == null)
_abi_info = new GLib.AbiStruct (new List<GLib.AbiField>{
});
return _abi_info;
}
}
// End of the ABI representation.
#endregion
}
}

View File

@@ -0,0 +1,17 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace GLib {
using System;
using System.Runtime.InteropServices;
#region Autogenerated code
[Flags]
public enum DBusObjectManagerClientFlags {
None,
DoNotAutoStart = 1 << 0,
}
#endregion
}

View File

@@ -0,0 +1,34 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace GLib {
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.InteropServices;
#region Autogenerated code
public partial class DBusObjectManagerServer : GLib.Opaque {
public DBusObjectManagerServer(IntPtr raw) : base(raw) {}
// Internal representation of the wrapped structure ABI.
static GLib.AbiStruct _abi_info = null;
static public unsafe GLib.AbiStruct abi_info {
get {
if (_abi_info == null)
_abi_info = new GLib.AbiStruct (new List<GLib.AbiField>{
});
return _abi_info;
}
}
// End of the ABI representation.
#endregion
}
}

View File

@@ -0,0 +1,34 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace GLib {
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.InteropServices;
#region Autogenerated code
public partial class DBusObjectProxy : GLib.Opaque {
public DBusObjectProxy(IntPtr raw) : base(raw) {}
// Internal representation of the wrapped structure ABI.
static GLib.AbiStruct _abi_info = null;
static public unsafe GLib.AbiStruct abi_info {
get {
if (_abi_info == null)
_abi_info = new GLib.AbiStruct (new List<GLib.AbiField>{
});
return _abi_info;
}
}
// End of the ABI representation.
#endregion
}
}

View File

@@ -0,0 +1,34 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace GLib {
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.InteropServices;
#region Autogenerated code
public partial class DBusObjectSkeleton : GLib.Opaque {
public DBusObjectSkeleton(IntPtr raw) : base(raw) {}
// Internal representation of the wrapped structure ABI.
static GLib.AbiStruct _abi_info = null;
static public unsafe GLib.AbiStruct abi_info {
get {
if (_abi_info == null)
_abi_info = new GLib.AbiStruct (new List<GLib.AbiField>{
});
return _abi_info;
}
}
// End of the ABI representation.
#endregion
}
}

View File

@@ -0,0 +1,34 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace GLib {
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.InteropServices;
#region Autogenerated code
public partial class DBusPropertyInfo : GLib.Opaque {
public DBusPropertyInfo(IntPtr raw) : base(raw) {}
// Internal representation of the wrapped structure ABI.
static GLib.AbiStruct _abi_info = null;
static public unsafe GLib.AbiStruct abi_info {
get {
if (_abi_info == null)
_abi_info = new GLib.AbiStruct (new List<GLib.AbiField>{
});
return _abi_info;
}
}
// End of the ABI representation.
#endregion
}
}

View File

@@ -0,0 +1,18 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace GLib {
using System;
using System.Runtime.InteropServices;
#region Autogenerated code
[Flags]
public enum DBusPropertyInfoFlags {
None,
Readable = 1 << 0,
Writable = 1 << 1,
}
#endregion
}

View File

@@ -0,0 +1,34 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace GLib {
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.InteropServices;
#region Autogenerated code
public partial class DBusProxy : GLib.Opaque {
public DBusProxy(IntPtr raw) : base(raw) {}
// Internal representation of the wrapped structure ABI.
static GLib.AbiStruct _abi_info = null;
static public unsafe GLib.AbiStruct abi_info {
get {
if (_abi_info == null)
_abi_info = new GLib.AbiStruct (new List<GLib.AbiField>{
});
return _abi_info;
}
}
// End of the ABI representation.
#endregion
}
}

View File

@@ -0,0 +1,21 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace GLib {
using System;
using System.Runtime.InteropServices;
#region Autogenerated code
[Flags]
public enum DBusProxyFlags {
None,
DoNotLoadProperties = 1 << 0,
DoNotConnectSignals = 1 << 1,
DoNotAutoStart = 1 << 2,
GetInvalidatedProperties = 1 << 3,
DoNotAutoStartAtConstruction = 1 << 4,
}
#endregion
}

View File

@@ -0,0 +1,10 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace GLib {
using System;
public delegate GLib.GType DBusProxyTypeFunc(GLib.DBusObjectManagerClient manager, string object_path, string interface_name);
}

View File

@@ -0,0 +1,17 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace GLib {
using System;
using System.Runtime.InteropServices;
#region Autogenerated code
[Flags]
public enum DBusSendMessageFlags {
None,
PreserveSerial = 1 << 0,
}
#endregion
}

View File

@@ -0,0 +1,34 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace GLib {
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.InteropServices;
#region Autogenerated code
public partial class DBusServer : GLib.Opaque {
public DBusServer(IntPtr raw) : base(raw) {}
// Internal representation of the wrapped structure ABI.
static GLib.AbiStruct _abi_info = null;
static public unsafe GLib.AbiStruct abi_info {
get {
if (_abi_info == null)
_abi_info = new GLib.AbiStruct (new List<GLib.AbiField>{
});
return _abi_info;
}
}
// End of the ABI representation.
#endregion
}
}

View File

@@ -0,0 +1,34 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace GLib {
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.InteropServices;
#region Autogenerated code
public partial class DBusServerClass : GLib.Opaque {
public DBusServerClass(IntPtr raw) : base(raw) {}
// Internal representation of the wrapped structure ABI.
static GLib.AbiStruct _abi_info = null;
static public unsafe GLib.AbiStruct abi_info {
get {
if (_abi_info == null)
_abi_info = new GLib.AbiStruct (new List<GLib.AbiField>{
});
return _abi_info;
}
}
// End of the ABI representation.
#endregion
}
}

View File

@@ -0,0 +1,18 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace GLib {
using System;
using System.Runtime.InteropServices;
#region Autogenerated code
[Flags]
public enum DBusServerFlags {
None,
RunInThread = 1 << 0,
AuthenticationAllowAnonymous = 1 << 1,
}
#endregion
}

View File

@@ -0,0 +1,19 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace GLib {
using System;
using System.Runtime.InteropServices;
#region Autogenerated code
[Flags]
public enum DBusSignalFlags {
None,
NoMatchRule = 1 << 0,
MatchArg0Namespace = 1 << 1,
MatchArg0Path = 1 << 2,
}
#endregion
}

View File

@@ -0,0 +1,34 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace GLib {
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.InteropServices;
#region Autogenerated code
public partial class DBusSignalInfo : GLib.Opaque {
public DBusSignalInfo(IntPtr raw) : base(raw) {}
// Internal representation of the wrapped structure ABI.
static GLib.AbiStruct _abi_info = null;
static public unsafe GLib.AbiStruct abi_info {
get {
if (_abi_info == null)
_abi_info = new GLib.AbiStruct (new List<GLib.AbiField>{
});
return _abi_info;
}
}
// End of the ABI representation.
#endregion
}
}

View File

@@ -0,0 +1,17 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace GLib {
using System;
using System.Runtime.InteropServices;
#region Autogenerated code
[Flags]
public enum DBusSubtreeFlags {
None,
DispatchToUnenumeratedNodes = 1 << 0,
}
#endregion
}

View File

@@ -0,0 +1,34 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace GLib {
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.InteropServices;
#region Autogenerated code
public partial class DBusSubtreeVTable : GLib.Opaque {
public DBusSubtreeVTable(IntPtr raw) : base(raw) {}
// Internal representation of the wrapped structure ABI.
static GLib.AbiStruct _abi_info = null;
static public unsafe GLib.AbiStruct abi_info {
get {
if (_abi_info == null)
_abi_info = new GLib.AbiStruct (new List<GLib.AbiField>{
});
return _abi_info;
}
}
// End of the ABI representation.
#endregion
}
}

View File

@@ -0,0 +1,404 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace GLib {
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.InteropServices;
using static GLib.AbiStructExtension;
#region Autogenerated code
public partial class DataInputStream : GLib.BufferedInputStream {
public DataInputStream (IntPtr raw) : base(raw) {}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate IntPtr d_g_data_input_stream_new(IntPtr base_stream);
static d_g_data_input_stream_new g_data_input_stream_new = FuncLoader.LoadFunction<d_g_data_input_stream_new>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_data_input_stream_new"));
public DataInputStream (GLib.InputStream base_stream) : base (IntPtr.Zero)
{
if (GetType () != typeof (DataInputStream)) {
var vals = new List<GLib.Value> ();
var names = new List<string> ();
if (base_stream != null) {
names.Add ("base_stream");
vals.Add (new GLib.Value (base_stream));
}
CreateNativeObject (names.ToArray (), vals.ToArray ());
return;
}
Raw = g_data_input_stream_new(base_stream == null ? IntPtr.Zero : base_stream.Handle);
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate int d_g_data_input_stream_get_byte_order(IntPtr raw);
static d_g_data_input_stream_get_byte_order g_data_input_stream_get_byte_order = FuncLoader.LoadFunction<d_g_data_input_stream_get_byte_order>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_data_input_stream_get_byte_order"));
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate void d_g_data_input_stream_set_byte_order(IntPtr raw, int order);
static d_g_data_input_stream_set_byte_order g_data_input_stream_set_byte_order = FuncLoader.LoadFunction<d_g_data_input_stream_set_byte_order>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_data_input_stream_set_byte_order"));
[GLib.Property ("byte-order")]
public GLib.DataStreamByteOrder ByteOrder {
get {
int raw_ret = g_data_input_stream_get_byte_order(Handle);
GLib.DataStreamByteOrder ret = (GLib.DataStreamByteOrder) raw_ret;
return ret;
}
set {
g_data_input_stream_set_byte_order(Handle, (int) value);
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate int d_g_data_input_stream_get_newline_type(IntPtr raw);
static d_g_data_input_stream_get_newline_type g_data_input_stream_get_newline_type = FuncLoader.LoadFunction<d_g_data_input_stream_get_newline_type>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_data_input_stream_get_newline_type"));
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate void d_g_data_input_stream_set_newline_type(IntPtr raw, int type);
static d_g_data_input_stream_set_newline_type g_data_input_stream_set_newline_type = FuncLoader.LoadFunction<d_g_data_input_stream_set_newline_type>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_data_input_stream_set_newline_type"));
[GLib.Property ("newline-type")]
public GLib.DataStreamNewlineType NewlineType {
get {
int raw_ret = g_data_input_stream_get_newline_type(Handle);
GLib.DataStreamNewlineType ret = (GLib.DataStreamNewlineType) raw_ret;
return ret;
}
set {
g_data_input_stream_set_newline_type(Handle, (int) value);
}
}
// Internal representation of the wrapped structure ABI.
static GLib.AbiStruct _class_abi = null;
static public unsafe new GLib.AbiStruct class_abi {
get {
if (_class_abi == null)
_class_abi = new GLib.AbiStruct (new List<GLib.AbiField>{
new GLib.AbiField("_g_reserved1"
, GLib.BufferedInputStream.class_abi.Fields
, (uint) sizeof( IntPtr ) // _g_reserved1
, null
, "_g_reserved2"
, (uint) sizeof(IntPtr)
, 0
),
new GLib.AbiField("_g_reserved2"
, -1
, (uint) sizeof( IntPtr ) // _g_reserved2
, "_g_reserved1"
, "_g_reserved3"
, (uint) sizeof(IntPtr)
, 0
),
new GLib.AbiField("_g_reserved3"
, -1
, (uint) sizeof( IntPtr ) // _g_reserved3
, "_g_reserved2"
, "_g_reserved4"
, (uint) sizeof(IntPtr)
, 0
),
new GLib.AbiField("_g_reserved4"
, -1
, (uint) sizeof( IntPtr ) // _g_reserved4
, "_g_reserved3"
, "_g_reserved5"
, (uint) sizeof(IntPtr)
, 0
),
new GLib.AbiField("_g_reserved5"
, -1
, (uint) sizeof( IntPtr ) // _g_reserved5
, "_g_reserved4"
, null
, (uint) sizeof(IntPtr)
, 0
),
});
return _class_abi;
}
}
// End of the ABI representation.
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate IntPtr d_g_data_input_stream_get_type();
static d_g_data_input_stream_get_type g_data_input_stream_get_type = FuncLoader.LoadFunction<d_g_data_input_stream_get_type>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_data_input_stream_get_type"));
public static new GLib.GType GType {
get {
IntPtr raw_ret = g_data_input_stream_get_type();
GLib.GType ret = new GLib.GType(raw_ret);
return ret;
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate byte d_g_data_input_stream_read_byte(IntPtr raw, IntPtr cancellable, out IntPtr error);
static d_g_data_input_stream_read_byte g_data_input_stream_read_byte = FuncLoader.LoadFunction<d_g_data_input_stream_read_byte>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_data_input_stream_read_byte"));
public unsafe new byte ReadByte(GLib.Cancellable cancellable) {
IntPtr error = IntPtr.Zero;
byte raw_ret = g_data_input_stream_read_byte(Handle, cancellable == null ? IntPtr.Zero : cancellable.Handle, out error);
byte ret = raw_ret;
if (error != IntPtr.Zero) throw new GLib.GException (error);
return ret;
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate short d_g_data_input_stream_read_int16(IntPtr raw, IntPtr cancellable, out IntPtr error);
static d_g_data_input_stream_read_int16 g_data_input_stream_read_int16 = FuncLoader.LoadFunction<d_g_data_input_stream_read_int16>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_data_input_stream_read_int16"));
public unsafe short ReadInt16(GLib.Cancellable cancellable) {
IntPtr error = IntPtr.Zero;
short raw_ret = g_data_input_stream_read_int16(Handle, cancellable == null ? IntPtr.Zero : cancellable.Handle, out error);
short ret = raw_ret;
if (error != IntPtr.Zero) throw new GLib.GException (error);
return ret;
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate int d_g_data_input_stream_read_int32(IntPtr raw, IntPtr cancellable, out IntPtr error);
static d_g_data_input_stream_read_int32 g_data_input_stream_read_int32 = FuncLoader.LoadFunction<d_g_data_input_stream_read_int32>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_data_input_stream_read_int32"));
public unsafe int ReadInt32(GLib.Cancellable cancellable) {
IntPtr error = IntPtr.Zero;
int raw_ret = g_data_input_stream_read_int32(Handle, cancellable == null ? IntPtr.Zero : cancellable.Handle, out error);
int ret = raw_ret;
if (error != IntPtr.Zero) throw new GLib.GException (error);
return ret;
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate long d_g_data_input_stream_read_int64(IntPtr raw, IntPtr cancellable, out IntPtr error);
static d_g_data_input_stream_read_int64 g_data_input_stream_read_int64 = FuncLoader.LoadFunction<d_g_data_input_stream_read_int64>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_data_input_stream_read_int64"));
public unsafe long ReadInt64(GLib.Cancellable cancellable) {
IntPtr error = IntPtr.Zero;
long raw_ret = g_data_input_stream_read_int64(Handle, cancellable == null ? IntPtr.Zero : cancellable.Handle, out error);
long ret = raw_ret;
if (error != IntPtr.Zero) throw new GLib.GException (error);
return ret;
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate IntPtr d_g_data_input_stream_read_line(IntPtr raw, out UIntPtr length, IntPtr cancellable, out IntPtr error);
static d_g_data_input_stream_read_line g_data_input_stream_read_line = FuncLoader.LoadFunction<d_g_data_input_stream_read_line>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_data_input_stream_read_line"));
public unsafe string ReadLine(out ulong length, GLib.Cancellable cancellable) {
UIntPtr native_length;
IntPtr error = IntPtr.Zero;
IntPtr raw_ret = g_data_input_stream_read_line(Handle, out native_length, cancellable == null ? IntPtr.Zero : cancellable.Handle, out error);
string ret = GLib.Marshaller.PtrToStringGFree(raw_ret);
length = (ulong) native_length;
if (error != IntPtr.Zero) throw new GLib.GException (error);
return ret;
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate void d_g_data_input_stream_read_line_async(IntPtr raw, int io_priority, IntPtr cancellable, GLibSharp.AsyncReadyCallbackNative cb, IntPtr user_data);
static d_g_data_input_stream_read_line_async g_data_input_stream_read_line_async = FuncLoader.LoadFunction<d_g_data_input_stream_read_line_async>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_data_input_stream_read_line_async"));
public void ReadLineAsync(int io_priority, GLib.Cancellable cancellable, GLib.AsyncReadyCallback cb) {
GLibSharp.AsyncReadyCallbackWrapper cb_wrapper = new GLibSharp.AsyncReadyCallbackWrapper (cb);
cb_wrapper.PersistUntilCalled ();
g_data_input_stream_read_line_async(Handle, io_priority, cancellable == null ? IntPtr.Zero : cancellable.Handle, cb_wrapper.NativeDelegate, IntPtr.Zero);
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate IntPtr d_g_data_input_stream_read_line_finish(IntPtr raw, IntPtr result, out UIntPtr length, out IntPtr error);
static d_g_data_input_stream_read_line_finish g_data_input_stream_read_line_finish = FuncLoader.LoadFunction<d_g_data_input_stream_read_line_finish>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_data_input_stream_read_line_finish"));
public unsafe string ReadLineFinish(GLib.IAsyncResult result, out ulong length) {
UIntPtr native_length;
IntPtr error = IntPtr.Zero;
IntPtr raw_ret = g_data_input_stream_read_line_finish(Handle, result == null ? IntPtr.Zero : ((result is GLib.Object) ? (result as GLib.Object).Handle : (result as GLib.AsyncResultAdapter).Handle), out native_length, out error);
string ret = GLib.Marshaller.PtrToStringGFree(raw_ret);
length = (ulong) native_length;
if (error != IntPtr.Zero) throw new GLib.GException (error);
return ret;
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate IntPtr d_g_data_input_stream_read_line_finish_utf8(IntPtr raw, IntPtr result, out UIntPtr length, out IntPtr error);
static d_g_data_input_stream_read_line_finish_utf8 g_data_input_stream_read_line_finish_utf8 = FuncLoader.LoadFunction<d_g_data_input_stream_read_line_finish_utf8>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_data_input_stream_read_line_finish_utf8"));
public unsafe string ReadLineFinishUtf8(GLib.IAsyncResult result, out ulong length) {
UIntPtr native_length;
IntPtr error = IntPtr.Zero;
IntPtr raw_ret = g_data_input_stream_read_line_finish_utf8(Handle, result == null ? IntPtr.Zero : ((result is GLib.Object) ? (result as GLib.Object).Handle : (result as GLib.AsyncResultAdapter).Handle), out native_length, out error);
string ret = GLib.Marshaller.PtrToStringGFree(raw_ret);
length = (ulong) native_length;
if (error != IntPtr.Zero) throw new GLib.GException (error);
return ret;
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate IntPtr d_g_data_input_stream_read_line_utf8(IntPtr raw, out UIntPtr length, IntPtr cancellable, out IntPtr error);
static d_g_data_input_stream_read_line_utf8 g_data_input_stream_read_line_utf8 = FuncLoader.LoadFunction<d_g_data_input_stream_read_line_utf8>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_data_input_stream_read_line_utf8"));
public unsafe string ReadLineUtf8(out ulong length, GLib.Cancellable cancellable) {
UIntPtr native_length;
IntPtr error = IntPtr.Zero;
IntPtr raw_ret = g_data_input_stream_read_line_utf8(Handle, out native_length, cancellable == null ? IntPtr.Zero : cancellable.Handle, out error);
string ret = GLib.Marshaller.PtrToStringGFree(raw_ret);
length = (ulong) native_length;
if (error != IntPtr.Zero) throw new GLib.GException (error);
return ret;
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate ushort d_g_data_input_stream_read_uint16(IntPtr raw, IntPtr cancellable, out IntPtr error);
static d_g_data_input_stream_read_uint16 g_data_input_stream_read_uint16 = FuncLoader.LoadFunction<d_g_data_input_stream_read_uint16>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_data_input_stream_read_uint16"));
public unsafe ushort ReadUint16(GLib.Cancellable cancellable) {
IntPtr error = IntPtr.Zero;
ushort raw_ret = g_data_input_stream_read_uint16(Handle, cancellable == null ? IntPtr.Zero : cancellable.Handle, out error);
ushort ret = raw_ret;
if (error != IntPtr.Zero) throw new GLib.GException (error);
return ret;
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate uint d_g_data_input_stream_read_uint32(IntPtr raw, IntPtr cancellable, out IntPtr error);
static d_g_data_input_stream_read_uint32 g_data_input_stream_read_uint32 = FuncLoader.LoadFunction<d_g_data_input_stream_read_uint32>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_data_input_stream_read_uint32"));
public unsafe uint ReadUint32(GLib.Cancellable cancellable) {
IntPtr error = IntPtr.Zero;
uint raw_ret = g_data_input_stream_read_uint32(Handle, cancellable == null ? IntPtr.Zero : cancellable.Handle, out error);
uint ret = raw_ret;
if (error != IntPtr.Zero) throw new GLib.GException (error);
return ret;
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate ulong d_g_data_input_stream_read_uint64(IntPtr raw, IntPtr cancellable, out IntPtr error);
static d_g_data_input_stream_read_uint64 g_data_input_stream_read_uint64 = FuncLoader.LoadFunction<d_g_data_input_stream_read_uint64>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_data_input_stream_read_uint64"));
public unsafe ulong ReadUint64(GLib.Cancellable cancellable) {
IntPtr error = IntPtr.Zero;
ulong raw_ret = g_data_input_stream_read_uint64(Handle, cancellable == null ? IntPtr.Zero : cancellable.Handle, out error);
ulong ret = raw_ret;
if (error != IntPtr.Zero) throw new GLib.GException (error);
return ret;
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate IntPtr d_g_data_input_stream_read_until(IntPtr raw, IntPtr stop_chars, out UIntPtr length, IntPtr cancellable, out IntPtr error);
static d_g_data_input_stream_read_until g_data_input_stream_read_until = FuncLoader.LoadFunction<d_g_data_input_stream_read_until>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_data_input_stream_read_until"));
public unsafe string ReadUntil(string stop_chars, out ulong length, GLib.Cancellable cancellable) {
IntPtr native_stop_chars = GLib.Marshaller.StringToPtrGStrdup (stop_chars);
UIntPtr native_length;
IntPtr error = IntPtr.Zero;
IntPtr raw_ret = g_data_input_stream_read_until(Handle, native_stop_chars, out native_length, cancellable == null ? IntPtr.Zero : cancellable.Handle, out error);
string ret = GLib.Marshaller.PtrToStringGFree(raw_ret);
GLib.Marshaller.Free (native_stop_chars);
length = (ulong) native_length;
if (error != IntPtr.Zero) throw new GLib.GException (error);
return ret;
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate void d_g_data_input_stream_read_until_async(IntPtr raw, IntPtr stop_chars, int io_priority, IntPtr cancellable, GLibSharp.AsyncReadyCallbackNative cb, IntPtr user_data);
static d_g_data_input_stream_read_until_async g_data_input_stream_read_until_async = FuncLoader.LoadFunction<d_g_data_input_stream_read_until_async>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_data_input_stream_read_until_async"));
public void ReadUntilAsync(string stop_chars, int io_priority, GLib.Cancellable cancellable, GLib.AsyncReadyCallback cb) {
IntPtr native_stop_chars = GLib.Marshaller.StringToPtrGStrdup (stop_chars);
GLibSharp.AsyncReadyCallbackWrapper cb_wrapper = new GLibSharp.AsyncReadyCallbackWrapper (cb);
cb_wrapper.PersistUntilCalled ();
g_data_input_stream_read_until_async(Handle, native_stop_chars, io_priority, cancellable == null ? IntPtr.Zero : cancellable.Handle, cb_wrapper.NativeDelegate, IntPtr.Zero);
GLib.Marshaller.Free (native_stop_chars);
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate IntPtr d_g_data_input_stream_read_until_finish(IntPtr raw, IntPtr result, out UIntPtr length, out IntPtr error);
static d_g_data_input_stream_read_until_finish g_data_input_stream_read_until_finish = FuncLoader.LoadFunction<d_g_data_input_stream_read_until_finish>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_data_input_stream_read_until_finish"));
public unsafe string ReadUntilFinish(GLib.IAsyncResult result, out ulong length) {
UIntPtr native_length;
IntPtr error = IntPtr.Zero;
IntPtr raw_ret = g_data_input_stream_read_until_finish(Handle, result == null ? IntPtr.Zero : ((result is GLib.Object) ? (result as GLib.Object).Handle : (result as GLib.AsyncResultAdapter).Handle), out native_length, out error);
string ret = GLib.Marshaller.PtrToStringGFree(raw_ret);
length = (ulong) native_length;
if (error != IntPtr.Zero) throw new GLib.GException (error);
return ret;
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate IntPtr d_g_data_input_stream_read_upto(IntPtr raw, IntPtr stop_chars, IntPtr stop_chars_len, out UIntPtr length, IntPtr cancellable, out IntPtr error);
static d_g_data_input_stream_read_upto g_data_input_stream_read_upto = FuncLoader.LoadFunction<d_g_data_input_stream_read_upto>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_data_input_stream_read_upto"));
public unsafe string ReadUpto(string stop_chars, out ulong length, GLib.Cancellable cancellable) {
IntPtr native_stop_chars = GLib.Marshaller.StringToPtrGStrdup (stop_chars);
UIntPtr native_length;
IntPtr error = IntPtr.Zero;
IntPtr raw_ret = g_data_input_stream_read_upto(Handle, native_stop_chars, new IntPtr ((long) System.Text.Encoding.UTF8.GetByteCount (stop_chars)), out native_length, cancellable == null ? IntPtr.Zero : cancellable.Handle, out error);
string ret = GLib.Marshaller.PtrToStringGFree(raw_ret);
GLib.Marshaller.Free (native_stop_chars);
length = (ulong) native_length;
if (error != IntPtr.Zero) throw new GLib.GException (error);
return ret;
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate void d_g_data_input_stream_read_upto_async(IntPtr raw, IntPtr stop_chars, IntPtr stop_chars_len, int io_priority, IntPtr cancellable, GLibSharp.AsyncReadyCallbackNative cb, IntPtr user_data);
static d_g_data_input_stream_read_upto_async g_data_input_stream_read_upto_async = FuncLoader.LoadFunction<d_g_data_input_stream_read_upto_async>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_data_input_stream_read_upto_async"));
public void ReadUptoAsync(string stop_chars, int io_priority, GLib.Cancellable cancellable, GLib.AsyncReadyCallback cb) {
IntPtr native_stop_chars = GLib.Marshaller.StringToPtrGStrdup (stop_chars);
GLibSharp.AsyncReadyCallbackWrapper cb_wrapper = new GLibSharp.AsyncReadyCallbackWrapper (cb);
cb_wrapper.PersistUntilCalled ();
g_data_input_stream_read_upto_async(Handle, native_stop_chars, new IntPtr ((long) System.Text.Encoding.UTF8.GetByteCount (stop_chars)), io_priority, cancellable == null ? IntPtr.Zero : cancellable.Handle, cb_wrapper.NativeDelegate, IntPtr.Zero);
GLib.Marshaller.Free (native_stop_chars);
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate IntPtr d_g_data_input_stream_read_upto_finish(IntPtr raw, IntPtr result, out UIntPtr length, out IntPtr error);
static d_g_data_input_stream_read_upto_finish g_data_input_stream_read_upto_finish = FuncLoader.LoadFunction<d_g_data_input_stream_read_upto_finish>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_data_input_stream_read_upto_finish"));
public unsafe string ReadUptoFinish(GLib.IAsyncResult result, out ulong length) {
UIntPtr native_length;
IntPtr error = IntPtr.Zero;
IntPtr raw_ret = g_data_input_stream_read_upto_finish(Handle, result == null ? IntPtr.Zero : ((result is GLib.Object) ? (result as GLib.Object).Handle : (result as GLib.AsyncResultAdapter).Handle), out native_length, out error);
string ret = GLib.Marshaller.PtrToStringGFree(raw_ret);
length = (ulong) native_length;
if (error != IntPtr.Zero) throw new GLib.GException (error);
return ret;
}
// Internal representation of the wrapped structure ABI.
static GLib.AbiStruct _abi_info = null;
static public unsafe new GLib.AbiStruct abi_info {
get {
if (_abi_info == null)
_abi_info = new GLib.AbiStruct (new List<GLib.AbiField>{
new GLib.AbiField("priv"
, GLib.BufferedInputStream.abi_info.Fields
, (uint) sizeof( IntPtr ) // priv
, null
, null
, (uint) sizeof(IntPtr)
, 0
),
});
return _abi_info;
}
}
// End of the ABI representation.
#endregion
}
}

View File

@@ -0,0 +1,306 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace GLib {
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.InteropServices;
using static GLib.AbiStructExtension;
#region Autogenerated code
public partial class DataOutputStream : GLib.FilterOutputStream, GLib.ISeekable {
public DataOutputStream (IntPtr raw) : base(raw) {}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate IntPtr d_g_data_output_stream_new(IntPtr base_stream);
static d_g_data_output_stream_new g_data_output_stream_new = FuncLoader.LoadFunction<d_g_data_output_stream_new>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_data_output_stream_new"));
public DataOutputStream (GLib.OutputStream base_stream) : base (IntPtr.Zero)
{
if (GetType () != typeof (DataOutputStream)) {
var vals = new List<GLib.Value> ();
var names = new List<string> ();
if (base_stream != null) {
names.Add ("base_stream");
vals.Add (new GLib.Value (base_stream));
}
CreateNativeObject (names.ToArray (), vals.ToArray ());
return;
}
Raw = g_data_output_stream_new(base_stream == null ? IntPtr.Zero : base_stream.Handle);
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate int d_g_data_output_stream_get_byte_order(IntPtr raw);
static d_g_data_output_stream_get_byte_order g_data_output_stream_get_byte_order = FuncLoader.LoadFunction<d_g_data_output_stream_get_byte_order>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_data_output_stream_get_byte_order"));
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate void d_g_data_output_stream_set_byte_order(IntPtr raw, int order);
static d_g_data_output_stream_set_byte_order g_data_output_stream_set_byte_order = FuncLoader.LoadFunction<d_g_data_output_stream_set_byte_order>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_data_output_stream_set_byte_order"));
[GLib.Property ("byte-order")]
public GLib.DataStreamByteOrder ByteOrder {
get {
int raw_ret = g_data_output_stream_get_byte_order(Handle);
GLib.DataStreamByteOrder ret = (GLib.DataStreamByteOrder) raw_ret;
return ret;
}
set {
g_data_output_stream_set_byte_order(Handle, (int) value);
}
}
// Internal representation of the wrapped structure ABI.
static GLib.AbiStruct _class_abi = null;
static public unsafe new GLib.AbiStruct class_abi {
get {
if (_class_abi == null)
_class_abi = new GLib.AbiStruct (new List<GLib.AbiField>{
new GLib.AbiField("_g_reserved1"
, GLib.FilterOutputStream.class_abi.Fields
, (uint) sizeof( IntPtr ) // _g_reserved1
, null
, "_g_reserved2"
, (uint) sizeof(IntPtr)
, 0
),
new GLib.AbiField("_g_reserved2"
, -1
, (uint) sizeof( IntPtr ) // _g_reserved2
, "_g_reserved1"
, "_g_reserved3"
, (uint) sizeof(IntPtr)
, 0
),
new GLib.AbiField("_g_reserved3"
, -1
, (uint) sizeof( IntPtr ) // _g_reserved3
, "_g_reserved2"
, "_g_reserved4"
, (uint) sizeof(IntPtr)
, 0
),
new GLib.AbiField("_g_reserved4"
, -1
, (uint) sizeof( IntPtr ) // _g_reserved4
, "_g_reserved3"
, "_g_reserved5"
, (uint) sizeof(IntPtr)
, 0
),
new GLib.AbiField("_g_reserved5"
, -1
, (uint) sizeof( IntPtr ) // _g_reserved5
, "_g_reserved4"
, null
, (uint) sizeof(IntPtr)
, 0
),
});
return _class_abi;
}
}
// End of the ABI representation.
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate IntPtr d_g_data_output_stream_get_type();
static d_g_data_output_stream_get_type g_data_output_stream_get_type = FuncLoader.LoadFunction<d_g_data_output_stream_get_type>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_data_output_stream_get_type"));
public static new GLib.GType GType {
get {
IntPtr raw_ret = g_data_output_stream_get_type();
GLib.GType ret = new GLib.GType(raw_ret);
return ret;
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate bool d_g_data_output_stream_put_byte(IntPtr raw, byte data, IntPtr cancellable, out IntPtr error);
static d_g_data_output_stream_put_byte g_data_output_stream_put_byte = FuncLoader.LoadFunction<d_g_data_output_stream_put_byte>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_data_output_stream_put_byte"));
public unsafe bool PutByte(byte data, GLib.Cancellable cancellable) {
IntPtr error = IntPtr.Zero;
bool raw_ret = g_data_output_stream_put_byte(Handle, data, cancellable == null ? IntPtr.Zero : cancellable.Handle, out error);
bool ret = raw_ret;
if (error != IntPtr.Zero) throw new GLib.GException (error);
return ret;
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate bool d_g_data_output_stream_put_int16(IntPtr raw, short data, IntPtr cancellable, out IntPtr error);
static d_g_data_output_stream_put_int16 g_data_output_stream_put_int16 = FuncLoader.LoadFunction<d_g_data_output_stream_put_int16>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_data_output_stream_put_int16"));
public unsafe bool PutInt16(short data, GLib.Cancellable cancellable) {
IntPtr error = IntPtr.Zero;
bool raw_ret = g_data_output_stream_put_int16(Handle, data, cancellable == null ? IntPtr.Zero : cancellable.Handle, out error);
bool ret = raw_ret;
if (error != IntPtr.Zero) throw new GLib.GException (error);
return ret;
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate bool d_g_data_output_stream_put_int32(IntPtr raw, int data, IntPtr cancellable, out IntPtr error);
static d_g_data_output_stream_put_int32 g_data_output_stream_put_int32 = FuncLoader.LoadFunction<d_g_data_output_stream_put_int32>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_data_output_stream_put_int32"));
public unsafe bool PutInt32(int data, GLib.Cancellable cancellable) {
IntPtr error = IntPtr.Zero;
bool raw_ret = g_data_output_stream_put_int32(Handle, data, cancellable == null ? IntPtr.Zero : cancellable.Handle, out error);
bool ret = raw_ret;
if (error != IntPtr.Zero) throw new GLib.GException (error);
return ret;
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate bool d_g_data_output_stream_put_int64(IntPtr raw, long data, IntPtr cancellable, out IntPtr error);
static d_g_data_output_stream_put_int64 g_data_output_stream_put_int64 = FuncLoader.LoadFunction<d_g_data_output_stream_put_int64>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_data_output_stream_put_int64"));
public unsafe bool PutInt64(long data, GLib.Cancellable cancellable) {
IntPtr error = IntPtr.Zero;
bool raw_ret = g_data_output_stream_put_int64(Handle, data, cancellable == null ? IntPtr.Zero : cancellable.Handle, out error);
bool ret = raw_ret;
if (error != IntPtr.Zero) throw new GLib.GException (error);
return ret;
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate bool d_g_data_output_stream_put_string(IntPtr raw, IntPtr str, IntPtr cancellable, out IntPtr error);
static d_g_data_output_stream_put_string g_data_output_stream_put_string = FuncLoader.LoadFunction<d_g_data_output_stream_put_string>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_data_output_stream_put_string"));
public unsafe bool PutString(string str, GLib.Cancellable cancellable) {
IntPtr native_str = GLib.Marshaller.StringToPtrGStrdup (str);
IntPtr error = IntPtr.Zero;
bool raw_ret = g_data_output_stream_put_string(Handle, native_str, cancellable == null ? IntPtr.Zero : cancellable.Handle, out error);
bool ret = raw_ret;
GLib.Marshaller.Free (native_str);
if (error != IntPtr.Zero) throw new GLib.GException (error);
return ret;
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate bool d_g_data_output_stream_put_uint16(IntPtr raw, ushort data, IntPtr cancellable, out IntPtr error);
static d_g_data_output_stream_put_uint16 g_data_output_stream_put_uint16 = FuncLoader.LoadFunction<d_g_data_output_stream_put_uint16>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_data_output_stream_put_uint16"));
public unsafe bool PutUint16(ushort data, GLib.Cancellable cancellable) {
IntPtr error = IntPtr.Zero;
bool raw_ret = g_data_output_stream_put_uint16(Handle, data, cancellable == null ? IntPtr.Zero : cancellable.Handle, out error);
bool ret = raw_ret;
if (error != IntPtr.Zero) throw new GLib.GException (error);
return ret;
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate bool d_g_data_output_stream_put_uint32(IntPtr raw, uint data, IntPtr cancellable, out IntPtr error);
static d_g_data_output_stream_put_uint32 g_data_output_stream_put_uint32 = FuncLoader.LoadFunction<d_g_data_output_stream_put_uint32>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_data_output_stream_put_uint32"));
public unsafe bool PutUint32(uint data, GLib.Cancellable cancellable) {
IntPtr error = IntPtr.Zero;
bool raw_ret = g_data_output_stream_put_uint32(Handle, data, cancellable == null ? IntPtr.Zero : cancellable.Handle, out error);
bool ret = raw_ret;
if (error != IntPtr.Zero) throw new GLib.GException (error);
return ret;
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate bool d_g_data_output_stream_put_uint64(IntPtr raw, ulong data, IntPtr cancellable, out IntPtr error);
static d_g_data_output_stream_put_uint64 g_data_output_stream_put_uint64 = FuncLoader.LoadFunction<d_g_data_output_stream_put_uint64>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_data_output_stream_put_uint64"));
public unsafe bool PutUint64(ulong data, GLib.Cancellable cancellable) {
IntPtr error = IntPtr.Zero;
bool raw_ret = g_data_output_stream_put_uint64(Handle, data, cancellable == null ? IntPtr.Zero : cancellable.Handle, out error);
bool ret = raw_ret;
if (error != IntPtr.Zero) throw new GLib.GException (error);
return ret;
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate bool d_g_seekable_can_seek(IntPtr raw);
static d_g_seekable_can_seek g_seekable_can_seek = FuncLoader.LoadFunction<d_g_seekable_can_seek>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_seekable_can_seek"));
public bool CanSeek {
get {
bool raw_ret = g_seekable_can_seek(Handle);
bool ret = raw_ret;
return ret;
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate bool d_g_seekable_can_truncate(IntPtr raw);
static d_g_seekable_can_truncate g_seekable_can_truncate = FuncLoader.LoadFunction<d_g_seekable_can_truncate>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_seekable_can_truncate"));
public bool CanTruncate() {
bool raw_ret = g_seekable_can_truncate(Handle);
bool ret = raw_ret;
return ret;
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate bool d_g_seekable_seek(IntPtr raw, long offset, int type, IntPtr cancellable, out IntPtr error);
static d_g_seekable_seek g_seekable_seek = FuncLoader.LoadFunction<d_g_seekable_seek>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_seekable_seek"));
public bool Seek(long offset, GLib.SeekType type, GLib.Cancellable cancellable) {
IntPtr error = IntPtr.Zero;
bool raw_ret = g_seekable_seek(Handle, offset, (int) type, cancellable == null ? IntPtr.Zero : cancellable.Handle, out error);
bool ret = raw_ret;
if (error != IntPtr.Zero) throw new GLib.GException (error);
return ret;
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate long d_g_seekable_tell(IntPtr raw);
static d_g_seekable_tell g_seekable_tell = FuncLoader.LoadFunction<d_g_seekable_tell>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_seekable_tell"));
public long Position {
get {
long raw_ret = g_seekable_tell(Handle);
long ret = raw_ret;
return ret;
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate bool d_g_seekable_truncate(IntPtr raw, long offset, IntPtr cancellable, out IntPtr error);
static d_g_seekable_truncate g_seekable_truncate = FuncLoader.LoadFunction<d_g_seekable_truncate>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_seekable_truncate"));
public bool Truncate(long offset, GLib.Cancellable cancellable) {
IntPtr error = IntPtr.Zero;
bool raw_ret = g_seekable_truncate(Handle, offset, cancellable == null ? IntPtr.Zero : cancellable.Handle, out error);
bool ret = raw_ret;
if (error != IntPtr.Zero) throw new GLib.GException (error);
return ret;
}
// Internal representation of the wrapped structure ABI.
static GLib.AbiStruct _abi_info = null;
static public unsafe new GLib.AbiStruct abi_info {
get {
if (_abi_info == null)
_abi_info = new GLib.AbiStruct (new List<GLib.AbiField>{
new GLib.AbiField("priv"
, GLib.FilterOutputStream.abi_info.Fields
, (uint) sizeof( IntPtr ) // priv
, null
, null
, (uint) sizeof(IntPtr)
, 0
),
});
return _abi_info;
}
}
// End of the ABI representation.
#endregion
}
}

View File

@@ -0,0 +1,30 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace GLib {
using System;
using System.Runtime.InteropServices;
#region Autogenerated code
[GLib.GType (typeof (GLib.DataStreamByteOrderGType))]
public enum DataStreamByteOrder {
BigEndian,
LittleEndian,
HostEndian,
}
internal class DataStreamByteOrderGType {
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate IntPtr d_g_data_stream_byte_order_get_type();
static d_g_data_stream_byte_order_get_type g_data_stream_byte_order_get_type = FuncLoader.LoadFunction<d_g_data_stream_byte_order_get_type>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_data_stream_byte_order_get_type"));
public static GLib.GType GType {
get {
return new GLib.GType (g_data_stream_byte_order_get_type ());
}
}
}
#endregion
}

View File

@@ -0,0 +1,31 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace GLib {
using System;
using System.Runtime.InteropServices;
#region Autogenerated code
[GLib.GType (typeof (GLib.DataStreamNewlineTypeGType))]
public enum DataStreamNewlineType {
Lf,
Cr,
CrLf,
Any,
}
internal class DataStreamNewlineTypeGType {
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate IntPtr d_g_data_stream_newline_type_get_type();
static d_g_data_stream_newline_type_get_type g_data_stream_newline_type_get_type = FuncLoader.LoadFunction<d_g_data_stream_newline_type_get_type>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_data_stream_newline_type_get_type"));
public static GLib.GType GType {
get {
return new GLib.GType (g_data_stream_newline_type_get_type ());
}
}
}
#endregion
}

View File

@@ -0,0 +1,277 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace GLib {
using System;
using System.Runtime.InteropServices;
#region Autogenerated code
public partial class DatagramBasedAdapter : GLib.GInterfaceAdapter, GLib.IDatagramBased {
[StructLayout (LayoutKind.Sequential)]
struct GDatagramBasedInterface {
public ReceiveMessagesNativeDelegate ReceiveMessages;
public SendMessagesNativeDelegate SendMessages;
public CreateSourceNativeDelegate CreateSource;
public ConditionCheckNativeDelegate ConditionCheck;
public ConditionWaitNativeDelegate ConditionWait;
}
static GDatagramBasedInterface iface;
static DatagramBasedAdapter ()
{
GLib.GType.Register (_gtype, typeof (DatagramBasedAdapter));
iface.ReceiveMessages = new ReceiveMessagesNativeDelegate (ReceiveMessages_cb);
iface.SendMessages = new SendMessagesNativeDelegate (SendMessages_cb);
iface.CreateSource = new CreateSourceNativeDelegate (CreateSource_cb);
iface.ConditionCheck = new ConditionCheckNativeDelegate (ConditionCheck_cb);
iface.ConditionWait = new ConditionWaitNativeDelegate (ConditionWait_cb);
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate int ReceiveMessagesNativeDelegate (IntPtr inst, IntPtr messages, uint num_messages, int flags, long timeout, IntPtr cancellable, out IntPtr error);
static int ReceiveMessages_cb (IntPtr inst, IntPtr messages, uint num_messages, int flags, long timeout, IntPtr cancellable, out IntPtr error)
{
error = IntPtr.Zero;
try {
IDatagramBasedImplementor __obj = GLib.Object.GetObject (inst, false) as IDatagramBasedImplementor;
int __result;
__result = __obj.ReceiveMessages (GLib.InputMessage.New (messages), num_messages, flags, timeout, GLib.Object.GetObject(cancellable) as GLib.Cancellable);
return __result;
} catch (Exception e) {
GLib.ExceptionManager.RaiseUnhandledException (e, true);
// NOTREACHED: above call does not return.
throw;
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate int SendMessagesNativeDelegate (IntPtr inst, IntPtr messages, uint num_messages, int flags, long timeout, IntPtr cancellable, out IntPtr error);
static int SendMessages_cb (IntPtr inst, IntPtr messages, uint num_messages, int flags, long timeout, IntPtr cancellable, out IntPtr error)
{
error = IntPtr.Zero;
try {
IDatagramBasedImplementor __obj = GLib.Object.GetObject (inst, false) as IDatagramBasedImplementor;
int __result;
__result = __obj.SendMessages (GLib.OutputMessage.New (messages), num_messages, flags, timeout, GLib.Object.GetObject(cancellable) as GLib.Cancellable);
return __result;
} catch (Exception e) {
GLib.ExceptionManager.RaiseUnhandledException (e, true);
// NOTREACHED: above call does not return.
throw;
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate IntPtr CreateSourceNativeDelegate (IntPtr inst, int condition, IntPtr cancellable);
static IntPtr CreateSource_cb (IntPtr inst, int condition, IntPtr cancellable)
{
try {
IDatagramBasedImplementor __obj = GLib.Object.GetObject (inst, false) as IDatagramBasedImplementor;
GLib.Source __result;
__result = __obj.CreateSource ((GLib.IOCondition) condition, GLib.Object.GetObject(cancellable) as GLib.Cancellable);
return __result == null ? IntPtr.Zero : __result.Handle;
} catch (Exception e) {
GLib.ExceptionManager.RaiseUnhandledException (e, true);
// NOTREACHED: above call does not return.
throw;
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate int ConditionCheckNativeDelegate (IntPtr inst, int condition);
static int ConditionCheck_cb (IntPtr inst, int condition)
{
try {
IDatagramBasedImplementor __obj = GLib.Object.GetObject (inst, false) as IDatagramBasedImplementor;
GLib.IOCondition __result;
__result = __obj.ConditionCheck ((GLib.IOCondition) condition);
return (int) __result;
} catch (Exception e) {
GLib.ExceptionManager.RaiseUnhandledException (e, true);
// NOTREACHED: above call does not return.
throw;
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate bool ConditionWaitNativeDelegate (IntPtr inst, int condition, long timeout, IntPtr cancellable, out IntPtr error);
static bool ConditionWait_cb (IntPtr inst, int condition, long timeout, IntPtr cancellable, out IntPtr error)
{
error = IntPtr.Zero;
try {
IDatagramBasedImplementor __obj = GLib.Object.GetObject (inst, false) as IDatagramBasedImplementor;
bool __result;
__result = __obj.ConditionWait ((GLib.IOCondition) condition, timeout, GLib.Object.GetObject(cancellable) as GLib.Cancellable);
return __result;
} catch (Exception e) {
GLib.ExceptionManager.RaiseUnhandledException (e, true);
// NOTREACHED: above call does not return.
throw;
}
}
static int class_offset = 2 * IntPtr.Size;
static void Initialize (IntPtr ptr, IntPtr data)
{
IntPtr ifaceptr = new IntPtr (ptr.ToInt64 () + class_offset);
GDatagramBasedInterface native_iface = (GDatagramBasedInterface) Marshal.PtrToStructure (ifaceptr, typeof (GDatagramBasedInterface));
native_iface.ReceiveMessages = iface.ReceiveMessages;
native_iface.SendMessages = iface.SendMessages;
native_iface.CreateSource = iface.CreateSource;
native_iface.ConditionCheck = iface.ConditionCheck;
native_iface.ConditionWait = iface.ConditionWait;
Marshal.StructureToPtr (native_iface, ifaceptr, false);
}
GLib.Object implementor;
public DatagramBasedAdapter ()
{
InitHandler = new GLib.GInterfaceInitHandler (Initialize);
}
public DatagramBasedAdapter (IDatagramBasedImplementor implementor)
{
if (implementor == null)
throw new ArgumentNullException ("implementor");
else if (!(implementor is GLib.Object))
throw new ArgumentException ("implementor must be a subclass of GLib.Object");
this.implementor = implementor as GLib.Object;
}
public DatagramBasedAdapter (IntPtr handle)
{
if (!_gtype.IsInstance (handle))
throw new ArgumentException ("The gobject doesn't implement the GInterface of this adapter", "handle");
implementor = GLib.Object.GetObject (handle);
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate IntPtr d_g_datagram_based_get_type();
static d_g_datagram_based_get_type g_datagram_based_get_type = FuncLoader.LoadFunction<d_g_datagram_based_get_type>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_datagram_based_get_type"));
private static GLib.GType _gtype = new GLib.GType (g_datagram_based_get_type ());
public static GLib.GType GType {
get {
return _gtype;
}
}
public override GLib.GType GInterfaceGType {
get {
return _gtype;
}
}
public override IntPtr Handle {
get {
return implementor.Handle;
}
}
public IntPtr OwnedHandle {
get {
return implementor.OwnedHandle;
}
}
public static IDatagramBased GetObject (IntPtr handle, bool owned)
{
GLib.Object obj = GLib.Object.GetObject (handle, owned);
return GetObject (obj);
}
public static IDatagramBased GetObject (GLib.Object obj)
{
if (obj == null)
return null;
else if (obj is IDatagramBasedImplementor)
return new DatagramBasedAdapter (obj as IDatagramBasedImplementor);
else if (obj as IDatagramBased == null)
return new DatagramBasedAdapter (obj.Handle);
else
return obj as IDatagramBased;
}
public IDatagramBasedImplementor Implementor {
get {
return implementor as IDatagramBasedImplementor;
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate int d_g_datagram_based_condition_check(IntPtr raw, int condition);
static d_g_datagram_based_condition_check g_datagram_based_condition_check = FuncLoader.LoadFunction<d_g_datagram_based_condition_check>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_datagram_based_condition_check"));
public GLib.IOCondition ConditionCheck(GLib.IOCondition condition) {
int raw_ret = g_datagram_based_condition_check(Handle, (int) condition);
GLib.IOCondition ret = (GLib.IOCondition) raw_ret;
return ret;
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate bool d_g_datagram_based_condition_wait(IntPtr raw, int condition, long timeout, IntPtr cancellable, out IntPtr error);
static d_g_datagram_based_condition_wait g_datagram_based_condition_wait = FuncLoader.LoadFunction<d_g_datagram_based_condition_wait>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_datagram_based_condition_wait"));
public bool ConditionWait(GLib.IOCondition condition, long timeout, GLib.Cancellable cancellable) {
IntPtr error = IntPtr.Zero;
bool raw_ret = g_datagram_based_condition_wait(Handle, (int) condition, timeout, cancellable == null ? IntPtr.Zero : cancellable.Handle, out error);
bool ret = raw_ret;
if (error != IntPtr.Zero) throw new GLib.GException (error);
return ret;
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate IntPtr d_g_datagram_based_create_source(IntPtr raw, int condition, IntPtr cancellable);
static d_g_datagram_based_create_source g_datagram_based_create_source = FuncLoader.LoadFunction<d_g_datagram_based_create_source>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_datagram_based_create_source"));
public GLib.Source CreateSource(GLib.IOCondition condition, GLib.Cancellable cancellable) {
IntPtr raw_ret = g_datagram_based_create_source(Handle, (int) condition, cancellable == null ? IntPtr.Zero : cancellable.Handle);
GLib.Source ret = new GLib.Source(raw_ret);
return ret;
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate int d_g_datagram_based_receive_messages(IntPtr raw, IntPtr messages, uint num_messages, int flags, long timeout, IntPtr cancellable, out IntPtr error);
static d_g_datagram_based_receive_messages g_datagram_based_receive_messages = FuncLoader.LoadFunction<d_g_datagram_based_receive_messages>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_datagram_based_receive_messages"));
public int ReceiveMessages(GLib.InputMessage messages, uint num_messages, int flags, long timeout, GLib.Cancellable cancellable) {
IntPtr native_messages = GLib.Marshaller.StructureToPtrAlloc (messages);
IntPtr error = IntPtr.Zero;
int raw_ret = g_datagram_based_receive_messages(Handle, native_messages, num_messages, flags, timeout, cancellable == null ? IntPtr.Zero : cancellable.Handle, out error);
int ret = raw_ret;
Marshal.FreeHGlobal (native_messages);
if (error != IntPtr.Zero) throw new GLib.GException (error);
return ret;
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate int d_g_datagram_based_send_messages(IntPtr raw, IntPtr messages, uint num_messages, int flags, long timeout, IntPtr cancellable, out IntPtr error);
static d_g_datagram_based_send_messages g_datagram_based_send_messages = FuncLoader.LoadFunction<d_g_datagram_based_send_messages>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_datagram_based_send_messages"));
public int SendMessages(GLib.OutputMessage messages, uint num_messages, int flags, long timeout, GLib.Cancellable cancellable) {
IntPtr native_messages = GLib.Marshaller.StructureToPtrAlloc (messages);
IntPtr error = IntPtr.Zero;
int raw_ret = g_datagram_based_send_messages(Handle, native_messages, num_messages, flags, timeout, cancellable == null ? IntPtr.Zero : cancellable.Handle, out error);
int ret = raw_ret;
Marshal.FreeHGlobal (native_messages);
if (error != IntPtr.Zero) throw new GLib.GException (error);
return ret;
}
#endregion
}
}

View File

@@ -0,0 +1,10 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace GLib {
using System;
public delegate bool DatagramBasedSourceFunc(GLib.IDatagramBased datagram_based, GLib.IOCondition condition);
}

View File

@@ -0,0 +1,401 @@
// This file was generated by the Gtk# code generator.
// Any changes made will be lost if regenerated.
namespace GLib {
using System;
using System.Runtime.InteropServices;
#region Autogenerated code
public partial class DriveAdapter : GLib.GInterfaceAdapter, GLib.IDrive {
GLib.Object implementor;
public DriveAdapter (IntPtr handle)
{
if (!_gtype.IsInstance (handle))
throw new ArgumentException ("The gobject doesn't implement the GInterface of this adapter", "handle");
implementor = GLib.Object.GetObject (handle);
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate IntPtr d_g_drive_get_type();
static d_g_drive_get_type g_drive_get_type = FuncLoader.LoadFunction<d_g_drive_get_type>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_drive_get_type"));
private static GLib.GType _gtype = new GLib.GType (g_drive_get_type ());
public static GLib.GType GType {
get {
return _gtype;
}
}
public override GLib.GType GInterfaceGType {
get {
return _gtype;
}
}
public override IntPtr Handle {
get {
return implementor.Handle;
}
}
public IntPtr OwnedHandle {
get {
return implementor.OwnedHandle;
}
}
public static IDrive GetObject (IntPtr handle, bool owned)
{
GLib.Object obj = GLib.Object.GetObject (handle, owned);
return GetObject (obj);
}
public static IDrive GetObject (GLib.Object obj)
{
if (obj == null)
return null;
else if (obj as IDrive == null)
return new DriveAdapter (obj.Handle);
else
return obj as IDrive;
}
[GLib.Signal("eject-button")]
public event System.EventHandler EjectButton {
add {
GLib.Object.GetObject (Handle).AddSignalHandler ("eject-button", value);
}
remove {
GLib.Object.GetObject (Handle).RemoveSignalHandler ("eject-button", value);
}
}
[GLib.Signal("changed")]
public event System.EventHandler Changed {
add {
GLib.Object.GetObject (Handle).AddSignalHandler ("changed", value);
}
remove {
GLib.Object.GetObject (Handle).RemoveSignalHandler ("changed", value);
}
}
[GLib.Signal("stop-button")]
public event System.EventHandler StopButton {
add {
GLib.Object.GetObject (Handle).AddSignalHandler ("stop-button", value);
}
remove {
GLib.Object.GetObject (Handle).RemoveSignalHandler ("stop-button", value);
}
}
[GLib.Signal("disconnected")]
public event System.EventHandler Disconnected {
add {
GLib.Object.GetObject (Handle).AddSignalHandler ("disconnected", value);
}
remove {
GLib.Object.GetObject (Handle).RemoveSignalHandler ("disconnected", value);
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate bool d_g_drive_can_eject(IntPtr raw);
static d_g_drive_can_eject g_drive_can_eject = FuncLoader.LoadFunction<d_g_drive_can_eject>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_drive_can_eject"));
public bool CanEject() {
bool raw_ret = g_drive_can_eject(Handle);
bool ret = raw_ret;
return ret;
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate bool d_g_drive_can_poll_for_media(IntPtr raw);
static d_g_drive_can_poll_for_media g_drive_can_poll_for_media = FuncLoader.LoadFunction<d_g_drive_can_poll_for_media>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_drive_can_poll_for_media"));
public bool CanPollForMedia() {
bool raw_ret = g_drive_can_poll_for_media(Handle);
bool ret = raw_ret;
return ret;
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate bool d_g_drive_can_start(IntPtr raw);
static d_g_drive_can_start g_drive_can_start = FuncLoader.LoadFunction<d_g_drive_can_start>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_drive_can_start"));
public bool CanStart() {
bool raw_ret = g_drive_can_start(Handle);
bool ret = raw_ret;
return ret;
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate bool d_g_drive_can_start_degraded(IntPtr raw);
static d_g_drive_can_start_degraded g_drive_can_start_degraded = FuncLoader.LoadFunction<d_g_drive_can_start_degraded>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_drive_can_start_degraded"));
public bool CanStartDegraded() {
bool raw_ret = g_drive_can_start_degraded(Handle);
bool ret = raw_ret;
return ret;
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate bool d_g_drive_can_stop(IntPtr raw);
static d_g_drive_can_stop g_drive_can_stop = FuncLoader.LoadFunction<d_g_drive_can_stop>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_drive_can_stop"));
public bool CanStop() {
bool raw_ret = g_drive_can_stop(Handle);
bool ret = raw_ret;
return ret;
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate void d_g_drive_eject_with_operation(IntPtr raw, int flags, IntPtr mount_operation, IntPtr cancellable, GLibSharp.AsyncReadyCallbackNative cb, IntPtr user_data);
static d_g_drive_eject_with_operation g_drive_eject_with_operation = FuncLoader.LoadFunction<d_g_drive_eject_with_operation>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_drive_eject_with_operation"));
public void EjectWithOperation(GLib.MountUnmountFlags flags, GLib.MountOperation mount_operation, GLib.Cancellable cancellable, GLib.AsyncReadyCallback cb) {
GLibSharp.AsyncReadyCallbackWrapper cb_wrapper = new GLibSharp.AsyncReadyCallbackWrapper (cb);
cb_wrapper.PersistUntilCalled ();
g_drive_eject_with_operation(Handle, (int) flags, mount_operation == null ? IntPtr.Zero : mount_operation.Handle, cancellable == null ? IntPtr.Zero : cancellable.Handle, cb_wrapper.NativeDelegate, IntPtr.Zero);
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate bool d_g_drive_eject_with_operation_finish(IntPtr raw, IntPtr result, out IntPtr error);
static d_g_drive_eject_with_operation_finish g_drive_eject_with_operation_finish = FuncLoader.LoadFunction<d_g_drive_eject_with_operation_finish>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_drive_eject_with_operation_finish"));
public bool EjectWithOperationFinish(GLib.IAsyncResult result) {
IntPtr error = IntPtr.Zero;
bool raw_ret = g_drive_eject_with_operation_finish(Handle, result == null ? IntPtr.Zero : ((result is GLib.Object) ? (result as GLib.Object).Handle : (result as GLib.AsyncResultAdapter).Handle), out error);
bool ret = raw_ret;
if (error != IntPtr.Zero) throw new GLib.GException (error);
return ret;
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate IntPtr d_g_drive_enumerate_identifiers(IntPtr raw);
static d_g_drive_enumerate_identifiers g_drive_enumerate_identifiers = FuncLoader.LoadFunction<d_g_drive_enumerate_identifiers>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_drive_enumerate_identifiers"));
public string EnumerateIdentifiers() {
IntPtr raw_ret = g_drive_enumerate_identifiers(Handle);
string ret = GLib.Marshaller.PtrToStringGFree(raw_ret);
return ret;
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate IntPtr d_g_drive_get_icon(IntPtr raw);
static d_g_drive_get_icon g_drive_get_icon = FuncLoader.LoadFunction<d_g_drive_get_icon>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_drive_get_icon"));
public GLib.IIcon Icon {
get {
IntPtr raw_ret = g_drive_get_icon(Handle);
GLib.IIcon ret = GLib.IconAdapter.GetObject (raw_ret, false);
return ret;
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate IntPtr d_g_drive_get_identifier(IntPtr raw, IntPtr kind);
static d_g_drive_get_identifier g_drive_get_identifier = FuncLoader.LoadFunction<d_g_drive_get_identifier>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_drive_get_identifier"));
public string GetIdentifier(string kind) {
IntPtr native_kind = GLib.Marshaller.StringToPtrGStrdup (kind);
IntPtr raw_ret = g_drive_get_identifier(Handle, native_kind);
string ret = GLib.Marshaller.PtrToStringGFree(raw_ret);
GLib.Marshaller.Free (native_kind);
return ret;
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate IntPtr d_g_drive_get_name(IntPtr raw);
static d_g_drive_get_name g_drive_get_name = FuncLoader.LoadFunction<d_g_drive_get_name>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_drive_get_name"));
public string Name {
get {
IntPtr raw_ret = g_drive_get_name(Handle);
string ret = GLib.Marshaller.PtrToStringGFree(raw_ret);
return ret;
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate IntPtr d_g_drive_get_sort_key(IntPtr raw);
static d_g_drive_get_sort_key g_drive_get_sort_key = FuncLoader.LoadFunction<d_g_drive_get_sort_key>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_drive_get_sort_key"));
public string SortKey {
get {
IntPtr raw_ret = g_drive_get_sort_key(Handle);
string ret = GLib.Marshaller.Utf8PtrToString (raw_ret);
return ret;
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate int d_g_drive_get_start_stop_type(IntPtr raw);
static d_g_drive_get_start_stop_type g_drive_get_start_stop_type = FuncLoader.LoadFunction<d_g_drive_get_start_stop_type>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_drive_get_start_stop_type"));
public GLib.DriveStartStopType StartStopType {
get {
int raw_ret = g_drive_get_start_stop_type(Handle);
GLib.DriveStartStopType ret = (GLib.DriveStartStopType) raw_ret;
return ret;
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate IntPtr d_g_drive_get_symbolic_icon(IntPtr raw);
static d_g_drive_get_symbolic_icon g_drive_get_symbolic_icon = FuncLoader.LoadFunction<d_g_drive_get_symbolic_icon>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_drive_get_symbolic_icon"));
public GLib.IIcon SymbolicIcon {
get {
IntPtr raw_ret = g_drive_get_symbolic_icon(Handle);
GLib.IIcon ret = GLib.IconAdapter.GetObject (raw_ret, false);
return ret;
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate IntPtr d_g_drive_get_volumes(IntPtr raw);
static d_g_drive_get_volumes g_drive_get_volumes = FuncLoader.LoadFunction<d_g_drive_get_volumes>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_drive_get_volumes"));
public GLib.IVolume[] Volumes {
get {
IntPtr raw_ret = g_drive_get_volumes(Handle);
GLib.IVolume[] ret = GLib.Marshaller.ListPtrToArray<GLib.IVolume, GLib.IVolume> (raw_ret, true, true);
return ret;
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate bool d_g_drive_has_media(IntPtr raw);
static d_g_drive_has_media g_drive_has_media = FuncLoader.LoadFunction<d_g_drive_has_media>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_drive_has_media"));
public bool HasMedia {
get {
bool raw_ret = g_drive_has_media(Handle);
bool ret = raw_ret;
return ret;
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate bool d_g_drive_has_volumes(IntPtr raw);
static d_g_drive_has_volumes g_drive_has_volumes = FuncLoader.LoadFunction<d_g_drive_has_volumes>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_drive_has_volumes"));
public bool HasVolumes {
get {
bool raw_ret = g_drive_has_volumes(Handle);
bool ret = raw_ret;
return ret;
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate bool d_g_drive_is_media_check_automatic(IntPtr raw);
static d_g_drive_is_media_check_automatic g_drive_is_media_check_automatic = FuncLoader.LoadFunction<d_g_drive_is_media_check_automatic>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_drive_is_media_check_automatic"));
public bool IsMediaCheckAutomatic {
get {
bool raw_ret = g_drive_is_media_check_automatic(Handle);
bool ret = raw_ret;
return ret;
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate bool d_g_drive_is_media_removable(IntPtr raw);
static d_g_drive_is_media_removable g_drive_is_media_removable = FuncLoader.LoadFunction<d_g_drive_is_media_removable>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_drive_is_media_removable"));
public bool IsMediaRemovable {
get {
bool raw_ret = g_drive_is_media_removable(Handle);
bool ret = raw_ret;
return ret;
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate bool d_g_drive_is_removable(IntPtr raw);
static d_g_drive_is_removable g_drive_is_removable = FuncLoader.LoadFunction<d_g_drive_is_removable>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_drive_is_removable"));
public bool IsRemovable {
get {
bool raw_ret = g_drive_is_removable(Handle);
bool ret = raw_ret;
return ret;
}
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate void d_g_drive_poll_for_media(IntPtr raw, IntPtr cancellable, GLibSharp.AsyncReadyCallbackNative cb, IntPtr user_data);
static d_g_drive_poll_for_media g_drive_poll_for_media = FuncLoader.LoadFunction<d_g_drive_poll_for_media>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_drive_poll_for_media"));
public void PollForMedia(GLib.Cancellable cancellable, GLib.AsyncReadyCallback cb) {
GLibSharp.AsyncReadyCallbackWrapper cb_wrapper = new GLibSharp.AsyncReadyCallbackWrapper (cb);
cb_wrapper.PersistUntilCalled ();
g_drive_poll_for_media(Handle, cancellable == null ? IntPtr.Zero : cancellable.Handle, cb_wrapper.NativeDelegate, IntPtr.Zero);
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate bool d_g_drive_poll_for_media_finish(IntPtr raw, IntPtr result, out IntPtr error);
static d_g_drive_poll_for_media_finish g_drive_poll_for_media_finish = FuncLoader.LoadFunction<d_g_drive_poll_for_media_finish>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_drive_poll_for_media_finish"));
public bool PollForMediaFinish(GLib.IAsyncResult result) {
IntPtr error = IntPtr.Zero;
bool raw_ret = g_drive_poll_for_media_finish(Handle, result == null ? IntPtr.Zero : ((result is GLib.Object) ? (result as GLib.Object).Handle : (result as GLib.AsyncResultAdapter).Handle), out error);
bool ret = raw_ret;
if (error != IntPtr.Zero) throw new GLib.GException (error);
return ret;
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate void d_g_drive_start(IntPtr raw, int flags, IntPtr mount_operation, IntPtr cancellable, GLibSharp.AsyncReadyCallbackNative cb, IntPtr user_data);
static d_g_drive_start g_drive_start = FuncLoader.LoadFunction<d_g_drive_start>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_drive_start"));
public void Start(GLib.DriveStartFlags flags, GLib.MountOperation mount_operation, GLib.Cancellable cancellable, GLib.AsyncReadyCallback cb) {
GLibSharp.AsyncReadyCallbackWrapper cb_wrapper = new GLibSharp.AsyncReadyCallbackWrapper (cb);
cb_wrapper.PersistUntilCalled ();
g_drive_start(Handle, (int) flags, mount_operation == null ? IntPtr.Zero : mount_operation.Handle, cancellable == null ? IntPtr.Zero : cancellable.Handle, cb_wrapper.NativeDelegate, IntPtr.Zero);
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate bool d_g_drive_start_finish(IntPtr raw, IntPtr result, out IntPtr error);
static d_g_drive_start_finish g_drive_start_finish = FuncLoader.LoadFunction<d_g_drive_start_finish>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_drive_start_finish"));
public bool StartFinish(GLib.IAsyncResult result) {
IntPtr error = IntPtr.Zero;
bool raw_ret = g_drive_start_finish(Handle, result == null ? IntPtr.Zero : ((result is GLib.Object) ? (result as GLib.Object).Handle : (result as GLib.AsyncResultAdapter).Handle), out error);
bool ret = raw_ret;
if (error != IntPtr.Zero) throw new GLib.GException (error);
return ret;
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate void d_g_drive_stop(IntPtr raw, int flags, IntPtr mount_operation, IntPtr cancellable, GLibSharp.AsyncReadyCallbackNative cb, IntPtr user_data);
static d_g_drive_stop g_drive_stop = FuncLoader.LoadFunction<d_g_drive_stop>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_drive_stop"));
public void Stop(GLib.MountUnmountFlags flags, GLib.MountOperation mount_operation, GLib.Cancellable cancellable, GLib.AsyncReadyCallback cb) {
GLibSharp.AsyncReadyCallbackWrapper cb_wrapper = new GLibSharp.AsyncReadyCallbackWrapper (cb);
cb_wrapper.PersistUntilCalled ();
g_drive_stop(Handle, (int) flags, mount_operation == null ? IntPtr.Zero : mount_operation.Handle, cancellable == null ? IntPtr.Zero : cancellable.Handle, cb_wrapper.NativeDelegate, IntPtr.Zero);
}
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
delegate bool d_g_drive_stop_finish(IntPtr raw, IntPtr result, out IntPtr error);
static d_g_drive_stop_finish g_drive_stop_finish = FuncLoader.LoadFunction<d_g_drive_stop_finish>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_drive_stop_finish"));
public bool StopFinish(GLib.IAsyncResult result) {
IntPtr error = IntPtr.Zero;
bool raw_ret = g_drive_stop_finish(Handle, result == null ? IntPtr.Zero : ((result is GLib.Object) ? (result as GLib.Object).Handle : (result as GLib.AsyncResultAdapter).Handle), out error);
bool ret = raw_ret;
if (error != IntPtr.Zero) throw new GLib.GException (error);
return ret;
}
#endregion
}
}

Some files were not shown because too many files have changed in this diff Show More