Example #1
0
        public IOExtension GetExtensionByName(string name)
        {
            IntPtr      native_name = GLib.Marshaller.StringToPtrGStrdup(name);
            var         raw_ret     = g_io_extension_point_get_extension_by_name(Handle, native_name);
            IOExtension ret         = raw_ret == IntPtr.Zero ? null : (IOExtension)GLib.Opaque.GetOpaque(raw_ret, typeof(IOExtension), false);

            GLib.Marshaller.Free(native_name);
            return(ret);
        }
Example #2
0
        public static IOExtension Implement(string extension_point_name, GLib.GType type, string extension_name, int priority)
        {
            IntPtr      native_extension_point_name = GLib.Marshaller.StringToPtrGStrdup(extension_point_name);
            IntPtr      native_extension_name       = GLib.Marshaller.StringToPtrGStrdup(extension_name);
            var         raw_ret = g_io_extension_point_implement(native_extension_point_name, type.Val, native_extension_name, priority);
            IOExtension ret     = raw_ret == IntPtr.Zero ? null : (IOExtension)GLib.Opaque.GetOpaque(raw_ret, typeof(IOExtension), false);

            GLib.Marshaller.Free(native_extension_point_name);
            GLib.Marshaller.Free(native_extension_name);
            return(ret);
        }