public class WindowProc
extends com.jniwrapper.Callback
Modifier and Type | Field and Description |
---|---|
protected IntPtr |
_lParam |
protected IntPtr |
_lResult |
protected com.jniwrapper.UInt |
_msg |
protected Wnd |
_wnd |
protected IntPtr |
_wParam |
Constructor and Description |
---|
WindowProc() |
WindowProc(Wnd wnd) |
Modifier and Type | Method and Description |
---|---|
void |
addMessageListener(WindowMessageListener listener)
Adds a specified window message listener.
|
void |
callback() |
Wnd |
getWnd() |
boolean |
isSubstituted()
Checks if native window procedure is substituted.
|
void |
removeMessageListener(WindowMessageListener listener)
Removes a specified listener.
|
void |
restoreNative()
Restores the window native procedure and disables custom message handling.
|
void |
setWnd(Wnd wnd) |
void |
substitute()
Substitutes a custom window procedure to enable window message handling.
|
callback, clone, createReturnValueByFields, dispose, getCallingConvention, getDebugInfo, getLength, getParameters, getReturnValue, init, isNull, isUseFieldsForCallbackParameters, read, restoreState, saveState, setCallingConvention, setUseFieldsForCallbackParameters, toPointer, write
protected Wnd _wnd
protected com.jniwrapper.UInt _msg
protected IntPtr _wParam
protected IntPtr _lParam
protected IntPtr _lResult
public WindowProc(Wnd wnd)
wnd
- is a handle of the window whose window procedure can be
substituted.public WindowProc()
public void callback()
callback
in class com.jniwrapper.Callback
public void addMessageListener(WindowMessageListener listener)
listener
- public void removeMessageListener(WindowMessageListener listener)
listener
- public void substitute()
Remember to call restoreNative()
method to avoid problems during closing a window.
java.lang.RuntimeException
- if fails to substitute window procedure, for example, when trying to
substitute procedure of a window, which was created by another process.public void restoreNative()
substitute()
method.public boolean isSubstituted()
public Wnd getWnd()
public void setWnd(Wnd wnd)