| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef UI_BASE_X_X11_UTIL_INTERNAL_H_ | 5 #ifndef UI_BASE_X_X11_UTIL_INTERNAL_H_ |
| 6 #define UI_BASE_X_X11_UTIL_INTERNAL_H_ | 6 #define UI_BASE_X_X11_UTIL_INTERNAL_H_ |
| 7 | 7 |
| 8 // This file declares utility functions for X11 (Linux only). | 8 // This file declares utility functions for X11 (Linux only). |
| 9 // | 9 // |
| 10 // These functions require the inclusion of the Xlib headers. Since the Xlib | 10 // These functions require the inclusion of the Xlib headers. Since the Xlib |
| 11 // headers pollute so much of the namespace, this should only be included | 11 // headers pollute so much of the namespace, this should only be included |
| 12 // when needed. | 12 // when needed. |
| 13 | 13 |
| 14 extern "C" { | 14 extern "C" { |
| 15 #include <X11/extensions/Xrender.h> | |
| 16 #include <X11/extensions/XShm.h> | |
| 17 #include <X11/Xatom.h> | 15 #include <X11/Xatom.h> |
| 18 #include <X11/Xlib.h> | 16 #include <X11/Xlib.h> |
| 17 #define Bool int // Ironic, but other headers undef Bool |
| 18 #include <X11/extensions/XInput.h> |
| 19 #include <X11/extensions/XShm.h> |
| 20 #include <X11/extensions/Xrender.h> |
| 21 #undef None // Defined by X11/X.h to 0L which collides with other headers |
| 22 #undef Status // Defined by X11/Xlib.h to int which collides with other headers |
| 23 #undef True // Defined by X11/Xlib.h to 1 which collides with other headers |
| 24 #undef False // Defined by X11/Xlib.h to 0 which collides with other headers |
| 25 #undef CurrentTime // Defined by X11/X.h to 0L which collides with other |
| 26 // headers |
| 27 #undef Success // Defined by X11/X.h to 0 which collides with other headers |
| 28 #undef CREATE // Defined by XInput.h to 1 which collides with other headers |
| 29 #undef DestroyAll // Defined by X11/X.h to 0 which collides with other headers |
| 30 #undef COUNT // Defined by X11/extensions/XI.h to 0 which collides |
| 19 } | 31 } |
| 20 | 32 |
| 33 struct X11Constants { |
| 34 static const long None = 0L; |
| 35 static const long CurrentTime = 0L; |
| 36 static const int False = 0; |
| 37 static const int True = 1; |
| 38 static const int Success = 0; |
| 39 typedef int Status; |
| 40 }; |
| 41 |
| 21 #include <memory> | 42 #include <memory> |
| 22 #include <unordered_map> | 43 #include <unordered_map> |
| 23 | 44 |
| 24 #include "base/macros.h" | 45 #include "base/macros.h" |
| 25 #include "build/build_config.h" | 46 #include "build/build_config.h" |
| 26 #include "ui/base/x/ui_base_x_export.h" | 47 #include "ui/base/x/ui_base_x_export.h" |
| 27 #include "ui/gfx/x/x11_types.h" | 48 #include "ui/gfx/x/x11_types.h" |
| 28 | 49 |
| 29 namespace base { | 50 namespace base { |
| 30 template <typename T> | 51 template <typename T> |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 115 bool using_compositing_wm_; | 136 bool using_compositing_wm_; |
| 116 bool using_software_rendering_; | 137 bool using_software_rendering_; |
| 117 bool have_gpu_argb_visual_; | 138 bool have_gpu_argb_visual_; |
| 118 | 139 |
| 119 DISALLOW_COPY_AND_ASSIGN(XVisualManager); | 140 DISALLOW_COPY_AND_ASSIGN(XVisualManager); |
| 120 }; | 141 }; |
| 121 | 142 |
| 122 } // namespace ui | 143 } // namespace ui |
| 123 | 144 |
| 124 #endif // UI_BASE_X_X11_UTIL_INTERNAL_H_ | 145 #endif // UI_BASE_X_X11_UTIL_INTERNAL_H_ |
| OLD | NEW |