added fpsI.h
[xscreensaver] / xscreensaver / hacks / fpsI.h
1 /* fps, Copyright (c) 2001-2008 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   unsigned long font_dlist;  /* for glx/fps-gl.c */
24   Bool clear_p;
25   char string[1024];
26
27   GC draw_gc, erase_gc;
28
29   int last_ifps;
30   double last_fps;
31   int frame_count;
32   unsigned long slept;
33   struct timeval prev_frame_end, this_frame_end;
34 };
35
36 #endif /* __XSCREENSAVER_FPSI_H__ */