Changeset 46591 in webkit


Ignore:
Timestamp:
Jul 30, 2009 11:25:42 AM (15 years ago)
Author:
staikos@webkit.org
Message:

2009-07-30 Yong Li <yong.li@torchmobile.com>

Reviewed by George Staikos.

WINCE PORT: some files modified to build for WINCE
https://bugs.webkit.org/show_bug.cgi?id=27816

Location:
trunk/WebCore
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r46590 r46591  
     12009-07-30  Yong Li  <yong.li@torchmobile.com>
     2
     3        Reviewed by George Staikos.
     4
     5        WINCE PORT: some files modified to build for WINCE
     6        https://bugs.webkit.org/show_bug.cgi?id=27816
     7
     8        * accessibility/AccessibilityObject.h:
     9        * page/win/EventHandlerWin.cpp:
     10        (WebCore::EventHandler::createDraggingClipboard):
     11        * platform/win/PlatformMouseEventWin.cpp:
     12        (WebCore::messageToEventType):
     13        (WebCore::PlatformMouseEvent::PlatformMouseEvent):
     14        * platform/win/PlatformScreenWin.cpp:
     15        (WebCore::deviceInfoForWidget):
     16        (WebCore::screenIsMonochrome):
     17        * platform/win/PopupMenuWin.cpp:
     18        (WebCore::PopupMenu::show):
     19        (WebCore::PopupMenu::paint):
     20        (WebCore::registerPopup):
     21        (WebCore::PopupWndProc):
     22
    1232009-07-30  Yong Li  <yong.li@torchmobile.com>
    224
  • trunk/WebCore/accessibility/AccessibilityObject.h

    r46555 r46591  
    4141#if PLATFORM(MAC)
    4242#include <wtf/RetainPtr.h>
    43 #elif PLATFORM(WIN)
     43#elif PLATFORM(WIN) && !PLATFORM(WINCE)
    4444#include "AccessibilityObjectWrapperWin.h"
    4545#include "COMPtr.h"
     
    429429#if PLATFORM(MAC)
    430430    RetainPtr<AccessibilityObjectWrapper> m_wrapper;
    431 #elif PLATFORM(WIN)
     431#elif PLATFORM(WIN) && !PLATFORM(WINCE)
    432432    COMPtr<AccessibilityObjectWrapper> m_wrapper;
    433433#elif PLATFORM(GTK)
  • trunk/WebCore/page/win/EventHandlerWin.cpp

    r38211 r46591  
    11/*
    22 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved.
     3 * Copyright (C) 2007-2009 Torch Mobile, Inc.
    34 *
    45 * Redistribution and use in source and binary forms, with or without
     
    8889PassRefPtr<Clipboard> EventHandler::createDraggingClipboard() const
    8990{
     91#if PLATFORM(WINCE)
     92    return 0;
     93#else
    9094    COMPtr<WCDataObject> dataObject;
    9195    WCDataObject::createInstance(&dataObject);
    9296    return ClipboardWin::create(true, dataObject.get(), ClipboardWritable);
     97#endif
    9398}
    9499
  • trunk/WebCore/platform/win/PlatformMouseEventWin.cpp

    r44270 r46591  
    11/*
    22 * Copyright (C) 2006, 2007 Apple Inc.  All rights reserved.
     3 * Copyright (C) 2007-2008 Torch Mobile Inc.
    34 *
    45 * Redistribution and use in source and binary forms, with or without
     
    6465            return MouseEventReleased;
    6566
     67#if !PLATFORM(WINCE)
    6668        case WM_MOUSELEAVE:
     69#endif
    6770        case WM_MOUSEMOVE:
    6871            return MouseEventMoved;
     
    105108            break;
    106109        case WM_MOUSEMOVE:
     110#if !PLATFORM(WINCE)
    107111        case WM_MOUSELEAVE:
     112#endif
    108113            if (wParam & MK_LBUTTON)
    109114                m_button = LeftButton;
  • trunk/WebCore/platform/win/PlatformScreenWin.cpp

    r37271 r46591  
    11/*
    22 * Copyright (C) 2006, 2007 Apple Inc.  All rights reserved.
     3 * Copyright (C) 2009 Torch Mobile, Inc.
    34 *
    45 * Redistribution and use in source and binary forms, with or without
     
    5051static DEVMODE deviceInfoForWidget(Widget* widget)
    5152{
    52     MONITORINFOEX monitorInfo = monitorInfoForWidget(widget);
    53 
    5453    DEVMODE deviceInfo;
    5554    deviceInfo.dmSize = sizeof(DEVMODE);
    5655    deviceInfo.dmDriverExtra = 0;
     56#if PLATFORM(WINCE)
     57    if (!EnumDisplaySettings(0, ENUM_CURRENT_SETTINGS, &deviceInfo))
     58        deviceInfo.dmBitsPerPel = 16;
     59#else
     60    MONITORINFOEX monitorInfo = monitorInfoForWidget(widget);
    5761    EnumDisplaySettings(monitorInfo.szDevice, ENUM_CURRENT_SETTINGS, &deviceInfo);
     62#endif
    5863
    5964    return deviceInfo;
     
    7580bool screenIsMonochrome(Widget* widget)
    7681{
     82#if PLATFORM(WINCE)
     83    // EnumDisplaySettings doesn't set dmColor in DEVMODE.
     84    return false;
     85#else
    7786    DEVMODE deviceInfo = deviceInfoForWidget(widget);
    7887    return deviceInfo.dmColor == DMCOLOR_MONOCHROME;
     88#endif
    7989}
    8090
  • trunk/WebCore/platform/win/PopupMenuWin.cpp

    r46564 r46591  
    11/*
    22 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved.
     3 * Copyright (C) 2007-2009 Torch Mobile Inc.
    34 *
    45 * This library is free software; you can redistribute it and/or
     
    4041#include <tchar.h>
    4142#include <windows.h>
     43#if PLATFORM(WINCE)
     44#include <ResDefCE.h>
     45#define MAKEPOINTS(l) (*((POINTS FAR *)&(l)))
     46#endif
    4247
    4348using std::min;
     
    111116            return;
    112117
     118#if PLATFORM(WINCE)
     119        ::SetWindowLong(m_popup, 0, (LONG)this);
     120#else
    113121        ::SetWindowLongPtr(m_popup, 0, (LONG_PTR)this);
     122#endif
    114123    }
    115124
     
    125134    // Note: Must use 'BOOL' and 'FALSE' instead of 'bool' and 'false' to avoid stack corruption with SystemParametersInfo
    126135    BOOL shouldAnimate = FALSE;
     136#if !PLATFORM(WINCE)
    127137    ::SystemParametersInfo(SPI_GETCOMBOBOXANIMATION, 0, &shouldAnimate, 0);
    128138
     
    139149        }
    140150    } else
     151#endif
    141152        ::ShowWindow(m_popup, SW_SHOWNORMAL);
    142153    ::SetCapture(m_popup);
     
    453464    }
    454465    if (!m_bmp) {
     466#if PLATFORM(WINCE)
     467        BitmapInfo bitmapInfo(true, clientRect().width(), clientRect().height());
     468#else
    455469        BitmapInfo bitmapInfo = BitmapInfo::createBottomUp(clientRect().size());
    456 
     470#endif
    457471        void* pixels = 0;
    458472        m_bmp = ::CreateDIBSection(m_DC, &bitmapInfo, DIB_RGB_COLORS, &pixels, 0, 0);
     
    585599        return true;
    586600
     601#if PLATFORM(WINCE)
     602    WNDCLASS wcex;
     603#else
    587604    WNDCLASSEX wcex;
    588 
    589605    wcex.cbSize = sizeof(WNDCLASSEX);
    590 
     606    wcex.hIconSm        = 0;
    591607    wcex.style          = CS_DROPSHADOW;
     608#endif
     609
    592610    wcex.lpfnWndProc    = PopupWndProc;
    593611    wcex.cbClsExtra     = 0;
     
    599617    wcex.lpszMenuName   = 0;
    600618    wcex.lpszClassName  = kPopupWindowClassName;
    601     wcex.hIconSm        = 0;
    602619
    603620    haveRegisteredWindowClass = true;
    604621
     622#if PLATFORM(WINCE)
     623    return ::RegisterClass(&wcex);
     624#else
    605625    return ::RegisterClassEx(&wcex);
     626#endif
    606627}
    607628
     
    610631{
    611632    LRESULT lResult = 0;
     633#if PLATFORM(WINCE)
     634    LONG longPtr = GetWindowLong(hWnd, 0);
     635#else
    612636    LONG_PTR longPtr = GetWindowLongPtr(hWnd, 0);
     637#endif
    613638    PopupMenu* popup = reinterpret_cast<PopupMenu*>(longPtr);
    614639
     
    727752
    728753                BOOL shouldHotTrack = FALSE;
     754#if !PLATFORM(WINCE)
    729755                ::SystemParametersInfo(SPI_GETHOTTRACKING, 0, &shouldHotTrack, 0);
     756#endif
    730757
    731758                RECT bounds;
     
    812839            }
    813840            break;
     841#if !PLATFORM(WINCE)
    814842        case WM_PRINTCLIENT:
    815843            if (popup)
    816844                popup->paint(popup->clientRect(), (HDC)wParam);
    817845            break;
     846#endif
    818847        default:
    819848            lResult = DefWindowProc(hWnd, message, wParam, lParam);
Note: See TracChangeset for help on using the changeset viewer.