summaryrefslogtreecommitdiffstats
path: root/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Widget.java
diff options
context:
space:
mode:
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.java11
1 files changed, 11 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 57ab0fc48e..465a0f733e 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
@@ -898,6 +898,17 @@ int /*long*/ gtk_visibility_notify_event (int /*long*/ widget, int /*long*/ even
return 0;
}
+void gtk_widget_get_allocation (int /*long*/ widget, GtkAllocation allocation) {
+ if (OS.GTK_VERSION >= OS.VERSION (2, 18, 0)) {
+ OS.gtk_widget_get_allocation (widget, allocation);
+ } else {
+ allocation.x = OS.GTK_WIDGET_X (widget);
+ allocation.y = OS.GTK_WIDGET_Y (widget);
+ allocation.width = OS.GTK_WIDGET_WIDTH (widget);
+ allocation.height = OS.GTK_WIDGET_HEIGHT (widget);
+ }
+}
+
boolean gtk_widget_get_mapped (int /*long*/ widget) {
if (OS.GTK_VERSION >= OS.VERSION (2, 20, 0)) {
return OS.gtk_widget_get_mapped (widget);