|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.jniwrapper.Parameter com.jniwrapper.Callback com.jniwrapper.win32.ui.WindowProc
public class WindowProc
This class represents default WINDOWPROC callback. Also, it provides ability to substitute window proc. of a specified window to enable custom message handling and processing.
Field Summary | |
---|---|
protected IntPtr |
_lParam
|
protected IntPtr |
_lResult
|
protected com.jniwrapper.UInt |
_msg
|
protected Wnd |
_wnd
|
protected IntPtr |
_wParam
|
Fields inherited from class com.jniwrapper.Callback |
---|
m |
Fields inherited from class com.jniwrapper.Parameter |
---|
LICENSE_TYPE, V |
Constructor Summary | |
---|---|
WindowProc()
|
|
WindowProc(Wnd wnd)
|
Method Summary | |
---|---|
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. |
Methods inherited from class com.jniwrapper.Callback |
---|
|
Methods inherited from class com.jniwrapper.Parameter |
---|
a, a, acceptIOPerformer, asReturnValue, b, dataBufferAssigned, equals, getAlignedLength, getAlignmentRequirement, getDataBuffer, getDataBufferOffset, hashCode, indent, pop, push, read, read, setDataBuffer, toByteArray, write |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected Wnd _wnd
protected com.jniwrapper.UInt _msg
protected IntPtr _wParam
protected IntPtr _lParam
protected IntPtr _lResult
Constructor Detail |
---|
public WindowProc(Wnd wnd)
wnd
- is a handle of the window whose window procedure can be
substituted.public WindowProc()
Method Detail |
---|
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)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |