예제 #1
0
 static void OverrideTextPushed(GLib.GType gtype, TextPushedNativeDelegate callback)
 {
     unsafe {
         IntPtr *raw_ptr = (IntPtr *)(((long)gtype.GetClassPtr()) + (long)class_abi.GetFieldOffset("text_pushed"));
         *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate)callback);
     }
 }
예제 #2
0
        private void InternalTextPushed(uint context_id, string text)
        {
            TextPushedNativeDelegate unmanaged = class_abi.BaseOverride <TextPushedNativeDelegate>(this.LookupGType(), "text_pushed");

            if (unmanaged == null)
            {
                return;
            }

            IntPtr native_text = GLib.Marshaller.StringToPtrGStrdup(text);

            unmanaged(this.Handle, context_id, native_text);
            GLib.Marshaller.Free(native_text);
        }
예제 #3
0
        private void InternalTextPushed(uint context_id, string text)
        {
            TextPushedNativeDelegate unmanaged = null;

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

            IntPtr native_text = GLib.Marshaller.StringToPtrGStrdup(text);

            unmanaged(this.Handle, context_id, native_text);
            GLib.Marshaller.Free(native_text);
        }
예제 #4
0
		static void OverrideTextPushed (GLib.GType gtype, TextPushedNativeDelegate callback)
		{
			GtkStatusbarClass class_iface = GetClassStruct (gtype, false);
			class_iface.TextPushed = callback;
			OverrideClassStruct (gtype, class_iface);
		}