Exemple #1
0
 static void OverrideQueryTooltip(GLib.GType gtype, QueryTooltipNativeDelegate callback)
 {
     unsafe {
         IntPtr *raw_ptr = (IntPtr *)(((long)gtype.GetClassPtr()) + (long)class_abi.GetFieldOffset("query_tooltip"));
         *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate)callback);
     }
 }
Exemple #2
0
        private bool InternalQueryTooltip(int x, int y, bool keyboard_mode, Gtk.Tooltip tooltip)
        {
            QueryTooltipNativeDelegate unmanaged = class_abi.BaseOverride <QueryTooltipNativeDelegate>(this.LookupGType(), "query_tooltip");

            if (unmanaged == null)
            {
                return(false);
            }

            bool __result = unmanaged(this.Handle, x, y, keyboard_mode, tooltip == null ? IntPtr.Zero : tooltip.Handle);

            return(__result);
        }
        private bool InternalQueryTooltip(int x, int y, bool keyboard_mode, Gtk.Tooltip tooltip)
        {
            QueryTooltipNativeDelegate unmanaged = null;

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

            bool __result = unmanaged(this.Handle, x, y, keyboard_mode, tooltip == null ? IntPtr.Zero : tooltip.Handle);

            return(__result);
        }
Exemple #4
0
		static void OverrideQueryTooltip (GLib.GType gtype, QueryTooltipNativeDelegate callback)
		{
			GtkStatusIconClass class_iface = GetClassStruct (gtype, false);
			class_iface.QueryTooltip = callback;
			OverrideClassStruct (gtype, class_iface);
		}