| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 APP_X11_UTIL_H_ | 5 #ifndef APP_X11_UTIL_H_ |
| 6 #define APP_X11_UTIL_H_ | 6 #define APP_X11_UTIL_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 // This file declares utility functions for X11 (Linux only). | 9 // This file declares utility functions for X11 (Linux only). |
| 10 // | 10 // |
| 11 // These functions do not require the Xlib headers to be included (which is why | 11 // These functions do not require the Xlib headers to be included (which is why |
| 12 // we use a void* for Visual*). The Xlib headers are highly polluting so we try | 12 // we use a void* for Visual*). The Xlib headers are highly polluting so we try |
| 13 // hard to limit their spread into the rest of the code. | 13 // hard to limit their spread into the rest of the code. |
| 14 | 14 |
| 15 #include <string> | 15 #include <string> |
| 16 #include <vector> | 16 #include <vector> |
| 17 | 17 |
| 18 #include "base/task.h" | 18 #include "base/basictypes.h" |
| 19 #include "gfx/rect.h" | |
| 20 | 19 |
| 21 typedef struct _GdkDrawable GdkWindow; | 20 typedef struct _GdkDrawable GdkWindow; |
| 22 typedef struct _GtkWidget GtkWidget; | 21 typedef struct _GtkWidget GtkWidget; |
| 23 typedef struct _GtkWindow GtkWindow; | 22 typedef struct _GtkWindow GtkWindow; |
| 24 typedef unsigned long XID; | 23 typedef unsigned long XID; |
| 25 typedef unsigned long XSharedMemoryId; // ShmSeg in the X headers. | 24 typedef unsigned long XSharedMemoryId; // ShmSeg in the X headers. |
| 26 typedef struct _XDisplay Display; | 25 typedef struct _XDisplay Display; |
| 27 | 26 |
| 28 namespace base { | 27 namespace base { |
| 29 class Thread; | 28 class Thread; |
| 30 } | 29 } |
| 31 | 30 |
| 32 namespace gfx { | 31 namespace gfx { |
| 32 class Rect; |
| 33 class Size; | 33 class Size; |
| 34 } | 34 } |
| 35 | 35 |
| 36 namespace x11_util { | 36 namespace x11_util { |
| 37 | 37 |
| 38 // These functions use the GDK default display and this /must/ be called from | 38 // These functions use the GDK default display and this /must/ be called from |
| 39 // the UI thread. Thus, they don't support multiple displays. | 39 // the UI thread. Thus, they don't support multiple displays. |
| 40 | 40 |
| 41 // These functions cache their results --------------------------------- | 41 // These functions cache their results --------------------------------- |
| 42 | 42 |
| (...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 177 | 177 |
| 178 // Change desktop for |window| to the desktop of |destination| window. | 178 // Change desktop for |window| to the desktop of |destination| window. |
| 179 bool ChangeWindowDesktop(XID window, XID destination); | 179 bool ChangeWindowDesktop(XID window, XID destination); |
| 180 | 180 |
| 181 // Sets the X Error Handlers so we can catch X errors and crash. | 181 // Sets the X Error Handlers so we can catch X errors and crash. |
| 182 void SetX11ErrorHandlers(); | 182 void SetX11ErrorHandlers(); |
| 183 | 183 |
| 184 } // namespace x11_util | 184 } // namespace x11_util |
| 185 | 185 |
| 186 #endif // APP_X11_UTIL_H_ | 186 #endif // APP_X11_UTIL_H_ |
| OLD | NEW |