📄 ial.h
字号:
//// $Id: ial.h,v 1.9 2000/11/27 01:56:02 ymwei Exp $//// gal.h: the head file of Graphics Abstract Layer//// Copyright (C) 2000, WEI Yongming.// Copyright (C) 2000, BluePoint Software.//// Written by WEI Yongming, 2000/06/13//#ifndef GUI_IAL_H #define GUI_IAL_H#ifdef __ECOS# include <time.h>#else# include <sys/times.h>#endif#include <sys/types.h>#include <unistd.h>#ifdef __cplusplusextern "C" {#endif /* __cplusplus */#define IAL_MOUSE_LEFTBUTTON 4#define IAL_MOUSE_MIDDLEBUTTON 2#define IAL_MOUSE_RIGHTBUTTON 1#define IAL_MOUSE_FOURTHBUTTON 8#define IAL_MOUSE_FIFTHBUTTON 16#define IAL_MOUSE_SIXTHBUTTON 32#define IAL_MOUSE_RESETBUTTON 64#define IAL_MOUSEEVENT 1#define IAL_KEYEVENT 2typedef struct tagINPUT{ char* id; // Initialization and termination BOOL (*init_input) (struct tagINPUT *input, const char* mdev, const char* mtype); void (*term_input) (void); // Mouse operations int (*update_mouse) (void); int (*get_mouse_x) (void); int (*get_mouse_y) (void); void (*set_mouse_xy) (int x, int y); int (*get_mouse_button) (void); void (*set_mouse_range) (int minx, int miny,int maxx,int maxy); // Keyboard operations int (*update_keyboard) (void); char* (*get_keyboard_state) (void); void (*set_leds) (unsigned int leds); // Event int (*wait_event) (int which, fd_set *in, fd_set *out, fd_set *except, struct timeval *timeout);}INPUT;extern INPUT* cur_input;#define IAL_InitInput (*cur_input->init_input)#define IAL_TermInput (*cur_input->term_input)#define IAL_UpdateMouse (*cur_input->update_mouse)#define IAL_GetMouseX (*cur_input->get_mouse_x)#define IAL_GetMouseY (*cur_input->get_mouse_y)#define IAL_SetMouseXY (*cur_input->set_mouse_xy)#define IAL_GetMouseButton (*cur_input->get_mouse_button)#define IAL_SetMouseRange (*cur_input->set_mouse_range)#define IAL_UpdateKeyboard (*cur_input->update_keyboard)#define IAL_GetKeyboardState (*cur_input->get_keyboard_state)#define IAL_SetLeds(leds) if (cur_input->set_leds) (*cur_input->set_leds) (leds)#define IAL_WaitEvent (*cur_input->wait_event)int InitIAL (void);void TerminateIAL (void);#ifdef __cplusplus}#endif /* __cplusplus */#endif /* GUI_IAL_H */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -