Changeset 238 for trunk/src


Ignore:
Timestamp:
Dec 9, 2009, 1:22:19 PM (16 years ago)
Author:
lpino
Message:
  • Misc changes
Location:
trunk/src/plugins/org.eclipse.swt/Eclipse SWT/pm/org/eclipse/swt/widgets
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/plugins/org.eclipse.swt/Eclipse SWT/pm/org/eclipse/swt/widgets/Control.java

    r212 r238  
    471471
    472472//@@TODO (dmik): debug code, remove when no more necessary
    473 //System.out.println (
    474 //    "Control.createHandle(): Window has been created:\n" +
    475 //    "    hwnd = " + Integer.toHexString (handle) + "\n" +
    476 //    "    hwnd.parent = hwnd.owner = " + Integer.toHexString (parent.handle) + "\n" +
    477 //    "    class = " + windowClass() + "\n" +
    478 //    "    style = " + Integer.toHexString (widgetStyle())
    479 //);
    480 
     473/* System.out.println (
     474    "Control.createHandle(): Window has been created:\n" +
     475    "    hwnd = " + Integer.toHexString (handle) + "\n" +
     476    "    hwnd.parent = hwnd.owner = " + Integer.toHexString (parent.handle) + "\n" +
     477    "    class = " + windowClass() + "\n" +
     478    "    style = " + Integer.toHexString (widgetStyle())
     479);
     480 */
    481481//@@TODO(dmik): DBCS handling?
    482482//    if (OS.IsDBLocale && parent != null) {
     
    29492949//        case OS.WM_CTLCOLORSTATIC: result = WM_CTLCOLOR (wParam, lParam); break;
    29502950//        case OS.WM_CUT: result = WM_CUT (wParam, lParam); break;
    2951 //        case OS.WM_DESTROY: result = WM_DESTROY (wParam, lParam); break;
     2951        case OS.WM_DESTROY: result = WM_DESTROY (mp1, mp2); break;
    29522952        case OS.WM_DRAWITEM: result = WM_DRAWITEM (mp1, mp2); break;
    29532953//        case OS.WM_ENDSESSION: result = WM_ENDSESSION (wParam, lParam); break;
    29542954        case OS.WM_ERASEBACKGROUND: result = WM_ERASEBACKGROUND (mp1, mp2); break;
    2955         case OS.WM_FOCUSCHANGE: result = WM_FOCUSCHANGE (mp1, mp2); break;
     2955//        case OS.WM_FOCUSCHANGE: result = WM_FOCUSCHANGE (mp1, mp2); break;
    29562956        case OS.WM_QUERYDLGCODE: result = WM_QUERYDLGCODE (mp1, mp2); break;
    29572957//        case OS.WM_HELP: result = WM_HELP (wParam, lParam); break;
     
    31063106//      return control.wmColorChild (wParam, lParam);
    31073107//}
    3108 //
    3109 //LRESULT WM_CUT (int wParam, int lParam) {
    3110 //      return null;
    3111 //}
    3112 //
    3113 //LRESULT WM_DESTROY (int wParam, int lParam) {
    3114 //      return null;
    3115 //}
    3116 //
     3108
     3109MRESULT WM_DESTROY (int mp1, int mp2) {
     3110      return null;
     3111}
     3112
    31173113//LRESULT WM_DRAWITEM (int wParam, int lParam) {
    31183114//      DRAWITEMSTRUCT struct = new DRAWITEMSTRUCT ();
     
    37283724
    37293725MRESULT WM_SETFOCUS (int mp1, int mp2) {
    3730     // System.out.println("Control::WM_SETFOCUS -> handle = " + Integer.toHexString(mp1));
     3726//    System.out.println("Control::WM_SETFOCUS -> handle = " + Integer.toHexString(mp1));
    37313727    // System.out.println("Control::WM_SETFOCUS -> mp2 = " + OS.SHORT1FROMMP (mp2));
    3732     callWindowProc (OS.WM_SETFOCUS, mp1, mp2);
     3728    int code = callWindowProc (OS.WM_SETFOCUS, mp1, mp2);
    37333729    Shell shell = getShell ();
    37343730
     
    37643760        }
    37653761    }
    3766 
     3762    if(isDisposed()) return MRESULT.ZERO;
     3763    if(code == 0) return MRESULT.ZERO;
    37673764    return MRESULT.ZERO;
    37683765}
     
    39753972}
    39763973
    3977 MRESULT WM_FOCUSCHANGE (int mp1, int mp2) {
     3974/* MRESULT WM_FOCUSCHANGE (int mp1, int mp2) {
    39783975    callWindowProc (OS.WM_FOCUSCHANGE, mp1, mp2);
    39793976    return MRESULT.ZERO;
    39803977}
    3981 
     3978 */
    39823979//@@TODO(lpino): Consider the process in Menu controls and ListBoxes
    39833980//MRESULT WM_ADJUSTWINDOWPOS (int mp1, int mp2) {
  • trunk/src/plugins/org.eclipse.swt/Eclipse SWT/pm/org/eclipse/swt/widgets/Shell.java

    r212 r238  
    10701070}
    10711071
    1072 //@@TODO (dmik): need?
    1073 //LRESULT WM_CLOSE (int wParam, int lParam) {
    1074 //      if ((display.TrimEnabled && !isEnabled ()) || !isActive ()) {
    1075 //              return LRESULT.ZERO;
    1076 //      }
    1077 //      return super.WM_CLOSE (wParam, lParam);
    1078 //}
     1072MRESULT WM_CLOSE (int mp1, int mp2) {
     1073        if ((display.TrimEnabled && !isEnabled ()) || !isActive ()) {
     1074                return MRESULT.ZERO;
     1075        }
     1076        return super.WM_CLOSE (mp1, mp2);
     1077}
    10791078
    10801079MRESULT WM_COMMAND (int mp1, int mp2) {
     
    10821081}
    10831082
    1084 //LRESULT WM_DESTROY (int wParam, int lParam) {
    1085 //      LRESULT result = super.WM_DESTROY (wParam, lParam);
    1086 //      /*
    1087 //      * When the shell is a WS_CHILD window of a non-SWT
    1088 //      * window, the destroy code does not get called because
    1089 //      * the non-SWT window does not call dispose ().  Instead,
    1090 //      * the destroy code is called here in WM_DESTROY.
    1091 //      */
     1083MRESULT WM_DESTROY (int mp1, int mp2) {
     1084        MRESULT result = super.WM_DESTROY (mp1, mp2);
     1085        /*
     1086        * When the shell is a WS_CHILD window of a non-SWT
     1087        * window, the destroy code does not get called because
     1088        * the non-SWT window does not call dispose ().  Instead,
     1089        * the destroy code is called here in WM_DESTROY.
     1090        */
    10921091//      int bits = OS.GetWindowLong (handle, OS.GWL_STYLE);
    10931092//      if ((bits & OS.WS_CHILD) != 0) {
     
    10951094//              releaseWidget ();
    10961095//      }
    1097 //      return result;
    1098 //}
    1099 //
     1096        return result;
     1097}
     1098
    11001099//LRESULT WM_MOUSEACTIVATE (int wParam, int lParam) {
    11011100//      LRESULT result = super.WM_MOUSEACTIVATE (wParam, lParam);
Note: See TracChangeset for help on using the changeset viewer.