changes for cocoa product to build and run and coexist in the tree with carbon. r=cls/sr=hyatt, bug# 111230

This commit is contained in:
pinkerton%netscape.com 2002-01-25 22:01:41 +00:00
parent 8c3fe11744
commit cb46d68a19
8 changed files with 24 additions and 12 deletions

View File

@ -520,6 +520,7 @@ widget/src/gtksuperwin/Makefile
widget/src/gtkxtbin/Makefile
widget/src/photon/Makefile
widget/src/mac/Makefile
widget/src/cocoa/Makefile
widget/src/xlib/Makefile
widget/src/os2/Makefile
widget/src/os2/res/Makefile

View File

@ -432,13 +432,15 @@ nsDeviceContextMac :: FindScreenForSurface ( nsIScreen** outScreen )
return;
}
// we have a widget stashed inside, get a native WindowRef out of it
nsIWidget* widget = reinterpret_cast<nsIWidget*>(mWidget); // PRAY!
NS_ASSERTION ( widget, "No Widget --> No Window" );
if ( !widget ) {
NS_IF_ADDREF(*outScreen = mPrimaryScreen.get()); // bail out with the main screen just to be safe.
return;
}
}
#if !MOZ_WIDGET_COCOA
// we have a widget stashed inside, get a native WindowRef out of it
WindowRef window = reinterpret_cast<WindowRef>(widget->GetNativeData(NS_NATIVE_DISPLAY));
StPortSetter setter(window);
@ -467,6 +469,10 @@ nsDeviceContextMac :: FindScreenForSurface ( nsIScreen** outScreen )
}
else
*outScreen = nsnull;
#else
// in cocoa, we don't have a windowPtr! bail out with the main screen
NS_IF_ADDREF(*outScreen = mPrimaryScreen.get());
#endif
} // FindScreenForSurface

View File

@ -3841,10 +3841,9 @@ nsCSSFrameConstructor::HasGfxScrollbars()
}
}
//return mHasGfxScrollbars;
// we no longer support native scrollbars. Except in form elements. So
// we always return true
return PR_TRUE;
// while we don't support native scrollbars for Seamonkey, some embedding
// clients demand them (but may still want XUL). Give them that option.
return mHasGfxScrollbars;
}
PRBool

View File

@ -3841,10 +3841,9 @@ nsCSSFrameConstructor::HasGfxScrollbars()
}
}
//return mHasGfxScrollbars;
// we no longer support native scrollbars. Except in form elements. So
// we always return true
return PR_TRUE;
// while we don't support native scrollbars for Seamonkey, some embedding
// clients demand them (but may still want XUL). Give them that option.
return mHasGfxScrollbars;
}
PRBool

View File

@ -31,7 +31,7 @@
#include "nsIPref.h"
#include "prmem.h"
#ifdef XP_MAC
#if defined(XP_MAC) || defined(XP_MACOSX)
#include "nsBrowserWindow.h"
#define NS_IMPL_IDS
#else

View File

@ -214,6 +214,13 @@ CPPSRCS += nsNativeAppSupportWin.cpp nsNativeAppSupportBase.cpp
OS_LIBS += comctl32.lib comdlg32.lib uuid.lib shell32.lib ole32.lib oleaut32.lib version.lib winspool.lib
endif
ifeq ($(MOZ_WIDGET_TOOLKIT),cocoa)
CMMSRCS += nsNativeAppSupportCocoa.mm
LDFLAGS += \
-framework Cocoa \
$(NULL)
endif
XP_DIST_DEP_LIBS := $(filter-out -L$(DIST)/bin -L$(DIST)/lib, $(XP_DIST_LIBS))
ifeq ($(OS_ARCH),OS2)

View File

@ -279,7 +279,7 @@ static const char sWatcherServiceContractID[] = "@mozilla.org/embedcomp/window-w
/*********************************************/
// Default implemenations for nativeAppSupport
// If your platform implements these functions if def out this code.
#if !defined (XP_MAC ) && !defined(MOZ_WIDGET_PHOTON) && !defined( XP_PC ) && !defined( XP_BEOS ) && !defined(MOZ_WIDGET_GTK)
#if !defined (XP_MAC) && !defined(MOZ_WIDGET_COCOA) && !defined(MOZ_WIDGET_PHOTON) && !defined( XP_PC ) && !defined( XP_BEOS ) && !defined(MOZ_WIDGET_GTK)
nsresult NS_CreateSplashScreen( nsISplashScreen **aResult )
{