]> git.mxchange.org Git - flightgear.git/blob - Time/event.hxx
Wrapped "#include <config.h>" in "#ifdef HAVE_CONFIG_H"
[flightgear.git] / Time / event.hxx
1 /**************************************************************************
2  * event.hxx -- Flight Gear periodic event scheduler
3  *
4  * Written by Curtis Olson, started December 1997.
5  *
6  * Copyright (C) 1997  Curtis L. Olson  - curt@infoplane.com
7  *
8  * This program is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU General Public License as
10  * published by the Free Software Foundation; either version 2 of the
11  * License, or (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful, but
14  * WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16  * General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program; if not, write to the Free Software
20  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21  *
22  * $Id$
23  * (Log is kept at end of this file)
24  **************************************************************************/
25
26
27 #ifndef _EVENT_HXX
28 #define _EVENT_HXX
29
30
31 #ifndef __cplusplus                                                          
32 # error This library requires C++
33 #endif                                   
34
35
36 #define FG_EVENT_SUSP 0
37 #define FG_EVENT_READY 1
38 #define FG_EVENT_QUEUED 2
39
40
41 /* Initialize the scheduling subsystem */
42 void fgEventInit( void );
43
44 /* Register an event with the scheduler, returns a pointer into the
45  * event table */
46 int fgEventRegister(char *desc, void (*event)( void ), int status, 
47                     int interval);
48
49 /* Update the scheduling parameters for an event */
50 void fgEventUpdate( void );
51
52 /* Delete a scheduled event */
53 void fgEventDelete( void );
54
55 /* Temporarily suspend scheduling of an event */
56 void fgEventSuspend( void );
57
58 /* Resume scheduling and event */
59 void fgEventResume( void );
60
61 /* Dump scheduling stats */
62 void fgEventPrintStats( void );
63
64 /* Add pending jobs to the run queue and run the job at the front of
65  * the queue */
66 void fgEventProcess( void );
67
68
69 #endif /* _EVENT_HXX */
70
71
72 /* $Log$
73 /* Revision 1.1  1998/04/24 00:52:26  curt
74 /* Wrapped "#include <config.h>" in "#ifdef HAVE_CONFIG_H"
75 /* Fog color fixes.
76 /* Separated out lighting calcs into their own file.
77 /*
78  * Revision 1.4  1998/04/21 17:01:43  curt
79  * Fixed a problems where a pointer to a function was being passed around.  In
80  * one place this functions arguments were defined as ( void ) while in another
81  * place they were defined as ( int ).  The correct answer was ( int ).
82  *
83  * Prepairing for C++ integration.
84  *
85  * Revision 1.3  1998/01/22 02:59:43  curt
86  * Changed #ifdef FILE_H to #ifdef _FILE_H
87  *
88  * Revision 1.2  1998/01/19 18:40:39  curt
89  * Tons of little changes to clean up the code and to remove fatal errors
90  * when building with the c++ compiler.
91  *
92  * Revision 1.1  1997/12/30 04:19:22  curt
93  * Initial revision.
94  *
95  */