本文整理了Java中org.fusesource.jansi.internal.WindowsSupport
类的一些代码示例,展示了WindowsSupport
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WindowsSupport
类的具体详情如下:
包路径:org.fusesource.jansi.internal.WindowsSupport
类名称:WindowsSupport
暂无
代码示例来源:origin: jline/jline
private static int getWindowsTerminalHeight() {
return WindowsSupport.getWindowsTerminalHeight();
}
代码示例来源:origin: jline/jline
private static int getWindowsTerminalWidth() {
return WindowsSupport.getWindowsTerminalWidth();
}
代码示例来源:origin: jline/jline
private static int getConsoleMode() {
return WindowsSupport.getConsoleMode();
}
代码示例来源:origin: org.aesh/aesh-readline
public Size getSize() {
Size size = new Size(WindowsSupport.getWindowsTerminalWidth(),
WindowsSupport.getWindowsTerminalHeight());
return size;
}
代码示例来源:origin: org.jline/jline
@Override
protected void writeConsole(char[] text, int len) throws IOException {
if (WriteConsoleW(console, text, len, writtenChars, 0) == 0) {
throw new IOException("Failed to write to console: " + WindowsSupport.getLastErrorMessage());
}
}
代码示例来源:origin: jline/jline
private static void setConsoleMode(int mode) {
WindowsSupport.setConsoleMode(mode);
}
代码示例来源:origin: jline/jline
events = WindowsSupport.readConsoleInput(1);
} catch (IOException e) {
Log.debug("read Windows console input error: ", e);
代码示例来源:origin: org.jboss.forge/forge-shell
private int readByte()
{
return WindowsSupport.readByte();
}
代码示例来源:origin: org.jline/jline
private void applyCursorPosition() throws IOException {
info.cursorPosition.x = (short) Math.max(0, Math.min(info.size.x - 1, info.cursorPosition.x));
info.cursorPosition.y = (short) Math.max(0, Math.min(info.size.y - 1, info.cursorPosition.y));
if (SetConsoleCursorPosition(console, info.cursorPosition.copy()) == 0) {
throw new IOException(WindowsSupport.getLastErrorMessage());
}
}
代码示例来源:origin: org.aesh/aesh-readline
@Override
protected void setConsoleMode(int mode) {
WindowsSupport.setConsoleMode(mode);
}
代码示例来源:origin: com.typesafe.sbt/incremental-compiler
events = WindowsSupport.readConsoleInput(1);
} catch (IOException e) {
Log.debug("read Windows console input error: ", e);
代码示例来源:origin: org.scala-lang/jline
private int readByte() {
return WindowsSupport.readByte();
}
代码示例来源:origin: org.jline/jline
private void getConsoleInfo() throws IOException {
out.flush();
if (GetConsoleScreenBufferInfo(console, info) == 0) {
throw new IOException("Could not get the screen info: " + WindowsSupport.getLastErrorMessage());
}
if (negative) {
info.attributes = invertAttributeColors(info.attributes);
}
}
代码示例来源:origin: org.jboss.jreadline/jreadline
@Override
public int getHeight() {
return WindowsSupport.getWindowsTerminalHeight();
}
代码示例来源:origin: org.refcodes/refcodes-runtime
private static int getNativeWindowsWidth() {
if ( _canNativeWindows ) {
try {
return WindowsSupport.getWindowsTerminalWidth();
}
catch ( Error ignore ) {
_canNativeWindows = false;
}
}
return -1;
}
代码示例来源:origin: org.jline/jline
@Override
protected void setConsoleMode(int mode) {
WindowsSupport.setConsoleMode(mode);
}
代码示例来源:origin: org.jline/jline
@Override
protected int getConsoleMode() {
return WindowsSupport.getConsoleMode();
}
代码示例来源:origin: org.aesh/aesh-readline
events = WindowsSupport.readConsoleInput(1);
} catch (IOException e) {
LOGGER.log(Level.INFO, "read Windows terminal input error: ", e);
代码示例来源:origin: org.jboss.forge/forge-shell
@Override
public void run()
{
while (connected)
{
try
{
int read = WindowsSupport.readByte();
blockingQueue.put(read);
Thread.yield();
}
catch (InterruptedException e)
{
// Stop reading
break;
}
}
}
}
代码示例来源:origin: org.fusesource.jansi/jansi
private void applyAttribute() throws IOException {
out.flush(); // expected diff with WindowsAnsiPrintStream.java
short attributes = info.attributes;
if (negative) {
attributes = invertAttributeColors(attributes);
}
if (SetConsoleTextAttribute(console, attributes) == 0) {
throw new IOException(WindowsSupport.getLastErrorMessage());
}
}
内容来源于网络,如有侵权,请联系作者删除!