gstreamer/tests/examples/gtk/gstgtk.c

56 lines
1.6 KiB
C
Raw Normal View History

/*
* GStreamer
* Copyright (C) 2009 David A. Schleef <ds@schleef.org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
2012-11-08 11:53:56 +00:00
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "gstgtk.h"
#if defined(GDK_WINDOWING_WIN32)
#include <gdk/gdkwin32.h>
#elif defined(GDK_WINDOWING_X11)
#include <gdk/gdkx.h>
#elif defined(GDK_WINDOWING_QUARTZ)
#include <gdk/gdkquartz.h>
#else
#error unimplemented GTK backend
#endif
void
2012-06-06 14:51:47 +00:00
gst_video_overlay_set_gtk_window (GstVideoOverlay * videooverlay,
GtkWidget * window)
{
#if defined(GDK_WINDOWING_WIN32)
2012-06-06 14:51:47 +00:00
gst_video_overlay_set_window_handle (videooverlay,
(gulong) GDK_WINDOW_HWND (window->window));
#elif defined(GDK_WINDOWING_QUARTZ)
2012-06-06 14:51:47 +00:00
gst_video_overlay_set_window_handle (videooverlay,
(gulong) gdk_quartz_window_get_nswindow (window->window));
#elif defined(GDK_WINDOWING_X11)
2012-06-06 14:51:47 +00:00
gst_video_overlay_set_window_handle (videooverlay,
GDK_WINDOW_XWINDOW (window->window));
#else
#error unimplemented GTK backend
#endif
}