diff options
author | sque@chromium.org <sque@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-06-27 05:48:47 +0000 |
---|---|---|
committer | sque@chromium.org <sque@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-06-27 05:48:47 +0000 |
commit | 1e03cdff9cdb66731a7543cf357a6f5af264685f (patch) | |
tree | 275cbd147655a4443ee6bee3f45b288afd5aae73 /chromeos | |
parent | 890ebb75f9b1e8c2195b46b068f9484e51aadad4 (diff) | |
download | chromium_src-1e03cdff9cdb66731a7543cf357a6f5af264685f.zip chromium_src-1e03cdff9cdb66731a7543cf357a6f5af264685f.tar.gz chromium_src-1e03cdff9cdb66731a7543cf357a6f5af264685f.tar.bz2 |
chromeos: Forward declare X stuff in output_configurator.h
Do not include X11 headers in output_configurator.h. They should be
included in output_configurator.cc to avoid spilling X defines into
every file that tries to use output configurator.
BUG=chromium:12643
TEST=build successfully for Chrome OS
Change-Id: Ic026a470d71074db458684813b8788ea2dc78fd2
Signed-off-by: Simon Que <sque@chromium.org>
Review URL: https://chromiumcodereview.appspot.com/10633030
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@144407 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chromeos')
-rw-r--r-- | chromeos/monitor/output_configurator.cc | 12 | ||||
-rw-r--r-- | chromeos/monitor/output_configurator.h | 23 |
2 files changed, 23 insertions, 12 deletions
diff --git a/chromeos/monitor/output_configurator.cc b/chromeos/monitor/output_configurator.cc index e52cd22..8e47f07 100644 --- a/chromeos/monitor/output_configurator.cc +++ b/chromeos/monitor/output_configurator.cc @@ -4,6 +4,18 @@ #include "chromeos/monitor/output_configurator.h" +#include <X11/Xlib.h> +#include <X11/extensions/dpms.h> +#include <X11/extensions/Xrandr.h> + +// Xlib defines Status as int which causes our include of dbus/bus.h to fail +// when it tries to name an enum Status. Thus, we need to undefine it (note +// that this will cause a problem if code needs to use the Status type). +// RootWindow causes similar problems in that there is a Chromium type with that +// name. +#undef Status +#undef RootWindow + #include "base/chromeos/chromeos_version.h" #include "base/logging.h" #include "base/message_pump_aurax11.h" diff --git a/chromeos/monitor/output_configurator.h b/chromeos/monitor/output_configurator.h index ad1318e..b98bcb4 100644 --- a/chromeos/monitor/output_configurator.h +++ b/chromeos/monitor/output_configurator.h @@ -6,24 +6,23 @@ #define CHROMEOS_MONITOR_OUTPUT_CONFIGURATOR_H_ #pragma once -#include <X11/Xlib.h> -#include <X11/extensions/dpms.h> -#include <X11/extensions/Xrandr.h> - -// Xlib defines Status as int which causes our include of dbus/bus.h to fail -// when it tries to name an enum Status. Thus, we need to undefine it (note -// that this will cause a problem if code needs to use the Status type). -// RootWindow causes similar problems in that there is a Chromium type with that -// name. -#undef Status -#undef RootWindow - #include "base/basictypes.h" #include "base/event_types.h" #include "base/memory/scoped_ptr.h" #include "base/message_loop.h" #include "chromeos/chromeos_export.h" +// Forward declarations for Xlib and Xrandr. +// This is so unused X definitions don't pollute the namespace. +typedef unsigned long XID; +typedef XID Window; +typedef XID RROutput; +typedef XID RRCrtc; +typedef XID RRMode; + +struct _XRRScreenResources; +typedef _XRRScreenResources XRRScreenResources; + namespace chromeos { // The information we need to cache from an output to implement operations such |