Search
lxdream.org :: lxdream/src/drivers/video_gtk.c :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/drivers/video_gtk.c
changeset 663:553bb7d6befa
prev661:99d9494955a9
next665:99ae9dc4cab7
author nkeynes
date Thu Apr 17 08:15:19 2008 +0000 (12 years ago)
permissions -rw-r--r--
last change Commit NSGL work-in-progress
file annotate diff log raw
1.1 --- a/src/drivers/video_gtk.c Thu Apr 17 00:01:40 2008 +0000
1.2 +++ b/src/drivers/video_gtk.c Thu Apr 17 08:15:19 2008 +0000
1.3 @@ -99,6 +99,21 @@
1.4
1.5 #endif
1.6
1.7 +#ifdef HAVE_GTK_OSX
1.8 +#include "drivers/video_nsgl.h"
1.9 +
1.10 +// Include this prototype as some systems don't have gdkquartz.h installed
1.11 +NSView *gdk_quartz_window_get_nsview( GdkWindow *window);
1.12 +
1.13 +guint gdk_keycode_to_modifier( GdkDisplay *display, guint keycode )
1.14 +{
1.15 + return 0;
1.16 +}
1.17 +
1.18 +#endif
1.19 +
1.20 +
1.21 +
1.22 GtkWidget *gtk_video_drawable = NULL;
1.23 int video_width = 640;
1.24 int video_height = 480;
1.25 @@ -271,6 +286,13 @@
1.26 ! video_glx_init_driver( &display_gtk_driver ) ) {
1.27 return FALSE;
1.28 }
1.29 +#else
1.30 +#ifdef HAVE_NSGL
1.31 + NSView *view = gdk_quartz_window_get_nsview(gtk_video_drawable->window);
1.32 + if( ! video_nsgl_init_driver( view, &display_gtk_driver ) ) {
1.33 + return FALSE;
1.34 + }
1.35 +#endif
1.36 #endif
1.37 #endif
1.38
1.39 @@ -301,6 +323,10 @@
1.40 #else
1.41 #ifdef HAVE_GLX
1.42 video_glx_shutdown();
1.43 +#else
1.44 +#ifdef HAVE_NSGL
1.45 + video_nsgl_shutdown();
1.46 +#endif
1.47 #endif
1.48 #endif
1.49 }
.