diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2007-10-18 23:39:17 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-19 11:53:34 -0700 |
commit | b293d758470e971253eec42b817bc9ef1213b228 (patch) | |
tree | aafc6011762436cf3076798fee7140145908852c /include/linux | |
parent | fe9d4f576324999ac521c931f3b3eee0c8e45544 (diff) |
Console events and accessibility
Some external modules like Speakup need to monitor console output.
This adds a VT notifier that such modules can use to get console output events:
allocation, deallocation, writes, other updates (cursor position, switch, etc.)
[akpm@linux-foundation.org: fix headers_check]
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Cc: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/notifier.h | 6 | ||||
-rw-r--r-- | include/linux/vt.h | 12 |
2 files changed, 18 insertions, 0 deletions
diff --git a/include/linux/notifier.h b/include/linux/notifier.h index 6ec7e21a3699..0c40cc0b4a36 100644 --- a/include/linux/notifier.h +++ b/include/linux/notifier.h @@ -242,5 +242,11 @@ static inline int notifier_to_errno(int ret) extern struct blocking_notifier_head reboot_notifier_list; +/* Virtual Terminal events. */ +#define VT_ALLOCATE 0x0001 /* Console got allocated */ +#define VT_DEALLOCATE 0x0002 /* Console will be deallocated */ +#define VT_WRITE 0x0003 /* A char got output */ +#define VT_UPDATE 0x0004 /* A bigger update occurred */ + #endif /* __KERNEL__ */ #endif /* _LINUX_NOTIFIER_H */ diff --git a/include/linux/vt.h b/include/linux/vt.h index ba806e8711be..02c1c0288770 100644 --- a/include/linux/vt.h +++ b/include/linux/vt.h @@ -1,6 +1,18 @@ #ifndef _LINUX_VT_H #define _LINUX_VT_H +#ifdef __KERNEL__ +struct notifier_block; + +struct vt_notifier_param { + struct vc_data *vc; /* VC on which the update happened */ + unsigned int c; /* Printed char */ +}; + +extern int register_vt_notifier(struct notifier_block *nb); +extern int unregister_vt_notifier(struct notifier_block *nb); +#endif + /* * These constants are also useful for user-level apps (e.g., VC * resizing). |