diff --git a/config/autoconf.mk.in b/config/autoconf.mk.in index 9850fcd593ac..39be5a405cbb 100644 --- a/config/autoconf.mk.in +++ b/config/autoconf.mk.in @@ -623,15 +623,9 @@ HAS_OGLES = @HAS_OGLES@ MOZ_DISTRIBUTION_ID = @MOZ_DISTRIBUTION_ID@ -NS_OSSO = @NS_OSSO@ -MOZ_PLATFORM_HILDON = @MOZ_PLATFORM_HILDON@ - -LIBHILDONMIME_CFLAGS = @LIBHILDONMIME_CFLAGS@ -LIBHILDONMIME_LIBS = @LIBHILDONMIME_LIBS@ -LIBOSSO_CFLAGS = @LIBOSSO_CFLAGS@ -LIBOSSO_LIBS = @LIBOSSO_LIBS@ -LIBHILDONFM_CFLAGS = @LIBHILDONFM_CFLAGS@ -LIBHILDONFM_LIBS = @LIBHILDONFM_LIBS@ +MOZ_PLATFORM_MAEMO = @MOZ_PLATFORM_MAEMO@ +MOZ_PLATFORM_MAEMO_CFLAGS = @MOZ_PLATFORM_MAEMO_CFLAGS@ +MOZ_PLATFORM_MAEMO_LIBS = @MOZ_PLATFORM_MAEMO_LIBS@ MOZ_ENABLE_LIBCONIC = @MOZ_ENABLE_LIBCONIC@ LIBCONIC_CFLAGS = @LIBCONIC_CFLAGS@ diff --git a/config/system-headers b/config/system-headers index 890ead5340bc..d695f52f1297 100644 --- a/config/system-headers +++ b/config/system-headers @@ -1009,12 +1009,10 @@ hunspell.hxx #if MOZ_NATIVE_BZ2==1 bzlib.h #endif -#ifdef MOZ_PLATFORM_HILDON +#if (MOZ_PLATFORM_MAEMO == 5) hildon-uri.h hildon-mime.h hildon-file-chooser-dialog.h -#endif -#ifdef NS_OSSO libosso.h osso-mem.h #endif diff --git a/configure.in b/configure.in index 53e039e68b24..766d378c77f0 100644 --- a/configure.in +++ b/configure.in @@ -6408,47 +6408,78 @@ AC_SUBST(LIBCONIC_CFLAGS) AC_SUBST(LIBCONIC_LIBS) dnl ======================================================== -dnl = Hildon and OSSO checks +dnl = Maemo checks dnl ======================================================== -PKG_CHECK_MODULES(LIBHILDONMIME,libhildonmime, - MOZ_PLATFORM_HILDON=1, - MOZ_PLATFORM_HILDON=) -if test $MOZ_PLATFORM_HILDON; then - AC_DEFINE(MOZ_PLATFORM_HILDON) - X11_COMPOSITED_PLUGINS="yes" + +MAEMO_SDK_TARGET_VER=-1 + +MOZ_ARG_WITH_STRING(maemo-version, +[ --with-maemo-version=MAEMO_SDK_TARGET_VER + Maemo SDK Version], + MAEMO_SDK_TARGET_VER=$withval) + +case "$MAEMO_SDK_TARGET_VER" in +5) + MOZ_PLATFORM_MAEMO=5 + ;; + +6) + MOZ_PLATFORM_MAEMO=6 + ;; + +-1) + dnl We aren't compiling for Maemo, move on. + ;; +*) + AC_MSG_ERROR([Unknown Maemo Version. Try setting --with-maemo-version to 5 or 6.]) + ;; +esac + +if test $MOZ_PLATFORM_MAEMO; then + AC_DEFINE_UNQUOTED([MOZ_PLATFORM_MAEMO], $MOZ_PLATFORM_MAEMO) + + if test -z "$MOZ_ENABLE_DBUS"; then + AC_MSG_ERROR([DBus is required when building for Maemo]) + fi + + MOZ_GFX_OPTIMIZE_MOBILE=1 + MOZ_WEBGL_GLX= + + if test $MOZ_PLATFORM_MAEMO = 5; then + dnl if we have Xcomposite we should also have Xdamage and Xfixes + AC_CHECK_HEADERS([X11/extensions/Xdamage.h], [], + [AC_MSG_ERROR([Couldn't find X11/extensions/Xdamage.h which is required for composited plugins.])]) + AC_CHECK_LIB(Xcomposite, XCompositeRedirectWindow, [XCOMPOSITE_LIBS="-lXcomposite -lXdamage -lXfixes"], + [MISSING_X="$MISSING_X -lXcomposite"], $XLIBS) + + AC_SUBST(XCOMPOSITE_LIBS) + + PKG_CHECK_MODULES(LIBHILDONMIME,libhildonmime, _LIB_FOUND=1, _LIB_FOUND=) + MOZ_PLATFORM_MAEMO_LIBS="$MOZ_PLATFORM_MAEMO_LIBS $LIBHILDONMIME_LIBS" + MOZ_PLATFORM_MAEMO_CFLAGS="$MOZ_PLATFORM_MAEMO_CFLAGS $LIBHILDONMIME_CFLAGS" + if test -z "$_LIB_FOUND"; then + AC_MSG_ERROR([Hildon Mime is required when building for Maemo]) + fi + + + PKG_CHECK_MODULES(LIBOSSO,libosso, _LIB_FOUND=1, _LIB_FOUND=) + MOZ_PLATFORM_MAEMO_LIBS="$MOZ_PLATFORM_MAEMO_LIBS $LIBOSSO_LIBS" + MOZ_PLATFORM_MAEMO_CFLAGS="$MOZ_PLATFORM_MAEMO_CFLAGS $LIBOSSO_CFLAGS" + if test -z "$_LIB_FOUND"; then + AC_MSG_ERROR([LibOSSO is required when building for Maemo]) + fi + + PKG_CHECK_MODULES(LIBHILDONFM,hildon-fm-2, _LIB_FOUND=1, _LIB_FOUND=) + MOZ_PLATFORM_MAEMO_LIBS="$MOZ_PLATFORM_MAEMO_LIBS $LIBHILDONFM_LIBS" + MOZ_PLATFORM_MAEMO_CFLAGS="$MOZ_PLATFORM_MAEMO_CFLAGS $LIBHILDONFM_CFLAGS" + if test -z "$_LIB_FOUND"; then + AC_MSG_ERROR([Hildon FM-2 is required when building for Maemo]) + fi + fi + + AC_SUBST(MOZ_PLATFORM_MAEMO_LIBS) + AC_SUBST(MOZ_PLATFORM_MAEMO_CFLAGS) fi -AC_SUBST(LIBHILDONMIME_CFLAGS) -AC_SUBST(LIBHILDONMIME_LIBS) - -if test "$X11_COMPOSITED_PLUGINS" = "yes"; then - dnl if we have Xcomposite we should also have Xdamage and Xfixes - AC_CHECK_HEADERS([X11/extensions/Xdamage.h], [], - [AC_MSG_ERROR([Couldn't find X11/extentsions/Xdamage.h which is required for composited plugins.])]) - AC_CHECK_LIB(Xcomposite, XCompositeRedirectWindow, [XCOMPOSITE_LIBS="-lXcomposite -lXdamage -lXfixes"], - [MISSING_X="$MISSING_X -lXcomposite"], $XLIBS) -fi -AC_SUBST(XCOMPOSITE_LIBS) - -PKG_CHECK_MODULES(LIBOSSO,libosso, - NS_OSSO=1, - NS_OSSO=) - -if test $NS_OSSO; then - if test -z "$MOZ_ENABLE_DBUS"; then - AC_MSG_ERROR([DBus is required when building for OSSO]) - fi - AC_DEFINE(NS_OSSO) - MOZ_GFX_OPTIMIZE_MOBILE=1 - MOZ_WEBGL_GLX= -fi -AC_SUBST(LIBOSSO_CFLAGS) -AC_SUBST(LIBOSSO_LIBS) - -PKG_CHECK_MODULES(LIBHILDONFM,hildon-fm-2, - NS_HILDONFM=1, - NS_HILDONFM=) -AC_SUBST(LIBHILDONFM_CFLAGS) -AC_SUBST(LIBHILDONFM_LIBS) dnl ======================================================== dnl = faststripe theme @@ -8018,9 +8049,7 @@ AC_SUBST(NS_USE_NATIVE) AC_SUBST(MOZ_WIDGET_TOOLKIT) AC_SUBST(MOZ_UPDATE_XTERM) AC_SUBST(MINIMO) -AC_SUBST(MOZ_PLATFORM_HILDON) -AC_SUBST(NS_OSSO) -AC_SUBST(NS_MAEMO_LOCATION) +AC_SUBST(MOZ_PLATFORM_MAEMO) AC_SUBST(MOZ_AUTH_EXTENSION) AC_SUBST(MOZ_MATHML) AC_SUBST(MOZ_PERMISSIONS) diff --git a/content/canvas/src/Makefile.in b/content/canvas/src/Makefile.in index 308c77fd1357..d0f4098fc042 100644 --- a/content/canvas/src/Makefile.in +++ b/content/canvas/src/Makefile.in @@ -59,16 +59,15 @@ CPPSRCS = \ ifdef MOZ_WEBGL -ifeq (1_1,$(MOZ_X11)_$(NS_OSSO)) +ifdef MOZ_X11 +ifdef MOZ_PLATFORM_MAEMO WEBGL_PLATFORM = EGL DEFINES += -DUSE_GLES2 -endif - -ifeq (1_,$(MOZ_X11)_$(NS_OSSO)) +else WEBGL_PLATFORM = GLX EXTRA_DSO_LIBS += X11 endif - +endif ifeq (windows,$(MOZ_WIDGET_TOOLKIT)) ifdef WINCE diff --git a/content/canvas/src/nsGLPbufferEGL.cpp b/content/canvas/src/nsGLPbufferEGL.cpp index a850578bfbfc..f5ca1431f0aa 100644 --- a/content/canvas/src/nsGLPbufferEGL.cpp +++ b/content/canvas/src/nsGLPbufferEGL.cpp @@ -163,7 +163,7 @@ nsGLPbufferEGL::Init(mozilla::WebGLContext *priv) { mPriv = priv; -#ifdef NS_OSSO +#ifdef MOZ_PLATFORM_MAEMO // Maemo has missing DSO dependencies on their OpenGL libraries; // so ensure that the prerequisite libs are loaded in the process // before loading GL. An alternate approach is to use LD_PRELOAD. @@ -199,7 +199,7 @@ nsGLPbufferEGL::Init(mozilla::WebGLContext *priv) gEGLWrap.fBindAPI (EGL_OPENGL_ES_API); -#if defined(MOZ_X11) && defined(NS_OSSO) +#if defined(MOZ_X11) && defined(MOZ_PLATFORM_MAEMO) EGLint attribs[] = { EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT, EGL_SURFACE_TYPE, EGL_PIXMAP_BIT, @@ -477,7 +477,7 @@ nsGLPbufferEGL::SwapBuffers() gfxASurface* nsGLPbufferEGL::ThebesSurface() { -#if defined(MOZ_X11) && defined(NS_OSSO) +#if defined(MOZ_X11) && defined(MOZ_PLATFORM_MAEMO) if (getenv("IMAGE")) return mThebesSurface; return mXlibSurface; diff --git a/content/events/src/nsEventStateManager.h b/content/events/src/nsEventStateManager.h index 893cde451034..e09e38f0150e 100644 --- a/content/events/src/nsEventStateManager.h +++ b/content/events/src/nsEventStateManager.h @@ -63,9 +63,9 @@ class imgIContainer; class nsDOMDataTransfer; // mac uses click-hold context menus, a holdover from 4.x -// touch screens (like hildon) could use this also, +// touch screens (like maemo) could use this also, // perhaps we should move to NS_TOUCHSCREEN -#if defined(XP_MACOSX) || defined(MOZ_PLATFORM_HILDON) +#if defined(XP_MACOSX) || defined(MOZ_PLATFORM_MAEMO) #define CLICK_HOLD_CONTEXT_MENUS 1 #endif diff --git a/docshell/build/Makefile.in b/docshell/build/Makefile.in index 992fae8d7098..fdd9b8ef5b7f 100644 --- a/docshell/build/Makefile.in +++ b/docshell/build/Makefile.in @@ -115,6 +115,6 @@ ifdef MOZ_ENABLE_DBUS EXTRA_DSO_LDOPTS += $(MOZ_DBUS_GLIB_LIBS) endif -ifdef MOZ_PLATFORM_HILDON -EXTRA_DSO_LDOPTS += $(LIBHILDONMIME_LIBS) +ifdef MOZ_PLATFORM_MAEMO +EXTRA_DSO_LDOPTS += $(MOZ_PLATFORM_MAEMO_LIBS) endif diff --git a/js/src/config/system-headers b/js/src/config/system-headers index 890ead5340bc..d695f52f1297 100644 --- a/js/src/config/system-headers +++ b/js/src/config/system-headers @@ -1009,12 +1009,10 @@ hunspell.hxx #if MOZ_NATIVE_BZ2==1 bzlib.h #endif -#ifdef MOZ_PLATFORM_HILDON +#if (MOZ_PLATFORM_MAEMO == 5) hildon-uri.h hildon-mime.h hildon-file-chooser-dialog.h -#endif -#ifdef NS_OSSO libosso.h osso-mem.h #endif diff --git a/layout/generic/nsObjectFrame.cpp b/layout/generic/nsObjectFrame.cpp index f1e97ef57537..dcee78aade22 100644 --- a/layout/generic/nsObjectFrame.cpp +++ b/layout/generic/nsObjectFrame.cpp @@ -173,7 +173,7 @@ enum { XKeyPress = KeyPress }; #undef KeyPress #endif -#if defined(MOZ_PLATFORM_HILDON) && defined(MOZ_WIDGET_GTK2) +#if (MOZ_PLATFORM_MAEMO == 5) #define MOZ_COMPOSITED_PLUGINS 1 #include "gfxXlibSurface.h" @@ -416,7 +416,7 @@ public: return strncmp(GetPluginName(), aPluginName, strlen(aPluginName)) == 0; } -#if defined(MOZ_PLATFORM_HILDON) && defined(MOZ_WIDGET_GTK2) +#if (MOZ_PLATFORM_MAEMO == 5) nsresult SetAbsoluteScreenPosition(nsIDOMElement* element, nsIDOMClientRect* position, nsIDOMClientRect* clip); @@ -511,7 +511,7 @@ private: }; #endif -#if defined(MOZ_PLATFORM_HILDON) && defined(MOZ_WIDGET_GTK2) +#if (MOZ_PLATFORM_MAEMO == 5) // On hildon, we attempt to use NPImageExpose which allows us faster // painting. @@ -1225,7 +1225,7 @@ nsObjectFrame::SetAbsoluteScreenPosition(nsIDOMElement* element, nsIDOMClientRect* position, nsIDOMClientRect* clip) { -#if defined(MOZ_PLATFORM_HILDON) && defined(MOZ_WIDGET_GTK2) +#if (MOZ_PLATFORM_MAEMO == 5) if (!mInstanceOwner) return NS_ERROR_NOT_AVAILABLE; return mInstanceOwner->SetAbsoluteScreenPosition(element, position, clip); @@ -2137,7 +2137,7 @@ GetMIMEType(nsIPluginInstance *aPluginInstance) static PRBool DoDelayedStop(nsPluginInstanceOwner *aInstanceOwner, PRBool aDelayedStop) { -#if defined(MOZ_PLATFORM_HILDON) && defined(MOZ_WIDGET_GTK2) +#if (MOZ_PLATFORM_MAEMO==5) // Don't delay stop on Maemo/Hildon (bug 530739). if (aDelayedStop && aInstanceOwner->MatchPluginName("Shockwave Flash")) return PR_FALSE; @@ -2455,7 +2455,7 @@ nsPluginInstanceOwner::nsPluginInstanceOwner() mLastPoint = nsIntPoint(0,0); #endif -#if defined(MOZ_PLATFORM_HILDON) && defined(MOZ_WIDGET_GTK2) +#if (MOZ_PLATFORM_MAEMO == 5) mPluginSize = nsIntSize(0,0); mXlibSurfGC = None; mBlitWindow = nsnull; @@ -2525,7 +2525,7 @@ nsPluginInstanceOwner::~nsPluginInstanceOwner() mInstance->InvalidateOwner(); } -#if defined(MOZ_PLATFORM_HILDON) && defined(MOZ_WIDGET_GTK2) +#if (MOZ_PLATFORM_MAEMO == 5) ReleaseXShm(); #endif } @@ -2737,7 +2737,7 @@ NS_IMETHODIMP nsPluginInstanceOwner::InvalidateRect(NPRect *invalidRect) if (!mObjectFrame || !invalidRect || !mWidgetVisible) return NS_ERROR_FAILURE; -#if defined(MOZ_PLATFORM_HILDON) && defined(MOZ_WIDGET_GTK2) +#if (MOZ_PLATFORM_MAEMO == 5) PRBool simpleImageRender = PR_FALSE; mInstance->GetValueFromPlugin(NPPVpluginWindowlessLocalBool, &simpleImageRender); @@ -4871,7 +4871,7 @@ void nsPluginInstanceOwner::Paint(gfxContext* aContext, if (!mInstance || !mObjectFrame) return; -#if defined(MOZ_PLATFORM_HILDON) && defined(MOZ_WIDGET_GTK2) +#if (MOZ_PLATFORM_MAEMO == 5) // through to be able to paint the context passed in. This allows // us to handle plugins that do not self invalidate (slowly, but // accurately), and it allows us to reduce flicker. @@ -4960,7 +4960,7 @@ DepthOfVisual(const Screen* screen, const Visual* visual) } #endif -#if defined(MOZ_PLATFORM_HILDON) && defined(MOZ_WIDGET_GTK2) +#if (MOZ_PLATFORM_MAEMO == 5) static GdkWindow* GetClosestWindow(nsIDOMElement *element) { @@ -5651,7 +5651,7 @@ void nsPluginInstanceOwner::SetPluginHost(nsIPluginHost* aHost) mPluginHost = aHost; } -#if defined(MOZ_PLATFORM_HILDON) && defined(MOZ_WIDGET_GTK2) +#if (MOZ_PLATFORM_MAEMO == 5) PRBool nsPluginInstanceOwner::UpdateVisibility(PRBool aVisible) { // NOTE: Death grip must be held by caller. @@ -5815,7 +5815,7 @@ void nsPluginInstanceOwner::FixUpURLS(const nsString &name, nsAString &value) } } -#if defined(MOZ_PLATFORM_HILDON) && defined(MOZ_WIDGET_GTK2) +#if (MOZ_PLATFORM_MAEMO == 5) nsresult nsPluginInstanceOwner::SetAbsoluteScreenPosition(nsIDOMElement* element, nsIDOMClientRect* position, diff --git a/modules/plugin/base/public/npapi.h b/modules/plugin/base/public/npapi.h index b8e943d54eb8..9622b7a9fc04 100644 --- a/modules/plugin/base/public/npapi.h +++ b/modules/plugin/base/public/npapi.h @@ -338,7 +338,7 @@ typedef enum { , NPPVpluginEventModel = 1001 #endif -#ifdef MOZ_PLATFORM_HILDON +#if (MOZ_PLATFORM_MAEMO == 5) , NPPVpluginWindowlessLocalBool = 2002 #endif } NPPVariable; @@ -383,7 +383,7 @@ typedef enum { #endif , NPNVsupportsCocoaBool = 3001 /* TRUE if the browser supports the Cocoa event model */ #endif -#ifdef MOZ_PLATFORM_HILDON +#if (MOZ_PLATFORM_MAEMO == 5) , NPNVSupportsWindowlessLocal = 2002 #endif } NPNVariable; diff --git a/modules/plugin/base/public/nsPluginNativeWindow.h b/modules/plugin/base/public/nsPluginNativeWindow.h index f85c9a00f239..c4e8e55059ce 100644 --- a/modules/plugin/base/public/nsPluginNativeWindow.h +++ b/modules/plugin/base/public/nsPluginNativeWindow.h @@ -103,7 +103,7 @@ public: SetPluginInstance(aPluginInstance); return NS_OK; } -#if defined(MOZ_PLATFORM_HILDON) && defined(MOZ_WIDGET_GTK2) +#if (MOZ_PLATFORM_MAEMO == 5) #define MOZ_COMPOSITED_PLUGINS #endif #ifdef MOZ_COMPOSITED_PLUGINS diff --git a/modules/plugin/base/src/nsNPAPIPlugin.cpp b/modules/plugin/base/src/nsNPAPIPlugin.cpp index 1133a769467e..0e442982037d 100644 --- a/modules/plugin/base/src/nsNPAPIPlugin.cpp +++ b/modules/plugin/base/src/nsNPAPIPlugin.cpp @@ -2139,7 +2139,7 @@ _getvalue(NPP npp, NPNVariable variable, void *result) return NPERR_GENERIC_ERROR; } -#ifdef MOZ_PLATFORM_HILDON +#if (MOZ_PLATFORM_MAEMO == 5) case NPNVSupportsWindowlessLocal: { *(NPBool*)result = PR_TRUE; return NPERR_NO_ERROR; @@ -2277,7 +2277,7 @@ _setvalue(NPP npp, NPPVariable variable, void *result) return inst->SetWindowless(bWindowless); #endif } -#ifdef MOZ_PLATFORM_HILDON +#if (MOZ_PLATFORM_MAEMO == 5) case NPPVpluginWindowlessLocalBool: { NPBool bWindowlessLocal = (result != nsnull); return inst->SetWindowlessLocal(bWindowlessLocal); diff --git a/modules/plugin/base/src/nsNPAPIPluginInstance.cpp b/modules/plugin/base/src/nsNPAPIPluginInstance.cpp index 32cfbf86ba11..b2110eb5b41d 100644 --- a/modules/plugin/base/src/nsNPAPIPluginInstance.cpp +++ b/modules/plugin/base/src/nsNPAPIPluginInstance.cpp @@ -1392,7 +1392,7 @@ NS_IMETHODIMP nsNPAPIPluginInstance::HandleEvent(void* event, PRBool* handled) NS_IMETHODIMP nsNPAPIPluginInstance::GetValueFromPlugin(NPPVariable variable, void* value) { -#ifdef MOZ_PLATFORM_HILDON +#if (MOZ_PLATFORM_MAEMO == 5) // The maemo flash plugin does not remember this. It sets the // value, but doesn't support the get value. if (variable == NPPVpluginWindowlessLocalBool) { diff --git a/modules/plugin/base/src/nsPluginNativeWindowGtk2.cpp b/modules/plugin/base/src/nsPluginNativeWindowGtk2.cpp index a86366a6fc82..a6fa4d66d0dc 100644 --- a/modules/plugin/base/src/nsPluginNativeWindowGtk2.cpp +++ b/modules/plugin/base/src/nsPluginNativeWindowGtk2.cpp @@ -49,7 +49,7 @@ #include #include -#ifdef MOZ_PLATFORM_HILDON +#if (MOZ_PLATFORM_MAEMO == 5) #define MOZ_COMPOSITED_PLUGINS #endif diff --git a/toolkit/components/downloads/src/nsDownloadManager.cpp b/toolkit/components/downloads/src/nsDownloadManager.cpp index 7f6c4b0d01af..cbce17f3d3f3 100644 --- a/toolkit/components/downloads/src/nsDownloadManager.cpp +++ b/toolkit/components/downloads/src/nsDownloadManager.cpp @@ -1170,7 +1170,7 @@ nsDownloadManager::GetDefaultDownloadsDirectory(nsILocalFile **aResult) } } #elif defined(XP_UNIX) -#if defined(NS_OSSO) +#if defined(MOZ_PLATFORM_MAEMO) // As maemo does not follow the XDG "standard" (as usually desktop // Linux distros do) neither has a working $HOME/Desktop folder // for us to fallback into, "$HOME/MyDocs/.documents/" is the folder diff --git a/toolkit/library/Makefile.in b/toolkit/library/Makefile.in index 3b00293b9083..07f08ac5ba5f 100644 --- a/toolkit/library/Makefile.in +++ b/toolkit/library/Makefile.in @@ -197,18 +197,14 @@ EXTRA_DSO_LDOPTS += \ endif endif -ifdef MOZ_PLATFORM_HILDON -EXTRA_DSO_LDOPTS += $(LIBHILDONMIME_LIBS) $(LIBHILDONFM_LIBS) +ifdef MOZ_PLATFORM_MAEMO +EXTRA_DSO_LDOPTS += $(MOZ_PLATFORM_MAEMO_LIBS) endif ifdef MOZ_ENABLE_LIBCONIC EXTRA_DSO_LDOPTS += $(LIBCONIC_LIBS) endif -ifdef NS_OSSO -EXTRA_DSO_LDOPTS += $(LIBOSSO_LIBS) -endif - ifdef MOZ_ENABLE_DBUS EXTRA_DSO_LDOPTS += $(MOZ_DBUS_GLIB_LIBS) endif diff --git a/toolkit/xre/nsNativeAppSupportUnix.cpp b/toolkit/xre/nsNativeAppSupportUnix.cpp index 1afaa8f4315a..e21667e4381d 100644 --- a/toolkit/xre/nsNativeAppSupportUnix.cpp +++ b/toolkit/xre/nsNativeAppSupportUnix.cpp @@ -59,7 +59,7 @@ #include #include -#ifdef NS_OSSO +#ifdef MOZ_PLATFORM_MAEMO struct DBusMessage; /* libosso.h references internals of dbus */ #include @@ -157,7 +157,7 @@ public: NS_IMETHOD Stop(PRBool *aResult); private: -#ifdef NS_OSSO +#ifdef MOZ_PLATFORM_MAEMO osso_context_t *m_osso_context; /* A note about why we need to have m_hw_state: the osso hardware callback does not tell us what changed, just @@ -168,7 +168,7 @@ private: #endif }; -#ifdef NS_OSSO +#ifdef MOZ_PLATFORM_MAEMO static void OssoDisplayCallback(osso_display_state_t state, gpointer data) { @@ -309,7 +309,7 @@ nsNativeAppSupportUnix::Start(PRBool *aRetVal) exit(0); } -#ifdef NS_OSSO +#ifdef MOZ_PLATFORM_MAEMO /* zero state out. */ memset(&m_hw_state, 0, sizeof(osso_hw_state_t)); @@ -454,7 +454,7 @@ nsNativeAppSupportUnix::Stop(PRBool *aResult) NS_ENSURE_ARG(aResult); *aResult = PR_TRUE; -#ifdef NS_OSSO +#ifdef MOZ_PLATFORM_MAEMO if (m_osso_context) { osso_hw_unset_event_cb(m_osso_context, nsnull); osso_rpc_unset_default_cb_f(m_osso_context, OssoDbusCallback, nsnull); diff --git a/uriloader/exthandler/Makefile.in b/uriloader/exthandler/Makefile.in index 05667cb91754..f0afdce60f2f 100644 --- a/uriloader/exthandler/Makefile.in +++ b/uriloader/exthandler/Makefile.in @@ -135,7 +135,7 @@ LOCAL_INCLUDES += $(TK_CFLAGS) $(MOZ_DBUS_GLIB_CFLAGS) EXTRA_DSO_LDOPTS += $(MOZ_DBUS_GLIB_LIBS) endif -ifdef MOZ_PLATFORM_HILDON +ifdef MOZ_PLATFORM_MAEMO ifdef MOZ_ENABLE_GNOMEVFS LOCAL_INCLUDES += $(MOZ_GNOMEVFS_CFLAGS) EXTRA_DSO_LDOPTS += $(MOZ_GNOMEVFS_LIBS) diff --git a/uriloader/exthandler/nsDBusHandlerApp.cpp b/uriloader/exthandler/nsDBusHandlerApp.cpp index bac95802750d..a06d49288473 100644 --- a/uriloader/exthandler/nsDBusHandlerApp.cpp +++ b/uriloader/exthandler/nsDBusHandlerApp.cpp @@ -44,7 +44,7 @@ #include "nsIClassInfoImpl.h" #include "nsCOMPtr.h" -#ifdef NS_OSSO +#if (MOZ_PLATFORM_MAEMO == 5) #include #define APP_LAUNCH_BANNER_SERVICE "com.nokia.hildon-desktop" @@ -157,7 +157,7 @@ nsDBusHandlerApp::LaunchWithURI(nsIURI *aURI, if (dbus_connection_send(connection, msg, NULL)) { dbus_connection_flush(connection); dbus_message_unref(msg); -#ifdef NS_OSSO +#if (MOZ_PLATFORM_MAEMO == 5) msg = dbus_message_new_method_call (APP_LAUNCH_BANNER_SERVICE, APP_LAUNCH_BANNER_METHOD_PATH, APP_LAUNCH_BANNER_METHOD_INTERFACE, diff --git a/uriloader/exthandler/unix/nsGNOMERegistry.cpp b/uriloader/exthandler/unix/nsGNOMERegistry.cpp index 509b153298ab..560b6347e2bf 100644 --- a/uriloader/exthandler/unix/nsGNOMERegistry.cpp +++ b/uriloader/exthandler/unix/nsGNOMERegistry.cpp @@ -53,7 +53,7 @@ #include #endif -#ifdef MOZ_PLATFORM_HILDON +#ifdef MOZ_PLATFORM_MAEMO #include #endif @@ -192,7 +192,7 @@ nsGNOMERegistry::GetFromType(const nsACString& aMIMEType) else gnomeHandlerApp->GetName(name); -#ifdef MOZ_PLATFORM_HILDON +#ifdef MOZ_PLATFORM_MAEMO // On Maemo/Hildon, GetName ends up calling gnome_vfs_mime_application_get_name, // which happens to return a non-localized message-id for the application. To // get the localized name for the application, we have to call dgettext with diff --git a/uriloader/exthandler/unix/nsMIMEInfoUnix.cpp b/uriloader/exthandler/unix/nsMIMEInfoUnix.cpp index ddbffba415fc..bfe53c367a06 100644 --- a/uriloader/exthandler/unix/nsMIMEInfoUnix.cpp +++ b/uriloader/exthandler/unix/nsMIMEInfoUnix.cpp @@ -37,7 +37,7 @@ * * ***** END LICENSE BLOCK ***** */ -#if defined (MOZ_PLATFORM_HILDON) && defined (MOZ_ENABLE_GNOMEVFS) +#if (MOZ_PLATFORM_MAEMO == 5) && defined (MOZ_ENABLE_GNOMEVFS) #include #include #include @@ -57,7 +57,7 @@ nsresult nsMIMEInfoUnix::LoadUriInternal(nsIURI * aURI) { nsresult rv = nsGNOMERegistry::LoadURL(aURI); -#if defined (MOZ_PLATFORM_HILDON) && defined (MOZ_ENABLE_GNOMEVFS) +#if (MOZ_PLATFORM_MAEMO == 5) && defined (MOZ_ENABLE_GNOMEVFS) if (NS_FAILED(rv)){ HildonURIAction *action = hildon_uri_get_default_action(mType.get(), nsnull); if (action) { @@ -90,7 +90,7 @@ nsMIMEInfoUnix::GetHasDefaultHandler(PRBool *_retval) if (*_retval) return NS_OK; -#if defined (MOZ_PLATFORM_HILDON) && defined (MOZ_ENABLE_GNOMEVFS) +#if (MOZ_PLATFORM_MAEMO == 5) && defined (MOZ_ENABLE_GNOMEVFS) HildonURIAction *action = hildon_uri_get_default_action(mType.get(), nsnull); if (action) { *_retval = PR_TRUE; @@ -109,7 +109,7 @@ nsMIMEInfoUnix::LaunchDefaultWithFile(nsIFile *aFile) nsCAutoString nativePath; aFile->GetNativePath(nativePath); -#if defined (MOZ_PLATFORM_HILDON) && defined (MOZ_ENABLE_GNOMEVFS) +#if (MOZ_PLATFORM_MAEMO == 5) && defined (MOZ_ENABLE_GNOMEVFS) if(NS_SUCCEEDED(LaunchDefaultWithDBus(PromiseFlatCString(nativePath).get()))) return NS_OK; #endif @@ -150,7 +150,7 @@ nsMIMEInfoUnix::LaunchDefaultWithFile(nsIFile *aFile) return LaunchWithIProcess(mDefaultApplication, nativePath); } -#if defined (MOZ_PLATFORM_HILDON) && defined (MOZ_ENABLE_GNOMEVFS) +#if (MOZ_PLATFORM_MAEMO == 5) && defined (MOZ_ENABLE_GNOMEVFS) /* This method tries to launch the associated default handler for the given * mime/file via hildon specific APIs (in this case hildon_mime_open_file* diff --git a/uriloader/exthandler/unix/nsMIMEInfoUnix.h b/uriloader/exthandler/unix/nsMIMEInfoUnix.h index 64c7cace1b05..f05ae505cc54 100644 --- a/uriloader/exthandler/unix/nsMIMEInfoUnix.h +++ b/uriloader/exthandler/unix/nsMIMEInfoUnix.h @@ -57,7 +57,7 @@ protected: virtual NS_HIDDEN_(nsresult) LoadUriInternal(nsIURI *aURI); virtual NS_HIDDEN_(nsresult) LaunchDefaultWithFile(nsIFile *aFile); -#if defined (MOZ_PLATFORM_HILDON) && defined (MOZ_ENABLE_GNOMEVFS) +#if (MOZ_PLATFORM_MAEMO == 5) && defined (MOZ_ENABLE_GNOMEVFS) nsresult LaunchDefaultWithDBus(const char *aFilePath); NS_IMETHOD GetPossibleApplicationHandlers(nsIMutableArray * *aPossibleAppHandlers); #endif diff --git a/uriloader/exthandler/unix/nsOSHelperAppService.cpp b/uriloader/exthandler/unix/nsOSHelperAppService.cpp index 28cd5d23805c..f4fc700bc586 100644 --- a/uriloader/exthandler/unix/nsOSHelperAppService.cpp +++ b/uriloader/exthandler/unix/nsOSHelperAppService.cpp @@ -1211,7 +1211,7 @@ nsresult nsOSHelperAppService::OSProtocolHandlerExists(const char * aProtocolSch #ifdef MOZ_WIDGET_GTK2 // Check the GConf registry for a protocol handler *aHandlerExists = nsGNOMERegistry::HandlerExists(aProtocolScheme); -#ifdef MOZ_PLATFORM_HILDON +#ifdef MOZ_PLATFORM_MAEMO *aHandlerExists = nsMIMEInfoUnix::HandlerExists(aProtocolScheme); #endif #endif diff --git a/widget/src/gtk2/Makefile.in b/widget/src/gtk2/Makefile.in index 5996582a3b88..2f992561844e 100644 --- a/widget/src/gtk2/Makefile.in +++ b/widget/src/gtk2/Makefile.in @@ -118,7 +118,7 @@ EXTRA_DSO_LDOPTS += \ $(QCMS_LIBS) \ $(NULL) -ifdef MOZ_PLATFORM_HILDON +ifdef MOZ_PLATFORM_MAEMO ifdef MOZ_ENABLE_GCONF EXTRA_DSO_LDOPTS += $(MOZ_GCONF_LIBS) endif @@ -145,7 +145,7 @@ include $(topsrcdir)/config/rules.mk CFLAGS += $(MOZ_GTK2_CFLAGS) $(MOZ_STARTUP_NOTIFICATION_CFLAGS) CXXFLAGS += $(MOZ_CAIRO_CFLAGS) $(MOZ_GTK2_CFLAGS) $(MOZ_STARTUP_NOTIFICATION_CFLAGS) -ifdef MOZ_PLATFORM_HILDON +ifdef MOZ_PLATFORM_MAEMO ifdef MOZ_ENABLE_GCONF CXXFLAGS += $(MOZ_GCONF_CFLAGS) endif diff --git a/widget/src/gtk2/mozcontainer.h b/widget/src/gtk2/mozcontainer.h index d09bd2822323..7da70aaa52f4 100644 --- a/widget/src/gtk2/mozcontainer.h +++ b/widget/src/gtk2/mozcontainer.h @@ -84,7 +84,7 @@ extern "C" { #define MOZ_CONAINTER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), MOZ_CONTAINER_TYPE, MozContainerClass)) #if (GTK_CHECK_VERSION(2, 12, 0) || \ - (GTK_CHECK_VERSION(2, 10, 0) && defined(MOZ_PLATFORM_HILDON))) + (GTK_CHECK_VERSION(2, 10, 0) && defined(MOZ_PLATFORM_MAEMO))) #define HAVE_GTK_MOTION_HINTS #endif diff --git a/widget/src/gtk2/nsFilePicker.cpp b/widget/src/gtk2/nsFilePicker.cpp index b3c97315f763..73e27724415d 100644 --- a/widget/src/gtk2/nsFilePicker.cpp +++ b/widget/src/gtk2/nsFilePicker.cpp @@ -56,7 +56,7 @@ #include "nsFilePicker.h" #include "nsAccessibilityHelper.h" -#ifdef MOZ_PLATFORM_HILDON +#ifdef MOZ_PLATFORM_MAEMO #include #endif @@ -433,7 +433,7 @@ nsFilePicker::Show(PRInt16 *aReturn) GtkFileChooserAction action = GetGtkFileChooserAction(mMode); const gchar *accept_button = (action == GTK_FILE_CHOOSER_ACTION_SAVE) ? GTK_STOCK_SAVE : GTK_STOCK_OPEN; -#ifdef MOZ_PLATFORM_HILDON +#ifdef MOZ_PLATFORM_MAEMO GtkWidget *file_chooser = hildon_file_chooser_dialog_new_with_properties(parent_widget, "action", action, diff --git a/widget/src/gtk2/nsLookAndFeel.cpp b/widget/src/gtk2/nsLookAndFeel.cpp index 1c92cc9b7142..ddd32deefb6d 100644 --- a/widget/src/gtk2/nsLookAndFeel.cpp +++ b/widget/src/gtk2/nsLookAndFeel.cpp @@ -43,7 +43,7 @@ #include "gtkdrawing.h" -#ifdef MOZ_PLATFORM_HILDON +#ifdef MOZ_PLATFORM_MAEMO #include "nsIServiceManager.h" #include "nsIPropertyBag2.h" #include "nsLiteralString.h" @@ -582,7 +582,7 @@ NS_IMETHODIMP nsLookAndFeel::GetMetric(const nsMetricID aID, PRInt32 & aMetric) res = NS_ERROR_NOT_IMPLEMENTED; break; case eMetric_TouchEnabled: -#ifdef MOZ_PLATFORM_HILDON +#ifdef MOZ_PLATFORM_MAEMO // All Hildon devices are touch-enabled aMetric = 1; #else @@ -591,7 +591,7 @@ NS_IMETHODIMP nsLookAndFeel::GetMetric(const nsMetricID aID, PRInt32 & aMetric) #endif break; case eMetric_MaemoClassic: -#ifdef MOZ_PLATFORM_HILDON +#ifdef MOZ_PLATFORM_MAEMO { aMetric = 0; nsCOMPtr infoService(do_GetService("@mozilla.org/system-info;1")); diff --git a/widget/src/gtk2/nsWindow.cpp b/widget/src/gtk2/nsWindow.cpp index 7c9509eefea0..25060b496959 100644 --- a/widget/src/gtk2/nsWindow.cpp +++ b/widget/src/gtk2/nsWindow.cpp @@ -38,7 +38,7 @@ * * ***** END LICENSE BLOCK ***** */ -#ifdef MOZ_PLATFORM_HILDON +#ifdef MOZ_PLATFORM_MAEMO #define MAEMO_CHANGES #endif @@ -305,7 +305,7 @@ static GdkEventKey *gKeyEvent = NULL; static PRBool gKeyEventCommitted = PR_FALSE; static PRBool gKeyEventChanged = PR_FALSE; static PRBool gIMESuppressCommit = PR_FALSE; -#ifdef MOZ_PLATFORM_HILDON +#ifdef MOZ_PLATFORM_MAEMO static PRBool gIMEVirtualKeyboardOpened = PR_FALSE; #endif @@ -3500,7 +3500,7 @@ nsWindow::OnVisibilityNotifyEvent(GtkWidget *aWidget, mIsFullyObscured = PR_FALSE; -#ifdef MOZ_PLATFORM_HILDON +#ifdef MOZ_PLATFORM_MAEMO #ifdef USE_XIM // In Hildon/Maemo, a browser window will get into 'patially visible' state wheneven an // autocomplete feature is dropped down (from urlbar or from an entry form completion), @@ -3510,7 +3510,7 @@ nsWindow::OnVisibilityNotifyEvent(GtkWidget *aWidget, // to this it until the pointer is ungrabbed. if(!gIMEVirtualKeyboardOpened) #endif // USE_XIM -#endif // MOZ_PLATFORM_HILDON +#endif // MOZ_PLATFORM_MAEMO // if we have to retry the grab, retry it. EnsureGrabs(); break; @@ -6853,7 +6853,7 @@ nsWindow::IMEGetContext() static PRBool IsIMEEnabledState(PRUint32 aState) { -#ifdef MOZ_PLATFORM_HILDON +#ifdef MOZ_PLATFORM_MAEMO return aState == nsIWidget::IME_STATUS_ENABLED || aState == nsIWidget::IME_STATUS_PLUGIN || aState == nsIWidget::IME_STATUS_PASSWORD; @@ -7061,7 +7061,7 @@ nsWindow::SetIMEEnabled(PRUint32 aState) // Even when aState is not PR_TRUE, we need to set IME focus. // Because some IMs are updating the status bar of them in this time. focusedWin->IMESetFocus(); -#ifdef MOZ_PLATFORM_HILDON +#ifdef MOZ_PLATFORM_MAEMO if (mIMEData->mEnabled) { // It is not desired that the hildon's autocomplete mechanism displays // user previous entered passwds, so lets make completions invisible @@ -7437,7 +7437,7 @@ IM_get_input_context(nsWindow *aWindow) data->mEnabled == nsIWidget::IME_STATUS_PLUGIN) return data->mContext; if (data->mEnabled == nsIWidget::IME_STATUS_PASSWORD) -#ifdef MOZ_PLATFORM_HILDON +#ifdef MOZ_PLATFORM_MAEMO return data->mContext; #else return data->mSimpleContext; diff --git a/xpcom/base/nsMemoryImpl.cpp b/xpcom/base/nsMemoryImpl.cpp index 18df3396b3fe..785fdee9e1cf 100644 --- a/xpcom/base/nsMemoryImpl.cpp +++ b/xpcom/base/nsMemoryImpl.cpp @@ -57,7 +57,7 @@ #include #endif -#if defined (NS_OSSO) +#if defined(MOZ_PLATFORM_MAEMO) #include #include #include @@ -128,7 +128,7 @@ nsMemoryImpl::IsLowMemory(PRBool *result) GlobalMemoryStatusEx(&stat); *result = (stat.ullAvailPageFile < kRequiredMemory) && ((float)stat.ullAvailPageFile / stat.ullTotalPageFile) < 0.1; -#elif defined(NS_OSSO) +#elif defined(MOZ_PLATFORM_MAEMO) static int osso_highmark_fd = -1; if (osso_highmark_fd == -1) { osso_highmark_fd = open (kHighMark, O_RDONLY); diff --git a/xpcom/base/nsSystemInfo.cpp b/xpcom/base/nsSystemInfo.cpp index 122767cf80e0..8c4afa6e8c05 100644 --- a/xpcom/base/nsSystemInfo.cpp +++ b/xpcom/base/nsSystemInfo.cpp @@ -100,7 +100,7 @@ nsSystemInfo::Init() #endif -#ifdef MOZ_PLATFORM_HILDON +#ifdef MOZ_PLATFORM_MAEMO char * line = nsnull; size_t len = 0; ssize_t read; diff --git a/xpcom/build/Makefile.in b/xpcom/build/Makefile.in index be26a290fb27..e4438ba0ed2a 100644 --- a/xpcom/build/Makefile.in +++ b/xpcom/build/Makefile.in @@ -170,8 +170,8 @@ endif ifneq (,$(filter gtk2,$(MOZ_WIDGET_TOOLKIT))) EXTRA_DSO_LDOPTS += $(MOZ_GTK2_LIBS) -ifdef MOZ_PLATFORM_HILDON -EXTRA_DSO_LDOPTS += $(LIBHILDONMIME_LIBS) +ifdef MOZ_PLATFORM_MAEMO +EXTRA_DSO_LDOPTS += $(MOZ_PLATFORM_MAEMO_LIBS) endif endif diff --git a/xpcom/io/Makefile.in b/xpcom/io/Makefile.in index bf35c09a4977..f6f05e6fcdc5 100644 --- a/xpcom/io/Makefile.in +++ b/xpcom/io/Makefile.in @@ -199,8 +199,8 @@ endif LOCAL_INCLUDES = -I.. -ifdef MOZ_PLATFORM_HILDON -CFLAGS += $(MOZ_DBUS_GLIB_CFLAGS) $(LIBHILDONMIME_CFLAGS) -CXXFLAGS += $(MOZ_DBUS_GLIB_CFLAGS) $(LIBHILDONMIME_CFLAGS) +ifeq ($(MOZ_PLATFORM_MAEMO), 5) +CFLAGS += $(MOZ_DBUS_GLIB_CFLAGS) $(MOZ_PLATFORM_MAEMO_CFLAGS) +CXXFLAGS += $(MOZ_DBUS_GLIB_CFLAGS) $(MOZ_PLATFORM_MAEMO_CFLAGS) endif diff --git a/xpcom/io/SpecialSystemDirectory.cpp b/xpcom/io/SpecialSystemDirectory.cpp index 59ed01d3e1a0..0c29bcfca695 100644 --- a/xpcom/io/SpecialSystemDirectory.cpp +++ b/xpcom/io/SpecialSystemDirectory.cpp @@ -490,7 +490,7 @@ GetUnixXDGUserDirectory(SystemDirectories aSystemDirectory, rv = file->AppendNative(NS_LITERAL_CSTRING("Desktop")); } -#if defined(NS_OSSO) +#if defined(MOZ_PLATFORM_MAEMO) // "MYDOCSDIR" is exported to point to "/home/user/MyDocs" in maemo. else if (Unix_XDG_Documents == aSystemDirectory) { diff --git a/xpcom/io/nsLocalFileUnix.cpp b/xpcom/io/nsLocalFileUnix.cpp index ea8a048c4854..9cc30b1c4c24 100644 --- a/xpcom/io/nsLocalFileUnix.cpp +++ b/xpcom/io/nsLocalFileUnix.cpp @@ -92,7 +92,7 @@ #include "nsIGnomeVFSService.h" #endif -#ifdef MOZ_PLATFORM_HILDON +#if (MOZ_PLATFORM_MAEMO == 5) #include #include #include @@ -1746,7 +1746,7 @@ NS_IMETHODIMP nsLocalFile::Launch() { #ifdef MOZ_WIDGET_GTK2 -#ifdef MOZ_PLATFORM_HILDON +#if (MOZ_PLATFORM_MAEMO==5) const PRInt32 kHILDON_SUCCESS = 1; DBusError err; dbus_error_init(&err);