Beispiel #1
0
        public void CloseAsync(int io_priority, GLib.Cancellable cancellable, GLib.AsyncReadyCallback cb)
        {
            var cb_wrapper = new GLibSharp.AsyncReadyCallbackWrapper(cb);

            cb_wrapper.PersistUntilCalled();
            g_file_enumerator_close_async(Handle, io_priority, cancellable == null ? IntPtr.Zero : cancellable.Handle, cb_wrapper.NativeDelegate, IntPtr.Zero);
        }
Beispiel #2
0
        public static SimpleAsyncResult NewFromError(GLib.Object source_object, GLib.AsyncReadyCallback cb, IntPtr error)
        {
            GLibSharp.AsyncReadyCallbackWrapper cb_wrapper = new GLibSharp.AsyncReadyCallbackWrapper(cb);
            SimpleAsyncResult result = new SimpleAsyncResult(g_simple_async_result_new_from_error(source_object == null ? IntPtr.Zero : source_object.Handle, cb_wrapper.NativeDelegate, IntPtr.Zero, error));

            return(result);
        }
Beispiel #3
0
 public AsyncReadyCallbackWrapper(GLib.AsyncReadyCallback managed)
 {
     this.managed = managed;
     if (managed != null)
     {
         NativeDelegate = new AsyncReadyCallbackNative(NativeCallback);
     }
 }
Beispiel #4
0
 public SimpleAsyncResult(GLib.Object source_object, GLib.AsyncReadyCallback cb, IntPtr source_tag) : base(IntPtr.Zero)
 {
     if (GetType() != typeof(SimpleAsyncResult))
     {
         throw new InvalidOperationException("Can't override this constructor.");
     }
     GLibSharp.AsyncReadyCallbackWrapper cb_wrapper = new GLibSharp.AsyncReadyCallbackWrapper(cb);
     Raw = g_simple_async_result_new(source_object == null ? IntPtr.Zero : source_object.Handle, cb_wrapper.NativeDelegate, IntPtr.Zero, source_tag);
 }
        public static void New(string uri, GLib.Cancellable cancellable, GLib.AsyncReadyCallback cb)
        {
            IntPtr native_uri = GLib.Marshaller.StringToPtrGStrdup(uri);

            GLibSharp.AsyncReadyCallbackWrapper cb_wrapper = new GLibSharp.AsyncReadyCallbackWrapper(cb);
            cb_wrapper.PersistUntilCalled();
            ges_uri_clip_asset_new(native_uri, cancellable == null ? IntPtr.Zero : cancellable.Handle, cb_wrapper.NativeDelegate, IntPtr.Zero);
            GLib.Marshaller.Free(native_uri);
        }
Beispiel #6
0
        public void LookupAsync(string uri, 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_proxy_resolver_lookup_async(Handle, native_uri, cancellable == null ? IntPtr.Zero : cancellable.Handle, cb_wrapper.NativeDelegate, IntPtr.Zero);
            GLib.Marshaller.Free(native_uri);
        }
Beispiel #7
0
        public void ForwardAsync(Gtk.TextIter iter, GLib.Cancellable cancellable, GLib.AsyncReadyCallback cb)
        {
            IntPtr native_iter = GLib.Marshaller.StructureToPtrAlloc(iter);

            GLibSharp.AsyncReadyCallbackWrapper cb_wrapper = new GLibSharp.AsyncReadyCallbackWrapper(cb);
            cb_wrapper.PersistUntilCalled();
            gtk_source_search_context_forward_async(Handle, native_iter, cancellable == null ? IntPtr.Zero : cancellable.Handle, cb_wrapper.NativeDelegate, IntPtr.Zero);
            Marshal.FreeHGlobal(native_iter);
        }
