gl/window/win32: implement get_window_handle()

Some other frameworks need the HWND to retrieve information from.
This commit is contained in:
Matthew Waters 2020-02-13 10:41:29 +11:00
parent 7283a45afe
commit 0e1f7f6e8d

View file

@ -54,6 +54,7 @@ G_DEFINE_TYPE_WITH_CODE (GstGLWindowWin32, gst_gl_window_win32,
static void gst_gl_window_win32_set_window_handle (GstGLWindow * window,
guintptr handle);
static guintptr gst_gl_window_win32_get_display (GstGLWindow * window);
static guintptr gst_gl_window_win32_get_window_handle (GstGLWindow * window);
static void gst_gl_window_win32_set_preferred_size (GstGLWindow * window,
gint width, gint height);
static void gst_gl_window_win32_show (GstGLWindow * window);
@ -74,6 +75,8 @@ gst_gl_window_win32_class_init (GstGLWindowWin32Class * klass)
window_class->draw = GST_DEBUG_FUNCPTR (gst_gl_window_win32_draw);
window_class->get_display =
GST_DEBUG_FUNCPTR (gst_gl_window_win32_get_display);
window_class->get_window_handle =
GST_DEBUG_FUNCPTR (gst_gl_window_win32_get_window_handle);
window_class->set_preferred_size =
GST_DEBUG_FUNCPTR (gst_gl_window_win32_set_preferred_size);
window_class->show = GST_DEBUG_FUNCPTR (gst_gl_window_win32_show);
@ -324,6 +327,16 @@ gst_gl_window_win32_get_display (GstGLWindow * window)
return (guintptr) window_win32->device;
}
static guintptr
gst_gl_window_win32_get_window_handle (GstGLWindow * window)
{
GstGLWindowWin32 *window_win32;
window_win32 = GST_GL_WINDOW_WIN32 (window);
return (guintptr) window_win32->internal_win_id;
}
static void
gst_gl_window_win32_set_window_handle (GstGLWindow * window, guintptr id)
{