OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_H_ | 5 #ifndef UI_BASE_X_X11_UTIL_H_ |
6 #define UI_BASE_X_X11_UTIL_H_ | 6 #define UI_BASE_X_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 // |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
112 XID GetX11WindowFromGdkWindow(GdkWindow* window); | 112 XID GetX11WindowFromGdkWindow(GdkWindow* window); |
113 | 113 |
114 // Get the GtkWindow* wrapping a given XID, if any. | 114 // Get the GtkWindow* wrapping a given XID, if any. |
115 // Returns NULL if there isn't already a GtkWindow* wrapping this XID; | 115 // Returns NULL if there isn't already a GtkWindow* wrapping this XID; |
116 // see gdk_window_foreign_new() etc. to wrap arbitrary XIDs. | 116 // see gdk_window_foreign_new() etc. to wrap arbitrary XIDs. |
117 UI_EXPORT GtkWindow* GetGtkWindowFromX11Window(XID xid); | 117 UI_EXPORT GtkWindow* GetGtkWindowFromX11Window(XID xid); |
118 | 118 |
119 // Get a Visual from the given widget. Since we don't include the Xlib | 119 // Get a Visual from the given widget. Since we don't include the Xlib |
120 // headers, this is returned as a void*. | 120 // headers, this is returned as a void*. |
121 UI_EXPORT void* GetVisualFromGtkWidget(GtkWidget* widget); | 121 UI_EXPORT void* GetVisualFromGtkWidget(GtkWidget* widget); |
122 | |
123 // Sets _GTK_HIDE_TITLEBAR_WHEN_MAXIMIZED on |window|. | |
124 UI_EXPORT void SetHideTitlebarWhenMaximizedProperty(GdkWindow* window); | |
Daniel Erat
2012/05/21 21:37:10
despite the atom's name, this isn't really GTK-spe
tony
2012/05/21 21:47:31
Done.
| |
122 #endif // defined(TOOLKIT_GTK) | 125 #endif // defined(TOOLKIT_GTK) |
123 | 126 |
124 // Return the number of bits-per-pixel for a pixmap of the given depth | 127 // Return the number of bits-per-pixel for a pixmap of the given depth |
125 UI_EXPORT int BitsPerPixelForPixmapDepth(Display* display, int depth); | 128 UI_EXPORT int BitsPerPixelForPixmapDepth(Display* display, int depth); |
126 | 129 |
127 // Returns true if |window| is visible. | 130 // Returns true if |window| is visible. |
128 UI_EXPORT bool IsWindowVisible(XID window); | 131 UI_EXPORT bool IsWindowVisible(XID window); |
129 | 132 |
130 // Returns the bounds of |window|. | 133 // Returns the bounds of |window|. |
131 UI_EXPORT bool GetWindowRect(XID window, gfx::Rect* rect); | 134 UI_EXPORT bool GetWindowRect(XID window, gfx::Rect* rect); |
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
287 | 290 |
288 private: | 291 private: |
289 char* string_; | 292 char* string_; |
290 | 293 |
291 DISALLOW_COPY_AND_ASSIGN(XScopedString); | 294 DISALLOW_COPY_AND_ASSIGN(XScopedString); |
292 }; | 295 }; |
293 | 296 |
294 } // namespace ui | 297 } // namespace ui |
295 | 298 |
296 #endif // UI_BASE_X_X11_UTIL_H_ | 299 #endif // UI_BASE_X_X11_UTIL_H_ |
OLD | NEW |