From c720aae51515907ae82ee02df80bd084f291d4b1 Mon Sep 17 00:00:00 2001 From: ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> Date: Tue, 15 Mar 2022 06:42:06 +0100 Subject: Make hybrid Wayland/X11 platform. --- FL/mac.H | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'FL/mac.H') diff --git a/FL/mac.H b/FL/mac.H index 0b5d32a34..c1748abce 100644 --- a/FL/mac.H +++ b/FL/mac.H @@ -23,6 +23,13 @@ # error "Never use directly; include instead." #endif // !FL_PLATFORM_H +#ifdef __OBJC__ + @class NSOpenGLContext; +#elif defined(__cplusplus) + class NSOpenGLContext; +#endif /* __OBJC__ */ +extern NSOpenGLContext *fl_mac_glcontext(GLContext rc); + #ifdef __OBJC__ @class FLWindow; // a subclass of the NSWindow Cocoa class typedef FLWindow *Window; @@ -125,6 +132,12 @@ extern CGContextRef fl_gc; */ void fl_mac_set_about(Fl_Callback *cb, void *user_data, int shortcut = 0); +/** Returns the macOS-specific graphics context for the current window */ +extern CGContextRef fl_mac_gc(); +/** Returns the macOS-specific window reference corresponding to the given Fl_Window object */ +extern FLWindow *fl_mac_xid(const Fl_Window *win); +/** Returns the Fl_Window corresponding to the given macOS-specific window reference */ +extern Fl_Window *fl_mac_find(FLWindow *); /** The version number of the running Mac OS X (e.g., 100604 for 10.6.4, 101300 for 10.13). FLTK initializes this global variable before main() begins running. If -- cgit v1.2.3