зеркало из https://github.com/mozilla/gecko-dev.git
Bug 784739 - Switch from NULL to nullptr in widget/windows/ (2/3); r=ehsan
--HG-- extra : rebase_source : 5276b6474b9d6135ca2db408d17f0b5ed98b24a6
This commit is contained in:
Родитель
337d6926aa
Коммит
ba9bbe5bb3
|
@ -42,7 +42,7 @@ namespace {
|
|||
// Shared by all TaskbarPreviews to avoid the expensive creation process.
|
||||
// Manually refcounted (see gInstCount) by the ctor and dtor of TaskbarPreview.
|
||||
// This is done because static constructors aren't allowed for perf reasons.
|
||||
dom::CanvasRenderingContext2D* gCtx = NULL;
|
||||
dom::CanvasRenderingContext2D* gCtx = nullptr;
|
||||
// Used in tracking the number of previews. Used in freeing
|
||||
// the static 2d rendering context on shutdown.
|
||||
uint32_t gInstCount = 0;
|
||||
|
@ -93,7 +93,7 @@ TaskbarPreview::TaskbarPreview(ITaskbarList4 *aTaskbar, nsITaskbarPreviewControl
|
|||
mDocShell(do_GetWeakReference(aShell))
|
||||
{
|
||||
// TaskbarPreview may outlive the WinTaskbar that created it
|
||||
::CoInitialize(NULL);
|
||||
::CoInitialize(nullptr);
|
||||
|
||||
gInstCount++;
|
||||
|
||||
|
@ -110,7 +110,7 @@ TaskbarPreview::~TaskbarPreview() {
|
|||
NS_ASSERTION(!mWnd, "TaskbarPreview::DetachFromNSWindow was not called before destruction");
|
||||
|
||||
// Make sure to release before potentially uninitializing COM
|
||||
mTaskbar = NULL;
|
||||
mTaskbar = nullptr;
|
||||
|
||||
if (--gInstCount == 0)
|
||||
NS_IF_RELEASE(gCtx);
|
||||
|
@ -170,7 +170,7 @@ TaskbarPreview::SetActive(bool active) {
|
|||
if (active)
|
||||
sActivePreview = this;
|
||||
else if (sActivePreview == this)
|
||||
sActivePreview = NULL;
|
||||
sActivePreview = nullptr;
|
||||
|
||||
return CanMakeTaskbarCalls() ? ShowActive(active) : NS_OK;
|
||||
}
|
||||
|
@ -250,7 +250,7 @@ void
|
|||
TaskbarPreview::DetachFromNSWindow() {
|
||||
WindowHook &hook = GetWindowHook();
|
||||
hook.RemoveMonitor(WM_DESTROY, MainWindowHook, this);
|
||||
mWnd = NULL;
|
||||
mWnd = nullptr;
|
||||
}
|
||||
|
||||
LRESULT
|
||||
|
@ -407,7 +407,7 @@ TaskbarPreview::MainWindowHook(void *aContext,
|
|||
if (nMsg == WM_DESTROY) {
|
||||
// nsWindow is being destroyed
|
||||
// We can't really do anything at this point including removing hooks
|
||||
preview->mWnd = NULL;
|
||||
preview->mWnd = nullptr;
|
||||
} else {
|
||||
nsWindow *window = WinUtils::GetNSWindowPtr(preview->mWnd);
|
||||
if (window) {
|
||||
|
|
|
@ -95,7 +95,7 @@ TaskbarPreviewButton::GetImage(imgIContainer **img) {
|
|||
if (mImage)
|
||||
NS_ADDREF(*img = mImage);
|
||||
else
|
||||
*img = NULL;
|
||||
*img = nullptr;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
@ -110,7 +110,7 @@ TaskbarPreviewButton::SetImage(imgIContainer *img) {
|
|||
&Button().hIcon);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
} else {
|
||||
Button().hIcon = NULL;
|
||||
Button().hIcon = nullptr;
|
||||
}
|
||||
return Update();
|
||||
}
|
||||
|
|
|
@ -22,8 +22,8 @@ const PRUnichar *const kWindowClass = L"MozillaTaskbarPreviewClass";
|
|||
|
||||
TaskbarTabPreview::TaskbarTabPreview(ITaskbarList4 *aTaskbar, nsITaskbarPreviewController *aController, HWND aHWND, nsIDocShell *aShell)
|
||||
: TaskbarPreview(aTaskbar, aController, aHWND, aShell),
|
||||
mProxyWindow(NULL),
|
||||
mIcon(NULL),
|
||||
mProxyWindow(nullptr),
|
||||
mIcon(nullptr),
|
||||
mRegistered(false)
|
||||
{
|
||||
WindowHook &hook = GetWindowHook();
|
||||
|
@ -33,7 +33,7 @@ TaskbarTabPreview::TaskbarTabPreview(ITaskbarList4 *aTaskbar, nsITaskbarPreviewC
|
|||
TaskbarTabPreview::~TaskbarTabPreview() {
|
||||
if (mIcon) {
|
||||
::DestroyIcon(mIcon);
|
||||
mIcon = NULL;
|
||||
mIcon = nullptr;
|
||||
}
|
||||
|
||||
// We need to ensure that proxy window disappears or else Bad Things happen.
|
||||
|
@ -45,16 +45,15 @@ TaskbarTabPreview::~TaskbarTabPreview() {
|
|||
if (IsWindowAvailable()) {
|
||||
DetachFromNSWindow();
|
||||
} else {
|
||||
mWnd = NULL;
|
||||
mWnd = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
nsresult
|
||||
TaskbarTabPreview::ShowActive(bool active) {
|
||||
NS_ASSERTION(mVisible && CanMakeTaskbarCalls(), "ShowActive called on invisible window or before taskbar calls can be made for this window");
|
||||
return FAILED(mTaskbar->SetTabActive(active ? mProxyWindow : NULL, mWnd, 0))
|
||||
? NS_ERROR_FAILURE
|
||||
: NS_OK;
|
||||
return FAILED(mTaskbar->SetTabActive(active ? mProxyWindow : nullptr,
|
||||
mWnd, 0)) ? NS_ERROR_FAILURE : NS_OK;
|
||||
}
|
||||
|
||||
HWND &
|
||||
|
@ -88,7 +87,7 @@ TaskbarTabPreview::SetTitle(const nsAString &aTitle) {
|
|||
|
||||
NS_IMETHODIMP
|
||||
TaskbarTabPreview::SetIcon(imgIContainer *icon) {
|
||||
HICON hIcon = NULL;
|
||||
HICON hIcon = nullptr;
|
||||
if (icon) {
|
||||
nsresult rv;
|
||||
rv = nsWindowGfx::CreateIcon(icon, false, 0, 0,
|
||||
|
@ -211,7 +210,7 @@ TaskbarTabPreview::GlobalWndProc(HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lPa
|
|||
nsresult
|
||||
TaskbarTabPreview::Enable() {
|
||||
WNDCLASSW wc;
|
||||
HINSTANCE module = GetModuleHandle(NULL);
|
||||
HINSTANCE module = GetModuleHandle(nullptr);
|
||||
|
||||
if (!GetClassInfoW(module, kWindowClass, &wc)) {
|
||||
wc.style = 0;
|
||||
|
@ -219,15 +218,16 @@ TaskbarTabPreview::Enable() {
|
|||
wc.cbClsExtra = 0;
|
||||
wc.cbWndExtra = 0;
|
||||
wc.hInstance = module;
|
||||
wc.hIcon = NULL;
|
||||
wc.hCursor = NULL;
|
||||
wc.hbrBackground = (HBRUSH) NULL;
|
||||
wc.lpszMenuName = (LPCWSTR) NULL;
|
||||
wc.hIcon = nullptr;
|
||||
wc.hCursor = nullptr;
|
||||
wc.hbrBackground = (HBRUSH) nullptr;
|
||||
wc.lpszMenuName = (LPCWSTR) nullptr;
|
||||
wc.lpszClassName = kWindowClass;
|
||||
RegisterClassW(&wc);
|
||||
}
|
||||
::CreateWindowW(kWindowClass, L"TaskbarPreviewWindow",
|
||||
WS_CAPTION | WS_SYSMENU, 0, 0, 200, 60, NULL, NULL, module, this);
|
||||
WS_CAPTION | WS_SYSMENU, 0, 0, 200, 60,
|
||||
nullptr, nullptr, module, this);
|
||||
// GlobalWndProc will set mProxyWindow so that WM_CREATE can have a valid HWND
|
||||
if (!mProxyWindow)
|
||||
return NS_ERROR_INVALID_ARG;
|
||||
|
@ -262,7 +262,7 @@ TaskbarTabPreview::Disable() {
|
|||
// TaskbarPreview::WndProc will set mProxyWindow to null
|
||||
if (!DestroyWindow(mProxyWindow))
|
||||
return NS_ERROR_FAILURE;
|
||||
mProxyWindow = NULL;
|
||||
mProxyWindow = nullptr;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
@ -330,7 +330,7 @@ TaskbarTabPreview::UpdateIcon() {
|
|||
nsresult
|
||||
TaskbarTabPreview::UpdateNext() {
|
||||
NS_ASSERTION(CanMakeTaskbarCalls() && mVisible, "UpdateNext called on invisible tab preview");
|
||||
HWND hNext = NULL;
|
||||
HWND hNext = nullptr;
|
||||
if (mNext) {
|
||||
bool visible;
|
||||
nsresult rv = mNext->GetVisible(&visible);
|
||||
|
|
|
@ -51,7 +51,7 @@ TaskbarWindowPreview::TaskbarWindowPreview(ITaskbarList4 *aTaskbar, nsITaskbarPr
|
|||
mState(TBPF_NOPROGRESS),
|
||||
mCurrentValue(0),
|
||||
mMaxValue(0),
|
||||
mOverlayIcon(NULL)
|
||||
mOverlayIcon(nullptr)
|
||||
{
|
||||
// Window previews are visible by default
|
||||
(void) SetVisible(true);
|
||||
|
@ -72,19 +72,19 @@ TaskbarWindowPreview::TaskbarWindowPreview(ITaskbarList4 *aTaskbar, nsITaskbarPr
|
|||
TaskbarWindowPreview::~TaskbarWindowPreview() {
|
||||
if (mOverlayIcon) {
|
||||
::DestroyIcon(mOverlayIcon);
|
||||
mOverlayIcon = NULL;
|
||||
mOverlayIcon = nullptr;
|
||||
}
|
||||
|
||||
if (IsWindowAvailable()) {
|
||||
DetachFromNSWindow();
|
||||
} else {
|
||||
mWnd = NULL;
|
||||
mWnd = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
nsresult
|
||||
TaskbarWindowPreview::ShowActive(bool active) {
|
||||
return FAILED(mTaskbar->ActivateTab(active ? mWnd : NULL))
|
||||
return FAILED(mTaskbar->ActivateTab(active ? mWnd : nullptr))
|
||||
? NS_ERROR_FAILURE
|
||||
: NS_OK;
|
||||
|
||||
|
@ -185,7 +185,7 @@ TaskbarWindowPreview::SetOverlayIcon(imgIContainer* aStatusIcon,
|
|||
NS_ENSURE_FALSE(isAnimated, NS_ERROR_INVALID_ARG);
|
||||
}
|
||||
|
||||
HICON hIcon = NULL;
|
||||
HICON hIcon = nullptr;
|
||||
if (aStatusIcon) {
|
||||
rv = nsWindowGfx::CreateIcon(aStatusIcon, false, 0, 0,
|
||||
nsWindowGfx::GetIconMetrics(nsWindowGfx::kSmallIcon),
|
||||
|
|
|
@ -28,13 +28,13 @@
|
|||
namespace {
|
||||
|
||||
// Used for signaling the background thread from the main thread.
|
||||
HANDLE sEventHandle = NULL;
|
||||
HANDLE sEventHandle = nullptr;
|
||||
|
||||
// We need a runnable in order to find the hidden window on the main
|
||||
// thread.
|
||||
class HWNDGetter : public nsRunnable {
|
||||
public:
|
||||
HWNDGetter() : hidden_window_hwnd(NULL) {
|
||||
HWNDGetter() : hidden_window_hwnd(nullptr) {
|
||||
MOZ_COUNT_CTOR(HWNDGetter);
|
||||
}
|
||||
~HWNDGetter() {
|
||||
|
@ -91,20 +91,20 @@ namespace mozilla {
|
|||
|
||||
bool InitWidgetTracing()
|
||||
{
|
||||
sEventHandle = CreateEvent(NULL, FALSE, FALSE, NULL);
|
||||
return sEventHandle != NULL;
|
||||
sEventHandle = CreateEvent(nullptr, FALSE, FALSE, nullptr);
|
||||
return sEventHandle != nullptr;
|
||||
}
|
||||
|
||||
void CleanUpWidgetTracing()
|
||||
{
|
||||
CloseHandle(sEventHandle);
|
||||
sEventHandle = NULL;
|
||||
sEventHandle = nullptr;
|
||||
}
|
||||
|
||||
// This function is called from the main (UI) thread.
|
||||
void SignalTracerThread()
|
||||
{
|
||||
if (sEventHandle != NULL)
|
||||
if (sEventHandle != nullptr)
|
||||
SetEvent(sEventHandle);
|
||||
}
|
||||
|
||||
|
@ -114,12 +114,12 @@ bool FireAndWaitForTracerEvent()
|
|||
NS_ABORT_IF_FALSE(sEventHandle, "Tracing not initialized!");
|
||||
|
||||
// First, try to find the hidden window.
|
||||
static HWND hidden_window = NULL;
|
||||
if (hidden_window == NULL) {
|
||||
static HWND hidden_window = nullptr;
|
||||
if (hidden_window == nullptr) {
|
||||
hidden_window = GetHiddenWindowHWND();
|
||||
}
|
||||
|
||||
if (hidden_window == NULL)
|
||||
if (hidden_window == nullptr)
|
||||
return false;
|
||||
|
||||
// Post the tracer message into the hidden window's message queue,
|
||||
|
|
|
@ -1163,7 +1163,7 @@ MouseScrollHandler::Device::Elantech::GetDriverMajorVersion()
|
|||
// or at the start of the string.
|
||||
for (PRUnichar* p = buf; *p; p++) {
|
||||
if (*p >= L'0' && *p <= L'9' && (p == buf || *(p - 1) == L' ')) {
|
||||
return wcstol(p, NULL, 10);
|
||||
return wcstol(p, nullptr, 10);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1400,11 +1400,11 @@ MouseScrollHandler::Device::UltraNav::IsObsoleteDriverInstalled()
|
|||
return false;
|
||||
}
|
||||
|
||||
int majorVersion = wcstol(buf, NULL, 10);
|
||||
int majorVersion = wcstol(buf, nullptr, 10);
|
||||
int minorVersion = 0;
|
||||
PRUnichar* p = wcschr(buf, L'.');
|
||||
if (p) {
|
||||
minorVersion = wcstol(p + 1, NULL, 10);
|
||||
minorVersion = wcstol(p + 1, nullptr, 10);
|
||||
}
|
||||
PR_LOG(gMouseScrollLog, PR_LOG_ALWAYS,
|
||||
("MouseScroll::Device::UltraNav::IsObsoleteDriverInstalled(): "
|
||||
|
|
|
@ -352,7 +352,7 @@ private:
|
|||
class SynthesizingEvent {
|
||||
public:
|
||||
SynthesizingEvent() :
|
||||
mWnd(NULL), mMessage(0), mWParam(0), mLParam(0),
|
||||
mWnd(nullptr), mMessage(0), mWParam(0), mLParam(0),
|
||||
mStatus(NOT_SYNTHESIZING)
|
||||
{
|
||||
}
|
||||
|
|
|
@ -1068,7 +1068,7 @@ nsIMM32Handler::HandleComposition(nsWindow* aWindow,
|
|||
// 2. Get GCS_COMPCLAUSE
|
||||
//--------------------------------------------------------
|
||||
long clauseArrayLength =
|
||||
::ImmGetCompositionStringW(aIMEContext.get(), GCS_COMPCLAUSE, NULL, 0);
|
||||
::ImmGetCompositionStringW(aIMEContext.get(), GCS_COMPCLAUSE, nullptr, 0);
|
||||
clauseArrayLength /= sizeof(uint32_t);
|
||||
|
||||
if (clauseArrayLength > 0) {
|
||||
|
@ -1116,7 +1116,7 @@ nsIMM32Handler::HandleComposition(nsWindow* aWindow,
|
|||
mClauseArray[i] = ::MultiByteToWideChar(GetKeyboardCodePage(),
|
||||
MB_PRECOMPOSED,
|
||||
(LPCSTR)compANSIStr.get(),
|
||||
len, NULL, 0);
|
||||
len, nullptr, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1135,7 +1135,7 @@ nsIMM32Handler::HandleComposition(nsWindow* aWindow,
|
|||
// This provides us with the attribute string necessary
|
||||
// for doing hiliting
|
||||
long attrArrayLength =
|
||||
::ImmGetCompositionStringW(aIMEContext.get(), GCS_COMPATTR, NULL, 0);
|
||||
::ImmGetCompositionStringW(aIMEContext.get(), GCS_COMPATTR, nullptr, 0);
|
||||
attrArrayLength /= sizeof(uint8_t);
|
||||
|
||||
if (attrArrayLength > 0) {
|
||||
|
@ -1161,7 +1161,7 @@ nsIMM32Handler::HandleComposition(nsWindow* aWindow,
|
|||
// Some IMEs (e.g., the standard IME for Korean) don't have caret position.
|
||||
if (lParam & GCS_CURSORPOS) {
|
||||
mCursorPosition =
|
||||
::ImmGetCompositionStringW(aIMEContext.get(), GCS_CURSORPOS, NULL, 0);
|
||||
::ImmGetCompositionStringW(aIMEContext.get(), GCS_CURSORPOS, nullptr, 0);
|
||||
if (mCursorPosition < 0) {
|
||||
mCursorPosition = NO_IME_CARET; // The result is error
|
||||
}
|
||||
|
@ -1678,7 +1678,7 @@ nsIMM32Handler::GetCompositionString(const nsIMEContext &aIMEContext,
|
|||
DWORD aIndex)
|
||||
{
|
||||
// Retrieve the size of the required output buffer.
|
||||
long lRtn = ::ImmGetCompositionStringW(aIMEContext.get(), aIndex, NULL, 0);
|
||||
long lRtn = ::ImmGetCompositionStringW(aIMEContext.get(), aIndex, nullptr, 0);
|
||||
if (lRtn < 0 ||
|
||||
!mCompositionString.SetLength((lRtn / sizeof(WCHAR)) + 1, mozilla::fallible_t())) {
|
||||
PR_LOG(gIMM32Log, PR_LOG_ALWAYS,
|
||||
|
@ -1744,7 +1744,7 @@ nsIMM32Handler::ConvertToANSIString(const nsAFlatString& aStr, UINT aCodePage,
|
|||
{
|
||||
int len = ::WideCharToMultiByte(aCodePage, 0,
|
||||
(LPCWSTR)aStr.get(), aStr.Length(),
|
||||
NULL, 0, NULL, NULL);
|
||||
nullptr, 0, nullptr, nullptr);
|
||||
NS_ENSURE_TRUE(len >= 0, false);
|
||||
|
||||
if (!aANSIStr.SetLength(len, mozilla::fallible_t())) {
|
||||
|
@ -1753,7 +1753,7 @@ nsIMM32Handler::ConvertToANSIString(const nsAFlatString& aStr, UINT aCodePage,
|
|||
return false;
|
||||
}
|
||||
::WideCharToMultiByte(aCodePage, 0, (LPCWSTR)aStr.get(), aStr.Length(),
|
||||
(LPSTR)aANSIStr.BeginWriting(), len, NULL, NULL);
|
||||
(LPSTR)aANSIStr.BeginWriting(), len, nullptr, nullptr);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -72,11 +72,11 @@ public:
|
|||
if (mIMC) {
|
||||
return false;
|
||||
}
|
||||
if (!::ImmAssociateContextEx(mWnd, NULL, IACE_DEFAULT)) {
|
||||
if (!::ImmAssociateContextEx(mWnd, nullptr, IACE_DEFAULT)) {
|
||||
return false;
|
||||
}
|
||||
mIMC = ::ImmGetContext(mWnd);
|
||||
return (mIMC != NULL);
|
||||
return (mIMC != nullptr);
|
||||
}
|
||||
|
||||
bool Disassociate()
|
||||
|
@ -84,11 +84,11 @@ public:
|
|||
if (!mIMC) {
|
||||
return false;
|
||||
}
|
||||
if (!::ImmAssociateContextEx(mWnd, NULL, 0)) {
|
||||
if (!::ImmAssociateContextEx(mWnd, nullptr, 0)) {
|
||||
return false;
|
||||
}
|
||||
::ImmReleaseContext(mWnd, mIMC);
|
||||
mIMC = NULL;
|
||||
mIMC = nullptr;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -430,9 +430,9 @@ nsLookAndFeel::GetIntImpl(IntID aID, int32_t &aResult)
|
|||
aResult = 0;
|
||||
{
|
||||
// Get task bar window handle
|
||||
HWND shellWindow = FindWindowW(L"Shell_TrayWnd", NULL);
|
||||
HWND shellWindow = FindWindowW(L"Shell_TrayWnd", nullptr);
|
||||
|
||||
if (shellWindow != NULL)
|
||||
if (shellWindow != nullptr)
|
||||
{
|
||||
// Determine position
|
||||
APPBARDATA appBarData;
|
||||
|
@ -531,7 +531,7 @@ GetSysFontInfo(HDC aHDC, LookAndFeel::FontID anID,
|
|||
nsString &aFontName,
|
||||
gfxFontStyle &aFontStyle)
|
||||
{
|
||||
LOGFONTW* ptrLogFont = NULL;
|
||||
LOGFONTW* ptrLogFont = nullptr;
|
||||
LOGFONTW logFont;
|
||||
NONCLIENTMETRICSW ncm;
|
||||
HGDIOBJ hGDI;
|
||||
|
@ -660,9 +660,9 @@ nsLookAndFeel::GetFontImpl(FontID anID, nsString &aFontName,
|
|||
gfxFontStyle &aFontStyle,
|
||||
float aDevPixPerCSSPixel)
|
||||
{
|
||||
HDC tdc = GetDC(NULL);
|
||||
HDC tdc = GetDC(nullptr);
|
||||
bool status = GetSysFontInfo(tdc, anID, aFontName, aFontStyle);
|
||||
ReleaseDC(NULL, tdc);
|
||||
ReleaseDC(nullptr, tdc);
|
||||
// now convert the logical font size from GetSysFontInfo into device pixels for layout
|
||||
aFontStyle.size *= aDevPixPerCSSPixel;
|
||||
return status;
|
||||
|
|
|
@ -32,12 +32,12 @@ nsNativeDragSource::~nsNativeDragSource()
|
|||
STDMETHODIMP
|
||||
nsNativeDragSource::QueryInterface(REFIID riid, void** ppv)
|
||||
{
|
||||
*ppv=NULL;
|
||||
*ppv=nullptr;
|
||||
|
||||
if (IID_IUnknown==riid || IID_IDropSource==riid)
|
||||
*ppv=this;
|
||||
|
||||
if (NULL!=*ppv) {
|
||||
if (nullptr!=*ppv) {
|
||||
((LPUNKNOWN)*ppv)->AddRef();
|
||||
return S_OK;
|
||||
}
|
||||
|
|
|
@ -62,12 +62,12 @@ nsNativeDragTarget::~nsNativeDragTarget()
|
|||
STDMETHODIMP
|
||||
nsNativeDragTarget::QueryInterface(REFIID riid, void** ppv)
|
||||
{
|
||||
*ppv=NULL;
|
||||
*ppv=nullptr;
|
||||
|
||||
if (IID_IUnknown == riid || IID_IDropTarget == riid)
|
||||
*ppv=this;
|
||||
|
||||
if (NULL!=*ppv) {
|
||||
if (nullptr!=*ppv) {
|
||||
((LPUNKNOWN)*ppv)->AddRef();
|
||||
return S_OK;
|
||||
}
|
||||
|
@ -165,7 +165,7 @@ nsNativeDragTarget::DispatchDragDropEvent(uint32_t aEventType, POINTL aPT)
|
|||
cpos.x = aPT.x;
|
||||
cpos.y = aPT.y;
|
||||
|
||||
if (mHWnd != NULL) {
|
||||
if (mHWnd != nullptr) {
|
||||
::ScreenToClient(mHWnd, &cpos);
|
||||
event.refPoint.x = cpos.x;
|
||||
event.refPoint.y = cpos.y;
|
||||
|
@ -455,7 +455,7 @@ IDropTargetHelper*
|
|||
nsNativeDragTarget::GetDropTargetHelper()
|
||||
{
|
||||
if (!mDropTargetHelper) {
|
||||
CoCreateInstance(CLSID_DragDropHelper, NULL, CLSCTX_INPROC_SERVER,
|
||||
CoCreateInstance(CLSID_DragDropHelper, nullptr, CLSCTX_INPROC_SERVER,
|
||||
IID_IDropTargetHelper, (LPVOID*)&mDropTargetHelper);
|
||||
}
|
||||
|
||||
|
|
|
@ -119,7 +119,7 @@ GetCheckboxMargins(HANDLE theme, HDC hdc)
|
|||
{
|
||||
MARGINS checkboxContent = {0};
|
||||
GetThemeMargins(theme, hdc, MENU_POPUPCHECK, MCB_NORMAL,
|
||||
TMT_CONTENTMARGINS, NULL, &checkboxContent);
|
||||
TMT_CONTENTMARGINS, nullptr, &checkboxContent);
|
||||
return checkboxContent;
|
||||
}
|
||||
|
||||
|
@ -128,7 +128,7 @@ GetCheckboxBGSize(HANDLE theme, HDC hdc)
|
|||
{
|
||||
SIZE checkboxSize;
|
||||
GetThemePartSize(theme, hdc, MENU_POPUPCHECK, MC_CHECKMARKNORMAL,
|
||||
NULL, TS_TRUE, &checkboxSize);
|
||||
nullptr, TS_TRUE, &checkboxSize);
|
||||
|
||||
MARGINS checkboxMargins = GetCheckboxMargins(theme, hdc);
|
||||
|
||||
|
@ -151,9 +151,9 @@ GetCheckboxBGBounds(HANDLE theme, HDC hdc)
|
|||
MARGINS checkboxBGSizing = {0};
|
||||
MARGINS checkboxBGContent = {0};
|
||||
GetThemeMargins(theme, hdc, MENU_POPUPCHECKBACKGROUND, MCB_NORMAL,
|
||||
TMT_SIZINGMARGINS, NULL, &checkboxBGSizing);
|
||||
TMT_SIZINGMARGINS, nullptr, &checkboxBGSizing);
|
||||
GetThemeMargins(theme, hdc, MENU_POPUPCHECKBACKGROUND, MCB_NORMAL,
|
||||
TMT_CONTENTMARGINS, NULL, &checkboxBGContent);
|
||||
TMT_CONTENTMARGINS, nullptr, &checkboxBGContent);
|
||||
|
||||
#define posdx(d) ((d) > 0 ? d : 0)
|
||||
|
||||
|
@ -178,12 +178,12 @@ static SIZE
|
|||
GetGutterSize(HANDLE theme, HDC hdc)
|
||||
{
|
||||
SIZE gutterSize;
|
||||
GetThemePartSize(theme, hdc, MENU_POPUPGUTTER, 0, NULL, TS_TRUE, &gutterSize);
|
||||
GetThemePartSize(theme, hdc, MENU_POPUPGUTTER, 0, nullptr, TS_TRUE, &gutterSize);
|
||||
|
||||
SIZE checkboxBGSize(GetCheckboxBGBounds(theme, hdc));
|
||||
|
||||
SIZE itemSize;
|
||||
GetThemePartSize(theme, hdc, MENU_POPUPITEM, MPI_NORMAL, NULL, TS_TRUE, &itemSize);
|
||||
GetThemePartSize(theme, hdc, MENU_POPUPITEM, MPI_NORMAL, nullptr, TS_TRUE, &itemSize);
|
||||
|
||||
// Figure out how big the menuitem's icon will be (if present) at current DPI
|
||||
double scaleFactor = nsIWidget::DefaultScaleOverride();
|
||||
|
@ -197,7 +197,7 @@ GetGutterSize(HANDLE theme, HDC hdc)
|
|||
// Not really sure what margins should be used here, but this seems to work in practice...
|
||||
MARGINS margins = {0};
|
||||
GetThemeMargins(theme, hdc, MENU_POPUPCHECKBACKGROUND, MCB_NORMAL,
|
||||
TMT_CONTENTMARGINS, NULL, &margins);
|
||||
TMT_CONTENTMARGINS, nullptr, &margins);
|
||||
iconSize.cx += margins.cxLeftWidth + margins.cxRightWidth;
|
||||
iconSize.cy += margins.cyTopHeight + margins.cyBottomHeight;
|
||||
|
||||
|
@ -255,7 +255,7 @@ DrawThemeBGRTLAware(HANDLE aTheme, HDC aHdc, int aPart, int aState,
|
|||
newWRect.right = bitmap.bmWidth - (aWidgetRect->left + 2*vpOrg.x);
|
||||
|
||||
RECT newCRect;
|
||||
RECT *newCRectPtr = NULL;
|
||||
RECT *newCRectPtr = nullptr;
|
||||
|
||||
if (aClipRect) {
|
||||
newCRect.top = aClipRect->top;
|
||||
|
@ -736,7 +736,7 @@ nsNativeThemeWin::GetTheme(uint8_t aWidgetType)
|
|||
case NS_THEME_TOOLTIP:
|
||||
// XP/2K3 should force a classic treatment of tooltips
|
||||
return WinUtils::GetWindowsVersion() < WinUtils::VISTA_VERSION ?
|
||||
NULL : nsUXThemeData::GetTheme(eUXTooltip);
|
||||
nullptr : nsUXThemeData::GetTheme(eUXTooltip);
|
||||
case NS_THEME_TOOLBOX:
|
||||
return nsUXThemeData::GetTheme(eUXRebar);
|
||||
case NS_THEME_WIN_MEDIA_TOOLBOX:
|
||||
|
@ -823,7 +823,7 @@ nsNativeThemeWin::GetTheme(uint8_t aWidgetType)
|
|||
case NS_THEME_WIN_BORDERLESS_GLASS:
|
||||
return nsUXThemeData::GetTheme(eUXWindowFrame);
|
||||
}
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
int32_t
|
||||
|
@ -1746,7 +1746,7 @@ RENDER_AGAIN:
|
|||
{
|
||||
DrawThemeBackground(theme, hdc, MENU_POPUPBORDERS, /* state */ 0, &widgetRect, &clipRect);
|
||||
SIZE borderSize;
|
||||
GetThemePartSize(theme, hdc, MENU_POPUPBORDERS, 0, NULL, TS_TRUE, &borderSize);
|
||||
GetThemePartSize(theme, hdc, MENU_POPUPBORDERS, 0, nullptr, TS_TRUE, &borderSize);
|
||||
|
||||
RECT bgRect = widgetRect;
|
||||
bgRect.top += borderSize.cy;
|
||||
|
@ -1831,9 +1831,9 @@ RENDER_AGAIN:
|
|||
|
||||
uint8_t id = SaveDC(hdc);
|
||||
|
||||
::SelectClipRgn(hdc, NULL);
|
||||
::SelectClipRgn(hdc, nullptr);
|
||||
::GetViewportOrgEx(hdc, &vpOrg);
|
||||
::SetBrushOrgEx(hdc, vpOrg.x + widgetRect.left, vpOrg.y + widgetRect.top, NULL);
|
||||
::SetBrushOrgEx(hdc, vpOrg.x + widgetRect.left, vpOrg.y + widgetRect.top, nullptr);
|
||||
|
||||
// On vista, choose our own colors and draw an XP style half focus rect
|
||||
// for focused checkboxes and a full rect when active.
|
||||
|
@ -1844,18 +1844,18 @@ RENDER_AGAIN:
|
|||
lb.lbColor = RGB(255,255,255);
|
||||
lb.lbHatch = 0;
|
||||
|
||||
hPen = ::ExtCreatePen(PS_COSMETIC|PS_ALTERNATE, 1, &lb, 0, NULL);
|
||||
hPen = ::ExtCreatePen(PS_COSMETIC|PS_ALTERNATE, 1, &lb, 0, nullptr);
|
||||
::SelectObject(hdc, hPen);
|
||||
|
||||
// If pressed, draw the upper left corner of the dotted rect.
|
||||
if (contentState.HasState(NS_EVENT_STATE_ACTIVE)) {
|
||||
::MoveToEx(hdc, widgetRect.left, widgetRect.bottom-1, NULL);
|
||||
::MoveToEx(hdc, widgetRect.left, widgetRect.bottom-1, nullptr);
|
||||
::LineTo(hdc, widgetRect.left, widgetRect.top);
|
||||
::LineTo(hdc, widgetRect.right-1, widgetRect.top);
|
||||
}
|
||||
|
||||
// Draw the lower right corner of the dotted rect.
|
||||
::MoveToEx(hdc, widgetRect.right-1, widgetRect.top, NULL);
|
||||
::MoveToEx(hdc, widgetRect.right-1, widgetRect.top, nullptr);
|
||||
::LineTo(hdc, widgetRect.right-1, widgetRect.bottom-1);
|
||||
::LineTo(hdc, widgetRect.left, widgetRect.bottom-1);
|
||||
} else {
|
||||
|
@ -1876,7 +1876,7 @@ RENDER_AGAIN:
|
|||
return NS_ERROR_FAILURE;
|
||||
|
||||
widgetRect.bottom = widgetRect.top + TB_SEPARATOR_HEIGHT;
|
||||
DrawThemeEdge(theme, hdc, RP_BAND, 0, &widgetRect, EDGE_ETCHED, BF_TOP, NULL);
|
||||
DrawThemeEdge(theme, hdc, RP_BAND, 0, &widgetRect, EDGE_ETCHED, BF_TOP, nullptr);
|
||||
}
|
||||
else if (aWidgetType == NS_THEME_SCROLLBAR_THUMB_HORIZONTAL ||
|
||||
aWidgetType == NS_THEME_SCROLLBAR_THUMB_VERTICAL)
|
||||
|
@ -1888,8 +1888,8 @@ RENDER_AGAIN:
|
|||
int gripPart = (aWidgetType == NS_THEME_SCROLLBAR_THUMB_HORIZONTAL) ?
|
||||
SP_GRIPPERHOR : SP_GRIPPERVERT;
|
||||
|
||||
if (GetThemePartSize(theme, hdc, gripPart, state, NULL, TS_TRUE, &gripSize) == S_OK &&
|
||||
GetThemeMargins(theme, hdc, part, state, TMT_CONTENTMARGINS, NULL, &thumbMgns) == S_OK &&
|
||||
if (GetThemePartSize(theme, hdc, gripPart, state, nullptr, TS_TRUE, &gripSize) == S_OK &&
|
||||
GetThemeMargins(theme, hdc, part, state, TMT_CONTENTMARGINS, nullptr, &thumbMgns) == S_OK &&
|
||||
gripSize.cx + thumbMgns.cxLeftWidth + thumbMgns.cxRightWidth <= widgetRect.right - widgetRect.left &&
|
||||
gripSize.cy + thumbMgns.cyTopHeight + thumbMgns.cyBottomHeight <= widgetRect.bottom - widgetRect.top)
|
||||
{
|
||||
|
@ -1990,7 +1990,7 @@ nsNativeThemeWin::GetWidgetBorder(nsDeviceContext* aContext,
|
|||
outerRect.top = outerRect.left = 100;
|
||||
outerRect.right = outerRect.bottom = 200;
|
||||
RECT contentRect(outerRect);
|
||||
HRESULT res = GetThemeBackgroundContentRect(theme, NULL, part, state, &outerRect, &contentRect);
|
||||
HRESULT res = GetThemeBackgroundContentRect(theme, nullptr, part, state, &outerRect, &contentRect);
|
||||
|
||||
if (FAILED(res))
|
||||
return NS_ERROR_FAILURE;
|
||||
|
@ -2079,7 +2079,7 @@ nsNativeThemeWin::GetWidgetPadding(nsDeviceContext* aContext,
|
|||
if (aWidgetType == NS_THEME_MENUPOPUP)
|
||||
{
|
||||
SIZE popupSize;
|
||||
GetThemePartSize(theme, NULL, MENU_POPUPBORDERS, /* state */ 0, NULL, TS_TRUE, &popupSize);
|
||||
GetThemePartSize(theme, nullptr, MENU_POPUPBORDERS, /* state */ 0, nullptr, TS_TRUE, &popupSize);
|
||||
aResult->top = aResult->bottom = popupSize.cy;
|
||||
aResult->left = aResult->right = popupSize.cx;
|
||||
return true;
|
||||
|
@ -2134,13 +2134,13 @@ nsNativeThemeWin::GetWidgetPadding(nsDeviceContext* aContext,
|
|||
// There seem to be exactly 4 pixels from the edge
|
||||
// of the gutter to the text: 2px margin (CSS) + 2px padding (here)
|
||||
{
|
||||
SIZE size(GetGutterSize(theme, NULL));
|
||||
SIZE size(GetGutterSize(theme, nullptr));
|
||||
left = size.cx + 2;
|
||||
}
|
||||
break;
|
||||
case NS_THEME_MENUSEPARATOR:
|
||||
{
|
||||
SIZE size(GetGutterSize(theme, NULL));
|
||||
SIZE size(GetGutterSize(theme, nullptr));
|
||||
left = size.cx + 5;
|
||||
top = 10;
|
||||
bottom = 7;
|
||||
|
@ -2258,7 +2258,7 @@ nsNativeThemeWin::GetMinimumWidgetSize(nsRenderingContext* aContext, nsIFrame* a
|
|||
case NS_THEME_RADIOMENUITEM:
|
||||
if(!IsTopLevelMenu(aFrame))
|
||||
{
|
||||
SIZE gutterSize(GetGutterSize(theme, NULL));
|
||||
SIZE gutterSize(GetGutterSize(theme, nullptr));
|
||||
aResult->width = gutterSize.cx;
|
||||
aResult->height = gutterSize.cy;
|
||||
return NS_OK;
|
||||
|
@ -2269,7 +2269,7 @@ nsNativeThemeWin::GetMinimumWidgetSize(nsRenderingContext* aContext, nsIFrame* a
|
|||
case NS_THEME_MENUCHECKBOX:
|
||||
case NS_THEME_MENURADIO:
|
||||
{
|
||||
SIZE boxSize(GetGutterSize(theme, NULL));
|
||||
SIZE boxSize(GetGutterSize(theme, nullptr));
|
||||
aResult->width = boxSize.cx+2;
|
||||
aResult->height = boxSize.cy;
|
||||
*aIsOverridable = false;
|
||||
|
@ -2414,7 +2414,7 @@ nsNativeThemeWin::GetMinimumWidgetSize(nsRenderingContext* aContext, nsIFrame* a
|
|||
return NS_ERROR_FAILURE;
|
||||
|
||||
SIZE sz;
|
||||
GetThemePartSize(theme, hdc, part, state, NULL, sizeReq, &sz);
|
||||
GetThemePartSize(theme, hdc, part, state, nullptr, sizeReq, &sz);
|
||||
aResult->width = sz.cx;
|
||||
aResult->height = sz.cy;
|
||||
|
||||
|
@ -2535,7 +2535,7 @@ nsNativeThemeWin::ThemeSupportsWidget(nsPresContext* aPresContext,
|
|||
if (aPresContext && !aPresContext->PresShell()->IsThemeSupportEnabled())
|
||||
return false;
|
||||
|
||||
HANDLE theme = NULL;
|
||||
HANDLE theme = nullptr;
|
||||
if (aWidgetType == NS_THEME_CHECKBOX_CONTAINER)
|
||||
theme = GetTheme(NS_THEME_CHECKBOX);
|
||||
else if (aWidgetType == NS_THEME_RADIO_CONTAINER)
|
||||
|
@ -3406,7 +3406,7 @@ static void DrawMenuImage(HDC hdc, const RECT& rc, int32_t aComponent, uint32_t
|
|||
int checkW = ::GetSystemMetrics(SM_CXMENUCHECK);
|
||||
int checkH = ::GetSystemMetrics(SM_CYMENUCHECK);
|
||||
|
||||
HBITMAP hMonoBitmap = ::CreateBitmap(checkW, checkH, 1, 1, NULL);
|
||||
HBITMAP hMonoBitmap = ::CreateBitmap(checkW, checkH, 1, 1, nullptr);
|
||||
if (hMonoBitmap) {
|
||||
|
||||
HBITMAP hPrevBitmap = (HBITMAP) ::SelectObject(hMemoryDC, hMonoBitmap);
|
||||
|
@ -3458,7 +3458,7 @@ void nsNativeThemeWin::DrawCheckedRect(HDC hdc, const RECT& rc, int32_t fore, in
|
|||
|
||||
::UnrealizeObject(brush);
|
||||
::GetViewportOrgEx(hdc, &vpOrg);
|
||||
::SetBrushOrgEx(hdc, vpOrg.x + rc.left, vpOrg.y + rc.top, NULL);
|
||||
::SetBrushOrgEx(hdc, vpOrg.x + rc.left, vpOrg.y + rc.top, nullptr);
|
||||
HBRUSH oldBrush = (HBRUSH) ::SelectObject(hdc, brush);
|
||||
::FillRect(hdc, &rc, brush);
|
||||
::SetTextColor(hdc, oldForeColor);
|
||||
|
@ -3547,7 +3547,7 @@ RENDER_AGAIN:
|
|||
// setup DC to make DrawFocusRect draw correctly
|
||||
POINT vpOrg;
|
||||
::GetViewportOrgEx(hdc, &vpOrg);
|
||||
::SetBrushOrgEx(hdc, vpOrg.x + widgetRect.left, vpOrg.y + widgetRect.top, NULL);
|
||||
::SetBrushOrgEx(hdc, vpOrg.x + widgetRect.left, vpOrg.y + widgetRect.top, nullptr);
|
||||
int32_t oldColor;
|
||||
oldColor = ::SetTextColor(hdc, 0);
|
||||
// draw focus rectangle
|
||||
|
|
|
@ -105,7 +105,7 @@ NS_IMETHODIMP nsPrintSettingsWin::SetDevMode(DEVMODEW * aDevMode)
|
|||
{
|
||||
if (mDevMode) {
|
||||
::HeapFree(::GetProcessHeap(), 0, mDevMode);
|
||||
mDevMode = NULL;
|
||||
mDevMode = nullptr;
|
||||
}
|
||||
|
||||
if (aDevMode) {
|
||||
|
|
|
@ -78,7 +78,8 @@ nsSoundPlayer::Run()
|
|||
PR_SetCurrentThreadName("Play Sound");
|
||||
|
||||
NS_PRECONDITION(!mSoundName.IsEmpty(), "Sound name should not be empty");
|
||||
::PlaySoundW(mSoundName.get(), NULL, SND_NODEFAULT | SND_ALIAS | SND_ASYNC);
|
||||
::PlaySoundW(mSoundName.get(), nullptr,
|
||||
SND_NODEFAULT | SND_ALIAS | SND_ASYNC);
|
||||
nsCOMPtr<nsIRunnable> releaser = new SoundReleaser(mSound);
|
||||
// Don't release nsSound from here, because here is not an owning thread of
|
||||
// the nsSound. nsSound must be released in its owning thread.
|
||||
|
|
|
@ -80,7 +80,7 @@ public:
|
|||
|
||||
STDMETHODIMP QueryInterface(REFIID riid, void** ppv)
|
||||
{
|
||||
*ppv=NULL;
|
||||
*ppv=nullptr;
|
||||
if ( (IID_IUnknown == riid) || (IID_ITfInputScope == riid) ) {
|
||||
*ppv = static_cast<ITfInputScope*>(this);
|
||||
}
|
||||
|
@ -130,15 +130,15 @@ private:
|
|||
/* nsTextStore */
|
||||
/******************************************************************/
|
||||
|
||||
ITfThreadMgr* nsTextStore::sTsfThreadMgr = NULL;
|
||||
ITfMessagePump* nsTextStore::sMessagePump = NULL;
|
||||
ITfKeystrokeMgr* nsTextStore::sKeystrokeMgr = NULL;
|
||||
ITfDisplayAttributeMgr* nsTextStore::sDisplayAttrMgr = NULL;
|
||||
ITfCategoryMgr* nsTextStore::sCategoryMgr = NULL;
|
||||
ITfDocumentMgr* nsTextStore::sTsfDisabledDocumentMgr = NULL;
|
||||
ITfContext* nsTextStore::sTsfDisabledContext = NULL;
|
||||
ITfThreadMgr* nsTextStore::sTsfThreadMgr = nullptr;
|
||||
ITfMessagePump* nsTextStore::sMessagePump = nullptr;
|
||||
ITfKeystrokeMgr* nsTextStore::sKeystrokeMgr = nullptr;
|
||||
ITfDisplayAttributeMgr* nsTextStore::sDisplayAttrMgr = nullptr;
|
||||
ITfCategoryMgr* nsTextStore::sCategoryMgr = nullptr;
|
||||
ITfDocumentMgr* nsTextStore::sTsfDisabledDocumentMgr = nullptr;
|
||||
ITfContext* nsTextStore::sTsfDisabledContext = nullptr;
|
||||
DWORD nsTextStore::sTsfClientId = 0;
|
||||
nsTextStore* nsTextStore::sTsfTextStore = NULL;
|
||||
nsTextStore* nsTextStore::sTsfTextStore = nullptr;
|
||||
|
||||
UINT nsTextStore::sFlushTIPInputMessage = 0;
|
||||
|
||||
|
@ -560,7 +560,7 @@ nsTextStore::Create(nsWindowBase* aWidget)
|
|||
PR_LOG(sTextStoreLog, PR_LOG_ERROR,
|
||||
("TSF: 0x%p nsTextStore::Create() FAILED to create the context "
|
||||
"(0x%08X)", this, hr));
|
||||
mDocumentMgr = NULL;
|
||||
mDocumentMgr = nullptr;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -570,8 +570,8 @@ nsTextStore::Create(nsWindowBase* aWidget)
|
|||
("TSF: 0x%p nsTextStore::Create() FAILED to push the context (0x%08X)",
|
||||
this, hr));
|
||||
// XXX Why don't we use NS_IF_RELEASE() here??
|
||||
mContext = NULL;
|
||||
mDocumentMgr = NULL;
|
||||
mContext = nullptr;
|
||||
mDocumentMgr = nullptr;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -604,12 +604,12 @@ nsTextStore::Destroy(void)
|
|||
::DispatchMessageW(&msg);
|
||||
}
|
||||
}
|
||||
mContext = NULL;
|
||||
mContext = nullptr;
|
||||
if (mDocumentMgr) {
|
||||
mDocumentMgr->Pop(TF_POPF_ALL);
|
||||
mDocumentMgr = NULL;
|
||||
mDocumentMgr = nullptr;
|
||||
}
|
||||
mSink = NULL;
|
||||
mSink = nullptr;
|
||||
mWidget = nullptr;
|
||||
|
||||
PR_LOG(sTextStoreLog, PR_LOG_ALWAYS,
|
||||
|
@ -621,7 +621,7 @@ STDMETHODIMP
|
|||
nsTextStore::QueryInterface(REFIID riid,
|
||||
void** ppv)
|
||||
{
|
||||
*ppv=NULL;
|
||||
*ppv=nullptr;
|
||||
if ( (IID_IUnknown == riid) || (IID_ITextStoreACP == riid) ) {
|
||||
*ppv = static_cast<ITextStoreACP*>(this);
|
||||
} else if (IID_ITfContextOwnerCompositionSink == riid) {
|
||||
|
@ -734,7 +734,7 @@ nsTextStore::UnadviseSink(IUnknown *punk)
|
|||
"the sink being different from the stored sink", this));
|
||||
return CONNECT_E_NOCONNECTION;
|
||||
}
|
||||
mSink = NULL;
|
||||
mSink = nullptr;
|
||||
mSinkMask = 0;
|
||||
return S_OK;
|
||||
}
|
||||
|
@ -1319,7 +1319,7 @@ nsTextStore::GetDisplayAttribute(ITfProperty* aAttrProperty,
|
|||
NS_ENSURE_TRUE(sDisplayAttrMgr, E_FAIL);
|
||||
nsRefPtr<ITfDisplayAttributeInfo> info;
|
||||
hr = sDisplayAttrMgr->GetDisplayAttributeInfo(guid, getter_AddRefs(info),
|
||||
NULL);
|
||||
nullptr);
|
||||
if (FAILED(hr) || !info) {
|
||||
PR_LOG(sTextStoreLog, PR_LOG_ERROR,
|
||||
("TSF: 0x%p nsTextStore::GetDisplayAttribute() FAILED due to "
|
||||
|
@ -1526,7 +1526,7 @@ nsTextStore::RecordCompositionUpdateAction()
|
|||
textRanges.AppendElement(newRange);
|
||||
|
||||
nsRefPtr<ITfRange> range;
|
||||
while (S_OK == enumRanges->Next(1, getter_AddRefs(range), NULL) && range) {
|
||||
while (S_OK == enumRanges->Next(1, getter_AddRefs(range), nullptr) && range) {
|
||||
|
||||
LONG start = 0, length = 0;
|
||||
if (FAILED(GetRangeExtent(range, &start, &length)))
|
||||
|
@ -2907,7 +2907,7 @@ nsTextStore::OnFocusChange(bool aGotFocus,
|
|||
if (ThinksHavingFocus()) {
|
||||
DebugOnly<HRESULT> hr = sTsfThreadMgr->AssociateFocus(
|
||||
sTsfTextStore->mWidget->GetWindowHandle(),
|
||||
NULL, getter_AddRefs(prevFocusedDocumentMgr));
|
||||
nullptr, getter_AddRefs(prevFocusedDocumentMgr));
|
||||
NS_ASSERTION(SUCCEEDED(hr), "Disassociating focus failed");
|
||||
NS_ASSERTION(prevFocusedDocumentMgr == sTsfTextStore->mDocumentMgr,
|
||||
"different documentMgr has been associated with the window");
|
||||
|
@ -3078,7 +3078,7 @@ nsTextStore::CommitCompositionInternal(bool aDiscard)
|
|||
("TSF: 0x%p nsTextStore::CommitCompositionInternal(), "
|
||||
"requesting TerminateComposition() for the context 0x%p...",
|
||||
this, context.get()));
|
||||
services->TerminateComposition(NULL);
|
||||
services->TerminateComposition(nullptr);
|
||||
}
|
||||
}
|
||||
if (context != mContext)
|
||||
|
@ -3101,7 +3101,7 @@ GetCompartment(IUnknown* pUnk,
|
|||
if (!compMgr) return false;
|
||||
|
||||
return SUCCEEDED(compMgr->GetCompartment(aID, aCompartment)) &&
|
||||
(*aCompartment) != NULL;
|
||||
(*aCompartment) != nullptr;
|
||||
}
|
||||
|
||||
// static
|
||||
|
@ -3250,7 +3250,7 @@ nsTextStore::Initialize(void)
|
|||
}
|
||||
|
||||
if (!sTsfThreadMgr) {
|
||||
if (SUCCEEDED(CoCreateInstance(CLSID_TF_ThreadMgr, NULL,
|
||||
if (SUCCEEDED(CoCreateInstance(CLSID_TF_ThreadMgr, nullptr,
|
||||
CLSCTX_INPROC_SERVER, IID_ITfThreadMgr,
|
||||
reinterpret_cast<void**>(&sTsfThreadMgr)))) {
|
||||
DebugOnly<HRESULT> hr =
|
||||
|
@ -3292,7 +3292,7 @@ nsTextStore::Initialize(void)
|
|||
("TSF: nsTextStore::Initialize() is creating "
|
||||
"a display attribute manager instance..."));
|
||||
HRESULT hr =
|
||||
::CoCreateInstance(CLSID_TF_DisplayAttributeMgr, NULL,
|
||||
::CoCreateInstance(CLSID_TF_DisplayAttributeMgr, nullptr,
|
||||
CLSCTX_INPROC_SERVER, IID_ITfDisplayAttributeMgr,
|
||||
reinterpret_cast<void**>(&sDisplayAttrMgr));
|
||||
if (FAILED(hr) || !sDisplayAttrMgr) {
|
||||
|
@ -3306,7 +3306,7 @@ nsTextStore::Initialize(void)
|
|||
("TSF: nsTextStore::Initialize() is creating "
|
||||
"a category manager instance..."));
|
||||
HRESULT hr =
|
||||
::CoCreateInstance(CLSID_TF_CategoryMgr, NULL,
|
||||
::CoCreateInstance(CLSID_TF_CategoryMgr, nullptr,
|
||||
CLSCTX_INPROC_SERVER, IID_ITfCategoryMgr,
|
||||
reinterpret_cast<void**>(&sCategoryMgr));
|
||||
if (FAILED(hr) || !sCategoryMgr) {
|
||||
|
@ -3329,7 +3329,7 @@ nsTextStore::Initialize(void)
|
|||
}
|
||||
if (sTsfDisabledDocumentMgr) {
|
||||
DWORD editCookie = 0;
|
||||
hr = sTsfDisabledDocumentMgr->CreateContext(sTsfClientId, 0, NULL,
|
||||
hr = sTsfDisabledDocumentMgr->CreateContext(sTsfClientId, 0, nullptr,
|
||||
&sTsfDisabledContext,
|
||||
&editCookie);
|
||||
if (FAILED(hr) || !sTsfDisabledContext) {
|
||||
|
@ -3585,7 +3585,7 @@ nsTextStore::CurrentKeyboardLayoutHasIME()
|
|||
// ITfInputProcessorProfileMgr instance without ITfInputProcessorProfiles
|
||||
// instance.
|
||||
nsRefPtr<ITfInputProcessorProfiles> profiles;
|
||||
HRESULT hr = ::CoCreateInstance(CLSID_TF_InputProcessorProfiles, NULL,
|
||||
HRESULT hr = ::CoCreateInstance(CLSID_TF_InputProcessorProfiles, nullptr,
|
||||
CLSCTX_INPROC_SERVER,
|
||||
IID_ITfInputProcessorProfiles,
|
||||
getter_AddRefs(profiles));
|
||||
|
|
|
@ -274,7 +274,7 @@ protected:
|
|||
class Composition MOZ_FINAL
|
||||
{
|
||||
public:
|
||||
// NULL if no composition is active, otherwise the current composition
|
||||
// nullptr if no composition is active, otherwise the current composition
|
||||
nsRefPtr<ITfCompositionView> mView;
|
||||
|
||||
// Current copy of the active composition string. Only mString is
|
||||
|
|
|
@ -46,7 +46,7 @@ nsToolkit::nsToolkit()
|
|||
MOZ_COUNT_CTOR(nsToolkit);
|
||||
|
||||
#if defined(MOZ_STATIC_COMPONENT_LIBS)
|
||||
nsToolkit::Startup(GetModuleHandle(NULL));
|
||||
nsToolkit::Startup(GetModuleHandle(nullptr));
|
||||
#endif
|
||||
|
||||
gMouseTrailer = &mMouseTrailer;
|
||||
|
@ -54,7 +54,7 @@ nsToolkit::nsToolkit()
|
|||
if (XRE_GetWindowsEnvironment() == WindowsEnvironmentType_Desktop) {
|
||||
mD3D9Timer = do_CreateInstance("@mozilla.org/timer;1");
|
||||
mD3D9Timer->InitWithFuncCallback(::StartAllowingD3D9,
|
||||
NULL,
|
||||
nullptr,
|
||||
kD3DUsageDelay,
|
||||
nsITimer::TYPE_ONE_SHOT);
|
||||
}
|
||||
|
|
|
@ -22,7 +22,7 @@ HANDLE
|
|||
nsUXThemeData::sThemes[eUXNumClasses];
|
||||
|
||||
HMODULE
|
||||
nsUXThemeData::sThemeDLL = NULL;
|
||||
nsUXThemeData::sThemeDLL = nullptr;
|
||||
|
||||
bool
|
||||
nsUXThemeData::sFlatMenus = false;
|
||||
|
@ -53,7 +53,7 @@ nsUXThemeData::Invalidate() {
|
|||
for(int i = 0; i < eUXNumClasses; i++) {
|
||||
if(sThemes[i]) {
|
||||
CloseThemeData(sThemes[i]);
|
||||
sThemes[i] = NULL;
|
||||
sThemes[i] = nullptr;
|
||||
}
|
||||
}
|
||||
BOOL useFlat = FALSE;
|
||||
|
@ -66,7 +66,7 @@ nsUXThemeData::GetTheme(nsUXThemeClass cls) {
|
|||
NS_ASSERTION(cls < eUXNumClasses, "Invalid theme class!");
|
||||
if(!sThemes[cls])
|
||||
{
|
||||
sThemes[cls] = OpenThemeData(NULL, GetClassName(cls));
|
||||
sThemes[cls] = OpenThemeData(nullptr, GetClassName(cls));
|
||||
}
|
||||
return sThemes[cls];
|
||||
}
|
||||
|
@ -179,10 +179,10 @@ nsUXThemeData::UpdateTitlebarInfo(HWND aWnd)
|
|||
wc.cbClsExtra = 0;
|
||||
wc.cbWndExtra = 0;
|
||||
wc.hInstance = nsToolkit::mDllInstance;
|
||||
wc.hIcon = NULL;
|
||||
wc.hCursor = NULL;
|
||||
wc.hbrBackground = NULL;
|
||||
wc.lpszMenuName = NULL;
|
||||
wc.hIcon = nullptr;
|
||||
wc.hCursor = nullptr;
|
||||
wc.hbrBackground = nullptr;
|
||||
wc.lpszMenuName = nullptr;
|
||||
wc.lpszClassName = className.get();
|
||||
::RegisterClassW(&wc);
|
||||
|
||||
|
@ -193,8 +193,8 @@ nsUXThemeData::UpdateTitlebarInfo(HWND aWnd)
|
|||
HWND hWnd = CreateWindowExW(WS_EX_LAYERED,
|
||||
className.get(), L"",
|
||||
WS_OVERLAPPEDWINDOW,
|
||||
0, 0, 0, 0, aWnd, NULL,
|
||||
nsToolkit::mDllInstance, NULL);
|
||||
0, 0, 0, 0, aWnd, nullptr,
|
||||
nsToolkit::mDllInstance, nullptr);
|
||||
NS_ASSERTION(hWnd, "UpdateTitlebarInfo window creation failed.");
|
||||
|
||||
ShowWindow(hWnd, SW_SHOW);
|
||||
|
@ -298,7 +298,7 @@ nsUXThemeData::UpdateNativeThemeInfo()
|
|||
MAX_PATH,
|
||||
themeColor,
|
||||
MAX_PATH,
|
||||
NULL, 0))) {
|
||||
nullptr, 0))) {
|
||||
sThemeId = LookAndFeel::eWindowsTheme_Classic;
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -217,38 +217,38 @@ NS_DEFINE_NAMED_CID(NS_DEVICE_CONTEXT_SPEC_CID);
|
|||
|
||||
|
||||
static const mozilla::Module::CIDEntry kWidgetCIDs[] = {
|
||||
{ &kNS_WINDOW_CID, false, NULL, WindowConstructor },
|
||||
{ &kNS_CHILD_CID, false, NULL, ChildWindowConstructor },
|
||||
{ &kNS_FILEPICKER_CID, false, NULL, FilePickerConstructor },
|
||||
{ &kNS_COLORPICKER_CID, false, NULL, ColorPickerConstructor },
|
||||
{ &kNS_APPSHELL_CID, false, NULL, nsAppShellConstructor },
|
||||
{ &kNS_SCREENMANAGER_CID, false, NULL, nsScreenManagerWinConstructor },
|
||||
{ &kNS_GFXINFO_CID, false, NULL, GfxInfoConstructor },
|
||||
{ &kNS_THEMERENDERER_CID, false, NULL, NS_NewNativeTheme },
|
||||
{ &kNS_IDLE_SERVICE_CID, false, NULL, nsIdleServiceWinConstructor },
|
||||
{ &kNS_CLIPBOARD_CID, false, NULL, nsClipboardConstructor },
|
||||
{ &kNS_CLIPBOARDHELPER_CID, false, NULL, nsClipboardHelperConstructor },
|
||||
{ &kNS_SOUND_CID, false, NULL, nsSoundConstructor },
|
||||
{ &kNS_TRANSFERABLE_CID, false, NULL, nsTransferableConstructor },
|
||||
{ &kNS_HTMLFORMATCONVERTER_CID, false, NULL, nsHTMLFormatConverterConstructor },
|
||||
{ &kNS_WIN_TASKBAR_CID, false, NULL, WinTaskbarConstructor },
|
||||
{ &kNS_WIN_JUMPLISTBUILDER_CID, false, NULL, JumpListBuilderConstructor },
|
||||
{ &kNS_WIN_JUMPLISTITEM_CID, false, NULL, JumpListItemConstructor },
|
||||
{ &kNS_WIN_JUMPLISTSEPARATOR_CID, false, NULL, JumpListSeparatorConstructor },
|
||||
{ &kNS_WIN_JUMPLISTLINK_CID, false, NULL, JumpListLinkConstructor },
|
||||
{ &kNS_WIN_JUMPLISTSHORTCUT_CID, false, NULL, JumpListShortcutConstructor },
|
||||
{ &kNS_DRAGSERVICE_CID, false, NULL, nsDragServiceConstructor },
|
||||
{ &kNS_BIDIKEYBOARD_CID, false, NULL, nsBidiKeyboardConstructor },
|
||||
{ &kNS_WINDOW_CID, false, nullptr, WindowConstructor },
|
||||
{ &kNS_CHILD_CID, false, nullptr, ChildWindowConstructor },
|
||||
{ &kNS_FILEPICKER_CID, false, nullptr, FilePickerConstructor },
|
||||
{ &kNS_COLORPICKER_CID, false, nullptr, ColorPickerConstructor },
|
||||
{ &kNS_APPSHELL_CID, false, nullptr, nsAppShellConstructor },
|
||||
{ &kNS_SCREENMANAGER_CID, false, nullptr, nsScreenManagerWinConstructor },
|
||||
{ &kNS_GFXINFO_CID, false, nullptr, GfxInfoConstructor },
|
||||
{ &kNS_THEMERENDERER_CID, false, nullptr, NS_NewNativeTheme },
|
||||
{ &kNS_IDLE_SERVICE_CID, false, nullptr, nsIdleServiceWinConstructor },
|
||||
{ &kNS_CLIPBOARD_CID, false, nullptr, nsClipboardConstructor },
|
||||
{ &kNS_CLIPBOARDHELPER_CID, false, nullptr, nsClipboardHelperConstructor },
|
||||
{ &kNS_SOUND_CID, false, nullptr, nsSoundConstructor },
|
||||
{ &kNS_TRANSFERABLE_CID, false, nullptr, nsTransferableConstructor },
|
||||
{ &kNS_HTMLFORMATCONVERTER_CID, false, nullptr, nsHTMLFormatConverterConstructor },
|
||||
{ &kNS_WIN_TASKBAR_CID, false, nullptr, WinTaskbarConstructor },
|
||||
{ &kNS_WIN_JUMPLISTBUILDER_CID, false, nullptr, JumpListBuilderConstructor },
|
||||
{ &kNS_WIN_JUMPLISTITEM_CID, false, nullptr, JumpListItemConstructor },
|
||||
{ &kNS_WIN_JUMPLISTSEPARATOR_CID, false, nullptr, JumpListSeparatorConstructor },
|
||||
{ &kNS_WIN_JUMPLISTLINK_CID, false, nullptr, JumpListLinkConstructor },
|
||||
{ &kNS_WIN_JUMPLISTSHORTCUT_CID, false, nullptr, JumpListShortcutConstructor },
|
||||
{ &kNS_DRAGSERVICE_CID, false, nullptr, nsDragServiceConstructor },
|
||||
{ &kNS_BIDIKEYBOARD_CID, false, nullptr, nsBidiKeyboardConstructor },
|
||||
#ifdef MOZ_METRO
|
||||
{ &kNS_WIN_METROUTILS_CID, false, NULL, nsWinMetroUtilsConstructor },
|
||||
{ &kNS_WIN_METROUTILS_CID, false, nullptr, nsWinMetroUtilsConstructor },
|
||||
#endif
|
||||
#ifdef NS_PRINTING
|
||||
{ &kNS_PRINTSETTINGSSERVICE_CID, false, NULL, nsPrintOptionsWinConstructor },
|
||||
{ &kNS_PRINTER_ENUMERATOR_CID, false, NULL, nsPrinterEnumeratorWinConstructor },
|
||||
{ &kNS_PRINTSESSION_CID, false, NULL, nsPrintSessionConstructor },
|
||||
{ &kNS_DEVICE_CONTEXT_SPEC_CID, false, NULL, nsDeviceContextSpecWinConstructor },
|
||||
{ &kNS_PRINTSETTINGSSERVICE_CID, false, nullptr, nsPrintOptionsWinConstructor },
|
||||
{ &kNS_PRINTER_ENUMERATOR_CID, false, nullptr, nsPrinterEnumeratorWinConstructor },
|
||||
{ &kNS_PRINTSESSION_CID, false, nullptr, nsPrintSessionConstructor },
|
||||
{ &kNS_DEVICE_CONTEXT_SPEC_CID, false, nullptr, nsDeviceContextSpecWinConstructor },
|
||||
#endif
|
||||
{ NULL }
|
||||
{ nullptr }
|
||||
};
|
||||
|
||||
static const mozilla::Module::ContractIDEntry kWidgetContracts[] = {
|
||||
|
@ -283,7 +283,7 @@ static const mozilla::Module::ContractIDEntry kWidgetContracts[] = {
|
|||
{ "@mozilla.org/gfx/printsession;1", &kNS_PRINTSESSION_CID },
|
||||
{ "@mozilla.org/gfx/devicecontextspec;1", &kNS_DEVICE_CONTEXT_SPEC_CID },
|
||||
#endif
|
||||
{ NULL }
|
||||
{ nullptr }
|
||||
};
|
||||
|
||||
static void
|
||||
|
@ -300,8 +300,8 @@ static const mozilla::Module kWidgetModule = {
|
|||
mozilla::Module::kVersion,
|
||||
kWidgetCIDs,
|
||||
kWidgetContracts,
|
||||
NULL,
|
||||
NULL,
|
||||
nullptr,
|
||||
nullptr,
|
||||
nsAppShellInit,
|
||||
nsWidgetWindowsModuleDtor
|
||||
};
|
||||
|
|
|
@ -29,7 +29,7 @@ MSGFEventMsgInfo gMSGFEvents[] = {
|
|||
"MSGF_NEXTWINDOW", 6,
|
||||
"MSGF_MAX", 8,
|
||||
"MSGF_USER", 4096,
|
||||
NULL, 0};
|
||||
nullptr, 0};
|
||||
#endif
|
||||
|
||||
EventMsgInfo gAllEvents[] = {
|
||||
|
@ -366,7 +366,7 @@ EventMsgInfo gAllEvents[] = {
|
|||
{"WM_GESTURE", 0x0119},
|
||||
{"WM_GESTURENOTIFY", 0x011A},
|
||||
{"WM_GETTITLEBARINFOEX", 0x033F},
|
||||
{NULL, 0x0}
|
||||
{nullptr, 0x0}
|
||||
};
|
||||
|
||||
static long gEventCounter = 0;
|
||||
|
@ -375,7 +375,7 @@ static long gLastEventMsg = 0;
|
|||
void PrintEvent(UINT msg, bool aShowAllEvents, bool aShowMouseMoves)
|
||||
{
|
||||
int inx = 0;
|
||||
while (gAllEvents[inx].mId != (long)msg && gAllEvents[inx].mStr != NULL) {
|
||||
while (gAllEvents[inx].mId != (long)msg && gAllEvents[inx].mStr != nullptr) {
|
||||
inx++;
|
||||
}
|
||||
if (aShowAllEvents || (!aShowAllEvents && gLastEventMsg != (long)msg)) {
|
||||
|
|
|
@ -127,11 +127,11 @@ nsIntRegion nsWindow::GetRegionToPaint(bool aForceFullRepaint,
|
|||
}
|
||||
|
||||
HRGN paintRgn = ::CreateRectRgn(0, 0, 0, 0);
|
||||
if (paintRgn != NULL) {
|
||||
if (paintRgn != nullptr) {
|
||||
int result = GetRandomRgn(aDC, paintRgn, SYSRGN);
|
||||
if (result == 1) {
|
||||
POINT pt = {0,0};
|
||||
::MapWindowPoints(NULL, mWnd, &pt, 1);
|
||||
::MapWindowPoints(nullptr, mWnd, &pt, 1);
|
||||
::OffsetRgn(paintRgn, pt.x, pt.y);
|
||||
}
|
||||
nsIntRegion rgn(WinUtils::ConvertHRGNToRegion(paintRgn));
|
||||
|
@ -209,7 +209,7 @@ bool nsWindow::OnPaint(HDC aDC, uint32_t aNestingLevel)
|
|||
NS_WARNING("Plugin failed to subclass our window");
|
||||
}
|
||||
|
||||
ValidateRect(mWnd, NULL);
|
||||
ValidateRect(mWnd, nullptr);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -251,8 +251,8 @@ bool nsWindow::OnPaint(HDC aDC, uint32_t aNestingLevel)
|
|||
mPainting = true;
|
||||
|
||||
#ifdef WIDGET_DEBUG_OUTPUT
|
||||
HRGN debugPaintFlashRegion = NULL;
|
||||
HDC debugPaintFlashDC = NULL;
|
||||
HRGN debugPaintFlashRegion = nullptr;
|
||||
HDC debugPaintFlashDC = nullptr;
|
||||
|
||||
if (debug_WantPaintFlashing())
|
||||
{
|
||||
|
@ -270,7 +270,7 @@ bool nsWindow::OnPaint(HDC aDC, uint32_t aNestingLevel)
|
|||
#ifdef MOZ_XUL
|
||||
bool forceRepaint = aDC || (eTransparencyTransparent == mTransparencyMode);
|
||||
#else
|
||||
bool forceRepaint = NULL != aDC;
|
||||
bool forceRepaint = nullptr != aDC;
|
||||
#endif
|
||||
nsIntRegion region = GetRegionToPaint(forceRepaint, ps, hDC);
|
||||
if (!region.IsEmpty() && listener)
|
||||
|
@ -605,7 +605,7 @@ bool nsWindow::OnPaint(HDC aDC, uint32_t aNestingLevel)
|
|||
if (listener)
|
||||
listener->DidPaintWindow();
|
||||
|
||||
if (aNestingLevel == 0 && ::GetUpdateRect(mWnd, NULL, false)) {
|
||||
if (aNestingLevel == 0 && ::GetUpdateRect(mWnd, nullptr, false)) {
|
||||
OnPaint(aDC, 1);
|
||||
}
|
||||
|
||||
|
@ -714,7 +714,7 @@ uint8_t* nsWindowGfx::Data32BitTo1Bit(uint8_t* aImageData,
|
|||
// Allocate and clear mask buffer
|
||||
uint8_t* outData = (uint8_t*)PR_Calloc(outBpr, aHeight);
|
||||
if (!outData)
|
||||
return NULL;
|
||||
return nullptr;
|
||||
|
||||
int32_t *imageRow = (int32_t*)aImageData;
|
||||
for (uint32_t curRow = 0; curRow < aHeight; curRow++) {
|
||||
|
@ -748,14 +748,14 @@ uint8_t* nsWindowGfx::Data32BitTo1Bit(uint8_t* aImageData,
|
|||
*
|
||||
* @return The HBITMAP representing the image. Caller should call
|
||||
* DeleteObject when done with the bitmap.
|
||||
* On failure, NULL will be returned.
|
||||
* On failure, nullptr will be returned.
|
||||
*/
|
||||
HBITMAP nsWindowGfx::DataToBitmap(uint8_t* aImageData,
|
||||
uint32_t aWidth,
|
||||
uint32_t aHeight,
|
||||
uint32_t aDepth)
|
||||
{
|
||||
HDC dc = ::GetDC(NULL);
|
||||
HDC dc = ::GetDC(nullptr);
|
||||
|
||||
if (aDepth == 32) {
|
||||
// Alpha channel. We need the new header.
|
||||
|
@ -783,7 +783,7 @@ HBITMAP nsWindowGfx::DataToBitmap(uint8_t* aImageData,
|
|||
aImageData,
|
||||
reinterpret_cast<CONST BITMAPINFO*>(&head),
|
||||
DIB_RGB_COLORS);
|
||||
::ReleaseDC(NULL, dc);
|
||||
::ReleaseDC(nullptr, dc);
|
||||
return bmp;
|
||||
}
|
||||
|
||||
|
@ -813,6 +813,6 @@ HBITMAP nsWindowGfx::DataToBitmap(uint8_t* aImageData,
|
|||
}
|
||||
|
||||
HBITMAP bmp = ::CreateDIBitmap(dc, &head, CBM_INIT, aImageData, &bi, DIB_RGB_COLORS);
|
||||
::ReleaseDC(NULL, dc);
|
||||
::ReleaseDC(nullptr, dc);
|
||||
return bmp;
|
||||
}
|
||||
|
|
|
@ -613,7 +613,7 @@ nsresult Do_CheckSetArbitraryData(bool aMultiple)
|
|||
HGLOBAL hg = GlobalAlloc(GPTR, 1024);
|
||||
stg.tymed = TYMED_HGLOBAL;
|
||||
stg.hGlobal = hg;
|
||||
stg.pUnkForRelease = NULL;
|
||||
stg.pUnkForRelease = nullptr;
|
||||
|
||||
if (dataObj->SetData(&fe, &stg, true) != S_OK) {
|
||||
if (aMultiple) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче