本文整理了Java中org.eclipse.swt.widgets.Scrollable.gtk_key_press_event()
方法的一些代码示例,展示了Scrollable.gtk_key_press_event()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Scrollable.gtk_key_press_event()
方法的具体详情如下:
包路径:org.eclipse.swt.widgets.Scrollable
类名称:Scrollable
方法名:gtk_key_press_event
暂无
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.s390x
@Override
long /*int*/ gtk_key_press_event (long /*int*/ widget, long /*int*/ event) {
GdkEventKey keyEvent = new GdkEventKey ();
OS.memmove (keyEvent, event, GdkEventKey.sizeof);
int key = keyEvent.keyval;
keyPressDefaultSelectionHandler (event, key);
return super.gtk_key_press_event (widget, event);
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.aix.ppc
@Override
int /*long*/ gtk_key_press_event (int /*long*/ widget, int /*long*/ event) {
int /*long*/ result = super.gtk_key_press_event (widget, event);
if (result != 0) return result;
/*
* Feature in GTK. The default behavior when the return key
* is pressed is to select the default button. This is not the
* expected behavior for Composite and its subclasses. The
* fix is to avoid calling the default handler.
*/
if ((state & CANVAS) != 0 && socketHandle == 0) {
GdkEventKey keyEvent = new GdkEventKey ();
OS.memmove (keyEvent, event, GdkEventKey.sizeof);
int key = keyEvent.keyval;
switch (key) {
case OS.GDK_Return:
case OS.GDK_KP_Enter: return 1;
}
}
return result;
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.ppc
@Override
int /*long*/ gtk_key_press_event (int /*long*/ widget, int /*long*/ event) {
int /*long*/ result = super.gtk_key_press_event (widget, event);
if (result != 0) return result;
/*
* Feature in GTK. The default behavior when the return key
* is pressed is to select the default button. This is not the
* expected behavior for Composite and its subclasses. The
* fix is to avoid calling the default handler.
*/
if ((state & CANVAS) != 0 && socketHandle == 0) {
GdkEventKey keyEvent = new GdkEventKey ();
OS.memmove (keyEvent, event, GdkEventKey.sizeof);
int key = keyEvent.keyval;
switch (key) {
case OS.GDK_Return:
case OS.GDK_KP_Enter: return 1;
}
}
return result;
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.s390x
@Override
long /*int*/ gtk_key_press_event (long /*int*/ widget, long /*int*/ event) {
long /*int*/ result = super.gtk_key_press_event (widget, event);
if (result != 0) return result;
/*
* Feature in GTK. The default behavior when the return key
* is pressed is to select the default button. This is not the
* expected behavior for Composite and its subclasses. The
* fix is to avoid calling the default handler.
*/
if ((state & CANVAS) != 0 && socketHandle == 0) {
GdkEventKey keyEvent = new GdkEventKey ();
OS.memmove (keyEvent, event, GdkEventKey.sizeof);
int key = keyEvent.keyval;
switch (key) {
case OS.GDK_Return:
case OS.GDK_KP_Enter: return 1;
}
}
return result;
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.ppc
@Override
int /*long*/ gtk_key_press_event (int /*long*/ widget, int /*long*/ event) {
GdkEventKey keyEvent = new GdkEventKey ();
OS.memmove (keyEvent, event, GdkEventKey.sizeof);
int key = keyEvent.keyval;
keyPressDefaultSelectionHandler (event, key);
return super.gtk_key_press_event (widget, event);
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.aix.ppc
@Override
int /*long*/ gtk_key_press_event (int /*long*/ widget, int /*long*/ event) {
GdkEventKey keyEvent = new GdkEventKey ();
OS.memmove (keyEvent, event, GdkEventKey.sizeof);
int key = keyEvent.keyval;
keyPressDefaultSelectionHandler (event, key);
return super.gtk_key_press_event (widget, event);
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.ppc
@Override
int /*long*/ gtk_key_press_event (int /*long*/ widget, int /*long*/ event) {
boolean handleSegments = false, segmentsCleared = false;
if (hooks (SWT.Segments) || filters (SWT.Segments)) {
GdkEventKey gdkEvent = new GdkEventKey ();
OS.memmove (gdkEvent, event, GdkEventKey.sizeof);
if (gdkEvent.length > 0 && (gdkEvent.state & (OS.GDK_MOD1_MASK | OS.GDK_CONTROL_MASK)) == 0) {
handleSegments = true;
if (segments != null) {
clearSegments (true);
segmentsCleared = true;
}
}
}
int /*long*/ result = super.gtk_key_press_event (widget, event);
if (result != 0) fixIM ();
if (gdkEventKey == -1) result = 1;
gdkEventKey = 0;
if (handleSegments && (result != 0 || segmentsCleared)) {
applySegments ();
}
return result;
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.s390x
@Override
long /*int*/ gtk_key_press_event (long /*int*/ widget, long /*int*/ event) {
boolean handleSegments = false, segmentsCleared = false;
if (hooks (SWT.Segments) || filters (SWT.Segments)) {
GdkEventKey gdkEvent = new GdkEventKey ();
OS.memmove (gdkEvent, event, GdkEventKey.sizeof);
if (gdkEvent.length > 0 && (gdkEvent.state & (OS.GDK_MOD1_MASK | OS.GDK_CONTROL_MASK)) == 0) {
handleSegments = true;
if (segments != null) {
clearSegments (true);
segmentsCleared = true;
}
}
}
long /*int*/ result = super.gtk_key_press_event (widget, event);
if (result != 0) fixIM ();
if (gdkEventKey == -1) result = 1;
gdkEventKey = 0;
if (handleSegments && (result != 0 || segmentsCleared)) {
applySegments ();
}
return result;
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.aix.ppc
@Override
int /*long*/ gtk_key_press_event (int /*long*/ widget, int /*long*/ event) {
boolean handleSegments = false, segmentsCleared = false;
if (hooks (SWT.Segments) || filters (SWT.Segments)) {
GdkEventKey gdkEvent = new GdkEventKey ();
OS.memmove (gdkEvent, event, GdkEventKey.sizeof);
if (gdkEvent.length > 0 && (gdkEvent.state & (OS.GDK_MOD1_MASK | OS.GDK_CONTROL_MASK)) == 0) {
handleSegments = true;
if (segments != null) {
clearSegments (true);
segmentsCleared = true;
}
}
}
int /*long*/ result = super.gtk_key_press_event (widget, event);
if (result != 0) fixIM ();
if (gdkEventKey == -1) result = 1;
gdkEventKey = 0;
if (handleSegments && (result != 0 || segmentsCleared)) {
applySegments ();
}
return result;
}
内容来源于网络,如有侵权,请联系作者删除!