Removing LIBJULIAN to use julian as standalone dll.

Adding ViewManager on a per 'container' basis.


git-svn-id: svn://10.0.0.236/trunk@9532 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
spider%netscape.com
1998-09-08 20:34:42 +00:00
parent 136fdedb42
commit 21ba3d6cb8
22 changed files with 102 additions and 31 deletions

View File

@@ -13,7 +13,7 @@
# are specifed as dependencies within rules.mk.
#
CFLAGS +=-D_IMPL_NS_CALENDAR -DLIBJULIAN -DNSPR20 -DNLS_DEFINE_STANDARD_TYPES=1
CFLAGS +=-D_IMPL_NS_CALENDAR -DNSPR20 -DNLS_DEFINE_STANDARD_TYPES=1
INCLUDES += -I../inc -I$(GDEPTH)/include

View File

@@ -13,7 +13,7 @@
# are specifed as dependencies within rules.mk.
#
CFLAGS +=-D_IMPL_NS_CALENDAR -DLIBJULIAN -DNSPR20
CFLAGS +=-D_IMPL_NS_CALENDAR -DNSPR20
INCLUDES += -I../inc -I$(GDEPTH)/include
LIBRARY_NAME = stream

View File

@@ -13,7 +13,7 @@
# are specifed as dependencies within rules.mk.
#
CFLAGS +=-D_IMPL_NS_CALENDAR -DLIBJULIAN -DNSPR20
CFLAGS +=-D_IMPL_NS_CALENDAR -DNSPR20
INCLUDES += -I../inc -I$(GDEPTH)/include -I$(GDEPTH)/htmlparser/src
LIBRARY_NAME = calxml

View File

@@ -13,7 +13,7 @@
# are specifed as dependencies within rules.mk.
#
CFLAGS +=-D_IMPL_NS_CALENDAR
CFLAGS +=-D_IMPL_NS_CALENDAR
LD_LIBS += \
raptorbase \

View File

@@ -13,7 +13,7 @@
# are specifed as dependencies within rules.mk.
#
CFLAGS +=-D_IMPL_NS_CALENDAR -DNSPR20
CFLAGS +=-D_IMPL_NS_CALENDAR -DNSPR20
INCLUDES += -I../inc -I$(GDEPTH)/include
LIBRARY_NAME = core

View File

@@ -29,6 +29,7 @@
#include "nsIStreamListener.h"
#include "nsIMenuManager.h"
#include "nsICalToolkit.h"
#include "nsIViewManager.h"
class nsCalendarContainer : public nsICalendarContainer {
@@ -87,6 +88,7 @@ private:
nsICalendarWidget * mCalendarWidget;
nsIXPFCCanvas * mRootUI;
nsICalToolkit * mToolkit;
nsIViewManager* mViewManager;
};

View File

@@ -13,7 +13,7 @@
# are specifed as dependencies within rules.mk.
#
CFLAGS +=-D_IMPL_NS_CALENDAR -DLIBJULIAN -DNSPR20 -I$(GDEPTH)/include
CFLAGS +=-D_IMPL_NS_CALENDAR -DNSPR20 -I$(GDEPTH)/include
PROGRAM = trex

View File

