examples: fix build on macOS with gtk+-quartz-3.0

gdk_quartz_window_get_nsview is not declared in the header file now:
error: implicit declaration of function 'gdk_quartz_window_get_nsview'
is invalid in C99 [-Werror,-Wimplicit-function-declaration]

fixes #979

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2095>
This commit is contained in:
Zhao Zhili 2021-01-21 16:01:38 +08:00 committed by GStreamer Marge Bot
parent df0958e855
commit dd27850a9a
4 changed files with 16 additions and 0 deletions

View file

@ -11,6 +11,10 @@
#include <gdk/gdkwin32.h> #include <gdk/gdkwin32.h>
#elif defined (GDK_WINDOWING_QUARTZ) #elif defined (GDK_WINDOWING_QUARTZ)
#include <gdk/gdkquartz.h> #include <gdk/gdkquartz.h>
#if GTK_CHECK_VERSION(3, 24, 10)
#include <AppKit/AppKit.h>
NSView *gdk_quartz_window_get_nsview (GdkWindow * window);
#endif
#endif #endif
/* Structure to contain all our information, so we can pass it around */ /* Structure to contain all our information, so we can pass it around */

View file

@ -33,6 +33,10 @@
#include <gdk/gdkwin32.h> #include <gdk/gdkwin32.h>
#elif defined (GDK_WINDOWING_QUARTZ) #elif defined (GDK_WINDOWING_QUARTZ)
#include <gdk/gdkquartz.h> #include <gdk/gdkquartz.h>
#if GTK_CHECK_VERSION(3, 24, 10)
#include <AppKit/AppKit.h>
NSView *gdk_quartz_window_get_nsview (GdkWindow * window);
#endif
#endif #endif
#include <gtk/gtk.h> #include <gtk/gtk.h>

View file

@ -35,6 +35,10 @@
#endif #endif
#if GST_GL_HAVE_WINDOW_COCOA && defined(GDK_WINDOWING_QUARTZ) #if GST_GL_HAVE_WINDOW_COCOA && defined(GDK_WINDOWING_QUARTZ)
#include <gdk/gdkquartz.h> #include <gdk/gdkquartz.h>
#if GTK_CHECK_VERSION(3, 24, 10)
#include <AppKit/AppKit.h>
NSView *gdk_quartz_window_get_nsview (GdkWindow * window);
#endif
#endif #endif
gboolean gboolean

View file

@ -41,6 +41,10 @@
#include <gdk/gdkwin32.h> #include <gdk/gdkwin32.h>
#elif defined (GDK_WINDOWING_QUARTZ) #elif defined (GDK_WINDOWING_QUARTZ)
#include <gdk/gdkquartz.h> #include <gdk/gdkquartz.h>
#if GTK_CHECK_VERSION(3, 24, 10)
#include <AppKit/AppKit.h>
NSView *gdk_quartz_window_get_nsview (GdkWindow * window);
#endif
#endif #endif
#include <gst/video/videooverlay.h> #include <gst/video/videooverlay.h>