Linux 版 (精华区)

发信人: tcpip (偶的昵称改了), 信区: Linux
标  题: holly大虾的内核分析报告(二)(转寄)
发信站: 哈工大紫丁香 (Sat Jan 22 16:30:25 2000), 转信

发信人: stable (xixi), 信区: FreeBSD       

标  题: holly大虾的内核分析报告(二)

发信站: BBS 水木清华站 (Fri Jan 21 21:43:20 2000)

---------------------------------------------------------------------------

----

#define GIO_DEADKEYMAP  _IOR('k', 8, accentmap_t)

#define PIO_DEADKEYMAP  _IOW('k', 9, accentmap_t)

        Get/Set accent translation table ( map )

        accentmap_t == struct accentmap

#define NUM_DEADKEYS    15              /* number of accent keys */

#define NUM_ACCENTCHARS 52              /* max number of accent chars */

struct acc_t {

        u_char accchar;

        u_char map[NUM_ACCENTCHARS][2];

};

struct accentmap {

        u_short n_accs;

        struct acc_t acc[NUM_DEADKEYS];

};

---------------------------------------------------------------------------

---

***** NOTE: These 2 ioctls used by kernel only *********

#define GIO_KEYMAPENT   _IOWR('k', 10, keyarg_t)

#define PIO_KEYMAPENT   _IOW('k', 11, keyarg_t)

        Get/Set Keyboard Translation Table Entry.

        They can be retrieved and changed individually.

        keyarg_t == struct keyarg

        struct keyarg {

               u_short  keynum;     // the scancode, i.e. The index in curr

ent map. NOTE: the scancode here is not the meaning of PC Hardware based sc

ancode.

               struct keyent_t key; // The value

        };

        Please refer to the explanation of GIO_KEYMAP/PIO_KEYMAP section fo

r the type struct keyent_t. The meaning is obvious now.

---------------------------------------------------------------------------

----

#define GIO_ATTR        _IOR('a', 0, int)

        get current attribute. The attribute value is represented in normal

BRGBIRGB format.

---------------------------------------------------------------------------

---

#define GIO_COLOR       _IOR('c', 0, int)

        If the console specified by the ioctl(fd... is a color console, thr

return value is 1, or the value is 0.

---------------------------------------------------------------------------

---

#define CONS_CURRENT    _IOR('c', 1, int)

        Get video adapter type. The values are:

        KD_MONO, KD_HERCULES, KD_CGA, KD_EGA, KD_VGA, KD_PC98

---------------------------------------------------------------------------

---

#define CONS_GET        _IOR('c', 2, int)

        Get Current Video Mode. The Values are: SW_XXXX defined below

---------------------------------------------------------------------------

---

#define CONS_IO         _IO('c', 3)

        Not used.

---------------------------------------------------------------------------

--

#define CONS_BLANKTIME  _IOW('c', 4, int)

        Set screen blank time. the default value is 5 minutes, and the max

blank time is 7 days. ScreenSaver runs only when blankrime != 0

---------------------------------------------------------------------------

---

#define CONS_SSAVER     _IOW('c', 5, ssaver_t)

#define CONS_GSAVER     _IOWR('c', 6, ssaver_t)

        Not used

---------------------------------------------------------------------------

----

#define CONS_CURSORTYPE _IOW('c', 7, int)

        Set the cursor type

        if bit 0 is set, the cursor is blink.

        if bit 1 is set, use the char cursor - under text mode, it is hw cu

rsor

        if all cleared, the non-blink normal cursor.

---------------------------------------------------------------------------

----

#define CONS_BELLTYPE   _IOW('c', 8, int)

        if bit 0 is set, set bell type to visual mode, i.e. flash the scree

n instead of bell.

        if bit 1 is set, set bell type to quiet mode, i.e. not bell is the 

process in the background.

        set bell duration and delay will reset bell type to normal.

---------------------------------------------------------------------------

----

#define CONS_HISTORY    _IOW('c', 9, int)

        Set console history size.

        the parameter is the history buffer lines.

---------------------------------------------------------------------------

---

******** Please run"man sysmouse" for detail information *********

#define CONS_MOUSECTL   _IOWR('c', 10, mouse_info_t)

        Control the Mouse

        mouse_info_t == struct mouse_info

struct mouse_data {

        int     x;

        int     y;

        int     z;

        int     buttons;

};

struct mouse_mode {

        int     mode;

        int     signal;

};

struct mouse_event {

        int     id;                     /* one based */

        int     value;

};

#define MOUSE_SHOW              0x01  // Let the mouse arrow visible and en

abled, no mouse_info.u used.

#define MOUSE_HIDE              0x02  // Let the mouse arrow invisible/disa

ble, no mouse_info.u used.

#define MOUSE_MOVEABS           0x03  // Move to absolute screen position. 

mouse_info.u.data.(x,y) indicates the new position.

#define MOUSE_MOVEREL           0x04  // Mouse to the position relative to 

the current position. mouse_info.u.data.(x,y) will be added to the current 

position

#define MOUSE_GETINFO           0x05  // Return current position and button

s info in mouse_info.u.data.(x,y, buttons)

#define MOUSE_MODE              0x06 // Set mouse mode. mouse_info.u.mode.s

ignal is valid ( Is tehe signal raised when sth ocuured? )

#define MOUSE_ACTION            0x07

#define MOUSE_MOTION_EVENT      0x08

#define MOUSE_BUTTON_EVENT      0x09

struct mouse_info {

        int     operation;  // as above MOUSE_XXXX

        union {

                struct mouse_data data;   // x, y, z , buttons

                struct mouse_mode mode;   // mode, signal

                struct mouse_event event; // id, event

        }u;

};

---------------------------------------------------------------------------

--

#define CONS_IDLE       _IOR('c', 11, int)

        Whether the console is idle.

        return 0 if not idle, otherwise idle

        idle: the specified timeout and no action performed.

        in graphics mode, unless screen saver running, console is not idle.

---------------------------------------------------------------------------

--

#define CONS_SAVERMODE  _IOW('c', 12, int)

        Set Screen Saver mode

        int == CONS_USR_SAVER or CONS_LKM_SAVER

        but How to specify the user mode saver???

        Param: (int *)

---------------------------------------------------------------------------

--

#define CONS_SAVERSTART _IOW('c', 13, int)

        Start / Stop the screen saver.

        int == 0 stop, others start

        Param: (int *)

--

※ 来源:·BBS 水木清华站 smth.org·[FROM: ox2.ios.ac.cn]


--
☆ 来源:.哈工大紫丁香 bbs.hit.edu.cn.[FROM: bin@mtlab.hit.edu.cn]
[百宝箱] [返回首页] [上级目录] [根目录] [返回顶部] [刷新] [返回]
Powered by KBS BBS 2.0 (http://dev.kcn.cn)
页面执行时间:3.338毫秒