public static class NativeAPIEmulation.windows.user32
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private static GenericWidget |
wndLocked
The currently locked window.
|
Constructor and Description |
---|
user32() |
Modifier and Type | Method and Description |
---|---|
static integer |
clientToScreen(integer hWnd,
int64 lpPoint)
The ClientToScreen function converts the client-area coordinates of a specified point
to screen coordinates.
|
static integer |
clientToScreen(integer hWnd,
memptr lpPoint)
The ClientToScreen function converts the client-area coordinates of a specified point
to screen coordinates.
|
static void |
disableProcessWindowsGhosting()
Should disable the ability to minimize, move, or close the main window of an
application that is not responding.
|
static integer |
getActiveWindow()
Retrieves the window handle to the active window attached to the calling thread's message queue.
|
static integer |
getAsyncKeyState(integer winVKey)
Returns keyboard state.
|
static integer |
getClientRect(integer hwnd,
int64 lprect)
Retrieves the coordinates of a window's client area.
|
static integer |
getCursor()
Retrieves a handle to the current cursor.
|
static integer |
getCursorPos(int64 lpPoint)
Retrieves the position of the mouse cursor, in screen coordinates.
|
static integer |
getCursorPos(memptr lpPoint)
Retrieves the position of the mouse cursor, in screen coordinates.
|
static integer |
getFocus()
Returns the id of the widget in focus.
|
static integer |
getForegroundWindow()
Retrieves the window handle to the foreground window attached to the calling thread's
message queue.
|
static void |
getKeyboardState(memptr state)
Implementation of GetKeyboardState call.
|
static integer |
getParent(integer hwnd)
Returns parent widget id of the supplied widget native handle.
|
static integer |
getScrollPos(integer hwnd,
integer nBar) |
static integer |
getSysColor(integer nIndex)
Retrieves the current color of the specified display element.
|
static integer |
getSystemMetrics(integer nIndex)
Retrieves the specified system metric or system configuration setting.
|
static integer |
getWindowRect(integer hwnd,
int64 lprect)
Retrieves the dimensions of the bounding rectangle of the specified window.
|
static integer |
isWindow(integer hwnd)
Checks if the window for the given handle is alrady realized.
|
static integer |
isWindowVisible(integer hwnd)
Checks if the window for the given handle is visible or not.
|
static integer |
loadCursorA(integer instance,
integer cursorName)
Loads the specified cursor resource.
|
static integer |
lockWindowUpdate(integer hwnd)
Requests window lock for the given window handle.
|
static integer |
moveWindow(integer hWnd,
integer x,
integer y,
integer w,
integer h,
integer bRepaint)
Moves the window to the specified position.
|
static integer |
screenToClient(integer hWnd,
int64 lpPoint)
The ScreenToClient function converts the screen coordinates of a specified point on the screen
to client-area coordinates.
|
static integer |
screenToClient(integer hWnd,
memptr lpPoint)
The ScreenToClient function converts the screen coordinates of a specified point on the screen
to client-area coordinates.
|
static void |
sendMessageA(integer hwnd,
integer uMsg,
integer wParam,
integer lParam) |
static integer |
setCursor(integer cursor)
Sets the cursor shape.
|
static void |
setFocus(integer hwnd)
Sets focus to the requested widget hwnd.
|
static integer |
setParent(integer hWndChild,
integer hWndNewParent)
Changes the parent window of the specified child window.
|
static integer |
showScrollBar(integer hWnd,
integer wBar,
integer bShow)
The ShowScrollBar function shows or hides the specified scroll bar.
|
private static GenericWidget wndLocked
public static void getKeyboardState(memptr state)
state
- the 256-byte byte arraypublic static integer getAsyncKeyState(integer winVKey)
winVKey
- Windows virtual key. Must be one of WindowsKey.VK_ALT, WindowsKey.VK_CONTROL
or WindowsKey.VK_SHIFT.public static integer getFocus()
public static void setFocus(integer hwnd)
hwnd
- Widget id.public static integer getParent(integer hwnd)
hwnd
- Widget id.public static integer setParent(integer hWndChild, integer hWndNewParent)
hWndChild
- A handle to the child window.hWndNewParent
- A handle to the new parent window.public static integer loadCursorA(integer instance, integer cursorName)
This method currently returns NULL.
instance
- A handle to an instance of the module whose executable file contains the cursor to be
loaded.cursorName
- The name of the cursor resource to be loaded. Alternatively, this parameter can
consist of the resource identifier in the low-order word and zero in the high-order word.public static integer getCursor()
This method currently returns NULL.
public static integer setCursor(integer cursor)
This method is currently a no-op and always returns NULL.
cursor
- A handle to the cursor. The cursor must have been created by the CreateCursor function
or loaded by the LoadCursor or LoadImage function. If this parameter is NULL, the
cursor is removed from the screen.public static integer getWindowRect(integer hwnd, int64 lprect)
hwnd
- A handle to the window.lprect
- A pointer to a RECT structure that receives the screen coordinates of the upper-left
and lower-right corners of the window.public static integer getClientRect(integer hwnd, int64 lprect)
hwnd
- A handle to the window.lprect
- A pointer to a RECT structure that receives the screen coordinates of the upper-left
and lower-right corners of the window.public static integer getCursorPos(memptr lpPoint)
lpPoint
- A pointer to a POINT structure that receives the screen coordinates of the cursor.public static integer getCursorPos(int64 lpPoint)
lpPoint
- A pointer to a POINT structure that receives the screen coordinates of the cursor.public static integer clientToScreen(integer hWnd, memptr lpPoint)
hWnd
- A handle to the window whose client area will be used for the conversion.lpPoint
- A pointer to a POINT structure that specifies the client coordinates to be
converted.public static integer clientToScreen(integer hWnd, int64 lpPoint)
hWnd
- A handle to the window whose client area will be used for the conversion.lpPoint
- A pointer to a POINT structure that specifies the client coordinates to be
converted.public static integer screenToClient(integer hWnd, memptr lpPoint)
hWnd
- A handle to the window whose client area will be used for the conversion.lpPoint
- A pointer to a POINT structure that specifies the screen coordinates to be converted.public static integer screenToClient(integer hWnd, int64 lpPoint)
hWnd
- A handle to the window whose client area will be used for the conversion.lpPoint
- A pointer to a POINT structure that specifies the screen coordinates to be converted.public static integer showScrollBar(integer hWnd, integer wBar, integer bShow)
hWnd
- Handle to a scroll bar control or a window with a standard scroll bar, depending on
the value of the wBar parameter.wBar
- Specifies the scroll bar(s) to be shown or hidden.bShow
- public static integer getActiveWindow()
public static integer getForegroundWindow()
public static integer getSystemMetrics(integer nIndex)
nIndex
- The system metric or configuration setting to be retrieved.public static void sendMessageA(integer hwnd, integer uMsg, integer wParam, integer lParam)
public static integer isWindow(integer hwnd)
hwnd
- A handle of the window to check.public static integer lockWindowUpdate(integer hwnd)
hwnd
- A handle to the window to lock.public static void disableProcessWindowsGhosting()
public static integer isWindowVisible(integer hwnd)
hwnd
- A handle of the window to check.1
. Otherwise it
is 0
.public static integer getSysColor(integer nIndex)
nIndex
- The display element whose color is to be retrieved.public static integer moveWindow(integer hWnd, integer x, integer y, integer w, integer h, integer bRepaint)
hWnd
- A handle of the window to move.x
- A new X position.y
- A new Y position.w
- A new window width.h
- A new window height.bRepaint
- Flag indicating if we need to repaint window after move.1
if success, 0
otherwise.