Changeset 98 for trunk/src


Ignore:
Timestamp:
Jun 12, 2008, 5:10:02 PM (17 years ago)
Author:
lpino
Message:
  • Sync with SmartSVN
Location:
trunk/src/plugins/org.eclipse.swt/Eclipse SWT/pm/org/eclipse/swt/widgets
Files:
4 edited

Legend:

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

    r86 r98  
    29422942    MRESULT result = null;
    29432943    switch (msg) {
     2944//        case OS.WM_ADJUSTWINDOWPOS: result = WM_ADJUSTWINDOWPOS (mp1, mp2); break;
    29442945        case OS.WM_CALCVALIDRECTS: result = WM_CALCVALIDRECTS (mp1, mp2); break;
    29452946        case OS.WM_CHAR: result = WM_CHAR (mp1, mp2); break;
     
    30723073    switch (OS.SHORT1FROMMP (mp2)) {
    30733074        //@@TODO(dmik)
    3074         //case OS.CMDSRC_MENU:
     3075        case OS.CMDSRC_MENU:
     3076            System.out.println("Control:WM_COMMAND - CMDSRC_MENU");
     3077            break;
    30753078        //    return null;
     3079        case OS.CMDSRC_ACCELERATOR:
     3080            System.out.println("Control:WM_COMMAND - CMDSRC_ACCELERATOR");
     3081            break;
    30763082        case OS.CMDSRC_PUSHBUTTON:
    30773083        //@@TODO(lpino)
     
    30803086        case OS.CMDSRC_COLORDLG:
    30813087        //case OS.CMDSRC_PRINTDLG:
    3082             int hwndChild = OS.WinWindowFromID (handle, OS.SHORT1FROMMP (mp1));
    3083             Control control = WidgetTable.get (hwndChild);
    3084             if (control == null) return null;
    3085             return control.wmCommandChild (mp1, mp2);
    3086     }
    3087     return null;
     3088    }
     3089    System.out.println("Control:WM_COMMAND - Calling wmCommandChild");
     3090    int hwndChild = OS.WinWindowFromID (handle, OS.SHORT1FROMMP (mp1));
     3091    Control control = WidgetTable.get (hwndChild);
     3092    System.out.println("Control:WM_COMMAND - Control handle = " + Integer.toHexString (handle));
     3093    System.out.println("Control:WM_COMMAND - Child handle = " + Integer.toHexString (hwndChild));
     3094//    System.out.println("Control:WM_COMMAND - Menu handle = " + Integer.toHexString (menu.handle));
     3095    if (control == null) return null;
     3096    return control.wmCommandChild (mp1, mp2);
     3097
     3098//    return null;
    30883099}
    30893100
     
    30953106      */
    30963107//      if (mp2 != handle) return null;
     3108      boolean bIsWaiting = true;
     3109      System.out.println("Control:WM_CONTEXTMENU - PARENT HANDLE = " + Integer.toHexString (handle));
     3110      int hab = parent.getDisplay ().hab;
    30973111    //@@TODO(lpino) Remove debug msg
    3098 //      System.out.println("Control:WM_CONTEXTMENU - HANDLE = " + Integer.toHexString (handle));
     3112      System.out.println("Control:WM_CONTEXTMENU - MENU HANDLE = " + Integer.toHexString (menu.handle));
    30993113      short flOptions = OS.PU_HCONSTRAIN | OS.PU_VCONSTRAIN | OS.PU_MOUSEBUTTON1DOWN | OS.PU_KEYBOARD | OS.PU_MOUSEBUTTON1;
    31003114      boolean rc = OS.WinPopupMenu(handle, handle, menu.handle, 0, OS.SHORT1FROMMP(mp1), OS.SHORT2FROMMP(mp1), flOptions);
    31013115//      if (menu != null && !menu.isDisposed ()) {
    31023116//              menu.setVisible (true);
    3103 //              return MRESULT.ZERO;
    31043117//      }
     3118//       while(bIsWaiting){       
     3119//            QMSG qmsg = new QMSG ();
     3120//
     3121//            OS.WinGetMsg(hab,qmsg, 0, 0, 0);
     3122//            if (qmsg.msg == OS.WM_COMMAND)
     3123//                bIsWaiting = false;
     3124//            OS.WinDispatchMsg(hab, qmsg);
     3125//          System.out.println("Control:WM_CONTEXTMENU");
     3126//        }
     3127      System.out.println("Control:WM_CONTEXTMENU - ABOUT TO RETURN" );
    31053128      return MRESULT.TRUE;
    31063129}
     
    32303253//      return null;
    32313254//}
    3232 //
     3255
    32333256MRESULT WM_INITMENU (int mp1, int mp2) {
    32343257
    32353258      /* Ignore WM_INITMENU for an accelerator */
     3259      System.out.println("Control:WM_INITMENU " + OS.WinIsWindowVisible(mp2));
    32363260      Display display = getDisplay ();
    32373261      if (display.accelKeyHit) return null;
    3238       System.out.println("Control:WM_INITMENU " + OS.WinIsWindowVisible(mp2));
    32393262//      /*
    32403263//      * If the high order word of LPARAM is non-zero,
     
    38063829
    38073830MRESULT WM_MENUEND (int mp1, int mp2) {
    3808     System.out.println("Control:WM_MENUEND");
     3831    System.out.println("Control:WM_MENUEND - HANDLE = " + Integer.toHexString (mp2));
    38093832      return null;
    38103833}
     
    40164039}
    40174040
     4041//MRESULT WM_ADJUSTWINDOWPOS (int mp1, int mp2) {
     4042//    System.out.println("Control:WM_ADJUSTWINDOWPOS");
     4043//    SWP swp = new SWP ();
     4044//    OS.objcpy (swp, mp1);
     4045//    if ((swp.fl & OS.SWP_MINIMIZE) != 0) {
     4046//              sendEvent (SWT.Iconify);
     4047//              // widget could be disposed at this point
     4048//      } else if ((swp.fl & OS.SWP_RESTORE) != 0 && getMinimized ()) {
     4049//        sendEvent (SWT.Deiconify);
     4050//        // widget could be disposed at this point
     4051//    }
     4052//      return null;
     4053//}
     4054
    40184055//@@TODO(dmik): seems we don't need it (presparams replace this)
    40194056//LRESULT wmColorChild (int wParam, int lParam) {
  • trunk/src/plugins/org.eclipse.swt/Eclipse SWT/pm/org/eclipse/swt/widgets/Decorations.java

    r88 r98  
    393393    if (frameHandle == 0) error (SWT.ERROR_NO_HANDLES);
    394394//@@TODO (dmik): debug code, remove when no more necessary
    395 //System.out.println (
    396 //    "Decorations.createHandle(): WC_FRAME has been created:\n" +
    397 //    "    hwnd = " + Integer.toHexString (frameHandle) + "\n" +
    398 //    "    hwnd.parent = " + Integer.toHexString (hwndParent) + "\n" +
    399 //    "    hwnd.owner = " + Integer.toHexString (hwndOwner) + "\n" +
    400 //    "    class = " + windowFrameClass() + "\n" +
    401 //    "    style = " + Integer.toHexString (widgetFrameStyle())
    402 //);
     395System.out.println (
     396    "Decorations.createHandle(): WC_FRAME has been created:\n" +
     397    "    hwnd = " + Integer.toHexString (frameHandle) + "\n" +
     398    "    hwnd.parent = " + Integer.toHexString (hwndParent) + "\n" +
     399    "    hwnd.owner = " + Integer.toHexString (hwndOwner) + "\n" +
     400    "    class = " + windowFrameClass() + "\n" +
     401    "    style = " + Integer.toHexString (widgetFrameStyle())
     402);
    403403    FRAMECDATA fcdata = new FRAMECDATA ();
    404404    fcdata.flCreateFlags = widgetFrameFlags ();
     
    423423    state |= CANVAS;
    424424//@@TODO (dmik): debug code, remove when no more necessary
    425 //System.out.println (
    426 //    "Decorations.createHandle(): FID_CLIENT window has been created:\n" +
    427 //    "    hwnd = " + Integer.toHexString (handle) + "\n" +
    428 //    "    hwnd.parent = hwnd.owner = " + Integer.toHexString (frameHandle) + "\n" +
    429 //    "    class = " + windowClass() + "\n" +
    430 //    "    style = " + Integer.toHexString (widgetStyle())
    431 //);
     425System.out.println (
     426    "Decorations.createHandle(): FID_CLIENT window has been created:\n" +
     427    "    hwnd = " + Integer.toHexString (handle) + "\n" +
     428    "    hwnd.parent = hwnd.owner = " + Integer.toHexString (frameHandle) + "\n" +
     429    "    class = " + windowClass() + "\n" +
     430    "    style = " + Integer.toHexString (widgetStyle())
     431);
    432432//@@TODO(dmik): do something for MDI windows if needed   
    433433//    if (parent == null) return;
  • trunk/src/plugins/org.eclipse.swt/Eclipse SWT/pm/org/eclipse/swt/widgets/Menu.java

    r90 r98  
    885885//      }
    886886}
    887 
    888 }
     887}
  • trunk/src/plugins/org.eclipse.swt/Eclipse SWT/pm/org/eclipse/swt/widgets/Shell.java

    r84 r98  
    11191119//}
    11201120
    1121 //@@TODO (dmik): later
    1122 //LRESULT WM_COMMAND (int wParam, int lParam) {
    1123 //      if (OS.IsPPC) {
    1124 //              /*
    1125 //              * Note in WinCE PPC:  Close the Shell when the "Done Button" has
    1126 //              * been pressed. lParam is either 0 (PocketPC 2002) or the handle
    1127 //              * to the Shell (PocketPC).
    1128 //              */
    1129 //              int loWord = wParam & 0xFFFF;
    1130 //              if (loWord == OS.IDOK && (lParam == 0 || lParam == handle)) {
    1131 //                      OS.PostMessage (handle, OS.WM_CLOSE, 0, 0);
    1132 //                      return LRESULT.ZERO;                   
    1133 //              }
    1134 //              /*
    1135 //              * Note in WinCE PPC.  menu events originate from the
    1136 //              * command bar.
    1137 //              */
    1138 //              if (hwndCB != 0 && lParam == hwndCB) {
    1139 //                      return super.WM_COMMAND (wParam, 0);
    1140 //              }
    1141 //      }
    1142 //      return super.WM_COMMAND (wParam, lParam);
    1143 //}
    1144 //
     1121MRESULT WM_COMMAND (int mp1, int mp2) {
     1122        return super.WM_COMMAND (mp1, mp2);
     1123}
     1124
    11451125//LRESULT WM_DESTROY (int wParam, int lParam) {
    11461126//      LRESULT result = super.WM_DESTROY (wParam, lParam);
     
    12701250//      return result;
    12711251//}
    1272 
    1273 }
     1252MRESULT WM_CONTEXTMENU (int mp1, int mp2) {
     1253    System.out.println("Shell:WM_CONTEXTMENU - HANDLE = " + Integer.toHexString (handle));
     1254    return MRESULT.TRUE;
     1255}
     1256}
Note: See TracChangeset for help on using the changeset viewer.