WhatIf... GC09E01 - GirCore Mutter #1499
Replies: 4 comments
|
Thank you. Your demo is pretty impressive 👍. Gir files are system dependent. You can't mix and match them. I wonder if you take all gir files from one distro like fedora if things would match together better. Someday the generator will be available as a nuget itself. Then you can generate any binding for any gir file you give it. I hope that over time the integration will get as deep as there is little to no trace of interop between C# and C with GObject. |
WhatIf... GC09E02 - GirCore BarWorld's first: Not a fork, not a port, not JavaScript. A new layer on GNOME fundamentals: the same Mutter, the same Wayland, but the shell is now written in C#. And alongside it, the GirCore Bar - a clean, lightning-fast application launcher. GirCoreBar_Small.mp4AOT sizes:
GirCore Modifications
Meta-18 ModificationsNew Meta-18 files have been introduced around
GC09E02 Summary
|
|
Hello @badcel 7 gir files -> 7 NuGet packages, and Linux only. These gir files are already included in the SDK, but compiling them requires extending the Generator in a few places. I marked the required modifications for each gir file. Please review them, and if everything looks fine, I will submit all of them one by one as separate PRs. If you think the Generator source should be modified somewhere, let’s discuss it and I will make the necessary changes. Atk-1.0.girSource: ATK-1.0 Generator extensions:
Manual files:
GModule-2.0.girSource: GModule-2.0 Manual files: GioUnix-2.0.girNo modifications needed. GDesktopEnums-3.0.girNo modifications needed. xfixes-4.0.girNo modifications needed. xlib-2.0.girNo modifications needed. Polkit-1.0.girCurrently, a gir patch is required for compilation, which is described here: |
|
Please just open separate PRs. Start by prioritizing them in the order which is most important for you. So don't open like 10 PRs but 1 as a start. Then we can see if I think your most important changes belong into GirCore. Then you can continue opening more PRs if you think they are helpful for you until we reach a point you have nothing more open on your list. It's just easier for me this way. Thank you. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
WhatIf... GC09E01 - GirCore Mutter
Source
Gnome Shell
Introduction
This is just a proof of concept. A demonstration of how brilliant the GirCore you created is. Sincere thanks on behalf of the .NET community that loves Linux and develops on Linux.
This is still a concept, but in its current state, using the .NET and NuGet ecosystem, it could even enable a full .NET-based GNOME Shell implementation. The only limit is imagination, as it makes possible highly unique, pluggable, and themeable Linux desktop experiences unlike anything seen before in the history of Linux.
GirCore Mutter
To give a concrete example, here is a pure C# WM, effectively a minimal Mutter-style sample, implemented in just a few lines of C#:
GirCoreMutter_small.mp4
Source: GirCore Mutter
And 18 NuGets
ATK-1.0
Source: ATK-1.0
Generator extensions:
InterfaceMethodsCollidingWithInterfaceMethodsFixer : Fixer<GirModel.Class>GLibPointerArray : FieldConverterMtk-18
Source: Mtk-18
Generator extensions:
OpaqueTypedRecordArray : FieldConverterOpaqueUntypedRecordArray : FieldConverterEGL-1.5 and Cogl-18
Source: EGL-1.5 and Cogl-18
This was the first time I encountered that
girfiles do not reflect real dependencies. InCogl-18.gir,EGLis required instead ofGL. This was an important lesson, as it showed thatgirfiles are not always accurate.The
EGL-1.5.girfile did not exist, so it had to be created. This was another important lesson: sometimesgirfiles need to be created. EGL-1.5 README.mdAfter that,
GLhad to be replaced withEGLinCogl-18.gir, and missing types had to be defined. Cogl-18 README.mdClutter-18
Source: Clutter-18
Generator extensions:
UnionFramework : Generator<GirModel.Union>UnionMethods : Generator<GirModel.Union>Union : ToManagedParameterConverterUnion : InstanceParameterConverterUnion : ToNativeParameterConverterUnion : ReturnTypeConverter- ReturnTypeUnion : ReturnTypeConverter- ReturnTypeToManagedExpressionP11Kit-0.26, Gck-2, Gcr-4
The situation here was similar to
Cogl-18: a missingP11Kit-0.26.girfile. This also had to be created, andGck-2.girandGcr-4.girhad to be made compatible. A shell script was used to generate and modify theP11Kit-0.26.girfile. P11Kit-0.26 generationGenerator extensions:
PropertyCollidingWithInheritedMembersFixer : Fixer<GirModel.Class>ArrayLengthConversionDescription of the generator extensions: CLongUnsignedCLong.md
GModule-2.0
Source: GModule-2.0
GioUnix-2.0
Source: GioUnix-2.0
Gvc-1.0
Source: Gvc-1.0
GDesktopEnums-3.0
Source: GDesktopEnums-3.0
xfixes-4.0, xlib-2.0
Source: xfixes-4.0, xlib-2.0
Meta-18
Source: Meta-18
Here, the
Meta-18.girfile needed to be modified. README.mdNM-1.0
Source: NM-1.0
Generator extensions:
Here, the
EscapeStringneeded to be extended with aKnownNumericPrefixesdictionary, where80211is replaced withIEEE80211. I intentionally deviated from the escape behavior because this felt more logical, and it can be extended as needed. NumericDictionary.mdPolkit-1.0, PolkitAgent-1.0
Source: Polkit-1.0, PolkitAgent-1.0
Here, the
Polkit-1.0.girfile needed to be modified. README.mdSt-18
Source: St-18
The
St-18.girfile was incomplete, so it had to be extended with aCogl-18.girinclude. README.mdShell-18
Source: Shell-18
Closing thoughts on generation
During the generation process, I came to the conclusion that in many cases it is more practical to modify
girfiles than to write generator extensions. This highlighted thatgirfiles are not always accurate. In some cases, they are inconsistent and depend on non-existentgirfiles to such an extent that creating and modifying those files is simpler than extending the generator.I would like to thank you once again for this amazing GirCore, and for the fantastic experience of using it. This project is a true gem for the Linux and .NET community, and I am looking forward to seeing what amazing things developers will create with it.
Keep it up!
All reactions