summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSilenio Quarti <silenio>2002-12-10 20:04:09 +0000
committerSilenio Quarti <silenio>2002-12-10 20:04:09 +0000
commitc95aadef666fa684eb9ef9f93e16e2ddce1a83f9 (patch)
tree280c80a6b8a6d70266b011a69adbdb87856d5cd5
parent94a2783d16e33a7aad124d763431ab404583cc10 (diff)
downloadeclipse.platform.swt-c95aadef666fa684eb9ef9f93e16e2ddce1a83f9.tar.gz
eclipse.platform.swt-c95aadef666fa684eb9ef9f93e16e2ddce1a83f9.tar.xz
eclipse.platform.swt-c95aadef666fa684eb9ef9f93e16e2ddce1a83f9.zip
*** empty log message ***
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Control.java9
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Display.java8
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/ScrollBar.java3
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/ToolItem.java3
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Widget.java28
5 files changed, 19 insertions, 32 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Control.java b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Control.java
index 1941683557..7ae5cf9124 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Control.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Control.java
@@ -236,7 +236,8 @@ public int getBorderWidth () {
public Rectangle getBounds () {
checkWidget();
- return getBounds (topHandle ());
+ Rect rect = getBounds (topHandle ());
+ return new Rectangle (rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top);
}
public Display getDisplay () {
@@ -269,7 +270,8 @@ public Object getLayoutData () {
public Point getLocation () {
checkWidget();
- return getLocation (topHandle ());
+ Rect rect = getBounds (topHandle ());
+ return new Point (rect.left, rect.top);
}
public Menu getMenu () {
@@ -306,7 +308,8 @@ public Shell getShell () {
public Point getSize () {
checkWidget();
- return getSize (topHandle ());
+ Rect rect = getSize (topHandle ());
+ return new Point (rect.right - rect.left, rect.bottom - rect.top);
}
public String getToolTipText () {
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Display.java b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Display.java
index 5f8fc84eff..ced1ba3dc7 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Display.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Display.java
@@ -748,8 +748,8 @@ void initializeCallbacks () {
int[] mask2 = new int[] {
OS.kEventClassMouse, OS.kEventMouseDown,
OS.kEventClassMouse, OS.kEventMouseDragged,
- OS.kEventClassMouse, OS.kEventMouseEntered,
- OS.kEventClassMouse, OS.kEventMouseExited,
+// OS.kEventClassMouse, OS.kEventMouseEntered,
+// OS.kEventClassMouse, OS.kEventMouseExited,
OS.kEventClassMouse, OS.kEventMouseMoved,
OS.kEventClassMouse, OS.kEventMouseUp,
OS.kEventClassMouse, OS.kEventMouseWheelMoved,
@@ -947,7 +947,9 @@ int mouseProc (int nextHandler, int theEvent, int userData) {
}
}
}
- if (widget != null) return widget.mouseProc (nextHandler, theEvent, userData);
+ if (widget != null) {
+ return userData != 0 ? widget.mouseProc (nextHandler, theEvent, userData) : OS.eventNotHandledErr;
+ }
break;
}
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/ScrollBar.java b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/ScrollBar.java
index 4b53be90e2..4651d92c9b 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/ScrollBar.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/ScrollBar.java
@@ -152,7 +152,8 @@ public int getSelection () {
public Point getSize () {
checkWidget();
- return getSize (handle);
+ Rect rect = getSize (handle);
+ return new Point (rect.right - rect.left, rect.bottom - rect.top);
}
public int getThumb () {
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/ToolItem.java b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/ToolItem.java
index 0fbc4d7898..f1daea500c 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/ToolItem.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/ToolItem.java
@@ -184,7 +184,8 @@ void drawWidget (int control) {
public Rectangle getBounds () {
checkWidget();
- return getBounds (handle);
+ Rect rect = getBounds (handle);
+ return new Rectangle (rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top);
}
public Control getControl () {
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Widget.java b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Widget.java
index 627ac81914..0f74631212 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Widget.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Widget.java
@@ -288,7 +288,7 @@ boolean filters (int eventType) {
return display.filters (eventType);
}
-Rectangle getBounds (int control) {
+Rect getBounds (int control) {
Rect rect = new Rect();
OS.GetControlBounds (control, rect);
int window = OS.GetControlOwner (control);
@@ -306,7 +306,7 @@ Rectangle getBounds (int control) {
rect.top -= inset.top;
rect.right += inset.right;
rect.bottom += inset.bottom;
- return new Rectangle (rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top);
+ return rect;
}
int getClipping (int control) {
@@ -364,31 +364,11 @@ String getName () {
return string.substring(index + 1, string.length ());
}
-Point getLocation (int control) {
- Rect rect = new Rect();
- OS.GetControlBounds (control, rect);
- int window = OS.GetControlOwner (control);
- int [] theRoot = new int [1];
- OS.GetRootControl (window, theRoot);
- int [] parentHandle = new int [1];
- OS.GetSuperControl (control, parentHandle);
- if (parentHandle [0] != theRoot [0]) {
- Rect parentRect = new Rect ();
- OS.GetControlBounds (parentHandle [0], parentRect);
- OS.OffsetRect (rect, (short) -parentRect.left, (short) -parentRect.top);
- }
- Rect inset = getInset ();
- rect.left -= inset.left;
- rect.top -= inset.top;
- return new Point (rect.left, rect.top);
-}
-
-
String getNameText () {
return "";
}
-Point getSize (int control) {
+Rect getSize (int control) {
Rect rect = new Rect ();
OS.GetControlBounds (control, rect);
Rect inset = getInset ();
@@ -396,7 +376,7 @@ Point getSize (int control) {
rect.top -= inset.top;
rect.right += inset.right;
rect.bottom += inset.bottom;
- return new Point (rect.right - rect.left, rect.bottom - rect.top);
+ return rect;
}
public int getStyle () {