@@ -28,6 +28,8 @@
#include "nsCalShellCIID.h"
#include "nscalcids.h"
#include "nsBoxLayout.h"
#include "nsViewsCID.h"
#include "nsIViewManager.h"
// XXX: This code should use XML for defining the Root UI. We need to
// implement the stream manager first to do this, then lots of
@@ -42,6 +44,8 @@ static NS_DEFINE_IID(kCXPFCContentSink, NS_XPFCXMLCONTENTSINK_IID);
static NS_DEFINE_IID(kCXPFCCommandServerCID, NS_XPFC_COMMAND_SERVER_CID);
static NS_DEFINE_IID(kCXPFCHTMLCanvasCID, NS_XPFC_HTML_CANVAS_CID);
static NS_DEFINE_IID(kViewManagerCID, NS_VIEW_MANAGER_CID);
static NS_DEFINE_IID(kIViewManagerIID, NS_IVIEWMANAGER_IID);
// hardcode names of dll's
#ifdef NS_WIN32
@@ -65,6 +69,7 @@ nsCalendarContainer::nsCalendarContainer()
mRootUI = nsnull;
mToolkit = nsnull;
mToolbarManager = nsnull;
mViewManager = nsnull;
}
NS_IMPL_QUERY_INTERFACE(nsCalendarContainer, kICalContainerIID)
@@ -73,6 +78,7 @@ NS_IMPL_RELEASE(nsCalendarContainer)
nsCalendarContainer::~nsCalendarContainer()
{
NS_IF_RELEASE(mViewManager);
NS_IF_RELEASE(mMenuManager);
NS_IF_RELEASE(mCalendarWidget);
NS_IF_RELEASE(mRootUI);
@@ -119,6 +125,21 @@ nsresult nsCalendarContainer::Init(nsIWidget * aParent,
mMenuManager->Init();
/*
* Create the view manager
*/
res = nsRepository::CreateInstance(kViewManagerCID,
nsnull,
kIViewManagerIID,
(void **)&mViewManager);
if (NS_OK != res)
return res ;
mViewManager->Init(aParent->GetDeviceContext());
/*
* Create the Root UI
*/

View File

@@ -13,7 +13,7 @@
# are specifed as dependencies within rules.mk.
#
CFLAGS +=-D_IMPL_NS_TREXTEST -DNSPR20 -I$(GDEPTH)/include
CFLAGS +=-D_IMPL_NS_TREXTEST -DNSPR20 -I$(GDEPTH)/include
PROGRAM = trextest

View File

@@ -13,7 +13,7 @@
# are specifed as dependencies within rules.mk.
#
CFLAGS +=-D_IMPL_NS_CALENDAR -DLIBJULIAN -DNSPR20
CFLAGS +=-D_IMPL_NS_CALENDAR -DNSPR20
INCLUDES += -I../inc -I$(GDEPTH)/include
LIBRARY_NAME = canvas

View File

@@ -13,7 +13,7 @@
# are specifed as dependencies within rules.mk.
#
CFLAGS +=-D_IMPL_NS_CALENDAR -DLIBJULIAN -DNSPR20
CFLAGS +=-D_IMPL_NS_CALENDAR -DNSPR20
INCLUDES +=-I../inc -I$(GDEPTH)/include
LIBRARY_NAME = command

View File

@@ -13,7 +13,7 @@
# are specifed as dependencies within rules.mk.
#
CFLAGS +=-D_IMPL_NS_CALENDAR
CFLAGS +=-D_IMPL_NS_CALENDAR
INCLUDES +=-I../inc
LIBRARY_NAME = component

View File

@@ -13,7 +13,7 @@
# are specifed as dependencies within rules.mk.
#
CFLAGS +=-D_IMPL_NS_CALENDAR
CFLAGS +=-D_IMPL_NS_CALENDAR
LD_LIBS += \
raptorbase \

View File

@@ -13,7 +13,7 @@
# are specifed as dependencies within rules.mk.
#
CFLAGS +=-D_IMPL_NS_CALENDAR -DLIBJULIAN -DNSPR20
CFLAGS +=-D_IMPL_NS_CALENDAR -DNSPR20
INCLUDES +=-I../inc -I$(GDEPTH)/include
LIBRARY_NAME = context

View File

@@ -13,7 +13,7 @@
# are specifed as dependencies within rules.mk.
#
CFLAGS +=-D_IMPL_NS_CALENDAR -DLIBJULIAN -DNSPR20
CFLAGS +=-D_IMPL_NS_CALENDAR -DNSPR20
INCLUDES +=-I../inc -I$(GDEPTH)/include
LIBRARY_NAME = controller

View File

@@ -13,7 +13,7 @@
# are specifed as dependencies within rules.mk.
#
CFLAGS +=-D_IMPL_NS_CALENDAR -DNSPR20
CFLAGS +=-D_IMPL_NS_CALENDAR -DNSPR20
INCLUDES += -I../inc -I$(GDEPTH)/include
LIBRARY_NAME = core

View File

@@ -13,7 +13,7 @@
# are specifed as dependencies within rules.mk.
#
CFLAGS +=-D_IMPL_NS_CALENDAR
CFLAGS +=-D_IMPL_NS_CALENDAR
INCLUDES +=-I../inc -I$(GDEPTH)/include
LIBRARY_NAME = toolkit

View File

@@ -13,7 +13,7 @@
# are specifed as dependencies within rules.mk.
#
CFLAGS +=-D_IMPL_NS_CALENDAR -DLIBJULIAN -DNSPR20
CFLAGS +=-D_IMPL_NS_CALENDAR -DNSPR20
INCLUDES +=-I../inc -I$(GDEPTH)/include
LIBRARY_NAME = util

View File

@@ -40,11 +40,14 @@
#include "nsIImageGroup.h"
#include "nsIImageObserver.h"
#include "nsIImageRequest.h"
#include "nsIView.h"
#include "nsIViewObserver.h"
CLASS_EXPORT_XPFC nsXPFCCanvas : public nsIXPFCCanvas,
public nsIXPFCObserver,
public nsIXMLParserObject,
public nsIImageRequestObserver
public nsIImageRequestObserver,
public nsIViewObserver
{
public:
@@ -225,6 +228,18 @@ public:
virtual void NotifyError(nsIImageRequest *aImageRequest,
nsImageError aErrorType);
// nsIViewObserver Interfaces
NS_IMETHOD Paint(nsIView * aView,
nsIRenderingContext& aRenderingContext,
const nsRect& aDirtyRect);
NS_IMETHOD HandleEvent(nsIView * aView,
nsGUIEvent* aEvent,
nsEventStatus& aEventStatus);
NS_IMETHOD Scrolled(nsIView * aView);
NS_IMETHOD ResizeReflow(nsIView * aView, nscoord aWidth, nscoord aHeight);
#if defined(DEBUG) && defined(XP_PC)
NS_IMETHOD DumpCanvas(FILE * f, PRUint32 indent) ;
#endif

View File

@@ -40,6 +40,7 @@ include config.mk
include $(GDEPTH)/gconfig/ruleset.mk
include $(GDEPTH)/gconfig/rules.mk
#######################################################################
# (6) Execute "component" rules. (OPTIONAL) #
#######################################################################
@@ -50,4 +51,3 @@ include $(GDEPTH)/gconfig/rules.mk
# (7) Execute "local" rules. (OPTIONAL). #
#######################################################################

View File

@@ -22,3 +22,4 @@ LIBRARY_VERSION = 10
ARCHIVE_ONLY = 1
TARGETS = $(LIBRARY)

View File

@@ -39,6 +39,7 @@
#include "nsXPFCMethodInvokerCommand.h"
#include "nsXPFCToolkit.h"
#include "nsIViewObserver.h"
#include "nsIButton.h"
#include "nsITabWidget.h"
@@ -142,10 +143,11 @@ nsresult nsXPFCCanvas::AggregatedQueryInterface(const nsIID &aIID,
return NS_ERROR_NULL_POINTER;
}
static NS_DEFINE_IID(kCXPFCCanvasIID, NS_XPFC_CANVAS_CID);
static NS_DEFINE_IID(kIXPFCCanvasIID, NS_IXPFC_CANVAS_IID);
static NS_DEFINE_IID(kISupportsIID, NS_ISUPPORTS_IID);
static NS_DEFINE_IID(kClassIID, kIXPFCCanvasIID);
static NS_DEFINE_IID(kCXPFCCanvasIID, NS_XPFC_CANVAS_CID);
static NS_DEFINE_IID(kIXPFCCanvasIID, NS_IXPFC_CANVAS_IID);
static NS_DEFINE_IID(kIViewObserverIID, NS_IVIEWOBSERVER_IID);
static NS_DEFINE_IID(kISupportsIID, NS_ISUPPORTS_IID);
static NS_DEFINE_IID(kClassIID, kIXPFCCanvasIID);
if (aIID.Equals(kClassIID)) {
*aInstancePtr = (void*)((nsIXPFCCanvas*)this);
@@ -167,6 +169,11 @@ nsresult nsXPFCCanvas::AggregatedQueryInterface(const nsIID &aIID,
AddRef();
return NS_OK;
}
if (aIID.Equals(kIViewObserverIID)) {
*aInstancePtr = (void*)((nsIViewObserver*)this);
AddRef();
return NS_OK;
}
if (aIID.Equals(kISupportsIID)) {
*aInstancePtr = (void*) ((nsISupports *)&fAggregated);
AddRef();
@@ -2009,19 +2016,44 @@ PRBool nsXPFCCanvas::PopState(nsIRenderingContext * aRenderingContext)
return (aRenderingContext->PopState());
}
void
nsXPFCCanvas::Notify(nsIImageRequest *aImageRequest,
nsIImage *aImage,
nsImageNotification aNotificationType,
PRInt32 aParam1, PRInt32 aParam2,
void *aParam3)
void nsXPFCCanvas::Notify(nsIImageRequest *aImageRequest,
nsIImage *aImage,
nsImageNotification aNotificationType,
PRInt32 aParam1, PRInt32 aParam2,
void *aParam3)
{
return ;
}
void
nsXPFCCanvas::NotifyError(nsIImageRequest *aImageRequest,
nsImageError aErrorType)
void nsXPFCCanvas::NotifyError(nsIImageRequest *aImageRequest,
nsImageError aErrorType)
{
return ;
}
nsresult nsXPFCCanvas::Paint(nsIView * aView,
nsIRenderingContext& aRenderingContext,
const nsRect& aDirtyRect)
{
return NS_OK;
}
nsresult nsXPFCCanvas::HandleEvent(nsIView * aView,
nsGUIEvent* aEvent,
nsEventStatus& aEventStatus)
{
return NS_OK;
}
nsresult nsXPFCCanvas::Scrolled(nsIView * aView)
{
return NS_OK;
}
nsresult nsXPFCCanvas::ResizeReflow(nsIView * aView, nscoord aWidth, nscoord aHeight)
{
return NS_OK;
}