Index: ui/base/x/x11_util.h |
diff --git a/ui/base/x/x11_util.h b/ui/base/x/x11_util.h |
index fb0304e6824433085c81e54c35e58a6e46791cf3..6763c04a451bc68846e44e05ccf4af100952875f 100644 |
--- a/ui/base/x/x11_util.h |
+++ b/ui/base/x/x11_util.h |
@@ -19,13 +19,16 @@ |
#include "ui/base/ui_export.h" |
typedef unsigned long Atom; |
-typedef struct _GdkDrawable GdkWindow; |
-typedef struct _GtkWidget GtkWidget; |
-typedef struct _GtkWindow GtkWindow; |
typedef unsigned long XID; |
typedef unsigned long XSharedMemoryId; // ShmSeg in the X headers. |
typedef struct _XDisplay Display; |
+#if defined(TOOLKIT_USES_GTK) |
+typedef struct _GdkDrawable GdkWindow; |
+typedef struct _GtkWidget GtkWidget; |
+typedef struct _GtkWindow GtkWindow; |
+#endif |
+ |
namespace gfx { |
class Rect; |
} |
@@ -72,6 +75,7 @@ UI_EXPORT XID GetX11RootWindow(); |
// Returns the user's current desktop. |
bool GetCurrentDesktop(int* desktop); |
+#if defined(TOOLKIT_USES_GTK) |
// Get the X window id for the given GTK widget. |
UI_EXPORT XID GetX11WindowFromGtkWidget(GtkWidget* widget); |
XID GetX11WindowFromGdkWindow(GdkWindow* window); |
@@ -84,6 +88,7 @@ UI_EXPORT GtkWindow* GetGtkWindowFromX11Window(XID xid); |
// Get a Visual from the given widget. Since we don't include the Xlib |
// headers, this is returned as a void*. |
UI_EXPORT void* GetVisualFromGtkWidget(GtkWidget* widget); |
+#endif // defined(TOOLKIT_USES_GTK) |
// Return the number of bits-per-pixel for a pixmap of the given depth |
UI_EXPORT int BitsPerPixelForPixmapDepth(Display* display, int depth); |