summaryrefslogtreecommitdiffstats
path: root/bundles
diff options
context:
space:
mode:
authorVeronika Irvine <veronika>2003-03-04 22:02:20 +0000
committerVeronika Irvine <veronika>2003-03-04 22:02:20 +0000
commit2637aeee793efc6570a7b95e5bfd1e1b7facd424 (patch)
treeec80cc56a2462ec1e67befd52d3236e1c3aa04d7 /bundles
parentef2c019fd0294b2970a5f92b4892277f3d0a8568 (diff)
downloadeclipse.platform.swt-2637aeee793efc6570a7b95e5bfd1e1b7facd424.tar.gz
eclipse.platform.swt-2637aeee793efc6570a7b95e5bfd1e1b7facd424.tar.xz
eclipse.platform.swt-2637aeee793efc6570a7b95e5bfd1e1b7facd424.zip
31684
Diffstat (limited to 'bundles')
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/photon/org/eclipse/swt/internal/photon/OS.java1
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Composite.java61
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Control.java1
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Shell.java2
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Widget.java5
5 files changed, 45 insertions, 25 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/photon/org/eclipse/swt/internal/photon/OS.java b/bundles/org.eclipse.swt/Eclipse SWT PI/photon/org/eclipse/swt/internal/photon/OS.java
index 57f8f38a49..1e5fc36bb5 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/photon/org/eclipse/swt/internal/photon/OS.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/photon/org/eclipse/swt/internal/photon/OS.java
@@ -1906,6 +1906,7 @@ public static final int Pg_BITMAP_TRANSPARENT =
//public static final int Pt_CB_MULTITEXT_SCROLLUPDATE = ( 5 * 1000 + 14 );
//public static final int Pt_CB_NUMERIC_CHANGED = ( 53 * 1000 + 15 );
//public static final int Pt_CB_ONOFF_NEW_VALUE = ( 8 * 1000 + 1 );
+ public static final int Pt_CB_OUTBOUND = ( 1 * 1000 + 22 );
//public static final int Pt_CB_PRINT_PROPS = (46 * 1000 + 2);
//public static final int Pt_CB_PRINT_TOFILE = (46 * 1000 + 3);
//public static final int Pt_CB_RAW = ( 1 * 1000 + 11 );
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Composite.java b/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Composite.java
index 2132ee49b8..70c5c59b18 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Composite.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Composite.java
@@ -209,6 +209,7 @@ void createScrolledHandle (int parentHandle) {
}
int clazz = display.PtContainer;
args = new int [] {
+ OS.Pt_ARG_FLAGS, OS.Pt_SELECTABLE | OS.Pt_SELECT_NOREDRAW, OS.Pt_SELECTABLE | OS.Pt_SELECT_NOREDRAW,
OS.Pt_ARG_CONTAINER_FLAGS, 0, OS.Pt_ENABLE_CUA | OS.Pt_ENABLE_CUA_ARROWS,
OS.Pt_ARG_RESIZE_FLAGS, 0, OS.Pt_RESIZE_XY_BITS,
};
@@ -508,6 +509,8 @@ int parentingHandle () {
}
int Ph_EV_BUT_PRESS (int widget, int info) {
+ int result = super.Ph_EV_BUT_PRESS (widget, info);
+ if (result != OS.Pt_CONTINUE)return result;
if ((state & CANVAS) != 0) {
if (info == 0) return OS.Pt_END;
PtCallbackInfo_t cbinfo = new PtCallbackInfo_t ();
@@ -520,35 +523,45 @@ int Ph_EV_BUT_PRESS (int widget, int info) {
PhPointerEvent_t pe = new PhPointerEvent_t ();
OS.memmove (pe, data, PhPointerEvent_t.sizeof);
- /* Grab pointer */
- if (!(menu != null && pe.buttons == OS.Ph_BUTTON_MENU)) {
- if (pe.click_count == 1) {
- PhRect_t rect = new PhRect_t ();
- PhPoint_t pos = new PhPoint_t();
- pos.x = pe.pos_x;
- pos.y = pe.pos_y;
- rect.ul_x = rect.lr_x = (short) (pos.x + ev.translation_x);
- rect.ul_y = rect.lr_y = (short) (pos.y + ev.translation_y);
- int rid = OS.PtWidgetRid (handle);
- int input_group = OS.PhInputGroup (0);
- int flags = OS.Ph_DRAG_KEY_MOTION | OS.Ph_DRAG_TRACK | OS.Ph_TRACK_DRAG;
- OS.PhInitDrag (rid, flags, rect, null, input_group, null, null, null, pos, null);
- }
- }
-
- int result = super.Ph_EV_BUT_PRESS (widget, info);
-
- /* Set focus for the a CANVAS with no children */
+ /* Set focus for a CANVAS with no children */
if ((style & SWT.NO_FOCUS) == 0) {
if (pe.buttons == OS.Ph_BUTTON_SELECT) {
- if (OS.PtWidgetChildFront (handle) == 0) {
- setFocus ();
- }
+ if (OS.PtWidgetChildFront (handle) == 0) setFocus ();
}
}
- return result;
}
- return super.Ph_EV_BUT_PRESS (widget, info);
+ return result;
+}
+
+int Pt_CB_OUTBOUND (int widget, int info) {
+ if ((state & CANVAS) != 0) {
+ if (info == 0) return OS.Pt_END;
+ PtCallbackInfo_t cbinfo = new PtCallbackInfo_t ();
+ OS.memmove (cbinfo, info, PtCallbackInfo_t.sizeof);
+ if (cbinfo.event == 0) return OS.Pt_END;
+ PhEvent_t ev = new PhEvent_t ();
+ OS.memmove (ev, cbinfo.event, PhEvent_t.sizeof);
+ int data = OS.PhGetData (cbinfo.event);
+ if (data == 0) return OS.Pt_END;
+ PhPointerEvent_t pe = new PhPointerEvent_t ();
+ OS.memmove (pe, data, PhPointerEvent_t.sizeof);
+
+ /* Grab pointer */
+ PhRect_t rect = new PhRect_t ();
+ PhPoint_t pos = new PhPoint_t ();
+ pos.x = pe.pos_x;
+ pos.y = pe.pos_y;
+ rect.ul_x = rect.lr_x = (short) (pos.x + ev.translation_x);
+ rect.ul_y = rect.lr_y = (short) (pos.y + ev.translation_y);
+ int rid = OS.PtWidgetRid (handle);
+ int input_group = OS.PhInputGroup (0);
+ int flags = OS.Ph_DRAG_KEY_MOTION | OS.Ph_DRAG_TRACK | OS.Ph_TRACK_DRAG;
+ OS.PhInitDrag (rid, flags, rect, null, input_group, null, null, null, pos, null);
+
+ /* Post drag detect event */
+ postEvent (SWT.DragDetect);
+ }
+ return OS.Pt_CONTINUE;
}
void releaseChildren () {
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Control.java b/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Control.java
index 991f174c24..0b5a13bdda 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Control.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Control.java
@@ -895,6 +895,7 @@ void hookEvents () {
OS.PtAddEventHandler (handle, OS.Ph_EV_BOUNDARY, windowProc, OS.Ph_EV_BOUNDARY);
if ((state & GRAB) != 0) {
OS.PtAddEventHandler (handle, OS.Ph_EV_DRAG, windowProc, OS.Ph_EV_DRAG);
+ OS.PtAddCallback (handle, OS.Pt_CB_OUTBOUND, windowProc, OS.Pt_CB_OUTBOUND);
}
OS.PtAddCallback (focusHandle, OS.Pt_CB_GOT_FOCUS, windowProc, OS.Pt_CB_GOT_FOCUS);
OS.PtAddCallback (focusHandle, OS.Pt_CB_LOST_FOCUS, windowProc, OS.Pt_CB_LOST_FOCUS);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Shell.java b/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Shell.java
index f4cadc7b96..5c880743c9 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Shell.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Shell.java
@@ -410,7 +410,7 @@ public Rectangle computeTrim (int x, int y, int width, int height) {
}
void createHandle (int index) {
- state |= HANDLE | CANVAS;
+ state |= HANDLE | GRAB | CANVAS;
if (handle != 0) {
int clazz = display.PtContainer;
int [] args = {
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Widget.java b/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Widget.java
index adeebade05..b880163253 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Widget.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/photon/org/eclipse/swt/widgets/Widget.java
@@ -651,6 +651,10 @@ int Pt_CB_MODIFY_VERIFY (int widget, int info) {
return OS.Pt_CONTINUE;
}
+int Pt_CB_OUTBOUND (int widget, int info) {
+ return OS.Pt_CONTINUE;
+}
+
int Pt_CB_PG_PANEL_SWITCHING (int widget, int info) {
return OS.Pt_CONTINUE;
}
@@ -1081,6 +1085,7 @@ int windowProc (int handle, int data, int info) {
case OS.Pt_CB_GOT_FOCUS: return Pt_CB_GOT_FOCUS (handle, info);
case OS.Pt_CB_LOST_FOCUS: return Pt_CB_LOST_FOCUS (handle, info);
case OS.Pt_CB_MODIFY_VERIFY: return Pt_CB_MODIFY_VERIFY (handle, info);
+ case OS.Pt_CB_OUTBOUND: return Pt_CB_OUTBOUND (handle, info);
case OS.Pt_CB_PG_PANEL_SWITCHING: return Pt_CB_PG_PANEL_SWITCHING (handle, info);
case OS.Pt_CB_REALIZED: return Pt_CB_REALIZED (handle, info);
case OS.Pt_CB_RESIZE: return Pt_CB_RESIZE (handle, info);