Class MSWinLib
java.lang.Object
net.thevpc.common.deskauto.impl.win.MSWinLib
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfacestatic interfacestatic interfacestatic classtypedef struct tagTITLEBARINFO { DWORD cbSize; RECT rcTitleBar; DWORD rgstate[CCHILDREN_TITLEBAR+1]; } TITLEBARINFO, *PTITLEBARINFO, *LPTITLEBARINFO;static interfacestatic class -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final MSWinLib.GDI32Extstatic final intstatic final MSWinLib.User32Extstatic final com.sun.jna.platform.win32.Version -
Method Summary
Modifier and TypeMethodDescriptionstatic StringgetClassName(com.sun.jna.platform.win32.WinDef.HWND hWnd) static StringgetClassName(String handle) static StringgetClassName(String title, String control) static StringgetClassName(String title, String text, String control) static intgetControlId(com.sun.jna.platform.win32.WinDef.HWND controlHwnd) Retrieves the identifier of the specified control.static StringgetControlText(com.sun.jna.platform.win32.WinDef.HWND hCtrl) static StringgetFileVersion(File file) Retrieves version information for the specified file.static StringgetFileVersion(String filename) Retrieves version information for the specified file.static StringgetWindowText(com.sun.jna.platform.win32.WinDef.HWND hWnd) static booleanCheck whether the capslock is on or not.static booleanisClassName(com.sun.jna.platform.win32.WinDef.HWND hWnd, String className) static booleanisComboBox(com.sun.jna.platform.win32.WinDef.HWND hWnd) static booleanisComboBox(String title, String control) static booleanisComboBox(String title, String text, String control) static booleanisHWnd(com.sun.jna.platform.win32.WinDef.HWND hWnd) Checks if the handle is a valid window handle.static booleanisListBox(com.sun.jna.platform.win32.WinDef.HWND hWnd) static booleanstatic booleanstatic voidsetCapslockState(boolean on) Set the status of the capslock.
-
Field Details
-
gdi32
-
user32
-
version
public static final com.sun.jna.platform.win32.Version version -
INVALID_CONTROL_ID
public static final int INVALID_CONTROL_ID- See Also:
-
-
Method Details
-
getClassName
-
getClassName
-
getClassName
-
getClassName
-
getControlId
public static int getControlId(com.sun.jna.platform.win32.WinDef.HWND controlHwnd) Retrieves the identifier of the specified control.- Parameters:
controlHwnd- A handle to the control.- Returns:
- If the function succeeds, the return value is the identifier of the control. If the function fails, the return value is -1. An invalid value for the hwndCtl parameter, for example, will cause the function to fail.
-
getControlText
-
getFileVersion
-
getFileVersion
-
getWindowText
-
isCapslockOn
public static boolean isCapslockOn()Check whether the capslock is on or not.- Returns:
- Return true if the capslock is on, otherwise return false.
-
isComboBox
-
isComboBox
-
isComboBox
public static boolean isComboBox(com.sun.jna.platform.win32.WinDef.HWND hWnd) -
isClassName
-
isHWnd
public static boolean isHWnd(com.sun.jna.platform.win32.WinDef.HWND hWnd) Checks if the handle is a valid window handle.- Parameters:
hWnd- Handle to the window.- Returns:
- Returns true if the handle is a valid window handle, otherwise returns false.
-
isListBox
-
isListBox
-
isListBox
public static boolean isListBox(com.sun.jna.platform.win32.WinDef.HWND hWnd) -
setCapslockState
public static void setCapslockState(boolean on) Set the status of the capslock.- Parameters:
on- Turn on capslock if true, otherwise turn off capslock.
-