Beispiel #8
0
 public Pixbuf(GLib.InputStream stream, GLib.Cancellable cancellable, GLib.AsyncReadyCallback cb) : base(IntPtr.Zero)
 {
     if (GetType() != typeof(Pixbuf))
     {
         var vals  = new List <GLib.Value> ();
         var names = new List <string> ();
         CreateNativeObject(names.ToArray(), vals.ToArray());
         return;
     }
     GLibSharp.AsyncReadyCallbackWrapper cb_wrapper = new GLibSharp.AsyncReadyCallbackWrapper(cb);
     Raw = gdk_pixbuf_new_from_stream_async(stream == null ? IntPtr.Zero : stream.Handle, cancellable == null ? IntPtr.Zero : cancellable.Handle, cb_wrapper.NativeDelegate, IntPtr.Zero);
 }
Beispiel #9
0
        private void InternalNextAsync(GLib.Cancellable cancellable, GLib.AsyncReadyCallback cb)
        {
            NextAsyncNativeDelegate unmanaged = class_abi.BaseOverride <NextAsyncNativeDelegate>(this.LookupGType(), "next_async");

            if (unmanaged == null)
            {
                return;
            }

            GLibSharp.AsyncReadyCallbackWrapper cb_wrapper = new GLibSharp.AsyncReadyCallbackWrapper(cb);
            cb_wrapper.PersistUntilCalled();
            unmanaged(this.Handle, cancellable == null ? IntPtr.Zero : cancellable.Handle, cb_wrapper.NativeDelegate, IntPtr.Zero);
        }
Beispiel #10
0
 public Task(IntPtr source_object, GLib.Cancellable cancellable, GLib.AsyncReadyCallback cb) : base(IntPtr.Zero)
 {
     if (GetType() != typeof(Task))
     {
         var vals  = new List <GLib.Value> ();
         var names = new List <string> ();
         CreateNativeObject(names.ToArray(), vals.ToArray());
         return;
     }
     GLibSharp.AsyncReadyCallbackWrapper cb_wrapper = new GLibSharp.AsyncReadyCallbackWrapper(cb);
     cb_wrapper.PersistUntilCalled();
     Raw = g_task_new(source_object, cancellable == null ? IntPtr.Zero : cancellable.Handle, cb_wrapper.NativeDelegate, IntPtr.Zero);
 }
 public SimpleAsyncResult(GLib.Object source_object, GLib.AsyncReadyCallback cb, IntPtr source_tag) : base(IntPtr.Zero)
 {
     if (GetType() != typeof(SimpleAsyncResult))
     {
         var vals  = new List <GLib.Value> ();
         var names = new List <string> ();
         CreateNativeObject(names.ToArray(), vals.ToArray());
         return;
     }
     GLibSharp.AsyncReadyCallbackWrapper cb_wrapper = new GLibSharp.AsyncReadyCallbackWrapper(cb);
     cb_wrapper.PersistUntilCalled();
     Raw = g_simple_async_result_new(source_object == null ? IntPtr.Zero : source_object.Handle, cb_wrapper.NativeDelegate, IntPtr.Zero, source_tag);
 }
        private void InternalNextAsync(GLib.Cancellable cancellable, GLib.AsyncReadyCallback cb)
        {
            NextAsyncNativeDelegate unmanaged = null;

            unsafe {
                IntPtr *raw_ptr = (IntPtr *)(((long)this.LookupGType().GetThresholdType().GetClassPtr()) + (long)class_abi.GetFieldOffset("next_async"));
                unmanaged = (NextAsyncNativeDelegate)Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(NextAsyncNativeDelegate));
            }
            if (unmanaged == null)
            {
                return;
            }

            GLibSharp.AsyncReadyCallbackWrapper cb_wrapper = new GLibSharp.AsyncReadyCallbackWrapper(cb);
            cb_wrapper.PersistUntilCalled();
            unmanaged(this.Handle, cancellable == null ? IntPtr.Zero : cancellable.Handle, cb_wrapper.NativeDelegate, IntPtr.Zero);
        }
 public void NextAsync(GLib.Cancellable cancellable, GLib.AsyncReadyCallback cb)
 {
     GLibSharp.AsyncReadyCallbackWrapper cb_wrapper = new GLibSharp.AsyncReadyCallbackWrapper(cb);
     cb_wrapper.PersistUntilCalled();
     g_socket_address_enumerator_next_async(Handle, cancellable == null ? IntPtr.Zero : cancellable.Handle, cb_wrapper.NativeDelegate, IntPtr.Zero);
 }
 protected virtual void OnNextAsync(GLib.Cancellable cancellable, GLib.AsyncReadyCallback cb)
 {
     InternalNextAsync(cancellable, cb);
 }
