Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(864)

Side by Side Diff: app/x11_util.h

Issue 661237: This adds in the ability for Chrome to generate windows with snapshots of all... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « app/surface/transport_dib.h ('k') | app/x11_util.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 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 do not require the Xlib headers to be included (which is why 10 // These functions do not require the Xlib headers to be included (which is why
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 XID GetX11WindowFromGdkWindow(GdkWindow* window); 71 XID GetX11WindowFromGdkWindow(GdkWindow* window);
72 // Get a Visual from the given widget. Since we don't include the Xlib 72 // Get a Visual from the given widget. Since we don't include the Xlib
73 // headers, this is returned as a void*. 73 // headers, this is returned as a void*.
74 void* GetVisualFromGtkWidget(GtkWidget* widget); 74 void* GetVisualFromGtkWidget(GtkWidget* widget);
75 // Return the number of bits-per-pixel for a pixmap of the given depth 75 // Return the number of bits-per-pixel for a pixmap of the given depth
76 int BitsPerPixelForPixmapDepth(Display* display, int depth); 76 int BitsPerPixelForPixmapDepth(Display* display, int depth);
77 // Returns true if |window| is visible. 77 // Returns true if |window| is visible.
78 bool IsWindowVisible(XID window); 78 bool IsWindowVisible(XID window);
79 // Returns the bounds of |window|. 79 // Returns the bounds of |window|.
80 bool GetWindowRect(XID window, gfx::Rect* rect); 80 bool GetWindowRect(XID window, gfx::Rect* rect);
81 // Get the value of an int or string property. On success, true is returned and 81 // Get the value of an int, int array, or string property. On
82 // the value is stored in |value|. 82 // success, true is returned and the value is stored in |value|.
83 bool GetIntProperty(XID window, const std::string& property_name, int* value); 83 bool GetIntProperty(XID window, const std::string& property_name, int* value);
84 bool GetIntArrayProperty(XID window, const std::string& property_name,
85 std::vector<int>* value);
84 bool GetStringProperty( 86 bool GetStringProperty(
85 XID window, const std::string& property_name, std::string* value); 87 XID window, const std::string& property_name, std::string* value);
86 88
87 // Get |window|'s parent window, or None if |window| is the root window. 89 // Get |window|'s parent window, or None if |window| is the root window.
88 XID GetParentWindow(XID window); 90 XID GetParentWindow(XID window);
89 91
90 // Walk up |window|'s hierarchy until we find a direct child of |root|. 92 // Walk up |window|'s hierarchy until we find a direct child of |root|.
91 XID GetHighestAncestorWindow(XID window, XID root); 93 XID GetHighestAncestorWindow(XID window, XID root);
92 94
93 // Implementers of this interface receive a notification for every X window of 95 // Implementers of this interface receive a notification for every X window of
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 // into a byte vector. 166 // into a byte vector.
165 void GrabWindowSnapshot(GtkWindow* gdk_window, 167 void GrabWindowSnapshot(GtkWindow* gdk_window,
166 std::vector<unsigned char>* png_representation); 168 std::vector<unsigned char>* png_representation);
167 169
168 // Change desktop for |window| to the desktop of |destination| window. 170 // Change desktop for |window| to the desktop of |destination| window.
169 bool ChangeWindowDesktop(XID window, XID destination); 171 bool ChangeWindowDesktop(XID window, XID destination);
170 172
171 } // namespace x11_util 173 } // namespace x11_util
172 174
173 #endif // APP_X11_UTIL_H_ 175 #endif // APP_X11_UTIL_H_
OLDNEW
« no previous file with comments | « app/surface/transport_dib.h ('k') | app/x11_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698