From dfa77f43b06c3c10b25a62c7b6902f7f43584dd3 Mon Sep 17 00:00:00 2001 From: Matthew Jakeman Date: Wed, 19 May 2021 22:38:05 +1200 Subject: [PATCH 01/35] Stop using ClosureMarshal workaround Delegates work now (yay!) so let's use the closure marshal directly. This simplifies the code quite a bit, and gets us closer to working signals. --- .../Extensions/ParameterListExtension.cs | 2 +- .../Classes/Object.ClosureHelper.cs | 22 +++++-------------- Libs/GObject-2.0/Classes/Property.cs | 2 +- Libs/GObject-2.0/Classes/Signal.cs | 8 +++---- Libs/GObject-2.0/Records/Closure.cs | 9 +++++--- 5 files changed, 18 insertions(+), 25 deletions(-) diff --git a/Generator/Extensions/ParameterListExtension.cs b/Generator/Extensions/ParameterListExtension.cs index 2f00f4acc..1159d1dcb 100644 --- a/Generator/Extensions/ParameterListExtension.cs +++ b/Generator/Extensions/ParameterListExtension.cs @@ -89,7 +89,7 @@ public static string WriteSignalArgsProperties(this ParameterList parameterList, foreach (var argument in parameterList.GetParameters()) { index += 1; - var type = argument.WriteType(Target.Native, currentNamespace); + var type = argument.WriteType(Target.Managed, currentNamespace); var name = converter.ToPascalCase(argument.SymbolName); builder.AppendLine($"//TODO: public {type} {name} => Args[{index}].Extract<{type}>();"); diff --git a/Libs/GObject-2.0/Classes/Object.ClosureHelper.cs b/Libs/GObject-2.0/Classes/Object.ClosureHelper.cs index 1d87852c8..dba93dad1 100644 --- a/Libs/GObject-2.0/Classes/Object.ClosureHelper.cs +++ b/Libs/GObject-2.0/Classes/Object.ClosureHelper.cs @@ -5,10 +5,11 @@ namespace GObject { public partial class Object { - protected internal delegate void ActionRefValues(ref Native.Value.Struct[] items); + protected internal delegate void ActionRefValues(ref Value[] items); private class ClosureHelper : IDisposable { + private readonly ClosureMarshal? _marshalCallback; private readonly ActionRefValues _callback; private readonly Closure _closure; @@ -16,30 +17,19 @@ private class ClosureHelper : IDisposable public ClosureHelper(ActionRefValues action) { - //TODO Use MarshalCallback - _closure = new Closure(Workaround); + _marshalCallback = MarshalCallback; + _closure = new Closure(_marshalCallback); _callback = action; } - - //TODO: Delete this method - private void Workaround() - { - var data = Array.Empty(); - _callback(ref data); - } - - public void MarshalCallback(Closure closure, Value? returnValue, uint nParamValues, Value[] paramValues, IntPtr? invocationHint, IntPtr? marshalData) + private void MarshalCallback(Closure closure, Value? returnValue, uint nParamValues, Value[] paramValues, IntPtr? invocationHint, IntPtr? marshalData) { Debug.Assert( condition: paramValues.Length == nParamValues, message: "Values were not marshalled correctly. Breakage may occur" ); - //TODO forward values - - var data = Array.Empty(); - _callback(ref data); + _callback(ref paramValues); } public void Dispose() diff --git a/Libs/GObject-2.0/Classes/Property.cs b/Libs/GObject-2.0/Classes/Property.cs index ccd650441..bc9743128 100644 --- a/Libs/GObject-2.0/Classes/Property.cs +++ b/Libs/GObject-2.0/Classes/Property.cs @@ -141,7 +141,7 @@ internal void RegisterNotifyEvent(Object o) closureRegistry.Connect>( action: o.OnPropertyChanged, after: false, - mapping: arg => ((ref Native.Value.Struct[] _) => arg(PropertyName)) + mapping: arg => ((ref Value[] _) => arg(PropertyName)) ); } diff --git a/Libs/GObject-2.0/Classes/Signal.cs b/Libs/GObject-2.0/Classes/Signal.cs index acfba2736..46433bd70 100644 --- a/Libs/GObject-2.0/Classes/Signal.cs +++ b/Libs/GObject-2.0/Classes/Signal.cs @@ -127,12 +127,12 @@ public void Connect(TSender o, SignalHandler action, bool closureRegistry.Connect( action: action, after: after, - mapping: callback => ((ref Native.Value.Struct[] items) => + mapping: callback => (ref Value[] items) => { var args = new TSignalArgs(); - //TODO: args.SetArgs(items); + args.SetArgs(items); callback(o, args); - }) + } ); } @@ -183,7 +183,7 @@ public void Connect(TSender o, SignalHandler action, bool after = false closureRegistry.Connect( action: action, after: after, - mapping: callback => (ref Native.Value.Struct[] _) => callback(o, EventArgs.Empty) + mapping: callback => (ref Value[] _) => callback(o, EventArgs.Empty) ); } diff --git a/Libs/GObject-2.0/Records/Closure.cs b/Libs/GObject-2.0/Records/Closure.cs index bc346145f..278003c0f 100644 --- a/Libs/GObject-2.0/Records/Closure.cs +++ b/Libs/GObject-2.0/Records/Closure.cs @@ -6,11 +6,14 @@ namespace GObject //TODO: This should be in the native namespace. It does not belong into the managed api. We have events to handle this. public partial class Closure : IDisposable { - private readonly ClosureMarshalCallHandlerWorkaround _closureMarshalCallHandler; + // A call handler keeps the delegate alive for the + // lifetime of the call handler. As we save it as a + // field here, the delegate will match this class' lifetime. + private readonly ClosureMarshalCallHandler _closureMarshalCallHandler; - internal Closure(Action action) //TODO: Restore: ClosureMarshal action) + internal Closure(ClosureMarshal action) { - _closureMarshalCallHandler = new ClosureMarshalCallHandlerWorkaround(action); + _closureMarshalCallHandler = new ClosureMarshalCallHandler(action); _handle = Native.Closure.Methods.NewSimple((uint) Marshal.SizeOf(typeof(GObject.Native.Closure.Struct)), IntPtr.Zero); Native.Closure.Methods.Ref(_handle); From 3019b015fea261032b6b0117d9d71261efbf7d71 Mon Sep 17 00:00:00 2001 From: Matthew Jakeman Date: Thu, 20 May 2021 21:00:13 +1200 Subject: [PATCH 02/35] WIP: Attempt to fix issues with GValue --- .../Extensions/ParameterListExtension.cs | 3 +- GirCore.sln | 30 ++++++++++++++++ Libs/GObject-2.0/Classes/Object.cs | 18 +++++----- .../ClosureMarshalCallbackWorkaround.cs | 35 ------------------- Libs/GObject-2.0/Records/Value.cs | 8 +++-- .../GObject-2.0.Tests/Records/ValueTest.cs | 18 +++++++++- 6 files changed, 61 insertions(+), 51 deletions(-) delete mode 100644 Libs/GObject-2.0/Delegates/ClosureMarshalCallbackWorkaround.cs diff --git a/Generator/Extensions/ParameterListExtension.cs b/Generator/Extensions/ParameterListExtension.cs index 1159d1dcb..3883df970 100644 --- a/Generator/Extensions/ParameterListExtension.cs +++ b/Generator/Extensions/ParameterListExtension.cs @@ -92,8 +92,7 @@ public static string WriteSignalArgsProperties(this ParameterList parameterList, var type = argument.WriteType(Target.Managed, currentNamespace); var name = converter.ToPascalCase(argument.SymbolName); - builder.AppendLine($"//TODO: public {type} {name} => Args[{index}].Extract<{type}>();"); - builder.AppendLine($"public string {name} => \"\";"); + builder.AppendLine($"public {type} {name} => Args[{index}].Extract<{type}>();"); } return builder.ToString(); diff --git a/GirCore.sln b/GirCore.sln index 0d04b5753..1f802cab3 100644 --- a/GirCore.sln +++ b/GirCore.sln @@ -89,6 +89,10 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DeclarativeUi", "Samples\Gt EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AboutDialog", "Samples\Gtk3\AboutDialog\AboutDialog.csproj", "{35D35175-A160-4557-BE3E-9BCB296C61A1}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DrawingArea", "Samples\Gtk3\DrawingArea\DrawingArea.csproj", "{33809B07-61F8-46C1-A921-F30467B21113}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "cairo-1.0.Tests", "Tests\Libs\cairo-1.0.Tests\cairo-1.0.Tests.csproj", "{E176A6B9-36DD-4452-8AA8-F1DCB6B47C33}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -534,6 +538,30 @@ Global {35D35175-A160-4557-BE3E-9BCB296C61A1}.Release|x64.Build.0 = Release|Any CPU {35D35175-A160-4557-BE3E-9BCB296C61A1}.Release|x86.ActiveCfg = Release|Any CPU {35D35175-A160-4557-BE3E-9BCB296C61A1}.Release|x86.Build.0 = Release|Any CPU + {33809B07-61F8-46C1-A921-F30467B21113}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {33809B07-61F8-46C1-A921-F30467B21113}.Debug|Any CPU.Build.0 = Debug|Any CPU + {33809B07-61F8-46C1-A921-F30467B21113}.Debug|x64.ActiveCfg = Debug|Any CPU + {33809B07-61F8-46C1-A921-F30467B21113}.Debug|x64.Build.0 = Debug|Any CPU + {33809B07-61F8-46C1-A921-F30467B21113}.Debug|x86.ActiveCfg = Debug|Any CPU + {33809B07-61F8-46C1-A921-F30467B21113}.Debug|x86.Build.0 = Debug|Any CPU + {33809B07-61F8-46C1-A921-F30467B21113}.Release|Any CPU.ActiveCfg = Release|Any CPU + {33809B07-61F8-46C1-A921-F30467B21113}.Release|Any CPU.Build.0 = Release|Any CPU + {33809B07-61F8-46C1-A921-F30467B21113}.Release|x64.ActiveCfg = Release|Any CPU + {33809B07-61F8-46C1-A921-F30467B21113}.Release|x64.Build.0 = Release|Any CPU + {33809B07-61F8-46C1-A921-F30467B21113}.Release|x86.ActiveCfg = Release|Any CPU + {33809B07-61F8-46C1-A921-F30467B21113}.Release|x86.Build.0 = Release|Any CPU + {E176A6B9-36DD-4452-8AA8-F1DCB6B47C33}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E176A6B9-36DD-4452-8AA8-F1DCB6B47C33}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E176A6B9-36DD-4452-8AA8-F1DCB6B47C33}.Debug|x64.ActiveCfg = Debug|Any CPU + {E176A6B9-36DD-4452-8AA8-F1DCB6B47C33}.Debug|x64.Build.0 = Debug|Any CPU + {E176A6B9-36DD-4452-8AA8-F1DCB6B47C33}.Debug|x86.ActiveCfg = Debug|Any CPU + {E176A6B9-36DD-4452-8AA8-F1DCB6B47C33}.Debug|x86.Build.0 = Debug|Any CPU + {E176A6B9-36DD-4452-8AA8-F1DCB6B47C33}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E176A6B9-36DD-4452-8AA8-F1DCB6B47C33}.Release|Any CPU.Build.0 = Release|Any CPU + {E176A6B9-36DD-4452-8AA8-F1DCB6B47C33}.Release|x64.ActiveCfg = Release|Any CPU + {E176A6B9-36DD-4452-8AA8-F1DCB6B47C33}.Release|x64.Build.0 = Release|Any CPU + {E176A6B9-36DD-4452-8AA8-F1DCB6B47C33}.Release|x86.ActiveCfg = Release|Any CPU + {E176A6B9-36DD-4452-8AA8-F1DCB6B47C33}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(NestedProjects) = preSolution {BF7F9B0B-CB43-4161-BFAD-C6EE479FC86B} = {386AE10F-B7AC-4C97-AC5C-202D3662A868} @@ -572,5 +600,7 @@ Global {F86D983A-9881-4BE7-AF92-FA0CE41FB319} = {46D66262-FC61-43B9-8E76-A361FA3D6C81} {59E6AF5C-5F8A-4735-9F95-6457CC17C075} = {79FE88D9-9545-4AE8-80AF-8E2E2E55E8A3} {35D35175-A160-4557-BE3E-9BCB296C61A1} = {79FE88D9-9545-4AE8-80AF-8E2E2E55E8A3} + {33809B07-61F8-46C1-A921-F30467B21113} = {79FE88D9-9545-4AE8-80AF-8E2E2E55E8A3} + {E176A6B9-36DD-4452-8AA8-F1DCB6B47C33} = {46D66262-FC61-43B9-8E76-A361FA3D6C81} EndGlobalSection EndGlobal diff --git a/Libs/GObject-2.0/Classes/Object.cs b/Libs/GObject-2.0/Classes/Object.cs index 2c827f5c0..14b0de43e 100644 --- a/Libs/GObject-2.0/Classes/Object.cs +++ b/Libs/GObject-2.0/Classes/Object.cs @@ -1,4 +1,5 @@ using System; +using System.Collections.Generic; using System.ComponentModel; using System.Diagnostics.CodeAnalysis; using System.Linq; @@ -43,11 +44,14 @@ protected Object(ConstructArgument[] constructArguments) { Type gtype = GetGTypeOrRegister(GetType()); + Value[] v = GetValues(constructArguments).ToArray(); + IntPtr[] i = v.Select(v => v.Handle.DangerousGetHandle()).ToArray(); + IntPtr handle = Native.Object.Instance.Methods.NewWithProperties( objectType: gtype.Value, nProperties: (uint) constructArguments.Length, names: GetNames(constructArguments), - values: GetValues(constructArguments).Select(x => x.DangerousGetHandle()).ToArray() + values: i.Select(x => System.Runtime.InteropServices.Marshal.PtrToStructure(x)).ToArray() ); _handle = new ObjectHandle(handle, this, !Native.Object.Instance.Methods.IsFloating(handle)); @@ -58,16 +62,10 @@ protected Object(ConstructArgument[] constructArguments) private string[] GetNames(ConstructArgument[] constructParameters) => constructParameters.Select(x => x.Name).ToArray(); - private Native.Value.Handle[] GetValues(ConstructArgument[] constructParameters) + private IEnumerable GetValues(ConstructArgument[] constructParameters) { - var values = new Native.Value.Struct[constructParameters.Length]; - - for (int i = 0; i < constructParameters.Length; i++) - { - values[i] = constructParameters[i].Value.GetData(); - } - - return values.Select(val => Native.Value.ManagedHandle.Create(val)).ToArray(); + foreach (var arg in constructParameters) + yield return arg.Value; } /// diff --git a/Libs/GObject-2.0/Delegates/ClosureMarshalCallbackWorkaround.cs b/Libs/GObject-2.0/Delegates/ClosureMarshalCallbackWorkaround.cs deleted file mode 100644 index 81f767571..000000000 --- a/Libs/GObject-2.0/Delegates/ClosureMarshalCallbackWorkaround.cs +++ /dev/null @@ -1,35 +0,0 @@ -using System; -using System.Runtime.InteropServices; - -namespace GObject -{ - /// - /// Call Handler for ClosureMarshal with a simplified interface as long as delegates are not working out. - /// TOOD: Remove this class - /// - public class ClosureMarshalCallHandlerWorkaround : IDisposable - { - public Native.ClosureMarshalCallback NativeCallback; - - private readonly System.Action _managedCallback; - - public ClosureMarshalCallHandlerWorkaround(System.Action managed) - { - NativeCallback = NativeCallbackMarshaller; - _managedCallback = managed; - } - - private void NativeCallbackMarshaller(IntPtr closure, IntPtr returnValue, uint nParamValues, [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 2)] IntPtr[] paramValues, IntPtr invocationHint, IntPtr marshalData) - { - _managedCallback(); - } - - public void Dispose() - { - // This implements IDisposable just to signal to the caller that this class contains - // disposable state. Actually there is no state which needs to be freed. But if an instance - // of this object is freed to early the NativeCallback can not be invoked from C anymore - // which breaks any native code relying on the availability of the NativeCallback. - } - } -} diff --git a/Libs/GObject-2.0/Records/Value.cs b/Libs/GObject-2.0/Records/Value.cs index 97efb2959..70f4f6f02 100644 --- a/Libs/GObject-2.0/Records/Value.cs +++ b/Libs/GObject-2.0/Records/Value.cs @@ -14,8 +14,8 @@ public partial class Value : IDisposable public Value(Type type) { - var h = Native.Value.ManagedHandle.Create(); - _handle = Native.Value.Methods.Init(h, type.Value); + _handle = Native.Value.ManagedHandle.Create(); + Native.Value.Methods.Init(_handle, type.Value); } public Value(Object value) : this(Type.Object) => SetObject(value); @@ -145,7 +145,9 @@ public void Set(object? value) if (Functions.TypeIsA(gtype, (nuint) BasicType.Flags)) return GetFlags(); - throw new NotSupportedException($"Unable to extract the value to the given type. The type {gtype} is unknown."); + var name = StringHelper.ToStringUtf8(Native.Functions.TypeName(gtype)); + + throw new NotSupportedException($"Unable to extract the value for type '{name}'. The type (id: {gtype}) is unknown."); } public T Extract() => (T) Extract()!; diff --git a/Tests/Libs/GObject-2.0.Tests/Records/ValueTest.cs b/Tests/Libs/GObject-2.0.Tests/Records/ValueTest.cs index 3fa9caf5b..105bf9d5d 100644 --- a/Tests/Libs/GObject-2.0.Tests/Records/ValueTest.cs +++ b/Tests/Libs/GObject-2.0.Tests/Records/ValueTest.cs @@ -1,4 +1,6 @@ -using FluentAssertions; +using System; +using System.Runtime.InteropServices; +using FluentAssertions; using Microsoft.VisualStudio.TestTools.UnitTesting; namespace GObject.Tests @@ -15,5 +17,19 @@ public void ValueFromDataShouldContainGivenData(object data) var v = Value.From(data); v.Extract().Should().Be(data); } + + [TestMethod] + public void ValueReturnsExpectedType() + { + // Check that we have a value + var v = Value.From("Hello"); + Native.Functions.TypeCheckValue(v.Handle).Should().Be(true); + + // Check we can marshal as a struct + Native.Value.Struct str = Marshal.PtrToStructure(v.Handle.DangerousGetHandle()); + Native.Functions.TypeCheckValueHolds(v.Handle, str.GType); + Native.Functions.TypeCheckValueHolds(v.Handle, (nuint)Native.BasicType.String); + str.GType.Should().Be((nuint) Native.BasicType.String); + } } } From f3e781527841e0c7580c1bdbbc946b3995db217c Mon Sep 17 00:00:00 2001 From: Matthew Jakeman Date: Mon, 24 May 2021 00:04:54 +1200 Subject: [PATCH 03/35] Fix handling of unions --- Generator/Extensions/FieldsExtension.cs | 2 +- Generator/Templates/union.native.struct.sbntxt | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/Generator/Extensions/FieldsExtension.cs b/Generator/Extensions/FieldsExtension.cs index 90ade1054..b83ab998c 100644 --- a/Generator/Extensions/FieldsExtension.cs +++ b/Generator/Extensions/FieldsExtension.cs @@ -36,7 +36,7 @@ public static string WriteUnionStructFields(this IEnumerable fields, Name foreach (Field field in fields) { - builder.AppendLine("//[FieldOffset(0)] TODO Enable offset"); + builder.AppendLine("[FieldOffset(0)]"); builder.AppendLine(field.WriteNative(currentNamespace)); } diff --git a/Generator/Templates/union.native.struct.sbntxt b/Generator/Templates/union.native.struct.sbntxt index d2ae92cce..dbaf81c88 100644 --- a/Generator/Templates/union.native.struct.sbntxt +++ b/Generator/Templates/union.native.struct.sbntxt @@ -1,5 +1,4 @@ -//TODO: Enable explicit union generation if it does not break documentation generation anymore -//[StructLayout(LayoutKind.Explicit)] +[StructLayout(LayoutKind.Explicit)] public partial struct {{ get_metadata "StructName" }} { {{ include 'union.native.struct.fields.sbntxt' }} From a1eddc450cf453a75ce5525c9b13cb5e34679636 Mon Sep 17 00:00:00 2001 From: Matthew Jakeman Date: Thu, 27 May 2021 07:14:43 +1200 Subject: [PATCH 04/35] Handle value (non-pointer) records in the Generator --- Generator/Convert.cs | 8 ++++---- Generator/Services/TypeRenamer.cs | 2 ++ Libs/GObject-2.0/Records/Value.cs | 9 ++++++--- 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/Generator/Convert.cs b/Generator/Convert.cs index 361917665..3c1df0cb2 100644 --- a/Generator/Convert.cs +++ b/Generator/Convert.cs @@ -75,8 +75,8 @@ internal static string NativeToManaged(TransferableAnyType transferable, string (Record r, {IsPointer: true, Array: { } }) when !useSafeHandle => $"{fromParam}.Select(x => new {r.Write(Target.Managed, currentNamespace)}(new {SafeHandleFromRecord(r)}(x))).ToArray()", //Record Conversions without pointers are not working yet - (Record r, {IsPointer: false, Array: null}) => $"({r.Write(Target.Managed, currentNamespace)}) default!; //TODO: Fixme", - (Record r, {IsPointer: false, Array: {}}) => $"({r.Write(Target.Managed, currentNamespace)}[]) default!; //TODO: Fixme", + (Record r, {IsPointer: false, Array: null}) => $"({qualifiedType}) default!; //TODO: Fixme", + (Record r, {IsPointer: false, Array: {}}) => $"({qualifiedType}[]) {fromParam}.Select(x => new {qualifiedType}({SafeHandleFromRecord(r, true)}(x))).ToArray();", // Class Conversions (Class { IsFundamental: true } c, { IsPointer: true, Array: null }) => $"{qualifiedType}.From({fromParam})", @@ -93,9 +93,9 @@ internal static string NativeToManaged(TransferableAnyType transferable, string }; } - private static string SafeHandleFromRecord(Record r) + private static string SafeHandleFromRecord(Record r, bool managedHandle = false) { - var type = r.GetMetadataString("SafeHandleRefName"); + var type = r.GetMetadataString(managedHandle ? "SafeHandleRefManagedFunc" : "SafeHandleRefName"); var nspace = $"{r.Repository.Namespace}.Native"; return nspace + "." + type; } diff --git a/Generator/Services/TypeRenamer.cs b/Generator/Services/TypeRenamer.cs index d9c467d29..cb5192f5b 100644 --- a/Generator/Services/TypeRenamer.cs +++ b/Generator/Services/TypeRenamer.cs @@ -121,6 +121,7 @@ private void SetClassStructMetadata(Record record) record.Metadata["StructRefName"] = $"{className}.Class"; record.Metadata["SafeHandleName"] = "Handle"; record.Metadata["SafeHandleRefName"] = $"{className}.Handle"; + record.Metadata["SafeHandleRefManagedFunc"] = $"{className}.ManagedHandle.Create"; record.SymbolName = new SymbolName($"{className}.Class"); } @@ -132,6 +133,7 @@ private void SetRecordMetadata(Record record) record.Metadata["StructRefName"] = $"{record.SymbolName}.Struct"; record.Metadata["SafeHandleName"] = "Handle"; record.Metadata["SafeHandleRefName"] = $"{record.SymbolName}.Handle"; + record.Metadata["SafeHandleRefManagedFunc"] = $"{record.SymbolName}.ManagedHandle.Create"; record.SymbolName = new SymbolName($"{record.SymbolName}"); } diff --git a/Libs/GObject-2.0/Records/Value.cs b/Libs/GObject-2.0/Records/Value.cs index 70f4f6f02..9f437b474 100644 --- a/Libs/GObject-2.0/Records/Value.cs +++ b/Libs/GObject-2.0/Records/Value.cs @@ -15,7 +15,7 @@ public partial class Value : IDisposable public Value(Type type) { _handle = Native.Value.ManagedHandle.Create(); - Native.Value.Methods.Init(_handle, type.Value); + _handle = Native.Value.Methods.Init(_handle, type.Value); } public Value(Object value) : this(Type.Object) => SetObject(value); @@ -154,14 +154,17 @@ public void Set(object? value) public IntPtr GetPtr() => Native.Value.Methods.GetPointer(Handle); - public object? GetBoxed(ulong type) + public object? GetBoxed(nuint type) { IntPtr ptr = Native.Value.Methods.GetBoxed(Handle); if (type == Functions.StrvGetType()) return StringHelper.ToStringArrayUtf8(ptr); + + // TODO: Very temporary !!! Return a pointer + return Native.Value.Methods.GetBoxed(Handle); - throw new NotSupportedException($"Can't get boxed value. Type {type} is not supported."); + throw new NotSupportedException($"Can't get boxed value. Type '{new Type((nuint)type)}' is not supported."); } public Object? GetObject() From dbc21770eaad352cbd78d4a148861d8ba2f90edb Mon Sep 17 00:00:00 2001 From: Matthew Jakeman Date: Thu, 27 May 2021 08:19:42 +1200 Subject: [PATCH 05/35] Add DrawingArea sample --- Samples/Gtk3/DrawingArea/DrawingArea.cs | 24 +++++++++++++++++++++ Samples/Gtk3/DrawingArea/DrawingArea.csproj | 12 +++++++++++ 2 files changed, 36 insertions(+) create mode 100644 Samples/Gtk3/DrawingArea/DrawingArea.cs create mode 100644 Samples/Gtk3/DrawingArea/DrawingArea.csproj diff --git a/Samples/Gtk3/DrawingArea/DrawingArea.cs b/Samples/Gtk3/DrawingArea/DrawingArea.cs new file mode 100644 index 000000000..fee91abbd --- /dev/null +++ b/Samples/Gtk3/DrawingArea/DrawingArea.cs @@ -0,0 +1,24 @@ +using System; +using Gtk; + +Functions.Init(); + +var window = new Window("DrawingArea Demo"); +var drawingArea = DrawingArea.New(); +window.Child = drawingArea; + +drawingArea.OnDraw += (d, a) => +{ + cairo.Context cr = a.Cr; + cr.SetSourceRgba(0.1, 0.1, 0.1, 1.0); + cr.MoveTo(20, 30); + cr.ShowText("This is some text, drawn with cairo"); + + cr.MoveTo(40, 60); + cr.ShowText("Powered by gir.core - GObject bindings for .NET"); +}; +window.ShowAll(); + +window.OnDestroy += (o,e) => Functions.MainQuit(); + +Functions.Main(); diff --git a/Samples/Gtk3/DrawingArea/DrawingArea.csproj b/Samples/Gtk3/DrawingArea/DrawingArea.csproj new file mode 100644 index 000000000..ed9e529af --- /dev/null +++ b/Samples/Gtk3/DrawingArea/DrawingArea.csproj @@ -0,0 +1,12 @@ + + + + net5.0 + Exe + + + + + + + From ac12361f8f0664bab3ade37f36ba2f4c881ab689 Mon Sep 17 00:00:00 2001 From: Matthew Jakeman Date: Thu, 27 May 2021 08:20:59 +1200 Subject: [PATCH 06/35] Miscellaneous API additions --- Libs/Gdk-3.0/Records/EventKey.cs | 25 +++++++++++++++++++++++++ Libs/Gtk-3.0/Classes/EventBox.cs | 8 ++++++++ Libs/Gtk-3.0/Classes/IMContextSimple.cs | 8 ++++++++ Libs/Gtk-3.0/Classes/Paned.cs | 8 ++++++++ Libs/cairo-1.0/Records/FontExtents.cs | 11 +++++++++++ 5 files changed, 60 insertions(+) create mode 100644 Libs/Gdk-3.0/Records/EventKey.cs create mode 100644 Libs/Gtk-3.0/Classes/EventBox.cs create mode 100644 Libs/Gtk-3.0/Classes/IMContextSimple.cs create mode 100644 Libs/Gtk-3.0/Classes/Paned.cs create mode 100644 Libs/cairo-1.0/Records/FontExtents.cs diff --git a/Libs/Gdk-3.0/Records/EventKey.cs b/Libs/Gdk-3.0/Records/EventKey.cs new file mode 100644 index 000000000..35d824000 --- /dev/null +++ b/Libs/Gdk-3.0/Records/EventKey.cs @@ -0,0 +1,25 @@ +using System; +using System.Runtime.InteropServices; + +namespace Gdk +{ + public partial class EventKey + { + // TODO: Proof-of-concept for accessing record fields. We'll want to generate this eventually + + public Gdk.EventType Type + { + get => Marshal.PtrToStructure(Handle.DangerousGetHandle()).Type; + } + + public uint Keyval + { + get => Marshal.PtrToStructure(Handle.DangerousGetHandle()).Keyval; + } + + public ushort HardwareKeycode + { + get => Marshal.PtrToStructure(Handle.DangerousGetHandle()).HardwareKeycode; + } + } +} diff --git a/Libs/Gtk-3.0/Classes/EventBox.cs b/Libs/Gtk-3.0/Classes/EventBox.cs new file mode 100644 index 000000000..4dea4e3e3 --- /dev/null +++ b/Libs/Gtk-3.0/Classes/EventBox.cs @@ -0,0 +1,8 @@ +namespace Gtk +{ + public partial class EventBox + { + public static EventBox New() + => new EventBox(Native.EventBox.Instance.Methods.New(), false); + } +} diff --git a/Libs/Gtk-3.0/Classes/IMContextSimple.cs b/Libs/Gtk-3.0/Classes/IMContextSimple.cs new file mode 100644 index 000000000..c67971cb5 --- /dev/null +++ b/Libs/Gtk-3.0/Classes/IMContextSimple.cs @@ -0,0 +1,8 @@ +namespace Gtk +{ + public partial class IMContextSimple + { + public static IMContextSimple New() + => new IMContextSimple(Native.IMContextSimple.Instance.Methods.New(), false); + } +} diff --git a/Libs/Gtk-3.0/Classes/Paned.cs b/Libs/Gtk-3.0/Classes/Paned.cs new file mode 100644 index 000000000..c75da5351 --- /dev/null +++ b/Libs/Gtk-3.0/Classes/Paned.cs @@ -0,0 +1,8 @@ +namespace Gtk +{ + public partial class Paned + { + public static Paned New(Orientation orientation) + => new Paned(Native.Paned.Instance.Methods.New(orientation), false); + } +} diff --git a/Libs/cairo-1.0/Records/FontExtents.cs b/Libs/cairo-1.0/Records/FontExtents.cs new file mode 100644 index 000000000..e00462975 --- /dev/null +++ b/Libs/cairo-1.0/Records/FontExtents.cs @@ -0,0 +1,11 @@ +namespace cairo +{ + public struct FontExtents + { + public double Ascent; + public double Descent; + public double Height; + public double MaxXAdvance; + public double MaxYAdvance; + } +} From 359b78021e03f303e8230417d32510af3ec532b4 Mon Sep 17 00:00:00 2001 From: Matthew Jakeman Date: Thu, 27 May 2021 08:22:45 +1200 Subject: [PATCH 07/35] Basic implementation of Cairo This could possibly be a standalone project --- Libs/cairo-1.0/Records/Context.cs | 62 +++++++++++++++++++++++++++ Libs/cairo-1.0/Records/TextExtents.cs | 15 +++++++ 2 files changed, 77 insertions(+) create mode 100644 Libs/cairo-1.0/Records/Context.cs create mode 100644 Libs/cairo-1.0/Records/TextExtents.cs diff --git a/Libs/cairo-1.0/Records/Context.cs b/Libs/cairo-1.0/Records/Context.cs new file mode 100644 index 000000000..e4fbe4672 --- /dev/null +++ b/Libs/cairo-1.0/Records/Context.cs @@ -0,0 +1,62 @@ +using System; +using System.Runtime.InteropServices; +using System.Text; + +namespace cairo +{ + public partial class Context + { + // IMPORTANT: We should follow cairo's guidelines on memory management + // for language bindings. This is a quick attempt at implementing something + // workable. + + [DllImport ("cairo", EntryPoint = "cairo_set_source_rgba")] + internal static extern void NativeSetSourceRgba (Native.Context.Handle cr, double red, double green, double blue, double alpha); + + public void SetSourceRgba(double red, double green, double blue, double alpha) + => NativeSetSourceRgba(Handle, red, green, blue, alpha); + + [DllImport ("cairo", EntryPoint = "cairo_show_text")] + internal static extern void NativeShowText (Native.Context.Handle cr, [MarshalAs(UnmanagedType.LPUTF8Str)] string utf8); + + public void ShowText(string text) + => NativeShowText(Handle, text); + + [DllImport ("cairo", EntryPoint = "cairo_move_to")] + internal static extern void NativeMoveTo (Native.Context.Handle cr, double x, double y); + + public void MoveTo(double x, double y) + => NativeMoveTo(Handle, x, y); + + [DllImport ("cairo", EntryPoint = "cairo_text_extents")] + internal static extern void NativeTextExtents (Native.Context.Handle cr, [MarshalAs (UnmanagedType.LPUTF8Str)] string utf8, out TextExtents extents); + + public void TextExtents(string text, out TextExtents extents) + => NativeTextExtents(Handle, text, out extents); + + [DllImport ("cairo", EntryPoint = "cairo_font_extents")] + internal static extern void NativeFontExtents (Native.Context.Handle cr, out FontExtents extents); + + public void FontExtents(out FontExtents extents) + => NativeFontExtents(Handle, out extents); + + [DllImport ("cairo", EntryPoint = "cairo_fill")] + internal static extern void NativeFill (Native.Context.Handle cr); + + public void Fill() + => NativeFill(Handle); + + [DllImport ("cairo", EntryPoint = "cairo_rectangle")] + internal static extern void NativeRectangle (Native.Context.Handle cr, double x, double y, double width, double height); + + public void Rectangle(double x, double y, double width, double height) + => NativeRectangle(Handle, x, y, width, height); + + + [DllImport ("cairo", EntryPoint = "cairo_set_font_size")] + internal static extern void NativeSetFontSize (Native.Context.Handle cr, double size); + + public void SetFontSize(double size) + => NativeSetFontSize(Handle, size); + } +} diff --git a/Libs/cairo-1.0/Records/TextExtents.cs b/Libs/cairo-1.0/Records/TextExtents.cs new file mode 100644 index 000000000..853036118 --- /dev/null +++ b/Libs/cairo-1.0/Records/TextExtents.cs @@ -0,0 +1,15 @@ +using System.Runtime.InteropServices; + +namespace cairo +{ + [StructLayout(LayoutKind.Sequential)] + public struct TextExtents + { + public double xBearing; + public double yBearing; + public double width; + public double height; + public double xAdvance; + public double yAdvance; + } +} From a53742e1122472bccec25efd1026fc7b30f91f1b Mon Sep 17 00:00:00 2001 From: Matthew Jakeman Date: Sun, 6 Jun 2021 21:50:47 +1200 Subject: [PATCH 08/35] Naive attempt at Record Mapping --- .../Native/Classes/RecordWrapper.cs | 39 +++++++++++++++++++ .../Native/Classes/TypeDictionary.cs | 3 ++ Libs/GObject-2.0/Records/Value.cs | 10 ++++- 3 files changed, 50 insertions(+), 2 deletions(-) create mode 100644 Libs/GObject-2.0/Native/Classes/RecordWrapper.cs diff --git a/Libs/GObject-2.0/Native/Classes/RecordWrapper.cs b/Libs/GObject-2.0/Native/Classes/RecordWrapper.cs new file mode 100644 index 000000000..399ce8a76 --- /dev/null +++ b/Libs/GObject-2.0/Native/Classes/RecordWrapper.cs @@ -0,0 +1,39 @@ +using System; +using System.Diagnostics; +using System.Reflection; +using System.Runtime.InteropServices; +using GLib; + +namespace GObject.Native +{ + public class RecordWrapper + { + public static object WrapHandle(IntPtr handle, Type gtype) + { + System.Type trueType = TypeDictionary.GetSystemType(gtype); + + if (handle == IntPtr.Zero) + throw new NullReferenceException($"Failed to wrap handle as type <{trueType}>. Null handle passed to WrapHandle."); + + // Get constructor for the true type + ConstructorInfo? ctor = GetRecordConstructor(trueType); + + if (ctor == null) + throw new Exception($"Type {trueType} does not define an IntPtr constructor. This could mean improperly defined bindings"); + + return ctor.Invoke(new object[] { handle }); + } + + private static ConstructorInfo? GetRecordConstructor(System.Type type) + { + // Create using 'IntPtr' constructor + ConstructorInfo? ctor = type.GetConstructor( + System.Reflection.BindingFlags.NonPublic + | System.Reflection.BindingFlags.Public + | System.Reflection.BindingFlags.Instance, + null, new[] { typeof(IntPtr), typeof(bool) }, null + ); + return ctor; + } + } +} diff --git a/Libs/GObject-2.0/Native/Classes/TypeDictionary.cs b/Libs/GObject-2.0/Native/Classes/TypeDictionary.cs index b51135390..3092cd3e4 100644 --- a/Libs/GObject-2.0/Native/Classes/TypeDictionary.cs +++ b/Libs/GObject-2.0/Native/Classes/TypeDictionary.cs @@ -97,6 +97,9 @@ internal static System.Type GetSystemType(Type gtype) if (_reverseTypeDict.TryGetValue(gtype, out System.Type? sysType)) return sysType; + if (Functions.TypeIsA(gtype.Value, Type.Boxed.Value)) + throw new Exception($"Record not registered: {gtype.ToString()}"); + // If gtype is not in the type dictionary, walk up the // tree until we find a type that is. As all objects are // descended from GObject, we will eventually find a parent diff --git a/Libs/GObject-2.0/Records/Value.cs b/Libs/GObject-2.0/Records/Value.cs index 9f437b474..ad7303fad 100644 --- a/Libs/GObject-2.0/Records/Value.cs +++ b/Libs/GObject-2.0/Records/Value.cs @@ -161,8 +161,14 @@ public void Set(object? value) if (type == Functions.StrvGetType()) return StringHelper.ToStringArrayUtf8(ptr); - // TODO: Very temporary !!! Return a pointer - return Native.Value.Methods.GetBoxed(Handle); + // TODO: It would be nice to support boxing arbitrary managed types + // One idea for how to achieve this is creating our own 'OpaqueBoxed' type + // which wraps a GCHandle or similar. We can then retrieve this at runtime + // from a static dictionary, etc. Alternatively, perhaps we want to find a + // method which plays nice with AOT compilation. + + // TODO: Should this be GetBoxed/TakeBoxed/DupBoxed? + return RecordWrapper.WrapHandle(Native.Value.Methods.GetBoxed(Handle), new Type(type)); throw new NotSupportedException($"Can't get boxed value. Type '{new Type((nuint)type)}' is not supported."); } From 35bf1c2f61384139c4b8738bdbd9ad040f54374b Mon Sep 17 00:00:00 2001 From: Matthew Jakeman Date: Mon, 7 Jun 2021 15:20:02 +1200 Subject: [PATCH 09/35] Register records in module, support cairo context --- Generator/Extensions/SymbolExtension.cs | 6 ++++++ .../Services/Writer/WriteModuleService.cs | 12 +++++++++--- .../Templates/module_type_registration.sbntxt | 13 ++++++++++++- Generator/Templates/record.sbntxt | 6 ++++++ .../Native/Classes/RecordWrapper.cs | 2 +- Libs/cairo-1.0/Records/Context.cs | 19 +++++++++++-------- Libs/cairo-1.0/cairo-1.0.csproj | 1 + 7 files changed, 46 insertions(+), 13 deletions(-) diff --git a/Generator/Extensions/SymbolExtension.cs b/Generator/Extensions/SymbolExtension.cs index fc2fc11d3..ddf7e1022 100644 --- a/Generator/Extensions/SymbolExtension.cs +++ b/Generator/Extensions/SymbolExtension.cs @@ -32,5 +32,11 @@ public static string WriteTypeRegistration(this Type type) { return $"TypeDictionary.Add(typeof({type.SymbolName}), new GObject.Type(Native.{type.SymbolName}.Instance.Methods.GetGType()));\r\n"; } + + // TODO: Should this be a separate function? + public static string WriteTypeRegistrationRecord(this Type type) + { + return $"TypeDictionary.Add(typeof({type.SymbolName}), new GObject.Type(Native.{type.SymbolName}.Methods.GetGType()));\r\n"; + } } } diff --git a/Generator/Services/Writer/WriteModuleService.cs b/Generator/Services/Writer/WriteModuleService.cs index 1e9e67a85..3e39c4de3 100644 --- a/Generator/Services/Writer/WriteModuleService.cs +++ b/Generator/Services/Writer/WriteModuleService.cs @@ -1,4 +1,5 @@ using System; +using System.Collections.Generic; using System.Diagnostics; using System.Linq; using Generator.Factories; @@ -37,17 +38,22 @@ public void Write(Namespace ns, string outputDir) private void WriteTypeDictionaryInitialization(Namespace ns, string outputDir) { - var classes = ns.Classes.Where(x => !x.IsFundamental); + IEnumerable classes = ns.Classes.Where(x => !x.IsFundamental); + IEnumerable records = ns.Records.Where(x => x.GetTypeFunction is not null); + + IEnumerable types = classes.Concat(records); - if (!classes.Any()) + if (!types.Any()) return; var scriptObject = new ScriptObject() { { "namespace", ns }, - { "classes", classes}, + { "classes", classes }, + { "records", records }, }; scriptObject.Import("write_type_registration", new Func(s => s.WriteTypeRegistration())); + scriptObject.Import("write_type_registration_record", new Func(s => s.WriteTypeRegistrationRecord())); _writeHelperService.Write( projectName: ns.ToCanonicalName(), diff --git a/Generator/Templates/module_type_registration.sbntxt b/Generator/Templates/module_type_registration.sbntxt index edaccd08a..505dede49 100644 --- a/Generator/Templates/module_type_registration.sbntxt +++ b/Generator/Templates/module_type_registration.sbntxt @@ -14,7 +14,18 @@ namespace {{ namespace.name }} } catch (Exception e) { - Console.WriteLine($"Could not register type '{{ $class.symbol_name }}': {e.Message}"); + Console.WriteLine($"Could not register class type '{{ $class.symbol_name }}': {e.Message}"); + } + {{ end }} + + {{ for $record in records }} + try + { + {{ $record | write_type_registration_record }} + } + catch (Exception e) + { + Console.WriteLine($"Could not register record type '{{ $record.symbol_name }}': {e.Message}"); } {{ end }} } diff --git a/Generator/Templates/record.sbntxt b/Generator/Templates/record.sbntxt index 4e1dd3965..a24badd5b 100644 --- a/Generator/Templates/record.sbntxt +++ b/Generator/Templates/record.sbntxt @@ -27,6 +27,12 @@ namespace {{ namespace.name }} Initialize(); } + public {{ $record_name }}(IntPtr ptr) + { + _handle = new {{ $safe_handle }}(ptr); + Initialize(); + } + // TODO: Default Constructor (allocate in managed memory and free on Dispose?) // We need to be able to create instances of records with full access to // fields, e.g. Gdk.Rectangle, Gtk.TreeIter, etc. diff --git a/Libs/GObject-2.0/Native/Classes/RecordWrapper.cs b/Libs/GObject-2.0/Native/Classes/RecordWrapper.cs index 399ce8a76..2614ffad1 100644 --- a/Libs/GObject-2.0/Native/Classes/RecordWrapper.cs +++ b/Libs/GObject-2.0/Native/Classes/RecordWrapper.cs @@ -31,7 +31,7 @@ public static object WrapHandle(IntPtr handle, Type gtype) System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.Instance, - null, new[] { typeof(IntPtr), typeof(bool) }, null + null, new[] { typeof(IntPtr) }, null ); return ctor; } diff --git a/Libs/cairo-1.0/Records/Context.cs b/Libs/cairo-1.0/Records/Context.cs index e4fbe4672..51506ac4d 100644 --- a/Libs/cairo-1.0/Records/Context.cs +++ b/Libs/cairo-1.0/Records/Context.cs @@ -6,54 +6,57 @@ namespace cairo { public partial class Context { + // IMPORTANT FIXME TODO: This should not be hardcoded + private const string cairoLib = "libcairo-2"; + // IMPORTANT: We should follow cairo's guidelines on memory management // for language bindings. This is a quick attempt at implementing something // workable. - [DllImport ("cairo", EntryPoint = "cairo_set_source_rgba")] + [DllImport (cairoLib, EntryPoint = "cairo_set_source_rgba")] internal static extern void NativeSetSourceRgba (Native.Context.Handle cr, double red, double green, double blue, double alpha); public void SetSourceRgba(double red, double green, double blue, double alpha) => NativeSetSourceRgba(Handle, red, green, blue, alpha); - [DllImport ("cairo", EntryPoint = "cairo_show_text")] + [DllImport (cairoLib, EntryPoint = "cairo_show_text")] internal static extern void NativeShowText (Native.Context.Handle cr, [MarshalAs(UnmanagedType.LPUTF8Str)] string utf8); public void ShowText(string text) => NativeShowText(Handle, text); - [DllImport ("cairo", EntryPoint = "cairo_move_to")] + [DllImport (cairoLib, EntryPoint = "cairo_move_to")] internal static extern void NativeMoveTo (Native.Context.Handle cr, double x, double y); public void MoveTo(double x, double y) => NativeMoveTo(Handle, x, y); - [DllImport ("cairo", EntryPoint = "cairo_text_extents")] + [DllImport (cairoLib, EntryPoint = "cairo_text_extents")] internal static extern void NativeTextExtents (Native.Context.Handle cr, [MarshalAs (UnmanagedType.LPUTF8Str)] string utf8, out TextExtents extents); public void TextExtents(string text, out TextExtents extents) => NativeTextExtents(Handle, text, out extents); - [DllImport ("cairo", EntryPoint = "cairo_font_extents")] + [DllImport (cairoLib, EntryPoint = "cairo_font_extents")] internal static extern void NativeFontExtents (Native.Context.Handle cr, out FontExtents extents); public void FontExtents(out FontExtents extents) => NativeFontExtents(Handle, out extents); - [DllImport ("cairo", EntryPoint = "cairo_fill")] + [DllImport (cairoLib, EntryPoint = "cairo_fill")] internal static extern void NativeFill (Native.Context.Handle cr); public void Fill() => NativeFill(Handle); - [DllImport ("cairo", EntryPoint = "cairo_rectangle")] + [DllImport (cairoLib, EntryPoint = "cairo_rectangle")] internal static extern void NativeRectangle (Native.Context.Handle cr, double x, double y, double width, double height); public void Rectangle(double x, double y, double width, double height) => NativeRectangle(Handle, x, y, width, height); - [DllImport ("cairo", EntryPoint = "cairo_set_font_size")] + [DllImport (cairoLib, EntryPoint = "cairo_set_font_size")] internal static extern void NativeSetFontSize (Native.Context.Handle cr, double size); public void SetFontSize(double size) diff --git a/Libs/cairo-1.0/cairo-1.0.csproj b/Libs/cairo-1.0/cairo-1.0.csproj index ac8dac527..6286c7ad2 100644 --- a/Libs/cairo-1.0/cairo-1.0.csproj +++ b/Libs/cairo-1.0/cairo-1.0.csproj @@ -5,5 +5,6 @@ + From d463deba5d660ce1fe422dc94e70522c73020fc2 Mon Sep 17 00:00:00 2001 From: Matthew Jakeman Date: Mon, 7 Jun 2021 15:25:03 +1200 Subject: [PATCH 10/35] Fix GLib module generation --- Generator/Templates/module_type_registration.sbntxt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Generator/Templates/module_type_registration.sbntxt b/Generator/Templates/module_type_registration.sbntxt index 505dede49..ca7206851 100644 --- a/Generator/Templates/module_type_registration.sbntxt +++ b/Generator/Templates/module_type_registration.sbntxt @@ -1,4 +1,6 @@ +{{ if namespace.name != "GLib" # TODO: Temporary until we merge GLib + GObject }} using GObject.Native; +{{ end }} using System; namespace {{ namespace.name }} @@ -7,6 +9,7 @@ namespace {{ namespace.name }} { static partial void RegisterTypes() { + {{ if namespace.name != "GLib" # TODO: Temporary until we merge GLib + GObject }} {{ for $class in classes}} try { @@ -28,6 +31,7 @@ namespace {{ namespace.name }} Console.WriteLine($"Could not register record type '{{ $record.symbol_name }}': {e.Message}"); } {{ end }} + {{ end }} } } } \ No newline at end of file From df60cd119ffd67c50c27d834cfcd83a86e59761d Mon Sep 17 00:00:00 2001 From: Matthew Jakeman Date: Mon, 7 Jun 2021 16:54:31 +1200 Subject: [PATCH 11/35] Clean up legacy code / recreate solution from scratch --- GirCore.sln | 1037 ++++++++--------- Libs/Champlain/Core/Champlain.Core.csproj | 9 - .../Wrapper/Champlain.Wrapper.csproj | 10 - Libs/Clutter/Clutter.csproj | 5 - Libs/GModule-2.0/GModule-2.0.csproj | 10 + Libs/Gdk4/Core/Classes/Snapshot.cs | 11 - Libs/Gdk4/Core/Gdk4.Core.csproj | 10 - Libs/Gdk4/Wrapper/Gdk4.Wrapper.csproj | 12 - Libs/Gsk4/Wrapper/Gsk4.Wrapper.csproj | 9 - Libs/Gtk-3.0/Classes/Notebook.cs | 18 + Libs/Gtk4/Core/Classes/Application.cs | 7 - Libs/Gtk4/Core/Classes/ApplicationWindow.cs | 10 - Libs/Gtk4/Core/Classes/Box.cs | 11 - Libs/Gtk4/Core/Classes/Button.cs | 11 - Libs/Gtk4/Core/Classes/Widget.cs | 10 - Libs/Gtk4/Core/Classes/Window.cs | 14 - Libs/Gtk4/Core/Gtk4.Core.csproj | 12 - Libs/Gtk4/Wrapper/Gtk4.Wrapper.csproj | 13 - Libs/GtkChamplain/Core/Classes/Embed.cs | 7 - .../Core/GtkChamplain.Core.csproj | 11 - .../Wrapper/GtkChamplain.Wrapper.csproj | 5 - .../Extensions/GtkApplicationExtensions.cs | 14 - Libs/GtkClutter/Core/GtkClutter.Core.csproj | 10 - .../Wrapper/GtkClutter.Wrapper.csproj | 10 - .../Core/Classes/PageChangedEventArgs.cs | 13 - Libs/Handy/Core/Classes/Paginator.cs | 15 - .../Core/Enums/PaginatorIndicatorStyle.cs | 12 - Libs/Handy/Core/Handy.Core.csproj | 11 - Libs/Handy/Wrapper/Handy.Wrapper.csproj | 9 - Libs/JavascriptCore/Core/Classes/Context.cs | 12 - Libs/JavascriptCore/Core/Classes/Value.cs | 45 - .../Core/JavascriptCore.Core.csproj | 10 - .../Wrapper/JavascriptCore.Wrapper.csproj | 9 - .../Core/Classes/WebExtension.cs | 18 - .../Core/Classes/WebPage.cs | 8 - .../Core/WebKit2WebExtension.Core.csproj | 10 - .../WebKit2WebExtension.Wrapper.csproj | 9 - Libs/WebKitGTK/Core/Classes/Settings.cs | 9 - .../Core/Classes/StringUserScript.cs | 14 - .../Core/Classes/UserContentManager.cs | 33 - Libs/WebKitGTK/Core/Classes/WebContext.cs | 12 - Libs/WebKitGTK/Core/Classes/WebInspector.cs | 9 - Libs/WebKitGTK/Core/Classes/WebView.cs | 37 - Libs/WebKitGTK/Core/Interfaces/UserScript.cs | 7 - Libs/WebKitGTK/Core/WebKitGTK.Core.csproj | 11 - .../Wrapper/WebKitGTK.Wrapper.csproj | 11 - Libs/cairo-1.0/Records/Context.cs | 18 +- Libs/xlib-2.0/xlib-2.0.csproj | 12 + Samples/GObject/CreateCustomGObject.cs | 27 - Samples/GObject/GObject.csproj | 12 - Samples/GObject/Program.cs | 12 - Samples/Gtk3/Builder/Builder.csproj | 19 - Samples/Gtk3/Builder/DemoWindow.cs | 42 - Samples/Gtk3/Builder/Program.cs | 36 - Samples/Gtk3/Builder/data/demo_window.glade | 37 - Samples/Gtk3/Builder/data/gtk.png | Bin 6503 -> 0 bytes .../NoSourceGenerator/CompositeWidget.cs | 36 - .../NoSourceGenerator/CompositeWidget.ui | 17 - .../NoSourceGenerator.csproj | 19 - .../NoSourceGenerator/Program.cs | 32 - .../UsingSourceGenerator/CompositeWidget.cs | 16 - .../UsingSourceGenerator/CompositeWidget.ui | 17 - .../UsingSourceGenerator/Program.cs | 32 - .../UsingSourceGenerator.csproj | 20 - Samples/Gtk3/GtkApp/GtkApp.csproj | 29 - Samples/Gtk3/GtkApp/MyBox.cs | 20 - Samples/Gtk3/GtkApp/MyWindow.cs | 152 --- Samples/Gtk3/GtkApp/Program.cs | 50 - Samples/Gtk3/GtkApp/SimpleCommand.cs | 28 - Samples/Gtk3/GtkApp/box.glade | 46 - Samples/Gtk3/GtkApp/combobox.glade | 9 - Samples/Gtk3/GtkApp/menu.glade | 18 - Samples/Gtk3/GtkApp/test.html | 13 - Samples/Gtk3/GtkApp/ui.glade | 36 - Samples/Gtk3/QuickStart/Program.cs | 13 +- Samples/Gtk4/SimpleWindow/Program.cs | 39 - Samples/Gtk4/SimpleWindow/SimpleWindow.csproj | 14 - 77 files changed, 542 insertions(+), 1929 deletions(-) delete mode 100644 Libs/Champlain/Core/Champlain.Core.csproj delete mode 100644 Libs/Champlain/Wrapper/Champlain.Wrapper.csproj delete mode 100644 Libs/Clutter/Clutter.csproj create mode 100644 Libs/GModule-2.0/GModule-2.0.csproj delete mode 100644 Libs/Gdk4/Core/Classes/Snapshot.cs delete mode 100644 Libs/Gdk4/Core/Gdk4.Core.csproj delete mode 100644 Libs/Gdk4/Wrapper/Gdk4.Wrapper.csproj delete mode 100644 Libs/Gsk4/Wrapper/Gsk4.Wrapper.csproj create mode 100644 Libs/Gtk-3.0/Classes/Notebook.cs delete mode 100644 Libs/Gtk4/Core/Classes/Application.cs delete mode 100644 Libs/Gtk4/Core/Classes/ApplicationWindow.cs delete mode 100644 Libs/Gtk4/Core/Classes/Box.cs delete mode 100644 Libs/Gtk4/Core/Classes/Button.cs delete mode 100644 Libs/Gtk4/Core/Classes/Widget.cs delete mode 100644 Libs/Gtk4/Core/Classes/Window.cs delete mode 100644 Libs/Gtk4/Core/Gtk4.Core.csproj delete mode 100644 Libs/Gtk4/Wrapper/Gtk4.Wrapper.csproj delete mode 100644 Libs/GtkChamplain/Core/Classes/Embed.cs delete mode 100644 Libs/GtkChamplain/Core/GtkChamplain.Core.csproj delete mode 100644 Libs/GtkChamplain/Wrapper/GtkChamplain.Wrapper.csproj delete mode 100644 Libs/GtkClutter/Core/Extensions/GtkApplicationExtensions.cs delete mode 100644 Libs/GtkClutter/Core/GtkClutter.Core.csproj delete mode 100644 Libs/GtkClutter/Wrapper/GtkClutter.Wrapper.csproj delete mode 100644 Libs/Handy/Core/Classes/PageChangedEventArgs.cs delete mode 100644 Libs/Handy/Core/Classes/Paginator.cs delete mode 100644 Libs/Handy/Core/Enums/PaginatorIndicatorStyle.cs delete mode 100644 Libs/Handy/Core/Handy.Core.csproj delete mode 100644 Libs/Handy/Wrapper/Handy.Wrapper.csproj delete mode 100644 Libs/JavascriptCore/Core/Classes/Context.cs delete mode 100644 Libs/JavascriptCore/Core/Classes/Value.cs delete mode 100644 Libs/JavascriptCore/Core/JavascriptCore.Core.csproj delete mode 100644 Libs/JavascriptCore/Wrapper/JavascriptCore.Wrapper.csproj delete mode 100644 Libs/WebKit2WebExtension/Core/Classes/WebExtension.cs delete mode 100644 Libs/WebKit2WebExtension/Core/Classes/WebPage.cs delete mode 100644 Libs/WebKit2WebExtension/Core/WebKit2WebExtension.Core.csproj delete mode 100644 Libs/WebKit2WebExtension/Wrapper/WebKit2WebExtension.Wrapper.csproj delete mode 100644 Libs/WebKitGTK/Core/Classes/Settings.cs delete mode 100644 Libs/WebKitGTK/Core/Classes/StringUserScript.cs delete mode 100644 Libs/WebKitGTK/Core/Classes/UserContentManager.cs delete mode 100644 Libs/WebKitGTK/Core/Classes/WebContext.cs delete mode 100644 Libs/WebKitGTK/Core/Classes/WebInspector.cs delete mode 100644 Libs/WebKitGTK/Core/Classes/WebView.cs delete mode 100644 Libs/WebKitGTK/Core/Interfaces/UserScript.cs delete mode 100644 Libs/WebKitGTK/Core/WebKitGTK.Core.csproj delete mode 100644 Libs/WebKitGTK/Wrapper/WebKitGTK.Wrapper.csproj create mode 100644 Libs/xlib-2.0/xlib-2.0.csproj delete mode 100644 Samples/GObject/CreateCustomGObject.cs delete mode 100644 Samples/GObject/GObject.csproj delete mode 100644 Samples/GObject/Program.cs delete mode 100644 Samples/Gtk3/Builder/Builder.csproj delete mode 100644 Samples/Gtk3/Builder/DemoWindow.cs delete mode 100644 Samples/Gtk3/Builder/Program.cs delete mode 100644 Samples/Gtk3/Builder/data/demo_window.glade delete mode 100644 Samples/Gtk3/Builder/data/gtk.png delete mode 100644 Samples/Gtk3/CompositeTemplates/NoSourceGenerator/CompositeWidget.cs delete mode 100644 Samples/Gtk3/CompositeTemplates/NoSourceGenerator/CompositeWidget.ui delete mode 100644 Samples/Gtk3/CompositeTemplates/NoSourceGenerator/NoSourceGenerator.csproj delete mode 100644 Samples/Gtk3/CompositeTemplates/NoSourceGenerator/Program.cs delete mode 100644 Samples/Gtk3/CompositeTemplates/UsingSourceGenerator/CompositeWidget.cs delete mode 100644 Samples/Gtk3/CompositeTemplates/UsingSourceGenerator/CompositeWidget.ui delete mode 100644 Samples/Gtk3/CompositeTemplates/UsingSourceGenerator/Program.cs delete mode 100644 Samples/Gtk3/CompositeTemplates/UsingSourceGenerator/UsingSourceGenerator.csproj delete mode 100644 Samples/Gtk3/GtkApp/GtkApp.csproj delete mode 100644 Samples/Gtk3/GtkApp/MyBox.cs delete mode 100644 Samples/Gtk3/GtkApp/MyWindow.cs delete mode 100644 Samples/Gtk3/GtkApp/Program.cs delete mode 100644 Samples/Gtk3/GtkApp/SimpleCommand.cs delete mode 100644 Samples/Gtk3/GtkApp/box.glade delete mode 100644 Samples/Gtk3/GtkApp/combobox.glade delete mode 100644 Samples/Gtk3/GtkApp/menu.glade delete mode 100644 Samples/Gtk3/GtkApp/test.html delete mode 100644 Samples/Gtk3/GtkApp/ui.glade delete mode 100644 Samples/Gtk4/SimpleWindow/Program.cs delete mode 100644 Samples/Gtk4/SimpleWindow/SimpleWindow.csproj diff --git a/GirCore.sln b/GirCore.sln index e7d895142..578f5962c 100644 --- a/GirCore.sln +++ b/GirCore.sln @@ -1,97 +1,85 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 15 -VisualStudioVersion = 15.0.26124.0 -MinimumVisualStudioVersion = 15.0.26124.0 -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Libs", "Libs", "{386AE10F-B7AC-4C97-AC5C-202D3662A868}" +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30114.105 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "cairo-1.0", "Libs\cairo-1.0\cairo-1.0.csproj", "{CACD258B-6FAA-4329-B278-65E169C2AA4F}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GLib-2.0", "Libs\GLib-2.0\GLib-2.0.csproj", "{BF7F9B0B-CB43-4161-BFAD-C6EE479FC86B}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Gdk-3.0", "Libs\Gdk-3.0\Gdk-3.0.csproj", "{4FBB0A13-C5E3-4E88-93D9-35F4D9DFAF19}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GObject-2.0", "Libs\GObject-2.0\GObject-2.0.csproj", "{4F64F773-1A9A-4465-A953-900320EA86CF}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GdkPixbuf-2.0", "Libs\GdkPixbuf-2.0\GdkPixbuf-2.0.csproj", "{7B89A58D-22FA-4417-972F-F4F31F750DB1}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "cairo-1.0", "Libs\cairo-1.0\cairo-1.0.csproj", "{1E2EF862-C6E1-4614-B02E-B222B5D79FFB}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Gio-2.0", "Libs\Gio-2.0\Gio-2.0.csproj", "{D7CEFF27-821C-4551-9FAC-CAFA31EECAE4}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Gdk-3.0", "Libs\Gdk-3.0\Gdk-3.0.csproj", "{80F262F9-AC71-471A-A308-762BC755D69D}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GLib-2.0", "Libs\GLib-2.0\GLib-2.0.csproj", "{5C631D07-6022-4E12-A6A3-C9153CB52256}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GdkPixbuf-2.0", "Libs\GdkPixbuf-2.0\GdkPixbuf-2.0.csproj", "{F74B3242-94DE-4C5E-803F-CDC7090120AF}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GObject-2.0", "Libs\GObject-2.0\GObject-2.0.csproj", "{87DB6D17-E932-4231-A26E-DC3992DE7A31}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Gio-2.0", "Libs\Gio-2.0\Gio-2.0.csproj", "{4D008B2E-6056-4580-B8F0-512502A2D288}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Gst-1.0", "Libs\Gst-1.0\Gst-1.0.csproj", "{2EEFB19E-9A3A-43CA-AEDD-404949932990}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Pango-1.0", "Libs\Pango-1.0\Pango-1.0.csproj", "{EDECCC4E-9C4E-433D-AFFA-F23E062EC1BF}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GstAudio-1.0", "Libs\GstAudio-1.0\GstAudio-1.0.csproj", "{F47BFD71-B46D-4087-86FA-B4FFCAE05BA9}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Samples", "Samples", "{1F2E4087-585C-4B48-8E3D-700D949A15DB}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GstBase-1.0", "Libs\GstBase-1.0\GstBase-1.0.csproj", "{C632FA89-6DCA-4B70-8A14-948418F18EAE}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DBus", "Samples\DBus\DBus.csproj", "{48A4AF23-C232-4498-9D25-B4620ECD9325}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GstPbutils-1.0", "Libs\GstPbutils-1.0\GstPbutils-1.0.csproj", "{BE9E0C10-BFEE-4813-9FE5-A99FC9CC2EC9}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GLib", "Samples\GLib\GLib.csproj", "{3F299CD3-9F86-4AF6-B536-EB7FF409E5E0}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GstVideo-1.0", "Libs\GstVideo-1.0\GstVideo-1.0.csproj", "{3D989189-F8DF-433F-A56F-C9356CEE04BF}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Gtk3", "Gtk3", "{79FE88D9-9545-4AE8-80AF-8E2E2E55E8A3}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Gtk-3.0", "Libs\Gtk-3.0\Gtk-3.0.csproj", "{1544C957-ECF0-4087-B33F-1824F877388A}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "QuickStart", "Samples\Gtk3\QuickStart\QuickStart.csproj", "{27D42088-5F63-4886-A0B2-8B1B66F71BF6}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Pango-1.0", "Libs\Pango-1.0\Pango-1.0.csproj", "{A714BE4D-C42D-4DD6-95D7-76ED153E25F7}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Gst-1.0", "Libs\Gst-1.0\Gst-1.0.csproj", "{1567FD28-14D5-4161-AB66-B099E78F6FFB}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "xlib-2.0", "Libs\xlib-2.0\xlib-2.0.csproj", "{325C924A-D53A-41A6-8A62-7C15FE8E361E}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Gstreamer", "Samples\GStreamer\Gstreamer.csproj", "{6D2A7966-FED3-4FD5-94DF-BBD6C5D04886}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Atk-1.0", "Libs\Atk-1.0\Atk-1.0.csproj", "{5249AD2D-7706-4442-AEED-3FE5A2267A63}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Build", "Build\Build.csproj", "{CC6201B1-B625-4907-AA6B-4C3C56D11C7B}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Libs", "Libs", "{35302E26-88E5-4279-AEF9-2AF1648FED75}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GstAudio-1.0", "Libs\GstAudio-1.0\GstAudio-1.0.csproj", "{37F93CBF-43FE-428B-80D0-4D41FD0C01C7}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Generator", "Generator\Generator.csproj", "{CEF7E849-57C0-4F34-AD57-782737EA3DEE}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GstVideo-1.0", "Libs\GstVideo-1.0\GstVideo-1.0.csproj", "{E22AC3F0-0298-4784-9C91-76138FA3BD74}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Build", "Build\Build.csproj", "{598B01B4-4C11-4D5F-8792-9AE05CC60D7D}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GstPbutils-1.0", "Libs\GstPbutils-1.0\GstPbutils-1.0.csproj", "{0488271F-63F9-41BD-A38B-0FD0D7616BE3}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Samples", "Samples", "{7400B718-3A63-4A38-8B58-B5B08F8896FF}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GstBase-1.0", "Libs\GstBase-1.0\GstBase-1.0.csproj", "{8678914B-C262-4EFB-BCC0-96A15D969C2B}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{E5146B8C-99C0-4D77-B273-8EF64C6380E4}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Integration", "Integration\Integration.csproj", "{60AA5BC4-7B82-41D2-A2A0-2235D8B04BBF}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Build.Tests", "Tests\Build.Tests\Build.Tests.csproj", "{A85BAC7E-9825-4ED4-94EC-D7769FC6F59F}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{8BC11A63-D52B-40CB-9DDD-CD7C6DC21059}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Gio-2.0.Tests", "Tests\Libs\Gio-2.0.Tests\Gio-2.0.Tests.csproj", "{3CFAC57C-F2D9-4C97-B80A-06C9D1037C3E}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Build.Tests", "Tests\Build.Tests\Build.Tests.csproj", "{EAC7D6FF-4BEF-4A24-89A0-600FD686C537}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GLib-2.0.Tests", "Tests\Libs\GLib-2.0.Tests\GLib-2.0.Tests.csproj", "{AF0AFF71-8249-4C89-AA35-5EFC2C7F0603}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Libs", "Libs", "{46D66262-FC61-43B9-8E76-A361FA3D6C81}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GObject-2.0.Tests", "Tests\Libs\GObject-2.0.Tests\GObject-2.0.Tests.csproj", "{5595B738-2134-424C-928D-95EDED02D41D}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GObject-2.0.Tests", "Tests\Libs\GObject-2.0.Tests\GObject-2.0.Tests.csproj", "{53101A81-CB4A-4589-AEB1-0E229D17AE7A}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Gtk-3.0.Tests", "Tests\Libs\Gtk-3.0.Tests\Gtk-3.0.Tests.csproj", "{9641C9F6-F1BC-4A3A-A1DE-129318AB700F}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "CompositeTemplates", "CompositeTemplates", "{A8E40ED1-550F-4168-8299-64EFB875CD44}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Integration", "Integration\Integration.csproj", "{B186BD48-DB63-49CB-8878-BB5AD2C7B35A}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NoSourceGenerator", "Samples\Gtk3\CompositeTemplates\NoSourceGenerator\NoSourceGenerator.csproj", "{BC44EB45-DFA6-44B8-9B19-0C0AB2B856E6}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GirLoader", "GirLoader\GirLoader.csproj", "{C14F16C9-4457-4466-90E3-23214DE76143}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UsingSourceGenerator", "Samples\Gtk3\CompositeTemplates\UsingSourceGenerator\UsingSourceGenerator.csproj", "{0231E616-62C8-4316-9355-326537C07651}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DBus", "Samples\DBus\DBus.csproj", "{2F704199-14C2-4BAE-8859-72A2AD28ACCE}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Generator", "Generator\Generator.csproj", "{28F5A326-D1F9-42E7-985F-C69E01DB4C4E}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TestLoading", "Samples\GdkPixbuf\TestLoading\TestLoading.csproj", "{78777983-0A40-4900-9A0A-AE11BE16D24A}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GirLoader", "GirLoader\GirLoader.csproj", "{8385F95E-E778-44EF-96F2-8F357B1B6348}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TestMemoryLeaks", "Samples\GdkPixbuf\TestMemoryLeaks\TestMemoryLeaks.csproj", "{29045457-F438-4BAC-9B37-D6CDA565313B}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Gtk-3.0", "Libs\Gtk-3.0\Gtk-3.0.csproj", "{B4C179CA-89E5-4638-BAEC-8E37B5BBED12}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GLib", "Samples\GLib\GLib.csproj", "{27C31E30-DB9F-43BD-9EE7-727CCAA8F55D}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GLib-2.0.Tests", "Tests\Libs\GLib-2.0.Tests\GLib-2.0.Tests.csproj", "{8E6A242B-B0E6-4DA2-ABA3-6389D65AED5E}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GStreamer", "Samples\GStreamer\GStreamer.csproj", "{8E738B50-44A3-4115-B50D-6F2A884B9D88}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Gio-2.0.Tests", "Tests\Libs\Gio-2.0.Tests\Gio-2.0.Tests.csproj", "{76DD0496-67BC-4B86-BBE1-5648CAF0C719}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "GdkPixbuf", "GdkPixbuf", "{A147D18A-EF3A-4DEA-82E2-7D12561EE462}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "GdkPixbuf", "GdkPixbuf", "{7A71B07F-B28B-4DDA-B1EA-565194056951}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Gtk3", "Gtk3", "{A7AB8BFE-B16D-4D52-94AD-37697E04DB64}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestMemoryLeaks", "Samples\GdkPixbuf\TestMemoryLeaks\TestMemoryLeaks.csproj", "{46E769E2-FEC7-43EA-99B8-E7A7294D68B2}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AboutDialog", "Samples\Gtk3\AboutDialog\AboutDialog.csproj", "{2747A834-C952-4FB6-8A4B-E01C226D08F6}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Atk-1.0", "Libs\Atk-1.0\Atk-1.0.csproj", "{C2432595-F82E-4DF1-96FA-BD6B4D470010}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DeclarativeUi", "Samples\Gtk3\DeclarativeUi\DeclarativeUi.csproj", "{8524E510-D98F-4FD3-BE10-08352527290F}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Builder", "Samples\Gtk3\Builder\Builder.csproj", "{537015CF-AE85-4DC2-AE5C-653B213C5BEA}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DrawingArea", "Samples\Gtk3\DrawingArea\DrawingArea.csproj", "{40C9EB86-CF4E-45D9-BEF7-E89913171D86}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GtkApp", "Samples\Gtk3\GtkApp\GtkApp.csproj", "{749EE7C7-D85E-496D-B127-948E0157AF3E}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "QuickStart", "Samples\Gtk3\QuickStart\QuickStart.csproj", "{DE554FAE-B638-4C39-B4F9-0D4FFB0F9027}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Window", "Samples\Gtk3\Window\Window.csproj", "{F450E603-4DCA-473A-A9D6-EAD96421F338}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestLoading", "Samples\GdkPixbuf\TestLoading\TestLoading.csproj", "{2BB1527F-D7A1-44BA-A297-4E69A3A4411C}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Gtk-3.0.Tests", "Tests\Libs\Gtk-3.0.Tests\Gtk-3.0.Tests.csproj", "{F86D983A-9881-4BE7-AF92-FA0CE41FB319}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DeclarativeUi", "Samples\Gtk3\DeclarativeUi\DeclarativeUi.csproj", "{59E6AF5C-5F8A-4735-9F95-6457CC17C075}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AboutDialog", "Samples\Gtk3\AboutDialog\AboutDialog.csproj", "{35D35175-A160-4557-BE3E-9BCB296C61A1}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DrawingArea", "Samples\Gtk3\DrawingArea\DrawingArea.csproj", "{33809B07-61F8-46C1-A921-F30467B21113}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "cairo-1.0.Tests", "Tests\Libs\cairo-1.0.Tests\cairo-1.0.Tests.csproj", "{E176A6B9-36DD-4452-8AA8-F1DCB6B47C33}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Window", "Samples\Gtk3\Window\Window.csproj", "{BEE19955-275A-4242-B1AF-402AD3C7C5F9}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -102,505 +90,454 @@ Global Release|x64 = Release|x64 Release|x86 = Release|x86 EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {CACD258B-6FAA-4329-B278-65E169C2AA4F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {CACD258B-6FAA-4329-B278-65E169C2AA4F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CACD258B-6FAA-4329-B278-65E169C2AA4F}.Debug|x64.ActiveCfg = Debug|Any CPU + {CACD258B-6FAA-4329-B278-65E169C2AA4F}.Debug|x64.Build.0 = Debug|Any CPU + {CACD258B-6FAA-4329-B278-65E169C2AA4F}.Debug|x86.ActiveCfg = Debug|Any CPU + {CACD258B-6FAA-4329-B278-65E169C2AA4F}.Debug|x86.Build.0 = Debug|Any CPU + {CACD258B-6FAA-4329-B278-65E169C2AA4F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {CACD258B-6FAA-4329-B278-65E169C2AA4F}.Release|Any CPU.Build.0 = Release|Any CPU + {CACD258B-6FAA-4329-B278-65E169C2AA4F}.Release|x64.ActiveCfg = Release|Any CPU + {CACD258B-6FAA-4329-B278-65E169C2AA4F}.Release|x64.Build.0 = Release|Any CPU + {CACD258B-6FAA-4329-B278-65E169C2AA4F}.Release|x86.ActiveCfg = Release|Any CPU + {CACD258B-6FAA-4329-B278-65E169C2AA4F}.Release|x86.Build.0 = Release|Any CPU + {4FBB0A13-C5E3-4E88-93D9-35F4D9DFAF19}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4FBB0A13-C5E3-4E88-93D9-35F4D9DFAF19}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4FBB0A13-C5E3-4E88-93D9-35F4D9DFAF19}.Debug|x64.ActiveCfg = Debug|Any CPU + {4FBB0A13-C5E3-4E88-93D9-35F4D9DFAF19}.Debug|x64.Build.0 = Debug|Any CPU + {4FBB0A13-C5E3-4E88-93D9-35F4D9DFAF19}.Debug|x86.ActiveCfg = Debug|Any CPU + {4FBB0A13-C5E3-4E88-93D9-35F4D9DFAF19}.Debug|x86.Build.0 = Debug|Any CPU + {4FBB0A13-C5E3-4E88-93D9-35F4D9DFAF19}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4FBB0A13-C5E3-4E88-93D9-35F4D9DFAF19}.Release|Any CPU.Build.0 = Release|Any CPU + {4FBB0A13-C5E3-4E88-93D9-35F4D9DFAF19}.Release|x64.ActiveCfg = Release|Any CPU + {4FBB0A13-C5E3-4E88-93D9-35F4D9DFAF19}.Release|x64.Build.0 = Release|Any CPU + {4FBB0A13-C5E3-4E88-93D9-35F4D9DFAF19}.Release|x86.ActiveCfg = Release|Any CPU + {4FBB0A13-C5E3-4E88-93D9-35F4D9DFAF19}.Release|x86.Build.0 = Release|Any CPU + {7B89A58D-22FA-4417-972F-F4F31F750DB1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7B89A58D-22FA-4417-972F-F4F31F750DB1}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7B89A58D-22FA-4417-972F-F4F31F750DB1}.Debug|x64.ActiveCfg = Debug|Any CPU + {7B89A58D-22FA-4417-972F-F4F31F750DB1}.Debug|x64.Build.0 = Debug|Any CPU + {7B89A58D-22FA-4417-972F-F4F31F750DB1}.Debug|x86.ActiveCfg = Debug|Any CPU + {7B89A58D-22FA-4417-972F-F4F31F750DB1}.Debug|x86.Build.0 = Debug|Any CPU + {7B89A58D-22FA-4417-972F-F4F31F750DB1}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7B89A58D-22FA-4417-972F-F4F31F750DB1}.Release|Any CPU.Build.0 = Release|Any CPU + {7B89A58D-22FA-4417-972F-F4F31F750DB1}.Release|x64.ActiveCfg = Release|Any CPU + {7B89A58D-22FA-4417-972F-F4F31F750DB1}.Release|x64.Build.0 = Release|Any CPU + {7B89A58D-22FA-4417-972F-F4F31F750DB1}.Release|x86.ActiveCfg = Release|Any CPU + {7B89A58D-22FA-4417-972F-F4F31F750DB1}.Release|x86.Build.0 = Release|Any CPU + {D7CEFF27-821C-4551-9FAC-CAFA31EECAE4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D7CEFF27-821C-4551-9FAC-CAFA31EECAE4}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D7CEFF27-821C-4551-9FAC-CAFA31EECAE4}.Debug|x64.ActiveCfg = Debug|Any CPU + {D7CEFF27-821C-4551-9FAC-CAFA31EECAE4}.Debug|x64.Build.0 = Debug|Any CPU + {D7CEFF27-821C-4551-9FAC-CAFA31EECAE4}.Debug|x86.ActiveCfg = Debug|Any CPU + {D7CEFF27-821C-4551-9FAC-CAFA31EECAE4}.Debug|x86.Build.0 = Debug|Any CPU + {D7CEFF27-821C-4551-9FAC-CAFA31EECAE4}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D7CEFF27-821C-4551-9FAC-CAFA31EECAE4}.Release|Any CPU.Build.0 = Release|Any CPU + {D7CEFF27-821C-4551-9FAC-CAFA31EECAE4}.Release|x64.ActiveCfg = Release|Any CPU + {D7CEFF27-821C-4551-9FAC-CAFA31EECAE4}.Release|x64.Build.0 = Release|Any CPU + {D7CEFF27-821C-4551-9FAC-CAFA31EECAE4}.Release|x86.ActiveCfg = Release|Any CPU + {D7CEFF27-821C-4551-9FAC-CAFA31EECAE4}.Release|x86.Build.0 = Release|Any CPU + {5C631D07-6022-4E12-A6A3-C9153CB52256}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5C631D07-6022-4E12-A6A3-C9153CB52256}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5C631D07-6022-4E12-A6A3-C9153CB52256}.Debug|x64.ActiveCfg = Debug|Any CPU + {5C631D07-6022-4E12-A6A3-C9153CB52256}.Debug|x64.Build.0 = Debug|Any CPU + {5C631D07-6022-4E12-A6A3-C9153CB52256}.Debug|x86.ActiveCfg = Debug|Any CPU + {5C631D07-6022-4E12-A6A3-C9153CB52256}.Debug|x86.Build.0 = Debug|Any CPU + {5C631D07-6022-4E12-A6A3-C9153CB52256}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5C631D07-6022-4E12-A6A3-C9153CB52256}.Release|Any CPU.Build.0 = Release|Any CPU + {5C631D07-6022-4E12-A6A3-C9153CB52256}.Release|x64.ActiveCfg = Release|Any CPU + {5C631D07-6022-4E12-A6A3-C9153CB52256}.Release|x64.Build.0 = Release|Any CPU + {5C631D07-6022-4E12-A6A3-C9153CB52256}.Release|x86.ActiveCfg = Release|Any CPU + {5C631D07-6022-4E12-A6A3-C9153CB52256}.Release|x86.Build.0 = Release|Any CPU + {87DB6D17-E932-4231-A26E-DC3992DE7A31}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {87DB6D17-E932-4231-A26E-DC3992DE7A31}.Debug|Any CPU.Build.0 = Debug|Any CPU + {87DB6D17-E932-4231-A26E-DC3992DE7A31}.Debug|x64.ActiveCfg = Debug|Any CPU + {87DB6D17-E932-4231-A26E-DC3992DE7A31}.Debug|x64.Build.0 = Debug|Any CPU + {87DB6D17-E932-4231-A26E-DC3992DE7A31}.Debug|x86.ActiveCfg = Debug|Any CPU + {87DB6D17-E932-4231-A26E-DC3992DE7A31}.Debug|x86.Build.0 = Debug|Any CPU + {87DB6D17-E932-4231-A26E-DC3992DE7A31}.Release|Any CPU.ActiveCfg = Release|Any CPU + {87DB6D17-E932-4231-A26E-DC3992DE7A31}.Release|Any CPU.Build.0 = Release|Any CPU + {87DB6D17-E932-4231-A26E-DC3992DE7A31}.Release|x64.ActiveCfg = Release|Any CPU + {87DB6D17-E932-4231-A26E-DC3992DE7A31}.Release|x64.Build.0 = Release|Any CPU + {87DB6D17-E932-4231-A26E-DC3992DE7A31}.Release|x86.ActiveCfg = Release|Any CPU + {87DB6D17-E932-4231-A26E-DC3992DE7A31}.Release|x86.Build.0 = Release|Any CPU + {2EEFB19E-9A3A-43CA-AEDD-404949932990}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2EEFB19E-9A3A-43CA-AEDD-404949932990}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2EEFB19E-9A3A-43CA-AEDD-404949932990}.Debug|x64.ActiveCfg = Debug|Any CPU + {2EEFB19E-9A3A-43CA-AEDD-404949932990}.Debug|x64.Build.0 = Debug|Any CPU + {2EEFB19E-9A3A-43CA-AEDD-404949932990}.Debug|x86.ActiveCfg = Debug|Any CPU + {2EEFB19E-9A3A-43CA-AEDD-404949932990}.Debug|x86.Build.0 = Debug|Any CPU + {2EEFB19E-9A3A-43CA-AEDD-404949932990}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2EEFB19E-9A3A-43CA-AEDD-404949932990}.Release|Any CPU.Build.0 = Release|Any CPU + {2EEFB19E-9A3A-43CA-AEDD-404949932990}.Release|x64.ActiveCfg = Release|Any CPU + {2EEFB19E-9A3A-43CA-AEDD-404949932990}.Release|x64.Build.0 = Release|Any CPU + {2EEFB19E-9A3A-43CA-AEDD-404949932990}.Release|x86.ActiveCfg = Release|Any CPU + {2EEFB19E-9A3A-43CA-AEDD-404949932990}.Release|x86.Build.0 = Release|Any CPU + {F47BFD71-B46D-4087-86FA-B4FFCAE05BA9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F47BFD71-B46D-4087-86FA-B4FFCAE05BA9}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F47BFD71-B46D-4087-86FA-B4FFCAE05BA9}.Debug|x64.ActiveCfg = Debug|Any CPU + {F47BFD71-B46D-4087-86FA-B4FFCAE05BA9}.Debug|x64.Build.0 = Debug|Any CPU + {F47BFD71-B46D-4087-86FA-B4FFCAE05BA9}.Debug|x86.ActiveCfg = Debug|Any CPU + {F47BFD71-B46D-4087-86FA-B4FFCAE05BA9}.Debug|x86.Build.0 = Debug|Any CPU + {F47BFD71-B46D-4087-86FA-B4FFCAE05BA9}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F47BFD71-B46D-4087-86FA-B4FFCAE05BA9}.Release|Any CPU.Build.0 = Release|Any CPU + {F47BFD71-B46D-4087-86FA-B4FFCAE05BA9}.Release|x64.ActiveCfg = Release|Any CPU + {F47BFD71-B46D-4087-86FA-B4FFCAE05BA9}.Release|x64.Build.0 = Release|Any CPU + {F47BFD71-B46D-4087-86FA-B4FFCAE05BA9}.Release|x86.ActiveCfg = Release|Any CPU + {F47BFD71-B46D-4087-86FA-B4FFCAE05BA9}.Release|x86.Build.0 = Release|Any CPU + {C632FA89-6DCA-4B70-8A14-948418F18EAE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C632FA89-6DCA-4B70-8A14-948418F18EAE}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C632FA89-6DCA-4B70-8A14-948418F18EAE}.Debug|x64.ActiveCfg = Debug|Any CPU + {C632FA89-6DCA-4B70-8A14-948418F18EAE}.Debug|x64.Build.0 = Debug|Any CPU + {C632FA89-6DCA-4B70-8A14-948418F18EAE}.Debug|x86.ActiveCfg = Debug|Any CPU + {C632FA89-6DCA-4B70-8A14-948418F18EAE}.Debug|x86.Build.0 = Debug|Any CPU + {C632FA89-6DCA-4B70-8A14-948418F18EAE}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C632FA89-6DCA-4B70-8A14-948418F18EAE}.Release|Any CPU.Build.0 = Release|Any CPU + {C632FA89-6DCA-4B70-8A14-948418F18EAE}.Release|x64.ActiveCfg = Release|Any CPU + {C632FA89-6DCA-4B70-8A14-948418F18EAE}.Release|x64.Build.0 = Release|Any CPU + {C632FA89-6DCA-4B70-8A14-948418F18EAE}.Release|x86.ActiveCfg = Release|Any CPU + {C632FA89-6DCA-4B70-8A14-948418F18EAE}.Release|x86.Build.0 = Release|Any CPU + {BE9E0C10-BFEE-4813-9FE5-A99FC9CC2EC9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {BE9E0C10-BFEE-4813-9FE5-A99FC9CC2EC9}.Debug|Any CPU.Build.0 = Debug|Any CPU + {BE9E0C10-BFEE-4813-9FE5-A99FC9CC2EC9}.Debug|x64.ActiveCfg = Debug|Any CPU + {BE9E0C10-BFEE-4813-9FE5-A99FC9CC2EC9}.Debug|x64.Build.0 = Debug|Any CPU + {BE9E0C10-BFEE-4813-9FE5-A99FC9CC2EC9}.Debug|x86.ActiveCfg = Debug|Any CPU + {BE9E0C10-BFEE-4813-9FE5-A99FC9CC2EC9}.Debug|x86.Build.0 = Debug|Any CPU + {BE9E0C10-BFEE-4813-9FE5-A99FC9CC2EC9}.Release|Any CPU.ActiveCfg = Release|Any CPU + {BE9E0C10-BFEE-4813-9FE5-A99FC9CC2EC9}.Release|Any CPU.Build.0 = Release|Any CPU + {BE9E0C10-BFEE-4813-9FE5-A99FC9CC2EC9}.Release|x64.ActiveCfg = Release|Any CPU + {BE9E0C10-BFEE-4813-9FE5-A99FC9CC2EC9}.Release|x64.Build.0 = Release|Any CPU + {BE9E0C10-BFEE-4813-9FE5-A99FC9CC2EC9}.Release|x86.ActiveCfg = Release|Any CPU + {BE9E0C10-BFEE-4813-9FE5-A99FC9CC2EC9}.Release|x86.Build.0 = Release|Any CPU + {3D989189-F8DF-433F-A56F-C9356CEE04BF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3D989189-F8DF-433F-A56F-C9356CEE04BF}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3D989189-F8DF-433F-A56F-C9356CEE04BF}.Debug|x64.ActiveCfg = Debug|Any CPU + {3D989189-F8DF-433F-A56F-C9356CEE04BF}.Debug|x64.Build.0 = Debug|Any CPU + {3D989189-F8DF-433F-A56F-C9356CEE04BF}.Debug|x86.ActiveCfg = Debug|Any CPU + {3D989189-F8DF-433F-A56F-C9356CEE04BF}.Debug|x86.Build.0 = Debug|Any CPU + {3D989189-F8DF-433F-A56F-C9356CEE04BF}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3D989189-F8DF-433F-A56F-C9356CEE04BF}.Release|Any CPU.Build.0 = Release|Any CPU + {3D989189-F8DF-433F-A56F-C9356CEE04BF}.Release|x64.ActiveCfg = Release|Any CPU + {3D989189-F8DF-433F-A56F-C9356CEE04BF}.Release|x64.Build.0 = Release|Any CPU + {3D989189-F8DF-433F-A56F-C9356CEE04BF}.Release|x86.ActiveCfg = Release|Any CPU + {3D989189-F8DF-433F-A56F-C9356CEE04BF}.Release|x86.Build.0 = Release|Any CPU + {1544C957-ECF0-4087-B33F-1824F877388A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1544C957-ECF0-4087-B33F-1824F877388A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1544C957-ECF0-4087-B33F-1824F877388A}.Debug|x64.ActiveCfg = Debug|Any CPU + {1544C957-ECF0-4087-B33F-1824F877388A}.Debug|x64.Build.0 = Debug|Any CPU + {1544C957-ECF0-4087-B33F-1824F877388A}.Debug|x86.ActiveCfg = Debug|Any CPU + {1544C957-ECF0-4087-B33F-1824F877388A}.Debug|x86.Build.0 = Debug|Any CPU + {1544C957-ECF0-4087-B33F-1824F877388A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1544C957-ECF0-4087-B33F-1824F877388A}.Release|Any CPU.Build.0 = Release|Any CPU + {1544C957-ECF0-4087-B33F-1824F877388A}.Release|x64.ActiveCfg = Release|Any CPU + {1544C957-ECF0-4087-B33F-1824F877388A}.Release|x64.Build.0 = Release|Any CPU + {1544C957-ECF0-4087-B33F-1824F877388A}.Release|x86.ActiveCfg = Release|Any CPU + {1544C957-ECF0-4087-B33F-1824F877388A}.Release|x86.Build.0 = Release|Any CPU + {A714BE4D-C42D-4DD6-95D7-76ED153E25F7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A714BE4D-C42D-4DD6-95D7-76ED153E25F7}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A714BE4D-C42D-4DD6-95D7-76ED153E25F7}.Debug|x64.ActiveCfg = Debug|Any CPU + {A714BE4D-C42D-4DD6-95D7-76ED153E25F7}.Debug|x64.Build.0 = Debug|Any CPU + {A714BE4D-C42D-4DD6-95D7-76ED153E25F7}.Debug|x86.ActiveCfg = Debug|Any CPU + {A714BE4D-C42D-4DD6-95D7-76ED153E25F7}.Debug|x86.Build.0 = Debug|Any CPU + {A714BE4D-C42D-4DD6-95D7-76ED153E25F7}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A714BE4D-C42D-4DD6-95D7-76ED153E25F7}.Release|Any CPU.Build.0 = Release|Any CPU + {A714BE4D-C42D-4DD6-95D7-76ED153E25F7}.Release|x64.ActiveCfg = Release|Any CPU + {A714BE4D-C42D-4DD6-95D7-76ED153E25F7}.Release|x64.Build.0 = Release|Any CPU + {A714BE4D-C42D-4DD6-95D7-76ED153E25F7}.Release|x86.ActiveCfg = Release|Any CPU + {A714BE4D-C42D-4DD6-95D7-76ED153E25F7}.Release|x86.Build.0 = Release|Any CPU + {325C924A-D53A-41A6-8A62-7C15FE8E361E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {325C924A-D53A-41A6-8A62-7C15FE8E361E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {325C924A-D53A-41A6-8A62-7C15FE8E361E}.Debug|x64.ActiveCfg = Debug|Any CPU + {325C924A-D53A-41A6-8A62-7C15FE8E361E}.Debug|x64.Build.0 = Debug|Any CPU + {325C924A-D53A-41A6-8A62-7C15FE8E361E}.Debug|x86.ActiveCfg = Debug|Any CPU + {325C924A-D53A-41A6-8A62-7C15FE8E361E}.Debug|x86.Build.0 = Debug|Any CPU + {325C924A-D53A-41A6-8A62-7C15FE8E361E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {325C924A-D53A-41A6-8A62-7C15FE8E361E}.Release|Any CPU.Build.0 = Release|Any CPU + {325C924A-D53A-41A6-8A62-7C15FE8E361E}.Release|x64.ActiveCfg = Release|Any CPU + {325C924A-D53A-41A6-8A62-7C15FE8E361E}.Release|x64.Build.0 = Release|Any CPU + {325C924A-D53A-41A6-8A62-7C15FE8E361E}.Release|x86.ActiveCfg = Release|Any CPU + {325C924A-D53A-41A6-8A62-7C15FE8E361E}.Release|x86.Build.0 = Release|Any CPU + {5249AD2D-7706-4442-AEED-3FE5A2267A63}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5249AD2D-7706-4442-AEED-3FE5A2267A63}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5249AD2D-7706-4442-AEED-3FE5A2267A63}.Debug|x64.ActiveCfg = Debug|Any CPU + {5249AD2D-7706-4442-AEED-3FE5A2267A63}.Debug|x64.Build.0 = Debug|Any CPU + {5249AD2D-7706-4442-AEED-3FE5A2267A63}.Debug|x86.ActiveCfg = Debug|Any CPU + {5249AD2D-7706-4442-AEED-3FE5A2267A63}.Debug|x86.Build.0 = Debug|Any CPU + {5249AD2D-7706-4442-AEED-3FE5A2267A63}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5249AD2D-7706-4442-AEED-3FE5A2267A63}.Release|Any CPU.Build.0 = Release|Any CPU + {5249AD2D-7706-4442-AEED-3FE5A2267A63}.Release|x64.ActiveCfg = Release|Any CPU + {5249AD2D-7706-4442-AEED-3FE5A2267A63}.Release|x64.Build.0 = Release|Any CPU + {5249AD2D-7706-4442-AEED-3FE5A2267A63}.Release|x86.ActiveCfg = Release|Any CPU + {5249AD2D-7706-4442-AEED-3FE5A2267A63}.Release|x86.Build.0 = Release|Any CPU + {CEF7E849-57C0-4F34-AD57-782737EA3DEE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {CEF7E849-57C0-4F34-AD57-782737EA3DEE}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CEF7E849-57C0-4F34-AD57-782737EA3DEE}.Debug|x64.ActiveCfg = Debug|Any CPU + {CEF7E849-57C0-4F34-AD57-782737EA3DEE}.Debug|x64.Build.0 = Debug|Any CPU + {CEF7E849-57C0-4F34-AD57-782737EA3DEE}.Debug|x86.ActiveCfg = Debug|Any CPU + {CEF7E849-57C0-4F34-AD57-782737EA3DEE}.Debug|x86.Build.0 = Debug|Any CPU + {CEF7E849-57C0-4F34-AD57-782737EA3DEE}.Release|Any CPU.ActiveCfg = Release|Any CPU + {CEF7E849-57C0-4F34-AD57-782737EA3DEE}.Release|Any CPU.Build.0 = Release|Any CPU + {CEF7E849-57C0-4F34-AD57-782737EA3DEE}.Release|x64.ActiveCfg = Release|Any CPU + {CEF7E849-57C0-4F34-AD57-782737EA3DEE}.Release|x64.Build.0 = Release|Any CPU + {CEF7E849-57C0-4F34-AD57-782737EA3DEE}.Release|x86.ActiveCfg = Release|Any CPU + {CEF7E849-57C0-4F34-AD57-782737EA3DEE}.Release|x86.Build.0 = Release|Any CPU + {598B01B4-4C11-4D5F-8792-9AE05CC60D7D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {598B01B4-4C11-4D5F-8792-9AE05CC60D7D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {598B01B4-4C11-4D5F-8792-9AE05CC60D7D}.Debug|x64.ActiveCfg = Debug|Any CPU + {598B01B4-4C11-4D5F-8792-9AE05CC60D7D}.Debug|x64.Build.0 = Debug|Any CPU + {598B01B4-4C11-4D5F-8792-9AE05CC60D7D}.Debug|x86.ActiveCfg = Debug|Any CPU + {598B01B4-4C11-4D5F-8792-9AE05CC60D7D}.Debug|x86.Build.0 = Debug|Any CPU + {598B01B4-4C11-4D5F-8792-9AE05CC60D7D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {598B01B4-4C11-4D5F-8792-9AE05CC60D7D}.Release|Any CPU.Build.0 = Release|Any CPU + {598B01B4-4C11-4D5F-8792-9AE05CC60D7D}.Release|x64.ActiveCfg = Release|Any CPU + {598B01B4-4C11-4D5F-8792-9AE05CC60D7D}.Release|x64.Build.0 = Release|Any CPU + {598B01B4-4C11-4D5F-8792-9AE05CC60D7D}.Release|x86.ActiveCfg = Release|Any CPU + {598B01B4-4C11-4D5F-8792-9AE05CC60D7D}.Release|x86.Build.0 = Release|Any CPU + {A85BAC7E-9825-4ED4-94EC-D7769FC6F59F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A85BAC7E-9825-4ED4-94EC-D7769FC6F59F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A85BAC7E-9825-4ED4-94EC-D7769FC6F59F}.Debug|x64.ActiveCfg = Debug|Any CPU + {A85BAC7E-9825-4ED4-94EC-D7769FC6F59F}.Debug|x64.Build.0 = Debug|Any CPU + {A85BAC7E-9825-4ED4-94EC-D7769FC6F59F}.Debug|x86.ActiveCfg = Debug|Any CPU + {A85BAC7E-9825-4ED4-94EC-D7769FC6F59F}.Debug|x86.Build.0 = Debug|Any CPU + {A85BAC7E-9825-4ED4-94EC-D7769FC6F59F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A85BAC7E-9825-4ED4-94EC-D7769FC6F59F}.Release|Any CPU.Build.0 = Release|Any CPU + {A85BAC7E-9825-4ED4-94EC-D7769FC6F59F}.Release|x64.ActiveCfg = Release|Any CPU + {A85BAC7E-9825-4ED4-94EC-D7769FC6F59F}.Release|x64.Build.0 = Release|Any CPU + {A85BAC7E-9825-4ED4-94EC-D7769FC6F59F}.Release|x86.ActiveCfg = Release|Any CPU + {A85BAC7E-9825-4ED4-94EC-D7769FC6F59F}.Release|x86.Build.0 = Release|Any CPU + {3CFAC57C-F2D9-4C97-B80A-06C9D1037C3E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3CFAC57C-F2D9-4C97-B80A-06C9D1037C3E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3CFAC57C-F2D9-4C97-B80A-06C9D1037C3E}.Debug|x64.ActiveCfg = Debug|Any CPU + {3CFAC57C-F2D9-4C97-B80A-06C9D1037C3E}.Debug|x64.Build.0 = Debug|Any CPU + {3CFAC57C-F2D9-4C97-B80A-06C9D1037C3E}.Debug|x86.ActiveCfg = Debug|Any CPU + {3CFAC57C-F2D9-4C97-B80A-06C9D1037C3E}.Debug|x86.Build.0 = Debug|Any CPU + {3CFAC57C-F2D9-4C97-B80A-06C9D1037C3E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3CFAC57C-F2D9-4C97-B80A-06C9D1037C3E}.Release|Any CPU.Build.0 = Release|Any CPU + {3CFAC57C-F2D9-4C97-B80A-06C9D1037C3E}.Release|x64.ActiveCfg = Release|Any CPU + {3CFAC57C-F2D9-4C97-B80A-06C9D1037C3E}.Release|x64.Build.0 = Release|Any CPU + {3CFAC57C-F2D9-4C97-B80A-06C9D1037C3E}.Release|x86.ActiveCfg = Release|Any CPU + {3CFAC57C-F2D9-4C97-B80A-06C9D1037C3E}.Release|x86.Build.0 = Release|Any CPU + {AF0AFF71-8249-4C89-AA35-5EFC2C7F0603}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {AF0AFF71-8249-4C89-AA35-5EFC2C7F0603}.Debug|Any CPU.Build.0 = Debug|Any CPU + {AF0AFF71-8249-4C89-AA35-5EFC2C7F0603}.Debug|x64.ActiveCfg = Debug|Any CPU + {AF0AFF71-8249-4C89-AA35-5EFC2C7F0603}.Debug|x64.Build.0 = Debug|Any CPU + {AF0AFF71-8249-4C89-AA35-5EFC2C7F0603}.Debug|x86.ActiveCfg = Debug|Any CPU + {AF0AFF71-8249-4C89-AA35-5EFC2C7F0603}.Debug|x86.Build.0 = Debug|Any CPU + {AF0AFF71-8249-4C89-AA35-5EFC2C7F0603}.Release|Any CPU.ActiveCfg = Release|Any CPU + {AF0AFF71-8249-4C89-AA35-5EFC2C7F0603}.Release|Any CPU.Build.0 = Release|Any CPU + {AF0AFF71-8249-4C89-AA35-5EFC2C7F0603}.Release|x64.ActiveCfg = Release|Any CPU + {AF0AFF71-8249-4C89-AA35-5EFC2C7F0603}.Release|x64.Build.0 = Release|Any CPU + {AF0AFF71-8249-4C89-AA35-5EFC2C7F0603}.Release|x86.ActiveCfg = Release|Any CPU + {AF0AFF71-8249-4C89-AA35-5EFC2C7F0603}.Release|x86.Build.0 = Release|Any CPU + {5595B738-2134-424C-928D-95EDED02D41D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5595B738-2134-424C-928D-95EDED02D41D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5595B738-2134-424C-928D-95EDED02D41D}.Debug|x64.ActiveCfg = Debug|Any CPU + {5595B738-2134-424C-928D-95EDED02D41D}.Debug|x64.Build.0 = Debug|Any CPU + {5595B738-2134-424C-928D-95EDED02D41D}.Debug|x86.ActiveCfg = Debug|Any CPU + {5595B738-2134-424C-928D-95EDED02D41D}.Debug|x86.Build.0 = Debug|Any CPU + {5595B738-2134-424C-928D-95EDED02D41D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5595B738-2134-424C-928D-95EDED02D41D}.Release|Any CPU.Build.0 = Release|Any CPU + {5595B738-2134-424C-928D-95EDED02D41D}.Release|x64.ActiveCfg = Release|Any CPU + {5595B738-2134-424C-928D-95EDED02D41D}.Release|x64.Build.0 = Release|Any CPU + {5595B738-2134-424C-928D-95EDED02D41D}.Release|x86.ActiveCfg = Release|Any CPU + {5595B738-2134-424C-928D-95EDED02D41D}.Release|x86.Build.0 = Release|Any CPU + {9641C9F6-F1BC-4A3A-A1DE-129318AB700F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9641C9F6-F1BC-4A3A-A1DE-129318AB700F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9641C9F6-F1BC-4A3A-A1DE-129318AB700F}.Debug|x64.ActiveCfg = Debug|Any CPU + {9641C9F6-F1BC-4A3A-A1DE-129318AB700F}.Debug|x64.Build.0 = Debug|Any CPU + {9641C9F6-F1BC-4A3A-A1DE-129318AB700F}.Debug|x86.ActiveCfg = Debug|Any CPU + {9641C9F6-F1BC-4A3A-A1DE-129318AB700F}.Debug|x86.Build.0 = Debug|Any CPU + {9641C9F6-F1BC-4A3A-A1DE-129318AB700F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9641C9F6-F1BC-4A3A-A1DE-129318AB700F}.Release|Any CPU.Build.0 = Release|Any CPU + {9641C9F6-F1BC-4A3A-A1DE-129318AB700F}.Release|x64.ActiveCfg = Release|Any CPU + {9641C9F6-F1BC-4A3A-A1DE-129318AB700F}.Release|x64.Build.0 = Release|Any CPU + {9641C9F6-F1BC-4A3A-A1DE-129318AB700F}.Release|x86.ActiveCfg = Release|Any CPU + {9641C9F6-F1BC-4A3A-A1DE-129318AB700F}.Release|x86.Build.0 = Release|Any CPU + {B186BD48-DB63-49CB-8878-BB5AD2C7B35A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B186BD48-DB63-49CB-8878-BB5AD2C7B35A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B186BD48-DB63-49CB-8878-BB5AD2C7B35A}.Debug|x64.ActiveCfg = Debug|Any CPU + {B186BD48-DB63-49CB-8878-BB5AD2C7B35A}.Debug|x64.Build.0 = Debug|Any CPU + {B186BD48-DB63-49CB-8878-BB5AD2C7B35A}.Debug|x86.ActiveCfg = Debug|Any CPU + {B186BD48-DB63-49CB-8878-BB5AD2C7B35A}.Debug|x86.Build.0 = Debug|Any CPU + {B186BD48-DB63-49CB-8878-BB5AD2C7B35A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B186BD48-DB63-49CB-8878-BB5AD2C7B35A}.Release|Any CPU.Build.0 = Release|Any CPU + {B186BD48-DB63-49CB-8878-BB5AD2C7B35A}.Release|x64.ActiveCfg = Release|Any CPU + {B186BD48-DB63-49CB-8878-BB5AD2C7B35A}.Release|x64.Build.0 = Release|Any CPU + {B186BD48-DB63-49CB-8878-BB5AD2C7B35A}.Release|x86.ActiveCfg = Release|Any CPU + {B186BD48-DB63-49CB-8878-BB5AD2C7B35A}.Release|x86.Build.0 = Release|Any CPU + {C14F16C9-4457-4466-90E3-23214DE76143}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C14F16C9-4457-4466-90E3-23214DE76143}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C14F16C9-4457-4466-90E3-23214DE76143}.Debug|x64.ActiveCfg = Debug|Any CPU + {C14F16C9-4457-4466-90E3-23214DE76143}.Debug|x64.Build.0 = Debug|Any CPU + {C14F16C9-4457-4466-90E3-23214DE76143}.Debug|x86.ActiveCfg = Debug|Any CPU + {C14F16C9-4457-4466-90E3-23214DE76143}.Debug|x86.Build.0 = Debug|Any CPU + {C14F16C9-4457-4466-90E3-23214DE76143}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C14F16C9-4457-4466-90E3-23214DE76143}.Release|Any CPU.Build.0 = Release|Any CPU + {C14F16C9-4457-4466-90E3-23214DE76143}.Release|x64.ActiveCfg = Release|Any CPU + {C14F16C9-4457-4466-90E3-23214DE76143}.Release|x64.Build.0 = Release|Any CPU + {C14F16C9-4457-4466-90E3-23214DE76143}.Release|x86.ActiveCfg = Release|Any CPU + {C14F16C9-4457-4466-90E3-23214DE76143}.Release|x86.Build.0 = Release|Any CPU + {2F704199-14C2-4BAE-8859-72A2AD28ACCE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2F704199-14C2-4BAE-8859-72A2AD28ACCE}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2F704199-14C2-4BAE-8859-72A2AD28ACCE}.Debug|x64.ActiveCfg = Debug|Any CPU + {2F704199-14C2-4BAE-8859-72A2AD28ACCE}.Debug|x64.Build.0 = Debug|Any CPU + {2F704199-14C2-4BAE-8859-72A2AD28ACCE}.Debug|x86.ActiveCfg = Debug|Any CPU + {2F704199-14C2-4BAE-8859-72A2AD28ACCE}.Debug|x86.Build.0 = Debug|Any CPU + {2F704199-14C2-4BAE-8859-72A2AD28ACCE}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2F704199-14C2-4BAE-8859-72A2AD28ACCE}.Release|Any CPU.Build.0 = Release|Any CPU + {2F704199-14C2-4BAE-8859-72A2AD28ACCE}.Release|x64.ActiveCfg = Release|Any CPU + {2F704199-14C2-4BAE-8859-72A2AD28ACCE}.Release|x64.Build.0 = Release|Any CPU + {2F704199-14C2-4BAE-8859-72A2AD28ACCE}.Release|x86.ActiveCfg = Release|Any CPU + {2F704199-14C2-4BAE-8859-72A2AD28ACCE}.Release|x86.Build.0 = Release|Any CPU + {78777983-0A40-4900-9A0A-AE11BE16D24A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {78777983-0A40-4900-9A0A-AE11BE16D24A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {78777983-0A40-4900-9A0A-AE11BE16D24A}.Debug|x64.ActiveCfg = Debug|Any CPU + {78777983-0A40-4900-9A0A-AE11BE16D24A}.Debug|x64.Build.0 = Debug|Any CPU + {78777983-0A40-4900-9A0A-AE11BE16D24A}.Debug|x86.ActiveCfg = Debug|Any CPU + {78777983-0A40-4900-9A0A-AE11BE16D24A}.Debug|x86.Build.0 = Debug|Any CPU + {78777983-0A40-4900-9A0A-AE11BE16D24A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {78777983-0A40-4900-9A0A-AE11BE16D24A}.Release|Any CPU.Build.0 = Release|Any CPU + {78777983-0A40-4900-9A0A-AE11BE16D24A}.Release|x64.ActiveCfg = Release|Any CPU + {78777983-0A40-4900-9A0A-AE11BE16D24A}.Release|x64.Build.0 = Release|Any CPU + {78777983-0A40-4900-9A0A-AE11BE16D24A}.Release|x86.ActiveCfg = Release|Any CPU + {78777983-0A40-4900-9A0A-AE11BE16D24A}.Release|x86.Build.0 = Release|Any CPU + {29045457-F438-4BAC-9B37-D6CDA565313B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {29045457-F438-4BAC-9B37-D6CDA565313B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {29045457-F438-4BAC-9B37-D6CDA565313B}.Debug|x64.ActiveCfg = Debug|Any CPU + {29045457-F438-4BAC-9B37-D6CDA565313B}.Debug|x64.Build.0 = Debug|Any CPU + {29045457-F438-4BAC-9B37-D6CDA565313B}.Debug|x86.ActiveCfg = Debug|Any CPU + {29045457-F438-4BAC-9B37-D6CDA565313B}.Debug|x86.Build.0 = Debug|Any CPU + {29045457-F438-4BAC-9B37-D6CDA565313B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {29045457-F438-4BAC-9B37-D6CDA565313B}.Release|Any CPU.Build.0 = Release|Any CPU + {29045457-F438-4BAC-9B37-D6CDA565313B}.Release|x64.ActiveCfg = Release|Any CPU + {29045457-F438-4BAC-9B37-D6CDA565313B}.Release|x64.Build.0 = Release|Any CPU + {29045457-F438-4BAC-9B37-D6CDA565313B}.Release|x86.ActiveCfg = Release|Any CPU + {29045457-F438-4BAC-9B37-D6CDA565313B}.Release|x86.Build.0 = Release|Any CPU + {27C31E30-DB9F-43BD-9EE7-727CCAA8F55D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {27C31E30-DB9F-43BD-9EE7-727CCAA8F55D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {27C31E30-DB9F-43BD-9EE7-727CCAA8F55D}.Debug|x64.ActiveCfg = Debug|Any CPU + {27C31E30-DB9F-43BD-9EE7-727CCAA8F55D}.Debug|x64.Build.0 = Debug|Any CPU + {27C31E30-DB9F-43BD-9EE7-727CCAA8F55D}.Debug|x86.ActiveCfg = Debug|Any CPU + {27C31E30-DB9F-43BD-9EE7-727CCAA8F55D}.Debug|x86.Build.0 = Debug|Any CPU + {27C31E30-DB9F-43BD-9EE7-727CCAA8F55D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {27C31E30-DB9F-43BD-9EE7-727CCAA8F55D}.Release|Any CPU.Build.0 = Release|Any CPU + {27C31E30-DB9F-43BD-9EE7-727CCAA8F55D}.Release|x64.ActiveCfg = Release|Any CPU + {27C31E30-DB9F-43BD-9EE7-727CCAA8F55D}.Release|x64.Build.0 = Release|Any CPU + {27C31E30-DB9F-43BD-9EE7-727CCAA8F55D}.Release|x86.ActiveCfg = Release|Any CPU + {27C31E30-DB9F-43BD-9EE7-727CCAA8F55D}.Release|x86.Build.0 = Release|Any CPU + {8E738B50-44A3-4115-B50D-6F2A884B9D88}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8E738B50-44A3-4115-B50D-6F2A884B9D88}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8E738B50-44A3-4115-B50D-6F2A884B9D88}.Debug|x64.ActiveCfg = Debug|Any CPU + {8E738B50-44A3-4115-B50D-6F2A884B9D88}.Debug|x64.Build.0 = Debug|Any CPU + {8E738B50-44A3-4115-B50D-6F2A884B9D88}.Debug|x86.ActiveCfg = Debug|Any CPU + {8E738B50-44A3-4115-B50D-6F2A884B9D88}.Debug|x86.Build.0 = Debug|Any CPU + {8E738B50-44A3-4115-B50D-6F2A884B9D88}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8E738B50-44A3-4115-B50D-6F2A884B9D88}.Release|Any CPU.Build.0 = Release|Any CPU + {8E738B50-44A3-4115-B50D-6F2A884B9D88}.Release|x64.ActiveCfg = Release|Any CPU + {8E738B50-44A3-4115-B50D-6F2A884B9D88}.Release|x64.Build.0 = Release|Any CPU + {8E738B50-44A3-4115-B50D-6F2A884B9D88}.Release|x86.ActiveCfg = Release|Any CPU + {8E738B50-44A3-4115-B50D-6F2A884B9D88}.Release|x86.Build.0 = Release|Any CPU + {2747A834-C952-4FB6-8A4B-E01C226D08F6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2747A834-C952-4FB6-8A4B-E01C226D08F6}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2747A834-C952-4FB6-8A4B-E01C226D08F6}.Debug|x64.ActiveCfg = Debug|Any CPU + {2747A834-C952-4FB6-8A4B-E01C226D08F6}.Debug|x64.Build.0 = Debug|Any CPU + {2747A834-C952-4FB6-8A4B-E01C226D08F6}.Debug|x86.ActiveCfg = Debug|Any CPU + {2747A834-C952-4FB6-8A4B-E01C226D08F6}.Debug|x86.Build.0 = Debug|Any CPU + {2747A834-C952-4FB6-8A4B-E01C226D08F6}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2747A834-C952-4FB6-8A4B-E01C226D08F6}.Release|Any CPU.Build.0 = Release|Any CPU + {2747A834-C952-4FB6-8A4B-E01C226D08F6}.Release|x64.ActiveCfg = Release|Any CPU + {2747A834-C952-4FB6-8A4B-E01C226D08F6}.Release|x64.Build.0 = Release|Any CPU + {2747A834-C952-4FB6-8A4B-E01C226D08F6}.Release|x86.ActiveCfg = Release|Any CPU + {2747A834-C952-4FB6-8A4B-E01C226D08F6}.Release|x86.Build.0 = Release|Any CPU + {8524E510-D98F-4FD3-BE10-08352527290F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8524E510-D98F-4FD3-BE10-08352527290F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8524E510-D98F-4FD3-BE10-08352527290F}.Debug|x64.ActiveCfg = Debug|Any CPU + {8524E510-D98F-4FD3-BE10-08352527290F}.Debug|x64.Build.0 = Debug|Any CPU + {8524E510-D98F-4FD3-BE10-08352527290F}.Debug|x86.ActiveCfg = Debug|Any CPU + {8524E510-D98F-4FD3-BE10-08352527290F}.Debug|x86.Build.0 = Debug|Any CPU + {8524E510-D98F-4FD3-BE10-08352527290F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8524E510-D98F-4FD3-BE10-08352527290F}.Release|Any CPU.Build.0 = Release|Any CPU + {8524E510-D98F-4FD3-BE10-08352527290F}.Release|x64.ActiveCfg = Release|Any CPU + {8524E510-D98F-4FD3-BE10-08352527290F}.Release|x64.Build.0 = Release|Any CPU + {8524E510-D98F-4FD3-BE10-08352527290F}.Release|x86.ActiveCfg = Release|Any CPU + {8524E510-D98F-4FD3-BE10-08352527290F}.Release|x86.Build.0 = Release|Any CPU + {40C9EB86-CF4E-45D9-BEF7-E89913171D86}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {40C9EB86-CF4E-45D9-BEF7-E89913171D86}.Debug|Any CPU.Build.0 = Debug|Any CPU + {40C9EB86-CF4E-45D9-BEF7-E89913171D86}.Debug|x64.ActiveCfg = Debug|Any CPU + {40C9EB86-CF4E-45D9-BEF7-E89913171D86}.Debug|x64.Build.0 = Debug|Any CPU + {40C9EB86-CF4E-45D9-BEF7-E89913171D86}.Debug|x86.ActiveCfg = Debug|Any CPU + {40C9EB86-CF4E-45D9-BEF7-E89913171D86}.Debug|x86.Build.0 = Debug|Any CPU + {40C9EB86-CF4E-45D9-BEF7-E89913171D86}.Release|Any CPU.ActiveCfg = Release|Any CPU + {40C9EB86-CF4E-45D9-BEF7-E89913171D86}.Release|Any CPU.Build.0 = Release|Any CPU + {40C9EB86-CF4E-45D9-BEF7-E89913171D86}.Release|x64.ActiveCfg = Release|Any CPU + {40C9EB86-CF4E-45D9-BEF7-E89913171D86}.Release|x64.Build.0 = Release|Any CPU + {40C9EB86-CF4E-45D9-BEF7-E89913171D86}.Release|x86.ActiveCfg = Release|Any CPU + {40C9EB86-CF4E-45D9-BEF7-E89913171D86}.Release|x86.Build.0 = Release|Any CPU + {DE554FAE-B638-4C39-B4F9-0D4FFB0F9027}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {DE554FAE-B638-4C39-B4F9-0D4FFB0F9027}.Debug|Any CPU.Build.0 = Debug|Any CPU + {DE554FAE-B638-4C39-B4F9-0D4FFB0F9027}.Debug|x64.ActiveCfg = Debug|Any CPU + {DE554FAE-B638-4C39-B4F9-0D4FFB0F9027}.Debug|x64.Build.0 = Debug|Any CPU + {DE554FAE-B638-4C39-B4F9-0D4FFB0F9027}.Debug|x86.ActiveCfg = Debug|Any CPU + {DE554FAE-B638-4C39-B4F9-0D4FFB0F9027}.Debug|x86.Build.0 = Debug|Any CPU + {DE554FAE-B638-4C39-B4F9-0D4FFB0F9027}.Release|Any CPU.ActiveCfg = Release|Any CPU + {DE554FAE-B638-4C39-B4F9-0D4FFB0F9027}.Release|Any CPU.Build.0 = Release|Any CPU + {DE554FAE-B638-4C39-B4F9-0D4FFB0F9027}.Release|x64.ActiveCfg = Release|Any CPU + {DE554FAE-B638-4C39-B4F9-0D4FFB0F9027}.Release|x64.Build.0 = Release|Any CPU + {DE554FAE-B638-4C39-B4F9-0D4FFB0F9027}.Release|x86.ActiveCfg = Release|Any CPU + {DE554FAE-B638-4C39-B4F9-0D4FFB0F9027}.Release|x86.Build.0 = Release|Any CPU + {BEE19955-275A-4242-B1AF-402AD3C7C5F9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {BEE19955-275A-4242-B1AF-402AD3C7C5F9}.Debug|Any CPU.Build.0 = Debug|Any CPU + {BEE19955-275A-4242-B1AF-402AD3C7C5F9}.Debug|x64.ActiveCfg = Debug|Any CPU + {BEE19955-275A-4242-B1AF-402AD3C7C5F9}.Debug|x64.Build.0 = Debug|Any CPU + {BEE19955-275A-4242-B1AF-402AD3C7C5F9}.Debug|x86.ActiveCfg = Debug|Any CPU + {BEE19955-275A-4242-B1AF-402AD3C7C5F9}.Debug|x86.Build.0 = Debug|Any CPU + {BEE19955-275A-4242-B1AF-402AD3C7C5F9}.Release|Any CPU.ActiveCfg = Release|Any CPU + {BEE19955-275A-4242-B1AF-402AD3C7C5F9}.Release|Any CPU.Build.0 = Release|Any CPU + {BEE19955-275A-4242-B1AF-402AD3C7C5F9}.Release|x64.ActiveCfg = Release|Any CPU + {BEE19955-275A-4242-B1AF-402AD3C7C5F9}.Release|x64.Build.0 = Release|Any CPU + {BEE19955-275A-4242-B1AF-402AD3C7C5F9}.Release|x86.ActiveCfg = Release|Any CPU + {BEE19955-275A-4242-B1AF-402AD3C7C5F9}.Release|x86.Build.0 = Release|Any CPU + EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {BF7F9B0B-CB43-4161-BFAD-C6EE479FC86B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {BF7F9B0B-CB43-4161-BFAD-C6EE479FC86B}.Debug|Any CPU.Build.0 = Debug|Any CPU - {BF7F9B0B-CB43-4161-BFAD-C6EE479FC86B}.Debug|x64.ActiveCfg = Debug|Any CPU - {BF7F9B0B-CB43-4161-BFAD-C6EE479FC86B}.Debug|x64.Build.0 = Debug|Any CPU - {BF7F9B0B-CB43-4161-BFAD-C6EE479FC86B}.Debug|x86.ActiveCfg = Debug|Any CPU - {BF7F9B0B-CB43-4161-BFAD-C6EE479FC86B}.Debug|x86.Build.0 = Debug|Any CPU - {BF7F9B0B-CB43-4161-BFAD-C6EE479FC86B}.Release|Any CPU.ActiveCfg = Release|Any CPU - {BF7F9B0B-CB43-4161-BFAD-C6EE479FC86B}.Release|Any CPU.Build.0 = Release|Any CPU - {BF7F9B0B-CB43-4161-BFAD-C6EE479FC86B}.Release|x64.ActiveCfg = Release|Any CPU - {BF7F9B0B-CB43-4161-BFAD-C6EE479FC86B}.Release|x64.Build.0 = Release|Any CPU - {BF7F9B0B-CB43-4161-BFAD-C6EE479FC86B}.Release|x86.ActiveCfg = Release|Any CPU - {BF7F9B0B-CB43-4161-BFAD-C6EE479FC86B}.Release|x86.Build.0 = Release|Any CPU - {4F64F773-1A9A-4465-A953-900320EA86CF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {4F64F773-1A9A-4465-A953-900320EA86CF}.Debug|Any CPU.Build.0 = Debug|Any CPU - {4F64F773-1A9A-4465-A953-900320EA86CF}.Debug|x64.ActiveCfg = Debug|Any CPU - {4F64F773-1A9A-4465-A953-900320EA86CF}.Debug|x64.Build.0 = Debug|Any CPU - {4F64F773-1A9A-4465-A953-900320EA86CF}.Debug|x86.ActiveCfg = Debug|Any CPU - {4F64F773-1A9A-4465-A953-900320EA86CF}.Debug|x86.Build.0 = Debug|Any CPU - {4F64F773-1A9A-4465-A953-900320EA86CF}.Release|Any CPU.ActiveCfg = Release|Any CPU - {4F64F773-1A9A-4465-A953-900320EA86CF}.Release|Any CPU.Build.0 = Release|Any CPU - {4F64F773-1A9A-4465-A953-900320EA86CF}.Release|x64.ActiveCfg = Release|Any CPU - {4F64F773-1A9A-4465-A953-900320EA86CF}.Release|x64.Build.0 = Release|Any CPU - {4F64F773-1A9A-4465-A953-900320EA86CF}.Release|x86.ActiveCfg = Release|Any CPU - {4F64F773-1A9A-4465-A953-900320EA86CF}.Release|x86.Build.0 = Release|Any CPU - {1E2EF862-C6E1-4614-B02E-B222B5D79FFB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {1E2EF862-C6E1-4614-B02E-B222B5D79FFB}.Debug|Any CPU.Build.0 = Debug|Any CPU - {1E2EF862-C6E1-4614-B02E-B222B5D79FFB}.Debug|x64.ActiveCfg = Debug|Any CPU - {1E2EF862-C6E1-4614-B02E-B222B5D79FFB}.Debug|x64.Build.0 = Debug|Any CPU - {1E2EF862-C6E1-4614-B02E-B222B5D79FFB}.Debug|x86.ActiveCfg = Debug|Any CPU - {1E2EF862-C6E1-4614-B02E-B222B5D79FFB}.Debug|x86.Build.0 = Debug|Any CPU - {1E2EF862-C6E1-4614-B02E-B222B5D79FFB}.Release|Any CPU.ActiveCfg = Release|Any CPU - {1E2EF862-C6E1-4614-B02E-B222B5D79FFB}.Release|Any CPU.Build.0 = Release|Any CPU - {1E2EF862-C6E1-4614-B02E-B222B5D79FFB}.Release|x64.ActiveCfg = Release|Any CPU - {1E2EF862-C6E1-4614-B02E-B222B5D79FFB}.Release|x64.Build.0 = Release|Any CPU - {1E2EF862-C6E1-4614-B02E-B222B5D79FFB}.Release|x86.ActiveCfg = Release|Any CPU - {1E2EF862-C6E1-4614-B02E-B222B5D79FFB}.Release|x86.Build.0 = Release|Any CPU - {80F262F9-AC71-471A-A308-762BC755D69D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {80F262F9-AC71-471A-A308-762BC755D69D}.Debug|Any CPU.Build.0 = Debug|Any CPU - {80F262F9-AC71-471A-A308-762BC755D69D}.Debug|x64.ActiveCfg = Debug|Any CPU - {80F262F9-AC71-471A-A308-762BC755D69D}.Debug|x64.Build.0 = Debug|Any CPU - {80F262F9-AC71-471A-A308-762BC755D69D}.Debug|x86.ActiveCfg = Debug|Any CPU - {80F262F9-AC71-471A-A308-762BC755D69D}.Debug|x86.Build.0 = Debug|Any CPU - {80F262F9-AC71-471A-A308-762BC755D69D}.Release|Any CPU.ActiveCfg = Release|Any CPU - {80F262F9-AC71-471A-A308-762BC755D69D}.Release|Any CPU.Build.0 = Release|Any CPU - {80F262F9-AC71-471A-A308-762BC755D69D}.Release|x64.ActiveCfg = Release|Any CPU - {80F262F9-AC71-471A-A308-762BC755D69D}.Release|x64.Build.0 = Release|Any CPU - {80F262F9-AC71-471A-A308-762BC755D69D}.Release|x86.ActiveCfg = Release|Any CPU - {80F262F9-AC71-471A-A308-762BC755D69D}.Release|x86.Build.0 = Release|Any CPU - {F74B3242-94DE-4C5E-803F-CDC7090120AF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {F74B3242-94DE-4C5E-803F-CDC7090120AF}.Debug|Any CPU.Build.0 = Debug|Any CPU - {F74B3242-94DE-4C5E-803F-CDC7090120AF}.Debug|x64.ActiveCfg = Debug|Any CPU - {F74B3242-94DE-4C5E-803F-CDC7090120AF}.Debug|x64.Build.0 = Debug|Any CPU - {F74B3242-94DE-4C5E-803F-CDC7090120AF}.Debug|x86.ActiveCfg = Debug|Any CPU - {F74B3242-94DE-4C5E-803F-CDC7090120AF}.Debug|x86.Build.0 = Debug|Any CPU - {F74B3242-94DE-4C5E-803F-CDC7090120AF}.Release|Any CPU.ActiveCfg = Release|Any CPU - {F74B3242-94DE-4C5E-803F-CDC7090120AF}.Release|Any CPU.Build.0 = Release|Any CPU - {F74B3242-94DE-4C5E-803F-CDC7090120AF}.Release|x64.ActiveCfg = Release|Any CPU - {F74B3242-94DE-4C5E-803F-CDC7090120AF}.Release|x64.Build.0 = Release|Any CPU - {F74B3242-94DE-4C5E-803F-CDC7090120AF}.Release|x86.ActiveCfg = Release|Any CPU - {F74B3242-94DE-4C5E-803F-CDC7090120AF}.Release|x86.Build.0 = Release|Any CPU - {4D008B2E-6056-4580-B8F0-512502A2D288}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {4D008B2E-6056-4580-B8F0-512502A2D288}.Debug|Any CPU.Build.0 = Debug|Any CPU - {4D008B2E-6056-4580-B8F0-512502A2D288}.Debug|x64.ActiveCfg = Debug|Any CPU - {4D008B2E-6056-4580-B8F0-512502A2D288}.Debug|x64.Build.0 = Debug|Any CPU - {4D008B2E-6056-4580-B8F0-512502A2D288}.Debug|x86.ActiveCfg = Debug|Any CPU - {4D008B2E-6056-4580-B8F0-512502A2D288}.Debug|x86.Build.0 = Debug|Any CPU - {4D008B2E-6056-4580-B8F0-512502A2D288}.Release|Any CPU.ActiveCfg = Release|Any CPU - {4D008B2E-6056-4580-B8F0-512502A2D288}.Release|Any CPU.Build.0 = Release|Any CPU - {4D008B2E-6056-4580-B8F0-512502A2D288}.Release|x64.ActiveCfg = Release|Any CPU - {4D008B2E-6056-4580-B8F0-512502A2D288}.Release|x64.Build.0 = Release|Any CPU - {4D008B2E-6056-4580-B8F0-512502A2D288}.Release|x86.ActiveCfg = Release|Any CPU - {4D008B2E-6056-4580-B8F0-512502A2D288}.Release|x86.Build.0 = Release|Any CPU - {EDECCC4E-9C4E-433D-AFFA-F23E062EC1BF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {EDECCC4E-9C4E-433D-AFFA-F23E062EC1BF}.Debug|Any CPU.Build.0 = Debug|Any CPU - {EDECCC4E-9C4E-433D-AFFA-F23E062EC1BF}.Debug|x64.ActiveCfg = Debug|Any CPU - {EDECCC4E-9C4E-433D-AFFA-F23E062EC1BF}.Debug|x64.Build.0 = Debug|Any CPU - {EDECCC4E-9C4E-433D-AFFA-F23E062EC1BF}.Debug|x86.ActiveCfg = Debug|Any CPU - {EDECCC4E-9C4E-433D-AFFA-F23E062EC1BF}.Debug|x86.Build.0 = Debug|Any CPU - {EDECCC4E-9C4E-433D-AFFA-F23E062EC1BF}.Release|Any CPU.ActiveCfg = Release|Any CPU - {EDECCC4E-9C4E-433D-AFFA-F23E062EC1BF}.Release|Any CPU.Build.0 = Release|Any CPU - {EDECCC4E-9C4E-433D-AFFA-F23E062EC1BF}.Release|x64.ActiveCfg = Release|Any CPU - {EDECCC4E-9C4E-433D-AFFA-F23E062EC1BF}.Release|x64.Build.0 = Release|Any CPU - {EDECCC4E-9C4E-433D-AFFA-F23E062EC1BF}.Release|x86.ActiveCfg = Release|Any CPU - {EDECCC4E-9C4E-433D-AFFA-F23E062EC1BF}.Release|x86.Build.0 = Release|Any CPU - {48A4AF23-C232-4498-9D25-B4620ECD9325}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {48A4AF23-C232-4498-9D25-B4620ECD9325}.Debug|Any CPU.Build.0 = Debug|Any CPU - {48A4AF23-C232-4498-9D25-B4620ECD9325}.Debug|x64.ActiveCfg = Debug|Any CPU - {48A4AF23-C232-4498-9D25-B4620ECD9325}.Debug|x64.Build.0 = Debug|Any CPU - {48A4AF23-C232-4498-9D25-B4620ECD9325}.Debug|x86.ActiveCfg = Debug|Any CPU - {48A4AF23-C232-4498-9D25-B4620ECD9325}.Debug|x86.Build.0 = Debug|Any CPU - {48A4AF23-C232-4498-9D25-B4620ECD9325}.Release|Any CPU.ActiveCfg = Release|Any CPU - {48A4AF23-C232-4498-9D25-B4620ECD9325}.Release|Any CPU.Build.0 = Release|Any CPU - {48A4AF23-C232-4498-9D25-B4620ECD9325}.Release|x64.ActiveCfg = Release|Any CPU - {48A4AF23-C232-4498-9D25-B4620ECD9325}.Release|x64.Build.0 = Release|Any CPU - {48A4AF23-C232-4498-9D25-B4620ECD9325}.Release|x86.ActiveCfg = Release|Any CPU - {48A4AF23-C232-4498-9D25-B4620ECD9325}.Release|x86.Build.0 = Release|Any CPU - {3F299CD3-9F86-4AF6-B536-EB7FF409E5E0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {3F299CD3-9F86-4AF6-B536-EB7FF409E5E0}.Debug|Any CPU.Build.0 = Debug|Any CPU - {3F299CD3-9F86-4AF6-B536-EB7FF409E5E0}.Debug|x64.ActiveCfg = Debug|Any CPU - {3F299CD3-9F86-4AF6-B536-EB7FF409E5E0}.Debug|x64.Build.0 = Debug|Any CPU - {3F299CD3-9F86-4AF6-B536-EB7FF409E5E0}.Debug|x86.ActiveCfg = Debug|Any CPU - {3F299CD3-9F86-4AF6-B536-EB7FF409E5E0}.Debug|x86.Build.0 = Debug|Any CPU - {3F299CD3-9F86-4AF6-B536-EB7FF409E5E0}.Release|Any CPU.ActiveCfg = Release|Any CPU - {3F299CD3-9F86-4AF6-B536-EB7FF409E5E0}.Release|Any CPU.Build.0 = Release|Any CPU - {3F299CD3-9F86-4AF6-B536-EB7FF409E5E0}.Release|x64.ActiveCfg = Release|Any CPU - {3F299CD3-9F86-4AF6-B536-EB7FF409E5E0}.Release|x64.Build.0 = Release|Any CPU - {3F299CD3-9F86-4AF6-B536-EB7FF409E5E0}.Release|x86.ActiveCfg = Release|Any CPU - {3F299CD3-9F86-4AF6-B536-EB7FF409E5E0}.Release|x86.Build.0 = Release|Any CPU - {27D42088-5F63-4886-A0B2-8B1B66F71BF6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {27D42088-5F63-4886-A0B2-8B1B66F71BF6}.Debug|Any CPU.Build.0 = Debug|Any CPU - {27D42088-5F63-4886-A0B2-8B1B66F71BF6}.Debug|x64.ActiveCfg = Debug|Any CPU - {27D42088-5F63-4886-A0B2-8B1B66F71BF6}.Debug|x64.Build.0 = Debug|Any CPU - {27D42088-5F63-4886-A0B2-8B1B66F71BF6}.Debug|x86.ActiveCfg = Debug|Any CPU - {27D42088-5F63-4886-A0B2-8B1B66F71BF6}.Debug|x86.Build.0 = Debug|Any CPU - {27D42088-5F63-4886-A0B2-8B1B66F71BF6}.Release|Any CPU.ActiveCfg = Release|Any CPU - {27D42088-5F63-4886-A0B2-8B1B66F71BF6}.Release|Any CPU.Build.0 = Release|Any CPU - {27D42088-5F63-4886-A0B2-8B1B66F71BF6}.Release|x64.ActiveCfg = Release|Any CPU - {27D42088-5F63-4886-A0B2-8B1B66F71BF6}.Release|x64.Build.0 = Release|Any CPU - {27D42088-5F63-4886-A0B2-8B1B66F71BF6}.Release|x86.ActiveCfg = Release|Any CPU - {27D42088-5F63-4886-A0B2-8B1B66F71BF6}.Release|x86.Build.0 = Release|Any CPU - {1567FD28-14D5-4161-AB66-B099E78F6FFB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {1567FD28-14D5-4161-AB66-B099E78F6FFB}.Debug|Any CPU.Build.0 = Debug|Any CPU - {1567FD28-14D5-4161-AB66-B099E78F6FFB}.Debug|x64.ActiveCfg = Debug|Any CPU - {1567FD28-14D5-4161-AB66-B099E78F6FFB}.Debug|x64.Build.0 = Debug|Any CPU - {1567FD28-14D5-4161-AB66-B099E78F6FFB}.Debug|x86.ActiveCfg = Debug|Any CPU - {1567FD28-14D5-4161-AB66-B099E78F6FFB}.Debug|x86.Build.0 = Debug|Any CPU - {1567FD28-14D5-4161-AB66-B099E78F6FFB}.Release|Any CPU.ActiveCfg = Release|Any CPU - {1567FD28-14D5-4161-AB66-B099E78F6FFB}.Release|Any CPU.Build.0 = Release|Any CPU - {1567FD28-14D5-4161-AB66-B099E78F6FFB}.Release|x64.ActiveCfg = Release|Any CPU - {1567FD28-14D5-4161-AB66-B099E78F6FFB}.Release|x64.Build.0 = Release|Any CPU - {1567FD28-14D5-4161-AB66-B099E78F6FFB}.Release|x86.ActiveCfg = Release|Any CPU - {1567FD28-14D5-4161-AB66-B099E78F6FFB}.Release|x86.Build.0 = Release|Any CPU - {6D2A7966-FED3-4FD5-94DF-BBD6C5D04886}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {6D2A7966-FED3-4FD5-94DF-BBD6C5D04886}.Debug|Any CPU.Build.0 = Debug|Any CPU - {6D2A7966-FED3-4FD5-94DF-BBD6C5D04886}.Debug|x64.ActiveCfg = Debug|Any CPU - {6D2A7966-FED3-4FD5-94DF-BBD6C5D04886}.Debug|x64.Build.0 = Debug|Any CPU - {6D2A7966-FED3-4FD5-94DF-BBD6C5D04886}.Debug|x86.ActiveCfg = Debug|Any CPU - {6D2A7966-FED3-4FD5-94DF-BBD6C5D04886}.Debug|x86.Build.0 = Debug|Any CPU - {6D2A7966-FED3-4FD5-94DF-BBD6C5D04886}.Release|Any CPU.ActiveCfg = Release|Any CPU - {6D2A7966-FED3-4FD5-94DF-BBD6C5D04886}.Release|Any CPU.Build.0 = Release|Any CPU - {6D2A7966-FED3-4FD5-94DF-BBD6C5D04886}.Release|x64.ActiveCfg = Release|Any CPU - {6D2A7966-FED3-4FD5-94DF-BBD6C5D04886}.Release|x64.Build.0 = Release|Any CPU - {6D2A7966-FED3-4FD5-94DF-BBD6C5D04886}.Release|x86.ActiveCfg = Release|Any CPU - {6D2A7966-FED3-4FD5-94DF-BBD6C5D04886}.Release|x86.Build.0 = Release|Any CPU - {CC6201B1-B625-4907-AA6B-4C3C56D11C7B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {CC6201B1-B625-4907-AA6B-4C3C56D11C7B}.Debug|Any CPU.Build.0 = Debug|Any CPU - {CC6201B1-B625-4907-AA6B-4C3C56D11C7B}.Debug|x64.ActiveCfg = Debug|Any CPU - {CC6201B1-B625-4907-AA6B-4C3C56D11C7B}.Debug|x64.Build.0 = Debug|Any CPU - {CC6201B1-B625-4907-AA6B-4C3C56D11C7B}.Debug|x86.ActiveCfg = Debug|Any CPU - {CC6201B1-B625-4907-AA6B-4C3C56D11C7B}.Debug|x86.Build.0 = Debug|Any CPU - {CC6201B1-B625-4907-AA6B-4C3C56D11C7B}.Release|Any CPU.ActiveCfg = Release|Any CPU - {CC6201B1-B625-4907-AA6B-4C3C56D11C7B}.Release|Any CPU.Build.0 = Release|Any CPU - {CC6201B1-B625-4907-AA6B-4C3C56D11C7B}.Release|x64.ActiveCfg = Release|Any CPU - {CC6201B1-B625-4907-AA6B-4C3C56D11C7B}.Release|x64.Build.0 = Release|Any CPU - {CC6201B1-B625-4907-AA6B-4C3C56D11C7B}.Release|x86.ActiveCfg = Release|Any CPU - {CC6201B1-B625-4907-AA6B-4C3C56D11C7B}.Release|x86.Build.0 = Release|Any CPU - {37F93CBF-43FE-428B-80D0-4D41FD0C01C7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {37F93CBF-43FE-428B-80D0-4D41FD0C01C7}.Debug|Any CPU.Build.0 = Debug|Any CPU - {37F93CBF-43FE-428B-80D0-4D41FD0C01C7}.Debug|x64.ActiveCfg = Debug|Any CPU - {37F93CBF-43FE-428B-80D0-4D41FD0C01C7}.Debug|x64.Build.0 = Debug|Any CPU - {37F93CBF-43FE-428B-80D0-4D41FD0C01C7}.Debug|x86.ActiveCfg = Debug|Any CPU - {37F93CBF-43FE-428B-80D0-4D41FD0C01C7}.Debug|x86.Build.0 = Debug|Any CPU - {37F93CBF-43FE-428B-80D0-4D41FD0C01C7}.Release|Any CPU.ActiveCfg = Release|Any CPU - {37F93CBF-43FE-428B-80D0-4D41FD0C01C7}.Release|Any CPU.Build.0 = Release|Any CPU - {37F93CBF-43FE-428B-80D0-4D41FD0C01C7}.Release|x64.ActiveCfg = Release|Any CPU - {37F93CBF-43FE-428B-80D0-4D41FD0C01C7}.Release|x64.Build.0 = Release|Any CPU - {37F93CBF-43FE-428B-80D0-4D41FD0C01C7}.Release|x86.ActiveCfg = Release|Any CPU - {37F93CBF-43FE-428B-80D0-4D41FD0C01C7}.Release|x86.Build.0 = Release|Any CPU - {E22AC3F0-0298-4784-9C91-76138FA3BD74}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {E22AC3F0-0298-4784-9C91-76138FA3BD74}.Debug|Any CPU.Build.0 = Debug|Any CPU - {E22AC3F0-0298-4784-9C91-76138FA3BD74}.Debug|x64.ActiveCfg = Debug|Any CPU - {E22AC3F0-0298-4784-9C91-76138FA3BD74}.Debug|x64.Build.0 = Debug|Any CPU - {E22AC3F0-0298-4784-9C91-76138FA3BD74}.Debug|x86.ActiveCfg = Debug|Any CPU - {E22AC3F0-0298-4784-9C91-76138FA3BD74}.Debug|x86.Build.0 = Debug|Any CPU - {E22AC3F0-0298-4784-9C91-76138FA3BD74}.Release|Any CPU.ActiveCfg = Release|Any CPU - {E22AC3F0-0298-4784-9C91-76138FA3BD74}.Release|Any CPU.Build.0 = Release|Any CPU - {E22AC3F0-0298-4784-9C91-76138FA3BD74}.Release|x64.ActiveCfg = Release|Any CPU - {E22AC3F0-0298-4784-9C91-76138FA3BD74}.Release|x64.Build.0 = Release|Any CPU - {E22AC3F0-0298-4784-9C91-76138FA3BD74}.Release|x86.ActiveCfg = Release|Any CPU - {E22AC3F0-0298-4784-9C91-76138FA3BD74}.Release|x86.Build.0 = Release|Any CPU - {0488271F-63F9-41BD-A38B-0FD0D7616BE3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {0488271F-63F9-41BD-A38B-0FD0D7616BE3}.Debug|Any CPU.Build.0 = Debug|Any CPU - {0488271F-63F9-41BD-A38B-0FD0D7616BE3}.Debug|x64.ActiveCfg = Debug|Any CPU - {0488271F-63F9-41BD-A38B-0FD0D7616BE3}.Debug|x64.Build.0 = Debug|Any CPU - {0488271F-63F9-41BD-A38B-0FD0D7616BE3}.Debug|x86.ActiveCfg = Debug|Any CPU - {0488271F-63F9-41BD-A38B-0FD0D7616BE3}.Debug|x86.Build.0 = Debug|Any CPU - {0488271F-63F9-41BD-A38B-0FD0D7616BE3}.Release|Any CPU.ActiveCfg = Release|Any CPU - {0488271F-63F9-41BD-A38B-0FD0D7616BE3}.Release|Any CPU.Build.0 = Release|Any CPU - {0488271F-63F9-41BD-A38B-0FD0D7616BE3}.Release|x64.ActiveCfg = Release|Any CPU - {0488271F-63F9-41BD-A38B-0FD0D7616BE3}.Release|x64.Build.0 = Release|Any CPU - {0488271F-63F9-41BD-A38B-0FD0D7616BE3}.Release|x86.ActiveCfg = Release|Any CPU - {0488271F-63F9-41BD-A38B-0FD0D7616BE3}.Release|x86.Build.0 = Release|Any CPU - {8678914B-C262-4EFB-BCC0-96A15D969C2B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {8678914B-C262-4EFB-BCC0-96A15D969C2B}.Debug|Any CPU.Build.0 = Debug|Any CPU - {8678914B-C262-4EFB-BCC0-96A15D969C2B}.Debug|x64.ActiveCfg = Debug|Any CPU - {8678914B-C262-4EFB-BCC0-96A15D969C2B}.Debug|x64.Build.0 = Debug|Any CPU - {8678914B-C262-4EFB-BCC0-96A15D969C2B}.Debug|x86.ActiveCfg = Debug|Any CPU - {8678914B-C262-4EFB-BCC0-96A15D969C2B}.Debug|x86.Build.0 = Debug|Any CPU - {8678914B-C262-4EFB-BCC0-96A15D969C2B}.Release|Any CPU.ActiveCfg = Release|Any CPU - {8678914B-C262-4EFB-BCC0-96A15D969C2B}.Release|Any CPU.Build.0 = Release|Any CPU - {8678914B-C262-4EFB-BCC0-96A15D969C2B}.Release|x64.ActiveCfg = Release|Any CPU - {8678914B-C262-4EFB-BCC0-96A15D969C2B}.Release|x64.Build.0 = Release|Any CPU - {8678914B-C262-4EFB-BCC0-96A15D969C2B}.Release|x86.ActiveCfg = Release|Any CPU - {8678914B-C262-4EFB-BCC0-96A15D969C2B}.Release|x86.Build.0 = Release|Any CPU - {60AA5BC4-7B82-41D2-A2A0-2235D8B04BBF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {60AA5BC4-7B82-41D2-A2A0-2235D8B04BBF}.Debug|Any CPU.Build.0 = Debug|Any CPU - {60AA5BC4-7B82-41D2-A2A0-2235D8B04BBF}.Debug|x64.ActiveCfg = Debug|Any CPU - {60AA5BC4-7B82-41D2-A2A0-2235D8B04BBF}.Debug|x64.Build.0 = Debug|Any CPU - {60AA5BC4-7B82-41D2-A2A0-2235D8B04BBF}.Debug|x86.ActiveCfg = Debug|Any CPU - {60AA5BC4-7B82-41D2-A2A0-2235D8B04BBF}.Debug|x86.Build.0 = Debug|Any CPU - {60AA5BC4-7B82-41D2-A2A0-2235D8B04BBF}.Release|Any CPU.ActiveCfg = Release|Any CPU - {60AA5BC4-7B82-41D2-A2A0-2235D8B04BBF}.Release|Any CPU.Build.0 = Release|Any CPU - {60AA5BC4-7B82-41D2-A2A0-2235D8B04BBF}.Release|x64.ActiveCfg = Release|Any CPU - {60AA5BC4-7B82-41D2-A2A0-2235D8B04BBF}.Release|x64.Build.0 = Release|Any CPU - {60AA5BC4-7B82-41D2-A2A0-2235D8B04BBF}.Release|x86.ActiveCfg = Release|Any CPU - {60AA5BC4-7B82-41D2-A2A0-2235D8B04BBF}.Release|x86.Build.0 = Release|Any CPU - {EAC7D6FF-4BEF-4A24-89A0-600FD686C537}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {EAC7D6FF-4BEF-4A24-89A0-600FD686C537}.Debug|Any CPU.Build.0 = Debug|Any CPU - {EAC7D6FF-4BEF-4A24-89A0-600FD686C537}.Debug|x64.ActiveCfg = Debug|Any CPU - {EAC7D6FF-4BEF-4A24-89A0-600FD686C537}.Debug|x64.Build.0 = Debug|Any CPU - {EAC7D6FF-4BEF-4A24-89A0-600FD686C537}.Debug|x86.ActiveCfg = Debug|Any CPU - {EAC7D6FF-4BEF-4A24-89A0-600FD686C537}.Debug|x86.Build.0 = Debug|Any CPU - {EAC7D6FF-4BEF-4A24-89A0-600FD686C537}.Release|Any CPU.ActiveCfg = Release|Any CPU - {EAC7D6FF-4BEF-4A24-89A0-600FD686C537}.Release|Any CPU.Build.0 = Release|Any CPU - {EAC7D6FF-4BEF-4A24-89A0-600FD686C537}.Release|x64.ActiveCfg = Release|Any CPU - {EAC7D6FF-4BEF-4A24-89A0-600FD686C537}.Release|x64.Build.0 = Release|Any CPU - {EAC7D6FF-4BEF-4A24-89A0-600FD686C537}.Release|x86.ActiveCfg = Release|Any CPU - {EAC7D6FF-4BEF-4A24-89A0-600FD686C537}.Release|x86.Build.0 = Release|Any CPU - {53101A81-CB4A-4589-AEB1-0E229D17AE7A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {53101A81-CB4A-4589-AEB1-0E229D17AE7A}.Debug|Any CPU.Build.0 = Debug|Any CPU - {53101A81-CB4A-4589-AEB1-0E229D17AE7A}.Debug|x64.ActiveCfg = Debug|Any CPU - {53101A81-CB4A-4589-AEB1-0E229D17AE7A}.Debug|x64.Build.0 = Debug|Any CPU - {53101A81-CB4A-4589-AEB1-0E229D17AE7A}.Debug|x86.ActiveCfg = Debug|Any CPU - {53101A81-CB4A-4589-AEB1-0E229D17AE7A}.Debug|x86.Build.0 = Debug|Any CPU - {53101A81-CB4A-4589-AEB1-0E229D17AE7A}.Release|Any CPU.ActiveCfg = Release|Any CPU - {53101A81-CB4A-4589-AEB1-0E229D17AE7A}.Release|Any CPU.Build.0 = Release|Any CPU - {53101A81-CB4A-4589-AEB1-0E229D17AE7A}.Release|x64.ActiveCfg = Release|Any CPU - {53101A81-CB4A-4589-AEB1-0E229D17AE7A}.Release|x64.Build.0 = Release|Any CPU - {53101A81-CB4A-4589-AEB1-0E229D17AE7A}.Release|x86.ActiveCfg = Release|Any CPU - {53101A81-CB4A-4589-AEB1-0E229D17AE7A}.Release|x86.Build.0 = Release|Any CPU - {BC44EB45-DFA6-44B8-9B19-0C0AB2B856E6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {BC44EB45-DFA6-44B8-9B19-0C0AB2B856E6}.Debug|Any CPU.Build.0 = Debug|Any CPU - {BC44EB45-DFA6-44B8-9B19-0C0AB2B856E6}.Debug|x64.ActiveCfg = Debug|Any CPU - {BC44EB45-DFA6-44B8-9B19-0C0AB2B856E6}.Debug|x64.Build.0 = Debug|Any CPU - {BC44EB45-DFA6-44B8-9B19-0C0AB2B856E6}.Debug|x86.ActiveCfg = Debug|Any CPU - {BC44EB45-DFA6-44B8-9B19-0C0AB2B856E6}.Debug|x86.Build.0 = Debug|Any CPU - {BC44EB45-DFA6-44B8-9B19-0C0AB2B856E6}.Release|Any CPU.ActiveCfg = Release|Any CPU - {BC44EB45-DFA6-44B8-9B19-0C0AB2B856E6}.Release|Any CPU.Build.0 = Release|Any CPU - {BC44EB45-DFA6-44B8-9B19-0C0AB2B856E6}.Release|x64.ActiveCfg = Release|Any CPU - {BC44EB45-DFA6-44B8-9B19-0C0AB2B856E6}.Release|x64.Build.0 = Release|Any CPU - {BC44EB45-DFA6-44B8-9B19-0C0AB2B856E6}.Release|x86.ActiveCfg = Release|Any CPU - {BC44EB45-DFA6-44B8-9B19-0C0AB2B856E6}.Release|x86.Build.0 = Release|Any CPU - {0231E616-62C8-4316-9355-326537C07651}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {0231E616-62C8-4316-9355-326537C07651}.Debug|Any CPU.Build.0 = Debug|Any CPU - {0231E616-62C8-4316-9355-326537C07651}.Debug|x64.ActiveCfg = Debug|Any CPU - {0231E616-62C8-4316-9355-326537C07651}.Debug|x64.Build.0 = Debug|Any CPU - {0231E616-62C8-4316-9355-326537C07651}.Debug|x86.ActiveCfg = Debug|Any CPU - {0231E616-62C8-4316-9355-326537C07651}.Debug|x86.Build.0 = Debug|Any CPU - {0231E616-62C8-4316-9355-326537C07651}.Release|Any CPU.ActiveCfg = Release|Any CPU - {0231E616-62C8-4316-9355-326537C07651}.Release|Any CPU.Build.0 = Release|Any CPU - {0231E616-62C8-4316-9355-326537C07651}.Release|x64.ActiveCfg = Release|Any CPU - {0231E616-62C8-4316-9355-326537C07651}.Release|x64.Build.0 = Release|Any CPU - {0231E616-62C8-4316-9355-326537C07651}.Release|x86.ActiveCfg = Release|Any CPU - {0231E616-62C8-4316-9355-326537C07651}.Release|x86.Build.0 = Release|Any CPU - {28F5A326-D1F9-42E7-985F-C69E01DB4C4E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {28F5A326-D1F9-42E7-985F-C69E01DB4C4E}.Debug|Any CPU.Build.0 = Debug|Any CPU - {28F5A326-D1F9-42E7-985F-C69E01DB4C4E}.Debug|x64.ActiveCfg = Debug|Any CPU - {28F5A326-D1F9-42E7-985F-C69E01DB4C4E}.Debug|x64.Build.0 = Debug|Any CPU - {28F5A326-D1F9-42E7-985F-C69E01DB4C4E}.Debug|x86.ActiveCfg = Debug|Any CPU - {28F5A326-D1F9-42E7-985F-C69E01DB4C4E}.Debug|x86.Build.0 = Debug|Any CPU - {28F5A326-D1F9-42E7-985F-C69E01DB4C4E}.Release|Any CPU.ActiveCfg = Release|Any CPU - {28F5A326-D1F9-42E7-985F-C69E01DB4C4E}.Release|Any CPU.Build.0 = Release|Any CPU - {28F5A326-D1F9-42E7-985F-C69E01DB4C4E}.Release|x64.ActiveCfg = Release|Any CPU - {28F5A326-D1F9-42E7-985F-C69E01DB4C4E}.Release|x64.Build.0 = Release|Any CPU - {28F5A326-D1F9-42E7-985F-C69E01DB4C4E}.Release|x86.ActiveCfg = Release|Any CPU - {28F5A326-D1F9-42E7-985F-C69E01DB4C4E}.Release|x86.Build.0 = Release|Any CPU - {8385F95E-E778-44EF-96F2-8F357B1B6348}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {8385F95E-E778-44EF-96F2-8F357B1B6348}.Debug|Any CPU.Build.0 = Debug|Any CPU - {8385F95E-E778-44EF-96F2-8F357B1B6348}.Debug|x64.ActiveCfg = Debug|Any CPU - {8385F95E-E778-44EF-96F2-8F357B1B6348}.Debug|x64.Build.0 = Debug|Any CPU - {8385F95E-E778-44EF-96F2-8F357B1B6348}.Debug|x86.ActiveCfg = Debug|Any CPU - {8385F95E-E778-44EF-96F2-8F357B1B6348}.Debug|x86.Build.0 = Debug|Any CPU - {8385F95E-E778-44EF-96F2-8F357B1B6348}.Release|Any CPU.ActiveCfg = Release|Any CPU - {8385F95E-E778-44EF-96F2-8F357B1B6348}.Release|Any CPU.Build.0 = Release|Any CPU - {8385F95E-E778-44EF-96F2-8F357B1B6348}.Release|x64.ActiveCfg = Release|Any CPU - {8385F95E-E778-44EF-96F2-8F357B1B6348}.Release|x64.Build.0 = Release|Any CPU - {8385F95E-E778-44EF-96F2-8F357B1B6348}.Release|x86.ActiveCfg = Release|Any CPU - {8385F95E-E778-44EF-96F2-8F357B1B6348}.Release|x86.Build.0 = Release|Any CPU - {B4C179CA-89E5-4638-BAEC-8E37B5BBED12}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {B4C179CA-89E5-4638-BAEC-8E37B5BBED12}.Debug|Any CPU.Build.0 = Debug|Any CPU - {B4C179CA-89E5-4638-BAEC-8E37B5BBED12}.Debug|x64.ActiveCfg = Debug|Any CPU - {B4C179CA-89E5-4638-BAEC-8E37B5BBED12}.Debug|x64.Build.0 = Debug|Any CPU - {B4C179CA-89E5-4638-BAEC-8E37B5BBED12}.Debug|x86.ActiveCfg = Debug|Any CPU - {B4C179CA-89E5-4638-BAEC-8E37B5BBED12}.Debug|x86.Build.0 = Debug|Any CPU - {B4C179CA-89E5-4638-BAEC-8E37B5BBED12}.Release|Any CPU.ActiveCfg = Release|Any CPU - {B4C179CA-89E5-4638-BAEC-8E37B5BBED12}.Release|Any CPU.Build.0 = Release|Any CPU - {B4C179CA-89E5-4638-BAEC-8E37B5BBED12}.Release|x64.ActiveCfg = Release|Any CPU - {B4C179CA-89E5-4638-BAEC-8E37B5BBED12}.Release|x64.Build.0 = Release|Any CPU - {B4C179CA-89E5-4638-BAEC-8E37B5BBED12}.Release|x86.ActiveCfg = Release|Any CPU - {B4C179CA-89E5-4638-BAEC-8E37B5BBED12}.Release|x86.Build.0 = Release|Any CPU - {8E6A242B-B0E6-4DA2-ABA3-6389D65AED5E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {8E6A242B-B0E6-4DA2-ABA3-6389D65AED5E}.Debug|Any CPU.Build.0 = Debug|Any CPU - {8E6A242B-B0E6-4DA2-ABA3-6389D65AED5E}.Debug|x64.ActiveCfg = Debug|Any CPU - {8E6A242B-B0E6-4DA2-ABA3-6389D65AED5E}.Debug|x64.Build.0 = Debug|Any CPU - {8E6A242B-B0E6-4DA2-ABA3-6389D65AED5E}.Debug|x86.ActiveCfg = Debug|Any CPU - {8E6A242B-B0E6-4DA2-ABA3-6389D65AED5E}.Debug|x86.Build.0 = Debug|Any CPU - {8E6A242B-B0E6-4DA2-ABA3-6389D65AED5E}.Release|Any CPU.ActiveCfg = Release|Any CPU - {8E6A242B-B0E6-4DA2-ABA3-6389D65AED5E}.Release|Any CPU.Build.0 = Release|Any CPU - {8E6A242B-B0E6-4DA2-ABA3-6389D65AED5E}.Release|x64.ActiveCfg = Release|Any CPU - {8E6A242B-B0E6-4DA2-ABA3-6389D65AED5E}.Release|x64.Build.0 = Release|Any CPU - {8E6A242B-B0E6-4DA2-ABA3-6389D65AED5E}.Release|x86.ActiveCfg = Release|Any CPU - {8E6A242B-B0E6-4DA2-ABA3-6389D65AED5E}.Release|x86.Build.0 = Release|Any CPU - {76DD0496-67BC-4B86-BBE1-5648CAF0C719}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {76DD0496-67BC-4B86-BBE1-5648CAF0C719}.Debug|Any CPU.Build.0 = Debug|Any CPU - {76DD0496-67BC-4B86-BBE1-5648CAF0C719}.Debug|x64.ActiveCfg = Debug|Any CPU - {76DD0496-67BC-4B86-BBE1-5648CAF0C719}.Debug|x64.Build.0 = Debug|Any CPU - {76DD0496-67BC-4B86-BBE1-5648CAF0C719}.Debug|x86.ActiveCfg = Debug|Any CPU - {76DD0496-67BC-4B86-BBE1-5648CAF0C719}.Debug|x86.Build.0 = Debug|Any CPU - {76DD0496-67BC-4B86-BBE1-5648CAF0C719}.Release|Any CPU.ActiveCfg = Release|Any CPU - {76DD0496-67BC-4B86-BBE1-5648CAF0C719}.Release|Any CPU.Build.0 = Release|Any CPU - {76DD0496-67BC-4B86-BBE1-5648CAF0C719}.Release|x64.ActiveCfg = Release|Any CPU - {76DD0496-67BC-4B86-BBE1-5648CAF0C719}.Release|x64.Build.0 = Release|Any CPU - {76DD0496-67BC-4B86-BBE1-5648CAF0C719}.Release|x86.ActiveCfg = Release|Any CPU - {76DD0496-67BC-4B86-BBE1-5648CAF0C719}.Release|x86.Build.0 = Release|Any CPU - {46E769E2-FEC7-43EA-99B8-E7A7294D68B2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {46E769E2-FEC7-43EA-99B8-E7A7294D68B2}.Debug|Any CPU.Build.0 = Debug|Any CPU - {46E769E2-FEC7-43EA-99B8-E7A7294D68B2}.Debug|x64.ActiveCfg = Debug|Any CPU - {46E769E2-FEC7-43EA-99B8-E7A7294D68B2}.Debug|x64.Build.0 = Debug|Any CPU - {46E769E2-FEC7-43EA-99B8-E7A7294D68B2}.Debug|x86.ActiveCfg = Debug|Any CPU - {46E769E2-FEC7-43EA-99B8-E7A7294D68B2}.Debug|x86.Build.0 = Debug|Any CPU - {46E769E2-FEC7-43EA-99B8-E7A7294D68B2}.Release|Any CPU.ActiveCfg = Release|Any CPU - {46E769E2-FEC7-43EA-99B8-E7A7294D68B2}.Release|Any CPU.Build.0 = Release|Any CPU - {46E769E2-FEC7-43EA-99B8-E7A7294D68B2}.Release|x64.ActiveCfg = Release|Any CPU - {46E769E2-FEC7-43EA-99B8-E7A7294D68B2}.Release|x64.Build.0 = Release|Any CPU - {46E769E2-FEC7-43EA-99B8-E7A7294D68B2}.Release|x86.ActiveCfg = Release|Any CPU - {46E769E2-FEC7-43EA-99B8-E7A7294D68B2}.Release|x86.Build.0 = Release|Any CPU - {C2432595-F82E-4DF1-96FA-BD6B4D470010}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {C2432595-F82E-4DF1-96FA-BD6B4D470010}.Debug|Any CPU.Build.0 = Debug|Any CPU - {C2432595-F82E-4DF1-96FA-BD6B4D470010}.Debug|x64.ActiveCfg = Debug|Any CPU - {C2432595-F82E-4DF1-96FA-BD6B4D470010}.Debug|x64.Build.0 = Debug|Any CPU - {C2432595-F82E-4DF1-96FA-BD6B4D470010}.Debug|x86.ActiveCfg = Debug|Any CPU - {C2432595-F82E-4DF1-96FA-BD6B4D470010}.Debug|x86.Build.0 = Debug|Any CPU - {C2432595-F82E-4DF1-96FA-BD6B4D470010}.Release|Any CPU.ActiveCfg = Release|Any CPU - {C2432595-F82E-4DF1-96FA-BD6B4D470010}.Release|Any CPU.Build.0 = Release|Any CPU - {C2432595-F82E-4DF1-96FA-BD6B4D470010}.Release|x64.ActiveCfg = Release|Any CPU - {C2432595-F82E-4DF1-96FA-BD6B4D470010}.Release|x64.Build.0 = Release|Any CPU - {C2432595-F82E-4DF1-96FA-BD6B4D470010}.Release|x86.ActiveCfg = Release|Any CPU - {C2432595-F82E-4DF1-96FA-BD6B4D470010}.Release|x86.Build.0 = Release|Any CPU - {537015CF-AE85-4DC2-AE5C-653B213C5BEA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {537015CF-AE85-4DC2-AE5C-653B213C5BEA}.Debug|Any CPU.Build.0 = Debug|Any CPU - {537015CF-AE85-4DC2-AE5C-653B213C5BEA}.Debug|x64.ActiveCfg = Debug|Any CPU - {537015CF-AE85-4DC2-AE5C-653B213C5BEA}.Debug|x64.Build.0 = Debug|Any CPU - {537015CF-AE85-4DC2-AE5C-653B213C5BEA}.Debug|x86.ActiveCfg = Debug|Any CPU - {537015CF-AE85-4DC2-AE5C-653B213C5BEA}.Debug|x86.Build.0 = Debug|Any CPU - {537015CF-AE85-4DC2-AE5C-653B213C5BEA}.Release|Any CPU.ActiveCfg = Release|Any CPU - {537015CF-AE85-4DC2-AE5C-653B213C5BEA}.Release|Any CPU.Build.0 = Release|Any CPU - {537015CF-AE85-4DC2-AE5C-653B213C5BEA}.Release|x64.ActiveCfg = Release|Any CPU - {537015CF-AE85-4DC2-AE5C-653B213C5BEA}.Release|x64.Build.0 = Release|Any CPU - {537015CF-AE85-4DC2-AE5C-653B213C5BEA}.Release|x86.ActiveCfg = Release|Any CPU - {537015CF-AE85-4DC2-AE5C-653B213C5BEA}.Release|x86.Build.0 = Release|Any CPU - {749EE7C7-D85E-496D-B127-948E0157AF3E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {749EE7C7-D85E-496D-B127-948E0157AF3E}.Debug|Any CPU.Build.0 = Debug|Any CPU - {749EE7C7-D85E-496D-B127-948E0157AF3E}.Debug|x64.ActiveCfg = Debug|Any CPU - {749EE7C7-D85E-496D-B127-948E0157AF3E}.Debug|x64.Build.0 = Debug|Any CPU - {749EE7C7-D85E-496D-B127-948E0157AF3E}.Debug|x86.ActiveCfg = Debug|Any CPU - {749EE7C7-D85E-496D-B127-948E0157AF3E}.Debug|x86.Build.0 = Debug|Any CPU - {749EE7C7-D85E-496D-B127-948E0157AF3E}.Release|Any CPU.ActiveCfg = Release|Any CPU - {749EE7C7-D85E-496D-B127-948E0157AF3E}.Release|Any CPU.Build.0 = Release|Any CPU - {749EE7C7-D85E-496D-B127-948E0157AF3E}.Release|x64.ActiveCfg = Release|Any CPU - {749EE7C7-D85E-496D-B127-948E0157AF3E}.Release|x64.Build.0 = Release|Any CPU - {749EE7C7-D85E-496D-B127-948E0157AF3E}.Release|x86.ActiveCfg = Release|Any CPU - {749EE7C7-D85E-496D-B127-948E0157AF3E}.Release|x86.Build.0 = Release|Any CPU - {F450E603-4DCA-473A-A9D6-EAD96421F338}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {F450E603-4DCA-473A-A9D6-EAD96421F338}.Debug|Any CPU.Build.0 = Debug|Any CPU - {F450E603-4DCA-473A-A9D6-EAD96421F338}.Debug|x64.ActiveCfg = Debug|Any CPU - {F450E603-4DCA-473A-A9D6-EAD96421F338}.Debug|x64.Build.0 = Debug|Any CPU - {F450E603-4DCA-473A-A9D6-EAD96421F338}.Debug|x86.ActiveCfg = Debug|Any CPU - {F450E603-4DCA-473A-A9D6-EAD96421F338}.Debug|x86.Build.0 = Debug|Any CPU - {F450E603-4DCA-473A-A9D6-EAD96421F338}.Release|Any CPU.ActiveCfg = Release|Any CPU - {F450E603-4DCA-473A-A9D6-EAD96421F338}.Release|Any CPU.Build.0 = Release|Any CPU - {F450E603-4DCA-473A-A9D6-EAD96421F338}.Release|x64.ActiveCfg = Release|Any CPU - {F450E603-4DCA-473A-A9D6-EAD96421F338}.Release|x64.Build.0 = Release|Any CPU - {F450E603-4DCA-473A-A9D6-EAD96421F338}.Release|x86.ActiveCfg = Release|Any CPU - {F450E603-4DCA-473A-A9D6-EAD96421F338}.Release|x86.Build.0 = Release|Any CPU - {2BB1527F-D7A1-44BA-A297-4E69A3A4411C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {2BB1527F-D7A1-44BA-A297-4E69A3A4411C}.Debug|Any CPU.Build.0 = Debug|Any CPU - {2BB1527F-D7A1-44BA-A297-4E69A3A4411C}.Debug|x64.ActiveCfg = Debug|Any CPU - {2BB1527F-D7A1-44BA-A297-4E69A3A4411C}.Debug|x64.Build.0 = Debug|Any CPU - {2BB1527F-D7A1-44BA-A297-4E69A3A4411C}.Debug|x86.ActiveCfg = Debug|Any CPU - {2BB1527F-D7A1-44BA-A297-4E69A3A4411C}.Debug|x86.Build.0 = Debug|Any CPU - {2BB1527F-D7A1-44BA-A297-4E69A3A4411C}.Release|Any CPU.ActiveCfg = Release|Any CPU - {2BB1527F-D7A1-44BA-A297-4E69A3A4411C}.Release|Any CPU.Build.0 = Release|Any CPU - {2BB1527F-D7A1-44BA-A297-4E69A3A4411C}.Release|x64.ActiveCfg = Release|Any CPU - {2BB1527F-D7A1-44BA-A297-4E69A3A4411C}.Release|x64.Build.0 = Release|Any CPU - {2BB1527F-D7A1-44BA-A297-4E69A3A4411C}.Release|x86.ActiveCfg = Release|Any CPU - {2BB1527F-D7A1-44BA-A297-4E69A3A4411C}.Release|x86.Build.0 = Release|Any CPU - {F86D983A-9881-4BE7-AF92-FA0CE41FB319}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {F86D983A-9881-4BE7-AF92-FA0CE41FB319}.Debug|Any CPU.Build.0 = Debug|Any CPU - {F86D983A-9881-4BE7-AF92-FA0CE41FB319}.Debug|x64.ActiveCfg = Debug|Any CPU - {F86D983A-9881-4BE7-AF92-FA0CE41FB319}.Debug|x64.Build.0 = Debug|Any CPU - {F86D983A-9881-4BE7-AF92-FA0CE41FB319}.Debug|x86.ActiveCfg = Debug|Any CPU - {F86D983A-9881-4BE7-AF92-FA0CE41FB319}.Debug|x86.Build.0 = Debug|Any CPU - {F86D983A-9881-4BE7-AF92-FA0CE41FB319}.Release|Any CPU.ActiveCfg = Release|Any CPU - {F86D983A-9881-4BE7-AF92-FA0CE41FB319}.Release|Any CPU.Build.0 = Release|Any CPU - {F86D983A-9881-4BE7-AF92-FA0CE41FB319}.Release|x64.ActiveCfg = Release|Any CPU - {F86D983A-9881-4BE7-AF92-FA0CE41FB319}.Release|x64.Build.0 = Release|Any CPU - {F86D983A-9881-4BE7-AF92-FA0CE41FB319}.Release|x86.ActiveCfg = Release|Any CPU - {F86D983A-9881-4BE7-AF92-FA0CE41FB319}.Release|x86.Build.0 = Release|Any CPU - {59E6AF5C-5F8A-4735-9F95-6457CC17C075}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {59E6AF5C-5F8A-4735-9F95-6457CC17C075}.Debug|Any CPU.Build.0 = Debug|Any CPU - {59E6AF5C-5F8A-4735-9F95-6457CC17C075}.Debug|x64.ActiveCfg = Debug|Any CPU - {59E6AF5C-5F8A-4735-9F95-6457CC17C075}.Debug|x64.Build.0 = Debug|Any CPU - {59E6AF5C-5F8A-4735-9F95-6457CC17C075}.Debug|x86.ActiveCfg = Debug|Any CPU - {59E6AF5C-5F8A-4735-9F95-6457CC17C075}.Debug|x86.Build.0 = Debug|Any CPU - {59E6AF5C-5F8A-4735-9F95-6457CC17C075}.Release|Any CPU.ActiveCfg = Release|Any CPU - {59E6AF5C-5F8A-4735-9F95-6457CC17C075}.Release|Any CPU.Build.0 = Release|Any CPU - {59E6AF5C-5F8A-4735-9F95-6457CC17C075}.Release|x64.ActiveCfg = Release|Any CPU - {59E6AF5C-5F8A-4735-9F95-6457CC17C075}.Release|x64.Build.0 = Release|Any CPU - {59E6AF5C-5F8A-4735-9F95-6457CC17C075}.Release|x86.ActiveCfg = Release|Any CPU - {59E6AF5C-5F8A-4735-9F95-6457CC17C075}.Release|x86.Build.0 = Release|Any CPU - {35D35175-A160-4557-BE3E-9BCB296C61A1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {35D35175-A160-4557-BE3E-9BCB296C61A1}.Debug|Any CPU.Build.0 = Debug|Any CPU - {35D35175-A160-4557-BE3E-9BCB296C61A1}.Debug|x64.ActiveCfg = Debug|Any CPU - {35D35175-A160-4557-BE3E-9BCB296C61A1}.Debug|x64.Build.0 = Debug|Any CPU - {35D35175-A160-4557-BE3E-9BCB296C61A1}.Debug|x86.ActiveCfg = Debug|Any CPU - {35D35175-A160-4557-BE3E-9BCB296C61A1}.Debug|x86.Build.0 = Debug|Any CPU - {35D35175-A160-4557-BE3E-9BCB296C61A1}.Release|Any CPU.ActiveCfg = Release|Any CPU - {35D35175-A160-4557-BE3E-9BCB296C61A1}.Release|Any CPU.Build.0 = Release|Any CPU - {35D35175-A160-4557-BE3E-9BCB296C61A1}.Release|x64.ActiveCfg = Release|Any CPU - {35D35175-A160-4557-BE3E-9BCB296C61A1}.Release|x64.Build.0 = Release|Any CPU - {35D35175-A160-4557-BE3E-9BCB296C61A1}.Release|x86.ActiveCfg = Release|Any CPU - {35D35175-A160-4557-BE3E-9BCB296C61A1}.Release|x86.Build.0 = Release|Any CPU - {33809B07-61F8-46C1-A921-F30467B21113}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {33809B07-61F8-46C1-A921-F30467B21113}.Debug|Any CPU.Build.0 = Debug|Any CPU - {33809B07-61F8-46C1-A921-F30467B21113}.Debug|x64.ActiveCfg = Debug|Any CPU - {33809B07-61F8-46C1-A921-F30467B21113}.Debug|x64.Build.0 = Debug|Any CPU - {33809B07-61F8-46C1-A921-F30467B21113}.Debug|x86.ActiveCfg = Debug|Any CPU - {33809B07-61F8-46C1-A921-F30467B21113}.Debug|x86.Build.0 = Debug|Any CPU - {33809B07-61F8-46C1-A921-F30467B21113}.Release|Any CPU.ActiveCfg = Release|Any CPU - {33809B07-61F8-46C1-A921-F30467B21113}.Release|Any CPU.Build.0 = Release|Any CPU - {33809B07-61F8-46C1-A921-F30467B21113}.Release|x64.ActiveCfg = Release|Any CPU - {33809B07-61F8-46C1-A921-F30467B21113}.Release|x64.Build.0 = Release|Any CPU - {33809B07-61F8-46C1-A921-F30467B21113}.Release|x86.ActiveCfg = Release|Any CPU - {33809B07-61F8-46C1-A921-F30467B21113}.Release|x86.Build.0 = Release|Any CPU - {E176A6B9-36DD-4452-8AA8-F1DCB6B47C33}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {E176A6B9-36DD-4452-8AA8-F1DCB6B47C33}.Debug|Any CPU.Build.0 = Debug|Any CPU - {E176A6B9-36DD-4452-8AA8-F1DCB6B47C33}.Debug|x64.ActiveCfg = Debug|Any CPU - {E176A6B9-36DD-4452-8AA8-F1DCB6B47C33}.Debug|x64.Build.0 = Debug|Any CPU - {E176A6B9-36DD-4452-8AA8-F1DCB6B47C33}.Debug|x86.ActiveCfg = Debug|Any CPU - {E176A6B9-36DD-4452-8AA8-F1DCB6B47C33}.Debug|x86.Build.0 = Debug|Any CPU - {E176A6B9-36DD-4452-8AA8-F1DCB6B47C33}.Release|Any CPU.ActiveCfg = Release|Any CPU - {E176A6B9-36DD-4452-8AA8-F1DCB6B47C33}.Release|Any CPU.Build.0 = Release|Any CPU - {E176A6B9-36DD-4452-8AA8-F1DCB6B47C33}.Release|x64.ActiveCfg = Release|Any CPU - {E176A6B9-36DD-4452-8AA8-F1DCB6B47C33}.Release|x64.Build.0 = Release|Any CPU - {E176A6B9-36DD-4452-8AA8-F1DCB6B47C33}.Release|x86.ActiveCfg = Release|Any CPU - {E176A6B9-36DD-4452-8AA8-F1DCB6B47C33}.Release|x86.Build.0 = Release|Any CPU - EndGlobalSection GlobalSection(NestedProjects) = preSolution - {BF7F9B0B-CB43-4161-BFAD-C6EE479FC86B} = {386AE10F-B7AC-4C97-AC5C-202D3662A868} - {4F64F773-1A9A-4465-A953-900320EA86CF} = {386AE10F-B7AC-4C97-AC5C-202D3662A868} - {1E2EF862-C6E1-4614-B02E-B222B5D79FFB} = {386AE10F-B7AC-4C97-AC5C-202D3662A868} - {80F262F9-AC71-471A-A308-762BC755D69D} = {386AE10F-B7AC-4C97-AC5C-202D3662A868} - {F74B3242-94DE-4C5E-803F-CDC7090120AF} = {386AE10F-B7AC-4C97-AC5C-202D3662A868} - {4D008B2E-6056-4580-B8F0-512502A2D288} = {386AE10F-B7AC-4C97-AC5C-202D3662A868} - {EDECCC4E-9C4E-433D-AFFA-F23E062EC1BF} = {386AE10F-B7AC-4C97-AC5C-202D3662A868} - {48A4AF23-C232-4498-9D25-B4620ECD9325} = {1F2E4087-585C-4B48-8E3D-700D949A15DB} - {3F299CD3-9F86-4AF6-B536-EB7FF409E5E0} = {1F2E4087-585C-4B48-8E3D-700D949A15DB} - {79FE88D9-9545-4AE8-80AF-8E2E2E55E8A3} = {1F2E4087-585C-4B48-8E3D-700D949A15DB} - {27D42088-5F63-4886-A0B2-8B1B66F71BF6} = {79FE88D9-9545-4AE8-80AF-8E2E2E55E8A3} - {1567FD28-14D5-4161-AB66-B099E78F6FFB} = {386AE10F-B7AC-4C97-AC5C-202D3662A868} - {6D2A7966-FED3-4FD5-94DF-BBD6C5D04886} = {1F2E4087-585C-4B48-8E3D-700D949A15DB} - {37F93CBF-43FE-428B-80D0-4D41FD0C01C7} = {386AE10F-B7AC-4C97-AC5C-202D3662A868} - {E22AC3F0-0298-4784-9C91-76138FA3BD74} = {386AE10F-B7AC-4C97-AC5C-202D3662A868} - {0488271F-63F9-41BD-A38B-0FD0D7616BE3} = {386AE10F-B7AC-4C97-AC5C-202D3662A868} - {8678914B-C262-4EFB-BCC0-96A15D969C2B} = {386AE10F-B7AC-4C97-AC5C-202D3662A868} - {EAC7D6FF-4BEF-4A24-89A0-600FD686C537} = {8BC11A63-D52B-40CB-9DDD-CD7C6DC21059} - {46D66262-FC61-43B9-8E76-A361FA3D6C81} = {8BC11A63-D52B-40CB-9DDD-CD7C6DC21059} - {53101A81-CB4A-4589-AEB1-0E229D17AE7A} = {46D66262-FC61-43B9-8E76-A361FA3D6C81} - {A8E40ED1-550F-4168-8299-64EFB875CD44} = {79FE88D9-9545-4AE8-80AF-8E2E2E55E8A3} - {BC44EB45-DFA6-44B8-9B19-0C0AB2B856E6} = {A8E40ED1-550F-4168-8299-64EFB875CD44} - {0231E616-62C8-4316-9355-326537C07651} = {A8E40ED1-550F-4168-8299-64EFB875CD44} - {B4C179CA-89E5-4638-BAEC-8E37B5BBED12} = {386AE10F-B7AC-4C97-AC5C-202D3662A868} - {8E6A242B-B0E6-4DA2-ABA3-6389D65AED5E} = {46D66262-FC61-43B9-8E76-A361FA3D6C81} - {76DD0496-67BC-4B86-BBE1-5648CAF0C719} = {46D66262-FC61-43B9-8E76-A361FA3D6C81} - {7A71B07F-B28B-4DDA-B1EA-565194056951} = {1F2E4087-585C-4B48-8E3D-700D949A15DB} - {46E769E2-FEC7-43EA-99B8-E7A7294D68B2} = {7A71B07F-B28B-4DDA-B1EA-565194056951} - {C2432595-F82E-4DF1-96FA-BD6B4D470010} = {386AE10F-B7AC-4C97-AC5C-202D3662A868} - {537015CF-AE85-4DC2-AE5C-653B213C5BEA} = {79FE88D9-9545-4AE8-80AF-8E2E2E55E8A3} - {749EE7C7-D85E-496D-B127-948E0157AF3E} = {79FE88D9-9545-4AE8-80AF-8E2E2E55E8A3} - {F450E603-4DCA-473A-A9D6-EAD96421F338} = {79FE88D9-9545-4AE8-80AF-8E2E2E55E8A3} - {2BB1527F-D7A1-44BA-A297-4E69A3A4411C} = {7A71B07F-B28B-4DDA-B1EA-565194056951} - {F86D983A-9881-4BE7-AF92-FA0CE41FB319} = {46D66262-FC61-43B9-8E76-A361FA3D6C81} - {59E6AF5C-5F8A-4735-9F95-6457CC17C075} = {79FE88D9-9545-4AE8-80AF-8E2E2E55E8A3} - {35D35175-A160-4557-BE3E-9BCB296C61A1} = {79FE88D9-9545-4AE8-80AF-8E2E2E55E8A3} - {33809B07-61F8-46C1-A921-F30467B21113} = {79FE88D9-9545-4AE8-80AF-8E2E2E55E8A3} - {E176A6B9-36DD-4452-8AA8-F1DCB6B47C33} = {46D66262-FC61-43B9-8E76-A361FA3D6C81} + {CACD258B-6FAA-4329-B278-65E169C2AA4F} = {35302E26-88E5-4279-AEF9-2AF1648FED75} + {4FBB0A13-C5E3-4E88-93D9-35F4D9DFAF19} = {35302E26-88E5-4279-AEF9-2AF1648FED75} + {7B89A58D-22FA-4417-972F-F4F31F750DB1} = {35302E26-88E5-4279-AEF9-2AF1648FED75} + {D7CEFF27-821C-4551-9FAC-CAFA31EECAE4} = {35302E26-88E5-4279-AEF9-2AF1648FED75} + {5C631D07-6022-4E12-A6A3-C9153CB52256} = {35302E26-88E5-4279-AEF9-2AF1648FED75} + {87DB6D17-E932-4231-A26E-DC3992DE7A31} = {35302E26-88E5-4279-AEF9-2AF1648FED75} + {2EEFB19E-9A3A-43CA-AEDD-404949932990} = {35302E26-88E5-4279-AEF9-2AF1648FED75} + {F47BFD71-B46D-4087-86FA-B4FFCAE05BA9} = {35302E26-88E5-4279-AEF9-2AF1648FED75} + {C632FA89-6DCA-4B70-8A14-948418F18EAE} = {35302E26-88E5-4279-AEF9-2AF1648FED75} + {BE9E0C10-BFEE-4813-9FE5-A99FC9CC2EC9} = {35302E26-88E5-4279-AEF9-2AF1648FED75} + {3D989189-F8DF-433F-A56F-C9356CEE04BF} = {35302E26-88E5-4279-AEF9-2AF1648FED75} + {1544C957-ECF0-4087-B33F-1824F877388A} = {35302E26-88E5-4279-AEF9-2AF1648FED75} + {A714BE4D-C42D-4DD6-95D7-76ED153E25F7} = {35302E26-88E5-4279-AEF9-2AF1648FED75} + {325C924A-D53A-41A6-8A62-7C15FE8E361E} = {35302E26-88E5-4279-AEF9-2AF1648FED75} + {5249AD2D-7706-4442-AEED-3FE5A2267A63} = {35302E26-88E5-4279-AEF9-2AF1648FED75} + {A85BAC7E-9825-4ED4-94EC-D7769FC6F59F} = {E5146B8C-99C0-4D77-B273-8EF64C6380E4} + {3CFAC57C-F2D9-4C97-B80A-06C9D1037C3E} = {E5146B8C-99C0-4D77-B273-8EF64C6380E4} + {AF0AFF71-8249-4C89-AA35-5EFC2C7F0603} = {E5146B8C-99C0-4D77-B273-8EF64C6380E4} + {5595B738-2134-424C-928D-95EDED02D41D} = {E5146B8C-99C0-4D77-B273-8EF64C6380E4} + {9641C9F6-F1BC-4A3A-A1DE-129318AB700F} = {E5146B8C-99C0-4D77-B273-8EF64C6380E4} + {2F704199-14C2-4BAE-8859-72A2AD28ACCE} = {7400B718-3A63-4A38-8B58-B5B08F8896FF} + {78777983-0A40-4900-9A0A-AE11BE16D24A} = {A147D18A-EF3A-4DEA-82E2-7D12561EE462} + {29045457-F438-4BAC-9B37-D6CDA565313B} = {A147D18A-EF3A-4DEA-82E2-7D12561EE462} + {27C31E30-DB9F-43BD-9EE7-727CCAA8F55D} = {7400B718-3A63-4A38-8B58-B5B08F8896FF} + {8E738B50-44A3-4115-B50D-6F2A884B9D88} = {7400B718-3A63-4A38-8B58-B5B08F8896FF} + {A147D18A-EF3A-4DEA-82E2-7D12561EE462} = {7400B718-3A63-4A38-8B58-B5B08F8896FF} + {A7AB8BFE-B16D-4D52-94AD-37697E04DB64} = {7400B718-3A63-4A38-8B58-B5B08F8896FF} + {2747A834-C952-4FB6-8A4B-E01C226D08F6} = {A7AB8BFE-B16D-4D52-94AD-37697E04DB64} + {8524E510-D98F-4FD3-BE10-08352527290F} = {A7AB8BFE-B16D-4D52-94AD-37697E04DB64} + {40C9EB86-CF4E-45D9-BEF7-E89913171D86} = {A7AB8BFE-B16D-4D52-94AD-37697E04DB64} + {DE554FAE-B638-4C39-B4F9-0D4FFB0F9027} = {A7AB8BFE-B16D-4D52-94AD-37697E04DB64} + {BEE19955-275A-4242-B1AF-402AD3C7C5F9} = {A7AB8BFE-B16D-4D52-94AD-37697E04DB64} + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {74194C06-3799-4AF4-A216-76FC390CA67E} EndGlobalSection EndGlobal diff --git a/Libs/Champlain/Core/Champlain.Core.csproj b/Libs/Champlain/Core/Champlain.Core.csproj deleted file mode 100644 index e3e28f2cc..000000000 --- a/Libs/Champlain/Core/Champlain.Core.csproj +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - Gir.Core.CS.Champlain - - diff --git a/Libs/Champlain/Wrapper/Champlain.Wrapper.csproj b/Libs/Champlain/Wrapper/Champlain.Wrapper.csproj deleted file mode 100644 index 2fdcea9cd..000000000 --- a/Libs/Champlain/Wrapper/Champlain.Wrapper.csproj +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - Gir.Wrapper.CS.Champlain - - diff --git a/Libs/Clutter/Clutter.csproj b/Libs/Clutter/Clutter.csproj deleted file mode 100644 index 8eb3a1bf6..000000000 --- a/Libs/Clutter/Clutter.csproj +++ /dev/null @@ -1,5 +0,0 @@ - - - Gir.Clutter - - diff --git a/Libs/GModule-2.0/GModule-2.0.csproj b/Libs/GModule-2.0/GModule-2.0.csproj new file mode 100644 index 000000000..8776c3751 --- /dev/null +++ b/Libs/GModule-2.0/GModule-2.0.csproj @@ -0,0 +1,10 @@ + + + + + + + Gir.GModule + GModule + + diff --git a/Libs/Gdk4/Core/Classes/Snapshot.cs b/Libs/Gdk4/Core/Classes/Snapshot.cs deleted file mode 100644 index 787663c93..000000000 --- a/Libs/Gdk4/Core/Classes/Snapshot.cs +++ /dev/null @@ -1,11 +0,0 @@ -using System; -using GObject; - -namespace Gdk -{ - public class Snapshot : GObject.Object - { - protected internal Snapshot(IntPtr ptr) : base(ptr) { } - protected internal Snapshot(ConstructParam[] properties) : base(properties) { } - } -} diff --git a/Libs/Gdk4/Core/Gdk4.Core.csproj b/Libs/Gdk4/Core/Gdk4.Core.csproj deleted file mode 100644 index 295e1dcc8..000000000 --- a/Libs/Gdk4/Core/Gdk4.Core.csproj +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - Gir.Core.CS.Gdk4 - - diff --git a/Libs/Gdk4/Wrapper/Gdk4.Wrapper.csproj b/Libs/Gdk4/Wrapper/Gdk4.Wrapper.csproj deleted file mode 100644 index e6ef95acd..000000000 --- a/Libs/Gdk4/Wrapper/Gdk4.Wrapper.csproj +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - Gir.Wrapper.CS.Gdk4 - - diff --git a/Libs/Gsk4/Wrapper/Gsk4.Wrapper.csproj b/Libs/Gsk4/Wrapper/Gsk4.Wrapper.csproj deleted file mode 100644 index 08dec2e4d..000000000 --- a/Libs/Gsk4/Wrapper/Gsk4.Wrapper.csproj +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - Gir.Wrapper.CS.Gsk4 - - diff --git a/Libs/Gtk-3.0/Classes/Notebook.cs b/Libs/Gtk-3.0/Classes/Notebook.cs new file mode 100644 index 000000000..a25002c9c --- /dev/null +++ b/Libs/Gtk-3.0/Classes/Notebook.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Gtk +{ + public partial class Notebook + { + public Notebook() { } + + public Widget this[string label] + { + set => AppendPage(value, Label.New(label)); + } + } +} diff --git a/Libs/Gtk4/Core/Classes/Application.cs b/Libs/Gtk4/Core/Classes/Application.cs deleted file mode 100644 index 198fef12a..000000000 --- a/Libs/Gtk4/Core/Classes/Application.cs +++ /dev/null @@ -1,7 +0,0 @@ -namespace Gtk -{ - public partial class Application - { - public Application(string applicationId) : base(Sys.Application.@new(applicationId, Gio.Sys.ApplicationFlags.flags_none)) {} - } -} \ No newline at end of file diff --git a/Libs/Gtk4/Core/Classes/ApplicationWindow.cs b/Libs/Gtk4/Core/Classes/ApplicationWindow.cs deleted file mode 100644 index a811a2b40..000000000 --- a/Libs/Gtk4/Core/Classes/ApplicationWindow.cs +++ /dev/null @@ -1,10 +0,0 @@ -using System; -using System.Reflection; - -namespace Gtk -{ - public partial class ApplicationWindow - { - //public ApplicationWindow(Application application) : this(Sys.ApplicationWindow.@new(application)) {} - } -} \ No newline at end of file diff --git a/Libs/Gtk4/Core/Classes/Box.cs b/Libs/Gtk4/Core/Classes/Box.cs deleted file mode 100644 index c0e43f111..000000000 --- a/Libs/Gtk4/Core/Classes/Box.cs +++ /dev/null @@ -1,11 +0,0 @@ -using System; - -namespace Gtk -{ - public partial class Box - { - public Box() : this(Sys.Box.@new(Sys.Orientation.horizontal, 0)) {} - - public void Append(Widget widget) => Sys.Box.append(Handle, widget.Handle); - } -} diff --git a/Libs/Gtk4/Core/Classes/Button.cs b/Libs/Gtk4/Core/Classes/Button.cs deleted file mode 100644 index 0785f06c0..000000000 --- a/Libs/Gtk4/Core/Classes/Button.cs +++ /dev/null @@ -1,11 +0,0 @@ -using System; -using GObject; - -namespace Gtk -{ - public partial class Button - { - public Button() : this(Sys.Button.@new()) { } - public Button(string text) : this(Sys.Button.new_with_label(text)) { } - } -} diff --git a/Libs/Gtk4/Core/Classes/Widget.cs b/Libs/Gtk4/Core/Classes/Widget.cs deleted file mode 100644 index e80da947b..000000000 --- a/Libs/Gtk4/Core/Classes/Widget.cs +++ /dev/null @@ -1,10 +0,0 @@ -using System; -using GObject; - -namespace Gtk -{ - public partial class Widget - { - public void Show() => Sys.Widget.show(Handle); - } -} diff --git a/Libs/Gtk4/Core/Classes/Window.cs b/Libs/Gtk4/Core/Classes/Window.cs deleted file mode 100644 index 51d200c8f..000000000 --- a/Libs/Gtk4/Core/Classes/Window.cs +++ /dev/null @@ -1,14 +0,0 @@ -using System; -using GObject; - -namespace Gtk -{ - public partial class Window - { - public Window() : this(Sys.Window.@new()) { } - - public void SetDefaultSize(int width, int height) => Sys.Window.set_default_size(Handle, width, height); - public void SetTitlebar(Widget widget) => Sys.Window.set_titlebar(Handle, widget.Handle); - public void SetChild(Widget child) => Sys.Window.set_child(Handle, child.Handle); - } -} diff --git a/Libs/Gtk4/Core/Gtk4.Core.csproj b/Libs/Gtk4/Core/Gtk4.Core.csproj deleted file mode 100644 index 47eff4a5c..000000000 --- a/Libs/Gtk4/Core/Gtk4.Core.csproj +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - Gir.Core.CS.Gtk4 - - diff --git a/Libs/Gtk4/Wrapper/Gtk4.Wrapper.csproj b/Libs/Gtk4/Wrapper/Gtk4.Wrapper.csproj deleted file mode 100644 index 64bd5a991..000000000 --- a/Libs/Gtk4/Wrapper/Gtk4.Wrapper.csproj +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - Gir.Wrapper.CS.Gtk4 - - diff --git a/Libs/GtkChamplain/Core/Classes/Embed.cs b/Libs/GtkChamplain/Core/Classes/Embed.cs deleted file mode 100644 index a71d936ae..000000000 --- a/Libs/GtkChamplain/Core/Classes/Embed.cs +++ /dev/null @@ -1,7 +0,0 @@ -namespace GtkChamplain -{ - public class Embed : Gtk.Bin - { - public Embed() : base(Sys.Embed.@new()) { } - } -} diff --git a/Libs/GtkChamplain/Core/GtkChamplain.Core.csproj b/Libs/GtkChamplain/Core/GtkChamplain.Core.csproj deleted file mode 100644 index 44229add0..000000000 --- a/Libs/GtkChamplain/Core/GtkChamplain.Core.csproj +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - Gir.Core.CS.GtkChamplain - - diff --git a/Libs/GtkChamplain/Wrapper/GtkChamplain.Wrapper.csproj b/Libs/GtkChamplain/Wrapper/GtkChamplain.Wrapper.csproj deleted file mode 100644 index 9a603ba1e..000000000 --- a/Libs/GtkChamplain/Wrapper/GtkChamplain.Wrapper.csproj +++ /dev/null @@ -1,5 +0,0 @@ - - - Gir.Wrapper.CS.GtkChamplain - - diff --git a/Libs/GtkClutter/Core/Extensions/GtkApplicationExtensions.cs b/Libs/GtkClutter/Core/Extensions/GtkApplicationExtensions.cs deleted file mode 100644 index 8f2e131d8..000000000 --- a/Libs/GtkClutter/Core/Extensions/GtkApplicationExtensions.cs +++ /dev/null @@ -1,14 +0,0 @@ -using System; - -namespace GtkClutter -{ - public static class GtkApplicationExtensions - { - public static void InitClutter(this Gtk.Application application) - { - var ptr = IntPtr.Zero; - var i = 0; - Sys.Methods.init(ref i, ref ptr); - } - } -} diff --git a/Libs/GtkClutter/Core/GtkClutter.Core.csproj b/Libs/GtkClutter/Core/GtkClutter.Core.csproj deleted file mode 100644 index bc225d61f..000000000 --- a/Libs/GtkClutter/Core/GtkClutter.Core.csproj +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - Gir.Core.CS.GtkClutter - - diff --git a/Libs/GtkClutter/Wrapper/GtkClutter.Wrapper.csproj b/Libs/GtkClutter/Wrapper/GtkClutter.Wrapper.csproj deleted file mode 100644 index ce3b46ac1..000000000 --- a/Libs/GtkClutter/Wrapper/GtkClutter.Wrapper.csproj +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - Gir.Wrapper.CS.GtkClutter - - diff --git a/Libs/Handy/Core/Classes/PageChangedEventArgs.cs b/Libs/Handy/Core/Classes/PageChangedEventArgs.cs deleted file mode 100644 index 8dc98abd0..000000000 --- a/Libs/Handy/Core/Classes/PageChangedEventArgs.cs +++ /dev/null @@ -1,13 +0,0 @@ -using System; - -namespace Handy -{ - public class PageChangedEventArgs : EventArgs - { - public uint Index { get; } - public PageChangedEventArgs(uint index) - { - Index = index; - } - } -} diff --git a/Libs/Handy/Core/Classes/Paginator.cs b/Libs/Handy/Core/Classes/Paginator.cs deleted file mode 100644 index a4be4626c..000000000 --- a/Libs/Handy/Core/Classes/Paginator.cs +++ /dev/null @@ -1,15 +0,0 @@ -using System; -using GObject; -using Gtk; - -namespace Handy -{ - public partial class Paginator - { - public Paginator() : this(Sys.Paginator.@new()) { } - - public void Prepend(Widget widget) => Sys.Paginator.prepend(Handle, widget.Handle); - public void Append(Widget widget) => Sys.Paginator.insert(Handle, widget.Handle, -1); - public void ScrollTo(Widget widget) => Sys.Paginator.scroll_to(Handle, widget.Handle); - } -} diff --git a/Libs/Handy/Core/Enums/PaginatorIndicatorStyle.cs b/Libs/Handy/Core/Enums/PaginatorIndicatorStyle.cs deleted file mode 100644 index 90f037b2e..000000000 --- a/Libs/Handy/Core/Enums/PaginatorIndicatorStyle.cs +++ /dev/null @@ -1,12 +0,0 @@ -namespace Handy -{ - /// - /// In sync with Handy.PaginatorIndicatorStyle - /// - public enum PaginatorIndicatorStyle : long - { - None = 0, - Dots = 1, - Lines = 2, - } -} diff --git a/Libs/Handy/Core/Handy.Core.csproj b/Libs/Handy/Core/Handy.Core.csproj deleted file mode 100644 index 5c26d0ec6..000000000 --- a/Libs/Handy/Core/Handy.Core.csproj +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - Gir.Core.CS.Handy - - diff --git a/Libs/Handy/Wrapper/Handy.Wrapper.csproj b/Libs/Handy/Wrapper/Handy.Wrapper.csproj deleted file mode 100644 index 36a60742e..000000000 --- a/Libs/Handy/Wrapper/Handy.Wrapper.csproj +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - Gir.Wrapper.CS.Handy - - diff --git a/Libs/JavascriptCore/Core/Classes/Context.cs b/Libs/JavascriptCore/Core/Classes/Context.cs deleted file mode 100644 index e1c263072..000000000 --- a/Libs/JavascriptCore/Core/Classes/Context.cs +++ /dev/null @@ -1,12 +0,0 @@ -using System; - -namespace JavaScriptCore -{ - public partial class Context - { - public void Throw(string errorMessage) => Sys.Context.@throw(Handle, errorMessage); - public void SetValue(string name, Value value) => Sys.Context.set_value(Handle, name, value.Handle); - public Value GetValue(string name) => new Value(Sys.Context.get_value(Handle, name)); - public Value GetGlobalObject() => new Value(Sys.Context.get_global_object(Handle)); - } -} diff --git a/Libs/JavascriptCore/Core/Classes/Value.cs b/Libs/JavascriptCore/Core/Classes/Value.cs deleted file mode 100644 index 0287c031d..000000000 --- a/Libs/JavascriptCore/Core/Classes/Value.cs +++ /dev/null @@ -1,45 +0,0 @@ -using System; -using System.Runtime.InteropServices; -using GObject; - -namespace JavaScriptCore -{ - public partial class Value - { - #region Methods - public double GetDouble() => Sys.Value.to_double(Handle); - public int GetInt() => Sys.Value.to_int32(Handle); - public string GetString() => Marshal.PtrToStringAuto(Sys.Value.to_string(Handle)); - public bool GetBool() => Sys.Value.to_boolean(Handle); - - public bool IsNumber() => Sys.Value.is_number(Handle); - public bool IsString() => Sys.Value.is_string(Handle); - public bool IsNull() => Sys.Value.is_null(Handle); - public bool IsUndefined() => Sys.Value.is_undefined(Handle); - public bool IsBool() => Sys.Value.is_boolean(Handle); - public bool IsObject() => Sys.Value.is_object(Handle); - public bool IsFunction() => Sys.Value.is_function(Handle); - public bool IsArray() => Sys.Value.is_array(Handle); - - public bool HasProperty(string name) => Sys.Value.object_has_property(Handle, name); - public Value InvokeMethod(string name) - { - var ptr = IntPtr.Zero; - var ret = Sys.Value.object_invoke_methodv(Handle, name, 0, ref ptr); - - return new Value(ret); - } - - public Value GetProperty(string name) => GetProperty(Sys.Value.object_get_property(Handle, name)); - - public Value GetPropertyAtIndex(uint index) => GetProperty(Sys.Value.object_get_property_at_index(Handle, index)); - - private static Value GetProperty(IntPtr ptr) - { - return WrapPointerAs(ptr); - } - #endregion - - public static Value Create(IntPtr ptr) => new Value(ptr); - } -} diff --git a/Libs/JavascriptCore/Core/JavascriptCore.Core.csproj b/Libs/JavascriptCore/Core/JavascriptCore.Core.csproj deleted file mode 100644 index f76464437..000000000 --- a/Libs/JavascriptCore/Core/JavascriptCore.Core.csproj +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - Gir.Core.CS.JavascriptCore - - diff --git a/Libs/JavascriptCore/Wrapper/JavascriptCore.Wrapper.csproj b/Libs/JavascriptCore/Wrapper/JavascriptCore.Wrapper.csproj deleted file mode 100644 index 403443cb8..000000000 --- a/Libs/JavascriptCore/Wrapper/JavascriptCore.Wrapper.csproj +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - Gir.Wrapper.CS.JavascriptCore - - diff --git a/Libs/WebKit2WebExtension/Core/Classes/WebExtension.cs b/Libs/WebKit2WebExtension/Core/Classes/WebExtension.cs deleted file mode 100644 index 19e8df159..000000000 --- a/Libs/WebKit2WebExtension/Core/Classes/WebExtension.cs +++ /dev/null @@ -1,18 +0,0 @@ -using System; - -namespace WebKit2WebExtension -{ - public class PageCreatedEventArgs : EventArgs - { - public WebPage WebPage { get; } - - public PageCreatedEventArgs(WebPage webPage) - { - WebPage = webPage ?? throw new ArgumentNullException(nameof(webPage)); - } - } - public partial class WebExtension : GObject.Object - { - private WebPage GetPage(ref GObject.Sys.Value[] values) => null!;//TODO - } -} diff --git a/Libs/WebKit2WebExtension/Core/Classes/WebPage.cs b/Libs/WebKit2WebExtension/Core/Classes/WebPage.cs deleted file mode 100644 index d87cb815b..000000000 --- a/Libs/WebKit2WebExtension/Core/Classes/WebPage.cs +++ /dev/null @@ -1,8 +0,0 @@ -using System; - -namespace WebKit2WebExtension -{ - public partial class WebPage - { - } -} diff --git a/Libs/WebKit2WebExtension/Core/WebKit2WebExtension.Core.csproj b/Libs/WebKit2WebExtension/Core/WebKit2WebExtension.Core.csproj deleted file mode 100644 index cd805ed4a..000000000 --- a/Libs/WebKit2WebExtension/Core/WebKit2WebExtension.Core.csproj +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - Gir.Core.CS.WebKit2WebExtension - - diff --git a/Libs/WebKit2WebExtension/Wrapper/WebKit2WebExtension.Wrapper.csproj b/Libs/WebKit2WebExtension/Wrapper/WebKit2WebExtension.Wrapper.csproj deleted file mode 100644 index 08316db75..000000000 --- a/Libs/WebKit2WebExtension/Wrapper/WebKit2WebExtension.Wrapper.csproj +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - Gir.Wrapper.CS.WebKit2WebExtension - - diff --git a/Libs/WebKitGTK/Core/Classes/Settings.cs b/Libs/WebKitGTK/Core/Classes/Settings.cs deleted file mode 100644 index 6bc0ce595..000000000 --- a/Libs/WebKitGTK/Core/Classes/Settings.cs +++ /dev/null @@ -1,9 +0,0 @@ -using System; -using GObject; - -namespace WebKit2 -{ - public partial class Settings - { - } -} diff --git a/Libs/WebKitGTK/Core/Classes/StringUserScript.cs b/Libs/WebKitGTK/Core/Classes/StringUserScript.cs deleted file mode 100644 index af1cce48f..000000000 --- a/Libs/WebKitGTK/Core/Classes/StringUserScript.cs +++ /dev/null @@ -1,14 +0,0 @@ -using System; - -namespace WebKit2 -{ - public class StringUserScript : UserScript - { - public string Script { get; } - - public StringUserScript(string script) - { - Script = script ?? throw new ArgumentNullException(nameof(script)); - } - } -} diff --git a/Libs/WebKitGTK/Core/Classes/UserContentManager.cs b/Libs/WebKitGTK/Core/Classes/UserContentManager.cs deleted file mode 100644 index 146b58c3b..000000000 --- a/Libs/WebKitGTK/Core/Classes/UserContentManager.cs +++ /dev/null @@ -1,33 +0,0 @@ -using System; -using GObject; - -namespace WebKit2 -{ - public partial class UserContentManager - { - public bool RegisterScriptMessageHandler(string name, Action callback) - { - if (!Sys.UserContentManager.register_script_message_handler(Handle, name)) - return false; - - void OnMessageReceived(ref GObject.Sys.Value[] values) - { - var result = values[1].GetBoxed(); - result = Sys.JavascriptResult.@ref(result); - var jsValue = Sys.JavascriptResult.get_js_value(result); - var value = JavaScriptCore.Value.Create(jsValue); - callback(value); - } - - RegisterEvent($"script-message-received::{name}", (ActionRefValues) OnMessageReceived); - return true; - } - - public void AddScript(UserScript script) - { - var zero = IntPtr.Zero; - var webkitScript = Sys.UserScript.@new(script.Script, Sys.UserContentInjectedFrames.all_frames, Sys.UserScriptInjectionTime.end, zero, zero); - Sys.UserContentManager.add_script(Handle, webkitScript); - } - } -} diff --git a/Libs/WebKitGTK/Core/Classes/WebContext.cs b/Libs/WebKitGTK/Core/Classes/WebContext.cs deleted file mode 100644 index 4bb5791c9..000000000 --- a/Libs/WebKitGTK/Core/Classes/WebContext.cs +++ /dev/null @@ -1,12 +0,0 @@ -using System; - -namespace WebKit2 -{ - public partial class WebContext - { - public WebContext() : this(Sys.WebContext.@new()) { } - - public void ClearCache() => Sys.WebContext.clear_cache(Handle); - public void SetWebExtensionsDirectory(string directory) => Sys.WebContext.set_web_extensions_directory(Handle, directory); - } -} diff --git a/Libs/WebKitGTK/Core/Classes/WebInspector.cs b/Libs/WebKitGTK/Core/Classes/WebInspector.cs deleted file mode 100644 index 7c7b656fc..000000000 --- a/Libs/WebKitGTK/Core/Classes/WebInspector.cs +++ /dev/null @@ -1,9 +0,0 @@ -using System; - -namespace WebKit2 -{ - public partial class WebInspector - { - public void Show() => Sys.WebInspector.show(Handle); - } -} diff --git a/Libs/WebKitGTK/Core/Classes/WebView.cs b/Libs/WebKitGTK/Core/Classes/WebView.cs deleted file mode 100644 index e6a7b1140..000000000 --- a/Libs/WebKitGTK/Core/Classes/WebView.cs +++ /dev/null @@ -1,37 +0,0 @@ -using System; -using System.Threading.Tasks; -using GObject; -using Gtk; -using JavaScriptCore; - -namespace WebKit2 -{ - public partial class WebView - { - public WebView(WebContext context) : this(Sys.WebView.new_with_context(context.Handle)) { } - - public void LoadUri(string uri) => Sys.WebView.load_uri(Handle, uri); - public Settings GetSettings() => WrapPointerAs(Sys.WebView.get_settings(Handle)); - public UserContentManager GetUserContentManager() => WrapPointerAs(Sys.WebView.get_user_content_manager(Handle)); - public WebInspector GetInspector() => WrapPointerAs(Sys.WebView.get_inspector(Handle)); - - public Task RunJavascriptAsync(string script) - { - var tcs = new TaskCompletionSource(); - - void Callback(IntPtr sourceObject, IntPtr res, IntPtr userData) - { - var jsResult = Sys.WebView.run_javascript_finish(sourceObject, res, out var error); - HandleError(error); - - var jsValue = Sys.JavascriptResult.get_js_value(jsResult); - var value = WrapPointerAs(jsValue); - tcs.SetResult(value); - } - - Sys.WebView.run_javascript(Handle, script, IntPtr.Zero, Callback, IntPtr.Zero); - - return tcs.Task; - } - } -} diff --git a/Libs/WebKitGTK/Core/Interfaces/UserScript.cs b/Libs/WebKitGTK/Core/Interfaces/UserScript.cs deleted file mode 100644 index d699c6140..000000000 --- a/Libs/WebKitGTK/Core/Interfaces/UserScript.cs +++ /dev/null @@ -1,7 +0,0 @@ -namespace WebKit2 -{ - public interface UserScript - { - string Script { get; } - } -} diff --git a/Libs/WebKitGTK/Core/WebKitGTK.Core.csproj b/Libs/WebKitGTK/Core/WebKitGTK.Core.csproj deleted file mode 100644 index 697e4cf93..000000000 --- a/Libs/WebKitGTK/Core/WebKitGTK.Core.csproj +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - Gir.Core.CS.WebKitGTK - - diff --git a/Libs/WebKitGTK/Wrapper/WebKitGTK.Wrapper.csproj b/Libs/WebKitGTK/Wrapper/WebKitGTK.Wrapper.csproj deleted file mode 100644 index 9ff534b2c..000000000 --- a/Libs/WebKitGTK/Wrapper/WebKitGTK.Wrapper.csproj +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - Gir.Wrapper.CS.WebKitGTK - - diff --git a/Libs/cairo-1.0/Records/Context.cs b/Libs/cairo-1.0/Records/Context.cs index 51506ac4d..d6624a3ce 100644 --- a/Libs/cairo-1.0/Records/Context.cs +++ b/Libs/cairo-1.0/Records/Context.cs @@ -8,23 +8,23 @@ public partial class Context { // IMPORTANT FIXME TODO: This should not be hardcoded private const string cairoLib = "libcairo-2"; - + // IMPORTANT: We should follow cairo's guidelines on memory management // for language bindings. This is a quick attempt at implementing something // workable. - + [DllImport (cairoLib, EntryPoint = "cairo_set_source_rgba")] internal static extern void NativeSetSourceRgba (Native.Context.Handle cr, double red, double green, double blue, double alpha); public void SetSourceRgba(double red, double green, double blue, double alpha) => NativeSetSourceRgba(Handle, red, green, blue, alpha); - + [DllImport (cairoLib, EntryPoint = "cairo_show_text")] internal static extern void NativeShowText (Native.Context.Handle cr, [MarshalAs(UnmanagedType.LPUTF8Str)] string utf8); public void ShowText(string text) => NativeShowText(Handle, text); - + [DllImport (cairoLib, EntryPoint = "cairo_move_to")] internal static extern void NativeMoveTo (Native.Context.Handle cr, double x, double y); @@ -36,7 +36,7 @@ public void MoveTo(double x, double y) public void TextExtents(string text, out TextExtents extents) => NativeTextExtents(Handle, text, out extents); - + [DllImport (cairoLib, EntryPoint = "cairo_font_extents")] internal static extern void NativeFontExtents (Native.Context.Handle cr, out FontExtents extents); @@ -48,15 +48,15 @@ public void FontExtents(out FontExtents extents) public void Fill() => NativeFill(Handle); - + [DllImport (cairoLib, EntryPoint = "cairo_rectangle")] internal static extern void NativeRectangle (Native.Context.Handle cr, double x, double y, double width, double height); public void Rectangle(double x, double y, double width, double height) => NativeRectangle(Handle, x, y, width, height); - - - [DllImport (cairoLib, EntryPoint = "cairo_set_font_size")] + + + [DllImport(cairoLib, EntryPoint = "cairo_set_font_size")] internal static extern void NativeSetFontSize (Native.Context.Handle cr, double size); public void SetFontSize(double size) diff --git a/Libs/xlib-2.0/xlib-2.0.csproj b/Libs/xlib-2.0/xlib-2.0.csproj new file mode 100644 index 000000000..a80a5dac3 --- /dev/null +++ b/Libs/xlib-2.0/xlib-2.0.csproj @@ -0,0 +1,12 @@ + + + + Gir.xlib + xlib + + + + + + + diff --git a/Samples/GObject/CreateCustomGObject.cs b/Samples/GObject/CreateCustomGObject.cs deleted file mode 100644 index 1dbf4bf9e..000000000 --- a/Samples/GObject/CreateCustomGObject.cs +++ /dev/null @@ -1,27 +0,0 @@ -using System; -using GObject; -using Object = GObject.Object; - -namespace Sample -{ - - public class Bar : Foo - { - } - public class Foo : Object - { - public string Text { get; set; } - } - - public class GObject - { - public static void CreateCustomGObject() - { - var myObject = new Bar(); - - var b = new Binding(null, "", null, ""); - - //Console.WriteLine(myObject.Text); - } - } -} \ No newline at end of file diff --git a/Samples/GObject/GObject.csproj b/Samples/GObject/GObject.csproj deleted file mode 100644 index da1ae88a0..000000000 --- a/Samples/GObject/GObject.csproj +++ /dev/null @@ -1,12 +0,0 @@ - - - - Exe - net5.0 - - - - - - - diff --git a/Samples/GObject/Program.cs b/Samples/GObject/Program.cs deleted file mode 100644 index 01ca2091a..000000000 --- a/Samples/GObject/Program.cs +++ /dev/null @@ -1,12 +0,0 @@ -using System; - -namespace Samples -{ - class Program - { - static void Main(string[] args) - { - Sample.GObject.CreateCustomGObject(); - } - } -} diff --git a/Samples/Gtk3/Builder/Builder.csproj b/Samples/Gtk3/Builder/Builder.csproj deleted file mode 100644 index 465d793a7..000000000 --- a/Samples/Gtk3/Builder/Builder.csproj +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - Exe - net5.0 - enable - - - - - - %(Filename)%(Extension) - - - - diff --git a/Samples/Gtk3/Builder/DemoWindow.cs b/Samples/Gtk3/Builder/DemoWindow.cs deleted file mode 100644 index 13038281c..000000000 --- a/Samples/Gtk3/Builder/DemoWindow.cs +++ /dev/null @@ -1,42 +0,0 @@ -using System; -using Gtk; - -namespace GtkDemo -{ - public class DemoWindow : ApplicationWindow - { - [Connect] - private Button Button = default!; - - [Connect] - private Box Box = default!; - - private Notebook notebook; - - public DemoWindow(Application application) : this(application, new Builder("demo_window.glade")) { } - private DemoWindow(Application application, Builder builder) : base(builder.GetObject("root"), false) - { - Application = application; - builder.Connect(this); - - // Connect Button - Button.OnClicked += Button_Clicked; - - // Create Notebook - notebook = new Notebook(); - Box.PackStart(notebook, true, true, 0); - - var image = Image.NewFromFile("data/gtk.png"); - notebook.InsertPage("Image", image, 0); - - var label = new Label("Gtk and C# - Very exciting isn't it?"); - notebook.InsertPage("Label", label, 1); - } - - private void Button_Clicked(Button sender, EventArgs args) - { - Console.WriteLine("Hello World!"); - Resizable = !Resizable; - } - } -} diff --git a/Samples/Gtk3/Builder/Program.cs b/Samples/Gtk3/Builder/Program.cs deleted file mode 100644 index d715a0e0e..000000000 --- a/Samples/Gtk3/Builder/Program.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System; -using System.Diagnostics; -using Gtk; -using Application = Gtk.Application; - -namespace GtkDemo -{ - public class Program - { - public static void Main(string[] args) - { - var app = new Program(); - } - - public Program() - { - var app = new Application("org.gircore.builder"); - app.OnActivate += OnActivate; - app.Run(); - } - - private void OnActivate(Gio.Application sender, EventArgs args) - { - if (sender is Application app) - { - var w = new DemoWindow(app) - { - DefaultHeight = 600, - DefaultWidth = 800, - }; - - w.ShowAll(); - } - } - } -} diff --git a/Samples/Gtk3/Builder/data/demo_window.glade b/Samples/Gtk3/Builder/data/demo_window.glade deleted file mode 100644 index ae45aa56c..000000000 --- a/Samples/Gtk3/Builder/data/demo_window.glade +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - False - Gtk C# builder api example - - - True - False - vertical - - - Click Me! - True - True - True - 10 - 10 - 10 - 10 - - - False - True - end - 0 - - - - - - - - - diff --git a/Samples/Gtk3/Builder/data/gtk.png b/Samples/Gtk3/Builder/data/gtk.png deleted file mode 100644 index b622179b53e6e74d1352f762fb7c1fe679f8c2bf..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6503 zcmZ`;WmFVSwBKb3C8a@1mU8Ltkdj7NKpGYS=?3WzY5qv3fP{o}FWp_z%L0OQNjJQG zAK!;}=FHqPGw05^bAPwaOq7PY0v`5jYybd&r=%zcMNuzQ4}O7(8gXs|Kq!K4C9Nh6 z0MsPlJeXmi=5Ndup=tnt4>JG|6b1m?p_YPn0RRtf0AL>m0Engo0OZcut(xMf4a`p} z3UYww|805gB}u3iEO#X}d8|z|qE~N8zIx1?0ss_tN^;WLUdu;0p2^xCse@9TBRV+@ z$Vj=DGkNdI-{{+f5TR2q5-v?=$S-(ke_5#8pV-}>I6jQ8n@Inx$}sYFKlUY~qO~jc zoAmduMG4_qQzE(@_X-$g3_0-D(i4$v&}DSx!im@B;zY+Lb#}r9PO*bOE44?SKfC|>#!S*AvHxoc$*m6#tddD^0@mbR~%OP$r(5o ztymT*&I;ZGe{zb>MecnYd%#}udTZJtrOylo>)(>bwR?m{UYyu0$SlO<;bYFU1%5`G zR%>r+o>6~qB0_1!Djd-9x?~iu>sypATJ`4>2qvRm^HD@VpFD-%vjeSjQlvQOp$a-e zhPKl3t~ZFP{oM|TA28m*GPEs7spH*nX^Fs$i@XD2r?m0#jhguIao@!#uMNd03ZXkqu#~%Nucm)8wDo zVx1g|jdy1gk;R=TKjaHFEPQhz$iz?{5IGT|BZyMwqvrMJE8-Dzr)_iG`2dIRhrU{mc_+}dn7UYr;K*hzqu*5ZhTAu_pDkT^vW%pA z8uM;O^c9GIjR2g)4B=Nf(6zGzV-$(F`wc0^F+Oow!u2sys7I^1ww!c)`c245ZrB? z+}yGTG)X4ScGs{s=X068rwO9Fq$dYO!~OvYs(~Ol-u_}L&x?+2 zb5%F_`96%6g-|%zPzD8U-2fwxw;bBYIcW#l4c|X4LT?SorECH^JJ`SNmTw%V(MiQ# zh_92Vym!v-{gkae=e&Q$WPUdEf5ip9H0zN49qc6cmuX!p8M-BnrzbboRY;SXw;4L)xt6s6=A zu!Vz3lD+JO?(LaGcFLUL;iGCHgN+H<5UZ<2M&`Ikh0W6=#&sQ7c%*n$xAj}(ISY_k`_Dv|XO!kK?3pfG5 z7TmmDhSUldczPkBr5$R>DEAAm@ew)9%X`iyF?Th0YAt|$qSxiNI$e!2MpJhS^ylIl zMUKk)#EcVQrdwl~t_~c@QQq5sS9NyF3s0Bdtb$p)hMi1#bXkFGUwf%SJn|U;DsNzE zhI$Q~!Wp+I^h7xo=awH$mNG{hJRA&xQW#|3z2)NtWX6S8oxWQVGAeKKM^}op&vOd4EX+mHYSdK=+~yieTM%y3T8d^w#|J0AqUi z@A2)b$uoq<;E=Eup_es(HT;)K1pm9Zg#GZB#Lj;Azn<5p{=Nvf+?);u?a_PGMzc9o zEW2duHf_1)w@qA}iLd{R6lVet%!4qEyuC@()8EbEaNVrI1g*Wjx}6y zDCgcXCV60;gRG|6y|#0onZZqs69vGy{*Xoc&X^u>pT3p!iO*2asmqhDZzL01QtJ6m_CvLB z=$1fk%T8L;U+2pDU<;E7BAfQo+x+cGa0ciAT;kGw}r}e|`h-Z!KgwE+b9xVc& zBJCdscrrrSq z$r6viytUKRMp7XMu^knLgW)yiHGwWJBo6OFm@Jl%jBDTW(*&)wG@w*o)|mg=$?Nm= zV;uh-iFia8lxmgw-P!o5aQUVByP;&3$0%y>3oN6C*G9fs8h!dp z%o$55duaL;@@IewxJ&2sXSh@4&(<%IzvK%Mitc%p%F(cqA+HF=aC1TajvqSCoBtW$ zj!d4Ge^hX$8I|?zfXdN_Gz-bhq<2N}cUc;BM_#91WnGU!yAGKGm$UkCZh0vTNh)d+afTGbOR z5$eSrR3(R|>jkI3M9I{Q)}?R|blt(J{@b|Wzl#ZPZ#Lz`PtmRU({T-+yjQs!{XOFy z)*{%c#2G@g-ZOI-eh?-z|9yK=v58e{zh|*D19A3SEBNlvLec%PNL%MC+Lhsz)(0~w zzx4FE^2byOUsa+X_olh2zoxqugKJ{x$Po6D9+4@0@l`{$#cqAA!OGXS9|OMi6g&jQ zbk!B~66pPoX1)8C+HMv)Si9y+&|9b!F#0q}m$1=rVWgg2bv&oRfl0IZb&%Il19zC` zbEaa+Y_rNx;}PR%s(PaX%NLt_4;~xv6l?ohu76Ou7=Ort;nl^S2RkC~_rG%yS>GZ{ z7CFicN!~=lN3j2>6KBSU56e=6adqY$+GXm&I*V^Y#9lk+St71ZSiX$E=J&t5U>$W- zlJwZz$liRR-{>B%x1hBVXHVvPU$z{b@ZAPnGa?r5SzF^5GoxjkLtt z{tb*W+vP7C_VelKNKiEt&6s!4ZsBsjYtiRVi(bbc>y9({VnQ1(gq)qKb)px zVU@Bz->Xmds-&b)lPN46_A@x*WFBlB&HCU8ORIFi<4}`x_Ry7c292&ZC8P`3O))b8 zxh0r_&4&L-n=knnsH)OrOl|o2pcKn@CHn&Dd3*_Oj+e*DYelb~to1z1o3dKcDxR%5 zTxgCGtE=1!}`nR*!lWL$DUuN)pI60LNI=*QRD9z9&L%uSV0QZk+23>T#1gm zJ~DZ&cSZaG#eKhH)St@`UU6bEI&Z_j!p)v~5YacoHF1b|KLe+9V0~3 z%te$S&*eTk^iF}$%+W`se$F^viMStb>6vJWJRUcaP+;2-ocSO%@odLd#CZdt14V%T z9$c=we_7MFZJ-?ucyO6AsUK;l4EJ-b-b$6&A9?FYO*q)q$G!GgkvU$X@asD-&tU+R z!}BbVyz-?1m7_Wvu_ViTv99y-U`@ytZoPFN69*|N(lb?ZbhU2Kd}(+XkQ;p!{UUcQ zIehNe(M9qX7kt)vCLoAmKF(sf@so${lp%?RMarFEg#e)9B~Gu-^kZke!vg1|-W9^h zJX-)KsP8TD2M(J4vK*En&Yz4ch2|r3r?E8Dvi4z#%rg+nN^w^Q_;77elKEPk3iXAc zO$u!&c2!a!2j8-v%Mq6FXM}R90~KlIsNHc(4Q;ba7jl}lp|95S z_-{`-&&BN@EdJ9|z-;TNcpYz}!{6mE3;M0DEu}TI!n+);!Is~p67G92q}B;Wj~Ny^ z(*Dbghp9~&x+`+TuHU>`AAK7Vvk$7o10L@MZDz);@58uiWw5u_N5!!Q1?;BjyV}J= z4pvGS3Tbmf?NXou`7e%jpnCi~cm+b}&1pjwQF3ml1Knu=>aqe~pBU{~iuHXB^lMmG z*(n;E#dLd{JT|Z+mi?}FqFd>Xq&Q4MPD++lu=G>4nKA)rrCuIu0?YGu6R~-&7~Ed(lJ5~{e_4&m zff6Nx(u#LXILYGCnxt$3y0m%akLMVt!4%$R=p$5`DwaWWO5)ic(AAwOq*(P(m1q30 zN)&Sij6WC_SuBV$`_HVFu1ueJ>$ZP|3FRn0LdH%G!AIC%?dF|Fo-ks5m{_!J(NS2W z_YGPSpl_i`s<446iWYuc`1DQlrKS#8V{xwtCz%yz;Bu?Ji?IUf=kvw%Hqah898`9K zt?;YJC#^m$O1WzFF;qk%`i{%2gf$*rn~uTu%pu0_Y}R?6MO6qzVt35+vg6_hj7?~h z-`!hSuBy;9xpcaNFKp1%hJ?MCsxL{Blyp; zjr-*Owf+L~`B2uHr59J%J<{lUVlY7QQXNlmQ9hNVc$Xs51G{iyEYUl@%Dd=oTz#Y| z_v#tJ3SDQ+2eyFW>jpZHgNA8{`T8#$s>3Fm*Un8ua|LvKnCB0->D%M7QjXa>%yXRN zpBnBaog9{Aja$oR=o{=Sy+WuFoMdv3@%@@yyeq;naij^*15TU>?AB_t8gETxtGxm- zRgCvA(Wh0Pn7=(TLZ-^U0!MeL14MVPXr?+X^rVHW~U6UwI#Nw8j`r;i7#4SqQt=PFzlq z>`6&mFgK_>v6Wh{e|!^DVDhg~E9tiR0XQKN?~b?r`SZ6-%#~m=8of6ejx89Z$4kH+ zQI{UNqDBYAtE^vxS8GL;S{0lvkDtUy;WeYnrQ7do_Cd$#B7Z((Gv1S%!jRR#gR3K9 ze7a(x;kcy7xxl|+k9=eb&%r1Fc>9FoJhq-yTgucTL8dGJWEygxqT>DS99&!-r3!z82^Fd)@`V&T@m>8E>drVBW3 zre3iRuJ;jWJVMkQts>i-LU)-(`bM^+Sy1WxZ{yFky0`lnD0lgyEM{qwBro(W)Ym+C zc4?&MXd|T{gFVtGg5ZyQ5(`Q_`P%JU7l}Rb16=I}Z%@F%F&; zIGROzESFZ)D^~X#n&>ner@AWkXO3kZfRXZ++o$pS+ zY7wm0^1hN~j}A!G9(BE=gx)qE0w=^08u>yVgUVB&4IH)Bys0mfeyF568xfoO{q$H{YV zcF8knpSVG|#BE2~2aZVVdAWRPM4^N%vS!!Mw7igtH|)k3K6Q0O1)fnl8&e-&AI;Rk zJ`i31uq1fj7V}@f14;((0jyC8`xYgum zJTUD4Ugkx`GY239Q6PjVx=V{)x=!P&BM83P>QA)0WGT%j*iu*9%HuntpV`2`|CqcY zxXh()(a&d!=&^GupbIunMzvu_DV@w8#Ue>vveIdvoMHVd9WU^MjL-^!Vu0lCcZcv3 zqA!yY^w`F;>g}4YR7DfNRS5#qzYqLk_$XFgN^P`g+hsDO(`5wX02pvgS9K`gFeHS% zbq_wHSv#{mRqd$ImzR1Je&Puz@656FM8|s92viB4TP2V5xw8QWo>OJEu>>g6tg8Ql z7;ih3q`vQb-^^U|NJtG>dij9sHF0gw_alMmd^;=ecR1=)R|jA5qht>p2DNj=*@S;I zu0YEpw8Lp(O*XAl%qNmQi$BXr3DTcT+8 zHyDa1PGGHyLr&CWL)?!;4%X2@=_60kfp;O}IoBoC^70qu`a$uNX;!-qAPQ-gR8D{34cnf_|>Ht<*P^8e{_e=sn12P=tTrlnnhU zXTe&Hw_Bp7ezkbH(y}P^EG}1@3+DG%Y+&C(-Re@I5O8Rs;D@)EpKN>1uqav|tfNdr zng}r&k`>_L=_@JGYO^M6ytvR94vUbEP(nG0Tf<)JKy-0km!S#O@qb&TG?Fs;$)bDV zZ5R|kdU_%e)xk4jCxur(5;#?=nMswRy@AB+*Z<|&xdZ!wPE2j{*L}6|&=Oo}NYO;h zkXqM!*f-wSQI7|vkoId6+f}d4S|CC<5U+H5%gDT=y~Z1fz0TEzqg<+vD4n-4k5w+^ zCCtF^Lm!haXWG78nC|P-xP-4=8vGQsgf+VeZgQ~gIyHCHH2H0EWUgu|>v-PXy4y}@ zmc5sA1g&DG7LaI8iia}O2S*Rm9_YZ#8$gs+ElDohV*8V4vyjYWC<10?QsUj zQ8HyR_7@|*ZhOgzBuORxHlI!rW={2$Fa0P6EO8cbZYNijqOSo-F8kUWp2vmO6Vxl= z;nFT<8}*?ScKQRt=d}Z51&E-_u5;y5Q1_uIvXMj<(x5K4jdl?9;<4F<@ervpU7_DR zk-axxU?a1L9r5}%8eQ|D7H95Wi;i+BZH-I0;llFUqA$^kum3?_l~D2Y@DU5xkxh(^ zaf&54tD%{XskBVEl20!OjFYO-u@xCflyRM0eUvQ?1@q!f-guZgJU`_s=JH_;3az;- zO}qc{eknQ!8`h-Eb@{WC3}x{->{8LVNK&RDOdK{D(zPKXR$7FoZG_|094$`gf49^y zixuSBKp8RP-g`k^{&wVI#Qv-GMp?-}IfaYZMn8IbqY(8`Gh)YiUyhcq$kkfAV+Gcv z%e-5jC1-%OXmo%{)}oGla>&nlIBU^F)Q~%j*!c&_7X6?7l}}o}X3muxKA!ViQ`)v= zoSLzr%D@%9>14bLw5Pww{^k5y?e39W|6i^rmTU|M}jqKal0w%`v@#>sd%-XXrm>cSX5lQbMiW zXiOFhCh+qDMGJ8w=#!hSz?YvgawbHHn)z&tZttY%)8+}lXKsX1xW+ZPFK>6i8+jSmLaM;hJc6S9+@iePY~0+U+}v3h7{&jG!NJMG=Ck+z&# - - - - \ No newline at end of file diff --git a/Samples/Gtk3/CompositeTemplates/NoSourceGenerator/NoSourceGenerator.csproj b/Samples/Gtk3/CompositeTemplates/NoSourceGenerator/NoSourceGenerator.csproj deleted file mode 100644 index 05d301fc2..000000000 --- a/Samples/Gtk3/CompositeTemplates/NoSourceGenerator/NoSourceGenerator.csproj +++ /dev/null @@ -1,19 +0,0 @@ - - - Exe - net5.0 - enable - - - - - - - - - - %(Filename)%(Extension) - - - - \ No newline at end of file diff --git a/Samples/Gtk3/CompositeTemplates/NoSourceGenerator/Program.cs b/Samples/Gtk3/CompositeTemplates/NoSourceGenerator/Program.cs deleted file mode 100644 index ac817c768..000000000 --- a/Samples/Gtk3/CompositeTemplates/NoSourceGenerator/Program.cs +++ /dev/null @@ -1,32 +0,0 @@ -using System; -using Gtk; -using Global = Gtk.Global; -using Object = GObject.Object; - -namespace GtkDemo -{ - /// - /// Minimalist demo program demonstrating the GTK templating system - /// - public static class Program - { - #region Methods - - public static void Main(string[] args) - { - Global.Init(); - - var mainWindow = new Window("MyWindow") - { - DefaultWidth = 300, - DefaultHeight = 200, - Child = new CompositeWidget(), - [Window.DestroySignal] = (o, e) => Global.MainQuit() - }; - - mainWindow.ShowAll(); - Global.Main(); - } - #endregion - } -} diff --git a/Samples/Gtk3/CompositeTemplates/UsingSourceGenerator/CompositeWidget.cs b/Samples/Gtk3/CompositeTemplates/UsingSourceGenerator/CompositeWidget.cs deleted file mode 100644 index af7ab9bc2..000000000 --- a/Samples/Gtk3/CompositeTemplates/UsingSourceGenerator/CompositeWidget.cs +++ /dev/null @@ -1,16 +0,0 @@ -using Gtk; - -namespace GtkDemo -{ - [Template("CompositeWidget.ui")] - public partial class CompositeWidget : Bin - { - [Connect] - private Button Button = default!; - - private void button_clicked(Button sender, System.EventArgs args) - { - sender.Label = "Clicked!"; - } - } -} diff --git a/Samples/Gtk3/CompositeTemplates/UsingSourceGenerator/CompositeWidget.ui b/Samples/Gtk3/CompositeTemplates/UsingSourceGenerator/CompositeWidget.ui deleted file mode 100644 index 34dcb1804..000000000 --- a/Samples/Gtk3/CompositeTemplates/UsingSourceGenerator/CompositeWidget.ui +++ /dev/null @@ -1,17 +0,0 @@ - - - - - \ No newline at end of file diff --git a/Samples/Gtk3/CompositeTemplates/UsingSourceGenerator/Program.cs b/Samples/Gtk3/CompositeTemplates/UsingSourceGenerator/Program.cs deleted file mode 100644 index ac817c768..000000000 --- a/Samples/Gtk3/CompositeTemplates/UsingSourceGenerator/Program.cs +++ /dev/null @@ -1,32 +0,0 @@ -using System; -using Gtk; -using Global = Gtk.Global; -using Object = GObject.Object; - -namespace GtkDemo -{ - /// - /// Minimalist demo program demonstrating the GTK templating system - /// - public static class Program - { - #region Methods - - public static void Main(string[] args) - { - Global.Init(); - - var mainWindow = new Window("MyWindow") - { - DefaultWidth = 300, - DefaultHeight = 200, - Child = new CompositeWidget(), - [Window.DestroySignal] = (o, e) => Global.MainQuit() - }; - - mainWindow.ShowAll(); - Global.Main(); - } - #endregion - } -} diff --git a/Samples/Gtk3/CompositeTemplates/UsingSourceGenerator/UsingSourceGenerator.csproj b/Samples/Gtk3/CompositeTemplates/UsingSourceGenerator/UsingSourceGenerator.csproj deleted file mode 100644 index a48bf9017..000000000 --- a/Samples/Gtk3/CompositeTemplates/UsingSourceGenerator/UsingSourceGenerator.csproj +++ /dev/null @@ -1,20 +0,0 @@ - - - Exe - net5.0 - enable - - - - - - - - - - - %(Filename)%(Extension) - - - - \ No newline at end of file diff --git a/Samples/Gtk3/GtkApp/GtkApp.csproj b/Samples/Gtk3/GtkApp/GtkApp.csproj deleted file mode 100644 index fec70c721..000000000 --- a/Samples/Gtk3/GtkApp/GtkApp.csproj +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - - - - - Exe - net5.0 - - - - - - %(Filename)%(Extension) - - - - - enable - - - diff --git a/Samples/Gtk3/GtkApp/MyBox.cs b/Samples/Gtk3/GtkApp/MyBox.cs deleted file mode 100644 index 2eef7e879..000000000 --- a/Samples/Gtk3/GtkApp/MyBox.cs +++ /dev/null @@ -1,20 +0,0 @@ -using Gtk; - -namespace GtkApp -{ - public class MyBox : Box - { - [Connect] - private Label Label1 = default!; - - [Connect] - private Label Label2 = default!; - - [Connect] - private Label Label3 = default!; - - public MyBox() : base("box.glade") - { - } - } -} diff --git a/Samples/Gtk3/GtkApp/MyWindow.cs b/Samples/Gtk3/GtkApp/MyWindow.cs deleted file mode 100644 index f36cee4c0..000000000 --- a/Samples/Gtk3/GtkApp/MyWindow.cs +++ /dev/null @@ -1,152 +0,0 @@ -using System; -using Gtk; -using Handy; -using WebKit2; - -namespace GtkApp -{ - public class MyWindow : ApplicationWindow - { - [Connect] - private Button Button = default!; - - [Connect] - private Box Box = default!; - - private Box innerBox = new MyBox(); - private Button button; - - private Image image; - private TextLabelExpander r; - private Revealer revealer; - - private SimpleCommand action; - private TextCombobox textCombobox; - private CheckButton checkButton; - private Notebook notebook; - private WebView webView; - private WebContext context; - private Paginator paginator; - private Label b; - - private GtkChamplain.Embed map; - - public MyWindow(Application application) : base(application, "ui.glade") - { - notebook = new Notebook(); - - button = new Button("Test"); - - button.Text.Value = "NEW TEXT"; - button.Clicked += (obj, args) => image.Clear(); - - image = new StockImage("folder", IconSize.Button); - - notebook.InsertPage("Image", image, 0); - notebook.InsertPage("Box", innerBox, 1); - - context = new WebContext(); - context.InitializeWebExtensions += OnInitializeWebExtension; - webView = new WebView(context); - - var settings = webView.GetSettings(); - settings.AllowModalDialogs.Value = true; - settings.EnableDeveloperExtras.Value = true; - - var ucm = webView.GetUserContentManager(); - var ret = ucm.RegisterScriptMessageHandler("foobar", JsCallback); - - if (ret) - { - const string code = @" - (function(globalContext) { - globalContext.document.getElementById(""clickMe"").onclick = function () - { - var message = { - myProp : ""5"", - }; - window.webkit.messageHandlers[""foobar""].postMessage(message); - }; - })(this) - - function test() { return 'test' } - "; - ucm.AddScript(new StringUserScript(code)); - } - - Console.WriteLine(System.IO.Directory.GetCurrentDirectory()); - webView.LoadUri("file:///home/marcel/Programmieren/csharp/gircore/gir.core/GtkApp/test.html"); - webView.HeightRequest.Value = 500; - webView.WidthRequest.Value = 500; - - paginator = new Paginator(); - paginator.AllowMouseDrag.Value = true; - paginator.Append(webView); - paginator.IndicatorStyle.Value = PaginatorIndicatorStyle.Lines; - - b = new Label("label"); - paginator.Append(b); - - map = new GtkChamplain.Embed(); - map.WidthRequest.Value = 500; - map.HeightRequest.Value = 500; - paginator.Append(map); - - notebook.InsertPage("Paginator", paginator, 2); - Box.Add(notebook); - - checkButton = new CheckButton("Check"); - checkButton.Toggled += (s, o) => Console.WriteLine("Toggled"); - Box.Add(checkButton); - - r = new TextLabelExpander("Te_st"); - r.UseMarkup.Value = true; - r.UseUnderline.Value = true; - - textCombobox = new TextCombobox("combobox.glade"); - textCombobox.AppendText("t3", "Test 3"); - textCombobox.AppendText("t4", "Test 4"); - - revealer = new Revealer(); - revealer.TransitionType.Value = RevealerTransitionType.Crossfade; - revealer.Add(textCombobox); - Box.Add(revealer); - - r.Add(new Label("test")); - Box.Add(r); - - action = new SimpleCommand((o) => Console.WriteLine("Do it!")); - application.AddAction("do", action); - } - - private void JsCallback(JavaScriptCore.Value value) - { - if (value.IsString()) - Console.WriteLine(value.GetString()); - - if (!value.IsObject()) - return; - - var p = value.GetProperty("myProp"); - Console.WriteLine(p.GetString()); - } - - private void OnInitializeWebExtension(object? sender, EventArgs args) - { - Console.WriteLine("INIT"); - Console.WriteLine(System.IO.Directory.GetCurrentDirectory()); - } - - private async void button_clicked(object obj, EventArgs args) - { - revealer.Reveal.Value = !revealer.Reveal.Value; - action.SetCanExecute(!action.CanExecute(default)); - - var inspector = webView.GetInspector(); - inspector.Show(); - - var value = await webView.RunJavascriptAsync("test()"); - Console.WriteLine(value.GetString()); - } - } -} diff --git a/Samples/Gtk3/GtkApp/Program.cs b/Samples/Gtk3/GtkApp/Program.cs deleted file mode 100644 index cebac7853..000000000 --- a/Samples/Gtk3/GtkApp/Program.cs +++ /dev/null @@ -1,50 +0,0 @@ -using System; -using Gtk; -using GtkClutter; - -namespace GtkApp -{ - public class Program - { - - public static void Main(string[] args) - { - var app = new Program(); - } - - public Program() - { - var app = new Application("org.GtkApp"); - app.InitClutter(); - app.Activate += OnActivate; - app.Startup += OnStartup; - app.Run(); - } - - private void OnStartup(object? sender, EventArgs args) - { - if (!(sender is Application app)) - return; - - var menu = new Menu("menu.glade"); - app.SetAppMenu(menu); - } - - private void OnActivate(object? sender, EventArgs args) - { - if (!(sender is Application app)) - return; - - var headerBar = new HeaderBar(); - headerBar.Title.Value = "Title"; - headerBar.Subtitle.Value = "Subtitle"; - headerBar.ShowCloseButton.Value = true; - - var w = new MyWindow(app); - w.DefaultHeight.Value = 800; - w.DefaultWidth.Value = 400; - w.SetTitlebar(headerBar); - w.ShowAll(); - } - } -} diff --git a/Samples/Gtk3/GtkApp/SimpleCommand.cs b/Samples/Gtk3/GtkApp/SimpleCommand.cs deleted file mode 100644 index b492a2550..000000000 --- a/Samples/Gtk3/GtkApp/SimpleCommand.cs +++ /dev/null @@ -1,28 +0,0 @@ -using System; -using System.Windows.Input; - -namespace GtkApp -{ - public class SimpleCommand : ICommand - { - public event EventHandler? CanExecuteChanged; - - private bool canExecute; - private readonly Action callback; - - public SimpleCommand(Action callback) - { - this.callback = callback ?? throw new ArgumentNullException(nameof(callback)); - } - - public bool CanExecute(object? parameter) => canExecute; - public void SetCanExecute(bool canExecute) - { - this.canExecute = canExecute; - OnCanExecuteChanged(); - } - - protected void OnCanExecuteChanged() => CanExecuteChanged?.Invoke(this, EventArgs.Empty); - public void Execute(object parameter) => callback(parameter); - } -} diff --git a/Samples/Gtk3/GtkApp/box.glade b/Samples/Gtk3/GtkApp/box.glade deleted file mode 100644 index b4e10d0a9..000000000 --- a/Samples/Gtk3/GtkApp/box.glade +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - True - False - vertical - - - True - False - Label 1 - - - False - True - 0 - - - - - True - False - Label 2 - - - False - True - 1 - - - - - True - False - Label 3 - - - False - True - 2 - - - - diff --git a/Samples/Gtk3/GtkApp/combobox.glade b/Samples/Gtk3/GtkApp/combobox.glade deleted file mode 100644 index ec6772425..000000000 --- a/Samples/Gtk3/GtkApp/combobox.glade +++ /dev/null @@ -1,9 +0,0 @@ - - - - - Test 1 - Test 2 - - - \ No newline at end of file diff --git a/Samples/Gtk3/GtkApp/menu.glade b/Samples/Gtk3/GtkApp/menu.glade deleted file mode 100644 index bb36ba20d..000000000 --- a/Samples/Gtk3/GtkApp/menu.glade +++ /dev/null @@ -1,18 +0,0 @@ - - - -
- - Do - app.do - -
-
- My section - - Do even more - app.domore - -
-
-
\ No newline at end of file diff --git a/Samples/Gtk3/GtkApp/test.html b/Samples/Gtk3/GtkApp/test.html deleted file mode 100644 index c9285038d..000000000 --- a/Samples/Gtk3/GtkApp/test.html +++ /dev/null @@ -1,13 +0,0 @@ - - - - abc - - - - Halloaa - - - - - \ No newline at end of file diff --git a/Samples/Gtk3/GtkApp/ui.glade b/Samples/Gtk3/GtkApp/ui.glade deleted file mode 100644 index 3b69b0a57..000000000 --- a/Samples/Gtk3/GtkApp/ui.glade +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - False - My pretty window - - - - - - True - False - vertical - - - Button - True - True - True - - - - False - True - 0 - - - - - - - - - diff --git a/Samples/Gtk3/QuickStart/Program.cs b/Samples/Gtk3/QuickStart/Program.cs index 8db813358..33dff7a9a 100644 --- a/Samples/Gtk3/QuickStart/Program.cs +++ b/Samples/Gtk3/QuickStart/Program.cs @@ -1,5 +1,4 @@ using Gtk; -using Global = Gtk.Global; namespace GtkDemo { @@ -22,10 +21,10 @@ public static class Program // Entry Point public static void Main(string[] args) { - // We need to call Gtk.Global.Init() before using + // We need to call Gtk.Functions.Init() before using // any Gtk widgets or functions. If you use Gtk.Application, // this is done for you. - Global.Init(); + Functions.Init(); // Gir.Core supports Object Initialiser Syntax for every widget, // allowing for entire widget trees to be created using a nice, @@ -45,8 +44,8 @@ public static void Main(string[] args) [Notebook.SwitchPageSignal] = OnPageSwitched, // Add some widgets to the notebook - ["Page1"] = new Label("Hello C#"), - ["Page2"] = new Button("Open") + ["Page 0"] = Label.New("Hello C#"), + ["Page 1"] = new Button("Open") { // Register a callback for the button [Button.ClickedSignal] = OnOpenButtonClick, @@ -56,7 +55,7 @@ public static void Main(string[] args) // Setup our application to quit when the main // window is closed. We can use delegates as well as // ordinary methods for signal callbacks. - [Window.DestroySignal] = (o, e) => Global.MainQuit() + [Window.DestroySignal] = (o, e) => Functions.MainQuit() }; // Show our window. In Gtk3, widgets are hidden by default. @@ -67,7 +66,7 @@ public static void Main(string[] args) // Call Gtk.Global.Main() to start our application // main loop. The program will keep on running until // Gtk.Global.MainQuit() is called. - Global.Main(); + Functions.Main(); // Finally, clean up after ourselves and dispose of the // window widget. This is not required, but it is good diff --git a/Samples/Gtk4/SimpleWindow/Program.cs b/Samples/Gtk4/SimpleWindow/Program.cs deleted file mode 100644 index 2842b9901..000000000 --- a/Samples/Gtk4/SimpleWindow/Program.cs +++ /dev/null @@ -1,39 +0,0 @@ -using System; -using Gtk; - -namespace Gtk4Demo -{ - public class Program - { - public static void Main(string[] args) - { - var app = new Program(); - } - - public Program() - { - var app = new Application("org.gircore.minimal"); - app.Activate += OnActivate; - app.Run(); - } - - private void OnActivate(object? sender, EventArgs args) - { - if(sender is Application app) - { - var w = new ApplicationWindow(app); - w.DefaultHeight.Value = 600; - w.DefaultWidth.Value = 800; - - var box = new Box(); - w.SetChild(box); - - var button = new Button("Hello Gtk4"); - button.Clicked += (sender, args) => Console.WriteLine("Hello dear user"); - - box.Append(button); - w.Show(); - } - } - } -} diff --git a/Samples/Gtk4/SimpleWindow/SimpleWindow.csproj b/Samples/Gtk4/SimpleWindow/SimpleWindow.csproj deleted file mode 100644 index 94a20c9b6..000000000 --- a/Samples/Gtk4/SimpleWindow/SimpleWindow.csproj +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - Exe - net5.0 - enable - - - From f56a94f88e3d623b5c429b8627006604e0ce95bb Mon Sep 17 00:00:00 2001 From: Matt Jakeman <12368711+mjakeman@users.noreply.github.com> Date: Mon, 7 Jun 2021 16:58:47 +1200 Subject: [PATCH 12/35] Rename Gstreamer.csproj to GStreamer.csproj --- Samples/GStreamer/{Gstreamer.csproj => GStreamer.csproj} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename Samples/GStreamer/{Gstreamer.csproj => GStreamer.csproj} (100%) diff --git a/Samples/GStreamer/Gstreamer.csproj b/Samples/GStreamer/GStreamer.csproj similarity index 100% rename from Samples/GStreamer/Gstreamer.csproj rename to Samples/GStreamer/GStreamer.csproj From 5336e7ec364259897fab5b51579da18305b16c96 Mon Sep 17 00:00:00 2001 From: Matthew Jakeman Date: Fri, 9 Jul 2021 22:31:34 +1200 Subject: [PATCH 13/35] Fix enum/bitfield generation - Avoid sizing errors by ensuring enums are always int-based (32-bits) - Determine whether to use a signed or unsigned int depending on the presence of a negative value - Perhaps clarify this with upstream? Seems to work reliably for now. --- Generator/Templates/enum.sbntxt | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/Generator/Templates/enum.sbntxt b/Generator/Templates/enum.sbntxt index fd470ae9d..de202851d 100644 --- a/Generator/Templates/enum.sbntxt +++ b/Generator/Templates/enum.sbntxt @@ -1,3 +1,19 @@ +{{~ +# We can assume enums are always 32-bits (clarify?). Therefore +# determine whether to use a signed or unsigned enum depending +# on the presence of a negative number. + +# By default, assume unsigned +enum_type = 'uint' + +for member in members + if member.value < 0 + # We have a negative number, so use signed type + enum_type = 'int' + end +end +~}} + using System; namespace {{ namespace.name }} @@ -5,7 +21,7 @@ namespace {{ namespace.name }} {{~ if has_flags ~}} [Flags] {{~ end ~}} - public enum {{ symbol_name }} : long + public enum {{ symbol_name }} : {{ enum_type }} { {{~ for member in members }} {{ include 'enum.member.sbntxt' member ~}} From 5f9fa529dc796a6c0207c9f02e1870ae39e6c365 Mon Sep 17 00:00:00 2001 From: Matthew Jakeman Date: Fri, 9 Jul 2021 22:52:22 +1200 Subject: [PATCH 14/35] Add TextEditor Demo - Adds a (mostly) functional text editor demo that reimplements the basic feature set of GtkTextView using a piece table. - Demonstrates custom drawing with cairo and event handling using GDK/Signals. --- GirCore.sln | 15 ++ Libs/Gtk-3.0/Classes/Window.cs | 5 + Libs/cairo-1.0/Records/FontExtents.cs | 5 +- .../Gtk3/TextEditor/Application/AppWindow.cs | 99 +++++++++ .../TextEditor/Application/DocumentView.cs | 171 ++++++++++++++++ .../Application/PieceTableDisplay.cs | 95 +++++++++ Samples/Gtk3/TextEditor/Document/Buffer.cs | 34 ++++ Samples/Gtk3/TextEditor/Document/Document.cs | 192 ++++++++++++++++++ Samples/Gtk3/TextEditor/Document/Node.cs | 41 ++++ .../Gtk3/TextEditor/Document/PieceTable.cs | 162 +++++++++++++++ Samples/Gtk3/TextEditor/README.md | 4 + 11 files changed, 822 insertions(+), 1 deletion(-) create mode 100644 Samples/Gtk3/TextEditor/Application/AppWindow.cs create mode 100644 Samples/Gtk3/TextEditor/Application/DocumentView.cs create mode 100644 Samples/Gtk3/TextEditor/Application/PieceTableDisplay.cs create mode 100644 Samples/Gtk3/TextEditor/Document/Buffer.cs create mode 100644 Samples/Gtk3/TextEditor/Document/Document.cs create mode 100644 Samples/Gtk3/TextEditor/Document/Node.cs create mode 100644 Samples/Gtk3/TextEditor/Document/PieceTable.cs create mode 100644 Samples/Gtk3/TextEditor/README.md diff --git a/GirCore.sln b/GirCore.sln index 578f5962c..3decc5d3c 100644 --- a/GirCore.sln +++ b/GirCore.sln @@ -81,6 +81,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "QuickStart", "Samples\Gtk3\ EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Window", "Samples\Gtk3\Window\Window.csproj", "{BEE19955-275A-4242-B1AF-402AD3C7C5F9}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TextEditor", "Samples\Gtk3\TextEditor\TextEditor.csproj", "{2545756F-264A-4815-9569-2005F940649D}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -499,6 +501,18 @@ Global {BEE19955-275A-4242-B1AF-402AD3C7C5F9}.Release|x64.Build.0 = Release|Any CPU {BEE19955-275A-4242-B1AF-402AD3C7C5F9}.Release|x86.ActiveCfg = Release|Any CPU {BEE19955-275A-4242-B1AF-402AD3C7C5F9}.Release|x86.Build.0 = Release|Any CPU + {2545756F-264A-4815-9569-2005F940649D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2545756F-264A-4815-9569-2005F940649D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2545756F-264A-4815-9569-2005F940649D}.Debug|x64.ActiveCfg = Debug|Any CPU + {2545756F-264A-4815-9569-2005F940649D}.Debug|x64.Build.0 = Debug|Any CPU + {2545756F-264A-4815-9569-2005F940649D}.Debug|x86.ActiveCfg = Debug|Any CPU + {2545756F-264A-4815-9569-2005F940649D}.Debug|x86.Build.0 = Debug|Any CPU + {2545756F-264A-4815-9569-2005F940649D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2545756F-264A-4815-9569-2005F940649D}.Release|Any CPU.Build.0 = Release|Any CPU + {2545756F-264A-4815-9569-2005F940649D}.Release|x64.ActiveCfg = Release|Any CPU + {2545756F-264A-4815-9569-2005F940649D}.Release|x64.Build.0 = Release|Any CPU + {2545756F-264A-4815-9569-2005F940649D}.Release|x86.ActiveCfg = Release|Any CPU + {2545756F-264A-4815-9569-2005F940649D}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -536,6 +550,7 @@ Global {40C9EB86-CF4E-45D9-BEF7-E89913171D86} = {A7AB8BFE-B16D-4D52-94AD-37697E04DB64} {DE554FAE-B638-4C39-B4F9-0D4FFB0F9027} = {A7AB8BFE-B16D-4D52-94AD-37697E04DB64} {BEE19955-275A-4242-B1AF-402AD3C7C5F9} = {A7AB8BFE-B16D-4D52-94AD-37697E04DB64} + {2545756F-264A-4815-9569-2005F940649D} = {A7AB8BFE-B16D-4D52-94AD-37697E04DB64} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {74194C06-3799-4AF4-A216-76FC390CA67E} diff --git a/Libs/Gtk-3.0/Classes/Window.cs b/Libs/Gtk-3.0/Classes/Window.cs index 59ffe8dd1..8c8704b5d 100644 --- a/Libs/Gtk-3.0/Classes/Window.cs +++ b/Libs/Gtk-3.0/Classes/Window.cs @@ -12,5 +12,10 @@ public Window(string title) : this(ConstructArgument.With("title", title)) { } + + public void SetInteractiveDebugging(bool enable) + { + Native.Window.Instance.Methods.SetInteractiveDebugging(enable); + } } } diff --git a/Libs/cairo-1.0/Records/FontExtents.cs b/Libs/cairo-1.0/Records/FontExtents.cs index e00462975..303de6b8c 100644 --- a/Libs/cairo-1.0/Records/FontExtents.cs +++ b/Libs/cairo-1.0/Records/FontExtents.cs @@ -1,5 +1,8 @@ -namespace cairo +using System.Runtime.InteropServices; + +namespace cairo { + [StructLayout(LayoutKind.Sequential)] public struct FontExtents { public double Ascent; diff --git a/Samples/Gtk3/TextEditor/Application/AppWindow.cs b/Samples/Gtk3/TextEditor/Application/AppWindow.cs new file mode 100644 index 000000000..a6914dc0e --- /dev/null +++ b/Samples/Gtk3/TextEditor/Application/AppWindow.cs @@ -0,0 +1,99 @@ +using System; +using Gtk; + +namespace TextEditor.Application +{ + using Document; + + public class AppWindow : Gtk.ApplicationWindow + { + const string WindowTitle = "Editor"; + + private Paned contentPaned; + private Entry insertEntry; + private SpinButton spinButton; + private DocumentView documentView; + + public Document Document { get; set; } + + public AppWindow() + { + this.DefaultWidth = 800; + this.DefaultHeight = 600; + + // Create UI + var headerBar = HeaderBar.New(); + headerBar.ShowCloseButton = true; + headerBar.Title = WindowTitle; + this.SetTitlebar(headerBar); + this.SetDecorated(true); + + // About Dialog Button + var aboutButton = new Button("About"); + aboutButton.Image = Image.NewFromIconName("dialog-information-symbolic", IconSize.Button); + aboutButton.AlwaysShowImage = true; + aboutButton.OnClicked += (_, _) => + { + // This is implemented in the 'AboutDialog' sample. You can + // safely substitute it for the built-in GTK AboutDialog. + var dlg = new AboutDialog.SampleDialog("Text Editor"); + + dlg.SetTransientFor(this); + dlg.SetModal(true); + dlg.Present(); + }; + headerBar.PackEnd(aboutButton); + + // Inspector Button + var inspectButton = new Button("Inspector"); + inspectButton.Image = Image.NewFromIconName("edit-find-symbolic", IconSize.Button); + inspectButton.AlwaysShowImage = true; + inspectButton.OnClicked += (_, _) => + { + SetInteractiveDebugging(true); + }; + headerBar.PackEnd(inspectButton); + + // Main Content Pane + contentPaned = Paned.New(Orientation.Vertical); + this.Child = contentPaned; + + // Start by creating a document + Document = Document.NewFromString("The quick brown fox jumps over the lazy dog."); + documentView = new DocumentView(Document); + + var display = new PieceTableDisplay(Document); + + // Paned + contentPaned.Add1(documentView); + contentPaned.Add2(display); + contentPaned.Position = 400; + + // Set visible + headerBar.ShowAll(); + contentPaned.ShowAll(); + } + + void UpdateCursor() + { + var value = Math.Clamp((int)spinButton.GetValue(), 0, Int32.MaxValue-1); + documentView.SetCursorIndex(value); + } + + void Insert(Button button, EventArgs args) + { + var index = spinButton.GetValue(); + var text = insertEntry.GetText(); + Document.Insert((int)index, text); + + // Move cursor to end of insertion + spinButton.Value += text.Length; + } + + void Delete(Button button, EventArgs args) + { + var index = (int)spinButton.GetValue(); + Document.Delete(index, 1); + } + } +} diff --git a/Samples/Gtk3/TextEditor/Application/DocumentView.cs b/Samples/Gtk3/TextEditor/Application/DocumentView.cs new file mode 100644 index 000000000..8663d4c7d --- /dev/null +++ b/Samples/Gtk3/TextEditor/Application/DocumentView.cs @@ -0,0 +1,171 @@ +using System; +using System.Text; +using System.Diagnostics; +using Gtk; + +using cairo; +using Gdk; +using Pango; + +namespace TextEditor.Application +{ + using Document; + + public class DocumentView : Gtk.Bin + { + private Document doc; + private int cursorIndex; + + private string cachedText; + + private EventBox eventBox; + + private DrawingArea area; + + private IMContext context; + + public DocumentView(Document document) + { + // Setup IMContext + context = IMContextSimple.New(); + context.OnCommit += OnEnterText; + + // Add event box to catch keyboard input + eventBox = EventBox.New(); + eventBox.OnKeyPressEvent += OnKeydown; + eventBox.CanFocus = true; + eventBox.OnRealize += (o, e) => context.SetClientWindow(eventBox.GetWindow()); + Child = eventBox; + + // Drawing area to display rich text + area = DrawingArea.New(); + area.OnDraw += Render; + eventBox.Child = area; + + // Load data + SetDocument(document); + + ShowAll(); + } + + public void SetDocument(Document document) + { + doc = document; + doc.DocumentChanged += OnDocumentChanged; + + UpdateCache(); + Redraw(); + + cursorIndex = 0; + } + + public void SetCursorIndex(int index) + { + cursorIndex = Math.Clamp(index, 0, cachedText.Length); + Redraw(); + } + + public void CloseDocument() + { + doc = null; + cursorIndex = 0; + cachedText = null; + } + + private void OnDocumentChanged(object sender, EventArgs e) + { + // The document has been modified - redraw + // TODO: Redraw the currently on-screen section only + Debug.Assert(sender == doc); + UpdateCache(); + Redraw(); + } + + private void OnKeydown(object sender, KeyPressEventSignalArgs e) + { + Console.WriteLine("Keydown " + e.@event.Keyval); + + var keyVal = e.@event.Keyval; + + if (keyVal == Gdk.Constants.KEY_Left) + { + cursorIndex = Math.Clamp(cursorIndex - 1, 0, cachedText.Length); + Redraw(); + } + else if (keyVal == Gdk.Constants.KEY_Right) + { + cursorIndex = Math.Clamp(cursorIndex + 1, 0, cachedText.Length); + Redraw(); + } + else if (keyVal == Gdk.Constants.KEY_BackSpace) + doc.Delete(Math.Clamp(cursorIndex - 1, 0, cachedText.Length), 1); + else + context.FilterKeypress(e.@event); // Check result? + } + + private void OnEnterText(object sender, IMContext.CommitSignalArgs e) + { + doc.Insert(cursorIndex, e.Str); + cursorIndex += e.Str.Length; + } + + private void UpdateCache() + { + var builder = new StringBuilder(); + + // Assemble the document + foreach (Node textSpan in doc.Contents) + builder.Append(doc.RenderNode(textSpan)); + + cachedText = builder.ToString(); + } + + private void Redraw() + { + // textLayout.LabelProp = cachedText.Insert(cursorIndex, "|"); + area.QueueDraw(); + } + + private void Render(object sender, DrawingArea.DrawSignalArgs e) + { + Debug.Assert(area == sender); + + int xDist = 30; + int yDist = 100; + + cairo.Context cr = e.Cr; + + // Fill background + cr.SetSourceRgba(1,1,1,1); + cr.Rectangle(0, 0, GetAllocatedWidth(), GetAllocatedHeight()); + cr.Fill(); + + // Write Info Text + cr.SetSourceRgba(0,0,0,1.0); + cr.MoveTo(xDist, 30); + cr.ShowText("This sample uses Cairo and a Gtk.DrawingArea to create a simple 'TextView' clone."); + cr.MoveTo(xDist, 50); + cr.ShowText("Use the LEFT and RIGHT arrow keys to navigate. Press BACKSPACE to delete."); + + // Draw Cursor + cr.SetFontSize(16); + + cr.TextExtents(cachedText, out TextExtents lineExtents); + var height = lineExtents.height; + + cr.TextExtents(cachedText.Substring(0, cursorIndex), out TextExtents cursorExtents); + var xPos = cursorExtents.width; + + cr.FontExtents(out FontExtents fontExtents); + + cr.SetSourceRgba(1.0, 0, 0, 1.0); + cr.Rectangle(xDist + cursorExtents.xAdvance - 0.5, yDist + fontExtents.Descent, 1, -(fontExtents.Descent + fontExtents.Ascent)); + cr.Fill(); + + // Draw Text from Buffer + cr.MoveTo(xDist, yDist); + cr.SetSourceRgba(0, 0, 0, 1.0); + cr.ShowText(cachedText); + } + } +} diff --git a/Samples/Gtk3/TextEditor/Application/PieceTableDisplay.cs b/Samples/Gtk3/TextEditor/Application/PieceTableDisplay.cs new file mode 100644 index 000000000..b412b7dcc --- /dev/null +++ b/Samples/Gtk3/TextEditor/Application/PieceTableDisplay.cs @@ -0,0 +1,95 @@ +using cairo; +using Gtk; + +namespace TextEditor.Application +{ + using Document; + + public class PieceTableDisplay : Bin + { + private Document doc; + private DrawingArea drawingArea; + public PieceTableDisplay(Document document) + { + doc = document; + doc.DocumentChanged += (_,_) => QueueDraw(); + + drawingArea = DrawingArea.New(); + drawingArea.OnDraw += Render; + Child = drawingArea; + ShowAll(); + } + + private void Render(object sender, DrawSignalArgs args) + { + Context cr = args.Cr; + + double xPos = 40; + double yPos = 120; + int padding = 5; + + RenderHeading(cr, xPos); + + cr.FontExtents(out FontExtents fontExtents); + cr.SetFontSize(14); + + double position = xPos; + foreach (Node node in doc.Contents) + { + // Get text for node + string text = doc.RenderNode(node); + + // DRAW: Buffer Rectangle + cr.MoveTo(position, yPos); + + cr.TextExtents(text, out TextExtents lineExtents); + var length = lineExtents.xAdvance; + var height = fontExtents.Height; + + // Set colour + if (node.location == BufferType.File) + cr.SetSourceRgba(1, 0, 0, 1); + else + cr.SetSourceRgba(0, 0, 1, 1); + + cr.Rectangle(position, yPos + fontExtents.Descent, length, height); + cr.Fill(); + + // DRAW: Buffer Text + cr.MoveTo(position, yPos); + cr.SetSourceRgba(0,0,0,1); + cr.ShowText(text); + + // Move to next position - TODO: line wrap? + position += length + padding; + } + } + + private void RenderHeading(Context cr, double xPos) + { + cr.MoveTo(xPos, 30); + cr.SetFontSize(16); + cr.ShowText("Piece Table Visualisation"); + + // Red Square + cr.SetSourceRgba(1,0,0,1); + cr.Rectangle(xPos, 50, 10, -10); + cr.Fill(); + + // Blue Square + cr.SetSourceRgba(0,0,1,1); + cr.Rectangle(xPos, 70, 10, -10); + cr.Fill(); + + // Labels + cr.SetFontSize(10); + cr.SetSourceRgba(0,0,0,1); + + cr.MoveTo(xPos + 12, 50); + cr.ShowText("File Buffer"); + + cr.MoveTo(xPos + 12, 70); + cr.ShowText("Add Buffer"); + } + } +} diff --git a/Samples/Gtk3/TextEditor/Document/Buffer.cs b/Samples/Gtk3/TextEditor/Document/Buffer.cs new file mode 100644 index 000000000..56cbf7c16 --- /dev/null +++ b/Samples/Gtk3/TextEditor/Document/Buffer.cs @@ -0,0 +1,34 @@ +using System; +using System.IO; +using System.Text; +using System.Collections.Generic; + +namespace TextEditor.Document +{ + public abstract class Buffer + { + protected string _data = string.Empty; + + public string GetString(int index, int length) + => _data.Substring(index, length); + } + + public class ReadOnlyBuffer : Buffer + { + public ReadOnlyBuffer(string initData) + => _data = initData; + } + + public class AppendBuffer : Buffer + { + public AppendBuffer() {} + + public int Append(string text) + { + var index = _data.Length; + _data += text; + + return index; + } + } +} diff --git a/Samples/Gtk3/TextEditor/Document/Document.cs b/Samples/Gtk3/TextEditor/Document/Document.cs new file mode 100644 index 000000000..3a4e5f69a --- /dev/null +++ b/Samples/Gtk3/TextEditor/Document/Document.cs @@ -0,0 +1,192 @@ +using System; +using System.IO; +using System.Text; +using System.Collections.Generic; + +namespace TextEditor.Document +{ + /// + /// A document is a representation of one single text buffer. It + /// may be up to 2GB in size (approximately 1 billion characters), + /// which is the maximum limit of the C# String data type. + /// + public class Document + { + // See: https://web.archive.org/web/20180223071931/https://www.cs.unm.edu/~crowley/papers/sds.pdf + // This paper demonstrates the piece-table based data structure used to store the + // document's text and subsequent modifications. + + public IEnumerable Contents => pieceTable; + + public event EventHandler DocumentChanged = default!; + + + private PieceTable pieceTable; + private ReadOnlyBuffer fileBuffer; + private AppendBuffer addBuffer; + + private (Node desc, int baseIndex) FromIndex(int index) + { + if (index < 0) + throw new ArgumentOutOfRangeException(); + + var curIndex = 0; + + foreach (Node span in pieceTable) + { + curIndex += span.length; + + if (curIndex > index) + return (span, curIndex - span.length); + } + + // We might be the final element -> in which case, create a new descriptor? + + return (null, -1); // throw new IndexOutOfRangeException(); + } + + private Buffer GetBufferForNode(Node span) + => span.location == BufferType.Add + ? addBuffer + : fileBuffer; + + public string RenderNode(Node span) + => GetBufferForNode(span).GetString(span.offset, span.length); + + public string GetContents() + { + var builder = new StringBuilder(); + + foreach (Node piece in pieceTable) + builder.Append(RenderNode(piece)); + + return builder.ToString(); + } + + private Node CreateSpan(string text) + { + var index = addBuffer.Append(text); + return new Node(BufferType.Add, index, text.Length); + } + + public void Insert(int index, string text) + { + if (string.IsNullOrEmpty(text)) + return; + + if (index < 0) + throw new IndexOutOfRangeException(); + + // Create a new entry into the add buffer + var insertSpan = CreateSpan(text); + + // Find the piece which contains the cursor index + var (currentSpan, baseIndex) = FromIndex(index); + + + // Case 1: If the current span is null, append to the end + // of the document and return. + if (currentSpan == null) + { + pieceTable.AddLast(insertSpan); + DocumentChanged(this, EventArgs.Empty); + return; + } + + // Case 2: If we are at the start boundary, we can simply + // insert at the beginning and return. // TODO: Multiple insertions + if (index - baseIndex == 0) + { + pieceTable.AddBefore(currentSpan, insertSpan); + DocumentChanged(this, EventArgs.Empty); + return; + } + + // Case 3: We split the current span into three. The contents of the + // span up to the insertion point, the insertion itself, and + // the remainder of the span after the insertion. + + // Find the index at which to split, relative to the + // start of the current piece. + var insertionOffset = index - baseIndex; + + // We have one piece |current| + var startLength = insertionOffset; + var endLength = currentSpan.length - startLength; + + // Split into |start| |end| + var startSpan = new Node(currentSpan.location, currentSpan.offset, startLength); + var endSpan = new Node(currentSpan.location, currentSpan.offset + insertionOffset, endLength); + + // Insert so we have three pieces: |start| |insertion| |end| + pieceTable.AddAfter(currentSpan, endSpan); + pieceTable.AddAfter(currentSpan, insertSpan); + pieceTable.Replace(currentSpan, startSpan); + + DocumentChanged(this, EventArgs.Empty); + } + + public void Delete(int index, int length) + { + var (deleteStartDesc, deleteStartNodeBaseIndex) = FromIndex(index); + + // Cannot delete from the end of the sequence + if (deleteStartDesc == null) + return; + + if (length < deleteStartDesc.length) + { + var internalOffset = index - deleteStartNodeBaseIndex; + if (internalOffset == 0) + { + // Simple case + var newLength = (deleteStartDesc.length - length); + var newOffset = deleteStartDesc.offset + length; + pieceTable.Replace(deleteStartDesc, new Node(deleteStartDesc.location, newOffset, newLength)); + } + else + { + // Split into two + + // Create new + var newLength = deleteStartDesc.length - length - internalOffset; + var addOffset = addBuffer.Append(GetBufferForNode(deleteStartDesc).GetString(internalOffset + length, newLength)); + var newDesc = new Node(BufferType.Add, addOffset, newLength); + pieceTable.AddAfter(deleteStartDesc, newDesc); + + // Resize original + var resizeLength = internalOffset; + pieceTable.Replace(deleteStartDesc, new Node(deleteStartDesc.location, deleteStartDesc.offset, resizeLength)); + } + } + else + { + // Complex case - not supported yet + throw new NotImplementedException("Cannot delete across piece boundaries yet"); + } + + // Emit document-changed event + DocumentChanged(this, EventArgs.Empty); + } + + private Document(string data) + { + // Initialise + fileBuffer = new ReadOnlyBuffer(data); + addBuffer = new AppendBuffer(); + pieceTable = new(); + + pieceTable.AddFirst(new Node(BufferType.File, 0, data.Length)); + } + + public static Document New() => new Document(string.Empty); + public static Document NewFromString(string data) => new Document(data); + + public static Document NewFromFile(FileInfo fileInfo) + { + var contents = fileInfo.OpenRead().ToString(); + + return new Document(contents); + } + } +} diff --git a/Samples/Gtk3/TextEditor/Document/Node.cs b/Samples/Gtk3/TextEditor/Document/Node.cs new file mode 100644 index 000000000..0ffa7954c --- /dev/null +++ b/Samples/Gtk3/TextEditor/Document/Node.cs @@ -0,0 +1,41 @@ +using System; +using System.IO; +using System.Text; +using System.Collections.Generic; + +namespace TextEditor.Document +{ + public enum BufferType : byte + { + // For guard nodes + None, + + // Original file buffer + File, + + // Append-only add buffer + Add + }; + + // Also called: Span, Piece, Descriptor, etc + public class Node + { + internal Node? Next { get; set; } + + internal Node? Prev { get; set; } + + internal BufferType location { get; init; } + internal int offset { get; init; } + internal int length { get; init; } + + public Node(BufferType location, int offset, int length) + { + this.location = location; + this.offset = offset; + this.length = length; + } + + internal static Node CreateGuardNode() + => new Node(BufferType.None, 0, 0); + } +} diff --git a/Samples/Gtk3/TextEditor/Document/PieceTable.cs b/Samples/Gtk3/TextEditor/Document/PieceTable.cs new file mode 100644 index 000000000..3a22ac675 --- /dev/null +++ b/Samples/Gtk3/TextEditor/Document/PieceTable.cs @@ -0,0 +1,162 @@ +using System; +using System.IO; +using System.Text; +using System.Collections; +using System.Collections.Generic; +using System.Diagnostics; + +namespace TextEditor.Document +{ + internal class PieceTable : IEnumerable + { + // TODO: Using Find() is O(n) -> We should store the information in the descriptor + // itself and avoid lookup entirely. Consider using a custom LinkedList implementation. + + // See: https://www.catch22.net/tuts/piece-chains + // Also: https://code.visualstudio.com/blogs/2018/03/23/text-buffer-reimplementation + + // These two are "sentinel" nodes which + // do not store or point to data + private readonly Node head; + private readonly Node tail; + + internal class BoundaryException : Exception {} + + public PieceTable() + { + head = Node.CreateGuardNode(); + tail = Node.CreateGuardNode(); + + head.Next = tail; + tail.Prev = head; + } + + private void CheckGuardNode(Node node) + { + if (node == head || node == tail) + throw new BoundaryException(); + } + + public void AddAfter(Node current, Node insert) + { + CheckGuardNode(current); + CheckGuardNode(insert); + + // [Current] [After] -> [Current] [Insert] [After] + + Node after = current.Next; + + insert.Next = after; + insert.Prev = current; + + current.Next = insert; + after!.Prev = insert; + } + + public void AddBefore(Node current, Node insert) + { + CheckGuardNode(current); + CheckGuardNode(insert); + + // [Before] [Current] -> [Before] [Insert] [Current] + + Node before = current.Prev; + + insert.Prev = before; + insert.Next = current; + + before!.Next = insert; + current.Prev = insert; + } + + public void AddFirst(Node insert) + { + CheckGuardNode(insert); + + // [Head Sentinel] [After] -> [Head Sentinel] [Insert] [After] + + Node after = head.Next; + + insert.Next = after; + insert.Prev = head; + + head.Next = insert; + after!.Prev = insert; + } + + public void AddLast(Node insert) + { + CheckGuardNode(insert); + + // [Before] [Tail Sentinel] -> [Before] [Insert] [Tail Sentinel] + + Node before = tail.Prev; + + insert.Next = tail; + insert.Prev = before; + + tail.Prev = insert; + before!.Next = insert; + } + + public void Replace(Node old, Node replace) + { + CheckGuardNode(old); + CheckGuardNode(replace); + + // [Before] [Old] [After] -> [Before] [Replace] [After] + + Node before = old.Prev; + Node after = old.Next; + + replace.Prev = before; + replace.Next = after; + + before!.Next = replace; + after!.Prev = replace; + } + + public void Remove(Node remove) + { + CheckGuardNode(remove); + + // [Before] [Remove] [After] -> [Before] [After] + + Node before = remove.Prev; + Node after = remove.Next; + + before!.Next = after; + after!.Prev = before; + } + + // Implement IEnumerable + public IEnumerator GetEnumerator() + { + var nodes = new List(); + var cur = head; + while (cur != null) + { + nodes.Add(cur); + cur = cur.Next; + + // We have traversed the entire list + if (cur == null) + break; + + // Check for broken linked list -> Abort + Debug.Assert( + condition: cur.Prev != null, + message: "Linked list has missing previous element. It may be broken" + ); + } + + nodes.Remove(head); + nodes.Remove(tail); + + return nodes.GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + => GetEnumerator(); + } +} diff --git a/Samples/Gtk3/TextEditor/README.md b/Samples/Gtk3/TextEditor/README.md new file mode 100644 index 000000000..4f55d2787 --- /dev/null +++ b/Samples/Gtk3/TextEditor/README.md @@ -0,0 +1,4 @@ +# TextEditor Demo +A more complex sample demonstrating how GTK and Cairo can be used +together to create a simple re-implementation of GtkTextView from +scratch. \ No newline at end of file From 820d668874f82ee0e4a8d298ca6c33c22c5ea962 Mon Sep 17 00:00:00 2001 From: Matthew Jakeman Date: Fri, 9 Jul 2021 22:52:22 +1200 Subject: [PATCH 15/35] Add TextEditor Demo - Adds a (mostly) functional text editor demo that reimplements the basic feature set of GtkTextView using a piece table. - Demonstrates custom drawing with cairo and event handling using GDK/Signals. --- GirCore.sln | 15 ++ Libs/Gtk-3.0/Classes/Window.cs | 5 + Libs/cairo-1.0/Records/FontExtents.cs | 5 +- .../Gtk3/TextEditor/Application/AppWindow.cs | 99 +++++++++ .../TextEditor/Application/DocumentView.cs | 171 ++++++++++++++++ .../Application/PieceTableDisplay.cs | 95 +++++++++ Samples/Gtk3/TextEditor/Document/Buffer.cs | 34 ++++ Samples/Gtk3/TextEditor/Document/Document.cs | 192 ++++++++++++++++++ Samples/Gtk3/TextEditor/Document/Node.cs | 41 ++++ .../Gtk3/TextEditor/Document/PieceTable.cs | 162 +++++++++++++++ Samples/Gtk3/TextEditor/Program.cs | 29 +++ Samples/Gtk3/TextEditor/README.md | 4 + Samples/Gtk3/TextEditor/TextEditor.csproj | 13 ++ 13 files changed, 864 insertions(+), 1 deletion(-) create mode 100644 Samples/Gtk3/TextEditor/Application/AppWindow.cs create mode 100644 Samples/Gtk3/TextEditor/Application/DocumentView.cs create mode 100644 Samples/Gtk3/TextEditor/Application/PieceTableDisplay.cs create mode 100644 Samples/Gtk3/TextEditor/Document/Buffer.cs create mode 100644 Samples/Gtk3/TextEditor/Document/Document.cs create mode 100644 Samples/Gtk3/TextEditor/Document/Node.cs create mode 100644 Samples/Gtk3/TextEditor/Document/PieceTable.cs create mode 100644 Samples/Gtk3/TextEditor/Program.cs create mode 100644 Samples/Gtk3/TextEditor/README.md create mode 100644 Samples/Gtk3/TextEditor/TextEditor.csproj diff --git a/GirCore.sln b/GirCore.sln index 578f5962c..3decc5d3c 100644 --- a/GirCore.sln +++ b/GirCore.sln @@ -81,6 +81,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "QuickStart", "Samples\Gtk3\ EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Window", "Samples\Gtk3\Window\Window.csproj", "{BEE19955-275A-4242-B1AF-402AD3C7C5F9}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TextEditor", "Samples\Gtk3\TextEditor\TextEditor.csproj", "{2545756F-264A-4815-9569-2005F940649D}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -499,6 +501,18 @@ Global {BEE19955-275A-4242-B1AF-402AD3C7C5F9}.Release|x64.Build.0 = Release|Any CPU {BEE19955-275A-4242-B1AF-402AD3C7C5F9}.Release|x86.ActiveCfg = Release|Any CPU {BEE19955-275A-4242-B1AF-402AD3C7C5F9}.Release|x86.Build.0 = Release|Any CPU + {2545756F-264A-4815-9569-2005F940649D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2545756F-264A-4815-9569-2005F940649D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2545756F-264A-4815-9569-2005F940649D}.Debug|x64.ActiveCfg = Debug|Any CPU + {2545756F-264A-4815-9569-2005F940649D}.Debug|x64.Build.0 = Debug|Any CPU + {2545756F-264A-4815-9569-2005F940649D}.Debug|x86.ActiveCfg = Debug|Any CPU + {2545756F-264A-4815-9569-2005F940649D}.Debug|x86.Build.0 = Debug|Any CPU + {2545756F-264A-4815-9569-2005F940649D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2545756F-264A-4815-9569-2005F940649D}.Release|Any CPU.Build.0 = Release|Any CPU + {2545756F-264A-4815-9569-2005F940649D}.Release|x64.ActiveCfg = Release|Any CPU + {2545756F-264A-4815-9569-2005F940649D}.Release|x64.Build.0 = Release|Any CPU + {2545756F-264A-4815-9569-2005F940649D}.Release|x86.ActiveCfg = Release|Any CPU + {2545756F-264A-4815-9569-2005F940649D}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -536,6 +550,7 @@ Global {40C9EB86-CF4E-45D9-BEF7-E89913171D86} = {A7AB8BFE-B16D-4D52-94AD-37697E04DB64} {DE554FAE-B638-4C39-B4F9-0D4FFB0F9027} = {A7AB8BFE-B16D-4D52-94AD-37697E04DB64} {BEE19955-275A-4242-B1AF-402AD3C7C5F9} = {A7AB8BFE-B16D-4D52-94AD-37697E04DB64} + {2545756F-264A-4815-9569-2005F940649D} = {A7AB8BFE-B16D-4D52-94AD-37697E04DB64} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {74194C06-3799-4AF4-A216-76FC390CA67E} diff --git a/Libs/Gtk-3.0/Classes/Window.cs b/Libs/Gtk-3.0/Classes/Window.cs index 59ffe8dd1..8c8704b5d 100644 --- a/Libs/Gtk-3.0/Classes/Window.cs +++ b/Libs/Gtk-3.0/Classes/Window.cs @@ -12,5 +12,10 @@ public Window(string title) : this(ConstructArgument.With("title", title)) { } + + public void SetInteractiveDebugging(bool enable) + { + Native.Window.Instance.Methods.SetInteractiveDebugging(enable); + } } } diff --git a/Libs/cairo-1.0/Records/FontExtents.cs b/Libs/cairo-1.0/Records/FontExtents.cs index e00462975..303de6b8c 100644 --- a/Libs/cairo-1.0/Records/FontExtents.cs +++ b/Libs/cairo-1.0/Records/FontExtents.cs @@ -1,5 +1,8 @@ -namespace cairo +using System.Runtime.InteropServices; + +namespace cairo { + [StructLayout(LayoutKind.Sequential)] public struct FontExtents { public double Ascent; diff --git a/Samples/Gtk3/TextEditor/Application/AppWindow.cs b/Samples/Gtk3/TextEditor/Application/AppWindow.cs new file mode 100644 index 000000000..a6914dc0e --- /dev/null +++ b/Samples/Gtk3/TextEditor/Application/AppWindow.cs @@ -0,0 +1,99 @@ +using System; +using Gtk; + +namespace TextEditor.Application +{ + using Document; + + public class AppWindow : Gtk.ApplicationWindow + { + const string WindowTitle = "Editor"; + + private Paned contentPaned; + private Entry insertEntry; + private SpinButton spinButton; + private DocumentView documentView; + + public Document Document { get; set; } + + public AppWindow() + { + this.DefaultWidth = 800; + this.DefaultHeight = 600; + + // Create UI + var headerBar = HeaderBar.New(); + headerBar.ShowCloseButton = true; + headerBar.Title = WindowTitle; + this.SetTitlebar(headerBar); + this.SetDecorated(true); + + // About Dialog Button + var aboutButton = new Button("About"); + aboutButton.Image = Image.NewFromIconName("dialog-information-symbolic", IconSize.Button); + aboutButton.AlwaysShowImage = true; + aboutButton.OnClicked += (_, _) => + { + // This is implemented in the 'AboutDialog' sample. You can + // safely substitute it for the built-in GTK AboutDialog. + var dlg = new AboutDialog.SampleDialog("Text Editor"); + + dlg.SetTransientFor(this); + dlg.SetModal(true); + dlg.Present(); + }; + headerBar.PackEnd(aboutButton); + + // Inspector Button + var inspectButton = new Button("Inspector"); + inspectButton.Image = Image.NewFromIconName("edit-find-symbolic", IconSize.Button); + inspectButton.AlwaysShowImage = true; + inspectButton.OnClicked += (_, _) => + { + SetInteractiveDebugging(true); + }; + headerBar.PackEnd(inspectButton); + + // Main Content Pane + contentPaned = Paned.New(Orientation.Vertical); + this.Child = contentPaned; + + // Start by creating a document + Document = Document.NewFromString("The quick brown fox jumps over the lazy dog."); + documentView = new DocumentView(Document); + + var display = new PieceTableDisplay(Document); + + // Paned + contentPaned.Add1(documentView); + contentPaned.Add2(display); + contentPaned.Position = 400; + + // Set visible + headerBar.ShowAll(); + contentPaned.ShowAll(); + } + + void UpdateCursor() + { + var value = Math.Clamp((int)spinButton.GetValue(), 0, Int32.MaxValue-1); + documentView.SetCursorIndex(value); + } + + void Insert(Button button, EventArgs args) + { + var index = spinButton.GetValue(); + var text = insertEntry.GetText(); + Document.Insert((int)index, text); + + // Move cursor to end of insertion + spinButton.Value += text.Length; + } + + void Delete(Button button, EventArgs args) + { + var index = (int)spinButton.GetValue(); + Document.Delete(index, 1); + } + } +} diff --git a/Samples/Gtk3/TextEditor/Application/DocumentView.cs b/Samples/Gtk3/TextEditor/Application/DocumentView.cs new file mode 100644 index 000000000..8663d4c7d --- /dev/null +++ b/Samples/Gtk3/TextEditor/Application/DocumentView.cs @@ -0,0 +1,171 @@ +using System; +using System.Text; +using System.Diagnostics; +using Gtk; + +using cairo; +using Gdk; +using Pango; + +namespace TextEditor.Application +{ + using Document; + + public class DocumentView : Gtk.Bin + { + private Document doc; + private int cursorIndex; + + private string cachedText; + + private EventBox eventBox; + + private DrawingArea area; + + private IMContext context; + + public DocumentView(Document document) + { + // Setup IMContext + context = IMContextSimple.New(); + context.OnCommit += OnEnterText; + + // Add event box to catch keyboard input + eventBox = EventBox.New(); + eventBox.OnKeyPressEvent += OnKeydown; + eventBox.CanFocus = true; + eventBox.OnRealize += (o, e) => context.SetClientWindow(eventBox.GetWindow()); + Child = eventBox; + + // Drawing area to display rich text + area = DrawingArea.New(); + area.OnDraw += Render; + eventBox.Child = area; + + // Load data + SetDocument(document); + + ShowAll(); + } + + public void SetDocument(Document document) + { + doc = document; + doc.DocumentChanged += OnDocumentChanged; + + UpdateCache(); + Redraw(); + + cursorIndex = 0; + } + + public void SetCursorIndex(int index) + { + cursorIndex = Math.Clamp(index, 0, cachedText.Length); + Redraw(); + } + + public void CloseDocument() + { + doc = null; + cursorIndex = 0; + cachedText = null; + } + + private void OnDocumentChanged(object sender, EventArgs e) + { + // The document has been modified - redraw + // TODO: Redraw the currently on-screen section only + Debug.Assert(sender == doc); + UpdateCache(); + Redraw(); + } + + private void OnKeydown(object sender, KeyPressEventSignalArgs e) + { + Console.WriteLine("Keydown " + e.@event.Keyval); + + var keyVal = e.@event.Keyval; + + if (keyVal == Gdk.Constants.KEY_Left) + { + cursorIndex = Math.Clamp(cursorIndex - 1, 0, cachedText.Length); + Redraw(); + } + else if (keyVal == Gdk.Constants.KEY_Right) + { + cursorIndex = Math.Clamp(cursorIndex + 1, 0, cachedText.Length); + Redraw(); + } + else if (keyVal == Gdk.Constants.KEY_BackSpace) + doc.Delete(Math.Clamp(cursorIndex - 1, 0, cachedText.Length), 1); + else + context.FilterKeypress(e.@event); // Check result? + } + + private void OnEnterText(object sender, IMContext.CommitSignalArgs e) + { + doc.Insert(cursorIndex, e.Str); + cursorIndex += e.Str.Length; + } + + private void UpdateCache() + { + var builder = new StringBuilder(); + + // Assemble the document + foreach (Node textSpan in doc.Contents) + builder.Append(doc.RenderNode(textSpan)); + + cachedText = builder.ToString(); + } + + private void Redraw() + { + // textLayout.LabelProp = cachedText.Insert(cursorIndex, "|"); + area.QueueDraw(); + } + + private void Render(object sender, DrawingArea.DrawSignalArgs e) + { + Debug.Assert(area == sender); + + int xDist = 30; + int yDist = 100; + + cairo.Context cr = e.Cr; + + // Fill background + cr.SetSourceRgba(1,1,1,1); + cr.Rectangle(0, 0, GetAllocatedWidth(), GetAllocatedHeight()); + cr.Fill(); + + // Write Info Text + cr.SetSourceRgba(0,0,0,1.0); + cr.MoveTo(xDist, 30); + cr.ShowText("This sample uses Cairo and a Gtk.DrawingArea to create a simple 'TextView' clone."); + cr.MoveTo(xDist, 50); + cr.ShowText("Use the LEFT and RIGHT arrow keys to navigate. Press BACKSPACE to delete."); + + // Draw Cursor + cr.SetFontSize(16); + + cr.TextExtents(cachedText, out TextExtents lineExtents); + var height = lineExtents.height; + + cr.TextExtents(cachedText.Substring(0, cursorIndex), out TextExtents cursorExtents); + var xPos = cursorExtents.width; + + cr.FontExtents(out FontExtents fontExtents); + + cr.SetSourceRgba(1.0, 0, 0, 1.0); + cr.Rectangle(xDist + cursorExtents.xAdvance - 0.5, yDist + fontExtents.Descent, 1, -(fontExtents.Descent + fontExtents.Ascent)); + cr.Fill(); + + // Draw Text from Buffer + cr.MoveTo(xDist, yDist); + cr.SetSourceRgba(0, 0, 0, 1.0); + cr.ShowText(cachedText); + } + } +} diff --git a/Samples/Gtk3/TextEditor/Application/PieceTableDisplay.cs b/Samples/Gtk3/TextEditor/Application/PieceTableDisplay.cs new file mode 100644 index 000000000..b412b7dcc --- /dev/null +++ b/Samples/Gtk3/TextEditor/Application/PieceTableDisplay.cs @@ -0,0 +1,95 @@ +using cairo; +using Gtk; + +namespace TextEditor.Application +{ + using Document; + + public class PieceTableDisplay : Bin + { + private Document doc; + private DrawingArea drawingArea; + public PieceTableDisplay(Document document) + { + doc = document; + doc.DocumentChanged += (_,_) => QueueDraw(); + + drawingArea = DrawingArea.New(); + drawingArea.OnDraw += Render; + Child = drawingArea; + ShowAll(); + } + + private void Render(object sender, DrawSignalArgs args) + { + Context cr = args.Cr; + + double xPos = 40; + double yPos = 120; + int padding = 5; + + RenderHeading(cr, xPos); + + cr.FontExtents(out FontExtents fontExtents); + cr.SetFontSize(14); + + double position = xPos; + foreach (Node node in doc.Contents) + { + // Get text for node + string text = doc.RenderNode(node); + + // DRAW: Buffer Rectangle + cr.MoveTo(position, yPos); + + cr.TextExtents(text, out TextExtents lineExtents); + var length = lineExtents.xAdvance; + var height = fontExtents.Height; + + // Set colour + if (node.location == BufferType.File) + cr.SetSourceRgba(1, 0, 0, 1); + else + cr.SetSourceRgba(0, 0, 1, 1); + + cr.Rectangle(position, yPos + fontExtents.Descent, length, height); + cr.Fill(); + + // DRAW: Buffer Text + cr.MoveTo(position, yPos); + cr.SetSourceRgba(0,0,0,1); + cr.ShowText(text); + + // Move to next position - TODO: line wrap? + position += length + padding; + } + } + + private void RenderHeading(Context cr, double xPos) + { + cr.MoveTo(xPos, 30); + cr.SetFontSize(16); + cr.ShowText("Piece Table Visualisation"); + + // Red Square + cr.SetSourceRgba(1,0,0,1); + cr.Rectangle(xPos, 50, 10, -10); + cr.Fill(); + + // Blue Square + cr.SetSourceRgba(0,0,1,1); + cr.Rectangle(xPos, 70, 10, -10); + cr.Fill(); + + // Labels + cr.SetFontSize(10); + cr.SetSourceRgba(0,0,0,1); + + cr.MoveTo(xPos + 12, 50); + cr.ShowText("File Buffer"); + + cr.MoveTo(xPos + 12, 70); + cr.ShowText("Add Buffer"); + } + } +} diff --git a/Samples/Gtk3/TextEditor/Document/Buffer.cs b/Samples/Gtk3/TextEditor/Document/Buffer.cs new file mode 100644 index 000000000..56cbf7c16 --- /dev/null +++ b/Samples/Gtk3/TextEditor/Document/Buffer.cs @@ -0,0 +1,34 @@ +using System; +using System.IO; +using System.Text; +using System.Collections.Generic; + +namespace TextEditor.Document +{ + public abstract class Buffer + { + protected string _data = string.Empty; + + public string GetString(int index, int length) + => _data.Substring(index, length); + } + + public class ReadOnlyBuffer : Buffer + { + public ReadOnlyBuffer(string initData) + => _data = initData; + } + + public class AppendBuffer : Buffer + { + public AppendBuffer() {} + + public int Append(string text) + { + var index = _data.Length; + _data += text; + + return index; + } + } +} diff --git a/Samples/Gtk3/TextEditor/Document/Document.cs b/Samples/Gtk3/TextEditor/Document/Document.cs new file mode 100644 index 000000000..3a4e5f69a --- /dev/null +++ b/Samples/Gtk3/TextEditor/Document/Document.cs @@ -0,0 +1,192 @@ +using System; +using System.IO; +using System.Text; +using System.Collections.Generic; + +namespace TextEditor.Document +{ + /// + /// A document is a representation of one single text buffer. It + /// may be up to 2GB in size (approximately 1 billion characters), + /// which is the maximum limit of the C# String data type. + /// + public class Document + { + // See: https://web.archive.org/web/20180223071931/https://www.cs.unm.edu/~crowley/papers/sds.pdf + // This paper demonstrates the piece-table based data structure used to store the + // document's text and subsequent modifications. + + public IEnumerable Contents => pieceTable; + + public event EventHandler DocumentChanged = default!; + + + private PieceTable pieceTable; + private ReadOnlyBuffer fileBuffer; + private AppendBuffer addBuffer; + + private (Node desc, int baseIndex) FromIndex(int index) + { + if (index < 0) + throw new ArgumentOutOfRangeException(); + + var curIndex = 0; + + foreach (Node span in pieceTable) + { + curIndex += span.length; + + if (curIndex > index) + return (span, curIndex - span.length); + } + + // We might be the final element -> in which case, create a new descriptor? + + return (null, -1); // throw new IndexOutOfRangeException(); + } + + private Buffer GetBufferForNode(Node span) + => span.location == BufferType.Add + ? addBuffer + : fileBuffer; + + public string RenderNode(Node span) + => GetBufferForNode(span).GetString(span.offset, span.length); + + public string GetContents() + { + var builder = new StringBuilder(); + + foreach (Node piece in pieceTable) + builder.Append(RenderNode(piece)); + + return builder.ToString(); + } + + private Node CreateSpan(string text) + { + var index = addBuffer.Append(text); + return new Node(BufferType.Add, index, text.Length); + } + + public void Insert(int index, string text) + { + if (string.IsNullOrEmpty(text)) + return; + + if (index < 0) + throw new IndexOutOfRangeException(); + + // Create a new entry into the add buffer + var insertSpan = CreateSpan(text); + + // Find the piece which contains the cursor index + var (currentSpan, baseIndex) = FromIndex(index); + + + // Case 1: If the current span is null, append to the end + // of the document and return. + if (currentSpan == null) + { + pieceTable.AddLast(insertSpan); + DocumentChanged(this, EventArgs.Empty); + return; + } + + // Case 2: If we are at the start boundary, we can simply + // insert at the beginning and return. // TODO: Multiple insertions + if (index - baseIndex == 0) + { + pieceTable.AddBefore(currentSpan, insertSpan); + DocumentChanged(this, EventArgs.Empty); + return; + } + + // Case 3: We split the current span into three. The contents of the + // span up to the insertion point, the insertion itself, and + // the remainder of the span after the insertion. + + // Find the index at which to split, relative to the + // start of the current piece. + var insertionOffset = index - baseIndex; + + // We have one piece |current| + var startLength = insertionOffset; + var endLength = currentSpan.length - startLength; + + // Split into |start| |end| + var startSpan = new Node(currentSpan.location, currentSpan.offset, startLength); + var endSpan = new Node(currentSpan.location, currentSpan.offset + insertionOffset, endLength); + + // Insert so we have three pieces: |start| |insertion| |end| + pieceTable.AddAfter(currentSpan, endSpan); + pieceTable.AddAfter(currentSpan, insertSpan); + pieceTable.Replace(currentSpan, startSpan); + + DocumentChanged(this, EventArgs.Empty); + } + + public void Delete(int index, int length) + { + var (deleteStartDesc, deleteStartNodeBaseIndex) = FromIndex(index); + + // Cannot delete from the end of the sequence + if (deleteStartDesc == null) + return; + + if (length < deleteStartDesc.length) + { + var internalOffset = index - deleteStartNodeBaseIndex; + if (internalOffset == 0) + { + // Simple case + var newLength = (deleteStartDesc.length - length); + var newOffset = deleteStartDesc.offset + length; + pieceTable.Replace(deleteStartDesc, new Node(deleteStartDesc.location, newOffset, newLength)); + } + else + { + // Split into two + + // Create new + var newLength = deleteStartDesc.length - length - internalOffset; + var addOffset = addBuffer.Append(GetBufferForNode(deleteStartDesc).GetString(internalOffset + length, newLength)); + var newDesc = new Node(BufferType.Add, addOffset, newLength); + pieceTable.AddAfter(deleteStartDesc, newDesc); + + // Resize original + var resizeLength = internalOffset; + pieceTable.Replace(deleteStartDesc, new Node(deleteStartDesc.location, deleteStartDesc.offset, resizeLength)); + } + } + else + { + // Complex case - not supported yet + throw new NotImplementedException("Cannot delete across piece boundaries yet"); + } + + // Emit document-changed event + DocumentChanged(this, EventArgs.Empty); + } + + private Document(string data) + { + // Initialise + fileBuffer = new ReadOnlyBuffer(data); + addBuffer = new AppendBuffer(); + pieceTable = new(); + + pieceTable.AddFirst(new Node(BufferType.File, 0, data.Length)); + } + + public static Document New() => new Document(string.Empty); + public static Document NewFromString(string data) => new Document(data); + + public static Document NewFromFile(FileInfo fileInfo) + { + var contents = fileInfo.OpenRead().ToString(); + + return new Document(contents); + } + } +} diff --git a/Samples/Gtk3/TextEditor/Document/Node.cs b/Samples/Gtk3/TextEditor/Document/Node.cs new file mode 100644 index 000000000..0ffa7954c --- /dev/null +++ b/Samples/Gtk3/TextEditor/Document/Node.cs @@ -0,0 +1,41 @@ +using System; +using System.IO; +using System.Text; +using System.Collections.Generic; + +namespace TextEditor.Document +{ + public enum BufferType : byte + { + // For guard nodes + None, + + // Original file buffer + File, + + // Append-only add buffer + Add + }; + + // Also called: Span, Piece, Descriptor, etc + public class Node + { + internal Node? Next { get; set; } + + internal Node? Prev { get; set; } + + internal BufferType location { get; init; } + internal int offset { get; init; } + internal int length { get; init; } + + public Node(BufferType location, int offset, int length) + { + this.location = location; + this.offset = offset; + this.length = length; + } + + internal static Node CreateGuardNode() + => new Node(BufferType.None, 0, 0); + } +} diff --git a/Samples/Gtk3/TextEditor/Document/PieceTable.cs b/Samples/Gtk3/TextEditor/Document/PieceTable.cs new file mode 100644 index 000000000..3a22ac675 --- /dev/null +++ b/Samples/Gtk3/TextEditor/Document/PieceTable.cs @@ -0,0 +1,162 @@ +using System; +using System.IO; +using System.Text; +using System.Collections; +using System.Collections.Generic; +using System.Diagnostics; + +namespace TextEditor.Document +{ + internal class PieceTable : IEnumerable + { + // TODO: Using Find() is O(n) -> We should store the information in the descriptor + // itself and avoid lookup entirely. Consider using a custom LinkedList implementation. + + // See: https://www.catch22.net/tuts/piece-chains + // Also: https://code.visualstudio.com/blogs/2018/03/23/text-buffer-reimplementation + + // These two are "sentinel" nodes which + // do not store or point to data + private readonly Node head; + private readonly Node tail; + + internal class BoundaryException : Exception {} + + public PieceTable() + { + head = Node.CreateGuardNode(); + tail = Node.CreateGuardNode(); + + head.Next = tail; + tail.Prev = head; + } + + private void CheckGuardNode(Node node) + { + if (node == head || node == tail) + throw new BoundaryException(); + } + + public void AddAfter(Node current, Node insert) + { + CheckGuardNode(current); + CheckGuardNode(insert); + + // [Current] [After] -> [Current] [Insert] [After] + + Node after = current.Next; + + insert.Next = after; + insert.Prev = current; + + current.Next = insert; + after!.Prev = insert; + } + + public void AddBefore(Node current, Node insert) + { + CheckGuardNode(current); + CheckGuardNode(insert); + + // [Before] [Current] -> [Before] [Insert] [Current] + + Node before = current.Prev; + + insert.Prev = before; + insert.Next = current; + + before!.Next = insert; + current.Prev = insert; + } + + public void AddFirst(Node insert) + { + CheckGuardNode(insert); + + // [Head Sentinel] [After] -> [Head Sentinel] [Insert] [After] + + Node after = head.Next; + + insert.Next = after; + insert.Prev = head; + + head.Next = insert; + after!.Prev = insert; + } + + public void AddLast(Node insert) + { + CheckGuardNode(insert); + + // [Before] [Tail Sentinel] -> [Before] [Insert] [Tail Sentinel] + + Node before = tail.Prev; + + insert.Next = tail; + insert.Prev = before; + + tail.Prev = insert; + before!.Next = insert; + } + + public void Replace(Node old, Node replace) + { + CheckGuardNode(old); + CheckGuardNode(replace); + + // [Before] [Old] [After] -> [Before] [Replace] [After] + + Node before = old.Prev; + Node after = old.Next; + + replace.Prev = before; + replace.Next = after; + + before!.Next = replace; + after!.Prev = replace; + } + + public void Remove(Node remove) + { + CheckGuardNode(remove); + + // [Before] [Remove] [After] -> [Before] [After] + + Node before = remove.Prev; + Node after = remove.Next; + + before!.Next = after; + after!.Prev = before; + } + + // Implement IEnumerable + public IEnumerator GetEnumerator() + { + var nodes = new List(); + var cur = head; + while (cur != null) + { + nodes.Add(cur); + cur = cur.Next; + + // We have traversed the entire list + if (cur == null) + break; + + // Check for broken linked list -> Abort + Debug.Assert( + condition: cur.Prev != null, + message: "Linked list has missing previous element. It may be broken" + ); + } + + nodes.Remove(head); + nodes.Remove(tail); + + return nodes.GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + => GetEnumerator(); + } +} diff --git a/Samples/Gtk3/TextEditor/Program.cs b/Samples/Gtk3/TextEditor/Program.cs new file mode 100644 index 000000000..4899281eb --- /dev/null +++ b/Samples/Gtk3/TextEditor/Program.cs @@ -0,0 +1,29 @@ +using System; +using GObject; +using Gtk; + +namespace TextEditor +{ + using Application; + + public class App : Gtk.Application + { + const string AppName = "org.gircore.TextEditor"; + + public App() + { + this.ApplicationId = AppName; + this.OnActivate += Activate; + } + + private void Activate(object app, EventArgs args) + { + var window = new AppWindow(); + window.Application = this; + window.Present(); + } + + static int Main(string[] args) + => new App().Run(); + } +} diff --git a/Samples/Gtk3/TextEditor/README.md b/Samples/Gtk3/TextEditor/README.md new file mode 100644 index 000000000..4f55d2787 --- /dev/null +++ b/Samples/Gtk3/TextEditor/README.md @@ -0,0 +1,4 @@ +# TextEditor Demo +A more complex sample demonstrating how GTK and Cairo can be used +together to create a simple re-implementation of GtkTextView from +scratch. \ No newline at end of file diff --git a/Samples/Gtk3/TextEditor/TextEditor.csproj b/Samples/Gtk3/TextEditor/TextEditor.csproj new file mode 100644 index 000000000..c3b483e45 --- /dev/null +++ b/Samples/Gtk3/TextEditor/TextEditor.csproj @@ -0,0 +1,13 @@ + + + + Exe + net5.0 + + + + + + + + From 354e824775651297b5983513336f61b42528b7a3 Mon Sep 17 00:00:00 2001 From: Matthew Jakeman Date: Thu, 15 Jul 2021 02:12:57 +1200 Subject: [PATCH 16/35] Register union types (treat them like records) --- Generator/Extensions/AnyTypeExtension.cs | 13 +++++++++++++ Generator/Extensions/SymbolExtension.cs | 5 ++--- Generator/Services/TypeRenamer.cs | 3 ++- Generator/Services/Writer/WriteModuleService.cs | 7 +++++-- Generator/Templates/module_type_registration.sbntxt | 11 +++++++++++ Generator/Templates/union.sbntxt | 3 ++- 6 files changed, 35 insertions(+), 7 deletions(-) diff --git a/Generator/Extensions/AnyTypeExtension.cs b/Generator/Extensions/AnyTypeExtension.cs index f92fe6a4e..ccb6760bb 100644 --- a/Generator/Extensions/AnyTypeExtension.cs +++ b/Generator/Extensions/AnyTypeExtension.cs @@ -42,6 +42,14 @@ private static string WriteNativeType(AnyType anyType, Namespace currentNamespac //References to records which are using a pointer {TypeReference: { ResolvedType: Record r}, TypeInformation: { IsPointer: true, Array: null}} => GetSafeHandleName(r, currentNamespace, useSafeHandle), {TypeReference: { ResolvedType: Record r}, TypeInformation: { IsPointer: true, Array: { }}} => "IntPtr[]", //Array of SafeHandle not supported by runtime + + //References to records which are not using a pointer + {TypeReference: { ResolvedType: Union u}, TypeInformation: { IsPointer: false, Array: null}} => GetStructName(u, currentNamespace), + {TypeReference: { ResolvedType: Union u}, TypeInformation: { IsPointer: false, Array: { }}} => GetStructName(u, currentNamespace) + "[]", + + //References to records which are using a pointer + {TypeReference: { ResolvedType: Union u}, TypeInformation: { IsPointer: true, Array: null}} => "IntPtr", + {TypeReference: { ResolvedType: Union u}, TypeInformation: { IsPointer: true, Array: { }}} => "IntPtr[]", // Primitives - Marshal directly { TypeInformation: { Array: { } }, TypeReference: { ResolvedType: PrimitiveValueType s } } => s.Write(Target.Native, currentNamespace) + "[]", @@ -65,6 +73,11 @@ private static string GetStructName(Record r, Namespace currentNamespace) return AddNamespace(currentNamespace, r.Repository.Namespace, r.GetMetadataString("StructRefName"), Target.Native); } + private static string GetStructName(Union u, Namespace currentNamespace) + { + return AddNamespace(currentNamespace, u.Repository.Namespace, u.GetMetadataString("StructRefName"), Target.Native); + } + private static string GetSafeHandleName(Record r, Namespace currentNamespace, bool useSafeHandle) { if (useSafeHandle) diff --git a/Generator/Extensions/SymbolExtension.cs b/Generator/Extensions/SymbolExtension.cs index ddf7e1022..6257a75b3 100644 --- a/Generator/Extensions/SymbolExtension.cs +++ b/Generator/Extensions/SymbolExtension.cs @@ -28,13 +28,12 @@ internal static string Write(this Type type, Target target, Namespace currentNam return namespaceName + "." + name; } - public static string WriteTypeRegistration(this Type type) + public static string WriteTypeRegistrationClass(this Type type) { return $"TypeDictionary.Add(typeof({type.SymbolName}), new GObject.Type(Native.{type.SymbolName}.Instance.Methods.GetGType()));\r\n"; } - // TODO: Should this be a separate function? - public static string WriteTypeRegistrationRecord(this Type type) + public static string WriteTypeRegistrationBoxed(this Type type) { return $"TypeDictionary.Add(typeof({type.SymbolName}), new GObject.Type(Native.{type.SymbolName}.Methods.GetGType()));\r\n"; } diff --git a/Generator/Services/TypeRenamer.cs b/Generator/Services/TypeRenamer.cs index cb5192f5b..e73482ed4 100644 --- a/Generator/Services/TypeRenamer.cs +++ b/Generator/Services/TypeRenamer.cs @@ -96,8 +96,9 @@ private void SetUnionMetadata(Union union) { union.Metadata["Name"] = union.SymbolName; union.Metadata["StructName"] = "Struct"; + union.Metadata["StructRefName"] = $"{union.SymbolName}.Struct"; - union.SymbolName = new SymbolName($"{union.SymbolName}.Struct"); + union.SymbolName = new SymbolName($"{union.SymbolName}"); } private void SetRecordMetadata(IEnumerable records) diff --git a/Generator/Services/Writer/WriteModuleService.cs b/Generator/Services/Writer/WriteModuleService.cs index 3e39c4de3..2fe3518f5 100644 --- a/Generator/Services/Writer/WriteModuleService.cs +++ b/Generator/Services/Writer/WriteModuleService.cs @@ -40,6 +40,7 @@ private void WriteTypeDictionaryInitialization(Namespace ns, string outputDir) { IEnumerable classes = ns.Classes.Where(x => !x.IsFundamental); IEnumerable records = ns.Records.Where(x => x.GetTypeFunction is not null); + IEnumerable unions = ns.Unions.Where(x => x.GetTypeFunction is not null); IEnumerable types = classes.Concat(records); @@ -51,9 +52,11 @@ private void WriteTypeDictionaryInitialization(Namespace ns, string outputDir) { "namespace", ns }, { "classes", classes }, { "records", records }, + { "unions", unions } }; - scriptObject.Import("write_type_registration", new Func(s => s.WriteTypeRegistration())); - scriptObject.Import("write_type_registration_record", new Func(s => s.WriteTypeRegistrationRecord())); + scriptObject.Import("write_type_registration", new Func(s => s.WriteTypeRegistrationClass())); + scriptObject.Import("write_type_registration_record", new Func(s => s.WriteTypeRegistrationBoxed())); + scriptObject.Import("write_type_registration_union", new Func(s => s.WriteTypeRegistrationBoxed())); _writeHelperService.Write( projectName: ns.ToCanonicalName(), diff --git a/Generator/Templates/module_type_registration.sbntxt b/Generator/Templates/module_type_registration.sbntxt index ca7206851..d8d4533fc 100644 --- a/Generator/Templates/module_type_registration.sbntxt +++ b/Generator/Templates/module_type_registration.sbntxt @@ -31,6 +31,17 @@ namespace {{ namespace.name }} Console.WriteLine($"Could not register record type '{{ $record.symbol_name }}': {e.Message}"); } {{ end }} + + {{ for $union in unions }} + try + { + {{ $union | write_type_registration_union }} + } + catch (Exception e) + { + Console.WriteLine($"Could not register union type '{{ $union.symbol_name }}': {e.Message}"); + } + {{ end }} {{ end }} } } diff --git a/Generator/Templates/union.sbntxt b/Generator/Templates/union.sbntxt index 8e4765dc2..224b0d81e 100644 --- a/Generator/Templates/union.sbntxt +++ b/Generator/Templates/union.sbntxt @@ -6,7 +6,8 @@ using System.Runtime.InteropServices; namespace {{ namespace.name }} { // AUTOGENERATED FILE - DO NOT MODIFY - public partial record {{get_metadata "Name"}} + public partial class {{ get_metadata "Name" }} { + // TODO: Handle Unions } } \ No newline at end of file From a11a8270d224677363e23f64a166001a17cf8c9e Mon Sep 17 00:00:00 2001 From: Matthew Jakeman Date: Thu, 15 Jul 2021 04:59:02 +1200 Subject: [PATCH 17/35] Make handwritten cairo bindings cross-platform --- Libs/cairo-1.0/Classes/DllImportOverride.cs | 107 ++++++++++++++++++++ Libs/cairo-1.0/Classes/Module.cs | 7 +- Libs/cairo-1.0/Records/Context.cs | 35 +++---- 3 files changed, 129 insertions(+), 20 deletions(-) create mode 100644 Libs/cairo-1.0/Classes/DllImportOverride.cs diff --git a/Libs/cairo-1.0/Classes/DllImportOverride.cs b/Libs/cairo-1.0/Classes/DllImportOverride.cs new file mode 100644 index 000000000..81ca13db5 --- /dev/null +++ b/Libs/cairo-1.0/Classes/DllImportOverride.cs @@ -0,0 +1,107 @@ +using System; +using System.Reflection; +using System.Runtime.InteropServices; +using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; + +#nullable enable + +namespace cairo.Native +{ + // Manual override of the DllImport class so we can handle + // cairo being in multiple shared libraries/dlls. See the + // method 'TryGetOsDependentLibraryName' for an explanation + // of what is happening. + internal static class DllImportOverride + { + #region Fields + + // libcairo (for manually written code) + private const string _windowsDllName = "libcairo-2.dll"; + private const string _linuxDllName = "libcairo.so.2"; + private const string _osxDllName = "libcairo.2.dylib"; + + // libcairo-gobject (for autogenerated/introspection code) + private const string _cgoWindowsDllName = "libcairo-gobject-2.dll"; + private const string _cgoLinuxDllName = "libcairo-gobject.so.2"; + private const string _cgoOsxDllName = "libcairo-gobject.2.dylib"; + + private static readonly Dictionary _cache = new (); + + #endregion + + #region Methods + + public static void Initialize() + { + NativeLibrary.SetDllImportResolver(typeof(DllImportOverride).Assembly, ImportResolver); + } + + private static IntPtr ImportResolver(string libraryName, Assembly assembly, DllImportSearchPath? searchPath) + { + if (_cache.TryGetValue(libraryName, out var cachedLibHandle)) + return cachedLibHandle; + + if (!TryGetOsDependentLibraryName(libraryName, out var osDependentLibraryName)) + return IntPtr.Zero; + + if (NativeLibrary.TryLoad(osDependentLibraryName, assembly, searchPath, out IntPtr libHandle)) + { + _cache[libraryName] = libHandle; + return libHandle; + } + + // Fall back to default dll search mechanic + return IntPtr.Zero; + } + + private static bool TryGetOsDependentLibraryName(string libraryName, [NotNullWhen(true)] out string? osDependentLibraryName) + { + // Cairo, as used by GTK, is spread across two (maybe more?) + // shared libraries. These are 'cairo' - the library itself, + // and 'cairo-gobject' - interop code for using with GDK. + + // We map the string 'libraryName' to the correct shared library: + // * "cairo" -> "libcairo-gobject" + // * "cairo-graphics" -> "libcairo" + + // Confusingly, "cairo" refers to "cairo-gobject" as this is + // the library specified in "cairo-1.0.gir". + if (libraryName == "cairo") + { + if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) + osDependentLibraryName = _cgoWindowsDllName; + else if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) + osDependentLibraryName = _cgoOsxDllName; + else if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) + osDependentLibraryName = _cgoLinuxDllName; + else + throw new Exception("Unknown platform"); + + return true; + } + + // This is the actual "libcairo" which defines the + // functions, structs, etc that we want. + if (libraryName == "cairo-graphics") + { + if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) + osDependentLibraryName = _windowsDllName; + else if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) + osDependentLibraryName = _osxDllName; + else if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) + osDependentLibraryName = _linuxDllName; + else + throw new Exception("Unknown platform"); + + return true; + } + + // Library name not recognised, return + osDependentLibraryName = null; + return false; + } + + #endregion + } +} diff --git a/Libs/cairo-1.0/Classes/Module.cs b/Libs/cairo-1.0/Classes/Module.cs index 64c3ef03d..b717740c8 100644 --- a/Libs/cairo-1.0/Classes/Module.cs +++ b/Libs/cairo-1.0/Classes/Module.cs @@ -7,7 +7,12 @@ internal partial class Module [ModuleInitializer] internal static void Initialize() { - InitializeDllImport(); + // InitializeDllImport(); + + // We override the normal DllImporter generated for us + // as we need to take into account cairo being spread + // across multiple shared libraries. + Native.DllImportOverride.Initialize(); RegisterTypes(); } diff --git a/Libs/cairo-1.0/Records/Context.cs b/Libs/cairo-1.0/Records/Context.cs index d6624a3ce..cc9113749 100644 --- a/Libs/cairo-1.0/Records/Context.cs +++ b/Libs/cairo-1.0/Records/Context.cs @@ -6,58 +6,55 @@ namespace cairo { public partial class Context { - // IMPORTANT FIXME TODO: This should not be hardcoded - private const string cairoLib = "libcairo-2"; - // IMPORTANT: We should follow cairo's guidelines on memory management // for language bindings. This is a quick attempt at implementing something // workable. - [DllImport (cairoLib, EntryPoint = "cairo_set_source_rgba")] - internal static extern void NativeSetSourceRgba (Native.Context.Handle cr, double red, double green, double blue, double alpha); + [DllImport ("cairo-graphics", EntryPoint = "cairo_set_source_rgba")] + private static extern void NativeSetSourceRgba (Native.Context.Handle cr, double red, double green, double blue, double alpha); public void SetSourceRgba(double red, double green, double blue, double alpha) => NativeSetSourceRgba(Handle, red, green, blue, alpha); - [DllImport (cairoLib, EntryPoint = "cairo_show_text")] - internal static extern void NativeShowText (Native.Context.Handle cr, [MarshalAs(UnmanagedType.LPUTF8Str)] string utf8); + [DllImport ("cairo-graphics", EntryPoint = "cairo_show_text")] + private static extern void NativeShowText (Native.Context.Handle cr, [MarshalAs(UnmanagedType.LPUTF8Str)] string utf8); public void ShowText(string text) => NativeShowText(Handle, text); - [DllImport (cairoLib, EntryPoint = "cairo_move_to")] - internal static extern void NativeMoveTo (Native.Context.Handle cr, double x, double y); + [DllImport ("cairo-graphics", EntryPoint = "cairo_move_to")] + private static extern void NativeMoveTo (Native.Context.Handle cr, double x, double y); public void MoveTo(double x, double y) => NativeMoveTo(Handle, x, y); - [DllImport (cairoLib, EntryPoint = "cairo_text_extents")] - internal static extern void NativeTextExtents (Native.Context.Handle cr, [MarshalAs (UnmanagedType.LPUTF8Str)] string utf8, out TextExtents extents); + [DllImport ("cairo-graphics", EntryPoint = "cairo_text_extents")] + private static extern void NativeTextExtents (Native.Context.Handle cr, [MarshalAs (UnmanagedType.LPUTF8Str)] string utf8, out TextExtents extents); public void TextExtents(string text, out TextExtents extents) => NativeTextExtents(Handle, text, out extents); - [DllImport (cairoLib, EntryPoint = "cairo_font_extents")] - internal static extern void NativeFontExtents (Native.Context.Handle cr, out FontExtents extents); + [DllImport ("cairo-graphics", EntryPoint = "cairo_font_extents")] + private static extern void NativeFontExtents (Native.Context.Handle cr, out FontExtents extents); public void FontExtents(out FontExtents extents) => NativeFontExtents(Handle, out extents); - [DllImport (cairoLib, EntryPoint = "cairo_fill")] - internal static extern void NativeFill (Native.Context.Handle cr); + [DllImport ("cairo-graphics", EntryPoint = "cairo_fill")] + private static extern void NativeFill (Native.Context.Handle cr); public void Fill() => NativeFill(Handle); - [DllImport (cairoLib, EntryPoint = "cairo_rectangle")] - internal static extern void NativeRectangle (Native.Context.Handle cr, double x, double y, double width, double height); + [DllImport ("cairo-graphics", EntryPoint = "cairo_rectangle")] + private static extern void NativeRectangle (Native.Context.Handle cr, double x, double y, double width, double height); public void Rectangle(double x, double y, double width, double height) => NativeRectangle(Handle, x, y, width, height); - [DllImport(cairoLib, EntryPoint = "cairo_set_font_size")] - internal static extern void NativeSetFontSize (Native.Context.Handle cr, double size); + [DllImport("cairo-graphics", EntryPoint = "cairo_set_font_size")] + private static extern void NativeSetFontSize (Native.Context.Handle cr, double size); public void SetFontSize(double size) => NativeSetFontSize(Handle, size); From c9fb546428931f73e5cda86bf816339f1a664352 Mon Sep 17 00:00:00 2001 From: Matthew Jakeman Date: Thu, 15 Jul 2021 18:04:27 +1200 Subject: [PATCH 18/35] Special case Gdk.Event --- Generator/Convert.cs | 10 +++++----- Generator/Templates/record.sbntxt | 12 +++++------ Libs/GObject-2.0/Classes/Object.Properties.cs | 2 +- .../Native/Classes/RecordWrapper.cs | 19 +++++++++++------- Libs/Gdk-3.0/Records/Event.cs | 20 +++++++++++++++++++ Libs/Gdk-3.0/Records/EventKey.cs | 2 +- Libs/Gio-2.0/Classes/DBusConnection.cs | 4 ++-- Libs/Gtk-3.0/Classes/TreeSelection.cs | 2 +- 8 files changed, 48 insertions(+), 23 deletions(-) create mode 100644 Libs/Gdk-3.0/Records/Event.cs diff --git a/Generator/Convert.cs b/Generator/Convert.cs index 3c1df0cb2..e820f3627 100644 --- a/Generator/Convert.cs +++ b/Generator/Convert.cs @@ -67,16 +67,16 @@ internal static string NativeToManaged(TransferableAnyType transferable, string (String s, _) when (transfer == Transfer.None) && (transferable is ReturnValue) => $"GLib.Native.StringHelper.ToStringUtf8({fromParam})", // Record Conversions (safe handles) - (Record r, { IsPointer: true, Array: null }) when useSafeHandle => $"new {r.Write(Target.Managed, currentNamespace)}({fromParam})", - (Record r, { IsPointer: true, Array: { } }) when useSafeHandle => $"{fromParam}.Select(x => new {r.Write(Target.Managed, currentNamespace)}(x)).ToArray()", + (Record r, { IsPointer: true, Array: null }) when useSafeHandle => $"{r.Write(Target.Managed, currentNamespace)}.__FactoryNew({fromParam})", + (Record r, { IsPointer: true, Array: { } }) when useSafeHandle => $"{fromParam}.Select(x => {r.Write(Target.Managed, currentNamespace)}.__FactoryNew(x)).ToArray()", // Record Conversions (raw pointers) - (Record r, {IsPointer: true, Array: null }) when !useSafeHandle => $"new {r.Write(Target.Managed, currentNamespace)}(new {SafeHandleFromRecord(r)}({fromParam}))", - (Record r, {IsPointer: true, Array: { } }) when !useSafeHandle => $"{fromParam}.Select(x => new {r.Write(Target.Managed, currentNamespace)}(new {SafeHandleFromRecord(r)}(x))).ToArray()", + (Record r, {IsPointer: true, Array: null }) when !useSafeHandle => $"{r.Write(Target.Managed, currentNamespace)}.__FactoryNew(new {SafeHandleFromRecord(r)}({fromParam}))", + (Record r, {IsPointer: true, Array: { } }) when !useSafeHandle => $"{fromParam}.Select(x => {r.Write(Target.Managed, currentNamespace)}.__FactoryNew(new {SafeHandleFromRecord(r)}(x))).ToArray()", //Record Conversions without pointers are not working yet (Record r, {IsPointer: false, Array: null}) => $"({qualifiedType}) default!; //TODO: Fixme", - (Record r, {IsPointer: false, Array: {}}) => $"({qualifiedType}[]) {fromParam}.Select(x => new {qualifiedType}({SafeHandleFromRecord(r, true)}(x))).ToArray();", + (Record r, {IsPointer: false, Array: {}}) => $"({qualifiedType}[]) {fromParam}.Select(x => {qualifiedType}.__FactoryNew({SafeHandleFromRecord(r, true)}(x))).ToArray();", // Class Conversions (Class { IsFundamental: true } c, { IsPointer: true, Array: null }) => $"{qualifiedType}.From({fromParam})", diff --git a/Generator/Templates/record.sbntxt b/Generator/Templates/record.sbntxt index a24badd5b..2fe1ac1de 100644 --- a/Generator/Templates/record.sbntxt +++ b/Generator/Templates/record.sbntxt @@ -21,17 +21,17 @@ namespace {{ namespace.name }} // Override this to perform additional steps in the constructor partial void Initialize(); - public {{ $record_name }}({{ $safe_handle }} handle) + private {{ $record_name }}({{ $safe_handle }} handle) { _handle = handle; Initialize(); } - public {{ $record_name }}(IntPtr ptr) - { - _handle = new {{ $safe_handle }}(ptr); - Initialize(); - } + public static {{ $record_name }} __FactoryNew({{ $safe_handle }} handle) + => new {{ $record_name }}(handle); + + public static {{ $record_name }} __FactoryNew(IntPtr ptr) + => new {{ $record_name }}(new {{ $safe_handle }}(ptr)); // TODO: Default Constructor (allocate in managed memory and free on Dispose?) // We need to be able to create instances of records with full access to diff --git a/Libs/GObject-2.0/Classes/Object.Properties.cs b/Libs/GObject-2.0/Classes/Object.Properties.cs index ce9327ef0..bb5e67ccc 100644 --- a/Libs/GObject-2.0/Classes/Object.Properties.cs +++ b/Libs/GObject-2.0/Classes/Object.Properties.cs @@ -55,7 +55,7 @@ protected Value GetProperty(string name) var handle = Native.Value.ManagedHandle.Create(); Native.Object.Instance.Methods.GetProperty(Handle, name, handle); - return new Value(handle); + return Value.__FactoryNew(handle); } /// diff --git a/Libs/GObject-2.0/Native/Classes/RecordWrapper.cs b/Libs/GObject-2.0/Native/Classes/RecordWrapper.cs index 2614ffad1..7743b92bd 100644 --- a/Libs/GObject-2.0/Native/Classes/RecordWrapper.cs +++ b/Libs/GObject-2.0/Native/Classes/RecordWrapper.cs @@ -16,24 +16,29 @@ public static object WrapHandle(IntPtr handle, Type gtype) throw new NullReferenceException($"Failed to wrap handle as type <{trueType}>. Null handle passed to WrapHandle."); // Get constructor for the true type - ConstructorInfo? ctor = GetRecordConstructor(trueType); + MethodInfo? factory = GetRecordFactory(trueType); - if (ctor == null) + if (factory == null) throw new Exception($"Type {trueType} does not define an IntPtr constructor. This could mean improperly defined bindings"); - return ctor.Invoke(new object[] { handle }); + object? result = factory.Invoke(null, new object[] { handle }); + + if (result == null) + throw new Exception($"Type {trueType}'s factory method returned a null object. This could mean improperly defined bindings"); + + return result; } - private static ConstructorInfo? GetRecordConstructor(System.Type type) + private static MethodInfo? GetRecordFactory(System.Type type) { // Create using 'IntPtr' constructor - ConstructorInfo? ctor = type.GetConstructor( + MethodInfo? factory = type.GetMethod("__FactoryNew", System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Public - | System.Reflection.BindingFlags.Instance, + | System.Reflection.BindingFlags.Static, null, new[] { typeof(IntPtr) }, null ); - return ctor; + return factory; } } } diff --git a/Libs/Gdk-3.0/Records/Event.cs b/Libs/Gdk-3.0/Records/Event.cs new file mode 100644 index 000000000..d232714f6 --- /dev/null +++ b/Libs/Gdk-3.0/Records/Event.cs @@ -0,0 +1,20 @@ +using System; +using System.Runtime.InteropServices; + +namespace Gdk +{ + public partial class Event + { + public static Event __FactoryNew(IntPtr ptr) + { + var ev = Marshal.PtrToStructure(ptr); + switch (ev.Type) + { + case EventType.KeyPress: + return EventKey.__FactoryNew(ptr); + default: + throw new NotImplementedException("Event Type not yet supported"); + } + } + } +} diff --git a/Libs/Gdk-3.0/Records/EventKey.cs b/Libs/Gdk-3.0/Records/EventKey.cs index 35d824000..d01cebcf7 100644 --- a/Libs/Gdk-3.0/Records/EventKey.cs +++ b/Libs/Gdk-3.0/Records/EventKey.cs @@ -3,7 +3,7 @@ namespace Gdk { - public partial class EventKey + public partial class EventKey : Event { // TODO: Proof-of-concept for accessing record fields. We'll want to generate this eventually diff --git a/Libs/Gio-2.0/Classes/DBusConnection.cs b/Libs/Gio-2.0/Classes/DBusConnection.cs index f85c1be54..409c9e1dd 100644 --- a/Libs/Gio-2.0/Classes/DBusConnection.cs +++ b/Libs/Gio-2.0/Classes/DBusConnection.cs @@ -39,7 +39,7 @@ void Callback(GObject.Object sourceObject, AsyncResult res) var ret = Native.DBusConnection.Instance.Methods.CallFinish(sourceObject.Handle, (res as GObject.Object).Handle, error); Error.ThrowOnError(error); - tcs.SetResult(new Variant(ret)); + tcs.SetResult(Variant.__FactoryNew(ret)); } //TODO: Use on time CallbackHandler @@ -58,7 +58,7 @@ public Variant Call(string busName, string objectPath, string interfaceName, str Error.ThrowOnError(error); - return new Variant(ret); + return Variant.__FactoryNew(ret); } public override void Dispose() diff --git a/Libs/Gtk-3.0/Classes/TreeSelection.cs b/Libs/Gtk-3.0/Classes/TreeSelection.cs index 25401845a..4227f2bee 100644 --- a/Libs/Gtk-3.0/Classes/TreeSelection.cs +++ b/Libs/Gtk-3.0/Classes/TreeSelection.cs @@ -11,7 +11,7 @@ public void GetSelected(out TreeModel model, out TreeIter iter) Native.TreeSelection.Instance.Methods.GetSelected(Handle, out var modelPtr, iterHandle); model = ObjectWrapper.WrapHandle(modelPtr, false); - iter = new TreeIter(iterHandle); + iter = TreeIter.__FactoryNew(iterHandle); } } } From 5c9975e702ab2907a814f2d9b141cf9ab27bf548 Mon Sep 17 00:00:00 2001 From: Matthew Jakeman Date: Thu, 15 Jul 2021 18:24:32 +1200 Subject: [PATCH 19/35] Implement every type of Gdk.Event --- Libs/Gdk-3.0/Records/Event.cs | 64 ++++++++++++++++++++++ Libs/Gdk-3.0/Records/EventButton.cs | 7 +++ Libs/Gdk-3.0/Records/EventConfigure.cs | 7 +++ Libs/Gdk-3.0/Records/EventCrossing.cs | 7 +++ Libs/Gdk-3.0/Records/EventDND.cs | 7 +++ Libs/Gdk-3.0/Records/EventExpose.cs | 7 +++ Libs/Gdk-3.0/Records/EventFocus.cs | 7 +++ Libs/Gdk-3.0/Records/EventGrabBroken.cs | 7 +++ Libs/Gdk-3.0/Records/EventMotion.cs | 7 +++ Libs/Gdk-3.0/Records/EventOwnerChange.cs | 7 +++ Libs/Gdk-3.0/Records/EventPadAxis.cs | 7 +++ Libs/Gdk-3.0/Records/EventPadButton.cs | 7 +++ Libs/Gdk-3.0/Records/EventPadGroupMode.cs | 7 +++ Libs/Gdk-3.0/Records/EventProperty.cs | 7 +++ Libs/Gdk-3.0/Records/EventProximity.cs | 7 +++ Libs/Gdk-3.0/Records/EventScroll.cs | 7 +++ Libs/Gdk-3.0/Records/EventSelection.cs | 7 +++ Libs/Gdk-3.0/Records/EventSequence.cs | 7 +++ Libs/Gdk-3.0/Records/EventSetting.cs | 7 +++ Libs/Gdk-3.0/Records/EventTouch.cs | 7 +++ Libs/Gdk-3.0/Records/EventTouchpadPinch.cs | 7 +++ Libs/Gdk-3.0/Records/EventTouchpadSwipe.cs | 7 +++ Libs/Gdk-3.0/Records/EventVisibility.cs | 7 +++ Libs/Gdk-3.0/Records/EventWindowState.cs | 7 +++ 24 files changed, 225 insertions(+) create mode 100644 Libs/Gdk-3.0/Records/EventButton.cs create mode 100644 Libs/Gdk-3.0/Records/EventConfigure.cs create mode 100644 Libs/Gdk-3.0/Records/EventCrossing.cs create mode 100644 Libs/Gdk-3.0/Records/EventDND.cs create mode 100644 Libs/Gdk-3.0/Records/EventExpose.cs create mode 100644 Libs/Gdk-3.0/Records/EventFocus.cs create mode 100644 Libs/Gdk-3.0/Records/EventGrabBroken.cs create mode 100644 Libs/Gdk-3.0/Records/EventMotion.cs create mode 100644 Libs/Gdk-3.0/Records/EventOwnerChange.cs create mode 100644 Libs/Gdk-3.0/Records/EventPadAxis.cs create mode 100644 Libs/Gdk-3.0/Records/EventPadButton.cs create mode 100644 Libs/Gdk-3.0/Records/EventPadGroupMode.cs create mode 100644 Libs/Gdk-3.0/Records/EventProperty.cs create mode 100644 Libs/Gdk-3.0/Records/EventProximity.cs create mode 100644 Libs/Gdk-3.0/Records/EventScroll.cs create mode 100644 Libs/Gdk-3.0/Records/EventSelection.cs create mode 100644 Libs/Gdk-3.0/Records/EventSequence.cs create mode 100644 Libs/Gdk-3.0/Records/EventSetting.cs create mode 100644 Libs/Gdk-3.0/Records/EventTouch.cs create mode 100644 Libs/Gdk-3.0/Records/EventTouchpadPinch.cs create mode 100644 Libs/Gdk-3.0/Records/EventTouchpadSwipe.cs create mode 100644 Libs/Gdk-3.0/Records/EventVisibility.cs create mode 100644 Libs/Gdk-3.0/Records/EventWindowState.cs diff --git a/Libs/Gdk-3.0/Records/Event.cs b/Libs/Gdk-3.0/Records/Event.cs index d232714f6..b21700d37 100644 --- a/Libs/Gdk-3.0/Records/Event.cs +++ b/Libs/Gdk-3.0/Records/Event.cs @@ -10,8 +10,72 @@ public static Event __FactoryNew(IntPtr ptr) var ev = Marshal.PtrToStructure(ptr); switch (ev.Type) { + case EventType.Expose: + return EventExpose.__FactoryNew(ptr); + case EventType.VisibilityNotify: + return EventVisibility.__FactoryNew(ptr); + case EventType.MotionNotify: + return EventMotion.__FactoryNew(ptr); + case EventType.ButtonPress: + case EventType.TwoButtonPress: + case EventType.ThreeButtonPress: + case EventType.ButtonRelease: + return EventButton.__FactoryNew(ptr); + case EventType.TouchBegin: + return EventTouch.__FactoryNew(ptr); + case EventType.Scroll: + return EventScroll.__FactoryNew(ptr); case EventType.KeyPress: + case EventType.KeyRelease: return EventKey.__FactoryNew(ptr); + case EventType.EnterNotify: + case EventType.LeaveNotify: + return EventCrossing.__FactoryNew(ptr); + case EventType.FocusChange: + return EventFocus.__FactoryNew(ptr); + case EventType.Configure: + return EventConfigure.__FactoryNew(ptr); + case EventType.PropertyNotify: + return EventProperty.__FactoryNew(ptr); + case EventType.SelectionClear: + case EventType.SelectionNotify: + case EventType.SelectionRequest: + return EventSelection.__FactoryNew(ptr); + case EventType.OwnerChange: + return EventOwnerChange.__FactoryNew(ptr); + case EventType.ProximityIn: + case EventType.ProximityOut: + return EventProximity.__FactoryNew(ptr); + case EventType.DragEnter: + case EventType.DragLeave: + case EventType.DragMotion: + case EventType.DragStatus: + case EventType.DropStart: + case EventType.DropFinished: + return EventDND.__FactoryNew(ptr); + case EventType.WindowState: + return EventWindowState.__FactoryNew(ptr); + case EventType.Setting: + return EventSetting.__FactoryNew(ptr); + case EventType.GrabBroken: + return EventGrabBroken.__FactoryNew(ptr); + case EventType.TouchpadSwipe: + return EventTouchpadSwipe.__FactoryNew(ptr); + case EventType.TouchpadPinch: + return EventTouchpadPinch.__FactoryNew(ptr); + case EventType.PadButtonPress: + case EventType.PadButtonRelease: + return EventPadButton.__FactoryNew(ptr); + case EventType.PadRing: + case EventType.PadStrip: + return EventPadAxis.__FactoryNew(ptr); + case EventType.PadGroupMode: + return EventPadGroupMode.__FactoryNew(ptr); + // Default/Not Implemented + case EventType.Map: + case EventType.Unmap: + case EventType.Delete: + case EventType.Destroy: default: throw new NotImplementedException("Event Type not yet supported"); } diff --git a/Libs/Gdk-3.0/Records/EventButton.cs b/Libs/Gdk-3.0/Records/EventButton.cs new file mode 100644 index 000000000..5451c3700 --- /dev/null +++ b/Libs/Gdk-3.0/Records/EventButton.cs @@ -0,0 +1,7 @@ +namespace Gdk +{ + public partial class EventButton : Event + { + + } +} diff --git a/Libs/Gdk-3.0/Records/EventConfigure.cs b/Libs/Gdk-3.0/Records/EventConfigure.cs new file mode 100644 index 000000000..ba84674bc --- /dev/null +++ b/Libs/Gdk-3.0/Records/EventConfigure.cs @@ -0,0 +1,7 @@ +namespace Gdk +{ + public partial class EventConfigure : Event + { + + } +} diff --git a/Libs/Gdk-3.0/Records/EventCrossing.cs b/Libs/Gdk-3.0/Records/EventCrossing.cs new file mode 100644 index 000000000..741450e7c --- /dev/null +++ b/Libs/Gdk-3.0/Records/EventCrossing.cs @@ -0,0 +1,7 @@ +namespace Gdk +{ + public partial class EventCrossing : Event + { + + } +} diff --git a/Libs/Gdk-3.0/Records/EventDND.cs b/Libs/Gdk-3.0/Records/EventDND.cs new file mode 100644 index 000000000..3f527d59f --- /dev/null +++ b/Libs/Gdk-3.0/Records/EventDND.cs @@ -0,0 +1,7 @@ +namespace Gdk +{ + public partial class EventDND : Event + { + + } +} diff --git a/Libs/Gdk-3.0/Records/EventExpose.cs b/Libs/Gdk-3.0/Records/EventExpose.cs new file mode 100644 index 000000000..aee1799d1 --- /dev/null +++ b/Libs/Gdk-3.0/Records/EventExpose.cs @@ -0,0 +1,7 @@ +namespace Gdk +{ + public partial class EventExpose : Event + { + + } +} diff --git a/Libs/Gdk-3.0/Records/EventFocus.cs b/Libs/Gdk-3.0/Records/EventFocus.cs new file mode 100644 index 000000000..ed5ab4cbf --- /dev/null +++ b/Libs/Gdk-3.0/Records/EventFocus.cs @@ -0,0 +1,7 @@ +namespace Gdk +{ + public partial class EventFocus : Event + { + + } +} diff --git a/Libs/Gdk-3.0/Records/EventGrabBroken.cs b/Libs/Gdk-3.0/Records/EventGrabBroken.cs new file mode 100644 index 000000000..9f9fa97e4 --- /dev/null +++ b/Libs/Gdk-3.0/Records/EventGrabBroken.cs @@ -0,0 +1,7 @@ +namespace Gdk +{ + public partial class EventGrabBroken : Event + { + + } +} diff --git a/Libs/Gdk-3.0/Records/EventMotion.cs b/Libs/Gdk-3.0/Records/EventMotion.cs new file mode 100644 index 000000000..4d3babb00 --- /dev/null +++ b/Libs/Gdk-3.0/Records/EventMotion.cs @@ -0,0 +1,7 @@ +namespace Gdk +{ + public partial class EventMotion : Event + { + + } +} diff --git a/Libs/Gdk-3.0/Records/EventOwnerChange.cs b/Libs/Gdk-3.0/Records/EventOwnerChange.cs new file mode 100644 index 000000000..d7638d8d8 --- /dev/null +++ b/Libs/Gdk-3.0/Records/EventOwnerChange.cs @@ -0,0 +1,7 @@ +namespace Gdk +{ + public partial class EventOwnerChange : Event + { + + } +} diff --git a/Libs/Gdk-3.0/Records/EventPadAxis.cs b/Libs/Gdk-3.0/Records/EventPadAxis.cs new file mode 100644 index 000000000..140ab1349 --- /dev/null +++ b/Libs/Gdk-3.0/Records/EventPadAxis.cs @@ -0,0 +1,7 @@ +namespace Gdk +{ + public partial class EventPadAxis : Event + { + + } +} diff --git a/Libs/Gdk-3.0/Records/EventPadButton.cs b/Libs/Gdk-3.0/Records/EventPadButton.cs new file mode 100644 index 000000000..5a7dc4fe1 --- /dev/null +++ b/Libs/Gdk-3.0/Records/EventPadButton.cs @@ -0,0 +1,7 @@ +namespace Gdk +{ + public partial class EventPadButton : Event + { + + } +} diff --git a/Libs/Gdk-3.0/Records/EventPadGroupMode.cs b/Libs/Gdk-3.0/Records/EventPadGroupMode.cs new file mode 100644 index 000000000..c28792171 --- /dev/null +++ b/Libs/Gdk-3.0/Records/EventPadGroupMode.cs @@ -0,0 +1,7 @@ +namespace Gdk +{ + public partial class EventPadGroupMode : Event + { + + } +} diff --git a/Libs/Gdk-3.0/Records/EventProperty.cs b/Libs/Gdk-3.0/Records/EventProperty.cs new file mode 100644 index 000000000..07a89ba58 --- /dev/null +++ b/Libs/Gdk-3.0/Records/EventProperty.cs @@ -0,0 +1,7 @@ +namespace Gdk +{ + public partial class EventProperty : Event + { + + } +} diff --git a/Libs/Gdk-3.0/Records/EventProximity.cs b/Libs/Gdk-3.0/Records/EventProximity.cs new file mode 100644 index 000000000..02e60525b --- /dev/null +++ b/Libs/Gdk-3.0/Records/EventProximity.cs @@ -0,0 +1,7 @@ +namespace Gdk +{ + public partial class EventProximity : Event + { + + } +} diff --git a/Libs/Gdk-3.0/Records/EventScroll.cs b/Libs/Gdk-3.0/Records/EventScroll.cs new file mode 100644 index 000000000..22cda9193 --- /dev/null +++ b/Libs/Gdk-3.0/Records/EventScroll.cs @@ -0,0 +1,7 @@ +namespace Gdk +{ + public partial class EventScroll : Event + { + + } +} diff --git a/Libs/Gdk-3.0/Records/EventSelection.cs b/Libs/Gdk-3.0/Records/EventSelection.cs new file mode 100644 index 000000000..ad36c9a0d --- /dev/null +++ b/Libs/Gdk-3.0/Records/EventSelection.cs @@ -0,0 +1,7 @@ +namespace Gdk +{ + public partial class EventSelection : Event + { + + } +} diff --git a/Libs/Gdk-3.0/Records/EventSequence.cs b/Libs/Gdk-3.0/Records/EventSequence.cs new file mode 100644 index 000000000..a0a939963 --- /dev/null +++ b/Libs/Gdk-3.0/Records/EventSequence.cs @@ -0,0 +1,7 @@ +namespace Gdk +{ + public partial class EventSequence : Event + { + + } +} diff --git a/Libs/Gdk-3.0/Records/EventSetting.cs b/Libs/Gdk-3.0/Records/EventSetting.cs new file mode 100644 index 000000000..c74feca62 --- /dev/null +++ b/Libs/Gdk-3.0/Records/EventSetting.cs @@ -0,0 +1,7 @@ +namespace Gdk +{ + public partial class EventSetting : Event + { + + } +} diff --git a/Libs/Gdk-3.0/Records/EventTouch.cs b/Libs/Gdk-3.0/Records/EventTouch.cs new file mode 100644 index 000000000..1f2a20a85 --- /dev/null +++ b/Libs/Gdk-3.0/Records/EventTouch.cs @@ -0,0 +1,7 @@ +namespace Gdk +{ + public partial class EventTouch : Event + { + + } +} diff --git a/Libs/Gdk-3.0/Records/EventTouchpadPinch.cs b/Libs/Gdk-3.0/Records/EventTouchpadPinch.cs new file mode 100644 index 000000000..a3bbcc852 --- /dev/null +++ b/Libs/Gdk-3.0/Records/EventTouchpadPinch.cs @@ -0,0 +1,7 @@ +namespace Gdk +{ + public partial class EventTouchpadPinch : Event + { + + } +} diff --git a/Libs/Gdk-3.0/Records/EventTouchpadSwipe.cs b/Libs/Gdk-3.0/Records/EventTouchpadSwipe.cs new file mode 100644 index 000000000..767ebd560 --- /dev/null +++ b/Libs/Gdk-3.0/Records/EventTouchpadSwipe.cs @@ -0,0 +1,7 @@ +namespace Gdk +{ + public partial class EventTouchpadSwipe : Event + { + + } +} diff --git a/Libs/Gdk-3.0/Records/EventVisibility.cs b/Libs/Gdk-3.0/Records/EventVisibility.cs new file mode 100644 index 000000000..1ee5b9877 --- /dev/null +++ b/Libs/Gdk-3.0/Records/EventVisibility.cs @@ -0,0 +1,7 @@ +namespace Gdk +{ + public partial class EventVisibility : Event + { + + } +} diff --git a/Libs/Gdk-3.0/Records/EventWindowState.cs b/Libs/Gdk-3.0/Records/EventWindowState.cs new file mode 100644 index 000000000..2e1fa715a --- /dev/null +++ b/Libs/Gdk-3.0/Records/EventWindowState.cs @@ -0,0 +1,7 @@ +namespace Gdk +{ + public partial class EventWindowState : Event + { + + } +} From e88c744a49494707a1d7613ef0b57ed0eb78e772 Mon Sep 17 00:00:00 2001 From: Matthew Jakeman Date: Sun, 1 Aug 2021 13:22:11 +1200 Subject: [PATCH 20/35] Disable deletion in the text editor --- Samples/Gtk3/TextEditor/Application/DocumentView.cs | 2 +- Samples/Gtk3/TextEditor/Document/Document.cs | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/Samples/Gtk3/TextEditor/Application/DocumentView.cs b/Samples/Gtk3/TextEditor/Application/DocumentView.cs index 8663d4c7d..10af35fbf 100644 --- a/Samples/Gtk3/TextEditor/Application/DocumentView.cs +++ b/Samples/Gtk3/TextEditor/Application/DocumentView.cs @@ -145,7 +145,7 @@ private void Render(object sender, DrawingArea.DrawSignalArgs e) cr.MoveTo(xDist, 30); cr.ShowText("This sample uses Cairo and a Gtk.DrawingArea to create a simple 'TextView' clone."); cr.MoveTo(xDist, 50); - cr.ShowText("Use the LEFT and RIGHT arrow keys to navigate. Press BACKSPACE to delete."); + cr.ShowText("Use the LEFT and RIGHT arrow keys to navigate."); //"Press BACKSPACE to delete."); // Draw Cursor cr.SetFontSize(16); diff --git a/Samples/Gtk3/TextEditor/Document/Document.cs b/Samples/Gtk3/TextEditor/Document/Document.cs index 3a4e5f69a..c89e5726b 100644 --- a/Samples/Gtk3/TextEditor/Document/Document.cs +++ b/Samples/Gtk3/TextEditor/Document/Document.cs @@ -128,7 +128,11 @@ public void Insert(int index, string text) public void Delete(int index, int length) { - var (deleteStartDesc, deleteStartNodeBaseIndex) = FromIndex(index); + // NOTE: Deletion is disabled as it cannot delete across piece + // boundaries. This should be implemented so the text editor is + // fully functional. + + /*var (deleteStartDesc, deleteStartNodeBaseIndex) = FromIndex(index); // Cannot delete from the end of the sequence if (deleteStartDesc == null) @@ -166,7 +170,7 @@ public void Delete(int index, int length) } // Emit document-changed event - DocumentChanged(this, EventArgs.Empty); + DocumentChanged(this, EventArgs.Empty);*/ } private Document(string data) From e28b0584d258ca599bc79f72b7757b719347def0 Mon Sep 17 00:00:00 2001 From: Matthew Jakeman Date: Sun, 1 Aug 2021 13:33:24 +1200 Subject: [PATCH 21/35] Upload generated files for debugging --- .github/workflows/ci.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e4125f898..c676a2c75 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -37,3 +37,9 @@ jobs: if: ${{ matrix.os == 'ubuntu-latest' }} run: dotnet run -- --release --xml-documentation --targets integrationTest samples working-directory: './Build' + + - name: Upload Generated Files + uses: actions/upload-artifact@v2 + with: + name: ${{ matrix.os }}-generated + path: /home/runner/work/gir.core/gir.core/Libs/ \ No newline at end of file From 620ed74656921fff5e7b70e4ff462d8f2ca34c17 Mon Sep 17 00:00:00 2001 From: Matthew Jakeman Date: Sun, 1 Aug 2021 13:35:44 +1200 Subject: [PATCH 22/35] Upload only on failure --- .github/workflows/ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c676a2c75..94135a5e0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -38,7 +38,8 @@ jobs: run: dotnet run -- --release --xml-documentation --targets integrationTest samples working-directory: './Build' - - name: Upload Generated Files + - name: Upload Generated Files on Failure + if: ${{ failure() }} uses: actions/upload-artifact@v2 with: name: ${{ matrix.os }}-generated From a030d640d874fe5ebe5471f1343697fcc3ddc408 Mon Sep 17 00:00:00 2001 From: Matthew Jakeman Date: Sun, 1 Aug 2021 13:42:16 +1200 Subject: [PATCH 23/35] Fix upload path --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 94135a5e0..9b61a1c8e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -38,9 +38,9 @@ jobs: run: dotnet run -- --release --xml-documentation --targets integrationTest samples working-directory: './Build' - - name: Upload Generated Files on Failure + - name: (Failure) Upload Generated Files if: ${{ failure() }} uses: actions/upload-artifact@v2 with: name: ${{ matrix.os }}-generated - path: /home/runner/work/gir.core/gir.core/Libs/ \ No newline at end of file + path: ${{ github.workspace }} \ No newline at end of file From d9a9461029e0f0bda391d0d746e3dbd0b96b5cbb Mon Sep 17 00:00:00 2001 From: Matthew Jakeman Date: Sun, 1 Aug 2021 23:04:06 +1200 Subject: [PATCH 24/35] CI: Exclude build artifacts (only upload source code) --- .github/workflows/ci.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9b61a1c8e..57cd1348b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -43,4 +43,7 @@ jobs: uses: actions/upload-artifact@v2 with: name: ${{ matrix.os }}-generated - path: ${{ github.workspace }} \ No newline at end of file + path: | + ${{ github.workspace }} + !**/bin + !**/obj \ No newline at end of file From cde3d7b3f90fdbc41c7061c57b6fbdf607eebb4d Mon Sep 17 00:00:00 2001 From: Matthew Jakeman Date: Sun, 1 Aug 2021 23:04:32 +1200 Subject: [PATCH 25/35] Add more helpful logging for WriteSignalArgsProperties --- Generator/Extensions/ParameterListExtension.cs | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/Generator/Extensions/ParameterListExtension.cs b/Generator/Extensions/ParameterListExtension.cs index ebb8d74b0..7200d7e5b 100644 --- a/Generator/Extensions/ParameterListExtension.cs +++ b/Generator/Extensions/ParameterListExtension.cs @@ -87,11 +87,19 @@ public static string WriteSignalArgsProperties(this ParameterList parameterList, var index = 0; foreach (var argument in parameterList.GetParameters()) { - index += 1; - var type = argument.WriteType(Target.Managed, currentNamespace); - var name = new GirLoader.Helper.String(argument.Name).ToPascalCase(); - - builder.AppendLine($"public {type} {name} => Args[{index}].Extract<{type}>();"); + try + { + index += 1; + var type = argument.WriteType(Target.Managed, currentNamespace); + var name = new GirLoader.Helper.String(argument.Name).ToPascalCase(); + + builder.AppendLine($"public {type} {name} => Args[{index}].Extract<{type}>();"); + } + catch (Exception e) + { + Log.Error($"Could not write signal properties for {argument.Name}: {e.Message}"); + throw; + } } return builder.ToString(); From 41106fbc0ba023823c1107e696ae52a2a400fd30 Mon Sep 17 00:00:00 2001 From: badcel <1218031+badcel@users.noreply.github.com> Date: Sat, 7 Aug 2021 08:56:10 +0200 Subject: [PATCH 26/35] Fix remaining merge error --- Generator/Extensions/AnyTypeExtension.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Generator/Extensions/AnyTypeExtension.cs b/Generator/Extensions/AnyTypeExtension.cs index f41adb7a4..4a786ec2f 100644 --- a/Generator/Extensions/AnyTypeExtension.cs +++ b/Generator/Extensions/AnyTypeExtension.cs @@ -37,7 +37,7 @@ private static string WriteNativeType(AnyType anyType, Namespace currentNamespac // References to records which are not using a pointer { TypeReference: ArrayTypeReference { Type: Record r, TypeReference: { CTypeReference: { IsPointer: false } } } } => GetStructName(r, currentNamespace) + "[]", { TypeReference: ArrayTypeReference { Type: Record r, TypeReference: { CTypeReference: null } } } => GetStructName(r, currentNamespace) + "[]", - { TypeReference: { ResolvedType: Record r, CTypeReference: { IsPointer: false } } } => GetStructName(r, currentNamespace), + { TypeReference: { Type: Record r, CTypeReference: { IsPointer: false } } } => GetStructName(r, currentNamespace), // References to records which are using a pointer { TypeReference: ArrayTypeReference { Type: Record, TypeReference: { CTypeReference: { IsPointer: true } } } } => "IntPtr[]", //Array of SafeHandle not supported by runtime @@ -46,7 +46,7 @@ private static string WriteNativeType(AnyType anyType, Namespace currentNamespac // References to unions which are not using a pointer { TypeReference: ArrayTypeReference { Type: Union u, TypeReference: { CTypeReference: { IsPointer: false } } } } => GetStructName(u, currentNamespace) + "[]", { TypeReference: ArrayTypeReference { Type: Union u, TypeReference: { CTypeReference: null } } } => GetStructName(u, currentNamespace) + "[]", - { TypeReference: { ResolvedType: Union u, CTypeReference: { IsPointer: false } } } => GetStructName(u, currentNamespace), + { TypeReference: { Type: Union u, CTypeReference: { IsPointer: false } } } => GetStructName(u, currentNamespace), // References to unions which are using a pointer { TypeReference: ArrayTypeReference { Type: Union, TypeReference: { CTypeReference: { IsPointer: true } } } } => "IntPtr[]", //Array of SafeHandle not supported by runtime @@ -57,8 +57,8 @@ private static string WriteNativeType(AnyType anyType, Namespace currentNamespac { TypeReference: { Type: PrimitiveValueType s } } => s.Write(Target.Native, currentNamespace), // Enumerations - Marshal directly - { TypeReference: ArrayTypeReference { ResolvedType: Enumeration } } => anyType.TypeReference.ResolvedType.Write(Target.Native, currentNamespace) + "[]", - { TypeReference: { ResolvedType: Enumeration } } => anyType.TypeReference.ResolvedType.Write(Target.Native, currentNamespace), + { TypeReference: ArrayTypeReference { Type: Enumeration } } => anyType.TypeReference.Type.Write(Target.Native, currentNamespace) + "[]", + { TypeReference: { Type: Enumeration } } => anyType.TypeReference.Type.Write(Target.Native, currentNamespace), // Short path for strings as strings are pointers which should not be handled as pointers { TypeReference: { Type: String r } } => r.Name, From 4c34e37c4950987ff621c989e4891b579e00e4b2 Mon Sep 17 00:00:00 2001 From: badcel <1218031+badcel@users.noreply.github.com> Date: Sat, 7 Aug 2021 09:19:23 +0200 Subject: [PATCH 27/35] Update solution --- GirCore.sln | 121 +++++++++++++++++++--------------------------------- 1 file changed, 44 insertions(+), 77 deletions(-) diff --git a/GirCore.sln b/GirCore.sln index cce42ed22..16de37ecc 100644 --- a/GirCore.sln +++ b/GirCore.sln @@ -51,12 +51,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Libs", "Libs", "{46D66262-F EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GObject-2.0.Tests", "Tests\Libs\GObject-2.0.Tests\GObject-2.0.Tests.csproj", "{53101A81-CB4A-4589-AEB1-0E229D17AE7A}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "CompositeTemplates", "CompositeTemplates", "{A8E40ED1-550F-4168-8299-64EFB875CD44}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NoSourceGenerator", "Samples\Gtk3\CompositeTemplates\NoSourceGenerator\NoSourceGenerator.csproj", "{BC44EB45-DFA6-44B8-9B19-0C0AB2B856E6}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UsingSourceGenerator", "Samples\Gtk3\CompositeTemplates\UsingSourceGenerator\UsingSourceGenerator.csproj", "{0231E616-62C8-4316-9355-326537C07651}" -EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Generator", "Generator\Generator.csproj", "{28F5A326-D1F9-42E7-985F-C69E01DB4C4E}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GirLoader", "GirLoader\GirLoader.csproj", "{8385F95E-E778-44EF-96F2-8F357B1B6348}" @@ -73,10 +67,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestMemoryLeaks", "Samples\ EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Atk-1.0", "Libs\Atk-1.0\Atk-1.0.csproj", "{C2432595-F82E-4DF1-96FA-BD6B4D470010}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Builder", "Samples\Gtk3\Builder\Builder.csproj", "{537015CF-AE85-4DC2-AE5C-653B213C5BEA}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GtkApp", "Samples\Gtk3\GtkApp\GtkApp.csproj", "{749EE7C7-D85E-496D-B127-948E0157AF3E}" -EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Window", "Samples\Gtk3\Window\Window.csproj", "{F450E603-4DCA-473A-A9D6-EAD96421F338}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestLoading", "Samples\GdkPixbuf\TestLoading\TestLoading.csproj", "{2BB1527F-D7A1-44BA-A297-4E69A3A4411C}" @@ -87,7 +77,11 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DeclarativeUi", "Samples\Gt EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AboutDialog", "Samples\Gtk3\AboutDialog\AboutDialog.csproj", "{35D35175-A160-4557-BE3E-9BCB296C61A1}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GirLoader.Tests", "Tests\GirLoader.Tests\GirLoader.Tests.csproj", "{F0DEDEEB-7370-47AB-A5CD-56ECF50EF770}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GirLoader.Tests", "Tests\GirLoader.Tests\GirLoader.Tests.csproj", "{189A1440-3BFE-432E-8F43-931D1B571DCA}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DrawingArea", "Samples\Gtk3\DrawingArea\DrawingArea.csproj", "{F1A41389-B4AD-4D0F-8C44-918BF3A6A57F}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TextEditor", "Samples\Gtk3\TextEditor\TextEditor.csproj", "{2510B0C1-793D-4EA7-A296-F54F881C94C8}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -330,30 +324,6 @@ Global {53101A81-CB4A-4589-AEB1-0E229D17AE7A}.Release|x64.Build.0 = Release|Any CPU {53101A81-CB4A-4589-AEB1-0E229D17AE7A}.Release|x86.ActiveCfg = Release|Any CPU {53101A81-CB4A-4589-AEB1-0E229D17AE7A}.Release|x86.Build.0 = Release|Any CPU - {BC44EB45-DFA6-44B8-9B19-0C0AB2B856E6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {BC44EB45-DFA6-44B8-9B19-0C0AB2B856E6}.Debug|Any CPU.Build.0 = Debug|Any CPU - {BC44EB45-DFA6-44B8-9B19-0C0AB2B856E6}.Debug|x64.ActiveCfg = Debug|Any CPU - {BC44EB45-DFA6-44B8-9B19-0C0AB2B856E6}.Debug|x64.Build.0 = Debug|Any CPU - {BC44EB45-DFA6-44B8-9B19-0C0AB2B856E6}.Debug|x86.ActiveCfg = Debug|Any CPU - {BC44EB45-DFA6-44B8-9B19-0C0AB2B856E6}.Debug|x86.Build.0 = Debug|Any CPU - {BC44EB45-DFA6-44B8-9B19-0C0AB2B856E6}.Release|Any CPU.ActiveCfg = Release|Any CPU - {BC44EB45-DFA6-44B8-9B19-0C0AB2B856E6}.Release|Any CPU.Build.0 = Release|Any CPU - {BC44EB45-DFA6-44B8-9B19-0C0AB2B856E6}.Release|x64.ActiveCfg = Release|Any CPU - {BC44EB45-DFA6-44B8-9B19-0C0AB2B856E6}.Release|x64.Build.0 = Release|Any CPU - {BC44EB45-DFA6-44B8-9B19-0C0AB2B856E6}.Release|x86.ActiveCfg = Release|Any CPU - {BC44EB45-DFA6-44B8-9B19-0C0AB2B856E6}.Release|x86.Build.0 = Release|Any CPU - {0231E616-62C8-4316-9355-326537C07651}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {0231E616-62C8-4316-9355-326537C07651}.Debug|Any CPU.Build.0 = Debug|Any CPU - {0231E616-62C8-4316-9355-326537C07651}.Debug|x64.ActiveCfg = Debug|Any CPU - {0231E616-62C8-4316-9355-326537C07651}.Debug|x64.Build.0 = Debug|Any CPU - {0231E616-62C8-4316-9355-326537C07651}.Debug|x86.ActiveCfg = Debug|Any CPU - {0231E616-62C8-4316-9355-326537C07651}.Debug|x86.Build.0 = Debug|Any CPU - {0231E616-62C8-4316-9355-326537C07651}.Release|Any CPU.ActiveCfg = Release|Any CPU - {0231E616-62C8-4316-9355-326537C07651}.Release|Any CPU.Build.0 = Release|Any CPU - {0231E616-62C8-4316-9355-326537C07651}.Release|x64.ActiveCfg = Release|Any CPU - {0231E616-62C8-4316-9355-326537C07651}.Release|x64.Build.0 = Release|Any CPU - {0231E616-62C8-4316-9355-326537C07651}.Release|x86.ActiveCfg = Release|Any CPU - {0231E616-62C8-4316-9355-326537C07651}.Release|x86.Build.0 = Release|Any CPU {28F5A326-D1F9-42E7-985F-C69E01DB4C4E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {28F5A326-D1F9-42E7-985F-C69E01DB4C4E}.Debug|Any CPU.Build.0 = Debug|Any CPU {28F5A326-D1F9-42E7-985F-C69E01DB4C4E}.Debug|x64.ActiveCfg = Debug|Any CPU @@ -438,30 +408,6 @@ Global {C2432595-F82E-4DF1-96FA-BD6B4D470010}.Release|x64.Build.0 = Release|Any CPU {C2432595-F82E-4DF1-96FA-BD6B4D470010}.Release|x86.ActiveCfg = Release|Any CPU {C2432595-F82E-4DF1-96FA-BD6B4D470010}.Release|x86.Build.0 = Release|Any CPU - {537015CF-AE85-4DC2-AE5C-653B213C5BEA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {537015CF-AE85-4DC2-AE5C-653B213C5BEA}.Debug|Any CPU.Build.0 = Debug|Any CPU - {537015CF-AE85-4DC2-AE5C-653B213C5BEA}.Debug|x64.ActiveCfg = Debug|Any CPU - {537015CF-AE85-4DC2-AE5C-653B213C5BEA}.Debug|x64.Build.0 = Debug|Any CPU - {537015CF-AE85-4DC2-AE5C-653B213C5BEA}.Debug|x86.ActiveCfg = Debug|Any CPU - {537015CF-AE85-4DC2-AE5C-653B213C5BEA}.Debug|x86.Build.0 = Debug|Any CPU - {537015CF-AE85-4DC2-AE5C-653B213C5BEA}.Release|Any CPU.ActiveCfg = Release|Any CPU - {537015CF-AE85-4DC2-AE5C-653B213C5BEA}.Release|Any CPU.Build.0 = Release|Any CPU - {537015CF-AE85-4DC2-AE5C-653B213C5BEA}.Release|x64.ActiveCfg = Release|Any CPU - {537015CF-AE85-4DC2-AE5C-653B213C5BEA}.Release|x64.Build.0 = Release|Any CPU - {537015CF-AE85-4DC2-AE5C-653B213C5BEA}.Release|x86.ActiveCfg = Release|Any CPU - {537015CF-AE85-4DC2-AE5C-653B213C5BEA}.Release|x86.Build.0 = Release|Any CPU - {749EE7C7-D85E-496D-B127-948E0157AF3E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {749EE7C7-D85E-496D-B127-948E0157AF3E}.Debug|Any CPU.Build.0 = Debug|Any CPU - {749EE7C7-D85E-496D-B127-948E0157AF3E}.Debug|x64.ActiveCfg = Debug|Any CPU - {749EE7C7-D85E-496D-B127-948E0157AF3E}.Debug|x64.Build.0 = Debug|Any CPU - {749EE7C7-D85E-496D-B127-948E0157AF3E}.Debug|x86.ActiveCfg = Debug|Any CPU - {749EE7C7-D85E-496D-B127-948E0157AF3E}.Debug|x86.Build.0 = Debug|Any CPU - {749EE7C7-D85E-496D-B127-948E0157AF3E}.Release|Any CPU.ActiveCfg = Release|Any CPU - {749EE7C7-D85E-496D-B127-948E0157AF3E}.Release|Any CPU.Build.0 = Release|Any CPU - {749EE7C7-D85E-496D-B127-948E0157AF3E}.Release|x64.ActiveCfg = Release|Any CPU - {749EE7C7-D85E-496D-B127-948E0157AF3E}.Release|x64.Build.0 = Release|Any CPU - {749EE7C7-D85E-496D-B127-948E0157AF3E}.Release|x86.ActiveCfg = Release|Any CPU - {749EE7C7-D85E-496D-B127-948E0157AF3E}.Release|x86.Build.0 = Release|Any CPU {F450E603-4DCA-473A-A9D6-EAD96421F338}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {F450E603-4DCA-473A-A9D6-EAD96421F338}.Debug|Any CPU.Build.0 = Debug|Any CPU {F450E603-4DCA-473A-A9D6-EAD96421F338}.Debug|x64.ActiveCfg = Debug|Any CPU @@ -522,18 +468,42 @@ Global {35D35175-A160-4557-BE3E-9BCB296C61A1}.Release|x64.Build.0 = Release|Any CPU {35D35175-A160-4557-BE3E-9BCB296C61A1}.Release|x86.ActiveCfg = Release|Any CPU {35D35175-A160-4557-BE3E-9BCB296C61A1}.Release|x86.Build.0 = Release|Any CPU - {F0DEDEEB-7370-47AB-A5CD-56ECF50EF770}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {F0DEDEEB-7370-47AB-A5CD-56ECF50EF770}.Debug|Any CPU.Build.0 = Debug|Any CPU - {F0DEDEEB-7370-47AB-A5CD-56ECF50EF770}.Debug|x64.ActiveCfg = Debug|Any CPU - {F0DEDEEB-7370-47AB-A5CD-56ECF50EF770}.Debug|x64.Build.0 = Debug|Any CPU - {F0DEDEEB-7370-47AB-A5CD-56ECF50EF770}.Debug|x86.ActiveCfg = Debug|Any CPU - {F0DEDEEB-7370-47AB-A5CD-56ECF50EF770}.Debug|x86.Build.0 = Debug|Any CPU - {F0DEDEEB-7370-47AB-A5CD-56ECF50EF770}.Release|Any CPU.ActiveCfg = Release|Any CPU - {F0DEDEEB-7370-47AB-A5CD-56ECF50EF770}.Release|Any CPU.Build.0 = Release|Any CPU - {F0DEDEEB-7370-47AB-A5CD-56ECF50EF770}.Release|x64.ActiveCfg = Release|Any CPU - {F0DEDEEB-7370-47AB-A5CD-56ECF50EF770}.Release|x64.Build.0 = Release|Any CPU - {F0DEDEEB-7370-47AB-A5CD-56ECF50EF770}.Release|x86.ActiveCfg = Release|Any CPU - {F0DEDEEB-7370-47AB-A5CD-56ECF50EF770}.Release|x86.Build.0 = Release|Any CPU + {189A1440-3BFE-432E-8F43-931D1B571DCA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {189A1440-3BFE-432E-8F43-931D1B571DCA}.Debug|Any CPU.Build.0 = Debug|Any CPU + {189A1440-3BFE-432E-8F43-931D1B571DCA}.Debug|x64.ActiveCfg = Debug|Any CPU + {189A1440-3BFE-432E-8F43-931D1B571DCA}.Debug|x64.Build.0 = Debug|Any CPU + {189A1440-3BFE-432E-8F43-931D1B571DCA}.Debug|x86.ActiveCfg = Debug|Any CPU + {189A1440-3BFE-432E-8F43-931D1B571DCA}.Debug|x86.Build.0 = Debug|Any CPU + {189A1440-3BFE-432E-8F43-931D1B571DCA}.Release|Any CPU.ActiveCfg = Release|Any CPU + {189A1440-3BFE-432E-8F43-931D1B571DCA}.Release|Any CPU.Build.0 = Release|Any CPU + {189A1440-3BFE-432E-8F43-931D1B571DCA}.Release|x64.ActiveCfg = Release|Any CPU + {189A1440-3BFE-432E-8F43-931D1B571DCA}.Release|x64.Build.0 = Release|Any CPU + {189A1440-3BFE-432E-8F43-931D1B571DCA}.Release|x86.ActiveCfg = Release|Any CPU + {189A1440-3BFE-432E-8F43-931D1B571DCA}.Release|x86.Build.0 = Release|Any CPU + {F1A41389-B4AD-4D0F-8C44-918BF3A6A57F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F1A41389-B4AD-4D0F-8C44-918BF3A6A57F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F1A41389-B4AD-4D0F-8C44-918BF3A6A57F}.Debug|x64.ActiveCfg = Debug|Any CPU + {F1A41389-B4AD-4D0F-8C44-918BF3A6A57F}.Debug|x64.Build.0 = Debug|Any CPU + {F1A41389-B4AD-4D0F-8C44-918BF3A6A57F}.Debug|x86.ActiveCfg = Debug|Any CPU + {F1A41389-B4AD-4D0F-8C44-918BF3A6A57F}.Debug|x86.Build.0 = Debug|Any CPU + {F1A41389-B4AD-4D0F-8C44-918BF3A6A57F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F1A41389-B4AD-4D0F-8C44-918BF3A6A57F}.Release|Any CPU.Build.0 = Release|Any CPU + {F1A41389-B4AD-4D0F-8C44-918BF3A6A57F}.Release|x64.ActiveCfg = Release|Any CPU + {F1A41389-B4AD-4D0F-8C44-918BF3A6A57F}.Release|x64.Build.0 = Release|Any CPU + {F1A41389-B4AD-4D0F-8C44-918BF3A6A57F}.Release|x86.ActiveCfg = Release|Any CPU + {F1A41389-B4AD-4D0F-8C44-918BF3A6A57F}.Release|x86.Build.0 = Release|Any CPU + {2510B0C1-793D-4EA7-A296-F54F881C94C8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2510B0C1-793D-4EA7-A296-F54F881C94C8}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2510B0C1-793D-4EA7-A296-F54F881C94C8}.Debug|x64.ActiveCfg = Debug|Any CPU + {2510B0C1-793D-4EA7-A296-F54F881C94C8}.Debug|x64.Build.0 = Debug|Any CPU + {2510B0C1-793D-4EA7-A296-F54F881C94C8}.Debug|x86.ActiveCfg = Debug|Any CPU + {2510B0C1-793D-4EA7-A296-F54F881C94C8}.Debug|x86.Build.0 = Debug|Any CPU + {2510B0C1-793D-4EA7-A296-F54F881C94C8}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2510B0C1-793D-4EA7-A296-F54F881C94C8}.Release|Any CPU.Build.0 = Release|Any CPU + {2510B0C1-793D-4EA7-A296-F54F881C94C8}.Release|x64.ActiveCfg = Release|Any CPU + {2510B0C1-793D-4EA7-A296-F54F881C94C8}.Release|x64.Build.0 = Release|Any CPU + {2510B0C1-793D-4EA7-A296-F54F881C94C8}.Release|x86.ActiveCfg = Release|Any CPU + {2510B0C1-793D-4EA7-A296-F54F881C94C8}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(NestedProjects) = preSolution {BF7F9B0B-CB43-4161-BFAD-C6EE479FC86B} = {386AE10F-B7AC-4C97-AC5C-202D3662A868} @@ -555,22 +525,19 @@ Global {EAC7D6FF-4BEF-4A24-89A0-600FD686C537} = {8BC11A63-D52B-40CB-9DDD-CD7C6DC21059} {46D66262-FC61-43B9-8E76-A361FA3D6C81} = {8BC11A63-D52B-40CB-9DDD-CD7C6DC21059} {53101A81-CB4A-4589-AEB1-0E229D17AE7A} = {46D66262-FC61-43B9-8E76-A361FA3D6C81} - {A8E40ED1-550F-4168-8299-64EFB875CD44} = {79FE88D9-9545-4AE8-80AF-8E2E2E55E8A3} - {BC44EB45-DFA6-44B8-9B19-0C0AB2B856E6} = {A8E40ED1-550F-4168-8299-64EFB875CD44} - {0231E616-62C8-4316-9355-326537C07651} = {A8E40ED1-550F-4168-8299-64EFB875CD44} {B4C179CA-89E5-4638-BAEC-8E37B5BBED12} = {386AE10F-B7AC-4C97-AC5C-202D3662A868} {8E6A242B-B0E6-4DA2-ABA3-6389D65AED5E} = {46D66262-FC61-43B9-8E76-A361FA3D6C81} {76DD0496-67BC-4B86-BBE1-5648CAF0C719} = {46D66262-FC61-43B9-8E76-A361FA3D6C81} {7A71B07F-B28B-4DDA-B1EA-565194056951} = {1F2E4087-585C-4B48-8E3D-700D949A15DB} {46E769E2-FEC7-43EA-99B8-E7A7294D68B2} = {7A71B07F-B28B-4DDA-B1EA-565194056951} {C2432595-F82E-4DF1-96FA-BD6B4D470010} = {386AE10F-B7AC-4C97-AC5C-202D3662A868} - {537015CF-AE85-4DC2-AE5C-653B213C5BEA} = {79FE88D9-9545-4AE8-80AF-8E2E2E55E8A3} - {749EE7C7-D85E-496D-B127-948E0157AF3E} = {79FE88D9-9545-4AE8-80AF-8E2E2E55E8A3} {F450E603-4DCA-473A-A9D6-EAD96421F338} = {79FE88D9-9545-4AE8-80AF-8E2E2E55E8A3} {2BB1527F-D7A1-44BA-A297-4E69A3A4411C} = {7A71B07F-B28B-4DDA-B1EA-565194056951} {F86D983A-9881-4BE7-AF92-FA0CE41FB319} = {46D66262-FC61-43B9-8E76-A361FA3D6C81} {59E6AF5C-5F8A-4735-9F95-6457CC17C075} = {79FE88D9-9545-4AE8-80AF-8E2E2E55E8A3} {35D35175-A160-4557-BE3E-9BCB296C61A1} = {79FE88D9-9545-4AE8-80AF-8E2E2E55E8A3} - {F0DEDEEB-7370-47AB-A5CD-56ECF50EF770} = {8BC11A63-D52B-40CB-9DDD-CD7C6DC21059} + {189A1440-3BFE-432E-8F43-931D1B571DCA} = {8BC11A63-D52B-40CB-9DDD-CD7C6DC21059} + {F1A41389-B4AD-4D0F-8C44-918BF3A6A57F} = {79FE88D9-9545-4AE8-80AF-8E2E2E55E8A3} + {2510B0C1-793D-4EA7-A296-F54F881C94C8} = {79FE88D9-9545-4AE8-80AF-8E2E2E55E8A3} EndGlobalSection EndGlobal From 0b25b474fb8f15e55100239e4ecbf20181c885a8 Mon Sep 17 00:00:00 2001 From: badcel <1218031+badcel@users.noreply.github.com> Date: Sat, 7 Aug 2021 11:40:05 +0200 Subject: [PATCH 28/35] Add xlib / gmodule --- GirCore.sln | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/GirCore.sln b/GirCore.sln index 16de37ecc..4b77a6596 100644 --- a/GirCore.sln +++ b/GirCore.sln @@ -83,6 +83,10 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DrawingArea", "Samples\Gtk3 EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TextEditor", "Samples\Gtk3\TextEditor\TextEditor.csproj", "{2510B0C1-793D-4EA7-A296-F54F881C94C8}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GModule-2.0", "Libs\GModule-2.0\GModule-2.0.csproj", "{18F855B9-1E9A-4B43-925A-1F33FF9071D3}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "xlib-2.0", "Libs\xlib-2.0\xlib-2.0.csproj", "{1336F04C-9088-46F3-B93A-6F51A80240EA}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -504,6 +508,30 @@ Global {2510B0C1-793D-4EA7-A296-F54F881C94C8}.Release|x64.Build.0 = Release|Any CPU {2510B0C1-793D-4EA7-A296-F54F881C94C8}.Release|x86.ActiveCfg = Release|Any CPU {2510B0C1-793D-4EA7-A296-F54F881C94C8}.Release|x86.Build.0 = Release|Any CPU + {18F855B9-1E9A-4B43-925A-1F33FF9071D3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {18F855B9-1E9A-4B43-925A-1F33FF9071D3}.Debug|Any CPU.Build.0 = Debug|Any CPU + {18F855B9-1E9A-4B43-925A-1F33FF9071D3}.Debug|x64.ActiveCfg = Debug|Any CPU + {18F855B9-1E9A-4B43-925A-1F33FF9071D3}.Debug|x64.Build.0 = Debug|Any CPU + {18F855B9-1E9A-4B43-925A-1F33FF9071D3}.Debug|x86.ActiveCfg = Debug|Any CPU + {18F855B9-1E9A-4B43-925A-1F33FF9071D3}.Debug|x86.Build.0 = Debug|Any CPU + {18F855B9-1E9A-4B43-925A-1F33FF9071D3}.Release|Any CPU.ActiveCfg = Release|Any CPU + {18F855B9-1E9A-4B43-925A-1F33FF9071D3}.Release|Any CPU.Build.0 = Release|Any CPU + {18F855B9-1E9A-4B43-925A-1F33FF9071D3}.Release|x64.ActiveCfg = Release|Any CPU + {18F855B9-1E9A-4B43-925A-1F33FF9071D3}.Release|x64.Build.0 = Release|Any CPU + {18F855B9-1E9A-4B43-925A-1F33FF9071D3}.Release|x86.ActiveCfg = Release|Any CPU + {18F855B9-1E9A-4B43-925A-1F33FF9071D3}.Release|x86.Build.0 = Release|Any CPU + {1336F04C-9088-46F3-B93A-6F51A80240EA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1336F04C-9088-46F3-B93A-6F51A80240EA}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1336F04C-9088-46F3-B93A-6F51A80240EA}.Debug|x64.ActiveCfg = Debug|Any CPU + {1336F04C-9088-46F3-B93A-6F51A80240EA}.Debug|x64.Build.0 = Debug|Any CPU + {1336F04C-9088-46F3-B93A-6F51A80240EA}.Debug|x86.ActiveCfg = Debug|Any CPU + {1336F04C-9088-46F3-B93A-6F51A80240EA}.Debug|x86.Build.0 = Debug|Any CPU + {1336F04C-9088-46F3-B93A-6F51A80240EA}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1336F04C-9088-46F3-B93A-6F51A80240EA}.Release|Any CPU.Build.0 = Release|Any CPU + {1336F04C-9088-46F3-B93A-6F51A80240EA}.Release|x64.ActiveCfg = Release|Any CPU + {1336F04C-9088-46F3-B93A-6F51A80240EA}.Release|x64.Build.0 = Release|Any CPU + {1336F04C-9088-46F3-B93A-6F51A80240EA}.Release|x86.ActiveCfg = Release|Any CPU + {1336F04C-9088-46F3-B93A-6F51A80240EA}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(NestedProjects) = preSolution {BF7F9B0B-CB43-4161-BFAD-C6EE479FC86B} = {386AE10F-B7AC-4C97-AC5C-202D3662A868} @@ -539,5 +567,7 @@ Global {189A1440-3BFE-432E-8F43-931D1B571DCA} = {8BC11A63-D52B-40CB-9DDD-CD7C6DC21059} {F1A41389-B4AD-4D0F-8C44-918BF3A6A57F} = {79FE88D9-9545-4AE8-80AF-8E2E2E55E8A3} {2510B0C1-793D-4EA7-A296-F54F881C94C8} = {79FE88D9-9545-4AE8-80AF-8E2E2E55E8A3} + {18F855B9-1E9A-4B43-925A-1F33FF9071D3} = {386AE10F-B7AC-4C97-AC5C-202D3662A868} + {1336F04C-9088-46F3-B93A-6F51A80240EA} = {386AE10F-B7AC-4C97-AC5C-202D3662A868} EndGlobalSection EndGlobal From 2161cc3984ef8274f4e91f90d855450006ce3f91 Mon Sep 17 00:00:00 2001 From: badcel <1218031+badcel@users.noreply.github.com> Date: Sat, 7 Aug 2021 15:38:09 +0200 Subject: [PATCH 29/35] Cleanup - Remove unused projects - Remove launchSettings.json --- Build/Properties/launchSettings.json | 9 --------- GirCore.sln | 30 ---------------------------- Libs/GModule-2.0/GModule-2.0.csproj | 10 ---------- Libs/xlib-2.0/xlib-2.0.csproj | 12 ----------- 4 files changed, 61 deletions(-) delete mode 100644 Build/Properties/launchSettings.json delete mode 100644 Libs/GModule-2.0/GModule-2.0.csproj delete mode 100644 Libs/xlib-2.0/xlib-2.0.csproj diff --git a/Build/Properties/launchSettings.json b/Build/Properties/launchSettings.json deleted file mode 100644 index 6cd231530..000000000 --- a/Build/Properties/launchSettings.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "profiles": { - "Build": { - "commandName": "Project", - "commandLineArgs": "-- --disable-async", - "workingDirectory": "C:\\Users\\mjake\\Documents\\Projects\\gir.core\\Build" - } - } -} \ No newline at end of file diff --git a/GirCore.sln b/GirCore.sln index 4b77a6596..16de37ecc 100644 --- a/GirCore.sln +++ b/GirCore.sln @@ -83,10 +83,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DrawingArea", "Samples\Gtk3 EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TextEditor", "Samples\Gtk3\TextEditor\TextEditor.csproj", "{2510B0C1-793D-4EA7-A296-F54F881C94C8}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GModule-2.0", "Libs\GModule-2.0\GModule-2.0.csproj", "{18F855B9-1E9A-4B43-925A-1F33FF9071D3}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "xlib-2.0", "Libs\xlib-2.0\xlib-2.0.csproj", "{1336F04C-9088-46F3-B93A-6F51A80240EA}" -EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -508,30 +504,6 @@ Global {2510B0C1-793D-4EA7-A296-F54F881C94C8}.Release|x64.Build.0 = Release|Any CPU {2510B0C1-793D-4EA7-A296-F54F881C94C8}.Release|x86.ActiveCfg = Release|Any CPU {2510B0C1-793D-4EA7-A296-F54F881C94C8}.Release|x86.Build.0 = Release|Any CPU - {18F855B9-1E9A-4B43-925A-1F33FF9071D3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {18F855B9-1E9A-4B43-925A-1F33FF9071D3}.Debug|Any CPU.Build.0 = Debug|Any CPU - {18F855B9-1E9A-4B43-925A-1F33FF9071D3}.Debug|x64.ActiveCfg = Debug|Any CPU - {18F855B9-1E9A-4B43-925A-1F33FF9071D3}.Debug|x64.Build.0 = Debug|Any CPU - {18F855B9-1E9A-4B43-925A-1F33FF9071D3}.Debug|x86.ActiveCfg = Debug|Any CPU - {18F855B9-1E9A-4B43-925A-1F33FF9071D3}.Debug|x86.Build.0 = Debug|Any CPU - {18F855B9-1E9A-4B43-925A-1F33FF9071D3}.Release|Any CPU.ActiveCfg = Release|Any CPU - {18F855B9-1E9A-4B43-925A-1F33FF9071D3}.Release|Any CPU.Build.0 = Release|Any CPU - {18F855B9-1E9A-4B43-925A-1F33FF9071D3}.Release|x64.ActiveCfg = Release|Any CPU - {18F855B9-1E9A-4B43-925A-1F33FF9071D3}.Release|x64.Build.0 = Release|Any CPU - {18F855B9-1E9A-4B43-925A-1F33FF9071D3}.Release|x86.ActiveCfg = Release|Any CPU - {18F855B9-1E9A-4B43-925A-1F33FF9071D3}.Release|x86.Build.0 = Release|Any CPU - {1336F04C-9088-46F3-B93A-6F51A80240EA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {1336F04C-9088-46F3-B93A-6F51A80240EA}.Debug|Any CPU.Build.0 = Debug|Any CPU - {1336F04C-9088-46F3-B93A-6F51A80240EA}.Debug|x64.ActiveCfg = Debug|Any CPU - {1336F04C-9088-46F3-B93A-6F51A80240EA}.Debug|x64.Build.0 = Debug|Any CPU - {1336F04C-9088-46F3-B93A-6F51A80240EA}.Debug|x86.ActiveCfg = Debug|Any CPU - {1336F04C-9088-46F3-B93A-6F51A80240EA}.Debug|x86.Build.0 = Debug|Any CPU - {1336F04C-9088-46F3-B93A-6F51A80240EA}.Release|Any CPU.ActiveCfg = Release|Any CPU - {1336F04C-9088-46F3-B93A-6F51A80240EA}.Release|Any CPU.Build.0 = Release|Any CPU - {1336F04C-9088-46F3-B93A-6F51A80240EA}.Release|x64.ActiveCfg = Release|Any CPU - {1336F04C-9088-46F3-B93A-6F51A80240EA}.Release|x64.Build.0 = Release|Any CPU - {1336F04C-9088-46F3-B93A-6F51A80240EA}.Release|x86.ActiveCfg = Release|Any CPU - {1336F04C-9088-46F3-B93A-6F51A80240EA}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(NestedProjects) = preSolution {BF7F9B0B-CB43-4161-BFAD-C6EE479FC86B} = {386AE10F-B7AC-4C97-AC5C-202D3662A868} @@ -567,7 +539,5 @@ Global {189A1440-3BFE-432E-8F43-931D1B571DCA} = {8BC11A63-D52B-40CB-9DDD-CD7C6DC21059} {F1A41389-B4AD-4D0F-8C44-918BF3A6A57F} = {79FE88D9-9545-4AE8-80AF-8E2E2E55E8A3} {2510B0C1-793D-4EA7-A296-F54F881C94C8} = {79FE88D9-9545-4AE8-80AF-8E2E2E55E8A3} - {18F855B9-1E9A-4B43-925A-1F33FF9071D3} = {386AE10F-B7AC-4C97-AC5C-202D3662A868} - {1336F04C-9088-46F3-B93A-6F51A80240EA} = {386AE10F-B7AC-4C97-AC5C-202D3662A868} EndGlobalSection EndGlobal diff --git a/Libs/GModule-2.0/GModule-2.0.csproj b/Libs/GModule-2.0/GModule-2.0.csproj deleted file mode 100644 index 8776c3751..000000000 --- a/Libs/GModule-2.0/GModule-2.0.csproj +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - Gir.GModule - GModule - - diff --git a/Libs/xlib-2.0/xlib-2.0.csproj b/Libs/xlib-2.0/xlib-2.0.csproj deleted file mode 100644 index a80a5dac3..000000000 --- a/Libs/xlib-2.0/xlib-2.0.csproj +++ /dev/null @@ -1,12 +0,0 @@ - - - - Gir.xlib - xlib - - - - - - - From 2e2575061fca2cbdc7f359195e59ec7411ed998b Mon Sep 17 00:00:00 2001 From: badcel <1218031+badcel@users.noreply.github.com> Date: Sat, 7 Aug 2021 18:55:23 +0200 Subject: [PATCH 30/35] Try to avoid factory methods. It can not be avoided completely, du to data structures of GDK.Event. Hopefully the workaround gets obsolete once we support GDK4. --- Generator/Convert.cs | 10 +-- Generator/Templates/record.sbntxt | 10 +-- Libs/GObject-2.0/Classes/Object.Properties.cs | 2 +- .../Native/Classes/BoxedWrapper.cs | 68 +++++++++++++++++++ .../Native/Classes/RecordWrapper.cs | 44 ------------ Libs/GObject-2.0/Records/Value.cs | 4 +- Libs/Gdk-3.0/Records/Event.cs | 50 +++++++------- Libs/Gio-2.0/Classes/DBusConnection.cs | 4 +- Libs/Gtk-3.0/Classes/TreeSelection.cs | 2 +- 9 files changed, 107 insertions(+), 87 deletions(-) create mode 100644 Libs/GObject-2.0/Native/Classes/BoxedWrapper.cs delete mode 100644 Libs/GObject-2.0/Native/Classes/RecordWrapper.cs diff --git a/Generator/Convert.cs b/Generator/Convert.cs index 16d19a6af..5065ff904 100644 --- a/Generator/Convert.cs +++ b/Generator/Convert.cs @@ -71,15 +71,15 @@ internal static string NativeToManaged(TransferableAnyType transferable, string { Type: String } when (transfer == Transfer.None) && (transferable is ReturnValue) => $"GLib.Native.StringHelper.ToStringUtf8({fromParam})", // Record Conversions (safe handles) - ArrayTypeReference { Type: Record r, TypeReference: { CTypeReference: { IsPointer: true } } } when useSafeHandle => $"{fromParam}.Select(x => {r.Write(Target.Managed, currentNamespace)}.__FactoryNew(x)).ToArray()", - ResolveableTypeReference { Type: Record r, CTypeReference: { IsPointer: true } } when useSafeHandle => $"{r.Write(Target.Managed, currentNamespace)}.__FactoryNew({fromParam})", + ArrayTypeReference { Type: Record r, TypeReference: { CTypeReference: { IsPointer: true } } } when useSafeHandle => $"{fromParam}.Select(x => new {r.Write(Target.Managed, currentNamespace)}(x)).ToArray()", + ResolveableTypeReference { Type: Record r, CTypeReference: { IsPointer: true } } when useSafeHandle => $"new {r.Write(Target.Managed, currentNamespace)}({fromParam})", // Record Conversions (raw pointers) - ArrayTypeReference { Type: Record r, TypeReference: { CTypeReference: { IsPointer: true } } } when !useSafeHandle => $"{fromParam}.Select(x => {r.Write(Target.Managed, currentNamespace)}.__FactoryNew(new {SafeHandleFromRecord(r)}(x))).ToArray()", - ResolveableTypeReference { Type: Record r, CTypeReference: { IsPointer: true } } when !useSafeHandle => $"{r.Write(Target.Managed, currentNamespace)}.__FactoryNew(new {SafeHandleFromRecord(r)}({fromParam}))", + ArrayTypeReference { Type: Record r, TypeReference: { CTypeReference: { IsPointer: true } } } when !useSafeHandle => $"{fromParam}.Select(x => new {r.Write(Target.Managed, currentNamespace)}(new {SafeHandleFromRecord(r)}(x))).ToArray()", + ResolveableTypeReference { Type: Record r, CTypeReference: { IsPointer: true } } when !useSafeHandle => $"new {r.Write(Target.Managed, currentNamespace)}(new {SafeHandleFromRecord(r)}({fromParam}))", //Record Conversions without pointers are not working yet - ArrayTypeReference { Type: Record r, TypeReference: { CTypeReference: { IsPointer: false } } } => $"({qualifiedType}[]) {fromParam}.Select(x => {qualifiedType}.__FactoryNew({SafeHandleFromRecord(r, true)}(x))).ToArray();", + ArrayTypeReference { Type: Record r, TypeReference: { CTypeReference: { IsPointer: false } } } => $"({qualifiedType}[]) {fromParam}.Select(x => new {qualifiedType}({SafeHandleFromRecord(r, true)}(x))).ToArray();", ResolveableTypeReference { Type: Record r, CTypeReference: { IsPointer: false } } => $"({r.Write(Target.Managed, currentNamespace)}) default!; //TODO: Fixme", // Class Conversions diff --git a/Generator/Templates/record.sbntxt b/Generator/Templates/record.sbntxt index 2fe1ac1de..f6bdc8527 100644 --- a/Generator/Templates/record.sbntxt +++ b/Generator/Templates/record.sbntxt @@ -21,18 +21,14 @@ namespace {{ namespace.name }} // Override this to perform additional steps in the constructor partial void Initialize(); - private {{ $record_name }}({{ $safe_handle }} handle) + public {{ $record_name }}(IntPtr ptr) : this(new {{$safe_handle}}(ptr)){ } + + public {{ $record_name }}({{ $safe_handle }} handle) { _handle = handle; Initialize(); } - public static {{ $record_name }} __FactoryNew({{ $safe_handle }} handle) - => new {{ $record_name }}(handle); - - public static {{ $record_name }} __FactoryNew(IntPtr ptr) - => new {{ $record_name }}(new {{ $safe_handle }}(ptr)); - // TODO: Default Constructor (allocate in managed memory and free on Dispose?) // We need to be able to create instances of records with full access to // fields, e.g. Gdk.Rectangle, Gtk.TreeIter, etc. diff --git a/Libs/GObject-2.0/Classes/Object.Properties.cs b/Libs/GObject-2.0/Classes/Object.Properties.cs index bb5e67ccc..ce9327ef0 100644 --- a/Libs/GObject-2.0/Classes/Object.Properties.cs +++ b/Libs/GObject-2.0/Classes/Object.Properties.cs @@ -55,7 +55,7 @@ protected Value GetProperty(string name) var handle = Native.Value.ManagedHandle.Create(); Native.Object.Instance.Methods.GetProperty(Handle, name, handle); - return Value.__FactoryNew(handle); + return new Value(handle); } /// diff --git a/Libs/GObject-2.0/Native/Classes/BoxedWrapper.cs b/Libs/GObject-2.0/Native/Classes/BoxedWrapper.cs new file mode 100644 index 000000000..942898d75 --- /dev/null +++ b/Libs/GObject-2.0/Native/Classes/BoxedWrapper.cs @@ -0,0 +1,68 @@ +using System; +using System.Diagnostics; +using System.Reflection; +using System.Runtime.InteropServices; +using GLib; + +namespace GObject.Native +{ + public class BoxedWrapper + { + public static object WrapHandle(IntPtr handle, Type gtype) + { + System.Type trueType = TypeDictionary.GetSystemType(gtype); + + if (handle == IntPtr.Zero) + throw new NullReferenceException($"Failed to wrap handle as type <{trueType}>. Null handle passed to WrapHandle."); + + // Get constructor for the true type + var ctr = GetBoxedConstructor(trueType); + + object? result; + + if (ctr == null) + { + //If we do not find an constructor we try to find our secret factory method. + //TODO: This is a workaround for Gdk.Event Should get obsolete with GTK4 + var methodInfo = GetSecretFactoryMethod(trueType); + + if(methodInfo is null) + throw new Exception($"Type {trueType} does not define an IntPtr constructor. This could mean improperly defined bindings"); + + result = methodInfo.Invoke(null, new object[] { handle }); + } + else + { + result = ctr.Invoke(new object[] { handle }); + } + + if (result == null) + throw new Exception($"Type {trueType}'s factory method returned a null object. This could mean improperly defined bindings"); + + return result; + } + + private static MethodInfo? GetSecretFactoryMethod(System.Type type) + { + // Create using 'IntPtr' constructor + MethodInfo? ctor = type.GetMethod("__FactoryNew", + System.Reflection.BindingFlags.NonPublic + | System.Reflection.BindingFlags.Static, + null, new[] { typeof(IntPtr) }, null + ); + return ctor; + } + + private static ConstructorInfo? GetBoxedConstructor(System.Type type) + { + // Create using 'IntPtr' constructor + ConstructorInfo? ctor = type.GetConstructor( + System.Reflection.BindingFlags.NonPublic + | System.Reflection.BindingFlags.Public + | System.Reflection.BindingFlags.Instance, + null, new[] { typeof(IntPtr), }, null + ); + return ctor; + } + } +} diff --git a/Libs/GObject-2.0/Native/Classes/RecordWrapper.cs b/Libs/GObject-2.0/Native/Classes/RecordWrapper.cs deleted file mode 100644 index 7743b92bd..000000000 --- a/Libs/GObject-2.0/Native/Classes/RecordWrapper.cs +++ /dev/null @@ -1,44 +0,0 @@ -using System; -using System.Diagnostics; -using System.Reflection; -using System.Runtime.InteropServices; -using GLib; - -namespace GObject.Native -{ - public class RecordWrapper - { - public static object WrapHandle(IntPtr handle, Type gtype) - { - System.Type trueType = TypeDictionary.GetSystemType(gtype); - - if (handle == IntPtr.Zero) - throw new NullReferenceException($"Failed to wrap handle as type <{trueType}>. Null handle passed to WrapHandle."); - - // Get constructor for the true type - MethodInfo? factory = GetRecordFactory(trueType); - - if (factory == null) - throw new Exception($"Type {trueType} does not define an IntPtr constructor. This could mean improperly defined bindings"); - - object? result = factory.Invoke(null, new object[] { handle }); - - if (result == null) - throw new Exception($"Type {trueType}'s factory method returned a null object. This could mean improperly defined bindings"); - - return result; - } - - private static MethodInfo? GetRecordFactory(System.Type type) - { - // Create using 'IntPtr' constructor - MethodInfo? factory = type.GetMethod("__FactoryNew", - System.Reflection.BindingFlags.NonPublic - | System.Reflection.BindingFlags.Public - | System.Reflection.BindingFlags.Static, - null, new[] { typeof(IntPtr) }, null - ); - return factory; - } - } -} diff --git a/Libs/GObject-2.0/Records/Value.cs b/Libs/GObject-2.0/Records/Value.cs index 95ca3d448..173396547 100644 --- a/Libs/GObject-2.0/Records/Value.cs +++ b/Libs/GObject-2.0/Records/Value.cs @@ -168,9 +168,7 @@ public void Set(object? value) // method which plays nice with AOT compilation. // TODO: Should this be GetBoxed/TakeBoxed/DupBoxed? - return RecordWrapper.WrapHandle(Native.Value.Methods.GetBoxed(Handle), new Type(type)); - - throw new NotSupportedException($"Can't get boxed value. Type '{new Type((nuint)type)}' is not supported."); + return BoxedWrapper.WrapHandle(Native.Value.Methods.GetBoxed(Handle), new Type(type)); } public Object? GetObject() diff --git a/Libs/Gdk-3.0/Records/Event.cs b/Libs/Gdk-3.0/Records/Event.cs index b21700d37..f9cfa8873 100644 --- a/Libs/Gdk-3.0/Records/Event.cs +++ b/Libs/Gdk-3.0/Records/Event.cs @@ -5,72 +5,74 @@ namespace Gdk { public partial class Event { - public static Event __FactoryNew(IntPtr ptr) + //TODO: This method is our "secret factory method". it gets called via reflection. + //See BoxedWrapper.cs + private static Event __FactoryNew(IntPtr ptr) { var ev = Marshal.PtrToStructure(ptr); switch (ev.Type) { case EventType.Expose: - return EventExpose.__FactoryNew(ptr); + return new EventExpose(ptr); case EventType.VisibilityNotify: - return EventVisibility.__FactoryNew(ptr); + return new EventVisibility(ptr); case EventType.MotionNotify: - return EventMotion.__FactoryNew(ptr); + return new EventMotion(ptr); case EventType.ButtonPress: case EventType.TwoButtonPress: case EventType.ThreeButtonPress: case EventType.ButtonRelease: - return EventButton.__FactoryNew(ptr); + return new EventButton(ptr); case EventType.TouchBegin: - return EventTouch.__FactoryNew(ptr); + return new EventTouch(ptr); case EventType.Scroll: - return EventScroll.__FactoryNew(ptr); + return new EventScroll(ptr); case EventType.KeyPress: case EventType.KeyRelease: - return EventKey.__FactoryNew(ptr); + return new EventKey(ptr); case EventType.EnterNotify: case EventType.LeaveNotify: - return EventCrossing.__FactoryNew(ptr); + return new EventCrossing(ptr); case EventType.FocusChange: - return EventFocus.__FactoryNew(ptr); + return new EventFocus(ptr); case EventType.Configure: - return EventConfigure.__FactoryNew(ptr); + return new EventConfigure(ptr); case EventType.PropertyNotify: - return EventProperty.__FactoryNew(ptr); + return new EventProperty(ptr); case EventType.SelectionClear: case EventType.SelectionNotify: case EventType.SelectionRequest: - return EventSelection.__FactoryNew(ptr); + return new EventSelection(ptr); case EventType.OwnerChange: - return EventOwnerChange.__FactoryNew(ptr); + return new EventOwnerChange(ptr); case EventType.ProximityIn: case EventType.ProximityOut: - return EventProximity.__FactoryNew(ptr); + return new EventProximity(ptr); case EventType.DragEnter: case EventType.DragLeave: case EventType.DragMotion: case EventType.DragStatus: case EventType.DropStart: case EventType.DropFinished: - return EventDND.__FactoryNew(ptr); + return new EventDND(ptr); case EventType.WindowState: - return EventWindowState.__FactoryNew(ptr); + return new EventWindowState(ptr); case EventType.Setting: - return EventSetting.__FactoryNew(ptr); + return new EventSetting(ptr); case EventType.GrabBroken: - return EventGrabBroken.__FactoryNew(ptr); + return new EventGrabBroken(ptr); case EventType.TouchpadSwipe: - return EventTouchpadSwipe.__FactoryNew(ptr); + return new EventTouchpadSwipe(ptr); case EventType.TouchpadPinch: - return EventTouchpadPinch.__FactoryNew(ptr); + return new EventTouchpadPinch(ptr); case EventType.PadButtonPress: case EventType.PadButtonRelease: - return EventPadButton.__FactoryNew(ptr); + return new EventPadButton(ptr); case EventType.PadRing: case EventType.PadStrip: - return EventPadAxis.__FactoryNew(ptr); + return new EventPadAxis(ptr); case EventType.PadGroupMode: - return EventPadGroupMode.__FactoryNew(ptr); + return new EventPadGroupMode(ptr); // Default/Not Implemented case EventType.Map: case EventType.Unmap: diff --git a/Libs/Gio-2.0/Classes/DBusConnection.cs b/Libs/Gio-2.0/Classes/DBusConnection.cs index fccf4e206..d52988250 100644 --- a/Libs/Gio-2.0/Classes/DBusConnection.cs +++ b/Libs/Gio-2.0/Classes/DBusConnection.cs @@ -37,7 +37,7 @@ void Callback(GObject.Object sourceObject, AsyncResult res) var ret = Native.DBusConnection.Instance.Methods.CallFinish(sourceObject.Handle, (res as GObject.Object).Handle, out var error); Error.ThrowOnError(error); - tcs.SetResult(Variant.__FactoryNew(ret)); + tcs.SetResult(new Variant(ret)); } //TODO: Use on time CallbackHandler @@ -55,7 +55,7 @@ public Variant Call(string busName, string objectPath, string interfaceName, str Error.ThrowOnError(error); - return Variant.__FactoryNew(ret); + return new Variant(ret); } public override void Dispose() diff --git a/Libs/Gtk-3.0/Classes/TreeSelection.cs b/Libs/Gtk-3.0/Classes/TreeSelection.cs index 4227f2bee..25401845a 100644 --- a/Libs/Gtk-3.0/Classes/TreeSelection.cs +++ b/Libs/Gtk-3.0/Classes/TreeSelection.cs @@ -11,7 +11,7 @@ public void GetSelected(out TreeModel model, out TreeIter iter) Native.TreeSelection.Instance.Methods.GetSelected(Handle, out var modelPtr, iterHandle); model = ObjectWrapper.WrapHandle(modelPtr, false); - iter = TreeIter.__FactoryNew(iterHandle); + iter = new TreeIter(iterHandle); } } } From 6aeab75e34b492cd3c4f2dc0cddc0f7b92f01a3e Mon Sep 17 00:00:00 2001 From: badcel <1218031+badcel@users.noreply.github.com> Date: Sun, 8 Aug 2021 17:47:53 +0200 Subject: [PATCH 31/35] Revert some test code --- Libs/GObject-2.0/Classes/Object.cs | 2 -- .../Native/Classes/ObjectMapper.ToggleRef.cs | 22 ++----------------- .../Native/Classes/ObjectMapper.cs | 10 +++------ .../Native/Classes/TypeDictionary.cs | 3 --- 4 files changed, 5 insertions(+), 32 deletions(-) diff --git a/Libs/GObject-2.0/Classes/Object.cs b/Libs/GObject-2.0/Classes/Object.cs index 09ab5c379..97808f022 100644 --- a/Libs/GObject-2.0/Classes/Object.cs +++ b/Libs/GObject-2.0/Classes/Object.cs @@ -103,7 +103,5 @@ public virtual void Dispose() _signalRegistry.Dispose(); _handle.Dispose(); } - - ~Object() => Dispose(); } } diff --git a/Libs/GObject-2.0/Native/Classes/ObjectMapper.ToggleRef.cs b/Libs/GObject-2.0/Native/Classes/ObjectMapper.ToggleRef.cs index 81f8845af..79a3165bf 100644 --- a/Libs/GObject-2.0/Native/Classes/ObjectMapper.ToggleRef.cs +++ b/Libs/GObject-2.0/Native/Classes/ObjectMapper.ToggleRef.cs @@ -1,6 +1,5 @@ using System; using System.Diagnostics; -using System.Runtime.InteropServices; namespace GObject.Native { @@ -46,14 +45,12 @@ public ToggleRef(IntPtr handle, object obj, bool ownedRef) OwnReference(ownedRef); RegisterToggleRef(); - - Debug.WriteLine($"Created ToggleRef: {GetLogState()}."); } private void RegisterToggleRef() { Native.Object.Instance.Methods.AddToggleRef(_handle, _callback, IntPtr.Zero); - // Native.Object.Instance.Methods.Unref(_handle); + Native.Object.Instance.Methods.Unref(_handle); } private void OwnReference(bool ownedRef) @@ -88,26 +85,11 @@ private void ToggleReference(IntPtr data, IntPtr @object, bool isLastRef) { _reference = new WeakReference(_reference); } - - Debug.WriteLine($"Toggled ToggleRef: {GetLogState()}."); } public void Dispose() { - Debug.WriteLine($"Disposing of ToggleRef: {GetLogState()} (note: pre-disposal state)."); - - // Native.Object.Instance.Methods.RemoveToggleRef(_handle, _callback, IntPtr.Zero); - } - - private string GetLogState() - { - // Logging - object? obj = (_reference is WeakReference weakRef) - ? weakRef.Target - : _reference; - - var refCount = Marshal.PtrToStructure(_handle).RefCount; - return $"Address '{_handle}', Object '{obj?.GetType()}', RefCount '{refCount}', IsLastRef '{_reference is WeakReference}'"; + Native.Object.Instance.Methods.RemoveToggleRef(_handle, _callback, IntPtr.Zero); } } } diff --git a/Libs/GObject-2.0/Native/Classes/ObjectMapper.cs b/Libs/GObject-2.0/Native/Classes/ObjectMapper.cs index 736666a72..65ed52c84 100644 --- a/Libs/GObject-2.0/Native/Classes/ObjectMapper.cs +++ b/Libs/GObject-2.0/Native/Classes/ObjectMapper.cs @@ -10,6 +10,8 @@ public static partial class ObjectMapper { private static readonly Dictionary WrapperObjects = new(); + public static int ObjectCount => WrapperObjects.Count; + public static bool TryGetObject(IntPtr handle, [NotNullWhen(true)] out T? obj) where T : class, IHandle { if (WrapperObjects.TryGetValue(handle, out ToggleRef? weakRef)) @@ -40,13 +42,7 @@ public static void Unmap(IntPtr handle) lock (WrapperObjects) { if (WrapperObjects.Remove(handle, out var toggleRef)) - { - Debug.Assert( - condition: toggleRef.Object != null, - message: "The object must be alive when the toggle ref is triggered" - ); - toggleRef.Dispose(); - } + toggleRef.Dispose(); } Debug.WriteLine($"Unmapped Object: Handle '{handle}'."); diff --git a/Libs/GObject-2.0/Native/Classes/TypeDictionary.cs b/Libs/GObject-2.0/Native/Classes/TypeDictionary.cs index 3092cd3e4..b51135390 100644 --- a/Libs/GObject-2.0/Native/Classes/TypeDictionary.cs +++ b/Libs/GObject-2.0/Native/Classes/TypeDictionary.cs @@ -97,9 +97,6 @@ internal static System.Type GetSystemType(Type gtype) if (_reverseTypeDict.TryGetValue(gtype, out System.Type? sysType)) return sysType; - if (Functions.TypeIsA(gtype.Value, Type.Boxed.Value)) - throw new Exception($"Record not registered: {gtype.ToString()}"); - // If gtype is not in the type dictionary, walk up the // tree until we find a type that is. As all objects are // descended from GObject, we will eventually find a parent From fe05f41d3993e877b48057e927b2fab23ca6c885 Mon Sep 17 00:00:00 2001 From: badcel <1218031+badcel@users.noreply.github.com> Date: Sun, 8 Aug 2021 17:50:15 +0200 Subject: [PATCH 32/35] Fix reference error `gtk_im_context_simple_new` returns an owned reference according to the documentation. This information must be given to the object instantiation process to avoid leaking memory. See: https://docs.gtk.org/gtk3/ctor.IMContextSimple.new.html --- Libs/Gtk-3.0/Classes/IMContextSimple.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Libs/Gtk-3.0/Classes/IMContextSimple.cs b/Libs/Gtk-3.0/Classes/IMContextSimple.cs index c67971cb5..16901d2c6 100644 --- a/Libs/Gtk-3.0/Classes/IMContextSimple.cs +++ b/Libs/Gtk-3.0/Classes/IMContextSimple.cs @@ -3,6 +3,6 @@ public partial class IMContextSimple { public static IMContextSimple New() - => new IMContextSimple(Native.IMContextSimple.Instance.Methods.New(), false); + => new IMContextSimple(Native.IMContextSimple.Instance.Methods.New(), true); } } From 8775b875db05b762827730b1d92658d994bf4715 Mon Sep 17 00:00:00 2001 From: badcel <1218031+badcel@users.noreply.github.com> Date: Sun, 8 Aug 2021 18:14:10 +0200 Subject: [PATCH 33/35] Add Tests This adds some basic tests using GdkPixbuf which allows to run them as integration tests. Integration tests can be automatically run during continous integration on the server. - Add test for basic property reading - Add test for object disposal by garbage collector - Add test for object disposal by "Dispose" method. --- GirCore.sln | 15 +++++ .../GdkPixbuf-2.0.Tests.csproj | 15 +++++ .../MemoryManagementTest.cs | 63 ++++++++++++++++++ .../Libs/GdkPixbuf-2.0.Tests/PropertyTest.cs | 19 ++++++ Tests/Libs/GdkPixbuf-2.0.Tests/test.bmp | Bin 0 -> 750054 bytes 5 files changed, 112 insertions(+) create mode 100644 Tests/Libs/GdkPixbuf-2.0.Tests/GdkPixbuf-2.0.Tests.csproj create mode 100644 Tests/Libs/GdkPixbuf-2.0.Tests/MemoryManagementTest.cs create mode 100644 Tests/Libs/GdkPixbuf-2.0.Tests/PropertyTest.cs create mode 100644 Tests/Libs/GdkPixbuf-2.0.Tests/test.bmp diff --git a/GirCore.sln b/GirCore.sln index 16de37ecc..0aab041ac 100644 --- a/GirCore.sln +++ b/GirCore.sln @@ -83,6 +83,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DrawingArea", "Samples\Gtk3 EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TextEditor", "Samples\Gtk3\TextEditor\TextEditor.csproj", "{2510B0C1-793D-4EA7-A296-F54F881C94C8}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GdkPixbuf-2.0.Tests", "Tests\Libs\GdkPixbuf-2.0.Tests\GdkPixbuf-2.0.Tests.csproj", "{61016ABA-608B-47FA-9FBD-CA17D24BAB89}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -504,6 +506,18 @@ Global {2510B0C1-793D-4EA7-A296-F54F881C94C8}.Release|x64.Build.0 = Release|Any CPU {2510B0C1-793D-4EA7-A296-F54F881C94C8}.Release|x86.ActiveCfg = Release|Any CPU {2510B0C1-793D-4EA7-A296-F54F881C94C8}.Release|x86.Build.0 = Release|Any CPU + {61016ABA-608B-47FA-9FBD-CA17D24BAB89}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {61016ABA-608B-47FA-9FBD-CA17D24BAB89}.Debug|Any CPU.Build.0 = Debug|Any CPU + {61016ABA-608B-47FA-9FBD-CA17D24BAB89}.Debug|x64.ActiveCfg = Debug|Any CPU + {61016ABA-608B-47FA-9FBD-CA17D24BAB89}.Debug|x64.Build.0 = Debug|Any CPU + {61016ABA-608B-47FA-9FBD-CA17D24BAB89}.Debug|x86.ActiveCfg = Debug|Any CPU + {61016ABA-608B-47FA-9FBD-CA17D24BAB89}.Debug|x86.Build.0 = Debug|Any CPU + {61016ABA-608B-47FA-9FBD-CA17D24BAB89}.Release|Any CPU.ActiveCfg = Release|Any CPU + {61016ABA-608B-47FA-9FBD-CA17D24BAB89}.Release|Any CPU.Build.0 = Release|Any CPU + {61016ABA-608B-47FA-9FBD-CA17D24BAB89}.Release|x64.ActiveCfg = Release|Any CPU + {61016ABA-608B-47FA-9FBD-CA17D24BAB89}.Release|x64.Build.0 = Release|Any CPU + {61016ABA-608B-47FA-9FBD-CA17D24BAB89}.Release|x86.ActiveCfg = Release|Any CPU + {61016ABA-608B-47FA-9FBD-CA17D24BAB89}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(NestedProjects) = preSolution {BF7F9B0B-CB43-4161-BFAD-C6EE479FC86B} = {386AE10F-B7AC-4C97-AC5C-202D3662A868} @@ -539,5 +553,6 @@ Global {189A1440-3BFE-432E-8F43-931D1B571DCA} = {8BC11A63-D52B-40CB-9DDD-CD7C6DC21059} {F1A41389-B4AD-4D0F-8C44-918BF3A6A57F} = {79FE88D9-9545-4AE8-80AF-8E2E2E55E8A3} {2510B0C1-793D-4EA7-A296-F54F881C94C8} = {79FE88D9-9545-4AE8-80AF-8E2E2E55E8A3} + {61016ABA-608B-47FA-9FBD-CA17D24BAB89} = {46D66262-FC61-43B9-8E76-A361FA3D6C81} EndGlobalSection EndGlobal diff --git a/Tests/Libs/GdkPixbuf-2.0.Tests/GdkPixbuf-2.0.Tests.csproj b/Tests/Libs/GdkPixbuf-2.0.Tests/GdkPixbuf-2.0.Tests.csproj new file mode 100644 index 000000000..ba457085c --- /dev/null +++ b/Tests/Libs/GdkPixbuf-2.0.Tests/GdkPixbuf-2.0.Tests.csproj @@ -0,0 +1,15 @@ + + + GdkPixbuf.Tests + + + + + + + + + PreserveNewest + + + diff --git a/Tests/Libs/GdkPixbuf-2.0.Tests/MemoryManagementTest.cs b/Tests/Libs/GdkPixbuf-2.0.Tests/MemoryManagementTest.cs new file mode 100644 index 000000000..62c67b0ed --- /dev/null +++ b/Tests/Libs/GdkPixbuf-2.0.Tests/MemoryManagementTest.cs @@ -0,0 +1,63 @@ +using System; +using FluentAssertions; +using Microsoft.VisualStudio.TestTools.UnitTesting; + +namespace GdkPixbuf.Tests +{ + [TestClass, TestCategory("IntegrationTest")] + public class MemoryManagementTest + { + [TestMethod] + public void TestAutomaticGObjectDisposal() + { + WeakReference weakReference = new(null); + IDisposable? strongReference = null; + + void CreateInstance(bool keepInstance) + { + var obj = Pixbuf.NewFromFile("test.bmp"); + + GObject.Native.ObjectMapper.ObjectCount.Should().Be(1); + + if(keepInstance) + strongReference = obj; + + weakReference.Target = obj; + } + + CreateInstance(keepInstance: false); + + GC.Collect(); + GC.WaitForPendingFinalizers(); + GObject.Native.ObjectMapper.ObjectCount.Should().Be(0); + weakReference.IsAlive.Should().BeFalse(); + strongReference.Should().BeNull(); + + CreateInstance(keepInstance: true); + GC.Collect(); + GC.WaitForPendingFinalizers(); + GObject.Native.ObjectMapper.ObjectCount.Should().Be(1); + weakReference.IsAlive.Should().BeTrue(); + strongReference.Should().NotBeNull(); + + // Cleanup: Dispose for other tests to work properly + // It looks like the GC is not collecting the ObjectMapper data + // if the GC.Collect() call is happening in the method which + // contains the reference to be freed. There must be a context + // switch before disposal happens. + // This is the reason why we need to use the "CreateInstance" + // method to create the instances which should be freed. + // This behaviour is verified on Linux. + strongReference.Dispose(); + } + + [TestMethod] + public void TestManualGObjectDisposal() + { + var obj = Pixbuf.NewFromFile("test.bmp"); + GObject.Native.ObjectMapper.ObjectCount.Should().Be(1); + obj.Dispose(); + GObject.Native.ObjectMapper.ObjectCount.Should().Be(0); + } + } +} diff --git a/Tests/Libs/GdkPixbuf-2.0.Tests/PropertyTest.cs b/Tests/Libs/GdkPixbuf-2.0.Tests/PropertyTest.cs new file mode 100644 index 000000000..9e815842f --- /dev/null +++ b/Tests/Libs/GdkPixbuf-2.0.Tests/PropertyTest.cs @@ -0,0 +1,19 @@ +using FluentAssertions; +using Microsoft.VisualStudio.TestTools.UnitTesting; + +namespace GdkPixbuf.Tests +{ + [TestClass, TestCategory("IntegrationTest")] + public class PropertyTests + { + [TestMethod] + public void ReadPropertyTest() + { + var pixbuf = Pixbuf.NewFromFile("test.bmp"); + pixbuf.GetWidth().Should().Be(500); + pixbuf.GetHeight().Should().Be(500); + pixbuf.GetHasAlpha().Should().Be(false); + pixbuf.GetNChannels().Should().Be(3); + } + } +} diff --git a/Tests/Libs/GdkPixbuf-2.0.Tests/test.bmp b/Tests/Libs/GdkPixbuf-2.0.Tests/test.bmp new file mode 100644 index 0000000000000000000000000000000000000000..c599257f5d3e227071e798896fcdd4e0c7d79172 GIT binary patch literal 750054 zcmeIup%H*U3 Date: Sun, 8 Aug 2021 19:27:04 +0200 Subject: [PATCH 34/35] Add sample projects - Add Quickstart - Add DrawingArea - Add TextEditor --- Build/Projects.cs | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/Build/Projects.cs b/Build/Projects.cs index b1cd00775..b650d4037 100644 --- a/Build/Projects.cs +++ b/Build/Projects.cs @@ -35,16 +35,18 @@ public static class Projects private const string GTK3_WINDOW = SAMPLE + "Gtk3/Window"; private const string GTK3_DECLARATIVE_UI = SAMPLE + "Gtk3/DeclarativeUi"; private const string GTK3_ABOUT_DIALOG = SAMPLE + "Gtk3/AboutDialog"; - + private const string GTK3_QUICKSTART = SAMPLE + "Gtk3/QuickStart"; + private const string GTK3_DRAWINGAREA = SAMPLE + "Gtk3/DrawingArea"; + private const string GTK3_TEXTEDITOR = SAMPLE + "Gtk3/TextEditor"; + // private const string DBUS_SAMPLE = SAMPLE + "DBus/"; // private const string GSTREAMER_SAMPLE = SAMPLE + "GStreamer/"; // private const string GTK3_APP_SAMPLE = SAMPLE + "Gtk3/GtkApp/"; // private const string GTK3_BUILDER_SAMPLE = SAMPLE + "Gtk3/Builder"; - // private const string GTK3_QUICKSTART = SAMPLE + "Gtk3/QuickStart"; + // private const string GTK3_COMPOSITE_TEMPLATE_SOURCEGENERATOR = SAMPLE + "Gtk3/CompositeTemplates/UsingSourceGenerator"; // private const string GTK3_COMPOSITE_TEMPLATE_NO_SOURCEGENERATOR = SAMPLE + "Gtk3/CompositeTemplates/NoSourceGenerator"; // private const string GTK4_SIMPLE_WINDOW_SAMPLE = SAMPLE + "Gtk4/SimpleWindow/"; - // private const string GDKPIXBUF_TEST_MEMORY_LEAKS = SAMPLE + "GdkPixbuf/TestMemoryLeaks"; private const string INTEGRATION = "../Integration/"; @@ -65,7 +67,10 @@ public static class Projects GDK_PIXBUF_TEST_MEMORY_LEAKS, GTK3_WINDOW, GTK3_DECLARATIVE_UI, - GTK3_ABOUT_DIALOG + GTK3_ABOUT_DIALOG, + GTK3_QUICKSTART, + GTK3_DRAWINGAREA, + GTK3_TEXTEDITOR }; public static IEnumerable AllLibraries = new[] From d73171b393835dbb76584827b9377ea00f15d4c3 Mon Sep 17 00:00:00 2001 From: badcel <1218031+badcel@users.noreply.github.com> Date: Mon, 9 Aug 2021 21:19:37 +0200 Subject: [PATCH 35/35] Runtime: Use attribute to find factory method. --- Libs/GObject-2.0/Classes/ConstructAttribute.cs | 16 ++++++++++++++++ Libs/GObject-2.0/Native/Classes/BoxedWrapper.cs | 16 ++++++---------- Libs/Gdk-3.0/Records/Event.cs | 5 +++-- 3 files changed, 25 insertions(+), 12 deletions(-) create mode 100644 Libs/GObject-2.0/Classes/ConstructAttribute.cs diff --git a/Libs/GObject-2.0/Classes/ConstructAttribute.cs b/Libs/GObject-2.0/Classes/ConstructAttribute.cs new file mode 100644 index 000000000..d6dd65c56 --- /dev/null +++ b/Libs/GObject-2.0/Classes/ConstructAttribute.cs @@ -0,0 +1,16 @@ +using System; + +namespace GObject +{ + /// + /// This attribute can be used to give the runtime + /// an alternative constructor method. This is + /// usefull if a constructor should return a + /// more derived type than the constructor itself. + /// + [AttributeUsage(AttributeTargets.Method)] + public class ConstructAttribute : Attribute + { + + } +} diff --git a/Libs/GObject-2.0/Native/Classes/BoxedWrapper.cs b/Libs/GObject-2.0/Native/Classes/BoxedWrapper.cs index 942898d75..cc1ade124 100644 --- a/Libs/GObject-2.0/Native/Classes/BoxedWrapper.cs +++ b/Libs/GObject-2.0/Native/Classes/BoxedWrapper.cs @@ -1,8 +1,6 @@ using System; -using System.Diagnostics; +using System.Linq; using System.Reflection; -using System.Runtime.InteropServices; -using GLib; namespace GObject.Native { @@ -44,13 +42,11 @@ public static object WrapHandle(IntPtr handle, Type gtype) private static MethodInfo? GetSecretFactoryMethod(System.Type type) { - // Create using 'IntPtr' constructor - MethodInfo? ctor = type.GetMethod("__FactoryNew", - System.Reflection.BindingFlags.NonPublic - | System.Reflection.BindingFlags.Static, - null, new[] { typeof(IntPtr) }, null - ); - return ctor; + return type.GetMethods( + System.Reflection.BindingFlags.Static + | System.Reflection.BindingFlags.DeclaredOnly + | System.Reflection.BindingFlags.NonPublic + ).FirstOrDefault(x => x.GetCustomAttribute() is { }); } private static ConstructorInfo? GetBoxedConstructor(System.Type type) diff --git a/Libs/Gdk-3.0/Records/Event.cs b/Libs/Gdk-3.0/Records/Event.cs index f9cfa8873..5099a9479 100644 --- a/Libs/Gdk-3.0/Records/Event.cs +++ b/Libs/Gdk-3.0/Records/Event.cs @@ -5,8 +5,9 @@ namespace Gdk { public partial class Event { - //TODO: This method is our "secret factory method". it gets called via reflection. - //See BoxedWrapper.cs + // TODO: Workaround as long as we need GDK3 or + // do not create instances from safe handles + [GObject.Construct] private static Event __FactoryNew(IntPtr ptr) { var ev = Marshal.PtrToStructure(ptr);