From http://www.jwz.org/xscreensaver/xscreensaver-5.35.tar.gz
[xscreensaver] / hacks / xlockmore.h
index 5d2a1a1d5901a48466a2899fee9f87b0dcf9c142..5572580d8e6e4dfe226e1768cd3bbe978080451d 100644 (file)
@@ -1,5 +1,5 @@
 /* xlockmore.h --- xscreensaver compatibility layer for xlockmore modules.
- * xscreensaver, Copyright (c) 1997-2011 Jamie Zawinski <jwz@jwz.org>
+ * xscreensaver, Copyright (c) 1997-2012 Jamie Zawinski <jwz@jwz.org>
  *
  * Permission to use, copy, modify, distribute, and sell this software and its
  * documentation for any purpose is hereby granted without fee, provided that
@@ -29,19 +29,6 @@ ERROR!  Sorry, xlockmore.h requires ANSI C (gcc, for example.)
 #include "screenhackI.h"
 #include "xlockmoreI.h"
 
-#ifdef USE_GL
-
-# ifdef HAVE_COCOA
-#  include <OpenGL/gl.h>
-#  include <OpenGL/glu.h>
-# else  /* !HAVE_COCOA -- real Xlib */
-#  include <GL/glx.h>
-#  include <GL/glu.h>
-# endif /* !HAVE_COCOA */
-
-# define FreeAllGL(dpy) /* */
-#endif /* USE_GL */
-
 # define ENTRYPOINT static
 
 /* Accessor macros for the ModeInfo structure
@@ -102,6 +89,8 @@ ERROR!  Sorry, xlockmore.h requires ANSI C (gcc, for example.)
 
 #define MI_CLEARWINDOW(mi) XClearWindow(MI_DISPLAY(mi), MI_WINDOW(mi))
 
+#define FreeAllGL(dpy)         /* */
+
 /* Some other utility macros.
  */
 #define SINF(n)                        ((float)sin((double)(n)))
@@ -123,10 +112,10 @@ ERROR!  Sorry, xlockmore.h requires ANSI C (gcc, for example.)
    a struct in `MODULENAME_xscreensaver_function_table',
    and a pointer to that in `xscreensaver_function_table'.
 
-   In a Cocoa world, we only define the prefixed symbol;
+   In a Cocoa or Android world, we only define the prefixed symbol;
    the un-prefixed symbol does not exist.
  */
-#ifdef HAVE_COCOA
+#ifdef HAVE_MOBILE
 # define XSCREENSAVER_LINK(NAME)
 #else
 # define XSCREENSAVER_LINK(NAME) \
@@ -134,10 +123,10 @@ ERROR!  Sorry, xlockmore.h requires ANSI C (gcc, for example.)
 #endif
 
 
-# if !defined(USE_GL) || defined(HAVE_COCOA)
+# if !defined(USE_GL) || defined(HAVE_COCOA) || defined(HAVE_ANDROID)
 #  define xlockmore_pick_gl_visual 0
 #  define xlockmore_validate_gl_visual 0
-# endif  /* !USE_GL || HAVE_COCOA */
+# endif  /* !USE_GL || HAVE_COCOA || HAVE_ANDROID */
 
 # ifdef USE_GL
 #  define XLOCKMORE_FPS xlockmore_gl_compute_fps
@@ -190,7 +179,8 @@ ERROR!  Sorry, xlockmore.h requires ANSI C (gcc, for example.)
           refresh_ ## PREFIX,                                          \
           release_ ## PREFIX,                                          \
           PREFIX   ## _handle_event,                                   \
-          & PREFIX ## _opts                                            \
+          & PREFIX ## _opts,                                           \
+          0                                                            \
   };                                                                   \
                                                                        \
   struct xscreensaver_function_table                                   \