From 3d8d80e7ff40a46747689a090d34f5961c058084 Mon Sep 17 00:00:00 2001 From: "seawood%netscape.com" Date: Tue, 4 Mar 2003 03:58:43 +0000 Subject: [PATCH] Use MOZ_X11 instead of NO_X11 to signify that we're building for an X11-based toolkit. Bug #191447 r=peterl sr=sfraser git-svn-id: svn://10.0.0.236/trunk@138842 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/modules/plugin/base/public/npapi.h | 10 +++++----- mozilla/modules/plugin/base/public/nsplugindefs.h | 8 ++++---- .../modules/plugin/base/src/ns4xPluginInstance.cpp | 2 +- .../modules/plugin/base/src/nsPluginHostImpl.cpp | 2 +- .../modules/plugin/samples/default/unix/npshell.c | 4 ++-- .../plugin/samples/default/unix/nullplugin.c | 14 +++++++------- .../plugin/samples/default/unix/nullplugin.h | 4 ++-- .../netwerk/protocol/http/src/nsHttpHandler.cpp | 2 +- 8 files changed, 23 insertions(+), 23 deletions(-) diff --git a/mozilla/modules/plugin/base/public/npapi.h b/mozilla/modules/plugin/base/public/npapi.h index 2a721d75b65..978b7bddc90 100644 --- a/mozilla/modules/plugin/base/public/npapi.h +++ b/mozilla/modules/plugin/base/public/npapi.h @@ -38,7 +38,7 @@ /* - * npapi.h $Revision: 3.27 $ + * npapi.h $Revision: 3.28 $ * Netscape client plug-in API spec */ @@ -110,7 +110,7 @@ #include #endif -#if defined(XP_UNIX) && !defined(NO_X11) +#if defined(XP_UNIX) && defined(MOZ_X11) #include #include #endif @@ -305,7 +305,7 @@ typedef struct typedef struct { int32 type; -#ifndef NO_X11 +#ifdef MOZ_X11 Display* display; Visual* visual; Colormap colormap; @@ -467,7 +467,7 @@ typedef struct _NPEvent uint32 wParam; uint32 lParam; } NPEvent; -#elif defined (XP_UNIX) && !defined(NO_X11) +#elif defined (XP_UNIX) && defined(MOZ_X11) typedef XEvent NPEvent; #else typedef void* NPEvent; @@ -477,7 +477,7 @@ typedef void* NPEvent; typedef RgnHandle NPRegion; #elif defined(XP_WIN) typedef HRGN NPRegion; -#elif defined(XP_UNIX) && !defined(NO_X11) +#elif defined(XP_UNIX) && defined(MOZ_X11) typedef Region NPRegion; #else typedef void *NPRegion; diff --git a/mozilla/modules/plugin/base/public/nsplugindefs.h b/mozilla/modules/plugin/base/public/nsplugindefs.h index a797f0b73a2..15e0973a844 100644 --- a/mozilla/modules/plugin/base/public/nsplugindefs.h +++ b/mozilla/modules/plugin/base/public/nsplugindefs.h @@ -55,7 +55,7 @@ # include #endif -#if defined(XP_UNIX) && !defined(NO_X11) +#if defined(XP_UNIX) && defined(MOZ_X11) # include # include #endif @@ -156,7 +156,7 @@ struct nsPluginAnyCallbackStruct { PRInt32 type; }; -#ifndef NO_X11 +#ifdef MOZ_X11 struct nsPluginSetWindowCallbackStruct { PRInt32 type; Display* display; @@ -246,7 +246,7 @@ struct nsPluginPort; typedef HRGN nsPluginRegion; typedef HWND nsPluginPlatformWindowRef; -#elif defined(XP_UNIX) && !defined(NO_X11) +#elif defined(XP_UNIX) && defined(MOZ_X11) struct nsPluginPort; typedef Region nsPluginRegion; @@ -314,7 +314,7 @@ struct nsPluginEvent { uint32 wParam; uint32 lParam; -#elif defined(XP_UNIX) && !defined(NO_X11) +#elif defined(XP_UNIX) && defined(MOZ_X11) XEvent event; #else void *event; diff --git a/mozilla/modules/plugin/base/src/ns4xPluginInstance.cpp b/mozilla/modules/plugin/base/src/ns4xPluginInstance.cpp index 204f8db0378..627f1e1aaa5 100644 --- a/mozilla/modules/plugin/base/src/ns4xPluginInstance.cpp +++ b/mozilla/modules/plugin/base/src/ns4xPluginInstance.cpp @@ -936,7 +936,7 @@ NS_IMETHODIMP ns4xPluginInstance::SetWindow(nsPluginWindow* window) // fill in window info structure ws->type = 0; // OK, that was a guess!! -#ifndef NO_X11 +#ifdef MOZ_X11 ws->depth = gdk_window_get_visual(win)->depth; ws->display = GTK_XTBIN(mXtBin)->xtdisplay; ws->visual = GDK_VISUAL_XVISUAL(gdk_window_get_visual(win)); diff --git a/mozilla/modules/plugin/base/src/nsPluginHostImpl.cpp b/mozilla/modules/plugin/base/src/nsPluginHostImpl.cpp index ee229670b81..f8efd402ec4 100644 --- a/mozilla/modules/plugin/base/src/nsPluginHostImpl.cpp +++ b/mozilla/modules/plugin/base/src/nsPluginHostImpl.cpp @@ -2648,7 +2648,7 @@ NS_IMETHODIMP nsPluginHostImpl::GetValue(nsPluginManagerVariable aVariable, void NS_ENSURE_ARG_POINTER(aValue); -#if defined(XP_UNIX) && !defined(XP_MACOSX) && !defined(NO_X11) +#if defined(XP_UNIX) && !defined(XP_MACOSX) && defined(MOZ_X11) if (nsPluginManagerVariable_XDisplay == aVariable) { Display** value = NS_REINTERPRET_CAST(Display**, aValue); #if defined(MOZ_WIDGET_GTK) || defined (MOZ_WIDGET_GTK2) diff --git a/mozilla/modules/plugin/samples/default/unix/npshell.c b/mozilla/modules/plugin/samples/default/unix/npshell.c index dc2376a46d9..a15fd0bef40 100644 --- a/mozilla/modules/plugin/samples/default/unix/npshell.c +++ b/mozilla/modules/plugin/samples/default/unix/npshell.c @@ -197,7 +197,7 @@ NPP_SetWindow(NPP instance, NPWindow* window) ws_info = (NPSetWindowCallbackStruct *)window->ws_info; -#ifndef NO_X11 +#ifdef MOZ_X11 if (This->window == (Window) window->window) { /* The page with the plugin is being resized. Save any UI information because the next time @@ -227,7 +227,7 @@ NPP_SetWindow(NPP instance, NPWindow* window) makePixmap(This); makeWidget(This); } -#endif /* #ifndef NO_X11 */ +#endif /* #ifdef MOZ_X11 */ return NPERR_NO_ERROR; } diff --git a/mozilla/modules/plugin/samples/default/unix/nullplugin.c b/mozilla/modules/plugin/samples/default/unix/nullplugin.c index 96842b34950..8e5305ceb04 100644 --- a/mozilla/modules/plugin/samples/default/unix/nullplugin.c +++ b/mozilla/modules/plugin/samples/default/unix/nullplugin.c @@ -38,7 +38,7 @@ #include /* Xlib/Xt stuff */ -#ifndef NO_X11 +#ifdef MOZ_X11 #include #include #include @@ -351,7 +351,7 @@ static GdkPixmap *nullPluginGdkPixmap = 0; static GdkWindow *getGdkWindow(PluginInstance *This) { -#ifndef NO_X11 +#ifdef MOZ_X11 GdkWindow *gdk_window; Window xwin = (Window) This->window; Widget xt_w = XtWindowToWidget(This->display, xwin); @@ -393,7 +393,7 @@ createPixmap(PluginInstance *This) style = gtk_widget_get_style(widget); nullPluginGdkPixmap = gdk_pixmap_create_from_xpm_d(gdk_window , &mask, &style->bg[GTK_STATE_NORMAL], npnul320_xpm); -#ifndef NO_X11 +#ifdef MOZ_X11 /* Pixmap is created on original X session but used by new session */ XSync(GDK_DISPLAY(), False); #endif @@ -412,7 +412,7 @@ drawPixmap(PluginInstance *This) dest_y = This->height/2 - pixmap_height/2; if (dest_x >= 0 && dest_y >= 0) { -#ifndef NO_X11 +#ifdef MOZ_X11 GC gc; gc = XCreateGC(This->display, This->window, 0, NULL); XCopyArea(This->display, GDK_WINDOW_XWINDOW(nullPluginGdkPixmap) , This->window, gc, @@ -426,7 +426,7 @@ drawPixmap(PluginInstance *This) static void setCursor (PluginInstance *This) { -#ifndef NO_X11 +#ifdef MOZ_X11 static Cursor nullPluginCursor = 0; if (!nullPluginCursor) { @@ -439,7 +439,7 @@ setCursor (PluginInstance *This) #endif } -#ifndef NO_X11 +#ifdef MOZ_X11 static void xt_event_handler(Widget xt_w, PluginInstance *This, XEvent *xevent, Boolean *b) { @@ -462,7 +462,7 @@ xt_event_handler(Widget xt_w, PluginInstance *This, XEvent *xevent, Boolean *b) static void addXtEventHandler(PluginInstance *This) { -#ifndef NO_X11 +#ifdef MOZ_X11 Display *dpy = (Display*) This->display; Window xwin = (Window) This->window; Widget xt_w = XtWindowToWidget(dpy, xwin); diff --git a/mozilla/modules/plugin/samples/default/unix/nullplugin.h b/mozilla/modules/plugin/samples/default/unix/nullplugin.h index 100a5dd3f62..32651cdd0d2 100644 --- a/mozilla/modules/plugin/samples/default/unix/nullplugin.h +++ b/mozilla/modules/plugin/samples/default/unix/nullplugin.h @@ -64,7 +64,7 @@ Click OK to download Plugin." typedef struct _PluginInstance { uint16 mode; -#ifndef NO_X11 +#ifdef MOZ_X11 Window window; Display *display; #endif @@ -77,7 +77,7 @@ typedef struct _PluginInstance char *pluginsPageUrl; char *pluginsFileUrl; NPBool pluginsHidden; -#ifndef NO_X11 +#ifdef MOZ_X11 Visual* visual; Colormap colormap; #endif diff --git a/mozilla/netwerk/protocol/http/src/nsHttpHandler.cpp b/mozilla/netwerk/protocol/http/src/nsHttpHandler.cpp index e7cb05e5d70..e0deed59baa 100644 --- a/mozilla/netwerk/protocol/http/src/nsHttpHandler.cpp +++ b/mozilla/netwerk/protocol/http/src/nsHttpHandler.cpp @@ -678,7 +678,7 @@ nsHttpHandler::InitUserAgentComponents() "Macintosh" #elif defined(XP_BEOS) "BeOS" -#elif defined(NO_X11) +#elif !defined(MOZ_X11) "?" #else "X11"