Beispiel #15
0
 public void LoadIconAsync(GLib.Cancellable cancellable, GLib.AsyncReadyCallback cb)
 {
     GLibSharp.AsyncReadyCallbackWrapper cb_wrapper = new GLibSharp.AsyncReadyCallbackWrapper(cb);
     gtk_icon_info_load_icon_async(Handle, cancellable == null ? IntPtr.Zero : cancellable.Handle, cb_wrapper.NativeDelegate, IntPtr.Zero);
 }
Beispiel #16
0
        private void InternalQueryInfoAsync(string attributes, int io_priority, GLib.Cancellable cancellable, GLib.AsyncReadyCallback cb)
        {
            QueryInfoAsyncNativeDelegate unmanaged = class_abi.BaseOverride <QueryInfoAsyncNativeDelegate>(this.LookupGType(), "query_info_async");

            if (unmanaged == null)
            {
                return;
            }

            IntPtr native_attributes = GLib.Marshaller.StringToPtrGStrdup(attributes);

            GLibSharp.AsyncReadyCallbackWrapper cb_wrapper = new GLibSharp.AsyncReadyCallbackWrapper(cb);
            cb_wrapper.PersistUntilCalled();
            unmanaged(this.Handle, native_attributes, io_priority, cancellable == null ? IntPtr.Zero : cancellable.Handle, cb_wrapper.NativeDelegate, IntPtr.Zero);
            GLib.Marshaller.Free(native_attributes);
        }
Beispiel #17
0
 public void LoadSymbolicForContextAsync(Gtk.StyleContext context, GLib.Cancellable cancellable, GLib.AsyncReadyCallback cb)
 {
     GLibSharp.AsyncReadyCallbackWrapper cb_wrapper = new GLibSharp.AsyncReadyCallbackWrapper(cb);
     gtk_icon_info_load_symbolic_for_context_async(Handle, context == null ? IntPtr.Zero : context.Handle, cancellable == null ? IntPtr.Zero : cancellable.Handle, cb_wrapper.NativeDelegate, IntPtr.Zero);
 }
Beispiel #18
0
 public void Unmount(GLib.MountUnmountFlags flags, GLib.Cancellable cancellable, GLib.AsyncReadyCallback cb)
 {
     GLibSharp.AsyncReadyCallbackWrapper cb_wrapper = new GLibSharp.AsyncReadyCallbackWrapper(cb);
     cb_wrapper.PersistUntilCalled();
     g_mount_unmount(Handle, (int)flags, cancellable == null ? IntPtr.Zero : cancellable.Handle, cb_wrapper.NativeDelegate, IntPtr.Zero);
 }
Beispiel #19
0
 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_mount_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);
 }
Beispiel #20
0
        public void LoadSymbolicAsync(Gdk.RGBA fg, Gdk.RGBA success_color, Gdk.RGBA warning_color, Gdk.RGBA error_color, GLib.Cancellable cancellable, GLib.AsyncReadyCallback cb)
        {
            IntPtr native_fg            = GLib.Marshaller.StructureToPtrAlloc(fg);
            IntPtr native_success_color = GLib.Marshaller.StructureToPtrAlloc(success_color);
            IntPtr native_warning_color = GLib.Marshaller.StructureToPtrAlloc(warning_color);
            IntPtr native_error_color   = GLib.Marshaller.StructureToPtrAlloc(error_color);

            GLibSharp.AsyncReadyCallbackWrapper cb_wrapper = new GLibSharp.AsyncReadyCallbackWrapper(cb);
            gtk_icon_info_load_symbolic_async(Handle, native_fg, native_success_color, native_warning_color, native_error_color, cancellable == null ? IntPtr.Zero : cancellable.Handle, cb_wrapper.NativeDelegate, IntPtr.Zero);
            Marshal.FreeHGlobal(native_fg);
            Marshal.FreeHGlobal(native_success_color);
            Marshal.FreeHGlobal(native_warning_color);
            Marshal.FreeHGlobal(native_error_color);
        }
		public AsyncReadyCallbackWrapper (GLib.AsyncReadyCallback managed)
		{
			this.managed = managed;
			if (managed != null)
				NativeDelegate = new AsyncReadyCallbackNative (NativeCallback);
		}
