From ef8e0398bdd243be992adb5aaeea2ae42d4e77ca Mon Sep 17 00:00:00 2001 From: ramiro Date: Wed, 6 May 1998 17:36:34 +0000 Subject: [PATCH] Move the bookmark widgets to their own library. Componetize things a bit. Should make it easier to completely bypass these widgets if needed - as will probably be the case for lite browsers and "motifs" that break cause of them. git-svn-id: svn://10.0.0.236/trunk@1181 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/cmd/xfe/Makefile | 16 ++++-- mozilla/cmd/xfe/XfeWidgets/Makefile | 1 + mozilla/cmd/xfe/XfeWidgets/Xfe/Makefile | 6 --- mozilla/cmd/xfe/XfeWidgets/Xfe/XfeAll.h | 2 - .../xfe/XfeWidgets/{Xfe => XfeBm}/BmButton.c | 0 .../xfe/XfeWidgets/{Xfe => XfeBm}/BmButton.h | 0 .../xfe/XfeWidgets/{Xfe => XfeBm}/BmButtonP.h | 0 .../xfe/XfeWidgets/{Xfe => XfeBm}/BmCascade.c | 0 .../xfe/XfeWidgets/{Xfe => XfeBm}/BmCascade.h | 0 .../XfeWidgets/{Xfe => XfeBm}/BmCascadeP.h | 0 mozilla/cmd/xfe/XfeWidgets/XfeBm/Makefile | 50 +++++++++++++++++++ mozilla/cmd/xfe/XfeWidgets/XfeTest/Makefile | 3 +- mozilla/cmd/xfe/XfeWidgets/XfeTest/XfeTest.h | 2 + mozilla/cmd/xfe/XfeWidgets/XfeWidgets.mk | 17 +++++++ mozilla/cmd/xfe/XfeWidgets/tests/Makefile | 1 + mozilla/cmd/xfe/XfeWidgets/tests/Xfe/Makefile | 4 +- .../cmd/xfe/XfeWidgets/tests/XfeBm/Makefile | 42 ++++++++++++++++ .../tests/{Xfe => XfeBm}/MenuTest.ad | 0 .../tests/{Xfe => XfeBm}/MenuTest.c | 0 mozilla/cmd/xfe/XfeWidgets/tests/XmL/Makefile | 1 + mozilla/cmd/xfe/src/BookmarkBase.cpp | 2 + mozilla/cmd/xfe/src/BookmarkMenu.cpp | 2 + mozilla/cmd/xfe/src/Button.cpp | 1 + mozilla/cmd/xfe/src/Makefile | 1 + mozilla/cmd/xfe/src/Menu.cpp | 1 + 25 files changed, 136 insertions(+), 16 deletions(-) rename mozilla/cmd/xfe/XfeWidgets/{Xfe => XfeBm}/BmButton.c (100%) rename mozilla/cmd/xfe/XfeWidgets/{Xfe => XfeBm}/BmButton.h (100%) rename mozilla/cmd/xfe/XfeWidgets/{Xfe => XfeBm}/BmButtonP.h (100%) rename mozilla/cmd/xfe/XfeWidgets/{Xfe => XfeBm}/BmCascade.c (100%) rename mozilla/cmd/xfe/XfeWidgets/{Xfe => XfeBm}/BmCascade.h (100%) rename mozilla/cmd/xfe/XfeWidgets/{Xfe => XfeBm}/BmCascadeP.h (100%) create mode 100644 mozilla/cmd/xfe/XfeWidgets/XfeBm/Makefile create mode 100644 mozilla/cmd/xfe/XfeWidgets/tests/XfeBm/Makefile rename mozilla/cmd/xfe/XfeWidgets/tests/{Xfe => XfeBm}/MenuTest.ad (100%) rename mozilla/cmd/xfe/XfeWidgets/tests/{Xfe => XfeBm}/MenuTest.c (100%) diff --git a/mozilla/cmd/xfe/Makefile b/mozilla/cmd/xfe/Makefile index ce54064774b..76232baa986 100644 --- a/mozilla/cmd/xfe/Makefile +++ b/mozilla/cmd/xfe/Makefile @@ -73,9 +73,10 @@ DIRS = \ Microline3.0/XmL \ $(NULL) -REQUIRES = \ - XfeWidgets \ - Microline \ +REQUIRES =\ + XfeWidgets \ + XfeBm \ + Microline \ addr \ applet \ img \ @@ -195,8 +196,9 @@ GARBAGE += e_kit_resources.h cxxlink-filter ICONS_LIB = $(DIST)/lib/lib$(LITE_PREFIX)xfeicons.a -DTWIDGETS_LIB = $(DIST)/lib/libDtWidgets.a -XFE_WIDGETS_LIB = $(DIST)/lib/libXfeWidgets.a +DTWIDGETS_LIB = $(DIST)/lib/libDtWidgets.a +XFE_WIDGETS_LIB = $(DIST)/lib/libXfeWidgets.a +XFE_WIDGETS_BM_LIB = $(DIST)/lib/libXfeBm.a ifeq ($(OS_ARCH),AIX) NSPR_LIB = @@ -224,6 +226,7 @@ BASIC_LIBS = \ $(MICROLINE_LIB) \ $(ICONS_LIB) \ $(DTWIDGETS_LIB) \ + $(XFE_WIDGETS_BM_LIB) \ $(XFE_WIDGETS_LIB) \ $(DIST)/lib/libxlate.a \ $(DIST)/lib/lib$(LITE_PREFIX)net.a \ @@ -792,6 +795,9 @@ $(DTWIDGETS_LIB): $(XFE_WIDGETS_LIB): cd XfeWidgets/Xfe; $(MAKE) +$(XFE_WIDGETS_BM_LIB): + cd XfeWidgets/XfeBm; $(MAKE) + $(XFE2_LIB): cd src; $(MAKE) diff --git a/mozilla/cmd/xfe/XfeWidgets/Makefile b/mozilla/cmd/xfe/XfeWidgets/Makefile index d6183a6a786..bc2c364b10b 100644 --- a/mozilla/cmd/xfe/XfeWidgets/Makefile +++ b/mozilla/cmd/xfe/XfeWidgets/Makefile @@ -35,6 +35,7 @@ endif DIRS = \ Xfe \ + XfeBm \ $(TEST_DIRS) include $(DEPTH)/config/rules.mk diff --git a/mozilla/cmd/xfe/XfeWidgets/Xfe/Makefile b/mozilla/cmd/xfe/XfeWidgets/Xfe/Makefile index 3a5aa62ab36..2474d928eb0 100644 --- a/mozilla/cmd/xfe/XfeWidgets/Xfe/Makefile +++ b/mozilla/cmd/xfe/XfeWidgets/Xfe/Makefile @@ -78,8 +78,6 @@ CSRCS = \ $(DEMO_CSRCS) \ $(UNUSED_CSRCS) \ Arrow.c \ - BmButton.c \ - BmCascade.c \ Button.c \ BypassShell.c \ CallProcs.c \ @@ -129,10 +127,6 @@ EXPORTS = \ $(UNUSED_EXPORTS) \ Arrow.h \ ArrowP.h \ - BmButton.h \ - BmButtonP.h \ - BmCascade.h \ - BmCascadeP.h \ Button.h \ ButtonP.h \ BypassShell.h \ diff --git a/mozilla/cmd/xfe/XfeWidgets/Xfe/XfeAll.h b/mozilla/cmd/xfe/XfeWidgets/Xfe/XfeAll.h index b33080578ec..9581b696b7e 100644 --- a/mozilla/cmd/xfe/XfeWidgets/Xfe/XfeAll.h +++ b/mozilla/cmd/xfe/XfeWidgets/Xfe/XfeAll.h @@ -28,8 +28,6 @@ #define _XfeAll_h_ #include -#include -#include #include #include #include diff --git a/mozilla/cmd/xfe/XfeWidgets/Xfe/BmButton.c b/mozilla/cmd/xfe/XfeWidgets/XfeBm/BmButton.c similarity index 100% rename from mozilla/cmd/xfe/XfeWidgets/Xfe/BmButton.c rename to mozilla/cmd/xfe/XfeWidgets/XfeBm/BmButton.c diff --git a/mozilla/cmd/xfe/XfeWidgets/Xfe/BmButton.h b/mozilla/cmd/xfe/XfeWidgets/XfeBm/BmButton.h similarity index 100% rename from mozilla/cmd/xfe/XfeWidgets/Xfe/BmButton.h rename to mozilla/cmd/xfe/XfeWidgets/XfeBm/BmButton.h diff --git a/mozilla/cmd/xfe/XfeWidgets/Xfe/BmButtonP.h b/mozilla/cmd/xfe/XfeWidgets/XfeBm/BmButtonP.h similarity index 100% rename from mozilla/cmd/xfe/XfeWidgets/Xfe/BmButtonP.h rename to mozilla/cmd/xfe/XfeWidgets/XfeBm/BmButtonP.h diff --git a/mozilla/cmd/xfe/XfeWidgets/Xfe/BmCascade.c b/mozilla/cmd/xfe/XfeWidgets/XfeBm/BmCascade.c similarity index 100% rename from mozilla/cmd/xfe/XfeWidgets/Xfe/BmCascade.c rename to mozilla/cmd/xfe/XfeWidgets/XfeBm/BmCascade.c diff --git a/mozilla/cmd/xfe/XfeWidgets/Xfe/BmCascade.h b/mozilla/cmd/xfe/XfeWidgets/XfeBm/BmCascade.h similarity index 100% rename from mozilla/cmd/xfe/XfeWidgets/Xfe/BmCascade.h rename to mozilla/cmd/xfe/XfeWidgets/XfeBm/BmCascade.h diff --git a/mozilla/cmd/xfe/XfeWidgets/Xfe/BmCascadeP.h b/mozilla/cmd/xfe/XfeWidgets/XfeBm/BmCascadeP.h similarity index 100% rename from mozilla/cmd/xfe/XfeWidgets/Xfe/BmCascadeP.h rename to mozilla/cmd/xfe/XfeWidgets/XfeBm/BmCascadeP.h diff --git a/mozilla/cmd/xfe/XfeWidgets/XfeBm/Makefile b/mozilla/cmd/xfe/XfeWidgets/XfeBm/Makefile new file mode 100644 index 00000000000..85216fe3fe4 --- /dev/null +++ b/mozilla/cmd/xfe/XfeWidgets/XfeBm/Makefile @@ -0,0 +1,50 @@ +#!gmake +# +# The contents of this file are subject to the Netscape Public License +# Version 1.0 (the "NPL"); you may not use this file except in +# compliance with the NPL. You may obtain a copy of the NPL at +# http://www.mozilla.org/NPL/ +# +# Software distributed under the NPL is distributed on an "AS IS" basis, +# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL +# for the specific language governing rights and limitations under the +# NPL. +# +# The Initial Developer of this code under the NPL is Netscape +# Communications Corporation. Portions created by Netscape are +# Copyright (C) 1998 Netscape Communications Corporation. All Rights +# Reserved. + + +########################################################################## +# +# Name: Makefile +# Description: Makefile for XfeBm library. +# Author: Ramiro Estrugo +# +########################################################################## + +DEPTH = ../../../.. + +# XfeWidgets headers are exported to dist/public/XfeWidgets/Xfe +MODULE = XfeWidgets/Xfe + +LIBRARY_NAME = XfeBm + +CSRCS = \ + BmButton.c \ + BmCascade.c \ + $(NULL) + +REQUIRES =\ + XfeWidgets \ + XfeBm + +EXPORTS = \ + BmButton.h \ + BmButtonP.h \ + BmCascade.h \ + BmCascadeP.h \ + $(NULL) + +include $(DEPTH)/config/rules.mk diff --git a/mozilla/cmd/xfe/XfeWidgets/XfeTest/Makefile b/mozilla/cmd/xfe/XfeWidgets/XfeTest/Makefile index 19a9ea384a6..b7625a6aa55 100644 --- a/mozilla/cmd/xfe/XfeWidgets/XfeTest/Makefile +++ b/mozilla/cmd/xfe/XfeWidgets/XfeTest/Makefile @@ -45,7 +45,8 @@ CSRCS = \ REQUIRES = \ XfeTest \ - XfeWidgets + XfeWidgets \ + XfeBm EXPORTS = \ XfeTest.h \ diff --git a/mozilla/cmd/xfe/XfeWidgets/XfeTest/XfeTest.h b/mozilla/cmd/xfe/XfeWidgets/XfeTest/XfeTest.h index 950858a0626..3d69f409ed8 100644 --- a/mozilla/cmd/xfe/XfeWidgets/XfeTest/XfeTest.h +++ b/mozilla/cmd/xfe/XfeWidgets/XfeTest/XfeTest.h @@ -33,6 +33,8 @@ #include #include +#include +#include #include diff --git a/mozilla/cmd/xfe/XfeWidgets/XfeWidgets.mk b/mozilla/cmd/xfe/XfeWidgets/XfeWidgets.mk index 8ead2fba91d..3ca7d438bd7 100644 --- a/mozilla/cmd/xfe/XfeWidgets/XfeWidgets.mk +++ b/mozilla/cmd/xfe/XfeWidgets/XfeWidgets.mk @@ -58,6 +58,13 @@ XFE_STATIC_TEST_LIB = $(DIST)/lib/libXfeTest.a XFE_SHARED_TEST_LIB = $(DIST)/bin/libXfeTest.$(DLL_SUFFIX) XFE_TEST_REQUIRES = XfeTest +## +## Xfe Widgets Bm Library +## +XFE_STATIC_BM_LIB = $(DIST)/lib/libXfeBm.a +XFE_SHARED_BM_LIB = $(DIST)/bin/libXfeBm.$(DLL_SUFFIX) +XFE_BM_REQUIRES = XfeBm + ## ## Linux specific ## @@ -185,6 +192,16 @@ XFE_STATIC_LIBS += $(XFE_STATIC_TEST_LIB) endif +## +## XfeBm required ? +## +ifeq ($(filter $(REQUIRES),$(XFE_BM_REQUIRES)),$(XFE_BM_REQUIRES)) + +XFE_SHARED_LIBS += $(XFE_SHARED_BM_LIB) +XFE_STATIC_LIBS += $(XFE_STATIC_BM_LIB) + +endif + ## ## XfeWidgets required ? diff --git a/mozilla/cmd/xfe/XfeWidgets/tests/Makefile b/mozilla/cmd/xfe/XfeWidgets/tests/Makefile index 2679affff20..494f35f8a76 100644 --- a/mozilla/cmd/xfe/XfeWidgets/tests/Makefile +++ b/mozilla/cmd/xfe/XfeWidgets/tests/Makefile @@ -28,6 +28,7 @@ DEPTH = ../../../.. DIRS = \ Xfe \ + XfeBm \ XmL include $(DEPTH)/config/rules.mk diff --git a/mozilla/cmd/xfe/XfeWidgets/tests/Xfe/Makefile b/mozilla/cmd/xfe/XfeWidgets/tests/Xfe/Makefile index 43484d16255..e4cdc377e55 100644 --- a/mozilla/cmd/xfe/XfeWidgets/tests/Xfe/Makefile +++ b/mozilla/cmd/xfe/XfeWidgets/tests/Xfe/Makefile @@ -44,7 +44,6 @@ CSRCS = \ DashBoardTest.c \ LabelTest.c \ LogoTest.c \ - MenuTest.c \ PaneTestOne.c \ PaneTestThree.c \ PaneTestTwo.c \ @@ -59,7 +58,8 @@ CSRCS = \ REQUIRES = \ XfeTest \ - XfeWidgets + XfeWidgets \ + XfeBm STATIC_PROGS = $(addprefix $(OBJDIR)/, $(CSRCS:.c=.static)) SHARED_PROGS = $(addprefix $(OBJDIR)/, $(CSRCS:.c=.shared)) diff --git a/mozilla/cmd/xfe/XfeWidgets/tests/XfeBm/Makefile b/mozilla/cmd/xfe/XfeWidgets/tests/XfeBm/Makefile new file mode 100644 index 00000000000..1684074e121 --- /dev/null +++ b/mozilla/cmd/xfe/XfeWidgets/tests/XfeBm/Makefile @@ -0,0 +1,42 @@ +#! gmake +# +# The contents of this file are subject to the Netscape Public License +# Version 1.0 (the "NPL"); you may not use this file except in +# compliance with the NPL. You may obtain a copy of the NPL at +# http://www.mozilla.org/NPL/ +# +# Software distributed under the NPL is distributed on an "AS IS" basis, +# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL +# for the specific language governing rights and limitations under the +# NPL. +# +# The Initial Developer of this code under the NPL is Netscape +# Communications Corporation. Portions created by Netscape are +# Copyright (C) 1998 Netscape Communications Corporation. All Rights +# Reserved. + + +# + +DEPTH = ../../../../.. + +CSRCS = \ + MenuTest.c \ + $(NULL) + +REQUIRES = \ + XfeTest \ + XfeBm \ + XfeWidgets + +STATIC_PROGS = $(addprefix $(OBJDIR)/, $(CSRCS:.c=.static)) +SHARED_PROGS = $(addprefix $(OBJDIR)/, $(CSRCS:.c=.shared)) + +include $(DEPTH)/config/rules.mk +include $(DEPTH)/cmd/xfe/XfeWidgets/XfeWidgets.mk + +all:: $(STATIC_PROGS) $(SHARED_PROGS) +install:: $(STATIC_PROGS) $(SHARED_PROGS) + +shared: $(SHARED_PROGS) +static: $(STATIC_PROGS) diff --git a/mozilla/cmd/xfe/XfeWidgets/tests/Xfe/MenuTest.ad b/mozilla/cmd/xfe/XfeWidgets/tests/XfeBm/MenuTest.ad similarity index 100% rename from mozilla/cmd/xfe/XfeWidgets/tests/Xfe/MenuTest.ad rename to mozilla/cmd/xfe/XfeWidgets/tests/XfeBm/MenuTest.ad diff --git a/mozilla/cmd/xfe/XfeWidgets/tests/Xfe/MenuTest.c b/mozilla/cmd/xfe/XfeWidgets/tests/XfeBm/MenuTest.c similarity index 100% rename from mozilla/cmd/xfe/XfeWidgets/tests/Xfe/MenuTest.c rename to mozilla/cmd/xfe/XfeWidgets/tests/XfeBm/MenuTest.c diff --git a/mozilla/cmd/xfe/XfeWidgets/tests/XmL/Makefile b/mozilla/cmd/xfe/XfeWidgets/tests/XmL/Makefile index ef4c1f0296f..c7c11114582 100644 --- a/mozilla/cmd/xfe/XfeWidgets/tests/XmL/Makefile +++ b/mozilla/cmd/xfe/XfeWidgets/tests/XmL/Makefile @@ -31,6 +31,7 @@ CSRCS = \ REQUIRES = \ XfeWidgets \ + XfeBm \ XfeTest \ Microline diff --git a/mozilla/cmd/xfe/src/BookmarkBase.cpp b/mozilla/cmd/xfe/src/BookmarkBase.cpp index 03a3295ca3e..f8bf17a7a2b 100644 --- a/mozilla/cmd/xfe/src/BookmarkBase.cpp +++ b/mozilla/cmd/xfe/src/BookmarkBase.cpp @@ -39,6 +39,8 @@ #include "intl_csi.h" #include +#include +#include #include #include diff --git a/mozilla/cmd/xfe/src/BookmarkMenu.cpp b/mozilla/cmd/xfe/src/BookmarkMenu.cpp index 68c1bfc23da..a5018ad89ef 100644 --- a/mozilla/cmd/xfe/src/BookmarkMenu.cpp +++ b/mozilla/cmd/xfe/src/BookmarkMenu.cpp @@ -29,6 +29,8 @@ #include "bkmks.h" #include +#include +#include #define IS_CASCADE(w) (XmIsCascadeButton(w) || XmIsCascadeButtonGadget(w)) #define IS_PUSH(w) (XmIsPushButton(w) || XmIsPushButtonGadget(w)) diff --git a/mozilla/cmd/xfe/src/Button.cpp b/mozilla/cmd/xfe/src/Button.cpp index 098ad876586..1c2f892eeb7 100644 --- a/mozilla/cmd/xfe/src/Button.cpp +++ b/mozilla/cmd/xfe/src/Button.cpp @@ -30,6 +30,7 @@ #include #include +#include #include #include diff --git a/mozilla/cmd/xfe/src/Makefile b/mozilla/cmd/xfe/src/Makefile index 4788f61954d..08629e3b41a 100644 --- a/mozilla/cmd/xfe/src/Makefile +++ b/mozilla/cmd/xfe/src/Makefile @@ -27,6 +27,7 @@ LIBRARY_NAME = xfe2 REQUIRES =\ XfeWidgets \ + XfeBm \ Microline \ nspr \ layer \ diff --git a/mozilla/cmd/xfe/src/Menu.cpp b/mozilla/cmd/xfe/src/Menu.cpp index eba3a073244..90067704f87 100644 --- a/mozilla/cmd/xfe/src/Menu.cpp +++ b/mozilla/cmd/xfe/src/Menu.cpp @@ -45,6 +45,7 @@ #include #include +#include #include