kstars
eventloop.h
Go to the documentation of this file.00001 #if 0
00002 INDI
00003 Copyright (C) 2003 Elwood C. Downey
00004
00005 This library is free software; you can redistribute it and/or
00006 modify it under the terms of the GNU Lesser General Public
00007 License as published by the Free Software Foundation; either
00008 version 2.1 of the License, or (at your option) any later version.
00009
00010 This library is distributed in the hope that it will be useful,
00011 but WITHOUT ANY WARRANTY; without even the implied warranty of
00012 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
00013 Lesser General Public License for more details.
00014
00015 You should have received a copy of the GNU Lesser General Public
00016 License along with this library; if not, write to the Free Software
00017 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
00018
00019 #endif
00020
00021 #ifndef EVENT_LOOP_H
00022 #define EVENT_LOOP_H
00023
00029
00030
00034 typedef void (CBF) (int fd, void *);
00035
00039 typedef void (WPF) (void *);
00040
00044 typedef void (TCF) (void *);
00045
00046 #ifdef __cplusplus
00047 extern "C" {
00048 #endif
00049
00053 extern void eventLoop(void);
00054
00059
00067 extern int addCallback (int fd, CBF *fp, void *ud);
00068
00073 extern void rmCallback (int cid);
00074
00081 extern int addWorkProc (WPF *fp, void *ud);
00082
00087 extern void rmWorkProc (int wid);
00088
00096 extern int addTimer (int ms, TCF *fp, void *ud);
00097
00102 extern void rmTimer (int tid);
00103
00106 #ifdef __cplusplus
00107 }
00108 #endif
00109
00110 #endif