From 90bbc67f3c771ac1b72275c1ac47c60752d165a6 Mon Sep 17 00:00:00 2001 From: cra0zy Date: Sat, 25 Nov 2017 02:01:55 +0100 Subject: [PATCH] Remove static glue code --- Source/Libs/AtkSharp/Misc.cs | 39 --- Source/Libs/AtkSharp/Util.cs | 113 -------- Source/Libs/GtkSharp/CellRenderer.cs | 52 ---- Source/Libs/GtkSharp/Container.cs | 377 ++++++++++++--------------- Source/Libs/GtkSharp/meson.build | 163 ------------ 5 files changed, 172 insertions(+), 572 deletions(-) delete mode 100755 Source/Libs/AtkSharp/Misc.cs delete mode 100755 Source/Libs/AtkSharp/Util.cs mode change 100755 => 100644 Source/Libs/GtkSharp/Container.cs delete mode 100755 Source/Libs/GtkSharp/meson.build diff --git a/Source/Libs/AtkSharp/Misc.cs b/Source/Libs/AtkSharp/Misc.cs deleted file mode 100755 index ffec16bf3..000000000 --- a/Source/Libs/AtkSharp/Misc.cs +++ /dev/null @@ -1,39 +0,0 @@ -// Misc.cs - Atk Misc class customizations -// -// Author: Mike Kestner -// -// Copyright (c) 2008 Novell, Inc. -// -// This code is inserted after the automatically generated code. -// -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of version 2 of the Lesser GNU General -// Public License as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this program; if not, write to the -// Free Software Foundation, Inc., 59 Temple Place - Suite 330, -// Boston, MA 02111-1307, USA. - -namespace Atk { - - using System; - using System.Runtime.InteropServices; - - public partial class Misc { - - [DllImport("atksharpglue-3")] - static extern void atksharp_misc_set_singleton_instance (IntPtr misc); - - public static void SetSingletonInstance (Misc misc) - { - atksharp_misc_set_singleton_instance (misc.Handle); - } - } -} diff --git a/Source/Libs/AtkSharp/Util.cs b/Source/Libs/AtkSharp/Util.cs deleted file mode 100755 index e8d8ba169..000000000 --- a/Source/Libs/AtkSharp/Util.cs +++ /dev/null @@ -1,113 +0,0 @@ -// Util.cs - Atk Util class customizations -// -// Author: Mike Kestner -// -// Copyright (c) 2008 Novell, Inc. -// -// This code is inserted after the automatically generated code. -// -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of version 2 of the Lesser GNU General -// Public License as published by the Free Software Foundation. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this program; if not, write to the -// Free Software Foundation, Inc., 59 Temple Place - Suite 330, -// Boston, MA 02111-1307, USA. - -namespace Atk { - - using System; - using System.Runtime.InteropServices; - - public partial class Util { - - [UnmanagedFunctionPointer (CallingConvention.Cdecl)] - delegate uint AddGlobalEventListenerNativeDelegate (GLib.Signal.EmissionHookNative hook, IntPtr event_type); - - static AddGlobalEventListenerDelegate add_global_event_listener_handler; - static AddGlobalEventListenerNativeDelegate add_global_event_listener_callback; - - static uint AddGlobalEventListenerCallback (GLib.Signal.EmissionHookNative hook, IntPtr event_type) - { - try { - return add_global_event_listener_handler (new GLib.Signal.EmissionHookMarshaler (hook, IntPtr.Zero).Invoker, GLib.Marshaller.Utf8PtrToString (event_type)); - } catch (Exception e) { - GLib.ExceptionManager.RaiseUnhandledException (e, false); - } - return 0; - } - - public delegate uint AddGlobalEventListenerDelegate (GLib.Signal.EmissionHook hook, string event_type); - - [DllImport("atksharpglue-3")] - static extern void atksharp_util_override_add_global_event_listener (AddGlobalEventListenerNativeDelegate cb); - public static AddGlobalEventListenerDelegate AddGlobalEventListenerHandler { - set { - add_global_event_listener_handler = value; - if (add_global_event_listener_callback == null) - add_global_event_listener_callback = new AddGlobalEventListenerNativeDelegate (AddGlobalEventListenerCallback); - atksharp_util_override_add_global_event_listener (add_global_event_listener_callback); - } - } - - [UnmanagedFunctionPointer (CallingConvention.Cdecl)] - delegate void RemoveListenerNativeDelegate (uint listener_id); - - static RemoveListenerDelegate remove_global_event_listener_handler; - static RemoveListenerNativeDelegate remove_global_event_listener_callback; - - static void RemoveGlobalEventListenerCallback (uint listener_id) - { - try { - remove_global_event_listener_handler (listener_id); - } catch (Exception e) { - GLib.ExceptionManager.RaiseUnhandledException (e, false); - } - } - - [DllImport("atksharpglue-3")] - static extern void atksharp_util_override_remove_global_event_listener (RemoveListenerNativeDelegate cb); - - public delegate void RemoveListenerDelegate (uint listener_id); - - public static RemoveListenerDelegate RemoveGlobalEventListenerHandler { - set { - remove_global_event_listener_handler = value; - if (remove_global_event_listener_callback == null) - remove_global_event_listener_callback = new RemoveListenerNativeDelegate (RemoveGlobalEventListenerCallback); - atksharp_util_override_remove_global_event_listener (remove_global_event_listener_callback); - } - } - - static RemoveListenerDelegate remove_key_event_listener_handler; - static RemoveListenerNativeDelegate remove_key_event_listener_callback; - - static void RemoveKeyEventListenerCallback (uint listener_id) - { - try { - remove_key_event_listener_handler (listener_id); - } catch (Exception e) { - GLib.ExceptionManager.RaiseUnhandledException (e, false); - } - } - - [DllImport("atksharpglue-3")] - static extern void atksharp_util_override_remove_key_event_listener (RemoveListenerNativeDelegate cb); - - public static RemoveListenerDelegate RemoveKeyEventListenerHandler { - set { - remove_key_event_listener_handler = value; - if (remove_key_event_listener_callback == null) - remove_key_event_listener_callback = new RemoveListenerNativeDelegate (RemoveKeyEventListenerCallback); - atksharp_util_override_remove_key_event_listener (remove_key_event_listener_callback); - } - } - } -} diff --git a/Source/Libs/GtkSharp/CellRenderer.cs b/Source/Libs/GtkSharp/CellRenderer.cs index 889f8e459..76ff5fdfa 100755 --- a/Source/Libs/GtkSharp/CellRenderer.cs +++ b/Source/Libs/GtkSharp/CellRenderer.cs @@ -52,57 +52,5 @@ namespace Gtk { // TODO: Implement "nullable" attribute for value type parameters in GAPI [UnmanagedFunctionPointer (CallingConvention.Cdecl)] delegate void OnGetSizeDelegate (IntPtr item, IntPtr widget, IntPtr cell_area_ptr, IntPtr x_offset, IntPtr y_offset, IntPtr width, IntPtr height); - - static void OnGetSize_cb (IntPtr item, IntPtr widget, IntPtr cell_area_ptr, IntPtr x_offset, IntPtr y_offset, IntPtr width, IntPtr height) - { - try { - CellRenderer obj = GLib.Object.GetObject (item, false) as CellRenderer; - Gtk.Widget widg = GLib.Object.GetObject (widget, false) as Gtk.Widget; - Gdk.Rectangle cell_area = Gdk.Rectangle.Zero; - if (cell_area_ptr != IntPtr.Zero) - cell_area = Gdk.Rectangle.New (cell_area_ptr); - int a, b, c, d; - - obj.OnGetSize (widg, ref cell_area, out a, out b, out c, out d); - if (x_offset != IntPtr.Zero) - Marshal.WriteInt32 (x_offset, a); - if (y_offset != IntPtr.Zero) - Marshal.WriteInt32 (y_offset, b); - if (width != IntPtr.Zero) - Marshal.WriteInt32 (width, c); - if (height != IntPtr.Zero) - Marshal.WriteInt32 (height, d); - } catch (Exception e) { - GLib.ExceptionManager.RaiseUnhandledException (e, false); - } - } - - [DllImport("gtksharpglue-3")] - static extern void gtksharp_cellrenderer_override_get_size (IntPtr gtype, OnGetSizeDelegate cb); - - static OnGetSizeDelegate OnGetSizeCallback; - static void OverrideOnGetSize (GLib.GType gtype) - { - if (OnGetSizeCallback == null) - OnGetSizeCallback = new OnGetSizeDelegate (OnGetSize_cb); - gtksharp_cellrenderer_override_get_size (gtype.Val, OnGetSizeCallback); - } - - [GLib.DefaultSignalHandler (Type=typeof(Gtk.CellRenderer), ConnectionMethod="OverrideOnGetSize")] - protected virtual void OnGetSize (Gtk.Widget widget, ref Gdk.Rectangle cell_area, out int x_offset, out int y_offset, out int width, out int height) - { - InternalOnGetSize (widget, ref cell_area, out x_offset, out y_offset, out width, out height); - } - - [DllImport("gtksharpglue-3")] - static extern void gtksharp_cellrenderer_base_get_size (IntPtr cell, IntPtr widget, IntPtr cell_area, out int x_offset, out int y_offset, out int width, out int height); - - private void InternalOnGetSize (Gtk.Widget widget, ref Gdk.Rectangle cell_area, out int x_offset, out int y_offset, out int width, out int height) - { - IntPtr native_cell_area = GLib.Marshaller.StructureToPtrAlloc (cell_area); - gtksharp_cellrenderer_base_get_size (Handle, widget == null ? IntPtr.Zero : widget.Handle, native_cell_area, out x_offset, out y_offset, out width, out height); - cell_area = Gdk.Rectangle.New (native_cell_area); - Marshal.FreeHGlobal (native_cell_area); - } } } diff --git a/Source/Libs/GtkSharp/Container.cs b/Source/Libs/GtkSharp/Container.cs old mode 100755 new mode 100644 index 5bf74712b..a4af7ebd0 --- a/Source/Libs/GtkSharp/Container.cs +++ b/Source/Libs/GtkSharp/Container.cs @@ -18,244 +18,211 @@ // Free Software Foundation, Inc., 59 Temple Place - Suite 330, // Boston, MA 02111-1307, USA. -namespace Gtk { +namespace Gtk +{ - using System; - using System.Collections; - using System.Runtime.InteropServices; + using System; + using System.Collections; + using System.Runtime.InteropServices; - public partial class Container : IEnumerable { + public partial class Container : IEnumerable + { + [DllImport(Global.GtkNativeDll)] + static extern GParamSpec gtk_container_class_find_child_property (IntPtr cclass, string property_name); - [DllImport("gtksharpglue-3")] - static extern void gtksharp_container_child_get_property (IntPtr container, IntPtr child, IntPtr property, ref GLib.Value value); + [DllImport(Global.GtkNativeDll)] + static extern void gtk_container_child_get_property(IntPtr container, IntPtr child, string property_name, ref GLib.Value value); - public GLib.Value ChildGetProperty (Gtk.Widget child, string property_name) { - GLib.Value value = new GLib.Value (); + struct GTypeInstance + { + public IntPtr GTypeClass; + } - IntPtr native = GLib.Marshaller.StringToPtrGStrdup (property_name); - gtksharp_container_child_get_property (Handle, child.Handle, native, ref value); - GLib.Marshaller.Free (native); - return value; - } + struct GParamSpec + { + public GTypeInstance g_type_instance; - public IEnumerator GetEnumerator () - { - return Children.GetEnumerator (); - } + public IntPtr name; + public int flags; + public GLib.GType value_type; + public GLib.GType owner_type; - class ChildAccumulator { - public ArrayList Children = new ArrayList (); + IntPtr _nick; + IntPtr _blurb; + IntPtr qdata; + uint ref_count; + uint param_id; + }; - public void Add (Gtk.Widget widget) - { - Children.Add (widget); - } - } + public GLib.Value ChildGetProperty(Gtk.Widget child, string property_name) + { + var value = new GLib.Value(); + var cclass = ((GTypeInstance)Marshal.PtrToStructure(Handle, typeof(GTypeInstance))).GTypeClass; + var prop = gtk_container_class_find_child_property(cclass, property_name); - public IEnumerable AllChildren { - get { - ChildAccumulator acc = new ChildAccumulator (); - Forall (new Gtk.Callback (acc.Add)); - return acc.Children; - } - } + value.Init(prop.value_type); + gtk_container_child_get_property(Handle, child.Handle, property_name, ref value); - [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern bool gtk_container_get_focus_chain (IntPtr raw, out IntPtr list_ptr); + return value; + } - [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void gtk_container_set_focus_chain (IntPtr raw, IntPtr list_ptr); + public IEnumerator GetEnumerator() + { + return Children.GetEnumerator(); + } - public Widget[] FocusChain { - get { - IntPtr list_ptr; - bool success = gtk_container_get_focus_chain (Handle, out list_ptr); - if (!success) - return new Widget [0]; + class ChildAccumulator + { + public ArrayList Children = new ArrayList(); - GLib.List list = new GLib.List (list_ptr); - Widget[] result = new Widget [list.Count]; - for (int i = 0; i < list.Count; i++) - result [i] = list [i] as Widget; - return result; - } - set { - GLib.List list = new GLib.List (IntPtr.Zero); - foreach (Widget val in value) - list.Append (val.Handle); - gtk_container_set_focus_chain (Handle, list.Handle); - } + public void Add(Gtk.Widget widget) + { + Children.Add(widget); + } + } - } + public IEnumerable AllChildren + { + get + { + ChildAccumulator acc = new ChildAccumulator(); + Forall(new Gtk.Callback(acc.Add)); + return acc.Children; + } + } - [DllImport("gtksharpglue-3")] - static extern void gtksharp_container_base_forall (IntPtr handle, bool include_internals, IntPtr cb, IntPtr data); + [DllImport(Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] + static extern bool gtk_container_get_focus_chain(IntPtr raw, out IntPtr list_ptr); - [DllImport("gtksharpglue-3")] - static extern void gtksharp_container_override_forall (IntPtr gtype, ForallDelegate cb); + [DllImport(Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] + static extern void gtk_container_set_focus_chain(IntPtr raw, IntPtr list_ptr); - [DllImport("gtksharpglue-3")] - static extern void gtksharp_container_invoke_gtk_callback (IntPtr cb, IntPtr handle, IntPtr data); + public Widget[] FocusChain + { + get + { + IntPtr list_ptr; + bool success = gtk_container_get_focus_chain(Handle, out list_ptr); + if (!success) + return new Widget[0]; - [UnmanagedFunctionPointer (CallingConvention.Cdecl)] - delegate void ForallDelegate (IntPtr container, bool include_internals, IntPtr cb, IntPtr data); + GLib.List list = new GLib.List(list_ptr); + Widget[] result = new Widget[list.Count]; + for (int i = 0; i < list.Count; i++) + result[i] = list[i] as Widget; + return result; + } + set + { + GLib.List list = new GLib.List(IntPtr.Zero); + foreach (Widget val in value) + list.Append(val.Handle); + gtk_container_set_focus_chain(Handle, list.Handle); + } - static ForallDelegate ForallOldCallback; - static ForallDelegate ForallCallback; + } - public struct CallbackInvoker { - IntPtr cb; - IntPtr data; + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + delegate void ForallDelegate(IntPtr container, bool include_internals, IntPtr cb, IntPtr data); - internal CallbackInvoker (IntPtr cb, IntPtr data) - { - this.cb = cb; - this.data = data; - } + static ForallDelegate ForallOldCallback; + static ForallDelegate ForallCallback; - internal IntPtr Data { - get { - return data; - } - } + public struct CallbackInvoker + { + IntPtr cb; + IntPtr data; - internal IntPtr Callback { - get { - return cb; - } - } + internal CallbackInvoker(IntPtr cb, IntPtr data) + { + this.cb = cb; + this.data = data; + } - public void Invoke (Widget w) - { - gtksharp_container_invoke_gtk_callback (cb, w.Handle, data); - } - } + internal IntPtr Data + { + get + { + return data; + } + } - static void ForallOld_cb (IntPtr container, bool include_internals, IntPtr cb, IntPtr data) - { - try { - //GtkContainer's unmanaged dispose calls forall, but by that time the managed object is gone - //so it couldn't do anything useful, and resurrecting it would cause a resurrection cycle. - //In that case, just chain to the native base in case it can do something. - Container obj = (Container) GLib.Object.TryGetObject (container); - if (obj != null) { - CallbackInvoker invoker = new CallbackInvoker (cb, data); - obj.ForAll (include_internals, invoker); - } else { - gtksharp_container_base_forall (container, include_internals, cb, data); - } - } catch (Exception e) { - GLib.ExceptionManager.RaiseUnhandledException (e, false); - } - } + internal IntPtr Callback + { + get + { + return cb; + } + } + } - static void OverrideForallOld (GLib.GType gtype) - { - if (ForallOldCallback == null) - ForallOldCallback = new ForallDelegate (ForallOld_cb); - gtksharp_container_override_forall (gtype.Val, ForallOldCallback); - } + // Compatibility code for old ChildType() virtual method + static IntPtr ObsoleteChildType_cb(IntPtr raw) + { + try + { + Container obj = GLib.Object.GetObject(raw, false) as Container; + GLib.GType gtype = obj.ChildType(); + return gtype.Val; + } + catch (Exception e) + { + GLib.ExceptionManager.RaiseUnhandledException(e, false); + } - [Obsolete ("Override the ForAll(bool,Gtk.Callback) method instead")] - [GLib.DefaultSignalHandler (Type=typeof(Gtk.Container), ConnectionMethod="OverrideForallOld")] - protected virtual void ForAll (bool include_internals, CallbackInvoker invoker) - { - gtksharp_container_base_forall (Handle, include_internals, invoker.Callback, invoker.Data); - } + return GLib.GType.Invalid.Val; + } - static void Forall_cb (IntPtr container, bool include_internals, IntPtr cb, IntPtr data) - { - try { - //GtkContainer's unmanaged dispose calls forall, but by that time the managed object is gone - //so it couldn't do anything useful, and resurrecting it would cause a resurrection cycle. - //In that case, just chain to the native base in case it can do something. - Container obj = (Container) GLib.Object.TryGetObject (container); - if (obj != null) { - CallbackInvoker invoker = new CallbackInvoker (cb, data); - obj.ForAll (include_internals, new Gtk.Callback (invoker.Invoke)); - } else { - gtksharp_container_base_forall (container, include_internals, cb, data); - } - } catch (Exception e) { - GLib.ExceptionManager.RaiseUnhandledException (e, false); - } - } + static ChildTypeNativeDelegate ObsoleteChildTypeVMCallback; - static void OverrideForall (GLib.GType gtype) - { - if (ForallCallback == null) - ForallCallback = new ForallDelegate (Forall_cb); - gtksharp_container_override_forall (gtype.Val, ForallCallback); - } + static void OverrideObsoleteChildType(GLib.GType gtype) + { + if (ObsoleteChildTypeVMCallback == null) + ObsoleteChildTypeVMCallback = new ChildTypeNativeDelegate(ObsoleteChildType_cb); + OverrideChildType(gtype, ObsoleteChildTypeVMCallback); // -> autogenerated method + } - [GLib.DefaultSignalHandler (Type=typeof(Gtk.Container), ConnectionMethod="OverrideForall")] - protected virtual void ForAll (bool include_internals, Gtk.Callback callback) - { - CallbackInvoker invoker; - try { - invoker = (CallbackInvoker)callback.Target; - } catch { - throw new ApplicationException ("ForAll can only be called as \"base.ForAll()\". Use Forall() or Foreach()."); - } - gtksharp_container_base_forall (Handle, include_internals, invoker.Callback, invoker.Data); - } + [Obsolete("Replaced by OnChildType for implementations and SupportedChildType for callers.")] + [GLib.DefaultSignalHandler(Type = typeof(Gtk.Container), ConnectionMethod = "OverrideObsoleteChildType")] + public virtual GLib.GType ChildType() + { + return InternalChildType(); // -> autogenerated method + } - // Compatibility code for old ChildType() virtual method - static IntPtr ObsoleteChildType_cb (IntPtr raw) - { - try { - Container obj = GLib.Object.GetObject (raw, false) as Container; - GLib.GType gtype = obj.ChildType (); - return gtype.Val; - } catch (Exception e) { - GLib.ExceptionManager.RaiseUnhandledException (e, false); - } + public class ContainerChild + { + protected Container parent; + protected Widget child; - return GLib.GType.Invalid.Val; - } + public ContainerChild(Container parent, Widget child) + { + this.parent = parent; + this.child = child; + } - static ChildTypeNativeDelegate ObsoleteChildTypeVMCallback; + public Container Parent + { + get + { + return parent; + } + } - static void OverrideObsoleteChildType (GLib.GType gtype) - { - if (ObsoleteChildTypeVMCallback == null) - ObsoleteChildTypeVMCallback = new ChildTypeNativeDelegate (ObsoleteChildType_cb); - OverrideChildType (gtype, ObsoleteChildTypeVMCallback); // -> autogenerated method - } + public Widget Child + { + get + { + return child; + } + } + } - [Obsolete ("Replaced by OnChildType for implementations and SupportedChildType for callers.")] - [GLib.DefaultSignalHandler (Type=typeof(Gtk.Container), ConnectionMethod="OverrideObsoleteChildType")] - public virtual GLib.GType ChildType() { - return InternalChildType (); // -> autogenerated method - } - - public class ContainerChild { - protected Container parent; - protected Widget child; - - public ContainerChild (Container parent, Widget child) - { - this.parent = parent; - this.child = child; - } - - public Container Parent { - get { - return parent; - } - } - - public Widget Child { - get { - return child; - } - } - } - - public virtual ContainerChild this [Widget w] { - get { - return new ContainerChild (this, w); - } - } - } + public virtual ContainerChild this[Widget w] + { + get + { + return new ContainerChild(this, w); + } + } + } } diff --git a/Source/Libs/GtkSharp/meson.build b/Source/Libs/GtkSharp/meson.build deleted file mode 100755 index 9f2b1f461..000000000 --- a/Source/Libs/GtkSharp/meson.build +++ /dev/null @@ -1,163 +0,0 @@ -pkg = 'gtk' -assembly_name = pkg + '-sharp' -symbols = join_paths(meson.current_source_dir(), pkg + '-symbols.xml') - -raw_api_fname = join_paths(meson.current_source_dir(), pkg + '-api.raw') -metadata = files('Gtk.metadata') -glueincludes = 'gtk/gtk.h' -gluefile = join_paths(meson.current_build_dir(), 'generate.c') - -configure_file(input: assembly_name + '.dll.config.in', - output: assembly_name + '.dll.config', - configuration : remap_dl_data) - -if install - configure_file(input: assembly_name + '-3.0.pc.in', - output: assembly_name + '-3.0.pc', - configuration : version_data, - install_dir: pkg_install_dir) -endif - -subdir('generated') - -sources = [ - 'Accel.cs', - 'AccelKey.cs', - 'Action.cs', - 'ActionEntry.cs', - 'ActionGroup.cs', - 'Adjustment.cs', - 'Application.cs', - 'ArrayExtensions.cs', - 'Bin.cs', - 'BindingAttribute.cs', - 'Builder.cs', - 'Button.cs', - 'Calendar.cs', - 'CellAreaBox.cs', - 'CellLayoutAdapter.cs', - 'CellRenderer.cs', - 'CellView.cs', - 'CheckMenuItem.cs', - 'ChildPropertyAttribute.cs', - 'Clipboard.cs', - 'ColorSelection.cs', - 'ComboBox.cs', - 'ComboBoxText.cs', - 'Container.cs', - 'Dialog.cs', - 'Drag.cs', - 'Entry.cs', - 'EntryCompletion.cs', - 'FileChooserDialog.cs', - 'FileChooserNative.cs', - 'Frame.cs', - 'Global.cs', - 'HBox.cs', - 'HScale.cs', - 'ICellLayout.cs', - 'IconFactory.cs', - 'IconSet.cs', - 'IconTheme.cs', - 'IconView.cs', - 'Image.cs', - 'ImageMenuItem.cs', - 'Init.cs', - 'ITreeModel.cs', - 'ITreeNode.cs', - 'Key.cs', - 'Label.cs', - 'ListStore.cs', - 'Menu.cs', - 'MenuItem.cs', - 'MessageDialog.cs', - 'NativeDialog.cs', - 'NodeCellDataFunc.cs', - 'NodeSelection.cs', - 'NodeStore.cs', - 'NodeView.cs', - 'Notebook.cs', - 'PaperSize.cs', - 'Plug.cs', - 'Printer.cs', - 'RadioAction.cs', - 'RadioActionEntry.cs', - 'RadioButton.cs', - 'RadioMenuItem.cs', - 'RadioToolButton.cs', - 'RecentManager.cs', - 'RowsReorderedHandler.cs', - 'ScrolledWindow.cs', - 'SelectionData.cs', - 'Settings.cs', - 'SpinButton.cs', - 'StatusIcon.cs', - 'Stock.cs', - 'StockItem.cs', - 'StockManager.cs', - 'Style.cs', - 'StyleContext.cs', - 'StyleProviderPriority.cs', - 'Target.cs', - 'TargetEntry.cs', - 'TargetList.cs', - 'TextAttributes.cs', - 'TextBuffer.cs', - 'TextChildAnchor.cs', - 'TextIter.cs', - 'TextMark.cs', - 'TextTag.cs', - 'TextView.cs', - 'ThreadNotify.cs', - 'ToggleActionEntry.cs', - 'TreeEnumerator.cs', - 'TreeIter.cs', - 'TreeMenu.cs', - 'TreeModelAdapter.cs', - 'TreeModelFilter.cs', - 'TreeModelSort.cs', - 'TreeNode.cs', - 'TreeNodeAttribute.cs', - 'TreeNodeValueAttribute.cs', - 'TreePath.cs', - 'TreeSelection.cs', - 'TreeStore.cs', - 'TreeView.cs', - 'TreeViewColumn.cs', - 'UIManager.cs', - 'VBox.cs', - 'Viewport.cs', - 'VScale.cs', - 'Widget.cs', - 'Window.cs', -] - -deps = [glib_sharp, pango_sharp, cairo_sharp, gio_sharp, atk_sharp, gdk_sharp] -gtk_sharp = library(assembly_name, source_gen, sources, assemblyinfo, - cs_args: ['-unsafe', '-nowarn:0618,0612,0169'], - link_with: deps, - install: install, - install_dir: lib_install_dir -) - -nuget_infos += [['GtkSharp', gtk_sharp, ['GlibSharp', 'GioSharp', - 'AtkSharp', 'GdkSharp']]] -install_infos += [assembly_name, gtk_sharp.full_path()] -gtk_sharp_dep = declare_dependency(link_with: deps + [gtk_sharp]) - -if add_languages('c', required: false) and csc.get_id() == 'mono' - c_abi_exe = executable(assembly_name + '_c_abi', c_abi, - c_args: ['-Wno-deprecated', '-Wno-deprecated-declarations'], - dependencies: [glib_dep, gio_dep, atk_dep, gdk_dep, gtk_dep]) - - cs_abi_exe = executable(assembly_name + '_cs_abi', cs_abi, - cs_args: ['-nowarn:169', '-nowarn:108', '-nowarn:114', '-nowarn:0618', '-unsafe'], - dependencies: [gtk_sharp_dep]) - - env = environment() - env.prepend('MONO_PATH', mono_path) - test(assembly_name + 'abi', diff, args: [c_abi_exe.full_path(), cs_abi_exe.full_path()], - env: env) -else - message('Not running tests ' + csc.get_id()) -endif