diff options
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Widget.java')
-rw-r--r-- | bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Widget.java | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Widget.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Widget.java index 0c8ec24ccd..eb1b4e8b87 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Widget.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Widget.java @@ -1746,6 +1746,38 @@ int /*long*/ gtk_widget_get_window (int /*long*/ widget){ } } +void gtk_widget_set_can_default (int /*long*/ widget, boolean can_default) { + if (OS.GTK_VERSION >= OS.VERSION (2, 18, 0)) { + OS.gtk_widget_set_can_default (widget, can_default); + } else { + OS.GTK_WIDGET_SET_FLAGS (widget, OS.GTK_CAN_DEFAULT); + } +} + +void gtk_widget_set_can_focus (int /*long*/ widget, boolean can_focus) { + if (OS.GTK_VERSION >= OS.VERSION (2, 18, 0)) { + OS.gtk_widget_set_can_focus (widget, can_focus); + } else { + OS.GTK_WIDGET_SET_FLAGS (widget, OS.GTK_CAN_FOCUS); + } +} + +void gtk_widget_set_mapped (int /*long*/ widget, boolean mapped) { + if (OS.GTK_VERSION >= OS.VERSION (2, 20, 0)) { + OS.gtk_widget_set_mapped (widget, mapped); + } else { + OS.GTK_WIDGET_SET_FLAGS (widget, OS.GTK_MAPPED); + } +} + +void gtk_widget_set_visible (int /*long*/ widget, boolean visible) { + if (OS.GTK_VERSION >= OS.VERSION (2, 18, 0)) { + OS.gtk_widget_set_visible (widget,visible); + } else { + OS.GTK_WIDGET_SET_FLAGS (widget, OS.GTK_VISIBLE); + } +} + /** * Returns a string containing a concise, human-readable * description of the receiver. |