易截截图软件、单文件、免安装、纯绿色、仅160KB

Linux的Input Device

      Linux 的 Input Device 是重要的一個 subsystem,在進行實例介紹前,先大略了解一下相關的 API。input.c是Linux的输入驅動程式,主要支援鍵盤與滑鼠的輸入;input.c介面特殊的地方是採用了事件(event)的方式來處理輸入,以下是input.c介面重要的資料結構與函數:
* struct input_dev
* void input_event(struct input_dev *dev, unsigned int type, unsigned int code, int value)
* void input_register_device(struct input_dev *);
* void input_unregister_device(struct input_dev *);
* void input_register_handler(struct input_handler *);
* void input_unregister_handler(struct input_handler *);
(1) struct input_dev是用來描述輸入事件的重要資料結構,其原型如下:
struct input_dev {
 const char *name;
 const char *phys;
 const char *uniq;
 struct input_id id;
 unsigned long evbit[BITS_TO_LONGS(EV_CNT)];
 unsigned long keybit[BITS_TO_LONGS(KEY_CNT)];
 unsigned long relbit[BITS_TO_LONGS(REL_CNT)];
 unsigned long absbit[BITS_TO_LONGS(ABS_CNT)];
 unsigned long mscbit[BITS_TO_LONGS(MSC_CNT)];
 unsigned long ledbit[BITS_TO_LONGS(LED_CNT)];
 unsigned long sndbit[BITS_TO_LONGS(SND_CNT)];
 unsigned long ffbit[BITS_TO_LONGS(FF_CNT)];
 unsigned long swbit[BITS_TO_LONGS(SW_CNT)];
 unsigned int keycodemax;
 unsigned int keycodesize;
 void *keycode;
 int (*setkeycode)(struct input_dev *dev, int scancode, int keycode);
 int (*getkeycode)(struct input_dev *dev, int scancode, int *keycode);
 struct ff_device *ff;
 unsigned int repeat_key;
 struct timer_list timer;
 int sync;
 int abs[ABS_MAX + 1];
 int rep[REP_MAX + 1];
 unsigned long key[BITS_TO_LONGS(KEY_CNT)];
 unsigned long led[BITS_TO_LONGS(LED_CNT)];
 unsigned long snd[BITS_TO_LONGS(SND_CNT)];
 unsign


相关文档:

linux shell脚本之if判断

无论什么编程语言都离不开条件判断。SHELL也不例外。
 if list then
          do something here
      elif list then
          do another thing here
      ......

Linux 下 etc/ 目录文件详解

3. 网络配置文件
3.1 /etc/hosts
#/etc/hosts
#文件格式: IPaddress hostname aliases
#文件功能: 提供主机名到IP地址的对应关系,建议将自己经常使用的主机
# 加入此文件中,也可将没有DNS记录的机器加入到此文件中,
# 这样会方便网络应用
127.0.0.1 localhost localhost.localdomain
202.118.66.81 helius.dlut. ......

UNIX 与Linux的比较

    UNIX是历史最悠久的通用操作系统。1969年,美国贝尔实验室的K.Thompson和D.M.Ritchie在规模较小及较简单的分时操作系统MULTICS的基础上开发出UNIX, 当时是在DEC的PDP—7小型计算机上实现的,1970年正式投入运行。此后数年,UNIX一直是一个限于在AT&T内部使用的操作系统。1971年,发展出以 PDP- ......

linux下安装mysql的三种方式

本次安装的系统平台为redhat 5
一、使用RPM包进行安装
  首先可以从安装光盘中或者到mysql的网站上下载对应版本的rpm包如下:
MySQL-server-community-5.1.38-0.rhel5.i386.rpm
MySQL-client-community-5.1.38-0.rhel5.i386.rpm
    接着我们可以使用rpm命令进行安装:
rpm -ivh MySQL ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号