mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-11 20:35:50 +00:00
Use MOZ_X11 instead of NO_X11 to signify that we're building for an X11-based toolkit.
Bug #191447 r=peterl sr=sfraser
This commit is contained in:
parent
41095b0061
commit
d76e9fd54a
@ -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 <Events.h>
|
||||
#endif
|
||||
|
||||
#if defined(XP_UNIX) && !defined(NO_X11)
|
||||
#if defined(XP_UNIX) && defined(MOZ_X11)
|
||||
#include <X11/Xlib.h>
|
||||
#include <X11/Xutil.h>
|
||||
#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;
|
||||
|
@ -55,7 +55,7 @@
|
||||
# include <MacWindows.h>
|
||||
#endif
|
||||
|
||||
#if defined(XP_UNIX) && !defined(NO_X11)
|
||||
#if defined(XP_UNIX) && defined(MOZ_X11)
|
||||
# include <X11/Xlib.h>
|
||||
# include <X11/Xutil.h>
|
||||
#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;
|
||||
|
@ -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));
|
||||
|
@ -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)
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -38,7 +38,7 @@
|
||||
#include <gdk/gdkkeysyms.h>
|
||||
|
||||
/* Xlib/Xt stuff */
|
||||
#ifndef NO_X11
|
||||
#ifdef MOZ_X11
|
||||
#include <X11/Xlib.h>
|
||||
#include <X11/Intrinsic.h>
|
||||
#include <X11/cursorfont.h>
|
||||
@ -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);
|
||||
|
@ -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
|
||||
|
@ -678,7 +678,7 @@ nsHttpHandler::InitUserAgentComponents()
|
||||
"Macintosh"
|
||||
#elif defined(XP_BEOS)
|
||||
"BeOS"
|
||||
#elif defined(NO_X11)
|
||||
#elif !defined(MOZ_X11)
|
||||
"?"
|
||||
#else
|
||||
"X11"
|
||||
|
Loading…
Reference in New Issue
Block a user