Exemplo n.º 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);
     }
 }
Exemplo n.º 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);
        }
Exemplo n.º 3
0
        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);
        }
Exemplo n.º 4
0
		static void OverrideQueryTooltip (GLib.GType gtype, QueryTooltipNativeDelegate callback)
		{
			GtkStatusIconClass class_iface = GetClassStruct (gtype, false);
			class_iface.QueryTooltip = callback;
			OverrideClassStruct (gtype, class_iface);
		}