Linux 版 (精华区)
发信人: tcpip (偶的昵称改了), 信区: Linux
标 题: holly大虾的内核分析报告(四)(转寄)
发信站: 哈工大紫丁香 (Sat Jan 22 16:30:54 2000), 转信
发信人: stable (xixi), 信区: FreeBSD
标 题: holly大虾的内核分析报告(四)
发信站: BBS 水木清华站 (Fri Jan 21 21:46:02 2000)
---------------------------------------------------------------------------
---#define VT_RELDISP _IO('v', 4 /*, int */)
Whether and How we will Release the display?
int == VT_FALSE, user refused to switch
== VT_TRUE, has released
== VT_ACKACQ, acquire ackownledged, switch completed
This ioctl() always called in release signal handler.
When the release signal occured, the handler call VT_RELDISP
to perform the action.
---------------------------------------------------------------------------
---#define VT_ACTIVATE _IO('v', 5 /*, int */)
Switch to scrren specified by the parameter ( from 1 )
---------------------------------------------------------------------------
---#define VT_WAITACTIVE _IO('v', 6 /*, int */)
VT_ACTIVATE just start the switch action, to wait for its completio
n, VT_WAITACTIVATE must be called. When return, the switch is comple
ted. the param is the new console index
---------------------------------------------------------------------------
---#define VT_GETACTIVE _IOR('v', 7, int)
Get current console index
---------------------------------------------------------------------------
---#define VT_FALSE 0
#define VT_TRUE 1
#define VT_ACKACQ 2
#define VT_AUTO 0 /* switching is automatic */
#define VT_PROCESS 1 /* switching controlled by prog */
#define VT_KERNEL 255 /* switching controlled in kernel *
/--------------------------------------------------------------------------
--#ifndef _VT_MODE_DECLARED
#define _VT_MODE_DECLARED
struct vt_mode {
char mode;
char waitv; /* not implemented yet SOS */
short relsig;
short acqsig;
short frsig; /* not implemented yet SOS */
};
typedef struct vt_mode vtmode_t;
#endif /* !_VT_MODE_DECLARED */
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
#define MOUSE_HIDE 0x02
#define MOUSE_MOVEABS 0x03
#define MOUSE_MOVEREL 0x04
#define MOUSE_GETINFO 0x05
#define MOUSE_MODE 0x06
#define MOUSE_ACTION 0x07
#define MOUSE_MOTION_EVENT 0x08
#define MOUSE_BUTTON_EVENT 0x09
struct mouse_info {
int operation;
union {
struct mouse_data data;
struct mouse_mode mode;
struct mouse_event event;
}u;
};
#define KD_MONO 1 /* monochrome adapter */
#define KD_HERCULES 2 /* hercules adapter */
#define KD_CGA 3 /* color graphics adapter */
#define KD_EGA 4 /* enhanced graphics adapter */
#define KD_VGA 5 /* video graphics adapter */
#define KD_PC98 6 /* PC-98 display */
#define KD_TEXT 0 /* set text mode restore fonts */
#define KD_TEXT0 0 /* ditto */
#define KD_TEXT1 2 /* set text mode !restore fonts */
#define KD_GRAPHICS 1 /* set graphics mode */
#define KD_PIXEL 3 /* set pixel mode */
#define K_RAW 0 /* keyboard returns scancodes */
#define K_XLATE 1 /* keyboard returns ascii */
#define K_CODE 2 /* keyboard returns keycodes */
#define KB_84 1 /* 'old' 84 key AT-keyboard */
#define KB_101 2 /* MF-101 or MF-102 keyboard */
#define KB_OTHER 3 /* keyboard not known */
#define CLKED 1 /* Caps locked */
#define NLKED 2 /* Num locked */
#define SLKED 4 /* Scroll locked */
#define ALKED 8 /* AltGr locked */
#define LOCK_MASK (CLKED | NLKED | SLKED | ALKED)
#define LED_CAP 1 /* Caps lock LED */
#define LED_NUM 2 /* Num lock LED */
#define LED_SCR 4 /* Scroll lock LED */
#define LED_MASK (LED_CAP | LED_NUM | LED_SCR)
/* possible flag values */
#define FLAG_LOCK_O 0
#define FLAG_LOCK_C 1
#define FLAG_LOCK_N 2
#define NUM_KEYS 256 /* number of keys in table */
#define NUM_STATES 8 /* states per key */
#define ALTGR_OFFSET 128 /* offset for altlock keys */
#ifndef _KEYMAP_DECLARED
#define _KEYMAP_DECLARED
struct keyent_t {
u_char map[NUM_STATES];
u_char spcl;
u_char flgs;
};
struct keymap {
u_short n_keys;
struct keyent_t key[NUM_KEYS];
};
typedef struct keymap keymap_t;
struct keyarg {
u_short keynum;
struct keyent_t key;
};
typedef struct keyarg keyarg_t;
#endif /* !_KEYMAP_DECLARED */
#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];
};
#define MAXFK 16
#define NUM_FKEYS 96
struct fkeytab {
u_char str[MAXFK];
u_char len;
};
struct fkeyarg {
u_short keynum;
char keydef[MAXFK];
char flen;
};
struct colors {
char fore;
char back;
};
struct vid_info {
short size;
short m_num;
u_short mv_row, mv_col;
u_short mv_rsz, mv_csz;
struct colors mv_norm,
mv_rev,
mv_grfc;
u_char mv_ovscan;
u_char mk_keylock;
};
--
※ 来源:·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)
页面执行时间:206.878毫秒