New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Binding for some common Gui operations #2117
Conversation
CI doesn't have libX11 installed (quite understandable), so we need to work around it.
I have a question: what is different from the excellent https://github.com/gui-cs/Terminal.Gui? |
I didn't know that library, but I don't see it doing any of this (or I couldn't find it). My binding is for
Together, these two allow running a desktop OS on something like an Ili934x (on SPI) and a touchscreen or to create custom input devices for a kiosk application. And with "desktop OS" I really mean the full GUI (of either Windows or Unix) |
OK, so it's quite complementary and both can be used at the same time. I'm a big fan of Terminal.Gui. Really works nicely. I'm using it a lot in personal projects. So you can get a gui in a command line with support of mouse as well. So integration of both can be nice. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Few comments but all up, it looks really good and interesting scenario, definitely something that can bring a lot of value!
// Definitions for this file come from X.h and Xlib.h from the Raspberry Pi (32 Bit Raspberry Pi OS) | ||
// Some structures may have different alignment on 64 bit systems, so that it may be required to replace | ||
// some field types with nint/nuint | ||
internal static UInt32 AllPlanes = 0xFFFF_FFFF; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why using UInt32
and not just uint
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For values used in interop calls, I prefer to be explicit about the size. I know that in c#, uint is defined to be 32 bits, but this is not the case in the C world.
internal static extern unsafe Window XDefaultRootWindow(IntPtr display); | ||
|
||
[DllImport(X11)] | ||
internal static extern int XGetWindowAttributes( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe add as well the missing intellisense comments? There are few places where it's not present. For maintainability, it can help for the internal ones especially for the dllimport ones?
Add two virtual devices:
Microsoft Reviewers: Open in CodeFlow