From http://www.jwz.org/xscreensaver/xscreensaver-5.16.tar.gz
[xscreensaver] / hacks / fpsI.h
1 /* fps, Copyright (c) 2001-2012 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_FPSI_H__
14 # define __XSCREENSAVER_FPSI_H__
15
16 #include "fps.h"
17
18 struct fps_state {
19   Display *dpy;
20   Window window;
21   int x, y;
22   XFontStruct *font;
23   Bool clear_p;
24   char string[1024];
25
26   /* for glx/fps-gl.c */
27 # ifdef HAVE_GLBITMAP
28   unsigned long font_dlist;
29 # else
30   void *gl_fps_data;
31 # endif
32
33   GC draw_gc, erase_gc;
34
35   int last_ifps;
36   double last_fps;
37   int frame_count;
38   unsigned long slept;
39   struct timeval prev_frame_end, this_frame_end;
40 };
41
42 #endif /* __XSCREENSAVER_FPSI_H__ */