From http://www.jwz.org/xscreensaver/xscreensaver-5.35.tar.gz
[xscreensaver] / hacks / fps.h
1 /* fps, Copyright (c) 2001-2011 Jamie Zawinski <jwz@jwz.org>
2  * Draw a frames-per-second display (Xlib and OpenGL).
3  *
4  * Permission to use, copy, modify, distribute, and sell this software and its
5  * documentation for any purpose is hereby granted without fee, provided that
6  * the above copyright notice appear in all copies and that both that
7  * copyright notice and this permission notice appear in supporting
8  * documentation.  No representations are made about the suitability of this
9  * software for any purpose.  It is provided "as is" without express or 
10  * implied warranty.
11  */
12
13 #ifndef __XSCREENSAVER_FPS_H__
14 # define __XSCREENSAVER_FPS_H__
15
16 #ifdef HAVE_CONFIG_H
17 # include "config.h"
18 #endif /* HAVE_CONFIG_H */
19
20 typedef struct fps_state fps_state;
21
22 extern fps_state *fps_init (Display *, Window);
23 extern void fps_free (fps_state *);
24 extern void fps_slept (fps_state *, unsigned long usecs);
25 extern double fps_compute (fps_state *, unsigned long polys, double depth);
26 extern void fps_draw (fps_state *);
27
28 /* Doesn't really belong here, but close enough. */
29 #ifdef HAVE_MOBILE
30   extern double current_device_rotation (void);
31 #else
32 # define current_device_rotation() (0)
33 #endif
34
35 #endif /* __XSCREENSAVER_FPS_H__ */