public static CGImage ScreenImage(int windownumber, CGRect bounds, CGWindowListOption windowOption, CGWindowImageOption imageOption) { IntPtr imageRef = CGWindowListCreateImage(bounds, windowOption, (uint)windownumber, imageOption); if (imageRef == IntPtr.Zero) { return(null); } return(new CGImage(imageRef, true)); }
public static CGImage ScreenImage2(int windownumber, CGRect bounds, CGWindowListOption windowOption, CGWindowImageOption imageOption) { IntPtr imageRef = CGWindowListCreateImage(bounds, windowOption, (uint)windownumber, imageOption); return(new CGImage(imageRef)); }
static extern IntPtr CGWindowListCreateImage(CGRect screenBounds, CGWindowListOption windowOption, uint windowID, CGWindowImageOption imageOption);