Mercurial > projects > dwt-win
comparison dwt/widgets/Widget.d @ 234:116b04c0d8c9
some whitespace diffs to orig
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Mon, 02 Jun 2008 21:55:56 +0200 |
parents | 387fe83aa839 |
children | ecb80b2a89e1 |
comparison
equal
deleted
inserted
replaced
232:387fe83aa839 | 234:116b04c0d8c9 |
---|---|
1937 } | 1937 } |
1938 | 1938 |
1939 LRESULT wmLButtonUp (HWND hwnd, int wParam, int lParam) { | 1939 LRESULT wmLButtonUp (HWND hwnd, int wParam, int lParam) { |
1940 Display display = this.display; | 1940 Display display = this.display; |
1941 LRESULT result = null; | 1941 LRESULT result = null; |
1942 trc(__LINE__); | |
1943 if (sendMouseEvent (DWT.MouseUp, 1, hwnd, OS.WM_LBUTTONUP, wParam, lParam)) { | 1942 if (sendMouseEvent (DWT.MouseUp, 1, hwnd, OS.WM_LBUTTONUP, wParam, lParam)) { |
1944 trc(__LINE__); | 1943 result = new LRESULT (callWindowProc (hwnd, OS.WM_LBUTTONUP, wParam, lParam)); |
1945 result = new LRESULT( callWindowProc (hwnd, OS.WM_LBUTTONUP, wParam, lParam)); | |
1946 } else { | 1944 } else { |
1947 result = LRESULT.ZERO; | 1945 result = LRESULT.ZERO; |
1948 } | 1946 } |
1949 /* | 1947 /* |
1950 * Bug in Windows. On some machines that do not have XBUTTONs, | 1948 * Bug in Windows. On some machines that do not have XBUTTONs, |
1977 LRESULT result = null; | 1975 LRESULT result = null; |
1978 Display display = this.display; | 1976 Display display = this.display; |
1979 display.captureChanged = false; | 1977 display.captureChanged = false; |
1980 sendMouseEvent (DWT.MouseDown, 2, hwnd, OS.WM_MBUTTONDOWN, wParam, lParam); | 1978 sendMouseEvent (DWT.MouseDown, 2, hwnd, OS.WM_MBUTTONDOWN, wParam, lParam); |
1981 if (sendMouseEvent (DWT.MouseDoubleClick, 2, hwnd, OS.WM_MBUTTONDBLCLK, wParam, lParam)) { | 1979 if (sendMouseEvent (DWT.MouseDoubleClick, 2, hwnd, OS.WM_MBUTTONDBLCLK, wParam, lParam)) { |
1982 result = new LRESULT( callWindowProc (hwnd, OS.WM_MBUTTONDBLCLK, wParam, lParam)); | 1980 result = new LRESULT (callWindowProc (hwnd, OS.WM_MBUTTONDBLCLK, wParam, lParam)); |
1983 } else { | 1981 } else { |
1984 result = LRESULT.ZERO; | 1982 result = LRESULT.ZERO; |
1985 } | 1983 } |
1986 if (!display.captureChanged && !isDisposed ()) { | 1984 if (!display.captureChanged && !isDisposed ()) { |
1987 if (OS.GetCapture () !is hwnd) OS.SetCapture (hwnd); | 1985 if (OS.GetCapture () !is hwnd) OS.SetCapture (hwnd); |
1992 LRESULT wmMButtonDown (HWND hwnd, int wParam, int lParam) { | 1990 LRESULT wmMButtonDown (HWND hwnd, int wParam, int lParam) { |
1993 LRESULT result = null; | 1991 LRESULT result = null; |
1994 Display display = this.display; | 1992 Display display = this.display; |
1995 display.captureChanged = false; | 1993 display.captureChanged = false; |
1996 if (sendMouseEvent (DWT.MouseDown, 2, hwnd, OS.WM_MBUTTONDOWN, wParam, lParam)) { | 1994 if (sendMouseEvent (DWT.MouseDown, 2, hwnd, OS.WM_MBUTTONDOWN, wParam, lParam)) { |
1997 result = new LRESULT( callWindowProc (hwnd, OS.WM_MBUTTONDOWN, wParam, lParam)); | 1995 result = new LRESULT (callWindowProc (hwnd, OS.WM_MBUTTONDOWN, wParam, lParam)); |
1998 } else { | 1996 } else { |
1999 result = LRESULT.ZERO; | 1997 result = LRESULT.ZERO; |
2000 } | 1998 } |
2001 if (!display.captureChanged && !isDisposed ()) { | 1999 if (!display.captureChanged && !isDisposed ()) { |
2002 if (OS.GetCapture () !is hwnd) OS.SetCapture (hwnd); | 2000 if (OS.GetCapture () !is hwnd) OS.SetCapture (hwnd); |
2006 | 2004 |
2007 LRESULT wmMButtonUp (HWND hwnd, int wParam, int lParam) { | 2005 LRESULT wmMButtonUp (HWND hwnd, int wParam, int lParam) { |
2008 Display display = this.display; | 2006 Display display = this.display; |
2009 LRESULT result = null; | 2007 LRESULT result = null; |
2010 if (sendMouseEvent (DWT.MouseUp, 2, hwnd, OS.WM_MBUTTONUP, wParam, lParam)) { | 2008 if (sendMouseEvent (DWT.MouseUp, 2, hwnd, OS.WM_MBUTTONUP, wParam, lParam)) { |
2011 result = new LRESULT( callWindowProc (hwnd, OS.WM_MBUTTONUP, wParam, lParam)); | 2009 result = new LRESULT (callWindowProc (hwnd, OS.WM_MBUTTONUP, wParam, lParam)); |
2012 } else { | 2010 } else { |
2013 result = LRESULT.ZERO; | 2011 result = LRESULT.ZERO; |
2014 } | 2012 } |
2015 /* | 2013 /* |
2016 * Bug in Windows. On some machines that do not have XBUTTONs, | 2014 * Bug in Windows. On some machines that do not have XBUTTONs, |
2283 | 2281 |
2284 LRESULT wmRButtonUp (HWND hwnd, int wParam, int lParam) { | 2282 LRESULT wmRButtonUp (HWND hwnd, int wParam, int lParam) { |
2285 Display display = this.display; | 2283 Display display = this.display; |
2286 LRESULT result = null; | 2284 LRESULT result = null; |
2287 if (sendMouseEvent (DWT.MouseUp, 3, hwnd, OS.WM_RBUTTONUP, wParam, lParam)) { | 2285 if (sendMouseEvent (DWT.MouseUp, 3, hwnd, OS.WM_RBUTTONUP, wParam, lParam)) { |
2288 result = new LRESULT( callWindowProc (hwnd, OS.WM_RBUTTONUP, wParam, lParam)); | 2286 result = new LRESULT (callWindowProc (hwnd, OS.WM_RBUTTONUP, wParam, lParam)); |
2289 } else { | 2287 } else { |
2290 /* Call the DefWindowProc() to support WM_CONTEXTMENU */ | 2288 /* Call the DefWindowProc() to support WM_CONTEXTMENU */ |
2291 OS.DefWindowProc (hwnd, OS.WM_RBUTTONUP, wParam, lParam); | 2289 OS.DefWindowProc (hwnd, OS.WM_RBUTTONUP, wParam, lParam); |
2292 result = LRESULT.ZERO; | 2290 result = LRESULT.ZERO; |
2293 } | 2291 } |