00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
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
00080