Exemplo n.º 1
0
 static void InitAsyncCallback(IntPtr initable, int io_priority, IntPtr cancellable, GLibSharp.AsyncReadyCallbackNative cb, IntPtr user_data)
 {
     try {
         GLib.AsyncInitableImplementor       __obj      = GLib.Object.GetObject(initable, false) as GLib.AsyncInitableImplementor;
         GLibSharp.AsyncReadyCallbackInvoker cb_invoker = new GLibSharp.AsyncReadyCallbackInvoker(cb, user_data);
         __obj.InitAsync(io_priority, GLib.Object.GetObject(cancellable) as GLib.Cancellable, cb_invoker.Handler);
     } catch (Exception e) {
         GLib.ExceptionManager.RaiseUnhandledException(e, false);
     }
 }
Exemplo n.º 2
0
        static bool InitFinishCallback(IntPtr initable, IntPtr res, out IntPtr error)
        {
            error = IntPtr.Zero;

            try {
                GLib.AsyncInitableImplementor __obj = GLib.Object.GetObject(initable, false) as GLib.AsyncInitableImplementor;
                bool __result = __obj.InitFinish(GLib.AsyncResultAdapter.GetObject(res, false));
                return(__result);
            } catch (Exception e) {
                GLib.ExceptionManager.RaiseUnhandledException(e, true);
                // NOTREACHED: above call does not return.
                throw e;
            }
        }