public class NativeTTY extends NativeDevice
Modifier and Type | Class and Description |
---|---|
static class |
NativeTTY.vt_mode
Info about VT configuration.
|
static class |
NativeTTY.vt_stat
Info about an active VT.
|
fd
Constructor and Description |
---|
NativeTTY(java.lang.String dname)
Initialize new TTY.
|
NativeTTY(java.lang.String dname,
ILibc libc)
Initialize new TTY.
|
NativeTTY(java.lang.String dname,
int flags)
Initialize new TTY.
|
NativeTTY(java.lang.String dname,
int flags,
ILibc libc)
Initialize new TTY.
|
Modifier and Type | Method and Description |
---|---|
int |
getKeyboardMode()
Get current keyboard mode.
|
NativeTTY.vt_mode |
getVTmode()
Get current TTY mode.
|
NativeTTY.vt_stat |
getVTstate()
Get current TTY state.
|
void |
setConsoleMode(int mode)
Set console mode.
|
void |
setKeyboardMode(int mode)
Set keyboard mode.
|
void |
setVTmode(NativeTTY.vt_mode mode)
Set current TTY mode.
|
void |
signalSwitch(int mode)
Signal VT switch to the kernel.
|
mmap
public NativeTTY(java.lang.String dname) throws LastErrorException
dname
- Path to TTY device.LastErrorException
- when the operation fails.public NativeTTY(java.lang.String dname, int flags) throws LastErrorException
dname
- Path to TTY device.flags
- Opening mode, e.g. read, write or both.LastErrorException
- when the operation fails.public NativeTTY(java.lang.String dname, ILibc libc) throws LastErrorException
dname
- Path to TTY device.libc
- standard C library interface to be used.LastErrorException
- when the operation fails.public NativeTTY(java.lang.String dname, int flags, ILibc libc) throws LastErrorException
dname
- Path to TTY device.flags
- Opening mode, e.g. read, write or both.libc
- standard C library interface to be used.LastErrorException
- when the operation fails.public NativeTTY.vt_mode getVTmode() throws LastErrorException
LastErrorException
- when the operation fails.public void setVTmode(NativeTTY.vt_mode mode) throws LastErrorException
mode
- TTY mode.LastErrorException
- when the operation fails.public NativeTTY.vt_stat getVTstate() throws LastErrorException
LastErrorException
- when the operation fails.public int getKeyboardMode() throws LastErrorException
LastErrorException
- when the operation fails.public void setKeyboardMode(int mode) throws LastErrorException
mode
- Keyboard mode (raw, transformed or off) - K_* constants.LastErrorException
- when the operation fails.public void setConsoleMode(int mode) throws LastErrorException
mode
- Console mode - graphics or text mode - KD_* constants.LastErrorException
- when the operation fails.public void signalSwitch(int mode) throws LastErrorException
mode
- VT switching signal - VT_* constants.LastErrorException
- when the operation fails.