Beispiel #22
0
 public void ConnectAsync(GLib.IOStream connection, GLib.ProxyAddress proxy_address, GLib.Cancellable cancellable, GLib.AsyncReadyCallback cb)
 {
     GLibSharp.AsyncReadyCallbackWrapper cb_wrapper = new GLibSharp.AsyncReadyCallbackWrapper(cb);
     cb_wrapper.PersistUntilCalled();
     g_proxy_connect_async(Handle, connection == null ? IntPtr.Zero : connection.Handle, proxy_address == null ? IntPtr.Zero : proxy_address.Handle, cancellable == null ? IntPtr.Zero : cancellable.Handle, cb_wrapper.NativeDelegate, IntPtr.Zero);
 }
 protected virtual void OnSkipAsync(ulong count, int io_priority, GLib.Cancellable cancellable, GLib.AsyncReadyCallback cb)
 {
     InternalSkipAsync(count, io_priority, cancellable, cb);
 }
Beispiel #24
0
 public void GuessContentType(bool force_rescan, GLib.Cancellable cancellable, GLib.AsyncReadyCallback cb)
 {
     GLibSharp.AsyncReadyCallbackWrapper cb_wrapper = new GLibSharp.AsyncReadyCallbackWrapper(cb);
     cb_wrapper.PersistUntilCalled();
     g_mount_guess_content_type(Handle, force_rescan, cancellable == null ? IntPtr.Zero : cancellable.Handle, cb_wrapper.NativeDelegate, IntPtr.Zero);
 }
 protected virtual void OnCloseAsync(int io_priority, GLib.Cancellable cancellable, GLib.AsyncReadyCallback cb)
 {
     InternalCloseAsync(io_priority, cancellable, cb);
 }
Beispiel #26
0
 public void ReadAsync(byte[] buffer, ulong count, int io_priority, GLib.Cancellable cancellable, GLib.AsyncReadyCallback cb)
 {
     GLibSharp.AsyncReadyCallbackWrapper cb_wrapper = new GLibSharp.AsyncReadyCallbackWrapper(cb);
     cb_wrapper.PersistUntilCalled();
     g_input_stream_read_async(Handle, buffer, new UIntPtr(count), io_priority, cancellable == null ? IntPtr.Zero : cancellable.Handle, cb_wrapper.NativeDelegate, IntPtr.Zero);
 }
 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);
 }
Beispiel #28
0
 protected virtual void OnQueryInfoAsync(string attributes, int io_priority, GLib.Cancellable cancellable, GLib.AsyncReadyCallback cb)
 {
     InternalQueryInfoAsync(attributes, io_priority, cancellable, cb);
 }
        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);
        }
Beispiel #30
0
        public void QueryInfoAsync(string attributes, int io_priority, GLib.Cancellable cancellable, GLib.AsyncReadyCallback cb)
        {
            IntPtr native_attributes = GLib.Marshaller.StringToPtrGStrdup(attributes);

            GLibSharp.AsyncReadyCallbackWrapper cb_wrapper = new GLibSharp.AsyncReadyCallbackWrapper(cb);
            cb_wrapper.PersistUntilCalled();
            g_file_output_stream_query_info_async(Handle, native_attributes, io_priority, cancellable == null ? IntPtr.Zero : cancellable.Handle, cb_wrapper.NativeDelegate, IntPtr.Zero);
            GLib.Marshaller.Free(native_attributes);
        }
        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);
        }