Remove old native widget code that we were only keeping around for viewer. b=326417 r+sr=roc

This commit is contained in:
dbaron%dbaron.org 2006-02-08 20:09:19 +00:00
Родитель e36de1ffcb
Коммит b953609bf4
40 изменённых файлов: 0 добавлений и 688 удалений

Просмотреть файл

@ -54,9 +54,6 @@
#include "nsIFormControl.h"
#include "nsIDeviceContext.h"
#include "nsHTMLAtoms.h"
#include "nsIButton.h" // remove this when GetCID is pure virtual
#include "nsICheckButton.h" //remove this
#include "nsITextWidget.h" //remove this
#include "nsISupports.h"
#include "nsStyleConsts.h"
#include "nsUnitConversion.h"
@ -520,24 +517,6 @@ nsFormControlFrame::SetFocus(PRBool aOn, PRBool aRepaint)
{
}
/*
* FIXME: this ::GetIID() method has no meaning in life and should be
* removed.
* Pierre Phaneuf <pp@ludusdesign.com>
*/
const nsIID&
nsFormControlFrame::GetIID()
{
return NS_GET_IID(nsIButton);
}
const nsIID&
nsFormControlFrame::GetCID()
{
static NS_DEFINE_IID(kButtonCID, NS_BUTTON_CID);
return kButtonCID;
}
NS_METHOD
nsFormControlFrame::HandleEvent(nsPresContext* aPresContext,
nsGUIEvent* aEvent,

Просмотреть файл

@ -125,18 +125,6 @@ public:
// new behavior
/**
* Get the class id of the widget associated with this frame
* @return the class id
*/
virtual const nsIID& GetCID();
/**
* Get the interface id of widget associated with this frame
* @return the interface id
*/
virtual const nsIID& GetIID();
/**
* Respond to a enter key being pressed
*/

Просмотреть файл

@ -55,9 +55,6 @@
#include "nsIFormControl.h"
#include "nsIDeviceContext.h"
#include "nsHTMLAtoms.h"
#include "nsIButton.h" // remove this when GetCID is pure virtual
#include "nsICheckButton.h" //remove this
#include "nsITextWidget.h" //remove this
#include "nsISupports.h"
#include "nsStyleConsts.h"
#include "nsUnitConversion.h"

Просмотреть файл

@ -36,7 +36,6 @@
* ***** END LICENSE BLOCK ***** */
#include "nsGfxButtonControlFrame.h"
#include "nsIButton.h"
#include "nsWidgetsCID.h"
#include "nsIFontMetrics.h"
#include "nsFormControlFrame.h"
@ -95,24 +94,6 @@ nsGfxButtonControlFrame::IsFileBrowseButton(PRInt32 type)
return rv;
}
/*
* FIXME: this ::GetIID() method has no meaning in life and should be
* removed.
* Pierre Phaneuf <pp@ludusdesign.com>
*/
const nsIID&
nsGfxButtonControlFrame::GetIID()
{
return NS_GET_IID(nsIButton);
}
const nsIID&
nsGfxButtonControlFrame::GetCID()
{
static NS_DEFINE_IID(kButtonCID, NS_BUTTON_CID);
return kButtonCID;
}
#ifdef DEBUG
NS_IMETHODIMP
nsGfxButtonControlFrame::GetFrameName(nsAString& aResult) const

Просмотреть файл

