1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
| public interface JNAUser32 extends StdCallLibrary
{
public static final int WINDOW_TOPMOST = -1;
public static final int WINDOW_NONTOPMOST = -2;
Map<String, Object> UNICODE_OPTIONS = new HashMap<String, Object>()
{
private static final long serialVersionUID = 1L;
{
put(OPTION_TYPE_MAPPER,
W32APITypeMapper.UNICODE);
put(OPTION_FUNCTION_MAPPER,
W32APIFunctionMapper.UNICODE);
}
};
Map<String, Object> ASCII_OPTIONS = new HashMap<String, Object>()
{
private static final long serialVersionUID = 1L;
{
put(OPTION_TYPE_MAPPER,
W32APITypeMapper.ASCII);
put(OPTION_FUNCTION_MAPPER,
W32APIFunctionMapper.ASCII);
}
};
Map<String, Object> DEFAULT_OPTIONS = Boolean.getBoolean("w32.ascii") ? ASCII_OPTIONS
: UNICODE_OPTIONS;
JNAUser32 INSTANCE = (JNAUser32) Native.loadLibrary(
"user32", JNAUser32.class,
DEFAULT_OPTIONS);
Pointer FindWindow(String lpClassName, String lpWindowName);
boolean SetWindowPos(Pointer hWnd, int hWndAfter, int x, int y, int cx,
int cy, int flags);
} |
Partager