本文整理汇总了C#中Gdk.Destroy方法的典型用法代码示例。如果您正苦于以下问题:C# Gdk.Destroy方法的具体用法?C# Gdk.Destroy怎么用?C# Gdk.Destroy使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Gdk
的用法示例。
在下文中一共展示了Gdk.Destroy方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: WindowDestroy
public static void WindowDestroy (Gdk.Window window)
{
// There is a bug in GDK, and subsequently in Gdk# 2.8.5 through 2.12.1
// where the managed Gdk.Window.Destroy function does not obtain a
// normal reference (non-toggle) on the GdkWindow before calling
// _destroy on it, which the native function apparently expects.
// https://bugzilla.novell.com/show_bug.cgi?id=382186
// http://anonsvn.mono-project.com/viewcvs/trunk/gtk-sharp/gdk/Window.custom?rev=101734&r1=42529&r2=101734
if (window == null) {
return;
}
if (!toggle_ref_supported) {
window.Destroy ();
return;
}
// If this ever happens I will move out west and start farming...
if (g_object_ref == null || gdk_window_destroy == null) {
window.Destroy ();
return;
}
if (invoke_args == null) {
invoke_args = new object[1];
}
invoke_args[0] = window.Handle;
g_object_ref.Invoke (null, invoke_args);
gdk_window_destroy.Invoke (null, invoke_args);
window.Dispose ();
}