ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/libgender/util.h
(Generate patch)

Comparing libgender/util.h (file contents):
Revision 1.12 by root, Mon Oct 4 23:44:54 2004 UTC vs.
Revision 1.13 by root, Tue Oct 5 01:18:57 2004 UTC

1#ifndef UTIL_H 1#ifndef UTIL_H
2#define UTIL_H 2#define UTIL_H
3 3
4#include <cmath> 4#include <cmath>
5#include <vector> 5#include <vector>
6#include <list>
7#include <map>
8#include "callback.h"
9 6
10using namespace std; 7using namespace std;
11 8
12#include <GL/gl.h> 9#include <GL/gl.h>
13 10
170 167
171 static void frame (); 168 static void frame ();
172 timer (); 169 timer ();
173} timer; 170} timer;
174 171
172/*
175#define MAX_EVENT_TYPES 10 173#define MAX_EVENT_TYPES 10
176enum event_type { TIMER_EV }; 174enum event_type { TIMER_EV };
177struct event { 175struct event {
178 event_type type; 176 event_type type;
179}; 177};
199 list<event_cb> &l = event_lists[e.type]; 197 list<event_cb> &l = event_lists[e.type];
200 for (list<event_cb>::iterator it = l.begin (); it != l.end (); it++) { 198 for (list<event_cb>::iterator it = l.begin (); it != l.end (); it++) {
201 (*it)(e); 199 (*it)(e);
202 } 200 }
203 }; 201 };
204 /*
205 void check_events () { 202 void check_events () {
206 while (!events.empty ()) { 203 while (!events.empty ()) {
207 event &e = events.pop_front (); 204 event &e = events.pop_front ();
208 list<event_cb> &l = event_lists[e->name]; 205 list<event_cb> &l = event_lists[e->name];
209 for (list<event_cb>::iterator it = l.begin (); it !+ l.end (); it++) { 206 for (list<event_cb>::iterator it = l.begin (); it !+ l.end (); it++) {
210 (*it)(e); 207 (*it)(e);
211 } 208 }
212 delete e; // ugly slow? hai hai..... 183G 209 delete e; // ugly slow? hai hai..... 183G
213 } 210 }
214 } 211 }
215 */
216}; 212};
217 213
218extern skedjuhlar main_scheduler; 214extern skedjuhlar main_scheduler;
215*/
219 216
220#endif 217#endif
221 218

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines