Commit | Line | Data |
---|---|---|
3144ee8a AT |
1 | /* fps, Copyright (c) 2001-2014 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 | #undef HAVE_GLBITMAP | |
18 | ||
19 | ||
20 | struct fps_state { | |
21 | Display *dpy; | |
22 | Window window; | |
23 | int x, y; | |
24 | XFontStruct *font; | |
25 | Bool clear_p; | |
26 | char string[1024]; | |
27 | ||
28 | /* for glx/fps-gl.c */ | |
29 | void *gl_fps_data; | |
30 | ||
31 | GC draw_gc, erase_gc; | |
32 | ||
33 | int last_ifps; | |
34 | double last_fps; | |
35 | int frame_count; | |
36 | unsigned long slept; | |
37 | struct timeval prev_frame_end, this_frame_end; | |
38 | }; | |
39 | ||
40 | #endif /* __XSCREENSAVER_FPSI_H__ */ |