Top Description Inners Fields Constructors Methods
org.fusesource.jansi.internal

public Class Kernel32

extends Object
Class Inheritance
Annotations
@SuppressWarnings:unused
Imports
java.io.IOException, .UnsupportedEncodingException

Interface to access Win32 base APIs.
See Also
JansiLoader

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
Kernel32.CHAR_INFO

see: https://msdn.microsoft.com/en-us/library/windows/desktop/ms682013(v=vs.85).aspx

public static class
Kernel32.CONSOLE_SCREEN_BUFFER_INFO

http://msdn.microsoft.com/en-us/library/ms682093%28VS.85%29.aspx

public static class
public static class
Kernel32.FOCUS_EVENT_RECORD

see: http://msdn.microsoft.com/en-us/library/ms683149(v=VS.85).aspx

public static class
Kernel32.INPUT_RECORD

see: http://msdn.microsoft.com/en-us/library/ms683499(v=VS.85).aspx

public static class
Kernel32.KEY_EVENT_RECORD

see: http://msdn.microsoft.com/en-us/library/ms684166(v=VS.85).aspx

public static class
Kernel32.MOUSE_EVENT_RECORD

see: http://msdn.microsoft.com/en-us/library/ms684239(v=VS.85).aspx

public static class
Kernel32.SMALL_RECT

http://msdn.microsoft.com/en-us/library/ms686311%28VS.85%29.aspx

public static class
Kernel32.WINDOW_BUFFER_SIZE_RECORD

see: http://msdn.microsoft.com/en-us/library/ms687093(v=VS.85).aspx

Field Summary

Modifier and TypeField and Description
public static short
public static short
public static short
public static short
public static short
public static short
public static short
public static short
public static short
public static short
public static short
public static short
public static short
public static short
public static short
public static int
public static int
public static int
public static int
public static int

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public static native int
_getch()

see: http://msdn.microsoft.com/en-us/library/078sfkak(VS.80).aspx

public static native int
CloseHandle(long handle)

see: http://msdn.microsoft.com/en-us/library/ms724211%28VS.85%29.aspx

public static native int
FillConsoleOutputAttribute(long consoleOutput, short attribute, int length, Kernel32.COORD writeCoord, int[] numberOfAttrsWritten)

see: https://msdn.microsoft.com/en-us/library/ms682662%28VS.85%29.aspx

public static native int
FillConsoleOutputCharacterW(long consoleOutput, char character, int length, Kernel32.COORD writeCoord, int[] numberOfCharsWritten)

see: http://msdn.microsoft.com/en-us/library/ms682663%28VS.85%29.aspx

public static native int
FlushConsoleInputBuffer(long handle)

see: http://msdn.microsoft.com/en-us/library/ms683147(v=VS.85).aspx

public static native int
FormatMessageW(int flags, long source, int messageId, int languageId, byte[] buffer, int size, long[] args)

public static native void
free(long ptr)

public static native int
GetConsoleMode(long handle, int[] mode)

see: http://msdn.microsoft.com/en-us/library/ms683167%28VS.85%29.aspx

public static native int

Returns:

the current output code page
GetConsoleOutputCP
()

see: http://msdn.microsoft.com/en-us/library/ms683169(v=VS.85).aspx

public static native int
GetConsoleScreenBufferInfo(long consoleOutput, Kernel32.CONSOLE_SCREEN_BUFFER_INFO consoleScreenBufferInfo)

See: http://msdn.microsoft.com/en-us/library/ms683171%28VS.85%29.aspx

public static String
getErrorMessage(int errorCode)

public static native int
GetLastError()

see: http://msdn.microsoft.com/en-us/library/ms679360(VS.85).aspx

public static String
public static native int
GetNumberOfConsoleInputEvents(long handle, int[] numberOfEvents)

see: http://msdn.microsoft.com/en-us/library/ms683207(v=VS.85).aspx

public static native long
GetStdHandle(int stdHandle)

see: http://msdn.microsoft.com/en-us/library/ms683231%28VS.85%29.aspx

private static native void
init()

public static native long
malloc(long size)

private static native int
PeekConsoleInputW(long handle, long inputRecord, int length, int[] eventsCount)

see: http://msdn.microsoft.com/en-us/library/ms684344(v=VS.85).aspx

public static Kernel32.INPUT_RECORD[]
readConsoleInputHelper(long handle, int count, boolean peek)

Return console input events.

private static native int
ReadConsoleInputW(long handle, long inputRecord, int length, int[] eventsCount)

see: http://msdn.microsoft.com/en-us/library/ms684961(v=VS.85).aspx

public static Kernel32.INPUT_RECORD[]

Returns:

array possibly of size smaller then count
readConsoleKeyInput
(long handle, int
requested number of events
count
,
boolean peek)

Return console input key events (discard other events).

public static native int
ScrollConsoleScreenBuffer(long consoleOutput, Kernel32.SMALL_RECT scrollRectangle, Kernel32.SMALL_RECT clipRectangle, Kernel32.COORD destinationOrigin, Kernel32.CHAR_INFO fill)

see: https://msdn.microsoft.com/en-us/library/windows/desktop/ms685107(v=vs.85).aspx

public static native int
SetConsoleCursorPosition(long consoleOutput, Kernel32.COORD cursorPosition)

http://msdn.microsoft.com/en-us/library/ms686025%28VS.85%29.aspx

public static native int
SetConsoleMode(long handle, int mode)

see: http://msdn.microsoft.com/en-us/library/ms686033%28VS.85%29.aspx

public static native int

Returns:

non 0 if code page was set
SetConsoleOutputCP
(int codePageID)

see: http://msdn.microsoft.com/en-us/library/ms686036(v=VS.85).aspx

public static native int
SetConsoleTextAttribute(long consoleOutput, short attributes)

see http://msdn.microsoft.com/en-us/library/ms686047%28VS.85%29.aspx

public static native int

Returns:

0 if title was set successfully
SetConsoleTitle
(String title)

see: http://msdn.microsoft.com/en-us/library/ms686050%28VS.85%29.aspx

public static native int
WaitForSingleObject(long hHandle, int dwMilliseconds)

public static native int
WriteConsoleW(long consoleOutput, char[] buffer, int numberOfCharsToWrite, int[] numberOfCharsWritten, long reserved)

see: http://msdn.microsoft.com/en-us/library/ms687401(v=VS.85).aspx

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait