Bug 543976 - Clean up Maemo defines. r=ted

This commit is contained in:
Doug Turner 2010-02-09 11:02:11 -08:00
parent f603c639e5
commit 7892aabac9
34 changed files with 152 additions and 138 deletions

View File

@ -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@

View File

@ -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

View File

@ -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)

View File

@ -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

View File

@ -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;

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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,

View File

@ -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;

View File

@ -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

View File

@ -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);

View File

@ -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) {

View File

@ -49,7 +49,7 @@
#include <gdk/gdkx.h>
#include <gdk/gdk.h>
#ifdef MOZ_PLATFORM_HILDON
#if (MOZ_PLATFORM_MAEMO == 5)
#define MOZ_COMPOSITED_PLUGINS
#endif

View File

@ -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

View File

@ -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

View File

@ -59,7 +59,7 @@
#include <glib-object.h>
#include <gtk/gtk.h>
#ifdef NS_OSSO
#ifdef MOZ_PLATFORM_MAEMO
struct DBusMessage; /* libosso.h references internals of dbus */
#include <dbus/dbus.h>
@ -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);

View File

@ -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)

View File

@ -44,7 +44,7 @@
#include "nsIClassInfoImpl.h"
#include "nsCOMPtr.h"
#ifdef NS_OSSO
#if (MOZ_PLATFORM_MAEMO == 5)
#include <libosso.h>
#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,

View File

@ -53,7 +53,7 @@
#include <glib-object.h>
#endif
#ifdef MOZ_PLATFORM_HILDON
#ifdef MOZ_PLATFORM_MAEMO
#include <libintl.h>
#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

View File

@ -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 <glib.h>
#include <hildon-uri.h>
#include <hildon-mime.h>
@ -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*

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -56,7 +56,7 @@
#include "nsFilePicker.h"
#include "nsAccessibilityHelper.h"
#ifdef MOZ_PLATFORM_HILDON
#ifdef MOZ_PLATFORM_MAEMO
#include <hildon-fm-2/hildon/hildon-file-chooser-dialog.h>
#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,

View File

@ -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<nsIPropertyBag2> infoService(do_GetService("@mozilla.org/system-info;1"));

View File

@ -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;

View File

@ -57,7 +57,7 @@
#include <windows.h>
#endif
#if defined (NS_OSSO)
#if defined(MOZ_PLATFORM_MAEMO)
#include <osso-mem.h>
#include <fcntl.h>
#include <unistd.h>
@ -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);

View File

@ -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;

View File

@ -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

View File

@ -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

View File

@ -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) {

View File

@ -92,7 +92,7 @@
#include "nsIGnomeVFSService.h"
#endif
#ifdef MOZ_PLATFORM_HILDON
#if (MOZ_PLATFORM_MAEMO == 5)
#include <glib.h>
#include <hildon-uri.h>
#include <hildon-mime.h>
@ -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);