server/eventQueue.h

00001 /*
00002  * Copyright Ian Burnett 2005, 2006.
00003  *
00004  * This file is part of Ian's Interactive LCD controller (IILC).
00005  * 
00006  * IILC is free software; you can redistribute it and/or modify it under
00007  * the terms of the GNU General Public License as published by the Free
00008  * Software Foundation; either version 2 of the License, or (at your
00009  * option) any later version.
00010  *
00011  * IILC is distributed in the hope that it will be useful, but WITHOUT
00012  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00013  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
00014  * for more details.
00015  *
00016  * You should have received a copy of the GNU General Public License along
00017  * with IILC; if not, write to the Free Software Foundation, Inc.,
00018  * 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA.
00019  */
00020 
00021 #if !defined(__EVENTQUEUE_H__)
00022 #define __EVENTQUEUE_H__
00023 
00024 #include "lcd.h"
00025 
00026 typedef struct _tag_event_queue * LPEVENT_QUEUE;
00027 
00028 typedef enum _tag_event_type
00029 {
00030     EVENT_NOT_DEFINED,
00031     EVENT_NO_OP,
00032     EVENT_TEXT_SCROLL,
00033     EVENT_KEY_PRESS,
00034     EVENT_KEY_RELEASE,
00035     EVENT_LED_UPDATE,
00036     EVENT_SCREEN_CLEAR,
00037     EVENT_SCREEN_CHANGE,
00038     EVENT_SCREEN_REFRESH,
00039     EVENT_SET_BACKLIGHT,
00040     EVENT_ENABLE_TEMP_REPORT,
00041     EVENT_DISABLE_TEMP_REPORT,
00042     EVENT_ENABLE_FAN_REPORT,
00043     EVENT_DISABLE_FAN_REPORT,
00044     EVENT_SET_FAN_STATE,
00045     EVENT_SHUTDOWN,
00046     EVENT_POLL_MODULE,
00047     EVENT_SET_CONTRAST,
00048     EVENT_POLL_LED_STATUS,
00049 
00050 } EVENT_TYPE, * LPEVENT_TYPE;
00051 
00052 
00053 typedef struct _tag_event
00054 {
00055     EVENT_TYPE eType;
00056 
00057     void * pData;
00058 
00059     unsigned int iData;
00060     
00061 } EVENT, * LPEVENT;
00062 
00063 
00064 #define EVENT_INIT(evt,e,p,i) { (evt).eType = (e); (evt).pData = (p); (evt).iData = (i); }
00065 
00066 
00067 LCD_API int eventQueueCreate(LPEVENT_QUEUE * ppEventQueue);
00068 
00069 LCD_API int eventQueueDispose(LPEVENT_QUEUE * ppEventQueue);
00070 
00071 LCD_API int eventQueueEnqueue(LPEVENT_QUEUE pEventQueue,
00072                               LPEVENT pEvent,
00073                               unsigned int fireInMillis);
00074 
00075 LCD_API int eventQueueDequeue(LPEVENT_QUEUE pEventQueue,
00076                               LPEVENT pEvent);
00077 
00078 
00079 #endif /* __EVENTQUEUE_H__ */
00080 

Generated on Mon Jul 17 01:36:11 2006 for IILC by  doxygen 1.4.6