-/* xscreensaver, Copyright (c) 1992-2006 Jamie Zawinski <jwz@jwz.org>
+/* xscreensaver, Copyright (c) 1992-2018 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
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
+#include <time.h>
#ifdef __hpux
/* Which of the ten billion standards does values.h belong to?
# include <values.h>
#endif
-#ifdef HAVE_COCOA
+#ifdef HAVE_JWXYZ
# include "jwxyz.h"
-#else /* !HAVE_COCOA -- real X11 */
+# include <string.h> /* X11/Xos.h brings this in. */
+/* From utils/visual.c. */
+# define DEFAULT_VISUAL -1
+# define GL_VISUAL -6
+#else /* real X11 */
# include <X11/Xlib.h>
# include <X11/Xutil.h>
# include <X11/Xresource.h>
# include <X11/Xos.h>
-#endif /* !HAVE_COCOA */
+#endif /* !HAVE_JWXYZ */
+
+#if defined(USE_IPHONE) || defined(HAVE_ANDROID)
+# define HAVE_MOBILE
+#endif
+
+#ifdef HAVE_ANDROID
+ /* So that hacks' debug output shows up in logcat... */
+# undef fprintf
+# define fprintf(S, ...) Log(__VA_ARGS__)
+#endif
/* M_PI ought to have been defined in math.h, but... */
#ifndef M_PI
# define M_PI_2 1.5707963267
#endif
+#ifndef Button6
+# define Button6 6
+# define Button7 7
+#endif
+
#include "yarandom.h"
#include "usleep.h"
#include "resources.h"
#include "colors.h"
#include "grabscreen.h"
#include "visual.h"
+#include "fps.h"
+#include "font-retry.h"
/* Be Posixly correct */
#undef bzero
unsigned int w, unsigned int h);
Bool (*event_cb) (Display *, Window, void *, XEvent *);
void (*free_cb) (Display *, Window, void *);
+ void (*fps_cb) (Display *, Window, fps_state *, void *);
+# ifndef HAVE_JWXYZ
Visual * (*pick_visual_hook) (Screen *);
Bool (*validate_visual_hook) (Screen *, const char *, Visual *);
+# else
+ int visual;
+# endif
};