/** * 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()); }
fb_var_screeninfo info = new fb_var_screeninfo(); info.xres = width; info.yres = height; info.rotate = 0; info.colorspace = 0; info.write(); return info;
break; case NativeConstants.FBIOGET_VSCREENINFO: buf = varinfo.getPointer().getByteArray(0, varinfo.size()); arg.write(0, buf, 0, buf.length); break; case NativeConstants.FBIOPUT_VSCREENINFO: vInfo = new fb_var_screeninfo(arg); takeVarInfo(vInfo); break;
/** * 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; }
/** * Process variable info set request. * * @param info Structure from the application. * @throws LastErrorException EINVAL if the configured parameters do not meet the initial ones. */ private void takeVarInfo(fb_var_screeninfo info) throws LastErrorException { if (!info.dataEquals(varinfo)) { throw new LastErrorException(NativeConstants.EINVAL); } }