Пример #1
0
        public static Gnome.GdkPixbufAsyncHandle PixbufNewFromUriAsync(string uri, Gnome.GdkPixbufLoadCallback load_callback, Gnome.GdkPixbufDoneCallback done_callback)
        {
            IntPtr native_uri = GLib.Marshaller.StringToPtrGStrdup(uri);

            GnomeSharp.GdkPixbufLoadCallbackWrapper load_callback_wrapper = new GnomeSharp.GdkPixbufLoadCallbackWrapper(load_callback);
            GnomeSharp.GdkPixbufDoneCallbackWrapper done_callback_wrapper = new GnomeSharp.GdkPixbufDoneCallbackWrapper(done_callback);
            IntPtr raw_ret = gnome_gdk_pixbuf_new_from_uri_async(native_uri, load_callback_wrapper.NativeDelegate, done_callback_wrapper.NativeDelegate, IntPtr.Zero);

            Gnome.GdkPixbufAsyncHandle ret = raw_ret == IntPtr.Zero ? null : (Gnome.GdkPixbufAsyncHandle)GLib.Opaque.GetOpaque(raw_ret, typeof(Gnome.GdkPixbufAsyncHandle), false);
            GLib.Marshaller.Free(native_uri);
            return(ret);
        }
 void InvokeNative(Gnome.GdkPixbufAsyncHandle handle, Gnome.Vfs.Result error, Gdk.Pixbuf pixbuf)
 {
     native_cb(handle == null ? IntPtr.Zero : handle.Handle, (int)error, pixbuf == null ? IntPtr.Zero : pixbuf.Handle, __data);
 }
Пример #3
0
 void InvokeNative(Gnome.GdkPixbufAsyncHandle handle)
 {
     native_cb(handle == null ? IntPtr.Zero : handle.Handle, __data);
 }
Пример #4
0
 public static void PixbufNewFromUriCancel(Gnome.GdkPixbufAsyncHandle handle)
 {
     gnome_gdk_pixbuf_new_from_uri_cancel(handle == null ? IntPtr.Zero : handle.Handle);
 }