public class Kernel32 extends Object
Modifier and Type | Class and Description |
---|---|
static class |
Kernel32.CONSOLE_SCREEN_BUFFER_INFO
http://msdn.microsoft.com/en-us/library/ms682093%28VS.85%29.aspx
|
static class |
Kernel32.COORD |
static class |
Kernel32.INPUT_RECORD
see: http://msdn.microsoft.com/en-us/library/ms683499(v=VS.85).aspx
|
static class |
Kernel32.KEY_EVENT_RECORD
see: http://msdn.microsoft.com/en-us/library/ms684166(v=VS.85).aspx
|
static class |
Kernel32.SMALL_RECT
http://msdn.microsoft.com/en-us/library/ms686311%28VS.85%29.aspx
|
Modifier and Type | Field and Description |
---|---|
static short |
BACKGROUND_BLUE |
static short |
BACKGROUND_GREEN |
static short |
BACKGROUND_INTENSITY |
static short |
BACKGROUND_RED |
static short |
COMMON_LVB_GRID_HORIZONTAL |
static short |
COMMON_LVB_GRID_LVERTICAL |
static short |
COMMON_LVB_GRID_RVERTICAL |
static short |
COMMON_LVB_LEADING_BYTE |
static short |
COMMON_LVB_REVERSE_VIDEO |
static short |
COMMON_LVB_TRAILING_BYTE |
static short |
COMMON_LVB_UNDERSCORE |
static short |
FOREGROUND_BLUE |
static short |
FOREGROUND_GREEN |
static short |
FOREGROUND_INTENSITY |
static short |
FOREGROUND_RED |
static int |
FORMAT_MESSAGE_FROM_SYSTEM |
static int |
INVALID_HANDLE_VALUE |
static int |
STD_ERROR_HANDLE |
static int |
STD_INPUT_HANDLE |
static int |
STD_OUTPUT_HANDLE |
Constructor and Description |
---|
Kernel32() |
Modifier and Type | Method and Description |
---|---|
static int |
_getch()
see: http://msdn.microsoft.com/en-us/library/078sfkak(VS.80).aspx
|
static int |
CloseHandle(long handle)
see: http://msdn.microsoft.com/en-us/library/ms724211%28VS.85%29.aspx
|
static 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
|
static int |
FlushConsoleInputBuffer(long handle)
see: http://msdn.microsoft.com/en-us/library/ms683147(v=VS.85).aspx
|
static int |
FormatMessageW(int flags,
long source,
int messageId,
int languageId,
byte[] buffer,
int size,
long[] args) |
static void |
free(long ptr) |
static int |
GetConsoleMode(long handle,
int[] mode)
see: http://msdn.microsoft.com/en-us/library/ms683167%28VS.85%29.aspx
|
static int |
GetConsoleOutputCP()
see: http://msdn.microsoft.com/en-us/library/ms683169(v=VS.85).aspx
|
static int |
GetConsoleScreenBufferInfo(long consoleOutput,
Kernel32.CONSOLE_SCREEN_BUFFER_INFO consoleScreenBufferInfo)
See: http://msdn.microsoft.com/en-us/library/ms683171%28VS.85%29.aspx
|
static int |
GetLastError()
see: http://msdn.microsoft.com/en-us/library/ms679360(VS.85).aspx
|
static int |
GetNumberOfConsoleInputEvents(long handle,
int[] numberOfEvents)
see: http://msdn.microsoft.com/en-us/library/ms683207(v=VS.85).aspx
|
static long |
GetStdHandle(int stdHandle)
see: http://msdn.microsoft.com/en-us/library/ms683231%28VS.85%29.aspx
|
static long |
malloc(long size) |
static Kernel32.INPUT_RECORD[] |
readConsoleInputHelper(long handle,
int count,
boolean peek)
Return console input events.
|
static Kernel32.INPUT_RECORD[] |
readConsoleKeyInput(long handle,
int count,
boolean peek)
Return console input key events (discard other events).
|
static int |
SetConsoleCursorPosition(long consoleOutput,
Kernel32.COORD cursorPosition)
http://msdn.microsoft.com/en-us/library/ms686025%28VS.85%29.aspx
|
static int |
SetConsoleMode(long handle,
int mode)
see: http://msdn.microsoft.com/en-us/library/ms686033%28VS.85%29.aspx
|
static int |
SetConsoleOutputCP(int codePageID)
see: http://msdn.microsoft.com/en-us/library/ms686036(v=VS.85).aspx
|
static int |
SetConsoleTextAttribute(long consoleOutput,
short attributes)
see http://msdn.microsoft.com/en-us/library/ms686047%28VS.85%29.aspx
|
static int |
SetConsoleTitle(String title)
see: http://msdn.microsoft.com/en-us/library/ms686050%28VS.85%29.aspx
|
static 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
|
public static short FOREGROUND_BLUE
public static short FOREGROUND_GREEN
public static short FOREGROUND_RED
public static short FOREGROUND_INTENSITY
public static short BACKGROUND_BLUE
public static short BACKGROUND_GREEN
public static short BACKGROUND_RED
public static short BACKGROUND_INTENSITY
public static short COMMON_LVB_LEADING_BYTE
public static short COMMON_LVB_TRAILING_BYTE
public static short COMMON_LVB_GRID_HORIZONTAL
public static short COMMON_LVB_GRID_LVERTICAL
public static short COMMON_LVB_GRID_RVERTICAL
public static short COMMON_LVB_REVERSE_VIDEO
public static short COMMON_LVB_UNDERSCORE
public static int FORMAT_MESSAGE_FROM_SYSTEM
public static int STD_INPUT_HANDLE
public static int STD_OUTPUT_HANDLE
public static int STD_ERROR_HANDLE
public static int INVALID_HANDLE_VALUE
public static final long malloc(long size)
public static final void free(long ptr)
public static final int SetConsoleTextAttribute(long consoleOutput, short attributes)
consoleOutput
- attributes
- public static final int CloseHandle(long handle)
handle
- public static final int GetLastError()
handle
- public static final int FormatMessageW(int flags, long source, int messageId, int languageId, byte[] buffer, int size, long[] args)
flags
- source
- messageId
- languageId
- buffer
- size
- arguments
- public static final int GetConsoleScreenBufferInfo(long consoleOutput, Kernel32.CONSOLE_SCREEN_BUFFER_INFO consoleScreenBufferInfo)
consoleOutput
- consoleScreenBufferInfo
- public static final long GetStdHandle(int stdHandle)
stdHandle
- public static final int SetConsoleCursorPosition(long consoleOutput, Kernel32.COORD cursorPosition)
consoleOutput
- cursorPosition
- public static final int FillConsoleOutputCharacterW(long consoleOutput, char character, int length, Kernel32.COORD writeCoord, int[] numberOfCharsWritten)
consoleOutput
- character
- length
- dwWriteCoord
- numberOfCharsWritten
- public static final int WriteConsoleW(long consoleOutput, char[] buffer, int numberOfCharsToWrite, int[] numberOfCharsWritten, long reserved)
consoleOutput
- buffer
- numberOfCharsToWrite
- numberOfCharsWritten
- reserved
- must be nullpublic static final int GetConsoleMode(long handle, int[] mode)
handle
- mode
- public static final int SetConsoleMode(long handle, int mode)
handle
- mode
- public static final int _getch()
public static final int SetConsoleTitle(String title)
title
- public static final int GetConsoleOutputCP()
public static final int SetConsoleOutputCP(int codePageID)
codePageID
- public static final int GetNumberOfConsoleInputEvents(long handle, int[] numberOfEvents)
handle
- numberOfEvents
- number of unread input records in the console's input bufferpublic static final int FlushConsoleInputBuffer(long handle)
handle
- public static Kernel32.INPUT_RECORD[] readConsoleInputHelper(long handle, int count, boolean peek) throws IOException
handle
- count
- requested number of eventsIOException
public static Kernel32.INPUT_RECORD[] readConsoleKeyInput(long handle, int count, boolean peek) throws IOException
count
- requested number of eventsIOException
Copyright © 2009-2015 FuseSource, Corp.. All Rights Reserved.