Problem with multiple shapes from X11, Cairo, SDL2-GFX or other rectangle-like functions #84043
-
Hello everyone, I would like to appreciate about multiple shapes from own functions by P/Invoke but I am really surprised because dotnet can shows after publish native aot generated executable and it shows real multiple rectangles from I get successful P/Invoke and marshaling with Rectangle arrays and passing I tried after published with native aot or without:
I really don't know how do I fix without Segmentation Fault. I have written for example:
and result shows only Method 2:
and result shows again Method 3:
and result shows again And last method like same to Method 3: For And I have made with hard-coded OOP as "X11CPP-Wrapper" for C#, Java and other...
Result It works fine like charm. Why does it expect about P/Invoke and Wrapper? Please tell me why does P/Invoke not work for 1:1 for Non-Windows frameworks like you saw Gtk2 has Wrapper like GtkSharp2 with 3 or 4 built shared libraries - found from Mono's Runtime with GtkSharp 2's libraries I know far why we do not care about Wrappers? Thanks for understanding and supporting! |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 5 replies
-
Can you provide the signatures of your: Also just to confirm, you're only using this from a Unix operating system and not from something like CYGWIN or MINGW on Windows? It is likely that your interop signature is slightly incorrect for the direct binding scenario so understanding fully what you've defined will help. There are also a lot of subtleties to using X11 correctly across a broad range of distributions and some more advanced concepts are not always well-specified. http://github.com/terrafx/terrafx.interop.xlib is a library I own which provides 1-to-1 blittable bindings of Xlib and https://github.com/terrafx/terrafx/tree/experimental/vulkan/sources/UI/Xlib/UI shows an example of using this as part of a higher level abstraction. You'll note there is a quite a bit of state management around the Xlib ATOMS, particularly for the backing "window manager" ( |
Beta Was this translation helpful? Give feedback.
-
Hello @tannergooding are you trying to use multiple rectangles in XDrawRectangles(). Are you sure about 1:1 blittable of your made Xlib. Ok I will test your library. What is the hell? If I use git clone --recursive https://github.com/terrafx/terrafx/ then cd terrafx and and I checked ls then where are sh files and nothing. Please stop manipulating me with Windows-liked types. Wait for uploading.... |
Beta Was this translation helpful? Give feedback.
-
Hey my dear, I would like to add advanced Conversion Functions for sbyte * and string :D
I hope you add important conversion functions for TerraFX.Interop.Xlib; if they are lazy to type how do they understand sbyte * and string Have nice day! |
Beta Was this translation helpful? Give feedback.
TerraFX.Interop.Xlib supports .NET 6: https://www.nuget.org/packages/TerraFX.Interop.Xlib/6.3.0-beta3. I've not pushed up the latest version which adds .NET 7 support and marks it as "stable" yet but could do so later this evening. For the experimental/vulkan branch of TerraFX proper; I can likewise update it to .NET 6/7 later tonight.
In the interim, sharing the
Drawable
,GC
, andXRectangle
types you defined in your failing sample would potentially help us unblock your own code.