Package com.openfin.desktop.win32
Class WinMessageHelper
- java.lang.Object
-
- com.openfin.desktop.win32.WinMessageHelper
-
public class WinMessageHelper extends java.lang.ObjectHelper class for hooking into Windows messages Created by wche on 3/11/15.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceWinMessageHelper.CustomUser32Support different signature of User32
-
Field Summary
Fields Modifier and Type Field Description static WinMessageHelper.CustomUser32customUser32static intSC_CLOSEstatic intSC_MAXIMIZEstatic intSC_MINIMIZEstatic intSC_RESTOREstatic intSWP_HIDEWINDOWstatic intSWP_NOMOVEstatic intSWP_NOSIZEstatic intSWP_SHOWWINDOWstatic intWM_CAPTURECHANGEDstatic intWM_DESTROYstatic intWM_ENTERSIZEMOVEstatic intWM_ERASEBKGNDstatic intWM_EXITSIZEMOVEstatic intWM_KEYDOWNstatic intWM_KEYUPstatic intWM_KILLFOCUSstatic intWM_LBUTTONDOWNstatic intWM_LBUTTONUPstatic intWM_MOUSEMOVEstatic intWM_MOVEstatic intWM_MOVINGstatic intWM_NCLBUTTONDBLCLKstatic intWM_NCLBUTTONUPstatic intWM_NOTIFYstatic intWM_PAINTstatic intWM_SETFOCUSstatic intWM_SIZEstatic intWM_SIZINGstatic intWM_SYSCOMMANDstatic intWM_WINDOWPOSCHANGEDstatic intWM_WINDOWPOSCHANGING
-
Constructor Summary
Constructors Constructor Description WinMessageHelper()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidhookWndProc(com.sun.jna.platform.win32.WinDef.HWND hwnd, WindowProcCallback callback)Makes a connection between messages on a specified window handle and the callback to be called when messages are received.static voidmain(java.lang.String[] argv)static voidunhookWndProc(com.sun.jna.platform.win32.WinDef.HWND hwnd)Removes the WindowProc and restores previous one
-
-
-
Field Detail
-
WM_CAPTURECHANGED
public static final int WM_CAPTURECHANGED
- See Also:
- Constant Field Values
-
WM_DESTROY
public static final int WM_DESTROY
- See Also:
- Constant Field Values
-
WM_ENTERSIZEMOVE
public static final int WM_ENTERSIZEMOVE
- See Also:
- Constant Field Values
-
WM_ERASEBKGND
public static final int WM_ERASEBKGND
- See Also:
- Constant Field Values
-
WM_EXITSIZEMOVE
public static final int WM_EXITSIZEMOVE
- See Also:
- Constant Field Values
-
WM_KEYDOWN
public static final int WM_KEYDOWN
- See Also:
- Constant Field Values
-
WM_KEYUP
public static final int WM_KEYUP
- See Also:
- Constant Field Values
-
WM_KILLFOCUS
public static final int WM_KILLFOCUS
- See Also:
- Constant Field Values
-
WM_LBUTTONDOWN
public static final int WM_LBUTTONDOWN
- See Also:
- Constant Field Values
-
WM_LBUTTONUP
public static final int WM_LBUTTONUP
- See Also:
- Constant Field Values
-
WM_MOUSEMOVE
public static final int WM_MOUSEMOVE
- See Also:
- Constant Field Values
-
WM_MOVE
public static final int WM_MOVE
- See Also:
- Constant Field Values
-
WM_MOVING
public static final int WM_MOVING
- See Also:
- Constant Field Values
-
WM_NCLBUTTONDBLCLK
public static final int WM_NCLBUTTONDBLCLK
- See Also:
- Constant Field Values
-
WM_NCLBUTTONUP
public static final int WM_NCLBUTTONUP
- See Also:
- Constant Field Values
-
WM_NOTIFY
public static final int WM_NOTIFY
- See Also:
- Constant Field Values
-
WM_SETFOCUS
public static final int WM_SETFOCUS
- See Also:
- Constant Field Values
-
WM_SIZE
public static final int WM_SIZE
- See Also:
- Constant Field Values
-
WM_SIZING
public static final int WM_SIZING
- See Also:
- Constant Field Values
-
WM_SYSCOMMAND
public static final int WM_SYSCOMMAND
- See Also:
- Constant Field Values
-
WM_WINDOWPOSCHANGED
public static final int WM_WINDOWPOSCHANGED
- See Also:
- Constant Field Values
-
WM_WINDOWPOSCHANGING
public static final int WM_WINDOWPOSCHANGING
- See Also:
- Constant Field Values
-
WM_PAINT
public static final int WM_PAINT
- See Also:
- Constant Field Values
-
SC_CLOSE
public static final int SC_CLOSE
- See Also:
- Constant Field Values
-
SC_MAXIMIZE
public static final int SC_MAXIMIZE
- See Also:
- Constant Field Values
-
SC_MINIMIZE
public static final int SC_MINIMIZE
- See Also:
- Constant Field Values
-
SC_RESTORE
public static final int SC_RESTORE
- See Also:
- Constant Field Values
-
SWP_HIDEWINDOW
public static final int SWP_HIDEWINDOW
- See Also:
- Constant Field Values
-
SWP_NOMOVE
public static final int SWP_NOMOVE
- See Also:
- Constant Field Values
-
SWP_NOSIZE
public static final int SWP_NOSIZE
- See Also:
- Constant Field Values
-
SWP_SHOWWINDOW
public static final int SWP_SHOWWINDOW
- See Also:
- Constant Field Values
-
customUser32
public static WinMessageHelper.CustomUser32 customUser32
-
-
Method Detail
-
hookWndProc
public static void hookWndProc(com.sun.jna.platform.win32.WinDef.HWND hwnd, WindowProcCallback callback)Makes a connection between messages on a specified window handle and the callback to be called when messages are received.- Parameters:
hwnd- HWND of the windowcallback- callback for each message
-
unhookWndProc
public static void unhookWndProc(com.sun.jna.platform.win32.WinDef.HWND hwnd)
Removes the WindowProc and restores previous one- Parameters:
hwnd- HWND of the window
-
main
public static void main(java.lang.String[] argv)
-
-