Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
First shot at GTK+ video target for the OLPC laptops. Seriously incom…
Browse files Browse the repository at this point in the history
…plete,

 but it's enough to get some bits to a window...
  • Loading branch information
icculus committed Apr 19, 2007
1 parent 48417df commit 5e54859
Show file tree
Hide file tree
Showing 10 changed files with 1,237 additions and 0 deletions.
30 changes: 30 additions & 0 deletions configure.in
Expand Up @@ -1347,6 +1347,35 @@ AC_HELP_STRING([--enable-video-aalib], [use AAlib video driver [[default=no]]]),
fi
}

dnl Find the GTK+ includes
CheckGTK()
{
AC_ARG_ENABLE(video-gtk,
AC_HELP_STRING([--enable-video-gtk], [use GTK+ video driver [[default=no]]]),
, enable_video_gtk=no)
if test x$enable_video = xyes -a x$enable_video_gtk = xyes; then
AC_PATH_PROG(HAVEPKGCONFIG, pkg-config, $PATH)
if test -z "$HAVEPKGCONFIG"; then
AC_MSG_ERROR([*** pkg-config not found. Cannot probe for gtk+-2.0.])
else
AC_MSG_CHECKING(for GTK+ support)
video_gtk=no
$HAVEPKGCONFIG --exists gtk+-2.0
if test $? -eq 0 ; then
video_gtk=yes
have_video=yes
AC_DEFINE(SDL_VIDEO_DRIVER_GTK)
SOURCES="$SOURCES $srcdir/src/video/gtk/*.c"
GTK2_CFLAGS=`$HAVEPKGCONFIG --cflags libglade-2.0 gtk+-2.0`
GTK2_LIBS=`$HAVEPKGCONFIG --libs libglade-2.0 gtk+-2.0`
EXTRA_CFLAGS="$EXTRA_CFLAGS $GTK2_CFLAGS"
EXTRA_LDFLAGS="$EXTRA_LDFLAGS $GTK2_LIBS"
fi
AC_MSG_RESULT($video_gtk)
fi
fi
}

dnl Set up the QTopia video driver if enabled
CheckQtopia()
{
Expand Down Expand Up @@ -2161,6 +2190,7 @@ case "$host" in
CheckVGL
CheckWscons
CheckAAlib
CheckGTK
CheckQtopia
CheckPicoGUI
CheckOpenGLX11
Expand Down
1 change: 1 addition & 0 deletions include/SDL_config.h.in
Expand Up @@ -258,6 +258,7 @@
#undef SDL_VIDEO_DRIVER_GAPI
#undef SDL_VIDEO_DRIVER_GEM
#undef SDL_VIDEO_DRIVER_GGI
#undef SDL_VIDEO_DRIVER_GTK
#undef SDL_VIDEO_DRIVER_IPOD
#undef SDL_VIDEO_DRIVER_NANOX
#undef SDL_VIDEO_DRIVER_OS2FS
Expand Down
3 changes: 3 additions & 0 deletions src/video/SDL_sysvideo.h
Expand Up @@ -401,6 +401,9 @@ extern VideoBootStrap OS2FSLib_bootstrap;
#if SDL_VIDEO_DRIVER_AALIB
extern VideoBootStrap AALIB_bootstrap;
#endif
#if SDL_VIDEO_DRIVER_GTK
extern VideoBootStrap GTKPLUS_bootstrap;
#endif
#if SDL_VIDEO_DRIVER_DUMMY
extern VideoBootStrap DUMMY_bootstrap;
#endif
Expand Down
3 changes: 3 additions & 0 deletions src/video/SDL_video.c
Expand Up @@ -117,6 +117,9 @@ static VideoBootStrap *bootstrap[] = {
#if SDL_VIDEO_DRIVER_AALIB
&AALIB_bootstrap,
#endif
#if SDL_VIDEO_DRIVER_GTK
&GTKPLUS_bootstrap,
#endif
#if SDL_VIDEO_DRIVER_DUMMY
&DUMMY_bootstrap,
#endif
Expand Down

0 comments on commit 5e54859

Please sign in to comment.