Changeset 212 for trunk/src


Ignore:
Timestamp:
Oct 23, 2009, 8:50:29 PM (16 years ago)
Author:
lpino
Message:
  • Little changes, some cleaning some debug messages... etc
Location:
trunk/src/plugins/org.eclipse.swt/Eclipse SWT/pm/org/eclipse/swt/widgets
Files:
3 edited

Legend:

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

    r207 r212  
    34793479//    return null;
    34803480}
    3481 
    3482 //LRESULT WM_MENUCHAR (int wParam, int lParam) {
    3483 //      Display display = getDisplay ();
    3484 //      display.mnemonicKeyHit = false;
    3485 //      /*
    3486 //      * Feature in Windows.  When the user types Alt+<key>
    3487 //      * and <key> does not match a mnemonic in the System
    3488 //      * menu or the menu bar, Windows beeps.  This beep is
    3489 //      * unexpected and unwanted by applications that look
    3490 //      * for Alt+<key>.  The fix is to detect the case and
    3491 //      * stop Windows from beeping by closing the menu.
    3492 //      */
    3493 //      int type = wParam >> 16;
    3494 //      if (type == 0 || type == OS.MF_SYSMENU) {
    3495 //              return new LRESULT (OS.MNC_CLOSE << 16);
    3496 //      }
    3497 //      return null;
    3498 //}
    34993481
    35003482MRESULT WM_MENUSELECT (int mp1, int mp2) {
     
    36593641
    36603642MRESULT WM_PAINT (int mp1, int mp2) {
     3643//      System.out.println("Control::WM_PAINT -> HANDLE  =  " + Integer.toHexString(handle));
    36613644    /* Exit early - don't draw the background */
    36623645    if (!hooks (SWT.Paint)) {
     
    37453728
    37463729MRESULT WM_SETFOCUS (int mp1, int mp2) {
     3730    // System.out.println("Control::WM_SETFOCUS -> handle = " + Integer.toHexString(mp1));
     3731    // System.out.println("Control::WM_SETFOCUS -> mp2 = " + OS.SHORT1FROMMP (mp2));
    37473732    callWindowProc (OS.WM_SETFOCUS, mp1, mp2);
    37483733    Shell shell = getShell ();
     
    38383823//      return null;
    38393824//}
    3840 //
     3825//@@TODO (lpino): Complete including differences with Win32 (WM_SYSCHAR + WM_SYSKEYDOWN)
    38413826MRESULT WM_SYSCOMMAND (int mp1, int mp2) {
    38423827//      /*
     
    38593844      switch (cmd) {
    38603845              case OS.SC_CLOSE:
     3846                System.out.println("Control::WM_SYSCOMMAND -> SC_CLOSE");
    38613847                      int hwndShell = menuShell ().handle;
    38623848//                      int bits =  OS.WinQueryWindowULong (frameHandle, OS.QWL_STYLE);
     
    39883974    return new MRESULT (result);
    39893975}
     3976
    39903977MRESULT WM_FOCUSCHANGE (int mp1, int mp2) {
    39913978    callWindowProc (OS.WM_FOCUSCHANGE, mp1, mp2);
    39923979    return MRESULT.ZERO;
    39933980}
     3981
     3982//@@TODO(lpino): Consider the process in Menu controls and ListBoxes
    39943983//MRESULT WM_ADJUSTWINDOWPOS (int mp1, int mp2) {
    39953984//    System.out.println("Control:WM_ADJUSTWINDOWPOS");
     
    40344023      return null;
    40354024}
    4036 //
    4037 //LRESULT wmNotifyChild (int wParam, int lParam) {
    4038 //      return null;
    4039 //}
    40404025
    40414026MRESULT wmScrollChild (int mp1, int mp2) {
  • trunk/src/plugins/org.eclipse.swt/Eclipse SWT/pm/org/eclipse/swt/widgets/Decorations.java

    r194 r212  
    12061206        sendEvent (SWT.Show);
    12071207        if (isDisposed ()) return;
     1208//                      OS.DrawMenuBar (handle);
     1209//                      OS.ShowWindow (handle, swFlags);
    12081210    }
    12091211
     
    13671369    switch (msg) {
    13681370        case OS.WM_ACTIVATE: result = FRAME_WM_ACTIVATE (mp1, mp2); break;
     1371//      case OS.WM_CLOSE: result = FRAME_WM_CLOSE (mp1, mp2); break;
    13691372        case OS.WM_ADJUSTWINDOWPOS: result = FRAME_WM_ADJUSTWINDOWPOS (mp1, mp2); break;
    13701373        case OS.WM_REALIZEPALETTE: result = FRAME_WM_REALIZEPALETTE (mp1, mp2); break;
    13711374        case OS.WM_WINDOWPOSCHANGED: result = FRAME_WM_WINDOWPOSCHANGED (mp1, mp2); break;
    13721375        case OS.WM_CHAR: result = FRAME_WM_CHAR (mp1, mp2); break;
    1373         case OS.WM_ERASEBACKGROUND: result = FRAME_WM_ERASEBACKGROUND (mp1, mp2); break;
     1376//      case OS.WM_ERASEBACKGROUND: result = FRAME_WM_ERASEBACKGROUND (mp1, mp2); break;
    13741377        case OS.WM_INITMENU: result = FRAME_WM_INITMENU (mp1, mp2); break;
    13751378   }
     
    14351438                sendEvent (SWT.Activate);
    14361439                if (isDisposed ()) return MRESULT.ZERO;
    1437                 restoreFocus ();
     1440                if(restoreFocus ()) return MRESULT.ZERO;;
    14381441        }
    14391442        return null;
     
    15041507}
    15051508
    1506 MRESULT FRAME_WM_ERASEBACKGROUND (int mp1, int mp2) {
    1507 //@@TODO (lpino): Remove debug
    1508 //    System.out.println("Decorations::WM_ERASEBACKGROUND -> HANDLE = " + Integer.toHexString(handle));
    1509     if ((state & CANVAS) != 0) {
    1510         return super.WM_ERASEBACKGROUND (mp1, mp2);
    1511     }
    1512     RECTL rcl = new RECTL();
    1513     OS.objcpy (rcl, mp2);
    1514     drawBackground (mp1, rcl);
    1515     return MRESULT.FALSE;
    1516 }
    1517 
    1518 MRESULT FRAME_WM_INITMENU (int mp1, int mp2) {
    1519         return MRESULT.FALSE;
     1509// // MRESULT WM_ERASEBACKGROUND (int mp1, int mp2) {
     1510// // //@@TODO (lpino): Remove debug
     1511    // // System.out.println("Decorations::WM_ERASEBACKGROUND -> HANDLE = " + Integer.toHexString(handle));
     1512    // // if ((state & CANVAS) != 0) {
     1513        // // return super.WM_ERASEBACKGROUND (mp1, mp2);
     1514    // // }
     1515    // // RECTL rcl = new RECTL();
     1516    // // OS.objcpy (rcl, mp2);
     1517    // // drawBackground (mp1, rcl);
     1518    // // return MRESULT.FALSE;
     1519// // }
     1520// //
     1521 MRESULT FRAME_WM_INITMENU (int mp1, int mp2) {
     1522         return MRESULT.FALSE;
    15201523}
    15211524MRESULT WM_SETFOCUS (int mp1, int mp2) {
  • trunk/src/plugins/org.eclipse.swt/Eclipse SWT/pm/org/eclipse/swt/widgets/Shell.java

    r202 r212  
    461461    * is currently unspecified.
    462462    */
    463 //    /*
    464 //    * Note:  It is valid to attempt to dispose a widget
    465 //    * more than once.  If this happens, fail silently.
    466 //    */
     463    /*
     464    * Note:  It is valid to attempt to dispose a widget
     465    * more than once.  If this happens, fail silently.
     466    */
    467467//    if (!isValidWidget ()) return;
    468468//    if (!isValidThread ()) error (SWT.ERROR_THREAD_INVALID_ACCESS);
     
    473473}
    474474
    475 //@@TODO(dmik)
     475//@@TODO(lpino): Use GpiSetPattern
    476476//int findBrush (int pixel) {
    477477//      if (pixel == OS.GetSysColor (OS.COLOR_BTNFACE)) {
     
    546546
    547547//@@TODO(dmik): what to do with TrimEnabled?
    548 //public boolean getEnabled () {
    549 //    checkWidget ();
    550 //    if (!display.TrimEnabled) return super.getEnabled ();
    551 //    return (state & DISABLED) == 0;
    552 //}
     548public boolean getEnabled () {
     549    checkWidget ();
     550    if (!display.TrimEnabled) return super.getEnabled ();
     551    return (state & DISABLED) == 0;
     552}
    553553
    554554/**
Note: See TracChangeset for help on using the changeset viewer.