diff --git a/mozilla/widget/src/cocoa/nsChildView.mm b/mozilla/widget/src/cocoa/nsChildView.mm index 73906cc517c..753d250e00b 100644 --- a/mozilla/widget/src/cocoa/nsChildView.mm +++ b/mozilla/widget/src/cocoa/nsChildView.mm @@ -51,7 +51,7 @@ #include "nsplugindefs.h" #include "nsMacResources.h" -#include "nsRegionMac.h" +#include "nsIRegion.h" #include "nsIRollupListener.h" #include "nsIEventSink.h" #include "nsIScrollableView.h" diff --git a/mozilla/widget/src/cocoa/nsCocoaWindow.mm b/mozilla/widget/src/cocoa/nsCocoaWindow.mm index 63451a4a5ea..ca9ffffd862 100644 --- a/mozilla/widget/src/cocoa/nsCocoaWindow.mm +++ b/mozilla/widget/src/cocoa/nsCocoaWindow.mm @@ -48,7 +48,6 @@ #include "nsCarbonHelpers.h" #include "nsGFXUtils.h" #include "nsMacResources.h" -#include "nsRegionMac.h" #include "nsIRollupListener.h" #import "nsChildView.h" diff --git a/mozilla/widget/src/mac/Makefile.in b/mozilla/widget/src/mac/Makefile.in index edc653bc722..7e2e345a965 100644 --- a/mozilla/widget/src/mac/Makefile.in +++ b/mozilla/widget/src/mac/Makefile.in @@ -59,7 +59,6 @@ endif GFX_LCPPSRCS = \ nsRepeater.cpp \ - nsRegionMac.cpp \ nsWatchTask.cpp \ $(NULL) @@ -90,7 +89,6 @@ CPPSRCS = nsAppShell.cpp \ nsTSMStrategy.cpp \ nsToolkit.cpp \ nsWidgetFactory.cpp \ - nsWidgetSupport.cpp \ nsWindow.cpp \ nsMacNativeUnicodeConverter.cpp \ nsStylClipboardUtils.cpp \ diff --git a/mozilla/widget/src/mac/nsChildWindow.cpp b/mozilla/widget/src/mac/nsChildWindow.cpp index 74d3be48b37..774a83b4bf9 100644 --- a/mozilla/widget/src/mac/nsChildWindow.cpp +++ b/mozilla/widget/src/mac/nsChildWindow.cpp @@ -37,7 +37,6 @@ #include "nsChildWindow.h" #include "nsCOMPtr.h" -#include "nsRegionMac.h" #include "nsRegionPool.h" //------------------------------------------------------------------------- diff --git a/mozilla/widget/src/mac/nsMacWindow.cpp b/mozilla/widget/src/mac/nsMacWindow.cpp index bd37e0b1dce..3e1dc0edd5c 100644 --- a/mozilla/widget/src/mac/nsMacWindow.cpp +++ b/mozilla/widget/src/mac/nsMacWindow.cpp @@ -50,7 +50,6 @@ #include "nsGfxUtils.h" #include "DefProcFakery.h" #include "nsMacResources.h" -#include "nsRegionMac.h" #include "nsIRollupListener.h" #include "nsCRT.h" #include "nsWidgetSupport.h" diff --git a/mozilla/widget/src/mac/nsWidgetSupport.cpp b/mozilla/widget/src/mac/nsWidgetSupport.cpp deleted file mode 100644 index 5d3ff623f00..00000000000 --- a/mozilla/widget/src/mac/nsWidgetSupport.cpp +++ /dev/null @@ -1,229 +0,0 @@ -/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* ***** BEGIN LICENSE BLOCK ***** - * Version: NPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Netscape Public License - * Version 1.1 (the "License"); you may not use this file except in - * compliance with the License. You may obtain a copy of the License at - * http://www.mozilla.org/NPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is mozilla.org code. - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the NPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the NPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ - - -#include "nsWidgetSupport.h" -#include "nsRect.h" -#include "nsIAppShell.h" -#include "nsIButton.h" -#include "nsIEventListener.h" -#include "nsILabel.h" -#include "nsILookAndFeel.h" -#include "nsIMouseListener.h" -#include "nsIToolkit.h" -#include "nsIWidget.h" -#include "nsICheckButton.h" -#include "nsITextWidget.h" - - - - -NS_WIDGET nsresult -NS_CreateButton(nsISupports* aParent, - nsIButton* aButton, - const nsRect& aRect, - EVENT_CALLBACK aHandleEventFunction, - const nsFont* aFont) -{ - nsIWidget* parent = nsnull; - if (aParent != nsnull) - aParent->QueryInterface(NS_GET_IID(nsIWidget),(void**)&parent); - - nsIWidget* widget; - if (NS_OK == aButton->QueryInterface(NS_GET_IID(nsIWidget),(void**)&widget)) { - widget->Create(parent, aRect, aHandleEventFunction, NULL); - widget->Show(PR_TRUE); - if (aFont != nsnull) - widget->SetFont(*aFont); - NS_IF_RELEASE(widget); - } - - if (aParent != nsnull) - NS_IF_RELEASE(parent); - return NS_OK; -} - -NS_WIDGET nsresult -NS_CreateCheckButton(nsISupports* aParent, - nsICheckButton* aCheckButton, - const nsRect& aRect, - EVENT_CALLBACK aHandleEventFunction, - const nsFont* aFont) -{ - nsIWidget* parent = nsnull; - if (aParent != nsnull) - aParent->QueryInterface(NS_GET_IID(nsIWidget),(void**)&parent); - - nsIWidget* widget; - if (NS_OK == aCheckButton->QueryInterface(NS_GET_IID(nsIWidget),(void**)&widget)) { - widget->Create(parent, aRect, aHandleEventFunction, NULL); - widget->Show(PR_TRUE); - if (aFont != nsnull) - widget->SetFont(*aFont); - NS_IF_RELEASE(widget); - } - if (aParent != nsnull) - NS_IF_RELEASE(parent); - return NS_OK; -} - - - - -NS_WIDGET nsresult -NS_CreateLabel( nsISupports* aParent, - nsILabel* aLabel, - const nsRect& aRect, - EVENT_CALLBACK aHandleEventFunction, - const nsFont* aFont) -{ - nsIWidget* parent = nsnull; - if (NS_OK == aParent->QueryInterface(NS_GET_IID(nsIWidget),(void**)&parent)) - { - nsIWidget* widget; - if (NS_OK == aLabel->QueryInterface(NS_GET_IID(nsIWidget),(void**)&widget)) { - widget->Create(parent, aRect, aHandleEventFunction, NULL); - widget->Show(PR_TRUE); - if (aFont != nsnull) - widget->SetFont(*aFont); - NS_IF_RELEASE(widget); - } - NS_IF_RELEASE(parent); - } - return NS_OK; -} - - - -NS_WIDGET nsresult -NS_CreateTextWidget(nsISupports* aParent, - nsITextWidget* aWidget, - const nsRect& aRect, - EVENT_CALLBACK aHandleEventFunction, - const nsFont* aFont) -{ - nsIWidget* parent = nsnull; - if (aParent != nsnull) - aParent->QueryInterface(NS_GET_IID(nsIWidget),(void**)&parent); - - nsIWidget* widget = nsnull; - if (NS_OK == aWidget->QueryInterface(NS_GET_IID(nsIWidget),(void**)&widget)) { - widget->Create(parent, aRect, aHandleEventFunction, NULL); - widget->Show(PR_TRUE); - if (aFont != nsnull) - widget->SetFont(*aFont); - NS_IF_RELEASE(widget); - } - else - { - NS_ERROR("Called QueryInterface on a non nsIWidget supported object"); - } - - if (aParent) - NS_IF_RELEASE(parent); - - return NS_OK; -} - - - -extern NS_WIDGET nsresult -NS_ShowWidget(nsISupports* aWidget, PRBool aShow) -{ - - nsIWidget* widget = nsnull; - if (NS_OK == aWidget->QueryInterface(NS_GET_IID(nsIWidget),(void**)&widget)) { - widget->Show(aShow); - NS_IF_RELEASE(widget); - } - - return NS_OK; -} - -extern NS_WIDGET nsresult -NS_MoveWidget(nsISupports* aWidget, PRUint32 aX, PRUint32 aY) -{ - - nsIWidget* widget = nsnull; - if (NS_OK == aWidget->QueryInterface(NS_GET_IID(nsIWidget),(void**)&widget)) { - widget->Move(aX,aY); - NS_IF_RELEASE(widget); - } - return NS_OK; -} - -extern NS_WIDGET nsresult -NS_EnableWidget(nsISupports* aWidget, PRBool aEnable) -{ - void* result = nsnull; - nsIWidget* widget; - if (NS_OK == aWidget->QueryInterface(NS_GET_IID(nsIWidget),(void**)&widget)) - { - widget->Enable(aEnable); - NS_RELEASE(widget); - } - return NS_OK; -} - - -extern NS_WIDGET nsresult -NS_SetFocusToWidget(nsISupports* aWidget) -{ - - nsIWidget* widget = nsnull; - if (NS_OK == aWidget->QueryInterface(NS_GET_IID(nsIWidget),(void**)&widget)) { - widget->SetFocus(); - NS_IF_RELEASE(widget); - } - return NS_OK; -} - - -extern NS_WIDGET nsresult -NS_GetWidgetNativeData(nsISupports* aWidget, void** aNativeData) -{ - void* result = nsnull; - nsIWidget* widget; - if (NS_OK == aWidget->QueryInterface(NS_GET_IID(nsIWidget),(void**)&widget)) - { - result = widget->GetNativeData(NS_NATIVE_WIDGET); - NS_RELEASE(widget); - } - *aNativeData = result; - return NS_OK; - -} diff --git a/mozilla/widget/src/mac/nsWindow.cpp b/mozilla/widget/src/mac/nsWindow.cpp index cf7d015f442..b0563acd8a5 100644 --- a/mozilla/widget/src/mac/nsWindow.cpp +++ b/mozilla/widget/src/mac/nsWindow.cpp @@ -61,7 +61,7 @@ #include "nsplugindefs.h" #include "nsMacEventHandler.h" #include "nsMacResources.h" -#include "nsRegionMac.h" +#include "nsIRegion.h" #include "nsIRollupListener.h" #include "nsCarbonHelpers.h"