MiniGUI API Reference (MiniGUI-Processes)  v3.2.0
A mature and proven cross-platform GUI system for embedded and smart IoT devices
customial.h
Go to the documentation of this file.
1 
44 /*
45  * $Id: customial.h 11349 2009-03-02 05:00:43Z weiym $
46  *
47  * MiniGUI for Linux/uClinux, eCos, uC/OS-II, VxWorks,
48  * pSOS, ThreadX, NuCleus, OSE, and Win32.
49  */
50 
51 #ifndef GUI_IAL_CUSTOM_H
52  #define GUI_IAL_CUSTOM_H
53 
54 #ifdef __cplusplus
55 extern "C" {
56 #endif /* __cplusplus */
57 
58 
59 #define IAL_MOUSE_LEFTBUTTON 1
60 #define IAL_MOUSE_RIGHTBUTTON 2
61 #define IAL_MOUSE_MIDDLEBUTTON 4
62 #define IAL_MOUSE_FOURTHBUTTON 8
63 #define IAL_MOUSE_FIFTHBUTTON 16
64 #define IAL_MOUSE_SIXTHBUTTON 32
65 #define IAL_MOUSE_RESETBUTTON 64
66 
67 #define IAL_MOUSEEVENT 1
68 #define IAL_KEYEVENT 2
69 
70 typedef struct tagINPUT
71 {
72  char* id;
73 
74  // Initialization and termination
75  BOOL (*init_input) (struct tagINPUT *input, const char* mdev, const char* mtype);
76  void (*term_input) (void);
77 
78  // Mouse operations
79  int (*update_mouse) (void);
80  void (*get_mouse_xy) (int* x, int* y);
81  void (*set_mouse_xy) (int x, int y);
82  int (*get_mouse_button) (void);
83  void (*set_mouse_range) (int minx, int miny, int maxx, int maxy);
84  void (*suspend_mouse) (void);
85  int (*resume_mouse) (void);
86 
87  // Keyboard operations
88  int (*update_keyboard) (void);
89  const char* (*get_keyboard_state) (void);
90  void (*suspend_keyboard) (void);
91  int (*resume_keyboard) (void);
92  void (*set_leds) (unsigned int leds);
93 
94  // Event
95  int (*wait_event) (int which, int maxfd, fd_set *in, fd_set *out,
96  fd_set *except, struct timeval *timeout);
97 
98  char mdev [MAX_PATH + 1];
99 }INPUT;
100 
101 #ifdef _MGIAL_CUSTOM
102 extern BOOL InitCustomInput (INPUT* input, const char* mdev, const char* mtype);
103 extern void TermCustomInput (void);
104 #endif
105 
106 #ifdef __cplusplus
107 }
108 #endif /* __cplusplus */
109 
110 #endif /* GUI_IAL_CUSTOM_H */
111 
112 
int BOOL
A type definition for boolean value.
Definition: common.h:294
#define MAX_PATH
The possible maximal length of a path name.
Definition: common.h:1702