Add a public header for Cocoa access functions.

Some applications need to access gdk_quartz_window_get_nsview,
gdk_quartz_window_get_nswindow, and gdk_quartz_event_get_nsevent
so move these from the private gdkquartz-gtk-only.h to a new
header gdkquartz-cocoa-access.h. Don't include this header in
gdkquartz.h so that user code that doesn't need to access these
functins isn't required to compile with Objective C/C++.

Closes https://gitlab.gnome.org/GNOME/gtk/-/issues/1737
This commit is contained in:
John Ralls
2021-04-16 16:56:55 -07:00
parent 3a70781d40
commit 242b76a771
11 changed files with 50 additions and 13 deletions

View File

@ -38,13 +38,5 @@ NSString *gdk_quartz_atom_to_pasteboard_type_libgtk_only (GdkAtom
/* Utilities */
GDK_AVAILABLE_IN_ALL
NSImage *gdk_quartz_pixbuf_to_ns_image_libgtk_only (GdkPixbuf *pixbuf);
GDK_AVAILABLE_IN_ALL
NSEvent *gdk_quartz_event_get_nsevent (GdkEvent *event);
/* Window */
GDK_AVAILABLE_IN_ALL
NSWindow *gdk_quartz_window_get_nswindow (GdkWindow *window);
GDK_AVAILABLE_IN_ALL
NSView *gdk_quartz_window_get_nsview (GdkWindow *window);
#endif