Changeset 194 for trunk/src


Ignore:
Timestamp:
Oct 10, 2009, 6:58:06 PM (16 years ago)
Author:
lpino
Message:
  • Small changes
File:
1 edited

Legend:

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

    r191 r194  
    316316                }
    317317                pacctAccelTable.cAccel = (short)nAccel;
    318                 //@@TEMP(lpino): in the future we should get this value from somewhere
     318                //@@TEMP(lpino): in the future we should get this value from somewhere(WinQueryCp)
    319319                pacctAccelTable.codepage = (short)437;
    320320                pacctAccelTable.aaccel = new ACCEL[nAccel];
     
    322322                    pacctAccelTable.aaccel[i] = accelList[i];
    323323        }
    324         hAccel = OS.WinCreateAccelTable(getDisplay().hab, pacctAccelTable);
    325         System.out.println("Decorations:createAcceleratorTable - Handle of accelerator table = " + hAccel);
     324        System.out.println("Decorations:createAcceleratorTable ");
     325       if (nAccel != 0) hAccel = OS.WinCreateAccelTable(getDisplay().hab, pacctAccelTable);
     326       System.out.println("Decorations:createAcceleratorTable - Handle of accelerator table = " + hAccel);
    326327        if(!OS.WinSetAccelTable(getDisplay().hab, hAccel, frameHandle)){
    327328            System.out.println("Decorations:createAcceleratorTable - Thread did not attach accelerator table to the frame");
     
    547548// * </ul>
    548549// */
    549 //public Image getImage () {
    550 //      checkWidget ();
    551 //      return image;
    552 //}
     550public Image getImage () {
     551        checkWidget ();
     552        return image;
     553}
    553554
    554555/**
     
    13701371        case OS.WM_WINDOWPOSCHANGED: result = FRAME_WM_WINDOWPOSCHANGED (mp1, mp2); break;
    13711372        case OS.WM_CHAR: result = FRAME_WM_CHAR (mp1, mp2); break;
    1372     }
     1373        case OS.WM_ERASEBACKGROUND: result = FRAME_WM_ERASEBACKGROUND (mp1, mp2); break;
     1374        case OS.WM_INITMENU: result = FRAME_WM_INITMENU (mp1, mp2); break;
     1375   }
    13731376   
    13741377    if (result != null) return result.value;
     
    15011504}
    15021505
    1503 //MRESULT WM_ERASEBACKGROUND (int mp1, int mp2) {
     1506MRESULT FRAME_WM_ERASEBACKGROUND (int mp1, int mp2) {
     1507//@@TODO (lpino): Remove debug
    15041508//    System.out.println("Decorations::WM_ERASEBACKGROUND -> HANDLE = " + Integer.toHexString(handle));
    1505 //    if ((state & CANVAS) != 0) {
    1506 //        return super.WM_ERASEBACKGROUND (mp1, mp2);
    1507 //    }
    1508 //    RECTL rcl = new RECTL();
    1509 //    OS.objcpy (rcl, mp2);
    1510 //    drawBackground (mp1, rcl);
    1511 //    return MRESULT.FALSE;
    1512 //}
    1513 
     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
     1518MRESULT FRAME_WM_INITMENU (int mp1, int mp2) {
     1519        return MRESULT.FALSE;
     1520}
    15141521MRESULT WM_SETFOCUS (int mp1, int mp2) {
    15151522    MRESULT result  = super.WM_SETFOCUS (mp1, mp2);
Note: See TracChangeset for help on using the changeset viewer.