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 // |
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
166 bool GetWindowManagerName(std::string* name); | 166 bool GetWindowManagerName(std::string* name); |
167 | 167 |
168 // Grabs a snapshot of the designated window and stores a PNG representation | 168 // Grabs a snapshot of the designated window and stores a PNG representation |
169 // into a byte vector. | 169 // into a byte vector. |
170 void GrabWindowSnapshot(GtkWindow* gdk_window, | 170 void GrabWindowSnapshot(GtkWindow* gdk_window, |
171 std::vector<unsigned char>* png_representation); | 171 std::vector<unsigned char>* png_representation); |
172 | 172 |
173 // Change desktop for |window| to the desktop of |destination| window. | 173 // Change desktop for |window| to the desktop of |destination| window. |
174 bool ChangeWindowDesktop(XID window, XID destination); | 174 bool ChangeWindowDesktop(XID window, XID destination); |
175 | 175 |
176 // Sets the X Error Handlers so we can catch X errors and crash. | 176 // Enable the default X error handlers. These will log the error and abort |
177 void SetX11ErrorHandlers(); | 177 // the process if called. Use SetX11ErrorHandlers() from x11_util_internal.h |
| 178 // to set your own error handlers. |
| 179 void SetDefaultX11ErrorHandlers(); |
178 | 180 |
179 } // namespace x11_util | 181 } // namespace x11_util |
180 | 182 |
181 #endif // APP_X11_UTIL_H_ | 183 #endif // APP_X11_UTIL_H_ |
OLD | NEW |