Ejemplo n.º 1
0
 static void OverrideColorSet(GLib.GType gtype, ColorSetNativeDelegate callback)
 {
     unsafe {
         IntPtr *raw_ptr = (IntPtr *)(((long)gtype.GetClassPtr()) + (long)class_abi.GetFieldOffset("color_set"));
         *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate)callback);
     }
 }
Ejemplo n.º 2
0
        private void InternalColorSet()
        {
            ColorSetNativeDelegate unmanaged = class_abi.BaseOverride <ColorSetNativeDelegate>(this.LookupGType(), "color_set");

            if (unmanaged == null)
            {
                return;
            }

            unmanaged(this.Handle);
        }
Ejemplo n.º 3
0
        private void InternalColorSet()
        {
            ColorSetNativeDelegate unmanaged = null;

            unsafe {
                IntPtr *raw_ptr = (IntPtr *)(((long)this.LookupGType().GetThresholdType().GetClassPtr()) + (long)class_abi.GetFieldOffset("color_set"));
                unmanaged = (ColorSetNativeDelegate)Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(ColorSetNativeDelegate));
            }
            if (unmanaged == null)
            {
                return;
            }

            unmanaged(this.Handle);
        }
Ejemplo n.º 4
0
		static void OverrideColorSet (GLib.GType gtype, ColorSetNativeDelegate callback)
		{
			GtkColorButtonClass class_iface = GetClassStruct (gtype, false);
			class_iface.ColorSet = callback;
			OverrideClassStruct (gtype, class_iface);
		}