荔园在线

荔园之美,在春之萌芽,在夏之绽放,在秋之收获,在冬之沉淀

[回到开始] [上一篇][下一篇]


发信人: bstone (Live my life!), 信区: Linux
标  题: holly大虾的内核分析报告(二)
发信站: BBS 荔园晨风站 (Sat Jan 22 08:53:33 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 *********
***** 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 curre
nt map. NOTE: the scancode here is not the meaning of PC Hardware based scan
code.
               struct keyent_t key; // The value
        };
        Please refer to the explanation of GIO_KEYMAP/PIO_KEYMAP section for
 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
        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_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 cur
sor
        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 screen
 instead of bell.
        if bit 1 is set, set bell type to quiet mode, i.e. not bell is the p
rocess 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.
        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 ena
#define MOUSE_SHOW              0x01  // Let the mouse arrow visible and ena
bled, no mouse_info.u used.
#define MOUSE_HIDE              0x02  // Let the mouse arrow invisible/disab
le, no mouse_info.u used.
#define MOUSE_MOVEABS           0x03  // Move to absolute screen position. m
ouse_info.u.data.(x,y) indicates the new position.
#define MOUSE_MOVEREL           0x04  // Mouse to the position relative to t
he current position. mouse_info.u.data.(x,y) will be added to the current po
sition
#define MOUSE_GETINFO           0x05  // Return current position and buttons
 info in mouse_info.u.data.(x,y, buttons)
#define MOUSE_MODE              0x06 // Set mouse mode. mouse_info.u.mode.si
gnal 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;
        }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 荔园晨风站 bbs.szu.edu.cn.[FROM: bbs@192.168.28.28]


[回到开始] [上一篇][下一篇]

荔园在线首页 友情链接:深圳大学 深大招生 荔园晨风BBS S-Term软件 网络书店