static Delegate TryBindGtkInternals(WindowTransparencyDecorator instance) { if (internalBindingTried) { if (!internalBindingWorks) { return(null); } } else { internalBindingTried = true; } try { Type delType = typeof(Gtk.Widget).Assembly.GetType("GtkSharp.KeySnoopFuncNative"); System.Reflection.MethodInfo met = typeof(WindowTransparencyDecorator).GetMethod("TransparencyKeySnooper", System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic); Delegate ret = Delegate.CreateDelegate(delType, instance, met); if (ret != null) { return(ret); } } catch {} internalBindingWorks = false; MonoDevelop.Core.LoggingService.LogWarning("GTK# API has changed, and control-transparency will not be available for popups"); return(null); }
protected override void OnDestroyed() { base.OnDestroyed(); if (decorator != null) { { decorator.Detach(); decorator = null; } } }
protected override void OnDestroyed () { base.OnDestroyed (); if (decorator != null) { decorator.Detach (); decorator = null; } }
static Delegate TryBindGtkInternals (WindowTransparencyDecorator instance) { if (internalBindingTried) { if (!internalBindingWorks) return null; } else { internalBindingTried = true; } try { Type delType = typeof(Gtk.Widget).Assembly.GetType ("GtkSharp.KeySnoopFuncNative"); System.Reflection.MethodInfo met = typeof (WindowTransparencyDecorator).GetMethod ("TransparencyKeySnooper", System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic); Delegate ret = Delegate.CreateDelegate (delType, instance, met); if (ret != null) return ret; } catch {} internalBindingWorks = false; MonoDevelop.Core.LoggingService.LogWarning ("GTK# API has changed, and control-transparency will not be available for popups"); return null; }