source: abuse/tags/pd/macabuse/inc/idle.hpp @ 604

Last change on this file since 604 was 49, checked in by Sam Hocevar, 15 years ago
  • Imported original public domain release, for future reference.
File size: 746 bytes
Line 
1#ifndef __IDLE_HPP_
2#define __IDLE_HPP_
3
4#include "lisp.hpp"
5#include "specs.hpp"
6#include "image.hpp"
7#include "event.hpp"
8#include "timing.hpp"
9
10class idle_manager
11{
12  enum { total_wait_frames=8 } ;
13
14  image *wait_cursors[total_wait_frames],*old;
15  time_marker last_idle,last_animate;
16  int cursor_frame_on,old_cx,old_cy;
17
18  class event_holder
19  {
20    public :
21    event *ev;
22    event_holder *next;
23  } *first,*last;
24
25  void que_event(event &ev)
26  {
27    event_holder *n=new event_holder;
28    n->ev=new event;
29    *n->ev=ev;
30
31    n->next=0;
32    if (last)
33      last->next=n;
34    else first=n;
35
36    last=n;   
37  }
38
39  public :
40
41  idle_manager();
42  void idle_reset();
43  void idle();
44  ~idle_manager();
45} ;
46
47extern idle_manager *idle_man;
48
49#endif
Note: See TracBrowser for help on using the repository browser.