Skip to content

Instantly share code, notes, and snippets.

@dtaylorus
Last active April 20, 2023 09:53
Show Gist options
  • Save dtaylorus/0468be7372ba517db09c1bbfa68a927a to your computer and use it in GitHub Desktop.
Save dtaylorus/0468be7372ba517db09c1bbfa68a927a to your computer and use it in GitHub Desktop.
Facebook CoreKit C# bindings
using System;
using System.Reflection;
using System.Runtime.InteropServices;
using CoreGraphics;
using CoreMedia;
using ObjCRuntime;
using UIKit;
namespace Facebook.ApiDefinition
{
internal static class Messaging
{
internal const string LIBOBJC_DYLIB = "/usr/lib/libobjc.dylib";
internal static Assembly this_assembly = typeof(Messaging).Assembly;
[DllImport(LIBOBJC_DYLIB, EntryPoint = "objc_msgSend")]
public static extern NativeHandle IntPtr_objc_msgSend(NativeHandle receiever, NativeHandle selector);
[DllImport(LIBOBJC_DYLIB, EntryPoint = "objc_msgSendSuper")]
public static extern NativeHandle IntPtr_objc_msgSendSuper(NativeHandle receiever, NativeHandle selector);
[DllImport(LIBOBJC_DYLIB, EntryPoint = "objc_msgSend")]
public static extern NativeHandle IntPtr_objc_msgSend_IntPtr(NativeHandle receiever, NativeHandle selector, NativeHandle arg1);
[DllImport(LIBOBJC_DYLIB, EntryPoint = "objc_msgSendSuper")]
public static extern NativeHandle IntPtr_objc_msgSendSuper_IntPtr(NativeHandle receiever, NativeHandle selector, NativeHandle arg1);
[DllImport(LIBOBJC_DYLIB, EntryPoint = "objc_msgSend")]
[return: MarshalAs(UnmanagedType.I1)]
public static extern bool bool_objc_msgSend(NativeHandle receiver, NativeHandle selector);
[DllImport(LIBOBJC_DYLIB, EntryPoint = "objc_msgSendSuper")]
[return: MarshalAs(UnmanagedType.I1)]
public static extern bool bool_objc_msgSendSuper(NativeHandle receiver, NativeHandle selector);
[DllImport(LIBOBJC_DYLIB, EntryPoint = "objc_msgSend")]
public static extern void void_objc_msgSend_bool(NativeHandle receiver, NativeHandle selector, [MarshalAs(UnmanagedType.I1)] bool arg1);
[DllImport(LIBOBJC_DYLIB, EntryPoint = "objc_msgSendSuper")]
public static extern void void_objc_msgSendSuper_bool(NativeHandle receiver, NativeHandle selector, [MarshalAs(UnmanagedType.I1)] bool arg1);
[DllImport(LIBOBJC_DYLIB, EntryPoint = "objc_msgSend")]
public static extern void void_objc_msgSend_IntPtr(NativeHandle receiver, NativeHandle selector, NativeHandle arg1);
[DllImport(LIBOBJC_DYLIB, EntryPoint = "objc_msgSendSuper")]
public static extern void void_objc_msgSendSuper_IntPtr(NativeHandle receiver, NativeHandle selector, NativeHandle arg1);
[DllImport(LIBOBJC_DYLIB, EntryPoint = "objc_msgSend")]
public static extern nuint nuint_objc_msgSend(NativeHandle receiver, NativeHandle selector);
[DllImport(LIBOBJC_DYLIB, EntryPoint = "objc_msgSendSuper")]
public static extern nuint nuint_objc_msgSendSuper(NativeHandle receiver, NativeHandle selector);
[DllImport(LIBOBJC_DYLIB, EntryPoint = "objc_msgSend")]
public static extern void void_objc_msgSend_nuint(NativeHandle receiver, NativeHandle selector, nuint arg1);
[DllImport(LIBOBJC_DYLIB, EntryPoint = "objc_msgSendSuper")]
public static extern void void_objc_msgSendSuper_nuint(NativeHandle receiver, NativeHandle selector, nuint arg1);
[DllImport(LIBOBJC_DYLIB, EntryPoint = "objc_msgSend")]
public static extern UIEdgeInsets UIEdgeInsets_objc_msgSend(NativeHandle receiver, NativeHandle selector);
[DllImport(LIBOBJC_DYLIB, EntryPoint = "objc_msgSendSuper")]
public static extern UIEdgeInsets UIEdgeInsets_objc_msgSendSuper(NativeHandle receiver, NativeHandle selector);
[DllImport(LIBOBJC_DYLIB, EntryPoint = "objc_msgSend_stret")]
public static extern void UIEdgeInsets_objc_msgSend_stret(out UIEdgeInsets retval, NativeHandle receiver, NativeHandle selector);
[DllImport(LIBOBJC_DYLIB, EntryPoint = "objc_msgSendSuper_stret")]
public static extern void UIEdgeInsets_objc_msgSendSuper_stret(out UIEdgeInsets retval, NativeHandle receiver, NativeHandle selector);
[DllImport(LIBOBJC_DYLIB, EntryPoint = "objc_msgSend")]
public static extern void void_objc_msgSend_UIEdgeInsets(NativeHandle receiver, NativeHandle selector, UIEdgeInsets arg1);
[DllImport(LIBOBJC_DYLIB, EntryPoint = "objc_msgSendSuper")]
public static extern void void_objc_msgSendSuper_UIEdgeInsets(NativeHandle receiver, NativeHandle selector, UIEdgeInsets arg1);
[DllImport(LIBOBJC_DYLIB, EntryPoint = "objc_msgSend")]
public static extern NativeHandle IntPtr_objc_msgSend_IntPtr_bool(NativeHandle receiver, NativeHandle selector, NativeHandle arg1, [MarshalAs(UnmanagedType.I1)] bool arg2);
[DllImport(LIBOBJC_DYLIB, EntryPoint = "objc_msgSendSuper")]
public static extern NativeHandle IntPtr_objc_msgSendSuper_IntPtr_bool(NativeHandle receiver, NativeHandle selector, NativeHandle arg1, [MarshalAs(UnmanagedType.I1)] bool arg2);
[DllImport(LIBOBJC_DYLIB, EntryPoint = "objc_msgSend")]
public static extern NativeHandle IntPtr_objc_msgSend_IntPtr_bool_IntPtr(NativeHandle receiver, NativeHandle selector, NativeHandle arg1, [MarshalAs(UnmanagedType.I1)] bool arg2, NativeHandle arg3);
[DllImport(LIBOBJC_DYLIB, EntryPoint = "objc_msgSendSuper")]
public static extern NativeHandle IntPtr_objc_msgSendSuper_IntPtr_bool_IntPtr(NativeHandle receiver, NativeHandle selector, NativeHandle arg1, [MarshalAs(UnmanagedType.I1)] bool arg2, NativeHandle arg3);
[DllImport(LIBOBJC_DYLIB, EntryPoint = "objc_msgSend")]
public static extern void void_objc_msgSend(NativeHandle receiver, NativeHandle selector);
[DllImport(LIBOBJC_DYLIB, EntryPoint = "objc_msgSendSuper")]
public static extern void void_objc_msgSendSuper(NativeHandle receiver, NativeHandle selector);
[DllImport(LIBOBJC_DYLIB, EntryPoint = "objc_msgSend")]
public static extern void void_objc_msgSend_nuint_UIEdgeInsets(NativeHandle receiver, NativeHandle selector, nuint arg1, UIEdgeInsets arg2);
[DllImport(LIBOBJC_DYLIB, EntryPoint = "objc_msgSendSuper")]
public static extern void void_objc_msgSendSuper_nuint_UIEdgeInsets(NativeHandle receiver, NativeHandle selector, nuint arg1, UIEdgeInsets arg2);
[DllImport(LIBOBJC_DYLIB, EntryPoint = "objc_msgSend")]
public static extern NativeHandle IntPtr_objc_msgSend_CGRect(NativeHandle receiver, NativeHandle selector, CGRect arg1);
[DllImport(LIBOBJC_DYLIB, EntryPoint = "objc_msgSendSuper")]
public static extern NativeHandle IntPtr_objc_msgSendSuper_CGRect(NativeHandle receiver, NativeHandle selector, CGRect arg1);
[DllImport(LIBOBJC_DYLIB, EntryPoint = "objc_msgSend")]
public static extern nint nint_objc_msgSend(NativeHandle receiver, NativeHandle selector);
[DllImport(LIBOBJC_DYLIB, EntryPoint = "objc_msgSendSuper")]
public static extern nint nint_objc_msgSendSuper(NativeHandle receiver, NativeHandle selector);
[DllImport(LIBOBJC_DYLIB, EntryPoint = "objc_msgSend")]
public static extern NativeHandle IntPtr_objc_msgSend_IntPtr_nint_nint(NativeHandle receiver, NativeHandle selector, NativeHandle arg1, nint arg2, nint arg3);
[DllImport(LIBOBJC_DYLIB, EntryPoint = "objc_msgSendSuper")]
public static extern NativeHandle IntPtr_objc_msgSendSuper_IntPtr_nint_nint(NativeHandle receiver, NativeHandle selector, NativeHandle arg1, nint arg2, nint arg3);
[DllImport(LIBOBJC_DYLIB, EntryPoint = "objc_msgSend")]
public static extern NativeHandle IntPtr_objc_msgSend_IntPtr_IntPtr(NativeHandle receiver, NativeHandle selector, NativeHandle arg1, NativeHandle arg2);
[DllImport(LIBOBJC_DYLIB, EntryPoint = "objc_msgSendSuper")]
public static extern NativeHandle IntPtr_objc_msgSendSuper_IntPtr_IntPtr(NativeHandle receiver, NativeHandle selector, NativeHandle arg1, NativeHandle arg2);
[DllImport(LIBOBJC_DYLIB, EntryPoint = "objc_msgSend")]
public static extern void void_objc_msgSend_nint_IntPtr_int_nint_IntPtr(NativeHandle receiver, NativeHandle selector, nint arg1, NativeHandle arg2, int arg3, nint arg4, NativeHandle arg5);
[DllImport(LIBOBJC_DYLIB, EntryPoint = "objc_msgSendSuper")]
public static extern void void_objc_msgSendSuper_nint_IntPtr_int_nint_IntPtr(NativeHandle receiver, NativeHandle selector, nint arg1, NativeHandle arg2, int arg3, nint arg4, NativeHandle arg5);
[DllImport(LIBOBJC_DYLIB, EntryPoint = "objc_msgSend")]
public static extern void void_objc_msgSend_IntPtr_IntPtr(NativeHandle receiver, NativeHandle selector, NativeHandle arg1, NativeHandle arg2);
[DllImport(LIBOBJC_DYLIB, EntryPoint = "objc_msgSendSuper")]
public static extern void void_objc_msgSendSuper_IntPtr_IntPtr(NativeHandle receiver, NativeHandle selector, NativeHandle arg1, NativeHandle arg2);
[DllImport(LIBOBJC_DYLIB, EntryPoint = "objc_msgSend")]
public static extern void void_objc_msgSend_nint(NativeHandle receiver, NativeHandle selector, nint arg1);
[DllImport(LIBOBJC_DYLIB, EntryPoint = "objc_msgSendSuper")]
public static extern void void_objc_msgSendSuper_nint(NativeHandle receiver, NativeHandle selector, nint arg1);
[DllImport(LIBOBJC_DYLIB, EntryPoint = "objc_msgSend")]
public static extern void void_objc_msgSend_IntPtr_nint_nint(NativeHandle receiver, NativeHandle selector, NativeHandle arg1, nint arg2, nint arg3);
[DllImport(LIBOBJC_DYLIB, EntryPoint = "objc_msgSendSuper")]
public static extern void void_objc_msgSendSuper_IntPtr_nint_nint(NativeHandle receiver, NativeHandle selector, NativeHandle arg1, nint arg2, nint arg3);
[DllImport(LIBOBJC_DYLIB, EntryPoint = "objc_msgSend")]
public static extern NativeHandle IntPtr_objc_msgSend_IntPtr_IntPtr_IntPtr_ref_IntPtr(NativeHandle receiver, NativeHandle selector, NativeHandle arg1, NativeHandle arg2, NativeHandle arg3, ref NativeHandle arg4);
[DllImport(LIBOBJC_DYLIB, EntryPoint = "objc_msgSendSuper")]
public static extern NativeHandle IntPtr_objc_msgSendSuper_IntPtr_IntPtr_IntPtr_ref_IntPtr(NativeHandle receiver, NativeHandle selector, NativeHandle arg1, NativeHandle arg2, NativeHandle arg3, ref NativeHandle arg4);
[DllImport(LIBOBJC_DYLIB, EntryPoint = "objc_msgSend")]
[return: MarshalAs(UnmanagedType.I1)]
public static extern bool bool_objc_msgSend_IntPtr(NativeHandle receiver, NativeHandle selector, NativeHandle arg1);
[DllImport(LIBOBJC_DYLIB, EntryPoint = "objc_msgSendSuper")]
[return: MarshalAs(UnmanagedType.I1)]
public static extern bool bool_objc_msgSendSuper_IntPtr(NativeHandle receiver, NativeHandle selector, NativeHandle arg1);
[DllImport(LIBOBJC_DYLIB, EntryPoint = "objc_msgSend")]
public static extern float float_objc_msgSend(NativeHandle receiver, NativeHandle selector);
[DllImport(LIBOBJC_DYLIB, EntryPoint = "objc_msgSendSuper")]
public static extern float float_objc_msgSendSuper(NativeHandle receiver, NativeHandle selector);
[DllImport(LIBOBJC_DYLIB, EntryPoint = "objc_msgSend")]
public static extern nfloat nfloat_objc_msgSend(NativeHandle receiver, NativeHandle selector);
[DllImport(LIBOBJC_DYLIB, EntryPoint = "objc_msgSendSuper")]
public static extern nfloat nfloat_objc_msgSendSuper(NativeHandle receiver, NativeHandle selector);
[DllImport(LIBOBJC_DYLIB, EntryPoint = "objc_msgSend")]
public static extern void void_objc_msgSend_IntPtr_float(NativeHandle receiver, NativeHandle selector, NativeHandle arg1, float arg2);
[DllImport(LIBOBJC_DYLIB, EntryPoint = "objc_msgSendSuper")]
public static extern void void_objc_msgSendSuper_IntPtr_float(NativeHandle receiver, NativeHandle selector, NativeHandle arg1, float arg2);
[DllImport(LIBOBJC_DYLIB, EntryPoint = "objc_msgSend")]
public static extern CMTime CMTime_objc_msgSend(NativeHandle receiver, NativeHandle selector);
[DllImport(LIBOBJC_DYLIB, EntryPoint = "objc_msgSendSuper")]
public static extern CMTime CMTime_objc_msgSendSuper(NativeHandle receiver, NativeHandle selector);
[DllImport(LIBOBJC_DYLIB, EntryPoint = "objc_msgSend_stret")]
public static extern void CMTime_objc_msgSend_stret(out CMTime retval, NativeHandle receiver, NativeHandle selector);
[DllImport(LIBOBJC_DYLIB, EntryPoint = "objc_msgSendSuper_stret")]
public static extern void CMTime_objc_msgSendSuper_stret(out CMTime retval, NativeHandle receiver, NativeHandle selector);
[DllImport(LIBOBJC_DYLIB, EntryPoint = "objc_msgSend")]
public static extern void void_objc_msgSend_float(NativeHandle receiver, NativeHandle selector, float arg1);
[DllImport(LIBOBJC_DYLIB, EntryPoint = "objc_msgSendSuper")]
public static extern void void_objc_msgSendSuper_float(NativeHandle receiver, NativeHandle selector, float arg1);
[DllImport(LIBOBJC_DYLIB, EntryPoint = "objc_msgSend")]
public static extern void void_objc_msgSend_CMTime(NativeHandle receiver, NativeHandle selector, CMTime arg1);
[DllImport(LIBOBJC_DYLIB, EntryPoint = "objc_msgSendSuper")]
public static extern void void_objc_msgSendSuper_CMTime(NativeHandle receiver, NativeHandle selector, CMTime arg1);
[DllImport(LIBOBJC_DYLIB, EntryPoint = "objc_msgSend")]
public static extern NativeHandle IntPtr_objc_msgSend_CMTime_IntPtr_IntPtr(NativeHandle receiver, NativeHandle selector, CMTime arg1, NativeHandle arg2, NativeHandle arg3);
[DllImport(LIBOBJC_DYLIB, EntryPoint = "objc_msgSendSuper")]
public static extern NativeHandle IntPtr_objc_msgSendSuper_CMTime_IntPtr_IntPtr(NativeHandle receiver, NativeHandle selector, CMTime arg1, NativeHandle arg2, NativeHandle arg3);
[DllImport(LIBOBJC_DYLIB, EntryPoint = "objc_msgSend")]
public static extern void void_objc_msgSend_IntPtr_IntPtr_IntPtr_IntPtr(NativeHandle receiver, NativeHandle selector, NativeHandle arg1, NativeHandle arg2, NativeHandle arg3, NativeHandle arg4);
[DllImport(LIBOBJC_DYLIB, EntryPoint = "objc_msgSendSuper")]
public static extern void void_objc_msgSendSuper_IntPtr_IntPtr_IntPtr_IntPtr(NativeHandle receiver, NativeHandle selector, NativeHandle arg1, NativeHandle arg2, NativeHandle arg3, NativeHandle arg4);
[DllImport(LIBOBJC_DYLIB, EntryPoint = "objc_msgSend")]
public static extern void void_objc_msgSend_IntPtr_IntPtr_IntPtr_IntPtr_IntPtr(NativeHandle receiver, NativeHandle selector, NativeHandle arg1, NativeHandle arg2, NativeHandle arg3, NativeHandle arg4, NativeHandle arg5);
[DllImport(LIBOBJC_DYLIB, EntryPoint = "objc_msgSendSuper")]
public static extern void void_objc_msgSendSuper_IntPtr_IntPtr_IntPtr_IntPtr_IntPtr(NativeHandle receiver, NativeHandle selector, NativeHandle arg1, NativeHandle arg2, NativeHandle arg3, NativeHandle arg4, NativeHandle arg5);
[DllImport(LIBOBJC_DYLIB, EntryPoint = "objc_msgSend")]
public static extern void void_objc_msgSend_IntPtr_nint(NativeHandle receiver, NativeHandle selector, NativeHandle arg1, nint arg2);
[DllImport(LIBOBJC_DYLIB, EntryPoint = "objc_msgSendSuper")]
public static extern void void_objc_msgSendSuper_IntPtr_nint(NativeHandle receiver, NativeHandle selector, NativeHandle arg1, nint arg2);
[DllImport(LIBOBJC_DYLIB, EntryPoint = "objc_msgSend")]
public static extern NativeHandle IntPtr_objc_msgSend_IntPtr_IntPtr_ref_IntPtr(NativeHandle receiver, NativeHandle selector, NativeHandle arg1, NativeHandle arg2, ref NativeHandle arg3);
[DllImport(LIBOBJC_DYLIB, EntryPoint = "objc_msgSendSuper")]
public static extern NativeHandle IntPtr_objc_msgSendSuper_IntPtr_IntPtr_ref_IntPtr(NativeHandle receiver, NativeHandle selector, NativeHandle arg1, NativeHandle arg2, ref NativeHandle arg3);
[DllImport(LIBOBJC_DYLIB, EntryPoint = "objc_msgSend")]
[return: MarshalAs(UnmanagedType.I1)]
public static extern bool bool_objc_msgSend_IntPtr_nuint(NativeHandle receiver, NativeHandle selector, NativeHandle arg1, nuint arg2);
[DllImport(LIBOBJC_DYLIB, EntryPoint = "objc_msgSendSuper")]
[return: MarshalAs(UnmanagedType.I1)]
public static extern bool bool_objc_msgSendSuper_IntPtr_nuint(NativeHandle receiver, NativeHandle selector, NativeHandle arg1, nuint arg2);
[DllImport(LIBOBJC_DYLIB, EntryPoint = "objc_msgSend")]
public static extern NativeHandle IntPtr_objc_msgSend_IntPtr_nuint(NativeHandle receiver, NativeHandle selector, NativeHandle arg1, nuint arg2);
[DllImport(LIBOBJC_DYLIB, EntryPoint = "objc_msgSendSuper")]
public static extern NativeHandle IntPtr_objc_msgSendSuper_IntPtr_nuint(NativeHandle receiver, NativeHandle selector, NativeHandle arg1, nuint arg2);
[DllImport(LIBOBJC_DYLIB, EntryPoint = "objc_msgSend")]
public static extern nuint nuint_objc_msgSend_nuint_nuint(NativeHandle receiver, NativeHandle selector, nuint arg1, nuint arg2);
[DllImport(LIBOBJC_DYLIB, EntryPoint = "objc_msgSendSuper")]
public static extern nuint nuint_objc_msgSendSuper_nuint_nuint(NativeHandle receiver, NativeHandle selector, nuint arg1, nuint arg2);
[DllImport(LIBOBJC_DYLIB, EntryPoint = "objc_msgSend")]
public static extern NativeHandle IntPtr_objc_msgSend_IntPtr_nint(NativeHandle receiver, NativeHandle selector, NativeHandle arg1, nint arg2);
[DllImport(LIBOBJC_DYLIB, EntryPoint = "objc_msgSendSuper")]
public static extern NativeHandle IntPtr_objc_msgSendSuper_IntPtr_nint(NativeHandle receiver, NativeHandle selector, NativeHandle arg1, nint arg2);
[DllImport(LIBOBJC_DYLIB, EntryPoint = "objc_msgSend")]
public static extern NativeHandle IntPtr_objc_msgSend_IntPtr_nint_IntPtr(NativeHandle receiver, NativeHandle selector, NativeHandle arg1, nint arg2, NativeHandle arg3);
[DllImport(LIBOBJC_DYLIB, EntryPoint = "objc_msgSendSuper")]
public static extern NativeHandle IntPtr_objc_msgSendSuper_IntPtr_nint_IntPtr(NativeHandle receiver, NativeHandle selector, NativeHandle arg1, nint arg2, NativeHandle arg3);
[DllImport(LIBOBJC_DYLIB, EntryPoint = "objc_msgSend")]
public static extern nfloat nfloat_objc_msgSend_IntPtr_IntPtr(NativeHandle receiver, NativeHandle selector, NativeHandle arg1, NativeHandle arg2);
[DllImport(LIBOBJC_DYLIB, EntryPoint = "objc_msgSendSuper")]
public static extern nfloat nfloat_objc_msgSendSuper_IntPtr_IntPtr(NativeHandle receiver, NativeHandle selector, NativeHandle arg1, NativeHandle arg2);
[DllImport(LIBOBJC_DYLIB, EntryPoint = "objc_msgSend")]
public static extern void void_objc_msgSend_nfloat(NativeHandle receiver, NativeHandle selector, nfloat arg1);
[DllImport(LIBOBJC_DYLIB, EntryPoint = "objc_msgSendSuper")]
public static extern void void_objc_msgSendSuper_nfloat(NativeHandle receiver, NativeHandle selector, nfloat arg1);
[DllImport(LIBOBJC_DYLIB, EntryPoint = "objc_msgSend")]
public static extern NativeHandle IntPtr_objc_msgSend_IntPtr_nint_IntPtr_nuint(NativeHandle receiver, NativeHandle selector, NativeHandle arg1, nint arg2, NativeHandle arg3, nuint arg4);
[DllImport(LIBOBJC_DYLIB, EntryPoint = "objc_msgSendSuper")]
public static extern NativeHandle IntPtr_objc_msgSendSuper_IntPtr_nint_IntPtr_nuint(NativeHandle receiver, NativeHandle selector, NativeHandle arg1, nint arg2, NativeHandle arg3, nuint arg4);
[DllImport(LIBOBJC_DYLIB, EntryPoint = "objc_msgSend")]
public static extern NativeHandle IntPtr_objc_msgSend_IntPtr_IntPtr_nuint(NativeHandle receiver, NativeHandle selector, NativeHandle arg1, NativeHandle arg2, nuint arg3);
[DllImport(LIBOBJC_DYLIB, EntryPoint = "objc_msgSendSuper")]
public static extern NativeHandle IntPtr_objc_msgSendSuper_IntPtr_IntPtr_nuint(NativeHandle receiver, NativeHandle selector, NativeHandle arg1, NativeHandle arg2, nuint arg3);
[DllImport(LIBOBJC_DYLIB, EntryPoint = "objc_msgSend")]
public static extern nint nint_objc_msgSend_IntPtr_nint(NativeHandle receiver, NativeHandle selector, NativeHandle arg1, nint arg2);
[DllImport(LIBOBJC_DYLIB, EntryPoint = "objc_msgSendSuper")]
public static extern nint nint_objc_msgSendSuper_IntPtr_nint(NativeHandle receiver, NativeHandle selector, NativeHandle arg1, nint arg2);
[DllImport(LIBOBJC_DYLIB, EntryPoint = "objc_msgSend")]
public static extern NativeHandle IntPtr_objc_msgSend_nint(NativeHandle receiver, NativeHandle selector, nint arg1);
[DllImport(LIBOBJC_DYLIB, EntryPoint = "objc_msgSendSuper")]
public static extern NativeHandle IntPtr_objc_msgSendSuper_nint(NativeHandle receiver, NativeHandle selector, nint arg1);
[DllImport(LIBOBJC_DYLIB, EntryPoint = "objc_msgSend")]
public static extern void void_objc_msgSend_IntPtr_IntPtr_IntPtr(NativeHandle receiver, NativeHandle selector, NativeHandle arg1, NativeHandle arg2, NativeHandle arg3);
[DllImport(LIBOBJC_DYLIB, EntryPoint = "objc_msgSendSuper")]
public static extern void void_objc_msgSendSuper_IntPtr_IntPtr_IntPtr(NativeHandle receiver, NativeHandle selector, NativeHandle arg1, NativeHandle arg2, NativeHandle arg3);
[DllImport(LIBOBJC_DYLIB, EntryPoint = "objc_msgSend")]
public static extern NativeHandle IntPtr_objc_msgSend_IntPtr_IntPtr_IntPtr(NativeHandle receiver, NativeHandle selector, NativeHandle arg1, NativeHandle arg2, NativeHandle arg3);
[DllImport(LIBOBJC_DYLIB, EntryPoint = "objc_msgSendSuper")]
public static extern NativeHandle IntPtr_objc_msgSendSuper_IntPtr_IntPtr_IntPtr(NativeHandle receiver, NativeHandle selector, NativeHandle arg1, NativeHandle arg2, NativeHandle arg3);
[DllImport(LIBOBJC_DYLIB, EntryPoint = "objc_msgSend")]
[return: MarshalAs(UnmanagedType.I1)]
public static extern bool bool_objc_msgSend_IntPtr_IntPtr(NativeHandle receiver, NativeHandle selector, NativeHandle arg1, NativeHandle arg2);
[DllImport(LIBOBJC_DYLIB, EntryPoint = "objc_msgSendSuper")]
[return: MarshalAs(UnmanagedType.I1)]
public static extern bool bool_objc_msgSendSuper_IntPtr_IntPtr(NativeHandle receiver, NativeHandle selector, NativeHandle arg1, NativeHandle arg2);
[DllImport(LIBOBJC_DYLIB, EntryPoint = "objc_msgSend")]
[return: MarshalAs(UnmanagedType.I1)]
public static extern bool bool_objc_msgSend_IntPtr_bool(NativeHandle receiver, NativeHandle selector, NativeHandle arg1, [MarshalAs(UnmanagedType.I1)] bool arg2);
[DllImport(LIBOBJC_DYLIB, EntryPoint = "objc_msgSendSuper")]
[return: MarshalAs(UnmanagedType.I1)]
public static extern bool bool_objc_msgSendSuper_IntPtr_bool(NativeHandle receiver, NativeHandle selector, NativeHandle arg1, [MarshalAs(UnmanagedType.I1)] bool arg2);
[DllImport(LIBOBJC_DYLIB, EntryPoint = "objc_msgSendSuper")]
public static extern bool bool_objc_msgSendSuper_IntPtr_IntPtr_IntPtr_IntPtr(NativeHandle receiver, NativeHandle selector, NativeHandle arg1, NativeHandle arg2, NativeHandle arg3, NativeHandle arg4);
[DllImport(LIBOBJC_DYLIB, EntryPoint = "objc_msgSend")]
public static extern bool bool_objc_msgSend_IntPtr_IntPtr_IntPtr_IntPtr(NativeHandle receiver, NativeHandle selector, NativeHandle arg1, NativeHandle arg2, NativeHandle arg3, NativeHandle arg4);
[DllImport(LIBOBJC_DYLIB, EntryPoint = "objc_msgSend")]
public static extern bool bool_objc_msgSend_IntPtr_IntPtr_IntPtr(NativeHandle receiver, NativeHandle selector, NativeHandle arg1, NativeHandle arg2, NativeHandle arg3);
[DllImport(LIBOBJC_DYLIB, EntryPoint = "objc_msgSendSuper")]
public static extern bool bool_objc_msgSendSuper_IntPtr_IntPtr_IntPtr(NativeHandle receiver, NativeHandle selector, NativeHandle arg1, NativeHandle arg2, NativeHandle arg3);
}
}
using System;
using System.ComponentModel;
using Facebook.ApiDefinition;
using Foundation;
using ObjCRuntime;
using UIKit;
namespace Facebook.CoreKit
{
[Register("FBSDKApplicationDelegate", true)]
public class ApplicationDelegate : NSObject
{
[BindingImpl(BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)]
private static readonly NativeHandle class_ptr = global::ObjCRuntime.Class.GetHandle("FBSDKApplicationDelegate");
public override NativeHandle ClassHandle => class_ptr;
[BindingImpl(BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)]
public static ApplicationDelegate SharedInstance
{
[Export("sharedInstance", ArgumentSemantic.Retain)]
get
{
return Runtime.GetNSObject<ApplicationDelegate>(Messaging.IntPtr_objc_msgSend(class_ptr, Selector.GetHandle("sharedInstance")));
}
}
[BindingImpl(BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)]
[EditorBrowsable(EditorBrowsableState.Advanced)]
protected ApplicationDelegate(NSObjectFlag t)
: base(t)
{
base.IsDirectBinding = (GetType().Assembly == Messaging.this_assembly);
}
[BindingImpl(BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)]
[EditorBrowsable(EditorBrowsableState.Advanced)]
protected internal ApplicationDelegate(NativeHandle handle)
: base(handle)
{
base.IsDirectBinding = (GetType().Assembly == Messaging.this_assembly);
}
[Export("application:didFinishLaunchingWithOptions:")]
[BindingImpl(BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)]
public virtual bool FinishedLaunching(UIApplication application, NSDictionary launchOptions)
{
if (base.IsDirectBinding)
{
return Messaging.bool_objc_msgSend_IntPtr_IntPtr(base.Handle, Selector.GetHandle("application:didFinishLaunchingWithOptions:"), application?.Handle ?? NativeHandle.Zero, launchOptions?.Handle ?? NativeHandle.Zero);
}
return Messaging.bool_objc_msgSendSuper_IntPtr_IntPtr(base.SuperHandle, Selector.GetHandle("application:didFinishLaunchingWithOptions:"), application?.Handle ?? NativeHandle.Zero, launchOptions?.Handle ?? NativeHandle.Zero);
}
[Export("initializeSDK:")]
[BindingImpl(BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)]
public static void InitializeSdk(NSDictionary launchOptions)
{
Messaging.void_objc_msgSend_IntPtr(class_ptr, Selector.GetHandle("initializeSDK:"), launchOptions?.Handle ?? NativeHandle.Zero);
}
[Export("application:openURL:sourceApplication:annotation:")]
[BindingImpl(BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)]
public virtual bool OpenUrl(UIApplication application, NSUrl url, string sourceApplication, NSObject annotation)
{
if (application == null)
{
throw new ArgumentNullException("application");
}
if (url == null)
{
throw new ArgumentNullException("url");
}
NativeHandle intPtr = NSString.CreateNative(sourceApplication);
bool result = (!base.IsDirectBinding) ? Messaging.bool_objc_msgSendSuper_IntPtr_IntPtr_IntPtr_IntPtr(base.SuperHandle, Selector.GetHandle("application:openURL:sourceApplication:annotation:"), application.Handle, url.Handle, intPtr, annotation?.Handle ?? NativeHandle.Zero) : Messaging.bool_objc_msgSend_IntPtr_IntPtr_IntPtr_IntPtr(base.Handle, Selector.GetHandle("application:openURL:sourceApplication:annotation:"), application.Handle, url.Handle, intPtr, annotation?.Handle ?? NativeHandle.Zero);
NSString.ReleaseNative(intPtr);
return result;
}
[Export("application:openURL:options:")]
[BindingImpl(BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)]
public virtual bool OpenUrl(UIApplication application, NSUrl url, NSDictionary options)
{
if (application == null)
{
throw new ArgumentNullException("application");
}
if (url == null)
{
throw new ArgumentNullException("url");
}
if (options == null)
{
throw new ArgumentNullException("options");
}
if (base.IsDirectBinding)
{
return Messaging.bool_objc_msgSend_IntPtr_IntPtr_IntPtr(base.Handle, Selector.GetHandle("application:openURL:options:"), application.Handle, url.Handle, options.Handle);
}
return Messaging.bool_objc_msgSendSuper_IntPtr_IntPtr_IntPtr(base.SuperHandle, Selector.GetHandle("application:openURL:options:"), application.Handle, url.Handle, options.Handle);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment