本文整理了Java中org.eclipse.swt.widgets.Widget.hooks()
方法的一些代码示例,展示了Widget.hooks()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Widget.hooks()
方法的具体详情如下:
包路径:org.eclipse.swt.widgets.Widget
类名称:Widget
方法名:hooks
暂无
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.swt.win32.win32.x86
/**
* Returns <code>true</code> if there are any listeners
* for the specified event type associated with the receiver,
* and <code>false</code> otherwise. The event type is one of
* the event constants defined in class <code>SWT</code>.
*
* @param eventType the type of event
* @return true if the event is hooked
*
* @exception SWTException <ul>
* <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
* <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
* </ul>
*
* @see SWT
*/
public boolean isListening (int eventType) {
checkWidget();
return hooks (eventType);
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.aix.ppc
/**
* Returns <code>true</code> if there are any listeners
* for the specified event type associated with the receiver,
* and <code>false</code> otherwise. The event type is one of
* the event constants defined in class <code>SWT</code>.
*
* @param eventType the type of event
* @return true if the event is hooked
*
* @exception SWTException <ul>
* <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
* <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
* </ul>
*
* @see SWT
*/
public boolean isListening (int eventType) {
checkWidget ();
return hooks (eventType);
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.ppc
/**
* Returns <code>true</code> if there are any listeners
* for the specified event type associated with the receiver,
* and <code>false</code> otherwise. The event type is one of
* the event constants defined in class <code>SWT</code>.
*
* @param eventType the type of event
* @return true if the event is hooked
*
* @exception SWTException <ul>
* <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
* <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
* </ul>
*
* @see SWT
*/
public boolean isListening (int eventType) {
checkWidget ();
return hooks (eventType);
}
代码示例来源:origin: org.eclipse.swt.cocoa.macosx/x86_64
/**
* Returns <code>true</code> if there are any listeners
* for the specified event type associated with the receiver,
* and <code>false</code> otherwise. The event type is one of
* the event constants defined in class <code>SWT</code>.
*
* @param eventType the type of event
* @return true if the event is hooked
*
* @exception SWTException <ul>
* <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
* <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
* </ul>
*
* @see SWT
*/
public boolean isListening (int eventType) {
checkWidget();
return hooks (eventType);
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.s390x
/**
* Returns <code>true</code> if there are any listeners
* for the specified event type associated with the receiver,
* and <code>false</code> otherwise. The event type is one of
* the event constants defined in class <code>SWT</code>.
*
* @param eventType the type of event
* @return true if the event is hooked
*
* @exception SWTException <ul>
* <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
* <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
* </ul>
*
* @see SWT
*/
public boolean isListening (int eventType) {
checkWidget ();
return hooks (eventType);
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.swt.win32.win32.x86
LRESULT wmSysChar (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam) {
Display display = this.display;
display.lastAscii = (int)/*64*/wParam;
display.lastNull = wParam == 0;
/* Do not issue a key down if a menu bar mnemonic was invoked */
if (!hooks (SWT.KeyDown) && !display.filters (SWT.KeyDown)) {
return null;
}
/* Call the window proc to determine whether it is a system key or mnemonic */
boolean oldKeyHit = display.mnemonicKeyHit;
display.mnemonicKeyHit = true;
int /*long*/ result = callWindowProc (hwnd, OS.WM_SYSCHAR, wParam, lParam);
boolean consumed = false;
if (!display.mnemonicKeyHit) {
consumed = !sendKeyEvent (SWT.KeyDown, OS.WM_SYSCHAR, wParam, lParam);
// widget could be disposed at this point
}
consumed |= display.mnemonicKeyHit;
display.mnemonicKeyHit = oldKeyHit;
return consumed ? LRESULT.ONE : new LRESULT (result);
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.swt.win32.win32.x86
LRESULT wmMouseLeave (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam) {
if (!hooks (SWT.MouseExit) && !filters (SWT.MouseExit)) return null;
int pos = OS.GetMessagePos ();
POINT pt = new POINT ();
OS.POINTSTOPOINT (pt, pos);
OS.ScreenToClient (hwnd, pt);
lParam = OS.MAKELPARAM (pt.x, pt.y);
if (!sendMouseEvent (SWT.MouseExit, 0, hwnd, OS.WM_MOUSELEAVE, wParam, lParam)) {
return LRESULT.ZERO;
}
return null;
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.swt.win32.win32.x86
if (!OS.IsWinCE) {
boolean trackMouse = (state & TRACK_MOUSE) != 0;
boolean mouseEnter = hooks (SWT.MouseEnter) || display.filters (SWT.MouseEnter);
boolean mouseExit = hooks (SWT.MouseExit) || display.filters (SWT.MouseExit);
boolean mouseHover = hooks (SWT.MouseHover) || display.filters (SWT.MouseHover);
if (trackMouse || mouseEnter || mouseExit || mouseHover) {
TRACKMOUSEEVENT lpEventTrack = new TRACKMOUSEEVENT ();
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.swt.win32.win32.x86
boolean sendMouseEvent (int type, int button, int count, int detail, boolean send, int /*long*/ hwnd, int msg, int /*long*/ wParam, int /*long*/ lParam) {
if (!hooks (type) && !filters (type)) return true;
Event event = new Event ();
event.button = button;
event.detail = detail;
event.count = count;
event.setLocationInPixels(OS.GET_X_LPARAM (lParam), OS.GET_Y_LPARAM (lParam));
setInputState (event, type);
mapEvent (hwnd, event);
if (send) {
sendEvent (type, event);
if (isDisposed ()) return false;
} else {
postEvent (type, event);
}
return event.doit;
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.swt.win32.win32.x86
if (!hooks (type) && !filters (type)) return true;
int count = delta / OS.WHEEL_DELTA;
POINT pt = new POINT ();
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.swt.win32.win32.x86
if (!hooks (SWT.KeyUp) && !display.filters (SWT.KeyUp)) {
display.lastKey = display.lastAscii = 0;
display.lastVirtual = display.lastNull = display.lastDead = false;
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.swt.win32.win32.x86
boolean dragging = false, mouseDown = true;
int count = display.getClickCount (SWT.MouseDown, 1, hwnd, lParam);
if (count == 1 && (state & DRAG_DETECT) != 0 && hooks (SWT.DragDetect)) {
if (!OS.IsWinCE) {
if (hasMenu || hooks (SWT.MenuDetect)) {
SHRGINFO shrg = new SHRGINFO ();
shrg.cbSize = SHRGINFO.sizeof;
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.swt.win32.win32.x86
LRESULT wmPaint (int /*long*/ hwnd, int /*long*/ wParam, int /*long*/ lParam) {
if (!hooks (SWT.Paint) && !filters (SWT.Paint)) {
return null;
内容来源于网络,如有侵权,请联系作者删除!