Changeset 193


Ignore:
Timestamp:
Dec 7, 2010, 2:48:55 PM (15 years ago)
Author:
dmik
Message:

jdk: Finally made awt.dll build.

Location:
trunk/openjdk/jdk
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/openjdk/jdk/make/sun/awt/Makefile

    r180 r193  
    321321               -lgdi32.lib -lshell32.lib -lcomdlg32.lib \
    322322               -lversion.lib -lmpr.lib -lrasapi32.lib \
    323                -lwinmm.lib -lwinspool.lib -lvfw32.lib \
     323               -lwinmm.lib -lwinspool.lib \
    324324               -lsecur32.lib -loleacc.lib -loledlg.lib \
    325                -lsensapi.lib \
    326325               -lkernel32.lib -luser32.lib -lgdi32.lib -lwinspool.lib \
    327                -limm32.lib -lole32.lib -luuid.lib $(JVMLIB) \
    328                -lshell32.lib
     326               -limm32os2.lib -lole32.lib -lguidlib.lib $(JVMLIB) \
     327               -lddraw.lib -lshell32.lib
    329328
    330329clean:: awt.clean
  • trunk/openjdk/jdk/src/windows/native/sun/java2d/windows/ddrawObject.cpp

    r186 r193  
    263263    lpPrimary = NULL;
    264264    d3dContext = NULL;
     265#ifdef __WIN32OS2__
     266    deviceUseD3D = FALSE;
     267#else
    265268    deviceUseD3D = useD3D;
     269#endif
    266270    this->dxObject = dxObject;
    267271}
     
    548552DDraw::InitD3DContext()
    549553{
     554#ifndef __WIN32OS2__
    550555    J2dTraceLn(J2D_TRACE_INFO, "DDraw::InitD3DContext");
    551556    // note: the first time the context initialization fails,
     
    562567        }
    563568    }
     569#endif
    564570}
    565571
     
    567573DDraw::ReleaseD3DContext()
    568574{
     575#ifndef __WIN32OS2__
    569576    J2dTraceLn(J2D_TRACE_INFO, "DDraw::ReleaseD3DContext");
    570577    if (d3dContext != NULL) {
    571578        d3dContext->Release3DDevice();
    572579    }
     580#endif
    573581}
    574582
     
    10541062
    10551063void DDrawSurface::FlushD3DContext(BOOL bForce) {
     1064#ifndef __WIN32OS2__
    10561065    D3DContext *d3dContext = ddObject->GetD3dContext();
    10571066    if (d3dContext) {
    10581067        d3dContext->FlushD3DQueueForTarget(bForce ? NULL : this);
    10591068    }
     1069#endif
    10601070}
    10611071
  • trunk/openjdk/jdk/src/windows/native/sun/java2d/windows/ddrawUtils.cpp

    r2 r193  
    2424 */
    2525
     26#ifndef __WIN32OS2__
    2627#define INITGUID
     28#endif
    2729#include "Trace.h"
    2830#include "ddrawUtils.h"
  • trunk/openjdk/jdk/src/windows/native/sun/windows/ShellFolder2.cpp

    r2 r193  
    181181                                         (CHAR*)pidl + pStrret->uOffset);
    182182        case STRRET_WSTR :
    183             return env->NewString(pStrret->pOleStr,
     183            return env->NewString(reinterpret_cast<const jchar*>(pStrret->pOleStr),
    184184                static_cast<jsize>(wcslen(pStrret->pOleStr)));
    185185    }
     
    187187}
    188188// restoring the original definition
    189 #define JNU_NewStringPlatform(env, x) env->NewString(x, static_cast<jsize>(_tcslen(x)))
     189#define JNU_NewStringPlatform(env, x) \
     190    env->NewString(reinterpret_cast<const jchar*>(x), \
     191        static_cast<jsize>(_tcslen(reinterpret_cast<const WCHAR*>(x))))
    190192
    191193/*
     
    727729    jchar* wszPath = new jchar[nLength + 1];
    728730    const jchar* strPath = env->GetStringChars(jname, NULL);
    729     wcsncpy(wszPath, strPath, nLength);
     731    wcsncpy(reinterpret_cast<wchar_t*>(wszPath), reinterpret_cast<const wchar_t*>(strPath), nLength);
    730732    wszPath[nLength] = 0;
    731733    HRESULT res = pIShellFolder->ParseDisplayName(NULL, NULL,
    732                         const_cast<jchar*>(wszPath), NULL, &pIDL, NULL);
     734                        reinterpret_cast<WCHAR*>(wszPath), NULL, &pIDL, NULL);
    733735    if (res != S_OK) {
    734736        JNU_ThrowIOException(env, "Could not parse name");
     
    863865    HICON hIcon = NULL;
    864866
     867#ifdef __WIN32OS2__
     868    // @todo Odin32 doesn't define IExtractIcon, use native API instead
     869#else
    865870    HRESULT hres;
    866871    if (IS_NT) {
     
    911916        }
    912917    }
     918#endif /* __WIN32OS2__ */
    913919    return (jlong)hIcon;
    914920}
     
    10121018    if (libShell32 != NULL) {
    10131019        hBitmap = (HBITMAP)LoadImage(libShell32,
    1014                     isVista ? TEXT("IDB_TB_SH_DEF_16") : MAKEINTRESOURCE(216),
     1020                    isVista ? TEXT("IDB_TB_SH_DEF_16") : (LPCTSTR)MAKEINTRESOURCE(216),
    10151021                    IMAGE_BITMAP, 0, 0, LR_CREATEDIBSECTION);
    10161022    }
     
    10181024        libComCtl32 = LoadLibrary(TEXT("comctl32.dll"));
    10191025        if (libComCtl32 != NULL) {
    1020             hBitmap = (HBITMAP)LoadImage(libComCtl32, MAKEINTRESOURCE(124),
     1026            hBitmap = (HBITMAP)LoadImage(libComCtl32, (LPCTSTR)MAKEINTRESOURCE(124),
    10211027                                         IMAGE_BITMAP, 0, 0, LR_CREATEDIBSECTION);
    10221028        }
     
    10821088    (JNIEnv* env, jclass cls, jint iconID)
    10831089{
    1084     return (jlong)LoadIcon(NULL, MAKEINTRESOURCE(iconID));
     1090    return (jlong)LoadIcon(NULL, (LPCTSTR)MAKEINTRESOURCE(iconID));
    10851091}
    10861092
     
    10951101     jint cxDesired, jint cyDesired, jboolean useVGAColors)
    10961102{
    1097     HINSTANCE libHandle = LoadLibrary(env->GetStringChars(libName, NULL));
     1103    HINSTANCE libHandle = LoadLibrary(reinterpret_cast<const WCHAR*>(env->GetStringChars(libName, NULL)));
    10981104    if (libHandle != NULL) {
    10991105        UINT fuLoad = (useVGAColors && !isXP) ? LR_VGACOLOR : 0;
    1100         return ptr_to_jlong(LoadImage(libHandle, MAKEINTRESOURCE(iconID),
     1106        return ptr_to_jlong(LoadImage(libHandle, (LPCTSTR)MAKEINTRESOURCE(iconID),
    11011107                                      IMAGE_ICON, cxDesired, cyDesired,
    11021108                                      fuLoad));
     
    11951201    }
    11961202
     1203#ifndef __WIN32OS2__
    11971204    hr = pIShellFolder->CreateViewObject(NULL, IID_IShellDetails, (void**)&pIUnknown);
    11981205    if(SUCCEEDED (hr)) {
     
    12311238        return columns;
    12321239    }
     1240#endif /* !__WIN32OS2__ */
    12331241
    12341242    // The folder exposes neither IShellFolder2 nor IShelDetails
     
    12681276    }
    12691277
     1278#ifndef __WIN32OS2__
     1279    // @todo Odin32 doesn't define IExtractIcon, use native API instead
    12701280    hr = pIShellFolder->CreateViewObject(NULL, IID_IShellDetails, (void**)&pIUnknown);
    12711281    if(SUCCEEDED (hr)) {
     
    12791289        }
    12801290    }
     1291#endif /* !__WIN32OS2__ */
    12811292
    12821293    // The folder exposes neither IShellFolder2 nor IShelDetails
  • trunk/openjdk/jdk/src/windows/native/sun/windows/UnicowsLoader.cpp

    r2 r193  
    2727#include "alloc.h"
    2828#include "UnicowsLoader.h"
     29
     30#ifdef __WIN32OS2__
     31#include <minivcrt.h>
     32#define _CW_DEFAULT CW_DEFAULT
     33#endif
    2934
    3035/*
  • trunk/openjdk/jdk/src/windows/native/sun/windows/awt_TrayIcon.cpp

    r2 r193  
    734734    }
    735735
    736     tooltipStr = env->GetStringChars(jtooltip, (jboolean *)NULL);
     736    tooltipStr = reinterpret_cast<LPCTSTR>(env->GetStringChars(jtooltip, (jboolean *)NULL));
    737737    trayIcon->SetToolTip(tooltipStr);
    738     env->ReleaseStringChars(jtooltip, tooltipStr);
     738    env->ReleaseStringChars(jtooltip, reinterpret_cast<const jchar *>(tooltipStr));
    739739ret:
    740740    env->DeleteGlobalRef(self);
     
    777777
    778778    PDATA pData;
     779    BOOL result;
    779780    JNI_CHECK_PEER_GOTO(self, ret);
    780781    trayIcon = (AwtTrayIcon *)pData;
    781782
    782     BOOL result = trayIcon->SendTrayMessage(jupdate == JNI_TRUE ? NIM_MODIFY : NIM_ADD);
     783    result = trayIcon->SendTrayMessage(jupdate == JNI_TRUE ? NIM_MODIFY : NIM_ADD);
    783784    // 6270114: Instructs the taskbar to behave according to the Shell version 5.0
    784785    if (result && jupdate == JNI_FALSE) {
     
    856857    trayIcon = (AwtTrayIcon *)pData;
    857858
    858     captionStr = env->GetStringChars(jcaption, (jboolean *)NULL);
    859     textStr = env->GetStringChars(jtext, (jboolean *)NULL);
    860     msgTypeStr = env->GetStringChars(jmsgType, (jboolean *)NULL);
     859    captionStr = reinterpret_cast<LPCTSTR>(env->GetStringChars(jcaption, (jboolean *)NULL));
     860    textStr = reinterpret_cast<LPCTSTR>(env->GetStringChars(jtext, (jboolean *)NULL));
     861    msgTypeStr = reinterpret_cast<LPCTSTR>(env->GetStringChars(jmsgType, (jboolean *)NULL));
    861862
    862863    trayIcon->DisplayMessage(captionStr, textStr, msgTypeStr);
    863864
    864     env->ReleaseStringChars(jcaption, captionStr);
    865     env->ReleaseStringChars(jtext, textStr);
    866     env->ReleaseStringChars(jmsgType, msgTypeStr);
     865    env->ReleaseStringChars(jcaption, reinterpret_cast<const jchar *>(captionStr));
     866    env->ReleaseStringChars(jtext, reinterpret_cast<const jchar *>(textStr));
     867    env->ReleaseStringChars(jmsgType, reinterpret_cast<const jchar *>(msgTypeStr));
    867868ret:
    868869    env->DeleteGlobalRef(self);
  • trunk/openjdk/jdk/src/windows/native/sun/windows/awt_dlls.cpp

    r2 r193  
    2626#include "awt.h"
    2727#include "awt_dlls.h"
     28
     29#ifdef __WIN32OS2__
     30#include <minivcrt.h>
     31#endif
    2832
    2933/*
     
    293297        DWORD     dwVerHnd = 0;
    294298        DWORD     dwVersionInfoSize;
    295         LPVOID    lpVersionInfo;
     299        LPBYTE    lpVersionInfo;
    296300        UINT      uLength = 0;
    297301        struct LANGANDCODEPAGE {
Note: See TracChangeset for help on using the changeset viewer.