Ejemplo n.º 1
0
        static int InputSignalCallback(IntPtr inst, out double arg0, IntPtr gch)
        {
            Gtk.InputArgs args = new Gtk.InputArgs();
            try {
                GLib.Signal sig = ((GCHandle)gch).Target as GLib.Signal;
                if (sig == null)
                {
                    throw new Exception("Unknown signal GC handle received " + gch);
                }

                args.Args = new object[1];
                Gtk.InputHandler handler = (Gtk.InputHandler)sig.Handler;
                handler(GLib.Object.GetObject(inst), args);
            } catch (Exception e) {
                GLib.ExceptionManager.RaiseUnhandledException(e, false);
            }

            try {
                arg0 = ((double)args.Args[0]);
                return((int)args.RetVal);
            } catch (Exception) {
                Exception ex = new Exception("args.RetVal or 'out' property unset or set to incorrect type in Gtk.InputHandler callback");
                GLib.ExceptionManager.RaiseUnhandledException(ex, true);
                // NOTREACHED: above call doesn't return.
                throw ex;
            }
        }
Ejemplo n.º 2
0
 public void HandleInput(object o, Gtk.InputArgs args)
 {
     args.NewValue = Handler.Control.Value;
     args.RetVal   = 1;
 }
Ejemplo n.º 3
0
		static int InputSignalCallback (IntPtr inst, out double arg0, IntPtr gch)
		{
			Gtk.InputArgs args = new Gtk.InputArgs ();
			try {
				GLib.Signal sig = ((GCHandle) gch).Target as GLib.Signal;
				if (sig == null)
					throw new Exception("Unknown signal GC handle received " + gch);

				args.Args = new object[1];
				Gtk.InputHandler handler = (Gtk.InputHandler) sig.Handler;
				handler (GLib.Object.GetObject (inst), args);
			} catch (Exception e) {
				GLib.ExceptionManager.RaiseUnhandledException (e, false);
			}

			try {
				arg0 = ((double)args.Args[0]);
				return ((int) args.RetVal);
			} catch (Exception) {
				Exception ex = new Exception ("args.RetVal or 'out' property unset or set to incorrect type in Gtk.InputHandler callback");
				GLib.ExceptionManager.RaiseUnhandledException (ex, true);
				// NOTREACHED: above call doesn't return.
				throw ex;
			}
		}