Exemple #1
0
 static void SetValue_cb(IntPtr inst, double new_value)
 {
     try {
         IValueImplementor __obj = GLib.Object.GetObject(inst, false) as IValueImplementor;
         __obj.Value = new_value;
     } catch (Exception e) {
         GLib.ExceptionManager.RaiseUnhandledException(e, false);
     }
 }
Exemple #2
0
 static void GetValueAndText_cb(IntPtr inst, out double value, IntPtr text)
 {
     try {
         IValueImplementor __obj = GLib.Object.GetObject(inst, false) as IValueImplementor;
         __obj.GetValueAndText(out value, GLib.Marshaller.PtrToStringGFree(text));
     } catch (Exception e) {
         GLib.ExceptionManager.RaiseUnhandledException(e, true);
         // NOTREACHED: above call does not return.
         throw e;
     }
 }
Exemple #3
0
 public ValueAdapter(IValueImplementor implementor)
 {
     if (implementor == null)
     {
         throw new ArgumentNullException("implementor");
     }
     else if (!(implementor is GLib.Object))
     {
         throw new ArgumentException("implementor must be a subclass of GLib.Object");
     }
     this.implementor = implementor as GLib.Object;
 }
Exemple #4
0
 static bool SetCurrentValue_cb(IntPtr inst, IntPtr value)
 {
     try {
         IValueImplementor __obj = GLib.Object.GetObject(inst, false) as IValueImplementor;
         bool __result;
         __result = __obj.SetCurrentValue((GLib.Value)Marshal.PtrToStructure(value, typeof(GLib.Value)));
         return(__result);
     } catch (Exception e) {
         GLib.ExceptionManager.RaiseUnhandledException(e, true);
         // NOTREACHED: above call does not return.
         throw e;
     }
 }
Exemple #5
0
 static IntPtr GetSubRanges_cb(IntPtr inst)
 {
     try {
         IValueImplementor __obj = GLib.Object.GetObject(inst, false) as IValueImplementor;
         GLib.SList        __result;
         __result = __obj.SubRanges;
         return(__result == null ? IntPtr.Zero : __result.Handle);
     } catch (Exception e) {
         GLib.ExceptionManager.RaiseUnhandledException(e, true);
         // NOTREACHED: above call does not return.
         throw e;
     }
 }
Exemple #6
0
 static double GetIncrement_cb(IntPtr inst)
 {
     try {
         IValueImplementor __obj = GLib.Object.GetObject(inst, false) as IValueImplementor;
         double            __result;
         __result = __obj.Increment;
         return(__result);
     } catch (Exception e) {
         GLib.ExceptionManager.RaiseUnhandledException(e, true);
         // NOTREACHED: above call does not return.
         throw e;
     }
 }
Exemple #7
0
 static void GetMinimumValue_cb(IntPtr inst, IntPtr value)
 {
     try {
         IValueImplementor __obj   = GLib.Object.GetObject(inst, false) as IValueImplementor;
         GLib.Value        myvalue = (GLib.Value)Marshal.PtrToStructure(value, typeof(GLib.Value));
         __obj.GetMinimumValue(ref myvalue);
         if (value != IntPtr.Zero)
         {
             System.Runtime.InteropServices.Marshal.StructureToPtr(myvalue, value, false);
         }
     } catch (Exception e) {
         GLib.ExceptionManager.RaiseUnhandledException(e, false);
     }
 }
Exemple #8
0
		public ValueAdapter (IValueImplementor implementor)
		{
			if (implementor == null)
				throw new ArgumentNullException ("implementor");
			else if (!(implementor is GLib.Object))
				throw new ArgumentException ("implementor must be a subclass of GLib.Object");
			this.implementor = implementor as GLib.Object;
		}