/** * Signal VT switch to the kernel. * * @param mode VT switching signal - VT_* constants. * @throws LastErrorException when the operation fails. */ public void signalSwitch(int mode) throws LastErrorException { super.ioctl(VT_RELDISP, mode); }
/** * Set console mode. * * @param mode Console mode - graphics or text mode - KD_* constants. * @throws LastErrorException when the operation fails. */ public void setConsoleMode(int mode) throws LastErrorException { super.ioctl(KDSETMODE, mode); }
/** * Set keyboard mode. * * @param mode Keyboard mode (raw, transformed or off) - K_* constants. * @throws LastErrorException when the operation fails. */ public void setKeyboardMode(int mode) throws LastErrorException { super.ioctl(KDSKBMODE, mode); }
/** * Set current TTY mode. TTY mode is mostly about VT switching. * * @param mode TTY mode. * @throws LastErrorException when the operation fails. */ public void setVTmode(@NonNull vt_mode mode) throws LastErrorException { mode.write(); super.ioctl(VT_SETMODE, mode.getPointer()); }
/** * Send variable screen info. * * @param info Changeable info about the display. * @throws LastErrorException when operations fails */ public void setVariableScreenInfo(@NonNull fb_var_screeninfo info) throws LastErrorException { info.write(); super.ioctl(FBIOPUT_VSCREENINFO, info.getPointer()); }
/** * Get current keyboard mode. * * @return Keyboard mode (raw, transformed or off) - K_* constants. * @throws LastErrorException when the operation fails. */ public int getKeyboardMode() throws LastErrorException { IntByReference kbd = new IntByReference(0); super.ioctl(KDGKBMODE, kbd); return kbd.getValue(); }
/** * Get current TTY state. * * @return TTY state. * @throws LastErrorException when the operation fails. */ public vt_stat getVTstate() throws LastErrorException { vt_stat stat = new vt_stat(); super.ioctl(VT_GETSTATE, stat.getPointer()); stat.read(); return stat; }
/** * Get current TTY mode. TTY mode is mostly about VT switching. * * @return TTY mode. * @throws LastErrorException when the operation fails. */ public vt_mode getVTmode() throws LastErrorException { vt_mode mode = new vt_mode(); super.ioctl(VT_GETMODE, mode.getPointer()); mode.read(); return mode; }
/** * Fetch fixed screen info. * * @return Non-changing info about the display. */ public fb_fix_screeninfo getFixedScreenInfo() throws LastErrorException { fb_fix_screeninfo info = new fb_fix_screeninfo(); super.ioctl(FBIOGET_FSCREENINFO, info.getPointer()); info.read(); return info; }
/** * Fetch variable screen info. * * @return Changeable info about the display. * @throws LastErrorException when operations fails */ public fb_var_screeninfo getVariableScreenInfo() throws LastErrorException { fb_var_screeninfo info = new fb_var_screeninfo(); super.ioctl(FBIOGET_VSCREENINFO, info.getPointer()); info.read(); return info; }
/** * Identify which framebuffer is connected to a specified VT. * * @param console VT number. * @return Framebuffer number or -1 if console has no framebuffer. * @throws LastErrorException when operations fails */ public int mapConsoleToFramebuffer(int console) throws LastErrorException { fb_con2fbmap map = new fb_con2fbmap(); map.console = console; map.write(); super.ioctl(FBIOGET_CON2FBMAP, map.getPointer()); map.read(); return map.framebuffer; }