void DrawDirect(FastBitmap bmp, uint bits, X11Window win, Rectangle r) { IntPtr image = API.XCreateImage(API.DefaultDisplay, win.VisualInfo.Visual, bits, ImageFormat.ZPixmap, 0, bmp.Scan0, bmp.Width, bmp.Height, 32, 0); API.XPutImage(API.DefaultDisplay, win.WinHandle, gc, image, r.X, r.Y, r.X, r.Y, r.Width, r.Height); API.XFree(image); }
public override void Redraw(Bitmap framebuffer, Rectangle r) { X11Window x11Win = (X11Window)window; using (FastBitmap bmp = new FastBitmap(framebuffer, true, true)) { switch (x11Win.VisualInfo.Depth) { case 32: DrawDirect(bmp, 32, x11Win, r); break; case 24: DrawDirect(bmp, 24, x11Win, r); break; //case 16: Draw16Bits(fastBmp, x11Info); break; //case 15: Draw15Bits(fastBmp, x11Info); break; default: throw new NotSupportedException("Unsupported bits per pixel: " + x11Win.VisualInfo.Depth); } } }
internal static async Task <IStorageProvider?> TryCreate(X11Window window) { _initialized ??= StartGtk(); return(await _initialized ? new GtkSystemDialog(window) : null); }
private GtkSystemDialog(X11Window window) { _window = window; }
public SurfacePlatformHandle(X11Window owner) { _owner = owner; }