Exemplo n.º 1
0
 static void LoadAsyncCallback(IntPtr icon, int size, IntPtr cancellable, GLibSharp.AsyncReadyCallbackNative cb, IntPtr user_data)
 {
     try {
         GLib.LoadableIconImplementor        __obj      = GLib.Object.GetObject(icon, false) as GLib.LoadableIconImplementor;
         GLibSharp.AsyncReadyCallbackInvoker cb_invoker = new GLibSharp.AsyncReadyCallbackInvoker(cb, user_data);
         __obj.LoadAsync(size, GLib.Object.GetObject(cancellable) as GLib.Cancellable, cb_invoker.Handler);
     } catch (Exception e) {
         GLib.ExceptionManager.RaiseUnhandledException(e, false);
     }
 }
Exemplo n.º 2
0
        static IntPtr LoadFinishCallback(IntPtr icon, IntPtr res, IntPtr type, out IntPtr error)
        {
            error = IntPtr.Zero;

            try {
                GLib.LoadableIconImplementor __obj    = GLib.Object.GetObject(icon, false) as GLib.LoadableIconImplementor;
                GLib.InputStream             __result = __obj.LoadFinish(GLib.AsyncResultAdapter.GetObject(res, false), GLib.Marshaller.PtrToStringGFree(type));
                return(__result == null ? IntPtr.Zero : __result.Handle);
            } catch (Exception e) {
                GLib.ExceptionManager.RaiseUnhandledException(e, true);
                // NOTREACHED: above call does not return.
                throw e;
            }
        }