@ -64,8 +64,6 @@ public:
nsHTMLReflowMetrics& aDesiredSize,
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus);
virtual const nsIID& GetCID();
virtual const nsIID& GetIID();
NS_IMETHOD HandleEvent(nsPresContext* aPresContext,
nsGUIEvent* aEvent,

Просмотреть файл

@ -36,7 +36,6 @@
* ***** END LICENSE BLOCK ***** */
#include "nsGfxCheckboxControlFrame.h"
#include "nsICheckButton.h"
#include "nsHTMLAtoms.h"
#include "nsHTMLParts.h"
#include "nsIFormControl.h"

Просмотреть файл

@ -54,9 +54,6 @@ EXPORTS = \
nsStringUtil.h \
nsIWidget.h \
nsIKBStateControl.h \
nsIButton.h \
nsICheckButton.h \
nsITextWidget.h \
nsGUIEvent.h \
nsEvent.h \
nsIMouseListener.h \
@ -64,7 +61,6 @@ EXPORTS = \
nsIMenuListener.h \
nsWidgetsCID.h \
nsILookAndFeel.h \
nsILabel.h \
nsIDragSessionGTK.h \
nsIDragSessionXlib.h \
nsIDragSessionMac.h \

Просмотреть файл

Просмотреть файл

Просмотреть файл

Просмотреть файл

Просмотреть файл

@ -52,41 +52,15 @@
{ 0xba7de611, 0x6088, 0x11d3, \
{ 0xa8, 0x3e, 0x0, 0x10, 0x5a, 0x18, 0x34, 0x19 } }
/* 2d96b3d2-c051-11d1-a827-0040959a28c9 */
#define NS_BUTTON_CID \
{ 0x2d96b3d2, 0xc051, 0x11d1, \
{0xa8, 0x27, 0x00, 0x40, 0x95, 0x9a, 0x28, 0xc9} }
/* 2d96b3d3-c051-11d1-a827-0040959a28c9 */
#define NS_CHECKBUTTON_CID \
{ 0x2d96b3d3, 0xc051, 0x11d1, \
{0xa8, 0x27, 0x00, 0x40, 0x95, 0x9a, 0x28, 0xc9} }
/* bd57cee8-1dd1-11b2-9fe7-95cf4709aea3 */
#define NS_FILEPICKER_CID \
{ 0xbd57cee8, 0x1dd1, 0x11b2, \
{0x9f, 0xe7, 0x95, 0xcf, 0x47, 0x09, 0xae, 0xa3} }
/* 2d96b3d9-c051-11d1-a827-0040959a28c9 */
#define NS_HORZSCROLLBAR_CID \
{ 0x2d96b3d9, 0xc051, 0x11d1, \
{0xa8, 0x27, 0x00, 0x40, 0x95, 0x9a, 0x28, 0xc9} }
/* 2d96b3da-c051-11d1-a827-0040959a28c9 */
#define NS_VERTSCROLLBAR_CID \
{ 0x2d96b3da, 0xc051, 0x11d1, \
{0xa8, 0x27, 0x00, 0x40, 0x95, 0x9a, 0x28, 0xc9} }
// {c2281100-3b4b-11d6-a384-f705fd0766fc}
#define NS_NATIVESCROLLBAR_CID \
{ 0xc2281100, 0x3b4b, 0x11d6, { 0xa3, 0x84, 0xf7, 0x05, 0xfd, 0x07, 0x66, 0xfc } }
/* 2d96b3dc-c051-11d1-a827-0040959a28c9 */
#define NS_TEXTFIELD_CID \
{ 0x2d96b3dc, 0xc051, 0x11d1, \
{0xa8, 0x27, 0x00, 0x40, 0x95, 0x9a, 0x28, 0xc9} }
/* 2d96b3df-c051-11d1-a827-0040959a28c9 */
#define NS_APPSHELL_CID \
{ 0x2d96b3df, 0xc051, 0x11d1, \
@ -105,16 +79,6 @@
{ 0xa61e6398, 0x2057, 0x40fd, \
{ 0x9c, 0x81, 0x87, 0x3b, 0x90, 0x8d, 0x24, 0xe7 } }
/* 4A781D61-3D28-11d2-8DB8-00609703C14E */
#define NS_DIALOG_CID \
{ 0x4a781d61, 0x3d28, 0x11d2, \
{ 0x8d, 0xb8, 0x0, 0x60, 0x97, 0x3, 0xc1, 0x4e } }
/* F3131891-3DC7-11d2-8DB8-00609703C14E */
#define NS_LABEL_CID \
{ 0xf3131891, 0x3dc7, 0x11d2, \
{ 0x8d, 0xb8, 0x0, 0x60, 0x97, 0x3, 0xc1, 0x4e } }
//-----------------------------------------------------------
// Menus
//-----------------------------------------------------------

Просмотреть файл

@ -40,129 +40,16 @@
#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"
static NS_DEFINE_IID(kIWidgetIID, NS_IWIDGET_IID);
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(kIWidgetIID,(void**)&parent);
nsIWidget* widget;
if (NS_OK == aButton->QueryInterface(kIWidgetIID,(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(kIWidgetIID,(void**)&parent);
nsIWidget* widget;
if (NS_OK == aCheckButton->QueryInterface(kIWidgetIID,(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(kIWidgetIID,(void**)&parent))
{
nsIWidget* widget;
if (NS_OK == aLabel->QueryInterface(kIWidgetIID,(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(kIWidgetIID,(void**)&parent);
nsIWidget* widget = nsnull;
if (NS_OK == aWidget->QueryInterface(kIWidgetIID,(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 kIWidgetIID supported object");
}
if (aParent)
NS_IF_RELEASE(parent);
return NS_OK;
}
extern NS_WIDGET nsresult
NS_ShowWidget(nsISupports* aWidget, PRBool aShow)
{

Просмотреть файл

@ -80,18 +80,13 @@ CSRCS = \
CPPSRCS = \
nsAppShell.cpp \
nsBidiKeyboard.cpp \
nsButton.cpp \
nsCheckButton.cpp \
nsClipboard.cpp \
nsDragService.cpp \
nsGtkEventHandler.cpp \
nsGtkUtils.cpp \
nsKeyboardUtils.cpp \
nsLabel.cpp \
nsLookAndFeel.cpp \
nsSound.cpp \
nsTextHelper.cpp \
nsTextWidget.cpp \
nsToolkit.cpp \
nsWidget.cpp \
nsWidgetFactory.cpp \

Просмотреть файл

Просмотреть файл

Просмотреть файл

Просмотреть файл

Просмотреть файл

Просмотреть файл

Просмотреть файл

Просмотреть файл

Просмотреть файл

Просмотреть файл

Просмотреть файл

@ -44,13 +44,9 @@
#include "nsWidgetsCID.h"
#include "nsWindow.h"
#include "nsButton.h"
#include "nsCheckButton.h"
#include "nsTextWidget.h"
#include "nsAppShell.h"
#include "nsToolkit.h"
#include "nsLookAndFeel.h"
#include "nsLabel.h"
#include "nsTransferable.h"
#include "nsClipboard.h"
#include "nsClipboardHelper.h"
@ -67,13 +63,9 @@
NS_GENERIC_FACTORY_CONSTRUCTOR(nsWindow)
NS_GENERIC_FACTORY_CONSTRUCTOR(ChildWindow)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsButton)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsCheckButton)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsTextWidget)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsAppShell)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsToolkit)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsLookAndFeel)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsLabel)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsTransferable)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsClipboard)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsClipboardHelper)
@ -96,18 +88,6 @@ static const nsModuleComponentInfo components[] =
NS_CHILD_CID,
"@mozilla.org/widgets/child_window/gtk;1",
ChildWindowConstructor },
{ "Gtk Button",
NS_BUTTON_CID,
"@mozilla.org/widgets/button/gtk;1",
nsButtonConstructor },
{ "Gtk Check Button",
NS_CHECKBUTTON_CID,
"@mozilla.org/widgets/checkbutton/gtk;1",
nsCheckButtonConstructor },
{ "Gtk Text Widget",
NS_TEXTFIELD_CID,
"@mozilla.org/widgets/textwidget/gtk;1",
nsTextWidgetConstructor },
{ "Gtk AppShell",
NS_APPSHELL_CID,
"@mozilla.org/widget/appshell/gtk;1",
@ -120,10 +100,6 @@ static const nsModuleComponentInfo components[] =
NS_LOOKANDFEEL_CID,
"@mozilla.org/widget/lookandfeel;1",
nsLookAndFeelConstructor },
{ "Gtk Label",
NS_LABEL_CID,
"@mozilla.org/widget/label/gtk;1",
nsLabelConstructor },
{ "Gtk Sound",
NS_SOUND_CID,
// "@mozilla.org/widget/sound/gtk;1"

Просмотреть файл

@ -66,31 +66,9 @@
#include "nsNativeThemeMac.h"
#include "nsScreenManagerMac.h"
#if USE_NATIVE_VERSION
#include "nsIButton.h"
#include "nsITextWidget.h"
#include "nsButton.h"
#include "nsCheckButton.h"
#include "nsTextWidget.h"
#include "nsLabel.h"
#endif
NS_GENERIC_FACTORY_CONSTRUCTOR(nsMacWindow)
NS_GENERIC_FACTORY_CONSTRUCTOR(ChildWindow)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsFilePicker)
#if USE_NATIVE_VERSION
NS_GENERIC_FACTORY_CONSTRUCTOR(nsButton)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsCheckButton)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsComboBox)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsRadioButton)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsListBox)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsTextAreaWidget)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsLabel)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsTextWidget) // used by Viewer?
#endif
NS_GENERIC_FACTORY_CONSTRUCTOR(nsAppShell)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsToolkit)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsLookAndFeel)
@ -111,20 +89,6 @@ NS_GENERIC_FACTORY_CONSTRUCTOR(nsScreenManagerMac)
static const nsModuleComponentInfo gComponents[] =
{
#if USE_NATIVE_VERSION
{ "Text Field",
NS_TEXTFIELD_CID,
"@mozilla.org/widgets/textwidget/mac;1",
nsTextWidgetConstructor },
{ "Label",
NS_LABEL_CID,
"@mozilla.org/widget/label/mac;1",
nsLabelConstructor },
{ "Button",
NS_BUTTON_CID,
"@mozilla.org/widgets/button/mac;1",
nsButtonConstructor },
#endif
{ "nsWindow",
NS_WINDOW_CID,
"@mozilla.org/widgets/window/mac;1",

Просмотреть файл

@ -37,11 +37,7 @@
#include "nsWidgetSupport.h"
#include "nsRect.h"
#include "nsIButton.h"
#include "nsITextWidget.h"
#include "nsILabel.h"
#include "nsIWidget.h"
#include "nsICheckButton.h"
#ifdef XP_MAC
#define WIDGET_SUPPORT_EXPORT(returnType) \
@ -51,94 +47,6 @@
returnType
#endif
WIDGET_SUPPORT_EXPORT(nsresult)
NS_CreateButton(nsISupports* aParent,
nsIButton* aButton,
const nsRect& aRect,
EVENT_CALLBACK aHandleEventFunction,
const nsFont* aFont)
{
nsCOMPtr<nsIWidget> parent = do_QueryInterface(aParent);
if (parent) {
nsCOMPtr<nsIWidget> widget = do_QueryInterface(aButton);
if (widget) {
widget->Create(parent, aRect, aHandleEventFunction, nsnull);
widget->Show(PR_TRUE);
if (aFont) {
widget->SetFont(*aFont);
}
}
}
return NS_OK;
}
WIDGET_SUPPORT_EXPORT(nsresult)
NS_CreateCheckButton(nsISupports* aParent,
nsICheckButton* aCheckButton,
const nsRect& aRect,
EVENT_CALLBACK aHandleEventFunction,
const nsFont* aFont)
{
nsCOMPtr<nsIWidget> parent = do_QueryInterface(aParent);
if (parent) {
nsCOMPtr<nsIWidget> widget = do_QueryInterface(aCheckButton);
if (widget) {
widget->Create(parent, aRect, aHandleEventFunction, nsnull);
widget->Show(PR_TRUE);
if (aFont) {
widget->SetFont(*aFont);
}
}
}
return NS_OK;
}
WIDGET_SUPPORT_EXPORT(nsresult)
NS_CreateLabel(nsISupports* aParent,
nsILabel* aLabel,
const nsRect& aRect,
EVENT_CALLBACK aHandleEventFunction,
const nsFont* aFont)
{
nsCOMPtr<nsIWidget> parent = do_QueryInterface(aParent);
if (parent) {
nsCOMPtr<nsIWidget> widget = do_QueryInterface(aLabel);
if (widget) {
widget->Create(parent, aRect, aHandleEventFunction, NULL);
widget->Show(PR_TRUE);
if (aFont) {
widget->SetFont(*aFont);
}
}
}
return NS_OK;
}
WIDGET_SUPPORT_EXPORT(nsresult)
NS_CreateTextWidget(nsISupports* aParent,
nsITextWidget* aWidget,
const nsRect& aRect,
EVENT_CALLBACK aHandleEventFunction,
const nsFont* aFont)
{
nsCOMPtr<nsIWidget> parent = do_QueryInterface(aParent);
if (parent) {
nsCOMPtr<nsIWidget> widget = do_QueryInterface(aWidget);
if (widget) {
widget->Create(parent, aRect, aHandleEventFunction, NULL);
widget->Show(PR_TRUE);
if (aFont) {
widget->SetFont(*aFont);
}
}
}
return NS_OK;
}
WIDGET_SUPPORT_EXPORT(nsresult)
NS_ShowWidget(nsISupports* aWidget, PRBool aShow)
{

Просмотреть файл

@ -45,16 +45,12 @@
struct nsRect;
class nsIAppShell;
class nsIButton;
class nsIEventListener;
class nsILabel;
class nsILookAndFeel;
class nsIMouseListener;
class nsIToolkit;
class nsIWidget;
class nsICheckButton;
class nsITooltipWidget;
class nsITextWidget;
#if (defined(XP_MAC) || defined(XP_MACOSX)) && !defined(MOZ_WIDGET_COCOA)
// A top-level widget stores a reference to itself as a window property
@ -66,46 +62,6 @@ enum {
};
#endif
// These are a series of support methods which help in the creation
// of widgets. They are not needed, but are provided as a convenience
// mechanism when creating widgets
extern nsresult
NS_CreateButton( nsISupports* aParent,
nsIButton* aButton,
const nsRect& aRect,
EVENT_CALLBACK aHandleEventFunction,
const nsFont* aFont = nsnull);
extern nsresult
NS_CreateCheckButton( nsISupports* aParent,
nsICheckButton* aCheckButton,
const nsRect& aRect,
EVENT_CALLBACK aHandleEventFunction,
const nsFont* aFont = nsnull);
extern nsresult
NS_CreateLabel( nsISupports* aParent,
nsILabel* aLabel,
const nsRect& aRect,
EVENT_CALLBACK aHandleEventFunction,
const nsFont* aFont = nsnull);
extern nsresult
NS_CreateTextWidget(nsISupports* aParent,
nsITextWidget* aWidget,
const nsRect& aRect,
EVENT_CALLBACK aHandleEventFunction,
const nsFont* aFont = nsnull);
extern nsresult
NS_CreateTooltipWidget(nsISupports* aParent,
nsITooltipWidget* aWidget,
const nsRect& aRect,
EVENT_CALLBACK aHandleEventFunction,
const nsFont* aFont = nsnull);
extern nsresult
NS_ShowWidget(nsISupports* aWidget, PRBool aShow);

Просмотреть файл

@ -1,111 +0,0 @@
#
# ***** BEGIN LICENSE BLOCK *****
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
#
# The contents of this file are subject to the Mozilla 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/MPL/
#
# 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):
# Roland Mainz <roland.mainz@informatik.med.uni-giessen.de>
#
# 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 MPL, 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 MPL, the GPL or the LGPL.
#
# ***** END LICENSE BLOCK *****
DEPTH = ../../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
MODULE = widget
LIBRARY_NAME = widget_xlib
EXPORT_LIBRARY = 1
IS_COMPONENT = 1
MODULE_NAME = nsWidgetXLIBModule
GRE_MODULE = 1
LIBXUL_LIBRARY = 1
PACKAGE_FILE = widget_xlib.pkg
REQUIRES = xpcom \
string \
appshell \
gfx \
layout \
content \
dom \
js \
xlibrgb \
uconv \
pref \
webshell \
htmlparser \
view \
necko \
$(NULL)
CPPSRCS = \
nsAppShell.cpp \
nsBidiKeyboard.cpp \
nsButton.cpp \
nsCheckButton.cpp \
nsClipboard.cpp \
nsDragService.cpp \
nsKeyCode.cpp \
nsLabel.cpp \
nsLookAndFeel.cpp \
nsScreenXlib.cpp \
nsScreenManagerXlib.cpp \
nsSound.cpp \
nsTextHelper.cpp \
nsTextWidget.cpp \
nsToolkit.cpp \
nsWidget.cpp \
nsWidgetFactory.cpp \
nsWindow.cpp \
nsXUtils.cpp \
$(NULL)
SHARED_LIBRARY_LIBS = $(DIST)/lib/libxpwidgets_s.a
include $(topsrcdir)/config/rules.mk
EXTRA_DSO_LDOPTS += -L$(DIST)/bin -L$(DIST)/lib -lgkgfx $(MOZ_COMPONENT_LIBS)
EXTRA_DSO_LDOPTS += -L$(DIST)/bin -lXt -lxlibrgb -lxlibxtbin $(MOZ_XLIB_LDFLAGS)
CXXFLAGS += $(MOZ_XLIB_CFLAGS)
DEFINES += -D_IMPL_NS_WIDGET
LOCAL_INCLUDES = \
-I$(srcdir)/../xpwidgets \
-I$(srcdir) \
$(NULL)

Просмотреть файл

Просмотреть файл

Просмотреть файл

Просмотреть файл

Просмотреть файл

Просмотреть файл

Просмотреть файл

Просмотреть файл

Просмотреть файл

Просмотреть файл

Просмотреть файл

@ -1,165 +0,0 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla 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/MPL/
*
* 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):
* Peter Hartshorn <peter@igelaus.com.au>
* Ken Faulkner <faulkner@igelaus.com.au>
* Dan Rosen <dr@netscape.com>
*
* 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 MPL, 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 MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include "nsIGenericFactory.h"
#include "nsIModule.h"
#include "nsCOMPtr.h"
#include "nsWidgetsCID.h"
#include "nsWindow.h"
#include "nsButton.h"
#include "nsCheckButton.h"
#include "nsTextWidget.h"
#include "nsAppShell.h"
#include "nsToolkit.h"
#include "nsLookAndFeel.h"
#include "nsLabel.h"
#include "nsTransferable.h"
#include "nsClipboard.h"
#include "nsClipboardHelper.h"
#include "nsHTMLFormatConverter.h"
#include "nsDragService.h"
#include "nsSound.h"
#include "nsScreenManagerXlib.h"
#include "nsBidiKeyboard.h"
NS_GENERIC_FACTORY_CONSTRUCTOR(nsWindow)
NS_GENERIC_FACTORY_CONSTRUCTOR(ChildWindow)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsButton)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsCheckButton)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsTextWidget)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsAppShell)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsToolkit)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsLookAndFeel)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsLabel)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsTransferable)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsClipboard)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsClipboardHelper)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsHTMLFormatConverter)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsDragService)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsSound)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsBidiKeyboard)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsScreenManagerXlib)
static const nsModuleComponentInfo components[] =
{
{ "Xlib nsWindow",
NS_WINDOW_CID,
"@mozilla.org/widgets/window/xlib;1",
nsWindowConstructor },
{ "Xlib Child nsWindow",
NS_CHILD_CID,
"@mozilla.org/widgets/child_window/xlib;1",
ChildWindowConstructor },
{ "Xlib Button",
NS_BUTTON_CID,
"@mozilla.org/widgets/button/xlib;1",
nsButtonConstructor },
{ "Xlib Check Button",
NS_CHECKBUTTON_CID,
"@mozilla.org/widgets/checkbutton/xlib;1",
nsCheckButtonConstructor },
{ "Xlib Text Widget",
NS_TEXTFIELD_CID,
"@mozilla.org/widgets/textwidget/xlib;1",
nsTextWidgetConstructor },
{ "Xlib AppShell",
NS_APPSHELL_CID,
"@mozilla.org/widget/appshell/xlib;1",
nsAppShellConstructor },
{ "Xlib Toolkit",
NS_TOOLKIT_CID,
"@mozilla.org/widget/toolkit/xlib;1",
nsToolkitConstructor },
{ "Xlib Look And Feel",
NS_LOOKANDFEEL_CID,
"@mozilla.org/widget/lookandfeel;1",
nsLookAndFeelConstructor },
{ "Xlib Label",
NS_LABEL_CID,
"@mozilla.org/widget/label/xlib;1",
nsLabelConstructor },
{ "Xlib Sound",
NS_SOUND_CID,
"@mozilla.org/sound;1",
nsSoundConstructor },
{ "Transferrable",
NS_TRANSFERABLE_CID,
// "@mozilla.org/widget/transferrable/xlib;1",
"@mozilla.org/widget/transferable;1",
nsTransferableConstructor },
{ "Xlib Clipboard",
NS_CLIPBOARD_CID,
// "@mozilla.org/widget/clipboard/xlib;1",
"@mozilla.org/widget/clipboard;1",
nsClipboardConstructor },
{ "Clipboard Helper",
NS_CLIPBOARDHELPER_CID,
"@mozilla.org/widget/clipboardhelper;1",
nsClipboardHelperConstructor },
{ "HTML Format Converter",
NS_HTMLFORMATCONVERTER_CID,
"@mozilla.org/widget/htmlformatconverter;1",
nsHTMLFormatConverterConstructor },
{ "Xlib Drag Service",
NS_DRAGSERVICE_CID,
// "@mozilla.org/widget/dragservice/xlib;1",
"@mozilla.org/widget/dragservice;1",
nsDragServiceConstructor },
{ "Xlib Bidi Keyboard",
NS_BIDIKEYBOARD_CID,
"@mozilla.org/widget/bidikeyboard;1",
nsBidiKeyboardConstructor },
{ "Xlib Screen Manager",
NS_SCREENMANAGER_CID,
"@mozilla.org/gfx/screenmanager;1",
nsScreenManagerXlibConstructor }
};
PR_STATIC_CALLBACK(void)
nsWidgetXLIBModuleDtor(nsIModule *self)
{
nsClipboard::Shutdown();
}
NS_IMPL_NSGETMODULE_WITH_DTOR(nsWidgetXLIBModule,
components,
nsWidgetXLIBModuleDtor)