customial.h

00001 /*
00002 ** $Id: customial.h 11349 2009-03-02 05:00:43Z weiym $
00003 **
00004 ** custom.h:. the head file for Custom IAL Engine.
00005 **
00006 ** Copyright (C) 2007 ~ 2009 Feynman Software.
00007 **
00008 ** Created by Wei YongMing, 2007/06/06
00009 */
00010 
00011 #ifndef GUI_IAL_CUSTOM_H
00012     #define GUI_IAL_CUSTOM_H
00013 
00014 #ifdef __cplusplus
00015 extern "C" {
00016 #endif  /* __cplusplus */
00017 
00018 
00019 #define IAL_MOUSE_LEFTBUTTON    1
00020 #define IAL_MOUSE_RIGHTBUTTON   2
00021 #define IAL_MOUSE_MIDDLEBUTTON  4
00022 #define IAL_MOUSE_FOURTHBUTTON  8
00023 #define IAL_MOUSE_FIFTHBUTTON   16
00024 #define IAL_MOUSE_SIXTHBUTTON   32
00025 #define IAL_MOUSE_RESETBUTTON   64
00026 
00027 #define IAL_MOUSEEVENT          1
00028 #define IAL_KEYEVENT            2
00029 
00030 typedef struct tagINPUT
00031 {
00032     char*   id;
00033 
00034     // Initialization and termination
00035     BOOL (*init_input) (struct tagINPUT *input, const char* mdev, const char* mtype);
00036     void (*term_input) (void);
00037 
00038     // Mouse operations
00039     int  (*update_mouse) (void);
00040     void (*get_mouse_xy) (int* x, int* y);
00041     void (*set_mouse_xy) (int x, int y);
00042     int  (*get_mouse_button) (void);
00043     void (*set_mouse_range) (int minx, int miny, int maxx, int maxy);
00044     void (*suspend_mouse) (void);
00045     int (*resume_mouse) (void);
00046 
00047     // Keyboard operations
00048     int  (*update_keyboard) (void);
00049     const char* (*get_keyboard_state) (void);
00050     void (*suspend_keyboard) (void);
00051     int (*resume_keyboard) (void);
00052     void (*set_leds) (unsigned int leds);
00053 
00054     // Event
00055     int (*wait_event) (int which, int maxfd, fd_set *in, fd_set *out, 
00056             fd_set *except, struct timeval *timeout);
00057 
00058     char mdev [MAX_PATH + 1];
00059 }INPUT;
00060 
00061 #ifdef _MGIAL_CUSTOM
00062 extern BOOL InitCustomInput (INPUT* input, const char* mdev, const char* mtype);
00063 extern void TermCustomInput (void);
00064 #endif
00065 
00066 #ifdef __cplusplus
00067 }
00068 #endif  /* __cplusplus */
00069 
00070 #endif  /* GUI_IAL_CUSTOM_H */
00071 
00072 
Generated on Thu Apr 7 16:01:40 2011 for MiniGUI V3.0.12 API Reference by  doxygen 1.6.3