diff --git a/mozilla/widget/src/xlib/nsAppShell.cpp b/mozilla/widget/src/xlib/nsAppShell.cpp index f2aaeaa6c9f..fdd21d04125 100644 --- a/mozilla/widget/src/xlib/nsAppShell.cpp +++ b/mozilla/widget/src/xlib/nsAppShell.cpp @@ -63,9 +63,7 @@ #include "nsIDragSessionXlib.h" #include "nsITimer.h" -#ifndef MOZ_MONOLITHIC_TOOLKIT #include "nsIXlibWindowService.h" -#endif /* !MOZ_MONOLITHIC_TOOLKIT */ #include "xlibrgb.h" @@ -76,18 +74,14 @@ static NS_DEFINE_IID(kIEventQueueServiceIID, NS_IEVENTQUEUESERVICE_IID); static NS_DEFINE_CID(kCmdLineServiceCID, NS_COMMANDLINE_SERVICE_CID); static NS_DEFINE_IID(kCDragServiceCID, NS_DRAGSERVICE_CID); -#ifndef MOZ_MONOLITHIC_TOOLKIT static NS_DEFINE_IID(kWindowServiceCID,NS_XLIB_WINDOW_SERVICE_CID); static NS_DEFINE_IID(kWindowServiceIID,NS_XLIB_WINDOW_SERVICE_IID); -#endif /* !MOZ_MONOLITHIC_TOOLKIT */ -#ifndef MOZ_MONOLITHIC_TOOLKIT // // this is so that we can get the timers in the base. most widget // // toolkits do this through some set of globals. not here though. we // // don't have that luxury extern "C" int NS_TimeToNextTimeout(struct timeval *); extern "C" void NS_ProcessTimeouts(void); -#endif /* !MOZ_MONOLITHIC_TOOLKIT */ PRBool nsAppShell::DieAppShellDie = PR_FALSE; PRBool nsAppShell::mClicked = PR_FALSE; @@ -143,7 +137,6 @@ static const char *event_names[] = "MappingNotify" }; -#ifndef MOZ_MONOLITHIC_TOOLKIT static nsXlibTimeToNextTimeoutFunc GetTimeToNextTimeoutFunc(void) { static nsXlibTimeToNextTimeoutFunc sFunc = nsnull; @@ -219,13 +212,9 @@ static nsXlibProcessTimeoutsProc GetProcessTimeoutsProc(void) return sProc; } -#endif static int CallTimeToNextTimeoutFunc(struct timeval * aTimeval) { -#ifdef MOZ_MONOLITHIC_TOOLKIT - return NS_TimeToNextTimeout(aTimeval); -#else nsXlibTimeToNextTimeoutFunc func = GetTimeToNextTimeoutFunc(); if (func) @@ -234,21 +223,16 @@ static int CallTimeToNextTimeoutFunc(struct timeval * aTimeval) } return 0; -#endif /* MOZ_MONOLITHIC_TOOLKIT */ } static void CallProcessTimeoutsProc(Display *aDisplay) { -#ifdef MOZ_MONOLITHIC_TOOLKIT - NS_ProcessTimeouts(); -#else nsXlibProcessTimeoutsProc proc = GetProcessTimeoutsProc(); if (proc) { (*proc)(aDisplay); } -#endif /* MOZ_MONOLITHIC_TOOLKIT */ } #define COMPARE_FLAG1( a,b) ((b)[0]=='-' && !strcmp((a), &(b)[1])) diff --git a/mozilla/widget/timer/src/beos/nsTimerBeOS.cpp b/mozilla/widget/timer/src/beos/nsTimerBeOS.cpp index e047fcb0b9e..5afcd023ce3 100644 --- a/mozilla/widget/timer/src/beos/nsTimerBeOS.cpp +++ b/mozilla/widget/timer/src/beos/nsTimerBeOS.cpp @@ -447,18 +447,3 @@ void nsTimerBeOS::Cancel() #endif } -#ifdef MOZ_MONOLITHIC_TOOLKIT -nsresult NS_NewTimer(nsITimer** aInstancePtrResult) -{ - NS_PRECONDITION(nsnull != aInstancePtrResult, "null ptr"); - if(nsnull == aInstancePtrResult) - return NS_ERROR_NULL_POINTER; - - nsTimerBeOS *timer = new nsTimerBeOS(); - if(nsnull == timer) - return NS_ERROR_OUT_OF_MEMORY; - - return timer->QueryInterface(kITimerIID, (void **) aInstancePtrResult); -} -#endif - diff --git a/mozilla/widget/timer/src/unix/gtk/nsTimerGtk.cpp b/mozilla/widget/timer/src/unix/gtk/nsTimerGtk.cpp index 290c0d88bf4..999e0973004 100644 --- a/mozilla/widget/timer/src/unix/gtk/nsTimerGtk.cpp +++ b/mozilla/widget/timer/src/unix/gtk/nsTimerGtk.cpp @@ -453,28 +453,3 @@ void nsTimerGtk::Cancel() } } -#ifdef MOZ_MONOLITHIC_TOOLKIT -nsresult NS_NewTimer(nsITimer** aInstancePtrResult) -{ - NS_PRECONDITION(nsnull != aInstancePtrResult, "null ptr"); - if (nsnull == aInstancePtrResult) { - return NS_ERROR_NULL_POINTER; - } - - nsTimerGtk *timer = new nsTimerGtk(); - if (nsnull == timer) { - return NS_ERROR_OUT_OF_MEMORY; - } - - return timer->QueryInterface(kITimerIID, (void **) aInstancePtrResult); -} - -int NS_TimeToNextTimeout(struct timeval *aTimer) -{ - return 0; -} - -void NS_ProcessTimeouts(void) -{ -} -#endif /* MOZ_MONOLITHIC_TOOLKIT */ diff --git a/mozilla/widget/timer/src/unix/photon/nsTimerPh.cpp b/mozilla/widget/timer/src/unix/photon/nsTimerPh.cpp index 99be84c5e75..1666ae260c4 100644 --- a/mozilla/widget/timer/src/unix/photon/nsTimerPh.cpp +++ b/mozilla/widget/timer/src/unix/photon/nsTimerPh.cpp @@ -336,30 +336,3 @@ NS_METHOD nsTimerPh::SetupTimer() return NS_OK; } -#ifdef MOZ_MONOLITHIC_TOOLKIT -nsresult NS_NewTimer(nsITimer** aInstancePtrResult) -{ - NS_PRECONDITION(nsnull != aInstancePtrResult, "null ptr"); - if (nsnull == aInstancePtrResult) - { - return NS_ERROR_NULL_POINTER; - } - - nsTimerPh *timer = new nsTimerPh(); - if (nsnull == timer) - { - return NS_ERROR_OUT_OF_MEMORY; - } - - return CallQueryInterface(timer, aInstancePtrResult); -} - -int NS_TimeToNextTimeout(struct timeval *aTimer) -{ - return 0; -} - -void NS_ProcessTimeouts(void) -{ -} -#endif /* MOZ_MONOLITHIC_TOOLKIT */ diff --git a/mozilla/widget/timer/src/unix/qt/nsTimerQt.cpp b/mozilla/widget/timer/src/unix/qt/nsTimerQt.cpp index 3b5e8c3d4e9..315a4ab27b5 100644 --- a/mozilla/widget/timer/src/unix/qt/nsTimerQt.cpp +++ b/mozilla/widget/timer/src/unix/qt/nsTimerQt.cpp @@ -157,26 +157,3 @@ printf("JCG: nsTimerQT::Cancel (%p) ID: %d\n",this,mTimerID); } } -#ifdef MOZ_MONOLITHIC_TOOLKIT -nsresult NS_NewTimer(nsITimer** aInstancePtrResult) -{ - NS_PRECONDITION(nsnull != aInstancePtrResult, "null ptr"); - if (nsnull == aInstancePtrResult) { - return NS_ERROR_NULL_POINTER; - } - nsTimerQt *timer = new nsTimerQt(); - if (nsnull == timer) { - return NS_ERROR_OUT_OF_MEMORY; - } - return timer->QueryInterface(kITimerIID,(void**)aInstancePtrResult); -} - -int NS_TimeToNextTimeout(struct timeval *aTimer) -{ - return 0; -} - -void NS_ProcessTimeouts(void) -{ -} -#endif /* MOZ_MONOLITHIC_TOOLKIT */ diff --git a/mozilla/widget/timer/src/unix/xlib/nsTimerXlib.cpp b/mozilla/widget/timer/src/unix/xlib/nsTimerXlib.cpp index 4381f1c6583..bd485fd0fca 100644 --- a/mozilla/widget/timer/src/unix/xlib/nsTimerXlib.cpp +++ b/mozilla/widget/timer/src/unix/xlib/nsTimerXlib.cpp @@ -38,10 +38,8 @@ #include "nsTimerXlib.h" -#ifndef MOZ_MONOLITHIC_TOOLKIT #include "nsIXlibWindowService.h" #include "nsIServiceManager.h" -#endif /* !MOZ_MONOLITHIC_TOOLKIT */ #include "nsVoidArray.h" #include @@ -53,13 +51,8 @@ static NS_DEFINE_IID(kITimerIID, NS_ITIMER_IID); -#ifndef MOZ_MONOLITHIC_TOOLKIT static int NS_TimeToNextTimeout(struct timeval *aTimer); static void NS_ProcessTimeouts(Display *aDisplay); -#else -extern "C" int NS_TimeToNextTimeout(struct timeval *aTimer); -extern "C" void NS_ProcessTimeouts(Display *aDisplay); -#endif /* !MOZ_MONOLITHIC_TOOLKIT */ nsVoidArray *nsTimerXlib::gHighestList = (nsVoidArray *)nsnull; nsVoidArray *nsTimerXlib::gHighList = (nsVoidArray *)nsnull; @@ -327,15 +320,12 @@ void nsTimerXlib::SetType(PRUint32 aType) } -#ifndef MOZ_MONOLITHIC_TOOLKIT static NS_DEFINE_IID(kWindowServiceCID,NS_XLIB_WINDOW_SERVICE_CID); static NS_DEFINE_IID(kWindowServiceIID,NS_XLIB_WINDOW_SERVICE_IID); -#endif /* !MOZ_MONOLITHIC_TOOLKIT */ nsresult nsTimerXlib::EnsureWindowService() { -#ifndef MOZ_MONOLITHIC_TOOLKIT nsIXlibWindowService * xlibWindowService = nsnull; nsresult rv = nsServiceManager::GetService(kWindowServiceCID, @@ -351,19 +341,13 @@ nsTimerXlib::EnsureWindowService() NS_RELEASE(xlibWindowService); } -#endif /* !MOZ_MONOLITHIC_TOOLKIT */ return NS_OK; } -#ifndef MOZ_MONOLITHIC_TOOLKIT static -#else -extern "C" -#endif /* !MOZ_MONOLITHIC_TOOLKIT */ int NS_TimeToNextTimeout(struct timeval *aTimer) { -#ifndef MOZ_MONOLITHIC_TOOLKIT static int once = 1; if (once) @@ -372,7 +356,6 @@ int NS_TimeToNextTimeout(struct timeval *aTimer) printf("NS_TimeToNextTimeout() lives!\n"); } -#endif /* !MOZ_MONOLITHIC_TOOLKIT */ nsTimerXlib *timer; @@ -426,15 +409,10 @@ int NS_TimeToNextTimeout(struct timeval *aTimer) } } -#ifndef MOZ_MONOLITHIC_TOOLKIT static -#else -extern "C" -#endif /* !MOZ_MONOLITHIC_TOOLKIT */ void NS_ProcessTimeouts(Display *aDisplay) { -#ifndef MOZ_MONOLITHIC_TOOLKIT static int once = 1; if (once) @@ -443,8 +421,6 @@ NS_ProcessTimeouts(Display *aDisplay) printf("NS_ProcessTimeouts() lives!\n"); } -#endif /* !MOZ_MONOLITHIC_TOOLKIT */ - nsTimerXlib::gProcessingTimer = PR_TRUE; @@ -468,19 +444,3 @@ NS_ProcessTimeouts(Display *aDisplay) nsTimerXlib::gProcessingTimer = PR_FALSE; } -#ifdef MOZ_MONOLITHIC_TOOLKIT -nsresult NS_NewTimer(nsITimer** aInstancePtrResult) -{ - NS_PRECONDITION(nsnull != aInstancePtrResult, "null ptr"); - if (nsnull == aInstancePtrResult) { - return NS_ERROR_NULL_POINTER; - } - - nsTimerXlib *timer = new nsTimerXlib(); - if (nsnull == timer) { - return NS_ERROR_OUT_OF_MEMORY; - } - - return timer->QueryInterface(kITimerIID, (void **) aInstancePtrResult); -} -#endif /* MOZ_MONOLITHIC_TOOLKIT */