From 7ce5b74e12103ab5ec372ecc2500435deb22d7aa Mon Sep 17 00:00:00 2001 From: ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> Date: Fri, 1 Nov 2024 18:25:59 +0100 Subject: New member function Fl_Cocoa_Window_Driver::capture_decorated_window_10_6(NSWindow*) This function hides the code to capture an image of a window that varies a lot with macOS versions --- src/drivers/Cocoa/Fl_Cocoa_Window_Driver.H | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/drivers') diff --git a/src/drivers/Cocoa/Fl_Cocoa_Window_Driver.H b/src/drivers/Cocoa/Fl_Cocoa_Window_Driver.H index 3c47c49c9..ef57a4607 100644 --- a/src/drivers/Cocoa/Fl_Cocoa_Window_Driver.H +++ b/src/drivers/Cocoa/Fl_Cocoa_Window_Driver.H @@ -37,6 +37,7 @@ class Fl_Window; @class NSOpenGLContext; @class NSOpenGLPixelFormat; @class NSView; +@class NSWindow; #else class CALayer; class NSCursor; @@ -45,6 +46,7 @@ class FLWindow; class NSOpenGLContext; class NSOpenGLPixelFormat; class NSView; +class NSWindow; #endif // __OBJC__ /** @@ -95,6 +97,7 @@ public: NSCursor *cursor; static void q_release_context(Fl_Cocoa_Window_Driver *x = 0); // free all resources associated with gc static void clip_to_rounded_corners(CGContextRef gc, int w, int h); + static CGImageRef capture_decorated_window_10_6(NSWindow *nswin); void set_key_window(); bool mapped_to_retina(); // is window mapped to retina display? void mapped_to_retina(bool); // sets whether window is mapped to retina display -- cgit v1.2.3