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

Unified Diff: ui/base/x/x11_util.h

Issue 232653002: x11_util: Added GetInnerWindowBounds and GetWindowExtents. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix test compile. Created 6 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | ui/base/x/x11_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/x/x11_util.h
diff --git a/ui/base/x/x11_util.h b/ui/base/x/x11_util.h
index 42e928f5b02b8ba3985fb04e3a718e63c475c7c8..4b14ddb3a797d91d52e821637e4507a1d989cf98 100644
--- a/ui/base/x/x11_util.h
+++ b/ui/base/x/x11_util.h
@@ -20,7 +20,6 @@
#include "ui/base/ui_base_export.h"
#include "ui/events/event_constants.h"
#include "ui/events/keycodes/keyboard_codes.h"
-#include "ui/gfx/point.h"
#include "ui/gfx/x/x11_types.h"
typedef unsigned long XSharedMemoryId; // ShmSeg in the X headers.
@@ -30,6 +29,7 @@ typedef union _XEvent XEvent;
namespace gfx {
class Canvas;
+class Insets;
class Point;
class Rect;
}
@@ -121,8 +121,17 @@ UI_BASE_EXPORT void ClearX11DefaultRootWindow();
// Returns true if |window| is visible.
UI_BASE_EXPORT bool IsWindowVisible(XID window);
-// Returns the bounds of |window|.
-UI_BASE_EXPORT bool GetWindowRect(XID window, gfx::Rect* rect);
+// Returns the inner bounds of |window| (excluding the non-client area).
+UI_BASE_EXPORT bool GetInnerWindowBounds(XID window, gfx::Rect* rect);
+
+// Returns the non-client area extents of |window|. This is a negative inset; it
+// represents the negative size of the window border on all sides.
+// InnerWindowBounds.Inset(WindowExtents) = OuterWindowBounds.
+// Returns false if the window manager does not provide extents information.
+UI_BASE_EXPORT bool GetWindowExtents(XID window, gfx::Insets* extents);
+
+// Returns the outer bounds of |window| (including the non-client area).
+UI_BASE_EXPORT bool GetOuterWindowBounds(XID window, gfx::Rect* rect);
// Returns true if |window| contains the point |screen_loc|.
UI_BASE_EXPORT bool WindowContainsPoint(XID window, gfx::Point screen_loc);
« no previous file with comments | « no previous file | ui/base/x/x11_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698