summaryrefslogtreecommitdiffstats
path: root/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Widget.java
diff options
context:
space:
mode:
authorAnatoly Spektor <aspektor@redhat.com>2012-08-02 16:36:51 -0400
committerSilenio Quarti <silenio_quarti@ca.ibm.com>2012-08-03 11:17:00 -0400
commit5983c24ed5237e3fc3d1e8e4c23d3ce4ce153bac (patch)
treee00688b350467b1730204459583d9dd0a2720fa1 /bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Widget.java
parent34f0c3974a377d1fb41f2905de1ceb16ac6ba1ce (diff)
downloadeclipse.platform.swt-5983c24ed5237e3fc3d1e8e4c23d3ce4ce153bac.tar.gz
eclipse.platform.swt-5983c24ed5237e3fc3d1e8e4c23d3ce4ce153bac.tar.xz
eclipse.platform.swt-5983c24ed5237e3fc3d1e8e4c23d3ce4ce153bac.zip
Omit use of deprecated GTK_WIDGET_FLAGS
Conflicts: bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.c bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_custom.h bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.c bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.h
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.java32
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 389c5fce7b..b9923e57f7 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
@@ -1698,6 +1698,38 @@ boolean gtk_widget_get_sensitive (int /*long*/ widget) {
}
}
+boolean gtk_widget_get_visible (int /*long*/ widget) {
+ if (OS.GTK_VERSION >= OS.VERSION (2, 18, 0)) {
+ return OS.gtk_widget_get_visible (widget);
+ } else {
+ return (OS.GTK_WIDGET_FLAGS (widget) & OS.GTK_VISIBLE) != 0;
+ }
+}
+
+boolean gtk_widget_get_realized (int /*long*/ widget) {
+ if (OS.GTK_VERSION >= OS.VERSION (2, 20, 0)) {
+ return OS.gtk_widget_get_realized (widget);
+ } else {
+ return (OS.GTK_WIDGET_FLAGS (widget) & OS.GTK_REALIZED) != 0;
+ }
+}
+
+boolean gtk_widget_get_can_default (int /*long*/ widget){
+ if (OS.GTK_VERSION >= OS.VERSION (2, 18, 0)) {
+ return OS.gtk_widget_get_can_default (widget);
+ } else {
+ return (OS.GTK_WIDGET_FLAGS (widget) & OS.GTK_CAN_DEFAULT) != 0;
+ }
+}
+
+boolean gtk_widget_get_has_window (int /*long*/ widget) {
+ if (OS.GTK_VERSION >= OS.VERSION (2, 18, 0)) {
+ return OS.gtk_widget_get_has_window (widget);
+ } else {
+ return (OS.GTK_WIDGET_FLAGS (widget) & OS.GTK_NO_WINDOW) == 0;
+ }
+}
+
/**
* Returns a string containing a concise, human-readable
* description of the receiver.