x9void / waylandsharp Goto Github PK
View Code? Open in Web Editor NEWC# Source Generator for Wayland
License: MIT License
C# Source Generator for Wayland
License: MIT License
On attempt to create bindings for wayland.xml and xdg-shell.xml, i get errors on build
/home/beyley/Projects/PROGRAMMING/C#/SilkWindowingWayland/SilkWindowingWayland/WaylandSharpGen/WaylandSharpGen.WlBindingGenerator/WaylandSharp.Generated.cs(4237,44): error CS0117: 'GC' does not contain a definition for 'AllocateArray' [/home/beyley/Projects/PROGRAMMING/C#/SilkWindowingWayland/SilkWindowingWayland/SilkWindowingWayland.csproj]
/home/beyley/Projects/PROGRAMMING/C#/SilkWindowingWayland/SilkWindowingWayland/WaylandSharpGen/WaylandSharpGen.WlBindingGenerator/WaylandSharp.Generated.cs(153,26): error CS1501: No overload for method 'Remove' takes 2 arguments [/home/beyley/Projects/PROGRAMMING/C#/SilkWindowingWayland/SilkWindowingWayland/SilkWindowingWayland.csproj]
/home/beyley/Projects/PROGRAMMING/C#/SilkWindowingWayland/SilkWindowingWayland/WaylandSharpGen/WaylandSharpGen.WlBindingGenerator/WaylandSharp.Generated.cs(4306,49): error CS0117: 'GC' does not contain a definition for 'AllocateArray' [/home/beyley/Projects/PROGRAMMING/C#/SilkWindowingWayland/SilkWindowingWayland/SilkWindowingWayland.csproj]
/home/beyley/Projects/PROGRAMMING/C#/SilkWindowingWayland/SilkWindowingWayland/WaylandSharpGen/WaylandSharpGen.WlBindingGenerator/WaylandSharp.Generated.cs(4308,48): error CS0117: 'GC' does not contain a definition for 'AllocateArray' [/home/beyley/Projects/PROGRAMMING/C#/SilkWindowingWayland/SilkWindowingWayland/SilkWindowingWayland.csproj]
I have to move to net6 for the errors to go away
This was copied from Rider.
An instance of analyzer WaylandSharpGen.WlBindingGenerator cannot be created from /home/jgcodes/.nuget/packages/waylandsharp/0.2.1/analyzers/dotnet/cs/WaylandSharpGen.dll : Could not load file or assembly 'Microsoft.CodeAnalysis, Version=4.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified..
OS: Linux (ArcoLinux KDE)
IDE: Rider 2022.1.2
dotnet
version: 6.0.106
By the looks of things, it also results in the generator not correctly building the bindings.
OS: Linux (ArcoLinux KDE)
IDE: Rider 2022.1.2
dotnet
version: 7.0.103
dotnet-sdk-6.0
package version: 6.0.14.sdk114-1
Exit code is 134 (Unhandled exception. Xunit.Sdk.XunitException: Expected output.GetId() to be 48u, but found 4u (difference of -44).
at FluentAssertions.Execution.XUnit2TestFramework.Throw(String message)
at FluentAssertions.Execution.TestFrameworkProvider.Throw(String message)
at FluentAssertions.Execution.DefaultAssertionStrategy.HandleFailure(String message)
at FluentAssertions.Execution.AssertionScope.FailWith(Func`1 failReasonFunc)
at FluentAssertions.Execution.AssertionScope.FailWith(Func`1 failReasonFunc)
at FluentAssertions.Execution.AssertionScope.FailWith(String message, Object[] args)
at FluentAssertions.Numeric.NumericAssertions`2.Be(T expected, String because, Object[] becauseArgs)
at WaylandSharp.IntegrationTests.ConnectionTest.<>c__DisplayClass6_0.<GlobalNameIsProxyId>b__0(Object _, GlobalEventArgs e) in /home/jgcodes/Documents/Code/C#/WaylandSharp/src/WaylandSharp.IntegrationTests/ConnectionTest.cs:line 90
at WaylandSharp.WlRegistry.<CreateDispatcher>g__dispatcher|16_0(Void* data, Void* target, UInt32 callbackOpcode, _WlMessage* messageSignature, _WlArgument* args) in /home/jgcodes/Documents/Code/C#/WaylandSharp/src/WaylandSharp.IntegrationTests/WaylandSharpGen/WaylandSharpGen.WlBindingGenerator/WaylandSharp.Generated.cs:line 401)
Not sure how the heck this happens. I'll do some testing under WAYLAND_DEBUG
and paste the output in a gist or something.
Hello,
I've been using WaylandSharp with a number of protocol xmls, but this one in particular seems to be causing issues with source generation.
public void Motion(uint time, double dx, double dy)
{
CheckIfDisposed();
var arg0 = time;
var arg1 = WlFixedFromDouble(dx);
var arg2 = WlFixedFromDouble(dy);
>>>> WlProxyMarshalFlags(_proxyObject, 0, null, WlProxyGetVersion(_proxyObject), 0, arg0, arg1, arg2);
}
error CS1503: Argument 7: cannot convert from 'uint' to 'char*'
error CS1503: Argument 8: cannot convert from 'WaylandSharp._WlFixedT' to 'uint'
public void Axis(uint time, WlPointerAxis axis, double value)
{
CheckIfDisposed();
var arg0 = time;
var arg1 = (uint)axis;
var arg2 = WlFixedFromDouble(value);
>>>> WlProxyMarshalFlags(_proxyObject, 3, null, WlProxyGetVersion(_proxyObject), 0, arg0, arg1, arg2);
}
error CS1503: Argument 7: cannot convert from 'uint' to 'char*'
error CS1503: Argument 8: cannot convert from 'WaylandSharp._WlFixedT' to 'uint'
public void AxisDiscrete(uint time, WlPointerAxis axis, double value, int discrete)
{
CheckIfDisposed();
var arg0 = time;
var arg1 = (uint)axis;
var arg2 = WlFixedFromDouble(value);
var arg3 = discrete;
>>>> WlProxyMarshalFlags(_proxyObject, 7, null, WlProxyGetVersion(_proxyObject), 0, arg0, arg1, arg2, arg3);
}
error CS1503: Argument 6: cannot convert from 'uint' to 'WaylandSharp._WlProxy*'
error CS1503: Argument 7: cannot convert from 'uint' to 'WaylandSharp._WlProxy*'
error CS1503: Argument 8: cannot convert from 'WaylandSharp._WlFixedT' to 'WaylandSharp._WlProxy*'
error CS1503: Argument 9: cannot convert from 'int' to 'uint'
These 3 are the only places with issues.
I'm trying to integrate an IME implementation (specifically using zwp_text_input_v3) with a Silk.NET application, is it possible to get a WlDisplay
/WlSurface
object from an nint/IntPtr?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.